query_id
stringlengths
32
32
query
stringlengths
7
5.32k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
fee6bd9c7cff8b1f0755a5f48e0f5e12
Returns a list of all fields with name, type and whether its required.
[ { "docid": "9b8b7d96f3c74f872a59b972ae96527d", "score": "0.0", "text": "public static function getFields($idCategory, $idFieldGroup, $arSystemGroups) {\n global $db;\n if (array_key_exists($idFieldGroup, $arSystemGroups)) {\n // System group, read from array\n return $arSystemGroups;\n } else {\n // Regular group, read from database\n global $langval;\n $arFields = $db->fetch_table(\"\n SELECT\n f.F_NAME, f.F_TYP, f.FK_LISTE, IFNULL(kf.B_NEEDED,f.B_NEEDED) AS B_NEEDED, s.*\n\t\t\t\tFROM `kat` k\n\t\t\t\tLEFT JOIN `table_def` t ON t.T_NAME=k.KAT_TABLE\n\t\t\t\tLEFT JOIN `field_def` f ON f.FK_TABLE_DEF=t.ID_TABLE_DEF\n\t\t\t\tLEFT JOIN `kat2field` kf ON kf.FK_KAT=k.ID_KAT AND kf.FK_FIELD=f.ID_FIELD_DEF\n LEFT JOIN `string_field_def` s ON s.S_TABLE='field_def' AND s.FK=f.ID_FIELD_DEF\n\t\t\t\t\tAND s.BF_LANG=if(f.BF_LANG_FIELD_DEF & \".$langval.\", \".$langval.\", 1 << floor(log(f.BF_LANG_FIELD_DEF+0.5)/log(2)))\n\t\t\t\tWHERE k.ID_KAT=\".(int)$idCategory.\" AND kf.B_ENABLED=1 AND f.B_ENABLED=1\n\t\t\t\t AND f.FK_FIELD_GROUP\".($idFieldGroup === null ? \" IS NULL\" : \"=\".(int)$idFieldGroup));\n return $arFields;\n }\n }", "title": "" } ]
[ { "docid": "e9e4c4a30e04f8bd952e8c25f6178708", "score": "0.7667389", "text": "protected function requiredFields()\n {\n $fieldset = Fieldset::get($this->request->input('fieldset'));\n\n return collect($fieldset->fields())->filter(function ($field) {\n return array_get($field, 'required');\n })->keys()->map(function ($field) {\n return 'fields.' . $field;\n })->all();\n }", "title": "" }, { "docid": "e7cb260347bd800c323b54fcce4a2080", "score": "0.74445564", "text": "public function get_required() {\n $info = $this->get_struct();\n $tmp = array();\n foreach ($info as $k => $v) { // $k = field name, $v Field class\n if ( $v->is_required() && $v->is_hidden() == false ) {\n array_push($tmp, $k);\n }\n }\n\n if ( count($tmp) > 0 ) {\n return $tmp;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "810cb4dc169a15d2d85288905018205c", "score": "0.7166651", "text": "public function getRequiredFields()\n {\n $fields = parent::getRequiredFields();\n unset($fields[array_search('Description', $fields)]);\n\n return $fields;\n }", "title": "" }, { "docid": "0a97ce82b160790ad760482059b897a5", "score": "0.7165443", "text": "public static function getFields();", "title": "" }, { "docid": "132ef999bd21e7526e89bc9eab64ea15", "score": "0.7090155", "text": "public function requiredFields(): array\n {\n return [];\n }", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.7069364", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.7069364", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.7069364", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.7069364", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.7069364", "text": "public function getFields();", "title": "" }, { "docid": "f39694f8ba300efce4c0942a44d52047", "score": "0.6961015", "text": "public function getRequiredCardFields()\n {\n return array\n (\n 'email',\n );\n }", "title": "" }, { "docid": "ebfe937a395fd7027342706b59e52f4a", "score": "0.69608265", "text": "public function get_required_fields($table) {\n if ( in_array( $table, $this->get_all_tables() ) ) {\n return $this->get_struct()[$table]->get_required();\n } else {\n return array();\n }\n }", "title": "" }, { "docid": "2446d608c978221c23df4eafcbd7c928", "score": "0.69601834", "text": "public function getFields()\n {\n return [\n 'status',\n 'name',\n 'surname',\n 'code',\n 'country',\n 'certificate',\n 'authCertificate'\n ];\n }", "title": "" }, { "docid": "62cc78c6a53109f8aaebd178e26e23e5", "score": "0.6922644", "text": "public function getAllFields();", "title": "" }, { "docid": "01e51e7ad65d8c857bb9a6ef7a354eeb", "score": "0.6897847", "text": "public function getFields()\n {\n return isset($this->schema['fields']) ? $this->schema['fields'] : [];\n }", "title": "" }, { "docid": "4e86eab624f368b046efd672ee0ea8c9", "score": "0.68933487", "text": "public static function getAllFieldsNames();", "title": "" }, { "docid": "da7ca3c1936ec9930fc35911ea763e3e", "score": "0.6865663", "text": "public function getFields() {\r\n\t\tforeach ( $this->fields as $name => $info ) {\r\n\t\t\tif (! is_object ( $info ))\r\n\t\t\t\t$this->getFieldInfo ( $name );\r\n\t\t}\r\n\t\treturn $this->fields;\r\n\t}", "title": "" }, { "docid": "739060c4ea8e7c5d82158821cd0b54a1", "score": "0.6833468", "text": "public function get_all_fields()\n {\n $raw_fields = get_object_vars($this);\n return array_diff_key($raw_fields, array('__one'=>'', '__many'=>'', '__manager'=>'', '__functions'=>'', '__constraints'=>''));\n }", "title": "" }, { "docid": "e323975279541c2d40d73b095f94aeb2", "score": "0.6823509", "text": "public static function fields()\n {\n return array();\n }", "title": "" }, { "docid": "88721cf227f5804fa313e3a14f7ee89a", "score": "0.68198436", "text": "protected static function getAvailableFields()\n\t{\n\t\t$fields = array(\n\t\t\t'CREATED_BY',\n\t\t\t'ATTENDEES',\n\t\t\t'IS_MEETING',\n\t\t\t'IS_RECURSIVE',\n\t\t\t'MEETING_STATUS',\n\t\t\t'DATE_FROM',\n\t\t\t'DATE_TO'\n\t\t);\n\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "33e93b5f32fb2bad94506250a33e2c09", "score": "0.6802448", "text": "public function getFields() {}", "title": "" }, { "docid": "4cdd2a24c8877fe199c4424db967a205", "score": "0.6790289", "text": "public function getValidateRequiredFields()\n {\n return $this->validate_required_fields;\n }", "title": "" }, { "docid": "77d4873ffba80d190a23297fd98ead82", "score": "0.6772689", "text": "public function fields();", "title": "" }, { "docid": "77d4873ffba80d190a23297fd98ead82", "score": "0.6772689", "text": "public function fields();", "title": "" }, { "docid": "4f47ca52de7b6a93f6abf82bca9d787b", "score": "0.6761581", "text": "public function getAllowedFields() {\n\t\treturn array('name', 'description', 'price', 'enabled');\n\t}", "title": "" }, { "docid": "c3146873ec1142b71f752c2ea2363e14", "score": "0.6744461", "text": "public function getFields() {\n $fields = array(\n \"car_id\" => \"CAR_ID\",\n \"license_plate\" => \"LICENSE_PLATE\",\n \"make\" => \"CAR_MAKE\",\n \"model\" => \"CAR_MODEL\");\n\n return $fields;\n }", "title": "" }, { "docid": "ee91778061a981054084f121ddb139ce", "score": "0.6721653", "text": "abstract protected function getRequiredFields():string;", "title": "" }, { "docid": "82369edb3256db6e323a5aa6aacce9c1", "score": "0.6720195", "text": "function getFields();", "title": "" }, { "docid": "6236c25a8c89a5c7cb8c0c8c36318892", "score": "0.6719034", "text": "public function getAvailableFields() : array {\n $fields = [];\n $vars = get_object_vars($this);\n\n foreach($vars as $key => $var) {\n array_push($fields, $this->convertToUnderscore($key));\n }\n\n // Unset dal field\n if(($key = array_search('dal', $fields)) !== false) {\n unset($fields[$key]);\n }\n\n // Unset included field\n if(($key = array_search('included_fields', $fields)) !== false) {\n unset($fields[$key]);\n }\n\n return $fields;\n }", "title": "" }, { "docid": "9ac2836e0ad3f49096a31dde0c83efe7", "score": "0.6692131", "text": "public function getRequiredCoreFields()\n {\n return array\n (\n 'amount',\n 'currency',\n );\n }", "title": "" }, { "docid": "1fb5905040c1dd64d8a3e389be3a54fe", "score": "0.6654953", "text": "abstract public function getAllowedFields();", "title": "" }, { "docid": "70737a760053bf3d1b1fd00065802735", "score": "0.6651475", "text": "public function declareFields() {\n\t\t$fields = array(\n\t\t\t\t\"id\",\n\t\t\t\t\"pass\",\n\t\t\t\t\"email\",\n\t\t\t\t\"ts_registered\",\n\t\t\t\t\"role\",\n\t\t\t\t\"firstname\",\n\t\t\t\t\"lastname\"\n\t\t);\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "41e219ed0aad59a37b6de8245791bf1f", "score": "0.66287297", "text": "public static function getFields()\n {\n $names = [];\n foreach (static::$all as $form) {\n $class = static::get($form);\n $names = array_merge($names, $class::getFields());\n }\n return $names;\n }", "title": "" }, { "docid": "53d0548f69334b568b4a9cf9de781d80", "score": "0.66257274", "text": "abstract public function getFields();", "title": "" }, { "docid": "53d0548f69334b568b4a9cf9de781d80", "score": "0.66257274", "text": "abstract public function getFields();", "title": "" }, { "docid": "53d0548f69334b568b4a9cf9de781d80", "score": "0.66257274", "text": "abstract public function getFields();", "title": "" }, { "docid": "18ef29eadf83f5272c89ae1c9ee3ed6c", "score": "0.6622818", "text": "public function getFields()\n {\n return array();\n }", "title": "" }, { "docid": "36e66497106dca833bde804bc996a9cb", "score": "0.66168475", "text": "public static function getFields()\n {\n return array_keys(self::$fieldsMapping);\n }", "title": "" }, { "docid": "e9c8f16724e072e3d6760c0d3e89d9d3", "score": "0.66051835", "text": "public static function listFields(){\n\t\treturn [ \n\t\t\t\"permission_id\",\n\t\t\t\"model_type\",\n\t\t\t\"model_id\" \n\t\t];\n\t}", "title": "" }, { "docid": "500c96c6644eecbb7df67ddc59e1f4ba", "score": "0.65962785", "text": "public static function getFields() {\n\n return [\n 'name' => 'VARCHAR(255)',\n 'address_line_1' => 'VARCHAR(255)',\n 'address_line_2' => 'VARCHAR(255)',\n 'postal_code' => 'VARCHAR(255)',\n 'state' => 'VARCHAR(255)',\n 'region_id' => 'INTEGER(11)',\n 'amount' => 'FLOAT(11, 2)',\n 'reference_number' => 'VARCHAR(255)',\n 'shipped' => 'TINYINT(1) DEFAULT 0'\n ];\n }", "title": "" }, { "docid": "c2f6c20742a21366f2869c432e713004", "score": "0.65900075", "text": "public function getAvailableFields(): array\n {\n return [];\n }", "title": "" }, { "docid": "67f4d609afcd25e64024a08d5296b872", "score": "0.6558379", "text": "public function getFields()\n\t\t{\n\t\t\treturn(\\array_keys($this->fields));\n\t\t}", "title": "" }, { "docid": "71e077e9261d16aa432e6e2ff283d22e", "score": "0.6556673", "text": "public function fields(): array\n {\n return [\n 'success' => [\n 'type' => Type::nonNull(Type::boolean()),\n 'description' => 'Success'\n ],\n 'message' => [\n 'type' => Type::nonNull(Type::string()),\n 'description' => 'Message'\n ]\n ];\n }", "title": "" }, { "docid": "8d82d2549ea0782bda574ed5da5e8232", "score": "0.65468997", "text": "public function __get_fields()\n {\n return $this->fillable ? $this->fillable : [];\n }", "title": "" }, { "docid": "d38fbf7bd1b929539aead79d9f64e1db", "score": "0.65420777", "text": "protected function _getFields()\n\t{\n\t\treturn array('xf_content_type_field' => array(\n\t\t\t'content_type'\t\t=> array('type' => self::TYPE_STRING, 'required' => true, 'maxLength' => 25, 'requiredError' => 'content_type_please_enter_valid_name'),\n\t\t\t'field_name'\t\t=> array('type' => self::TYPE_STRING, 'required' => true, 'maxLength' => 50, 'requiredError' => 'content_type_please_enter_valid_field_name'),\n\t\t\t'field_value'\t\t=> array('type' => self::TYPE_STRING, 'required' => true, 'maxLength' => 75, 'requiredError' => 'content_type_please_enter_valid_field_value')\n\t\t));\n\t}", "title": "" }, { "docid": "7f214e8faca18cb40097e46e56691e29", "score": "0.6532694", "text": "abstract public function _listFields();", "title": "" }, { "docid": "51056461a8dc8162b26efc81767affac", "score": "0.65136266", "text": "public function requiredFields()\n {\n return array('product_id');\n }", "title": "" }, { "docid": "2e05df3739484c873088b153cb467893", "score": "0.65036494", "text": "public function fields() {\n\n\t\treturn array(\n\t\t\t'name' => Models::charField('name', 80, 'not null'),\n\t\t\t'email' => Models::emailField('email', 150, 'not null'),\n\t\t\t'password' => Models::passwordField('password', 100, 'not null'),\n\t\t\t'slug' => Models::slugField('slug', 250, 'not null'),\n\t\t\t'comments' => Models::textField('comments', 'NULL')\n\t\t);\n\t}", "title": "" }, { "docid": "f41f0f1146f84388a0d3e319184c747b", "score": "0.64966106", "text": "protected function _fields()\n\t{\n\t\treturn array('name', /*'cats_id', 'summary',*/ 'content',\n\t\t\t/*'order',*/'feature','status','lang_id',\n\t\t\t'url','description', 'keywords','titleweb',\n\t\t\t'nofollow','comment_status','public');\n\t}", "title": "" }, { "docid": "8a819a0eacf9c2f389b001e80eb7eb82", "score": "0.64747727", "text": "public function getFields() {\r\n return array_keys(static::$field_map);\r\n }", "title": "" }, { "docid": "903c7fca595739886687fe02f1ec403c", "score": "0.6474392", "text": "public function fields()\n {\n return $this->get('fields', []);\n }", "title": "" }, { "docid": "7ce7a04e7b38f96cefa095955a2ecd7b", "score": "0.64721495", "text": "public function getFields(): array;", "title": "" }, { "docid": "7ce7a04e7b38f96cefa095955a2ecd7b", "score": "0.64721495", "text": "public function getFields(): array;", "title": "" }, { "docid": "3263d9e10f0ac920a0e6149b9577da63", "score": "0.6465554", "text": "public function fields()\r\n {\r\n return [];\r\n }", "title": "" }, { "docid": "031ae34088f6eca8258f16501aeb3872", "score": "0.6465164", "text": "public function getFieldsForFilter();", "title": "" }, { "docid": "f4e9a306cd99fb4cf12b2a50fc1fb757", "score": "0.64519876", "text": "public function getFields()\n {\n return [\n 'status',\n 'dtbs',\n 'dtbs_hash',\n 'algorithm',\n ];\n }", "title": "" }, { "docid": "63f8191b7e45e309f96274f9c0b3a42b", "score": "0.64512455", "text": "public function getFields() {\n $f= array();\n $v= (is_object($this->_objref) \n ? get_object_vars($this->_objref) \n : get_class_vars($this->_objref)\n );\n foreach ($this->_reflect->getProperties() as $p) {\n if ('__id' == ($name= $p->getName())) continue;\n \n $f[]= new Field(\n $this->_objref, \n $name,\n isset($v[$name]) ? gettype($v[$name]) : NULL\n );\n }\n return $f;\n }", "title": "" }, { "docid": "ff8652e69d5992228dcd4d2f12d31080", "score": "0.64417934", "text": "function getAvailableFields() {\n $fields = $this->_getModuleFields();\n\n return $fields;\n }", "title": "" }, { "docid": "e243969db9de69eb5748a151d4a29815", "score": "0.6430368", "text": "private function getFields(){\n\n\t\t$types = FieldFactory::getAvailableTypes();\n\t\t//$types = Sort::pluck( $types, 'name' );\n\n\n\n\t\t$in_standard = array( 'text', 'textarea', 'email', 'checkbox', 'number', 'checkboxes', 'radio', 'select' );\n\t\t$in_adv = array( 'file', 'wysiwyg', 'date', 'password', 'hidden', 'address' );\n\n\t\t$in_des = array( 'html', 'break' );\n\n\t\t$in_standard = apply_filters( 'chef_forms_standard_fields', $in_standard );\n\t\t$in_adv = apply_filters( 'chef_forms_advanced_fields', $in_adv );\n\t\t$in_des = apply_filters( 'chef_forms_design_fields', $in_des );\n\n\t\t$return = array( 'standard' => array(), 'advanced' => array(), 'design' => array() );\n\n\n\t\tforeach( $types as $key => $value ){\n\n\t\t\tif( in_array( $key, $in_standard ) )\n\t\t\t\t$return['standard'][ $key ] = $value;\n\n\t\t\tif( in_array( $key, $in_adv ) )\n\t\t\t\t$return['advanced'][ $key ] = $value; \n\n\t\t\tif( in_array( $key, $in_des ) )\n\t\t\t\t$return['design'][ $key ] = $value;\n \t\t}\n\n\n\t\treturn $return;\n\n\t}", "title": "" }, { "docid": "d88a15be00c9bb72b32ff9c3e05e8578", "score": "0.642924", "text": "public function fields()\n {\n if (!$this->fieldsCache) {\n $this->fieldsCache = [];\n foreach ($this->data[\"fields\"] as $fieldData) {\n $this->fieldsCache [] = Field::createFromData($fieldData, $this);\n }\n }\n return $this->fieldsCache;\n }", "title": "" }, { "docid": "649e89112f731a13296652d24ce85f3e", "score": "0.6428748", "text": "public function get_needed_fields()\n {\n return null;\n }", "title": "" }, { "docid": "e95612d592f93dde2319baf34dca69ad", "score": "0.6422764", "text": "public static function validationFields()\n\t{\n\t\t\n\t\treturn [\n\t\t\t\"title\"\t\t\t\t\t\t =>\t\"required\",\n\t\t\t\"description\"\t\t\t\t =>\t\"required\",\n\t\t\t\"url\"\t\t\t\t\t\t =>\t\"required\",\n\t\t\t\"current_status\"\t\t\t =>\t\"required\",\n\t\t];\n\t\t\n\t}", "title": "" }, { "docid": "7ed85e8af65453a905ceb0b0391c1430", "score": "0.64155054", "text": "public function schemaFields() {\n return $this->allFieldsArray;\n }", "title": "" }, { "docid": "bdaa3030cea54b44e25196d7612faee8", "score": "0.64131844", "text": "public function fields()\n {\n return [];\n }", "title": "" }, { "docid": "bdaa3030cea54b44e25196d7612faee8", "score": "0.64131844", "text": "public function fields()\n {\n return [];\n }", "title": "" }, { "docid": "bdaa3030cea54b44e25196d7612faee8", "score": "0.64131844", "text": "public function fields()\n {\n return [];\n }", "title": "" }, { "docid": "bdaa3030cea54b44e25196d7612faee8", "score": "0.64131844", "text": "public function fields()\n {\n return [];\n }", "title": "" }, { "docid": "bdaa3030cea54b44e25196d7612faee8", "score": "0.64131844", "text": "public function fields()\n {\n return [];\n }", "title": "" }, { "docid": "ab6bcb7abc7c5a7684ad4fd0fb3605cb", "score": "0.6409986", "text": "protected function _getFields()\n {\n return array('xf_bdphotos_album_comment' => array(\n 'album_comment_id' => array(\n 'type' => 'uint',\n 'autoIncrement' => true\n ),\n 'album_id' => array(\n 'type' => 'uint',\n 'required' => true\n ),\n 'user_id' => array(\n 'type' => 'uint',\n 'required' => true\n ),\n 'username' => array(\n 'type' => 'string',\n 'required' => true,\n 'maxLength' => 50\n ),\n 'comment_date' => array(\n 'type' => 'uint',\n 'required' => true\n ),\n 'message' => array('type' => 'string'),\n 'ip_id' => array(\n 'type' => 'uint',\n 'required' => true\n ),\n ));\n }", "title": "" }, { "docid": "fcd69eccb12dd0c08dd3128b0b39bd36", "score": "0.6394895", "text": "public function price_required_fields() {\n\treturn required_fields(array(\"Product Type\"=>$this->price_type_id,\"Price\"=>$this->price));\n\t}", "title": "" }, { "docid": "66337a7cc3b9fd885477d06f237edae8", "score": "0.63838035", "text": "public function getFields()\n {\n return array_keys($this->properties);\n }", "title": "" }, { "docid": "27ed8e124d6adff317f92480fc054ff6", "score": "0.6378532", "text": "public static function getFields(): array\n {\n return [];\n }", "title": "" }, { "docid": "16b3304bcd7863d10c022928649ad486", "score": "0.6370345", "text": "public function getMandatoryFields(string $entityClass): array;", "title": "" }, { "docid": "3cc581f0f9c11dd9eb5c10736f2c3b45", "score": "0.63692033", "text": "function _getFormFieldsMeta()\n {\n return $this->_db->fetch_all('SELECT `name`, `type`, `options`, `required` FROM '\n . ' `module_form2_fields` WHERE `form` = ? ORDER BY prio ASC', $this->_form_id);\n }", "title": "" }, { "docid": "cb784583fc50a40bbe716f975fcb6232", "score": "0.63641983", "text": "public function schemaFields() { \n return $this->allFieldsArray;\n }", "title": "" }, { "docid": "cb784583fc50a40bbe716f975fcb6232", "score": "0.63641983", "text": "public function schemaFields() { \n return $this->allFieldsArray;\n }", "title": "" }, { "docid": "cb784583fc50a40bbe716f975fcb6232", "score": "0.63641983", "text": "public function schemaFields() { \n return $this->allFieldsArray;\n }", "title": "" }, { "docid": "2a092b3dc8ed7652c1f49ae5b1f6ac6f", "score": "0.63479143", "text": "public function getFields(): array\n {\n return $this->fields;\n }", "title": "" }, { "docid": "2a092b3dc8ed7652c1f49ae5b1f6ac6f", "score": "0.63479143", "text": "public function getFields(): array\n {\n return $this->fields;\n }", "title": "" }, { "docid": "2a092b3dc8ed7652c1f49ae5b1f6ac6f", "score": "0.63479143", "text": "public function getFields(): array\n {\n return $this->fields;\n }", "title": "" }, { "docid": "79c1531ed34012648516c679ad7f4770", "score": "0.63358986", "text": "public function getFields(): array\n {\n return [\n 'type' => $this->type,\n 'file' => $this->getFileFields($this->path),\n ];\n }", "title": "" }, { "docid": "2214e32ebc393b7212352945ffb62084", "score": "0.63151985", "text": "public function packproduct_required_fields() {\n\treturn required_fields(array(\"Product\"=>$this->pack_prd_id));\n\t}", "title": "" }, { "docid": "59b39a640674c21feb2ef6404647a9e4", "score": "0.631435", "text": "static function getFields() {\n\t\t// Expect Override\n\t\treturn array();\n\t}", "title": "" }, { "docid": "69ac4d7b408b7c093775116fad817c92", "score": "0.6313428", "text": "public function getAllFields()\n {\n $this->getAll = true;\n\n return array(\n 'id', 'pages', 'global_id', 'version', 'name', 'created_date'\n );\n }", "title": "" }, { "docid": "33d611cec9f96fd51a151397d785fa93", "score": "0.6310651", "text": "public function getFieldsList(){\n return $this->_get(1);\n }", "title": "" }, { "docid": "922d847dc42a80dc55803cc7872ab67b", "score": "0.6307191", "text": "public function getIncludedSchemaFields()\n {\n return array(\n 'url' => 'string',\n 'sku' => 'string'\n );\n }", "title": "" }, { "docid": "86661cb3a636856aba7bdfd7fd7bc0ec", "score": "0.63025826", "text": "public function GetFields();", "title": "" }, { "docid": "4e8545111781f7de6a144630f7577cf0", "score": "0.6302527", "text": "public function getFieldsForExport();", "title": "" }, { "docid": "5eaeee1eeec435551c77103965302005", "score": "0.6293219", "text": "protected function getFields(): array\n {\n return $this->fields;\n }", "title": "" }, { "docid": "3a0f2b6e70d222943c509e2642c5374e", "score": "0.62883705", "text": "function GetReservedFields ( ) {\n\n\t\tstatic $names = array();\n\n\t\tif( empty( $names ) ) {\n\t\t\t$names = array_diff( array_keys( $this->GetReservedFieldTypes() ), array( '_flags_' ) );\n\t\t}\n\n\t\treturn $names;\t\n\t}", "title": "" }, { "docid": "9fa1951322e734c4059d2f881caef7db", "score": "0.62876505", "text": "public function fields(): array\n {\n return [\n ID::make(),\n Str::make('title'),\n Str::make('location')->readOnly(),\n Str::make('link')->readOnly(),\n Str::make('fileType', 'type')->readOnly(),\n Str::make('disk')->readOnly(),\n BelongsTo::make('owner')->type('employees'),\n DateTime::make('createdAt')->sortable()->readOnly(),\n DateTime::make('updatedAt')->sortable()->readOnly(),\n ];\n }", "title": "" }, { "docid": "c3b920e7d39208dfed734182e0579c39", "score": "0.6286117", "text": "public static function comparableFields()\n {\n return [\n 'name',\n 'description'\n ];\n }", "title": "" }, { "docid": "5b5386881f4c8757390597ce97f4c84d", "score": "0.6271889", "text": "public function getFields(): iterable\n {\n return $this->findAllChildrenByType(Node::TYPE_FIELD);\n }", "title": "" }, { "docid": "afa4c5cc5f585082d056b3ddb1116110", "score": "0.62715095", "text": "function fields() {\r\n\t\t$fields = array();\r\n\t\t\t\r\n\t\treturn $fields;\r\n\t}", "title": "" }, { "docid": "ebc52e12cd529f10397f4d7c7818dd81", "score": "0.6259672", "text": "public function required(): array\n {\n return [\n 'productId',\n 'eventId',\n 'customer',\n 'participants',\n ];\n }", "title": "" }, { "docid": "5a9bf1e8781251b27dae507687cfbdc7", "score": "0.62576747", "text": "public function getFields(): array {\n return $this->fields;\n }", "title": "" }, { "docid": "9a6afd3d7882810fa51d29fee8605506", "score": "0.62447536", "text": "public function getFields(){\n return $this->service->getFields();\n }", "title": "" }, { "docid": "5061987ea4b3807251641b5d2fe45ad6", "score": "0.62393475", "text": "public abstract function getWhiteListFields(): array;", "title": "" }, { "docid": "920fcbfe9388e9c378f50245941828a0", "score": "0.6238652", "text": "public function image_required_fields() {\n\treturn required_fields(array(\"Image Name\"=>$this->img_name));\n\t}", "title": "" }, { "docid": "7526c1f7b71adb797399503bb7c6a667", "score": "0.6238195", "text": "public function getRequiredProperties()\n {\n return [];\n }", "title": "" }, { "docid": "02bbbe9b83b90d3622239111b65a0a1b", "score": "0.62378514", "text": "protected function getAllFields()\n {\n return [\n 'name' => [\n 'parent' => false,\n 'args' => [],\n ],\n 'users' => [\n 'parent' => true,\n 'args' => [\n 'first' => '5',\n ],\n 'children' => [\n 'edges' => [\n 'parent' => true,\n 'args' => [],\n 'children' => [\n 'node' => [\n 'parent' => true,\n 'args' => [],\n 'children' => [\n 'name' => [\n 'parent' => false,\n 'args' => [],\n ],\n 'email' => [\n 'parent' => false,\n 'args' => [],\n ],\n 'tasks' => [\n 'parent' => true,\n 'args' => [\n 'first' => '2',\n ],\n 'children' => [\n 'edges' => [\n 'parent' => true,\n 'args' => [],\n 'children' => [\n 'node' => [\n 'parent' => true,\n 'args' => [],\n 'children' => [\n 'title' => [\n 'parent' => false,\n 'args' => [],\n ],\n 'description' => [\n 'parent' => false,\n 'args' => [],\n ],\n ],\n ],\n ],\n ],\n ],\n ],\n ],\n ],\n ],\n ],\n ],\n ],\n ];\n }", "title": "" } ]
739ea8868a82c4a82880711ed58bc80c
Establish a database connection.
[ { "docid": "d9c4d46face240d7634469cc016c31c3", "score": "0.0", "text": "private function _databaseConnect()\n {\n if (is_null($this->_connection)) {\n $this->_connection = mysql_connect(\n $this->_database['location'], \n $this->_database['user'], \n $this->_database['password']\n );\n mysql_select_db($this->_database['database']);\n }\n \n return $this->_connection;\n }", "title": "" } ]
[ { "docid": "5f5b64812fcdee86afa094ef9a325895", "score": "0.74067575", "text": "private function openDatabaseConnection()\n {\n // @see http://www.php.net/manual/en/pdostatement.fetch.php\n $options = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ, PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING);\n\n // generate a database connection, using the PDO connector\n // @see http://net.tutsplus.com/tutorials/php/why-you-should-be-using-phps-pdo-for-database-access/\n $this->db = new PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASS, $options);\n }", "title": "" }, { "docid": "43fa3534ecbb4f6c6e8b3b4ed870e5da", "score": "0.7311208", "text": "protected function establish_connection()\n\t{\n\t\t// if ( ! $this->connection)\n\t\t// {\n\t\t// \t$this->connection = $this->load->database('default', TRUE);\n\t\t// }\n\t\t// else\n\t\t// {\n\t\t// \t$this->connection = $this->load->database($this->connection, TRUE);\n\t\t// }\n\t\t$this->connection = $this->db;\n\t}", "title": "" }, { "docid": "256bbc26bb56111d9cb24cde3e7d5cdf", "score": "0.7195603", "text": "static function connect() {\n $config = DatabaseConfig::database();\n\n $dsn_properties = [\n 'dbname' => $config['dbname'],\n 'host' => $config['host'],\n 'port' => $config['port'],\n 'charset' => 'utf8',\n ];\n\n $dsn = 'mysql:';\n\n foreach ($dsn_properties as $property => $value)\n {\n $dsn .= \"{$property}={$value};\";\n }\n\n $dbconfig = [\n 'dsn' => $dsn,\n 'user' => $config['dbuser'],\n 'password' => $config['dbpass'],\n 'options' => array(\n PDO::ATTR_EMULATE_PREPARES => false,\n PDO::NULL_TO_STRING => false\n ),\n ];\n\n try\n {\n $db = new PDO(\n $dbconfig['dsn'],\n $dbconfig['user'],\n $dbconfig['password'],\n $dbconfig['options']\n );\n }\n\n catch (PDOException $e)\n {\n die('Failed to connect to the database<pre>' . $e->getMessage() .'</pre>');\n }\n\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);\n self::$_db = $db;\n }", "title": "" }, { "docid": "d99b2acaed98c82252cda0f8e2c35379", "score": "0.71806145", "text": "protected function connectDatabase()\n {\n if (!$this->databaseConfig) {\n return null;\n }\n\n $this->databaseConnection = ConnectionManager::create($this->databaseConfig);\n }", "title": "" }, { "docid": "88502bfda79d83bf8181ca6a65030956", "score": "0.7168982", "text": "private function connection()\n\t{\n\t\t//echo \"Creating new connection.\\n\";\n\t\ttry\n\t\t{\n\t\t\t//create or open the database\n\t\t\t$this->_db_handle = new PDO($this->_db_conf['connection']);\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\techo $e->getMessage().\"\\n\";\n\t\t}\n\t}", "title": "" }, { "docid": "82fecfa2f245c56dbcd0442d03e00e0f", "score": "0.713864", "text": "private function _openDatabaseConnection()\n {\n // @see http://www.php.net/manual/en/pdostatement.fetch.php\n $options = [\n PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ,\n PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING\n ];\n\n // @see http://net.tutsplus.com/tutorials/php/why-you-should-be-using-phps-pdo-for-database-access/\n $this->db = new PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASS, $options);\n }", "title": "" }, { "docid": "65df3363fdd7ee254a7306cc92e10d33", "score": "0.7130438", "text": "protected function openConnection()\r\n {\r\n $connection = $this->_config->global->resources->default_setup->connection;\r\n $dbName = (string)$connection->dbname;\r\n $host = (string)$connection->host;\r\n $user = (string)$connection->username;\r\n $password = (string)$connection->password;\r\n $this->_db = new PDO('mysql:dbname='.$dbName.';host='.$host, $user, $password);\r\n }", "title": "" }, { "docid": "333e0df877b667450c318c6e9bc2869d", "score": "0.71243274", "text": "private function openDatabaseConnection()\n {\n // set the (optional) options of the PDO connection. in this case, we set the fetch mode to\n // \"objects\", which means all results will be objects, like this: $result->user_name !\n // For example, fetch mode FETCH_ASSOC would return results like this: $result[\"user_name] !\n // @see http://www.php.net/manual/en/pdostatement.fetch.php\n $options = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ, PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING);\n\n // generate a database connection, using the PDO connector\n // @see http://net.tutsplus.com/tutorials/php/why-you-should-be-using-phps-pdo-for-database-access/\n $this->db = new PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME . ';charset=' . DB_CHARSET, DB_USER, DB_PASS, $options);\n }", "title": "" }, { "docid": "bef7618c5bc8fdcd67c1ba6f0df8510f", "score": "0.7119764", "text": "private function openDatabaseConnection() {\n // set the (optional) options of the PDO connection. in this case, we set the fetch mode to\n // \"objects\", which means all results will be objects, like this: $result->user_name !\n // For example, fetch mode FETCH_ASSOC would return results like this: $result[\"user_name] !\n // @see http://www.php.net/manual/en/pdostatement.fetch.php\n $options = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ, PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING);\n\n // generate a database connection, using the PDO connector\n // @see http://net.tutsplus.com/tutorials/php/why-you-should-be-using-phps-pdo-for-database-access/\n $this->db = new PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME . ';charset=' . DB_CHARSET, DB_USER, DB_PASS, $options);\n }", "title": "" }, { "docid": "d7649c221e6716b134d72fb9f9ad60e9", "score": "0.7107459", "text": "public function connect() {\n // Cancel if connection is already established\n if ($this->handler != null) {\n return;\n }\n\n // Connect to server\n $handler = mysql_connect(DB_HOST, DB_USER, DB_PASSW, false, 65536);\n\n if (!$handler) {\n throw new DatabaseException(\"Cannot connect to database\");\n }\n\n // Open database\n $db = mysql_select_db(DB_NAME, $handler);\n\n if (!$db) {\n throw new DatabaseException(\"Cannot select database\");\n }\n\n $this->handler = $handler;\n }", "title": "" }, { "docid": "fae6420a0b2efb9e153db5c00d3c20da", "score": "0.70766324", "text": "public function open_db_connection()\n {\n $this->connection = mysqli_connect(HOST, USER_NAME, PASSWORD, DB_NAME);\n\n if (mysqli_connect_error()) {\n die('Connection Error: ' . mysqli_connect_error());\n }\n }", "title": "" }, { "docid": "3c2488c74b034b74b7b9584c444f942f", "score": "0.70352066", "text": "protected function connectToDB() {\n\t\ttry {\n\t\t\t$this->dbh = new PDO(MYSQL_DSN, DB_USERNAME, DB_PASSWORD);\n\t\t\t$this->dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t}catch (PDOException $e) {\n \t\terror_log(\"FeedAggregator::DBManager::connectToDB: \".$e->getMessage(), 0);\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "9b6ef5dfb6b795a70ba32f004e0fea16", "score": "0.7034384", "text": "protected function openConn() {\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "title": "" }, { "docid": "bdbda30df0e5f9bd520b2d905af5a9f3", "score": "0.6985325", "text": "protected function openConn()\n {\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "title": "" }, { "docid": "d80d6d6b6b3fd71169a6db0a02aea4b1", "score": "0.698132", "text": "public function connect() {\n\n // create a connection\n if(Validator::isa($this->connection,\"null\")) \n $this->connection = new Connection(\n $this->setup->get(\"type\"),$this->setup->get(\"host\"),\n $this->setup->get(\"port\"),$this->setup->get(\"db\"),\n $this->setup->get(\"user\"),$this->setup->get(\"pass\"),\n $this->conoptions);\n\n // set the connections database handle\n $this->connection->get();\n }", "title": "" }, { "docid": "60da71b929f440eb69878d8fdcaf42ec", "score": "0.6967367", "text": "public function connect() {\n\t\t$this->db = @mysqli_connect(DATABASE_HOSTNAME, DATABASE_USER, DATABASE_PASSWORD, DATABASE_NAME);\n\t\tif (mysqli_connect_errno($this->db)) {\n\t\t\techo \"<h1>DATABASE ERROR! (see the serverlog for more informations)</h1>\";\n\t\t\terror_log(\"[trans2late] DB connection failed: \".mysqli_error($this->db));\n\t\t}\n\t\t$this->db->set_charset(\"utf8\");\n\t}", "title": "" }, { "docid": "266011ef7e575c42dc704a984167941d", "score": "0.695868", "text": "public function open_db_connection(){\n\t\t\t$this->connection = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n\t\t\tif ($this->connection->connect_errno) {\n\t\t\t\tdie(\"Database connection failed. \" . $this->connection->connect_error);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "e42ca00073a9887307815fb4b17857d9", "score": "0.6952451", "text": "public function setupDatabaseConnection()\n {\n $this->databaseConnection = new Database(\n $this->config['database']['host'],\n $this->config['database']['database'],\n $this->config['database']['username'],\n $this->config['database']['password'],\n $this->config['database']['driver'],\n $this->config['database']['charset']\n );\n }", "title": "" }, { "docid": "b941b785d0a82d47faf3842c4539ce3c", "score": "0.69496816", "text": "public function connect()\n {\n $db_connection = pg_connect(\"host=localhost dbname=DBNAME user=USERNAME password=PASSWORD\");\n }", "title": "" }, { "docid": "f971619d4bafc24efc08df89570a9df9", "score": "0.6892799", "text": "public function connect() {\n \tif ($this->file == null) {\n \t\t\tthrow new DatabaseException('No database specified (Correct your \"connectors.xml\").',\n\t\t\t\tDatabaseException::ERR_NO_DATABASE_SPECIFIED);\n \t\t}\n \t\t\n \t\ttry {\n\t\t\t$this->dbConnection = new PDO('sqlite:' . $this->file);\t\t\t\n\t\t} catch(PDOException $exception) {\n\t\t\tthrow new DatabaseException('Establishing database connection failed (' .\n\t\t\t\t\t$exception->getMessage() . ').', \n\t\t\t\tDatabaseException::ERR_CONNECTION_FAILED);\n\t\t}\n }", "title": "" }, { "docid": "760a85832763cb5b63f9e6667c10a725", "score": "0.6884876", "text": "public function connect()\n {\n if (Cache::isConnected($this->defaultConnection, 'mysql') === false) {\n $db = $this->prepareConnection();\n $dsn = $this->getDsn($db);\n $pdo = $this->createConnection($dsn);\n $this->configureEncoding($pdo, $db);\n $this->configureTimezone($pdo, $db);\n\n // Cache the connection\n Cache::cacheConnection($this->defaultConnection, 'mysql', $pdo);\n }\n }", "title": "" }, { "docid": "f281a1bc30afd1261885ffe20da92d3c", "score": "0.686783", "text": "function connectToDB() \n {\n $this->connectToDBNewWay();\n }", "title": "" }, { "docid": "b28bdb68cdce7c96f23d2dbc0746e361", "score": "0.6866245", "text": "public static function connectDb ()\r\n {\r\n $dbconf = self::$dbkeyObj->getDbConfig();\r\n Wdb::connect($dbconf[\"HOST\"], $dbconf[\"PORT\"], $dbconf[\"DB_USER\"], $dbconf[\"DB_PASSWORD\"], $dbconf[\"DB_NAME\"]);\r\n Wdb::setCharset(\"utf8\");\r\n }", "title": "" }, { "docid": "dd1baff9e2cb9e673c4937027511914b", "score": "0.6862196", "text": "public function connect() {\n\t\tif(!$this->connected) {\n\t\t\t$this->link = new mysqli(\n\t\t\t\t$this->config['host'],\n\t\t\t\t$this->config['user'],\n\t\t\t\t$this->config['pass'],\n\t\t\t\t$this->config['data'],\n\t\t\t\t$this->config['port'],\n\t\t\t\t$this->config['sock']\n\t\t\t);\n\t\t\t\n\t\t\t// As stated in the manual, this is not the \"real\"\n\t\t\t// way to do it, but we need combatibility\n\t\t\tif(mysqli_connect_error()) {\n\t\t\t\tthrow new DatabaseException('Connection error: ' . $this->link->connect_error, $this->link->connect_errno);\n\t\t\t} else {\n\t\t\t\t$this->connected = true;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "fe82e360caaed78a5efc1cdfb5ba9e2f", "score": "0.6826307", "text": "protected static function dbConnect()\n {\n\n if (!self::$dbc)\n {\n // Connect to database\n \n self::$dbc = new PDO('mysql:host=' . $_ENV['DB_HOST'] . ';dbname=' . $_ENV['DB_NAME'], $_ENV['DB_USER'], $_ENV['DB_PASS']);\n\n self::$dbc->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); \n }\n }", "title": "" }, { "docid": "6bdf4f63b250c2da54ed48ee876ee44d", "score": "0.68251765", "text": "function connect()\n\t{\n\t\t$this->connection_write = $this->db_connect();\n\t\t$this->multiserver = false;\n\t\t$this->connection_read =& $this->connection_write;\n\t\t$this->database = DB_DATABASE;\n\t\tif ($this->connection_write)\n\t\t{\n\t\t\t$this->select_db($this->database);\n\t\t}\n\t}", "title": "" }, { "docid": "764037fed018e89ec36bbd66e1cba184", "score": "0.6808601", "text": "public function connect() {\n $db = mysql_connect(self::server, self::username, $this->password);\n\t\tif (!$db){\n\t\t\tdie('Could not connect: ' . mysql_error());\n\t\t}\n\t\tmysql_select_db($this->name, $db);\n }", "title": "" }, { "docid": "764037fed018e89ec36bbd66e1cba184", "score": "0.6808601", "text": "public function connect() {\n $db = mysql_connect(self::server, self::username, $this->password);\n\t\tif (!$db){\n\t\t\tdie('Could not connect: ' . mysql_error());\n\t\t}\n\t\tmysql_select_db($this->name, $db);\n }", "title": "" }, { "docid": "9f7d90e27d75044360d96a2cf948ab0d", "score": "0.6795766", "text": "public function connect()\n {\n mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);\n\n if (!$this->isConnected) {\n $this->dbobj = new mysqli($this->host, $this->username, $this->password, $this->db, $this->port, $this->socket);\n $this->isConnected = true;\n $this->transactionOpen = false;\n }\n }", "title": "" }, { "docid": "bbef32b0d25c12bbf7e0a9e72ae20fe6", "score": "0.6769025", "text": "public static function NewConnection() {\r\n self::$db_cmd = \\mysqli_connect(ConfDatabase::$address, ConfDatabase::$user,\r\n ConfDatabase::$password, ConfDatabase::$database, ConfDatabase::$port);\r\n self::$destroyed = false;\r\n }", "title": "" }, { "docid": "b799e06cbe83702ec02674e2702e24d7", "score": "0.67505443", "text": "private static function connectToDatabase()\n {\n $db_dsn = 'mysql:host=localhost;dbname=php';\n $db_username = 'php';\n $db_password = 'php';\n\n try {\n self::$db = new PDO($db_dsn, $db_username, $db_password);\n self::$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch (Exception $e) {\n throw $e;\n }\n }", "title": "" }, { "docid": "f21148ad079467bc3b3299859cead06a", "score": "0.6746401", "text": "public function connect()\n {\n $this->db = $this->getContainer()->get('database')->shared(\n [\n 'connection' => 'default'\n ]\n );\n }", "title": "" }, { "docid": "be55582fac30c85901cb58265dff1440", "score": "0.67394894", "text": "private function connectToDatabase() {\n if($this->settings != null) {\n $mysqlCreds = $this->settings['mysql_creds'];\n mysql_connect($mysqlCreds['host'], $mysqlCreds['username'], $mysqlCreds['password']) or die( mysql_error());\n mysql_select_db($this->settings['db_name']) or die(mysql_error());\n }\n }", "title": "" }, { "docid": "7eafd52f8fca18de6667846a67e2a005", "score": "0.6739482", "text": "public function connect()\r\n\t{\r\n\t\tif($this->_connection) return;\r\n\r\n\t\t$con = $this->persist ? 'mysql_pconnect' : 'mysql_connect';\r\n\t\tif(!function_exists($con)) {\r\n\t\t\tthrow new RuntimeException(\"PHP database module missing \"\r\n\t\t\t . \"(no such function: '$con')\");\r\n\t\t}\r\n\r\n\t\t$this->_connection = @$con($this->host, $this->user, $this->password);\r\n\t\tif(!$this->_connection) {\r\n\t\t\tthrow new RuntimeException(\"Could not connect to database server \"\r\n\t\t\t . \"(host=$this->host,user=$this->user,password=\"\r\n\t\t\t . str_repeat('*', strlen($this->password)) . \")\");\r\n\t\t}\r\n\t\tif(!mysql_select_db($this->database, $this->_connection)) {\r\n\t\t\tthrow new RuntimeException(\"Could not select database '\"\r\n\t\t\t . $this->database . \"': \" . mysql_error($this->_connection));\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "8859126a295c65a9aae7bf6026dd5f4f", "score": "0.67376107", "text": "public function dbOpen() {\r\n\t\ttry {\r\n\t\t\t$this->dbConn = new PDO($this->dbConnectionString, $this->dbUser, $this->dbPassword);\r\n\t\t\t// set the PDO error mode to exception\r\n\t\t\t$this->dbConn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\t\t\t$this->dbError = null;\r\n\t\t}\r\n\t\tcatch(PDOException $e) {\r\n\t\t\t$this->dbError = $e->getMessage();\r\n\t\t\t$this->dbConn = null;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "dc75bd0db31d262c872c36c0c10241c3", "score": "0.6714597", "text": "public static function makeConnection() {\n\t\treturn mysqli_connect('dbhost','dbuser','dbpasshere','dbdatabasename');\n\t\t// check connection\n\t}", "title": "" }, { "docid": "99a03a771f26476d4c23f2027f611cb1", "score": "0.67081404", "text": "public function connect(){\n\t\t\tif($this->connection){\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$options = [\n\t\t\t \\PDO::ATTR_EMULATE_PREPARES => false,\n\t\t\t \\PDO::ATTR_ERRMODE => \\PDO::ERRMODE_EXCEPTION,\n\t\t \\PDO::ATTR_DEFAULT_FETCH_MODE => \\PDO::FETCH_ASSOC,\n\t\t ];\n\n\t\t\ttry{\n\t\t\t\t$dsn = \"{$this->getDriver()}:\";\n\t\t\t\tswitch($this->getDriver()){\n\t\t\t\t\tcase \"sqlsrv\":\n\t\t\t\t\t\t$options[\\PDO::SQLSRV_ATTR_FETCHES_NUMERIC_TYPE] = true;\n\t\t\t\t\t\t$dsn.=\"server={$this->getHostname()};Database={$this->getDatabase()}\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"mysql\":\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$options[\\PDO::ATTR_AUTOCOMMIT] = 0;\n\n\t\t\t\t\t\t$dsn.=\"host={$this->getHostname()};dbname={$this->getDatabase()};charset=latin1\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$newConnection = new \\PDO($dsn,$this->getUsername(), $this->getPassword(), $options);\n\t\t\t}catch(\\PDOException $e){\n\t\t\t\tLogger::fatal_error(MessageUtility::DATABASE_CONNECT_ERROR, $e->getMessage().\".\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$this->connection = $newConnection;\n \t\t$this->connection->beginTransaction();\n\t\t}", "title": "" }, { "docid": "5b95577a78d0218d751b70e84a02d855", "score": "0.6702987", "text": "public function connectDB() {\n\t\t$mysqlConnect = mysql_connect($this -> hostname, $this -> username, $this -> password);\n\t\t@mysql_select_db($this -> database) or die( \"Unable to select database\");\n\t}", "title": "" }, { "docid": "97d5d04a83ef3bc3833a870bc5f54c68", "score": "0.6699132", "text": "private static function dbConnect()\n {\n if (!self::$dbc)\n {\n // @TODO: Connect to database\n self::$dbc = new PDO('mysql:host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASS);\n self::$dbc->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n \n echo self::$dbc->getAttribute(PDO::ATTR_CONNECTION_STATUS) . \"\\n\";\n echo \"good connection\" . \"\\n\";\n \n }\n }", "title": "" }, { "docid": "47a3bd5d3ecc70e726d12632a41ec3bd", "score": "0.6689823", "text": "function dbConnect()\n\t{\n\t\t$this->link = new mysqli($this->host, $this->username, $this->password, $this->schema);\n\t\t\n\t\t// check connection \n\t\tif($this->link->connect_errno)\n\t\t{\n\t\t\texit($lang['dbError']);\n\t\t}\n\t}", "title": "" }, { "docid": "e43028df5552929d2d525f52d7efa8cd", "score": "0.668226", "text": "static function connectToDb() {\n CommonDao::requireFileIn(\"/../util/\", \"config.php\");\n if (ConfigUtil::isProduction()) {\n $dbUser = \"rotiss_kebrahim\";\n $dbPass = \"timebomb\";\n } else {\n $dbUser = \"root\";\n $dbPass = \"karma\";\n }\n\n $dbh=mysql_connect (\"localhost\", $dbUser, $dbPass) or\n die ('I cannot connect to the database because: ' . mysql_error());\n mysql_select_db (\"rotiss_baseball\");\n }", "title": "" }, { "docid": "fff24dbd66e256b8fda179a62691178e", "score": "0.6660861", "text": "public function connect()\n {\n if ($this->_con == null) {\n $dsn = \"\" . $this->_config['driver'] . \":host=\" . $this->_config['host'] . \";dbname=\" . $this->_config['dbname'];\n try {\n $this->_con = new PDO($dsn, $this->_config['username'], $this->_config['password']);\n $this->_con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n } catch (PDOException $e) {\n die(\"Erreur connexion bdd : \" . $e->getMessage());\n }\n }\n }", "title": "" }, { "docid": "1260ac476932039724d2a03567fe9556", "score": "0.6652112", "text": "public static function db_connect() {\n $connection = mysqli_connect(DB_SERVER, DB_USER, DB_PASS, DB_NAME);\n Database::confirm_db_connect(); \n return $connection;\n }", "title": "" }, { "docid": "960fca9663c67d6a83f51edd883b0b88", "score": "0.66379285", "text": "public function databaseConnect(){\n /*Creates a new instance of the PDO called $db.\n * NOTE: the use of DSN, DB_USER and so on. These variable live in the dbsettings file.\n */\n $db = new PDO(DSN,DB_USER,DB_PASS);\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n return $db;\n }", "title": "" }, { "docid": "8d2f59fa2fd91a8755ff1ae2d56dfb53", "score": "0.66367227", "text": "public static function connect()\n {\n try {\n self::$conn = mysqli_connect(self::$host, self::$username, self::$password, self::$dbname);\n } catch (Exception $e) {\n echo \"<pre>\".$e.\"</pre>\";\n }\n }", "title": "" }, { "docid": "c66dcd6758b7738feabcb4d02ef0a6a8", "score": "0.6626361", "text": "protected function _connect(): void\n {\n $this->getDbal()->connect();\n }", "title": "" }, { "docid": "764209e7f4786fbf44e4ce239a18c824", "score": "0.6624845", "text": "public function connect()\r\n {\r\n $this->connection = mysql_connect( $this->db_host, $this->db_user, $this->db_password );\r\n\r\n // Check if connected to the server.\r\n if( !$this->connection )\r\n die( 'Could not connect: ' . mysql_error() );\r\n\r\n // Open the database driftdb.\r\n return mysql_select_db( \"driftdb\", $this->connection );\r\n }", "title": "" }, { "docid": "052d96b53c9e5ba052d99383d9dda1c7", "score": "0.6602774", "text": "private function dbConnect()\r\t{\r\t}", "title": "" }, { "docid": "295c05bcc2945856d417f9b4ad7f5d51", "score": "0.65983003", "text": "private function connect() {\n\t\t\n\t\t$dsn = 'mysql:dbname=' . $this->dbname . ';host=' . $this->host . '';\n\t\t\n\t\ttry {\n\t\t\t$this->pdo = new PDO(\n\t\t\t\t$dsn,\n\t\t\t\t$this->user,\n\t\t\t\t$this->password,\n\t\t\t\tarray(\n\t\t\t\t\tPDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES utf8, time_zone = '+00:00'\",\n\t\t\t\t\tPDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true,\n\t\t\t\t\tPDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n\t\t\t\t\tPDO::ATTR_EMULATE_PREPARES => false,\n\t\t\t\t\tPDO::ATTR_PERSISTENT => true\n\t\t\t\t)\n\t\t\t);\n\t\t\t$this->bConnected = true;\n\t\t} catch (PDOException $e) {\n\t\t\tthrow new Exception(\"Exception while connection to the database: \" . $e->getMessage());\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "a974921150522130140ad933d00f5998", "score": "0.65965325", "text": "public function open_db()\n\t\t{\n\t\t\t$this->condb=new mysqli($this->host,$this->user,$this->pass,$this->db);\n\t\t\tif ($this->condb->connect_error) \n\t\t\t{\n\t\t\t\tdie(\"Erron in connection: \" . $this->condb->connect_error);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "a974921150522130140ad933d00f5998", "score": "0.65965325", "text": "public function open_db()\n\t\t{\n\t\t\t$this->condb=new mysqli($this->host,$this->user,$this->pass,$this->db);\n\t\t\tif ($this->condb->connect_error) \n\t\t\t{\n\t\t\t\tdie(\"Erron in connection: \" . $this->condb->connect_error);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "920c28770b3023b48bfaadd1b43a8b79", "score": "0.657264", "text": "abstract function database_connect();", "title": "" }, { "docid": "974d46c9507271e7aedbb7c81552deab", "score": "0.6554856", "text": "public function connect() {\r\n\t\t\t$this->connection = mysqli_connect($this->host, $this->user, $this->password, $this->database);\r\n\t\t\tif (mysqli_connect_errno($this->connection)) { //failed to connect\r\n\t\t\t\tdie(\"Failed to connect with error: \" . mysqli_connect_error());\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "b432c30cb1e5a24ea43f1d15a5f35142", "score": "0.6552665", "text": "function DBConnect()\r\n\t{\r\n\t\trequire_once(CLASSES.'Database.php');\r\n\t\t$settings = $this->conf['database'];\r\n\t\t$connstring = $settings['driver'].\":\".$settings['server'].\":\".$settings['name'];\r\n\t\treturn new Database($connstring,$settings['user'],$settings['password'],true);\r\n\t}", "title": "" }, { "docid": "c9870340eab16fefdeaa65432d92ce8a", "score": "0.6551948", "text": "protected function connect()\n {\n\n $pgsql_con_string = 'host='.$this->conf['dbhost']\n .' port='.$this->conf['dbport']\n .' dbname='.$this->conf['dbname']\n .' user='.$this->conf['dbuser']\n .' password='.$this->conf['dbpwd'];\n\n $this->dbUrl = $this->conf['dbhost'];\n $this->dbPort = $this->conf['dbport'];\n $this->databaseName = $this->conf['dbname'];\n $this->dbUser = $this->conf['dbuser'];\n $this->dbPwd = $this->conf['dbpwd'];\n\n if (DEBUG) {\n $pgsql_con_debug = 'host='.$this->conf['dbhost']\n .' port='.$this->conf['dbport']\n .' dbname='.$this->conf['dbname']\n .' user='.$this->conf['dbuser']\n .' password=******************';\n\n Log::config('PG: Constring '.$pgsql_con_debug);\n }\n\n if (Log::$levelConfig)\n Log::config('DbVerbindungsparameter: '. $pgsql_con_string);\n\n if (!$this->connectionRead = pg_pconnect($pgsql_con_string)) {\n\n throw new LibDb_Exception\n (\n 'Konnte Die Datenbank Verbindung nicht herstellen :'.pg_last_error(),\n $pgsql_con_string\n );\n\n }\n\n $this->connectionWrite = $this->connectionRead;\n\n if ($this->schema) {\n $this->setSearchPath($this->schema);\n } elseif (isset($this->conf['dbschema'])) {\n $this->schema = $this->conf['dbschema'];\n $this->setSearchPath($this->conf['dbschema']);\n } else {\n $this->schema = 'public';\n }\n\n }", "title": "" }, { "docid": "4403a381064dc6c5a5a05b854150d7df", "score": "0.6546575", "text": "public function open_connection() {\n\t\t\t$this->connection = mysqli_connect(DB_SERVER, DB_USER, DB_PASS);\t\n\t\t\t//check if connection does not exist\n\t\t\tif (!$this->connection) {\n\t\t\t\tdie(\"Database connection failed \" . mysqli_connect_error($this->connection));\n\t\t\t} else {\n\t\t\t\t// perform mysqli_select_db() then pass 2 arguments db name and connection\n\t\t\t\t$db_select = mysqli_select_db($this->connection, DB_NAME);\n\t\t\t\t//if there is not a database selected \n\t\t\t\tif (!$db_select) {\n\t\t\t\t\tdie(\"Database connection failed: \". mysqli_connect_error($this->connection));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "9db9055c96dfeac3cf0e86246ded890e", "score": "0.65452653", "text": "private static function connect()\n {\n if ($this->connection) {\n return $this->connection;\n }\n\n $dsn = sprintf(\n 'mysql:host=%s;dbname=%s;charset=utf8',\n Config::DB_HOST,\n Config::DB_NAME\n );\n\n $this->connection = new PDO($dsn, Config::DB_USER, Config::DB_PASSWORD);\n\n // Throw an Exception when an error occurs\n $this->connection->setAttribute(\n PDO::ATTR_ERRMODE, \n PDO::ERRMODE_EXCEPTION\n );\n }", "title": "" }, { "docid": "9f3fbad2e7267696bb2fb94cc0ac149c", "score": "0.6545181", "text": "private function connect()\n {\n try\n {\n $this->primaryDbConnection = new PDO(PRIMARYDBTYPE.':host='.PRIMARYDBSERVER.';dbname='.PRIMARYDBNAME, PRIMARYDBUSER, PRIMARYDBPASSWORD);\n $this->primaryDbConnection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $this->localDbConnection = new PDO(LOCALDBTYPE.':host='.LOCALDBSERVER.';dbname='.LOCALDBNAME, LOCALDBUSER, LOCALDBPASSWORD);\n $this->localDbConnection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }\n catch(PDOException $someException)\n {\n $this->logFile->write('Error: ' . $someException->getMessage());\n throw $someException;\n }\n }", "title": "" }, { "docid": "5ad42e31e63e43784f14db35ab746164", "score": "0.6536345", "text": "public function openConnection(){\n $this->connection = new mysqli(self::HOST, self::USERNAME, self::PASSWORD, '');\n\n if(!$this->connection){\n die(\"Database connection failed \" . mysqli_errno());\n }else{\n echo \"Database connected <br>\";\n }\n }", "title": "" }, { "docid": "dd3934e0e49bccce7c7a9c968c9fc5db", "score": "0.65338844", "text": "public function dbConnect() {\n\t}", "title": "" }, { "docid": "b10365b0481f980c4194d3ef52008f22", "score": "0.65325165", "text": "public static function getConnection() {\n\n\t\tif (!self::$con) {\n //make adb connection\n\t\t\tnew DB();\n\t\t}\n //return that connection\n\t\treturn self::$con;\n\t}", "title": "" }, { "docid": "e5761d0fab5e4b095ff810e59378926b", "score": "0.6530272", "text": "public function openConnection() {\n\t\t$this->connection = new mysqli($this->host, $this->username, $this->password, $this->database);\n\n\t\tif ($this->connection->connect_error) {\n\t\t\tdie(\"<p>Error: \" . $this->connection->connect_error . \"<p>\");\n\t\t}\n\t}", "title": "" }, { "docid": "ac7bbfee08289d1329885e4be0e992dc", "score": "0.6529152", "text": "protected function dbConnect() {\n try {\n $this->db = new PDO (\"mysql:host=$this->servername;dbname=$this->dbname\", $this->username, $this->password);\n } catch (PDOException $e) {\n echo \"Errore: \" . $e->getMessage();\n die();\n }\n }", "title": "" }, { "docid": "0c1dc3fc3004c21654b5b5a278550a1f", "score": "0.6523369", "text": "private function dbConnect() {\n if( !(defined('DB_NAME') && defined('DB_USER') && defined('DB_PASS') && defined('DB_HOST')) ) {\n return;\n }\n $this->em = new ORM\\EntityManager([\n ORM\\EntityManager::OPT_CONNECTION => ['mysql', DB_NAME, DB_USER, DB_PASS, DB_HOST]\n ]);\n }", "title": "" }, { "docid": "8d599fe9c10180b6d57a85dc9bb35d46", "score": "0.6518809", "text": "public function getConnection()\r\n {\r\n try {\r\n $params = Config::get('db_params');\r\n $dns = \"mysql:host={$params['host']};dbname={$params['dbname']};charset={$params['charset']}\";\r\n return $db = new PDO($dns, $params['user'], $params['password'], $params['options']);\r\n } catch (PDOException $e) {\r\n ErrorHandler::logError('db_connection', $e->getMessage());\r\n }\r\n }", "title": "" }, { "docid": "65b9c7d3f4fcfc855b58e366f3f66201", "score": "0.6511496", "text": "private function dbconnect()\n\t\t{\n\t\t\t$this->database = mysql_connect($this->dbhost, $this->dbuser, $this->dbpass, true) or die(\"MySQL Error: \" . mysql_error());\n\t\t\tmysql_select_db($this->dbname, $this->database) or die(\"MySQL Error: \" . mysql_error());\n\t\t\t\n\t\t\tif(!$this->database){ die('Could not connect: ' . mysql_error()); }\n\t\t}", "title": "" }, { "docid": "58764d14df039947996926481dc218f2", "score": "0.6511481", "text": "protected function connect() {\n\t\t$this -> conn = mysql_connect($this -> host, $this -> user, $this -> pass);\n\t\t$this -> dba = mysql_select_db($this -> dba, $this -> conn);\n\t}", "title": "" }, { "docid": "d13f8712b1035689d2d4c1494bfcb5ce", "score": "0.6509809", "text": "public static function getConnection()\n {\n if (isset(self::$dblink)) {\n return self::$dblink;\n } else {\n self::$dblink = self::connect();\n return self::$dblink;\n }\n }", "title": "" }, { "docid": "eedfe3d5b764023c075605071cccdbd0", "score": "0.6508428", "text": "public function connect() {\n\t\t$dsn = \"mysql:host=\".self::HOST.\";dbname=\".self::DBNAME.\";charset=utf8mb4\";\n\t\t$options = [\n\t\t\tPDO::ATTR_EMULATE_PREPARES => false,\n\t\t\tPDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n\t\t\tPDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,\n\t\t];\n\t\ttry {\n\t\t\t$pdo = new PDO($dsn, self::USER, self::PWD, $options);\n\t\t\techo \"Connected\";\n\t\t} catch (Exception $e) {\n\t\t\terror_log($e->getMessage());\n\t\t\texit('Something weird happened');\n\t\t}\n\t}", "title": "" }, { "docid": "62c67c2c66e4b4a68d204bd64b07f2c6", "score": "0.6502341", "text": "function connect() {\n\t\t\n\t\t$this->connection = mysql_connect($this->url, $this->user, $this->password);\n\t\tif(! $this->connection )\n\t\t{\n\t\t die('Could not connect: ' . mysql_error());\n\t\t}\n\t\tmysql_select_db($this->db);\n\t}", "title": "" }, { "docid": "6e3b3c49a79e50e035b62ff54334c2fc", "score": "0.6501252", "text": "function db_connector() {\n\t\t$attributes = array(\n\t\t\tPDO::ATTR_PERSISTENT => true,\n\t\t\tPDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION\n\t\t);\n\t\t$this->db = new PDO( 'mysql:host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASS, $attributes );\n\t}", "title": "" }, { "docid": "de2a95266d5e86354ea08c9b28aa5aad", "score": "0.65003264", "text": "public function connect() {\n if (is_resource($this->link))\n return $this->link;\n\n // Import conenction variables\n extract($this->dbConfig['connection']);\n\n // Persisten connections enabled?\n $connect = ($this->dbConfig['persistent'] === true) ?\n 'pg_pconnect' : 'pg_connect';\n \n // Build the connection info\n $port = isset($port) ? 'port=\\''.$port.'\\'' : '';\n // if no host, connect with the socket\n $host = isset($host) ? 'host=\\''.$host.'\\' '.$port : '';\n\n $connectionString = \"$host dbname='$database' user='$user' password='$pass'\";\n\n // Make the connection and select the database\n if ($this->link = $connect($connectionString)) {\n if ($charset = $this->dbConfig['character_set'])\n echo $this->setCharset($charset);\n\n // Clear password after successful connect\n $this->dbConfig['connection']['pass'] = null;\n\n return $this->link;\n }\n\n return false;\n }", "title": "" }, { "docid": "2a9ed88940d297d6e37cbf94c4d83b63", "score": "0.64985305", "text": "private function connectDB()\n\t{\n\t\t$o_dbconfig = new ConfigDB();\n\t\t$v_dbconfig = $o_dbconfig->listDBConfig();\n\t\t\n\t\tif(count($v_dbconfig))\n\t\t{\n\t\t\t$this->o_db = new DDDatabase();\n\t\t\tforeach($v_dbconfig AS $key => $value)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$this->o_db->setConnectSettings($key, $value);\n\t\t\t\t}\n\t\t\t\tcatch (DDDException $e)\n\t\t\t\t{\n\t\t\t\t\t$this->output($e->getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "64f7beec2a916243141b477f434e7518", "score": "0.6488925", "text": "function connect()\n\t{\n\t\t$this->conn = mysql_connect($this->dbhost, $this->dbuser, $this->dbpass)\n\t\t\tor die('Error connecting to mysql');\n\t\tmysql_select_db($this->dbname);\n\t}", "title": "" }, { "docid": "bf3313ace467ad990c1ce77e1760b60a", "score": "0.64873487", "text": "private function dbConnect() {\n try {\n if (!$this->_conn = mysql_connect($this->_host . \":\" . $this->_port, $this->_dbUser, $this->_dbPwd))\n throw new Exception(\"Can't connect to server.\");\n\n if (!mysql_select_db($this->_dbName, $this->_conn))\n throw new Exception(\"Can't select database.\");\n } catch (Exception $e) {\n $this->exception($e);\n }\n }", "title": "" }, { "docid": "a1bb48448d60a5ab572b798d2f278424", "score": "0.6482195", "text": "private function connectDB() {\n\t\t$configObj = new Config();\n\t\t$settings = $configObj->getAllConfig();\n\t\ttry {\n\t\t\t$this->conn = new PDO(\"mysql:host={$settings['DB_HOST']};dbname={$settings['DB_NAME']}\", $settings['DB_USERNAME'], $settings['DB_PASSWORD']);\n\t\t\t$this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t}\n\t\tcatch(PDOException $e) {\n\t\t\techo \"Error: \" . $e->getMessage();\n\t\t}\n\t}", "title": "" }, { "docid": "baa98f92f3d5a419cae87ef2c225b519", "score": "0.6479143", "text": "private final function db_connect(){\n \n try{\n \n \t$this->con = new PDO(\"{$this->db_driver}:host={$this->db_host};dbname={$this->db_name}\", \"$this->db_username\", \"$this->db_password\");\n \n }catch( PDOException $e ){\n \n echo $this->wrap( $this->makeResponse( 500, $e->getMessage() ) );\n exit;\n \n }\n \n \n }", "title": "" }, { "docid": "6699733a34a8df6edfad650826f0bc5c", "score": "0.6478921", "text": "private function Connect()\n {\n $this->connection = new mysqli($this->server, $this->user, $this->password, $this->dbname);\n if (mysqli_connect_errno()) {\n echo \"Error: Could not connect to database.\";\n exit;\n }\n }", "title": "" }, { "docid": "957afb405adf3257f4c92c5b2d78b2a9", "score": "0.6477758", "text": "function connect_to_db() {\n global $link, $dbname;\n\n mysqli_select_db($link, $dbname);\n }", "title": "" }, { "docid": "69b91395f3728d8d23ca3054991515cb", "score": "0.647728", "text": "public function connect()\n {\n if ($this->pdo) {\n return;\n }\n\n // connect\n $this->profiler->start(__FUNCTION__);\n list($dsn, $username, $password, $options, $queries) = $this->args;\n $this->pdo = new PDO($dsn, $username, $password, $options);\n $this->profiler->finish();\n\n // connection-time queries\n foreach ($queries as $query) {\n $this->exec($query);\n }\n }", "title": "" }, { "docid": "09b1598a57216256ce1bbd203e9f23e7", "score": "0.6463908", "text": "public function connect() {\n\t\t$this->conn = null;\n\t\ttry {\n\t\t $this->conn = new PDO($this->dsn, $this->_user, $this->_password);\n\t\t $this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t // echo 'connected to the database <br>';\n\t\t} catch (PDOException $e) {\n\t\t exit ('Database Error: ' . $e->getMessage());\n\t\t}\n\n\t\treturn $this->conn; // return pdo object\n\n\t}", "title": "" }, { "docid": "c1b6fd1d993f823a7ce632fd89031690", "score": "0.64622515", "text": "public function connectToDB() {\n //Establish connection to database\n $conn = new mysqli(Config::HOST, Config::USER, Config::PWD, Config::DB);\n //Check connection was successful\n if($conn->connect_error) {\n echo \"Connection failed: \" . $conn->connect_error . \"\\n\";\n }\n return $conn;\n// this will need to be closed somewhere. Maybe in the child models themselves after manipulation of DB\n//mysqli_close($con);\n }", "title": "" }, { "docid": "a288a3e3beefb54028d93f0673221410", "score": "0.64557636", "text": "function connect() {\n\t\t//Get database information\n\t\trequire_once('../app/config.php');\n\t\t//Get constants from database file\n\t\trequire_once('../app/database.php');\n\t\t$config = new GarageSale\\Config();\n\t\n\t\t// select the type of database to use\n\t\t$db_config = $config->databases['mysql'];\n\t\n\t\t/* ---------------------------------------\n\t\t * load values from the configuration file\n\t\t */\n\t\n\t\t// host of database\n\t\t$host = $db_config['host'];\n\t\t// name of database\n\t\t$database = $db_config['database'];\n\t\t// user name to login\n\t\t$username = $db_config['username'];\n\t\t// password to log in\n\t\t$password = $db_config['password'];\n\t\t// prefix to use for table namesf\n\t\t$prefix = $db_config['prefix'];\n\t\t\n\t\t$con = mysqli_connect($host,$username,$password,$database);\n\n // returing connection cursor\n return $con;\n }", "title": "" }, { "docid": "45b9b84ef0bccc2daceef3b8e051b605", "score": "0.64508563", "text": "public function connect() {\r\n try {\r\n // Allow only one instance\r\n if(static::$dbh == null) {\r\n static::$dbh = new PDO($this->dsn, $this->username, $this->password,\r\n array(PDO::ATTR_PERSISTENT => $this->persistent));\r\n }\r\n }\r\n catch(PDOException $e) {\r\n throw new ActiveRecordAdapterConnectionException(\"Cannot connect to MySQL server.\");\r\n }\r\n }", "title": "" }, { "docid": "a32c24d67fa2e2b9f43a2e64905fd691", "score": "0.6448163", "text": "private function _connect(){\n\t\t$this->_db = new PDO($this->_config['dsn'], $this->_config['dbuser'], $this->_config['dbpass']);\n\t}", "title": "" }, { "docid": "79393962d93743f6b2d22663f20c5536", "score": "0.6443073", "text": "protected function connectDB()\n {\n if (!isset($this->config->db->driver))\n throw new \\RuntimeException(\"DB driver not defined in dbvc.json\");\n \n $class = __CLASS__ . '\\\\DB\\\\' . ucfirst($this->config->db->driver);\n $this->db = new $class($this->config->db);\n }", "title": "" }, { "docid": "ab9dfd88c10eb52202a1daef1fe5b145", "score": "0.6440147", "text": "function establishConnection()\n\t\t{\n\t\t\t//establishing a database connection\n\t\t\treturn $databaseConn = new mysqli($this->hostName,$this->userName,$this->password,$this->databaseName) or die(\"Connection to the database is lost\");\n\t\t\t\n\t\t\t//checking if the connection was successful\n\t\t\t#if(!mysqli_connect_errno())\n\t\t\t#{\n\t\t#\t\tdie \"Database connection was lost.\";\n\t#\t\t\t\n#\t\t\t}\n\t\t}", "title": "" }, { "docid": "d1afa928d74b65afdeacbf49b16eadfd", "score": "0.64305294", "text": "public function db_connect() {\n\t\t$this->db_connection = new mysqli($this->db_server, $this->db_username, $this->db_password, $this->db_name);\n\t\tif(mysqli_connect_errno()) self::error();\n\t\telse return $this->db_connection;\n\t}", "title": "" }, { "docid": "ffecb4f8f55bdf7f2d3300fc045f64e8", "score": "0.642911", "text": "public function connect()\n {\n global $db;\n\n\n try\n {\n if (file_exists(self::DB_PATH))\n {\n $db = simplexml_load_file(self::DB_PATH);\n }\n else\n {\n throw new Exception(\"Error: Cannot connect to database!\");\n }\n\n\n if (!$db)\n {\n throw new Exception('Error: Cannot open database!');\n }\n }\n catch (Exception $e)\n {\n echo '<div>' . $e->getMessage() . '</div>';\n }\n }", "title": "" }, { "docid": "af4dd34d78aba69e5e549a73c0a06ff5", "score": "0.642019", "text": "public function connect()\n {\n if (!@mysql_connect($this->dbHost, $this->dbUser, $this->dbPass)) {\n echo mysql_error();\n trigger_error(\"<b>Can't connect to MySQL server</b></b>\");\n }\n\n if (!@mysql_select_db($this->dbName)) {\n echo mysql_error();\n trigger_error(\"<b>Can't select database</b>\");\n }\n }", "title": "" }, { "docid": "2648743d9bf439c2b8a3a19168b8bff4", "score": "0.64155674", "text": "public function createConnection() {\n // Set data in $info array.\n $info = [\n 'database' => $this->getConfig('multidb_database'),\n 'username' => $this->getConfig('multidb_username'),\n 'password' => $this->getConfig('multidb_password'),\n 'prefix' => '',\n 'host' => $this->getConfig('multidb_host'),\n 'port' => $this->getConfig('multidb_port'),\n 'driver' => $this->getConfig('multidb_driver'),\n 'namespace' => 'Drupal\\\\Core\\\\Database\\\\Driver\\\\mysql',\n ];\n // Add connection with new database setting.\n Database::addConnectionInfo('external_db_connection', 'default', $info);\n try {\n // Active new connection.\n Database::setActiveConnection('external_db_connection');\n }\n catch (ConnectionNotDefinedException $e) {\n // Active default connection if new connection is not stablished.\n Database::setActiveConnection('default');\n }\n }", "title": "" }, { "docid": "42aaf3fcde6f39872af8d5f390ea86ba", "score": "0.6413786", "text": "private function dbConnect() {\n\t\t$this->db = mysql_connect(self::DB_SERVER,self::DB_USER,self::DB_PASSWORD);\n\t\tif($this->db)\n\t\t\tmysql_select_db(self::DB,$this->db);\n\t}", "title": "" }, { "docid": "f79de41a17f28b5eaa70b2d99a0522f1", "score": "0.639434", "text": "function openDatabaseConnection() {\n\t\t$link = mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD)\n\t\t\t or die(\"Could not connect to the SQL database server\");\n\t\tmysql_select_db(MYSQL_DATABASE) or die(\"Could not select the SQL database\".MYSQL_DATABASE);\n\t}", "title": "" }, { "docid": "e2502402ede513025feb80fc5911cbe1", "score": "0.63928676", "text": "function connect( )\n\t{\n\t\tif( $this->dbConnection == null )\n\t\t{\n\t\t\t$this->dbConnection=mysql_pconnect( DBSERVER, DBUSERNAME, DBPASSWORD ) or die ( \"Database connection cannot be found\" ) ;\n\t\t\tmysql_select_db( DBNAME, $this->dbConnection) or die ( \"Database cannot be found\" ) ;\n\t\t}\n\t\treturn $this->dbConnection ;\n\t\t\n\t}", "title": "" }, { "docid": "7b77701dc9a4b22725bfd4070765e711", "score": "0.6392479", "text": "function connect(){\n\n\t\t$settings = core::coreSettings();\n\n\t\t$host = $settings['DB']['dbhost'];\n\t\t$db = $settings['DB']['dbname'];\n\t\t$user = $settings['DB']['dbusername'];\n\t\t$pass = $settings['DB']['dbpassword'];\n\t\t$this->link = mysql_connect($host, $user, $pass) or die(\"Error fatal \".mysql_error());\n\t\tmysql_select_db($db);\n\t\tregister_shutdown_function(array(&$this, 'close'));\n\t}", "title": "" }, { "docid": "290a95f7d8427602e9b4d49a0cf3dd53", "score": "0.638875", "text": "public function open_db_connection(){\n $this->connection = new mysqli(DB_HOST,DB_USER,DB_PASS,DB_NAME);\n\n if($this->connection -> connect_error){\n die('<h1>Database Connection Failed!!!!</h1>.'. $this->connection -> connect_error);\n }\n\n }", "title": "" }, { "docid": "069c7e650cd2403ab427eadac754ba26", "score": "0.63855916", "text": "public function connect() {\n\t\tglobal $CFG;\n\n\t\ttry {\n\t\t\t\\SkylarK\\Fizz\\FizzConfig::setDB($CFG->db_uri, $CFG->db_user, $CFG->db_pass);\n\t\t}\n\t\tcatch (PDOException $e) {\n\t\t\tdie($e->getMessage());\n\t\t\texit(0);\n\t\t}\n\n\t\t$this->_pdo = \\SkylarK\\Fizz\\FizzConfig::getDB();\n\t}", "title": "" }, { "docid": "6b50ef0c2af55bca435cc88696f92c4e", "score": "0.6383552", "text": "public function open_connection() {\n\t\t//$this->connection = mysql_connect(DB_HOST, DB_USER, DB_PASS);\n\t\t$this->connection = mysql_connect('localhost', 'root', '');\n\t\tif (!$this->connection) {\n\t\t\tdie(\"Database connection failed: \" . mysql_error());\n\t\t} else {\n\t\t\t$db_select = mysql_select_db('employee', $this->connection);\n\t\t\tif (!$db_select) {\n\t\t\t\tdie(\"Database selection failed: \" . mysql_error());\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a882badd945eeba52471e5ed0b4acd90", "score": "0.63629377", "text": "private function connect(){\n\t\t\ttry{\n switch($this->dbDriver){\n case \"odbc\":\n $this->db = new PDO(\"$this->dbDriver:Driver={SQL Server};Server=$this->hostname;Database=$this->database;\", $this->username, $this->password);\n default:\n $this->db = new PDO(\"$this->dbDriver:host=$this->hostname;dbname=$this->database;$this->charSet\", $this->username, $this->password);\n }\n\t\t\t\t$this->error_handling();\n\t\t\t}catch(PDOException $e){\n\t\t\t\tdie($e);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "191ee1be066fa1da18af79356745d0d0", "score": "0.63561565", "text": "public static function connect() {\r\n\t\r\n\t\tglobal $ebs_db_host;\r\n\t\tglobal $ebs_db_user;\r\n\t\tglobal $ebs_db_password;\r\n\t\t\r\n\t\treturn self::get_connection($ebs_db_host, $ebs_db_user, $ebs_db_password);\r\n\t}", "title": "" }, { "docid": "aa0fce322ea6240e5b98faa10992a0b1", "score": "0.63560545", "text": "public function open_connection() {\n\t\t\t$this->connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS);\n\t\t\tif( !$this->connection ) {\n\t\t\t\tdie( \"Error: Server not Found. <br />\" . mysql_error() );\n\t\t\t}\n\t\t\t$this->db_select = mysql_select_db(DB_NAME, $this->connection);\n\t\t\tif( !$this->db_select ) {\n\t\t\t\tdie( \"Error: Database not Found. <br />\" . mysql_error() );\n\t\t\t}\n\t\t}", "title": "" } ]
d25e88cb4fbf4672150cdc56879d39f0
Calculate the value of the metric.
[ { "docid": "3512a805ab429b981bef92da5974d566", "score": "0.0", "text": "public function calculate(NovaRequest $request)\n {\n return $this->count($request, Client::class);\n }", "title": "" } ]
[ { "docid": "b260f322af141de40bee70e372fe0adf", "score": "0.70481205", "text": "public function metric();", "title": "" }, { "docid": "19e08aed3e23aa1cab3d5daaeb942607", "score": "0.6896602", "text": "public function calculate(Valuable $value);", "title": "" }, { "docid": "09cc48b7962c6c23eed505cf05fa8fa5", "score": "0.6414526", "text": "public function metricTotal();", "title": "" }, { "docid": "226efd480654e69b7c38377a510d2263", "score": "0.63586754", "text": "public function getValue(): float\n {\n return $this->value;\n }", "title": "" }, { "docid": "ba049709910832e72f203e969efad3c4", "score": "0.6258194", "text": "public function getMetric()\n {\n return $this->metric;\n }", "title": "" }, { "docid": "3cd5399688e68ecaa2db61bf4e147944", "score": "0.625007", "text": "public function calculate();", "title": "" }, { "docid": "37db0a6959b98d12ce968098a94dcdc9", "score": "0.6218795", "text": "public function getValue()\r\n {\r\n return (float) $this->value;\r\n }", "title": "" }, { "docid": "f5b173778ec85bef47ce48ef8adeb379", "score": "0.62105787", "text": "public function getResult(): float;", "title": "" }, { "docid": "d27fa6808bc9f8db30577a51e43253e7", "score": "0.6191814", "text": "public function calculate()\n {\n return $this->highest();\n }", "title": "" }, { "docid": "f903bb66fd5263cc84d06c97da95ef5e", "score": "0.61876523", "text": "public function __invoke()\n {\n return $this->getValue();\n }", "title": "" }, { "docid": "c1bbb059d040a4854b5e971c5707ecd4", "score": "0.6169257", "text": "public function getResult()\r\n\t{\r\n\t\treturn ($this -> resultsSum/ $this -> count); \r\n\t}", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.61629", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.61629", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.61629", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.61629", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.61629", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.61629", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.61629", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.61629", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.61629", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.61629", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.61629", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.61629", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.61629", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.61629", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.61629", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.61629", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.61629", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.61629", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.61629", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.61629", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.61629", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.61629", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.61629", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.61629", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.61629", "text": "public function getValue();", "title": "" }, { "docid": "8fe9e5e399d50e1e5d76d1702f7f9050", "score": "0.6115123", "text": "abstract public function getValue();", "title": "" }, { "docid": "8fe9e5e399d50e1e5d76d1702f7f9050", "score": "0.6115123", "text": "abstract public function getValue();", "title": "" }, { "docid": "8fe9e5e399d50e1e5d76d1702f7f9050", "score": "0.6115123", "text": "abstract public function getValue();", "title": "" }, { "docid": "a7b88b80e5812411ad608aae908774c5", "score": "0.61073333", "text": "public abstract function getValue();", "title": "" }, { "docid": "95439a7ad74b486ce8df5b04f850fb36", "score": "0.6046404", "text": "public function __invoke() \n {\n \n return (float)$this->floatValue;\n \n }", "title": "" }, { "docid": "5a5773172bd8fe510f407d85ad8c6ba1", "score": "0.6044265", "text": "function getValue()\n {\n $item = $this->getMax();\n\n return $item['usePct'];\n }", "title": "" }, { "docid": "46ac13e13a1c6238340efc069dd8ef12", "score": "0.6010199", "text": "abstract protected function getValue();", "title": "" }, { "docid": "46ac13e13a1c6238340efc069dd8ef12", "score": "0.6010199", "text": "abstract protected function getValue();", "title": "" }, { "docid": "f6852782968e32c8924fe06a6c3db9e4", "score": "0.59623283", "text": "public function getValue() {}", "title": "" }, { "docid": "bca5e90b53f0e4a19ce36bb8182430f5", "score": "0.5941663", "text": "abstract protected function doesMetricPass($value);", "title": "" }, { "docid": "e4264e0325765e03378c7097c75784b4", "score": "0.5904494", "text": "public function calculate()\n {\n if (! $this->isAvailable()) {\n return false;\n }\n\n return $this->getRate();\n }", "title": "" }, { "docid": "5f69420f94ecbcb155d9ed892e60f54d", "score": "0.58794695", "text": "public function __invoke()\n {\n\n return (float)$this->floatValue;\n\n }", "title": "" }, { "docid": "09fbeae5a57161f137eac867d6b4e9de", "score": "0.58546764", "text": "protected function computeValue() {\n $this->list[0] = $this->createItem(0, $this->getEntity()->value);\n }", "title": "" }, { "docid": "4a5a0ab9a48c517c130785c78509dd22", "score": "0.5812246", "text": "public function value();", "title": "" }, { "docid": "4a5a0ab9a48c517c130785c78509dd22", "score": "0.5812246", "text": "public function value();", "title": "" }, { "docid": "3e61124c0b7afca4b8d6c751428a9683", "score": "0.58104634", "text": "public function calcTotal() {\r\n return $this->totalCost;\r\n }", "title": "" }, { "docid": "a06374d6584af76442402a3c696a7161", "score": "0.5766362", "text": "public function execute() {\n $arr = parent::execute();\n \n return array_sum($arr) / count($arr);\n }", "title": "" }, { "docid": "d903d9dc5d72c6f4eb5e800872a765c7", "score": "0.57482684", "text": "public function GetMetric()\n {\n if (!$this->Id) {\n echo 'CoverageFile GetMetric(): Id not set';\n return false;\n }\n\n $stmt = $this->PDO->prepare(\n 'SELECT loctested, locuntested, branchstested, branchsuntested,\n functionstested, functionsuntested\n FROM coverage WHERE fileid=:id');\n $stmt->bindParam(':id', $this->Id);\n if (!pdo_execute($stmt)) {\n return false;\n }\n\n $row = $stmt->fetch();\n if (!array_key_exists('loctested', $row)) {\n return false;\n }\n\n $coveragemetric = 1;\n $loctested = $row['loctested'];\n $locuntested = $row['locuntested'];\n $branchstested = $row['branchstested'];\n $branchsuntested = $row['branchsuntested'];\n $functionstested = $row['functionstested'];\n $functionsuntested = $row['functionsuntested'];\n\n // Compute the coverage metric for bullseye\n if ($branchstested > 0 || $branchsuntested > 0 || $functionstested > 0 || $functionsuntested > 0) {\n // Metric coverage\n $metric = 0;\n if ($functionstested + $functionsuntested > 0) {\n $metric += $functionstested / ($functionstested + $functionsuntested);\n }\n if ($branchsuntested + $branchsuntested > 0) {\n $metric += $branchsuntested / ($branchstested + $branchsuntested);\n $metric /= 2.0;\n }\n $coveragemetric = $metric;\n $this->LastPercentCoverage = $metric * 100;\n } else {\n // coverage metric for gcov\n\n $coveragemetric = ($loctested + 10) / ($loctested + $locuntested + 10);\n $this->LastPercentCoverage = ($loctested / ($loctested + $locuntested)) * 100;\n }\n return $coveragemetric;\n }", "title": "" }, { "docid": "281c81eec0ef5002d65c28bfd8d39d7f", "score": "0.5744973", "text": "public function toValue()\r\n {\r\n return (double) $this->_numer / $this->_denom;\r\n }", "title": "" }, { "docid": "49f34a4358c2720dab49e83b99ab98fa", "score": "0.57384294", "text": "public function run()\n {\n $values = [\n [\n 'name' => 'Sugar Cost Saving',\n 'alias' => 'sugar',\n 'value' => 500\n ],\n [\n 'name' => 'Rice Cost Saving',\n 'alias' => 'rice',\n 'value' => 500\n ],\n [\n 'name' => 'Oil Cost Saving',\n 'alias' => 'oil',\n 'value' => 500\n ],\n [\n 'name' => 'Transportation Cost',\n 'alias' => 'transport',\n 'value' => 1500\n ]\n ];\n\n foreach ($values as $value){\n \\App\\CalculateValue::create($value);\n }\n }", "title": "" }, { "docid": "06d31559ee27ce89a1385ba91bd1854d", "score": "0.5735784", "text": "public function getValue()\n {\n \treturn $this->applyFilters( $this->_value );\n }", "title": "" }, { "docid": "0dc0e6d04e3310045697792d21312d59", "score": "0.57136256", "text": "public function __invoke()\r\n\t{\r\n\t\treturn $this->_value;\r\n\t}", "title": "" }, { "docid": "55cb2218f41674dcac67eb82a68c976f", "score": "0.5705738", "text": "abstract public function calculate();", "title": "" }, { "docid": "37422b59e9de3c7472144b9cda33a83f", "score": "0.57044494", "text": "public function getValue(AbsoluteLengthInterface $viewport): float\n {\n return $this->calculatorServiceFactory->createCalculatorService($viewport)->evaluate($this->tokens);\n }", "title": "" }, { "docid": "cff7c3f4cdcd474ede6d872d96036208", "score": "0.57043177", "text": "public function testCalculateReturnsCorrectValue()\n {\n $this->assertEquals(200, $this->metric->calculate($this->createPoints(array_merge(range(0,100), range(100,0), range(0,100))), $this->zones, array()));\n }", "title": "" }, { "docid": "2e933ced32318db009ac0056d16c7624", "score": "0.5702693", "text": "public function calculateValues() {\n // go through all of the cells and calculate the values\n for($row = 1; $row <= count($this->_data); $row++) {\n for($column = 1; $column <= count($this->_data[0]); $column++) {\n $cell = $this->getCell($row, $column);\n // if this cell contains a mine, just move on\n if ($cell->value == -1) {\n continue;\n }\n $adjacentCells = $this->getAdjacentCells($cell);\n foreach($adjacentCells as $adjacentCell) {\n if ($adjacentCell->value == -1) {\n $cell->value++;\n }\n }\n }\n }\n }", "title": "" }, { "docid": "ce1d93c65c587c4e43f1d09fd77a8eef", "score": "0.56778884", "text": "final public function __invoke()\n {\n return $this->value();\n }", "title": "" }, { "docid": "c618aa2f4ea18670dbca66d25588b82b", "score": "0.5676951", "text": "function getValue() {\n\t\t\treturn $this->currentValue;\n\t\t}", "title": "" }, { "docid": "e3ba5f95b0b5581380a7b8f25abad58f", "score": "0.5674084", "text": "public function value() {}", "title": "" }, { "docid": "e3ba5f95b0b5581380a7b8f25abad58f", "score": "0.5674084", "text": "public function value() {}", "title": "" }, { "docid": "e3ba5f95b0b5581380a7b8f25abad58f", "score": "0.5674084", "text": "public function value() {}", "title": "" }, { "docid": "e3ba5f95b0b5581380a7b8f25abad58f", "score": "0.5674084", "text": "public function value() {}", "title": "" }, { "docid": "e3ba5f95b0b5581380a7b8f25abad58f", "score": "0.5674084", "text": "public function value() {}", "title": "" }, { "docid": "e3ba5f95b0b5581380a7b8f25abad58f", "score": "0.5674084", "text": "public function value() {}", "title": "" }, { "docid": "e3ba5f95b0b5581380a7b8f25abad58f", "score": "0.5674084", "text": "public function value() {}", "title": "" }, { "docid": "423ecd1ec3ecc0cd8b4c654c06e7fb68", "score": "0.5659345", "text": "public function getValor(): float;", "title": "" }, { "docid": "7d9db3c77d07669909379c796c44c51c", "score": "0.5656533", "text": "public function result() : float\n {\n return (float) Stats::round($this->stop - $this->start, $this->precision);\n }", "title": "" }, { "docid": "871223fdc7a7891f979073c906fae194", "score": "0.5653073", "text": "protected function calc()\n {\n $ret = 0;\n if ($chain = $this->createChain()) {\n $i = 0;\n while ($chain->offsetExists($i)) {\n $rule = $chain->itemAt($i++);\n if (($value = $rule->calc()) !== false) {\n $ret += $value;\n } else {\n break;\n }\n }\n }\n\n return $ret;\n }", "title": "" }, { "docid": "3cb0bbd21be9ec4e665b424088d3eabe", "score": "0.5648823", "text": "public function getValue() {\n return $this->normalizedValue;\n }", "title": "" }, { "docid": "8d72b9ba6670500fc998c49e4eed1fde", "score": "0.56450254", "text": "public function discountValue()\n {\n return floatval(data_get($this->discount, 'value'));\n }", "title": "" }, { "docid": "4311ad9551b0bf2aa1700e690795eb3a", "score": "0.5641175", "text": "public function calculate(NovaRequest $request): ValueResult\n {\n $count = Major::find($request->resourceId)->members()->active()->count();\n\n return $this->result($count)->allowZeroResult();\n }", "title": "" }, { "docid": "5384c04430158d1918385871944b6f18", "score": "0.56378746", "text": "public function calculation() {\r\n return (string) $this->data['calculation'];\r\n }", "title": "" }, { "docid": "d276d699911b8d6c28e812af35eed622", "score": "0.5632547", "text": "public function get_currentValue(): float\n {\n // $res is a float;\n if ($this->_cacheExpiration <= YAPI::GetTickCount()) {\n if ($this->load(YAPI::$_yapiContext->GetCacheValidity()) != YAPI::SUCCESS) {\n return self::CURRENTVALUE_INVALID;\n }\n }\n $res = $this->_applyCalibration($this->_currentRawValue);\n if ($res == self::CURRENTVALUE_INVALID) {\n $res = $this->_currentValue;\n }\n $res = $res * $this->_iresol;\n $res = round($res) / $this->_iresol;\n return $res;\n }", "title": "" }, { "docid": "143e6c47128257130718de345ffac9f6", "score": "0.5630109", "text": "function compute_item_value($item)\n\t{\n\t //value is the half of the value in percent of damage\n\t return (($item['condition'] * str_replace(\".\", \"\", $item['value'])) * 0.005) * 0.5;\n\t}", "title": "" }, { "docid": "3a85e1b3b1e2d9887b478c4ac7a8617d", "score": "0.5629844", "text": "public function getValue () {\n \treturn $this->value;\n }", "title": "" }, { "docid": "3662565f7ee28d3a67e0085aeda1c5cb", "score": "0.56252617", "text": "public function calcResult() {\n\n $kq = 0;\n\n if ($this->myModel->getPheptinh() == '+') {\n $kq = $this->myModel->getSo1() + $this->myModel->getSo2();\n }\n\n if ($this->myModel->getPheptinh() == '-') {\n $kq = $this->myModel->getSo1() - $this->myModel->getSo2();\n }\n\n if ($this->myModel->getPheptinh() == '*') {\n $kq = $this->myModel->getSo1() * $this->myModel->getSo2();\n }\n\n if ($this->myModel->getPheptinh() == '/') {\n $kq = $this->myModel->getSo1() / $this->myModel->getSo2();\n }\n\n // Cập nhật lại vào Model\n $this->myModel->setKetqua($kq);\n\n }", "title": "" }, { "docid": "4000373f7b42f5c7558ed6cdb06ad192", "score": "0.5617474", "text": "public function getValue()\n {\n return $this->handling ? $this->handlingValue : $this->storedValue;\n }", "title": "" }, { "docid": "fc0149dc2c7c3cdeebea7f673454fe0b", "score": "0.56089383", "text": "public function getValue()\n {\n \treturn $this->value;\n }", "title": "" }, { "docid": "85a509a815a0f1d37a7000097575f56a", "score": "0.5607496", "text": "protected function computeValue() {\n // Count the number of times this method has been executed during the\n // lifecycle of an entity.\n $execution_count = \\Drupal::state()->get('computed_test_field_execution', 0);\n \\Drupal::state()->set('computed_test_field_execution', ++$execution_count);\n\n foreach (\\Drupal::state()->get('entity_test_computed_field_item_list_value', []) as $delta => $item) {\n $this->list[$delta] = $this->createItem($delta, $item);\n }\n }", "title": "" }, { "docid": "7918867b2d10d14ca9e4a5a4c45dab77", "score": "0.5600136", "text": "protected function getVal(){\n\t\treturn $this->val;\n\t}", "title": "" }, { "docid": "61c69cb57493f3a2c4ea90f20b717ae7", "score": "0.55990964", "text": "public function getTotalValueAttribute(){\n return $this->moviments()->applications()->sum('value') - $this->moviments()->outflows()->sum('value'); // Retorna o total de valores\n }", "title": "" }, { "docid": "3d6a39f9c05aeb0da36433704514b039", "score": "0.5589644", "text": "private function Calculate()\n\t{\n\t\t$iPercentage = 0;\n\t\t\n\t\t//About ME\n\t\t$iPercentage+= $this->Calc_AboutMe_Section();\n\t\t\n\t\t//Career\n\t\t$iPercentage+= $this->Calc_Career_Section();\n\t\t\n\t\t//Religion\n\t\t$iPercentage+= $this->Calc_Religion_Section();\n\t\t\n\t\t//Family\n\t\t$iPercentage+= $this->Calc_Family_Section();\n\t\t\n\t\t//LifeStyle\n\t\t$iPercentage+= $this->Calc_LifeStyle_Section();\n\t\t\n\t\t//Hobbies \n\t\t$iPercentage+= $this->Calc_Hobbies_Section();\n\t\t\n //Basic \n $iPercentage+= $this->Calc_BasicDetails_Section();\n \n\t\t//Photo\n\t\t$iPercentage+= $this->Calc_Photo_Section();\n \n \n\t\t$this->m_iPercentage\t\t\t= $iPercentage;\n\t\t$this->m_bIsScoreCalculated\t\t= true;\n \n\t}", "title": "" }, { "docid": "15010186883ef1508da6d81d72e89162", "score": "0.5580658", "text": "public function getValue()\n {\n if (!$this->versionManager->isPreviewVersion()) {\n return parent::getValue();\n }\n if (null === $this->value) {\n $this->value = $this->product->getPrice();\n $activeRules = $this->getActiveRules(\n $this->storeManager->getStore()->getWebsiteId(),\n $this->customerSession->getCustomerGroupId()\n );\n /** @var RuleModel $rule */\n foreach ($activeRules as $rule) {\n if ($this->product->getParentId()) {\n $this->product = $this->productRepository->getById($this->product->getParentId());\n }\n\n if ($rule->validate($this->product)) {\n $this->value = $this->calculateRuleProductPrice($rule, $this->value);\n if ($rule->getStopRulesProcessing()) {\n break;\n }\n }\n }\n }\n return $this->value;\n }", "title": "" }, { "docid": "35b73fa41ffa4d83646af8cf56a1161a", "score": "0.55784893", "text": "public static function value()\n {}", "title": "" }, { "docid": "819793af2863d048fdac9792b4fb9c86", "score": "0.5572049", "text": "public function getValue(): int;", "title": "" }, { "docid": "13bb7628875e6f4e28ec27e1838b327e", "score": "0.55707806", "text": "public function getValue()\r\n\t\t{\r\n\t\t\treturn($this->value);\r\n\t\t}", "title": "" }, { "docid": "4de3ba056ff1772f27107c009e137989", "score": "0.5569762", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "4de3ba056ff1772f27107c009e137989", "score": "0.5569762", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "61cd90c2a63b1cb7f025ff0196800f77", "score": "0.5564852", "text": "public function GetActualValue()\r\n {\r\n return $this->actual['value'];\r\n }", "title": "" }, { "docid": "5a705e96ad15c0d2eb33d3dadef65084", "score": "0.5557967", "text": "public function evaluate() {}", "title": "" }, { "docid": "0e8bc10f7d827190042af78a939f89da", "score": "0.555789", "text": "public function getValue() \n {\n return $this->value;\n }", "title": "" }, { "docid": "0e8bc10f7d827190042af78a939f89da", "score": "0.555789", "text": "public function getValue() \n {\n return $this->value;\n }", "title": "" }, { "docid": "bcd1ae3cead74ac1865e2b7ccd5a3adf", "score": "0.5548776", "text": "public function value()\n {\n return $this->value;\n }", "title": "" }, { "docid": "97069889b378f6f164119dc4dea860a6", "score": "0.5547591", "text": "public function getValue()\r\n {\r\n return $this->value;\r\n }", "title": "" }, { "docid": "25275e8c00e95f271749c7baf87454eb", "score": "0.5540107", "text": "public function getValue()\r\n {\r\n return $this->value;\r\n }", "title": "" } ]
869159dcfae94930b293bd8a90a3eb0f
called by plugin activation
[ { "docid": "cf2e8257b62578ee3433e50e091ed0a0", "score": "0.0", "text": "function eca_activate()\n{\n eca_registration_setup_db();\n}", "title": "" } ]
[ { "docid": "e6c33c971a07a9b64cead67a4e009b15", "score": "0.86368483", "text": "private static function plugin_on_activate() {\r\n\t\t\r\n\t}", "title": "" }, { "docid": "695a5a53c8e6fcc0db0cb10679ec4857", "score": "0.84714603", "text": "public function plugin_activate()\r\n {\r\n }", "title": "" }, { "docid": "b5630053b33e9aa30bb90e3d8c628677", "score": "0.79864275", "text": "function plugin_activated() {\n\t\t\n }", "title": "" }, { "docid": "e80bc3b25583f12718d8d6f24c04dd81", "score": "0.7638102", "text": "protected function initPlugin() {}", "title": "" }, { "docid": "2f3e509b8966bebfe92032bcaf0c77d7", "score": "0.7604266", "text": "public function activation () {\r\n $this->register_plugin_version();\r\n }", "title": "" }, { "docid": "b6dd226a8b46ff3072709d66888f2f53", "score": "0.748682", "text": "function GS_activate_plugin() {\n \tLogin\\Activate::activate();\n }", "title": "" }, { "docid": "02bbf35c09099d78fae66746aa7a9e30", "score": "0.7471498", "text": "function plugin_activation() {\n $this->softsdev_events_init();\n flush_rewrite_rules();\n }", "title": "" }, { "docid": "9a1206968857be5bb49db846aa75e460", "score": "0.7354394", "text": "public function plugin_activate(){\n\t\t\n\t\t//call our custom content type function\n\t \t$this->register_donation_content_type();\n\t\t//flush permalinks\n\t\tflush_rewrite_rules();\n\t}", "title": "" }, { "docid": "2eee01df9532c532f2cce582c8cac791", "score": "0.7244585", "text": "function incode_movies_plugin_activate(){\n\t// add option to then identify the time of activation of the plug-in in admin_init action.\n\tadd_option('Activated_Plugin', 'Plugin-Slug');\n}", "title": "" }, { "docid": "a80321deab303453860e32f31b6dc454", "score": "0.7103936", "text": "public function plugin_activate() {\t\t\t\n\t\tif( !$this->_file_cache_dir_is_writeable() ) {\n\t\t\tdie( 'Cache directory not writeable! ('. $this->cache_dir .')');\n\t\t}\n\t\t$this->_table_create();\n\t}", "title": "" }, { "docid": "e1c6e9a32c0a4b8b05c70f6a85235016", "score": "0.7097876", "text": "function wpeo_activate_plugin() {\n require_once plugin_dir_path( __FILE__ ) . 'includes/class-wpeo-activator.php';\n WPEO_Activator::activate();\n}", "title": "" }, { "docid": "ffa64a5483d31ba7b16f8f5b5e4677fb", "score": "0.7087823", "text": "function plugin_activation() {\r\n\t\t$this->testimonial_init();\r\n\t\tflush_rewrite_rules();\r\n\t}", "title": "" }, { "docid": "5485ca9cb153024aaf760c6b554dac6f", "score": "0.7080535", "text": "function activate_plugin_name() {\n\t//CP_Activator::activate();\n}", "title": "" }, { "docid": "2cd493c53e8670b77b8a67f5b5eefcfe", "score": "0.7018108", "text": "private function after_init() {}", "title": "" }, { "docid": "4cab3b94e1ffce30b996b6c04918a73c", "score": "0.70036614", "text": "protected function post_init() {\n\t\t\t\n\t\t}", "title": "" }, { "docid": "ae19dafff445723802c6caff14b1e0cf", "score": "0.6990886", "text": "function chatter_gallery_activate()\n{\n\terror_log(\"Plug-in activated\");\n}", "title": "" }, { "docid": "8f611a39e19a39c38d3518a530a9836f", "score": "0.6940928", "text": "public static function start()\n\t{\n\t $activation = new static();\n\n \\do_action('pmld.plugin_activation', $activation);\n\t}", "title": "" }, { "docid": "4b2878c085f58e5bcd3b2817ea11eb5d", "score": "0.6933911", "text": "function activate_kd_cpt_plugin(){\n Inc\\Base\\Activate::activate();\n}", "title": "" }, { "docid": "36b17475c72447a5059634c476747983", "score": "0.68660223", "text": "function haki_activate(){\n\t// null\n\n\t\n}", "title": "" }, { "docid": "38442c551fbf8202c897a54147804be2", "score": "0.68654794", "text": "public function admin_init() { \r\n\t\r\n\t\t//wsl_log(null, 'WRI class-api-manager-client.php admin_init 0: ' . wsl_vartotext('')); \r\n\t\t\r\n\t\t// We do not use activation setting page, Set Activatio Key link is on the plugin list\r\n\t\t//add_action( 'wsl_display_plugin_activation_settings_page_link', array( $this, 'display_plugin_activation_settings_page_link' ), 20, 0 );\r\n\t\r\n\t}", "title": "" }, { "docid": "df6cb0d6ae3fad428c1ee75e4b86128e", "score": "0.68586046", "text": "public static function activate() {\n\n\t}", "title": "" }, { "docid": "195cd268d8e4c2311570c49ee4706796", "score": "0.6857992", "text": "public static function activate()\n\t\t{\n\t\t\t\n\t\t}", "title": "" }, { "docid": "ded00237e3fda773cc06346260e04935", "score": "0.6857695", "text": "function on_activation ()\n{\n}", "title": "" }, { "docid": "e09abef93dabffd9e7186bc82e41028e", "score": "0.68574953", "text": "public static function on_activation() {\n // Security stuff.\n if ( ! current_user_can( 'activate_plugins' ) ) {\n return;\n }\n\n $plugin = isset( $_REQUEST['plugin'] ) ? $_REQUEST['plugin'] : '';\n check_admin_referer( \"activate-plugin_{$plugin}\" );\n\n // Check requirements.\n self::ensure_requirements_are_met();\n\n // Your activation code below this line.\n }", "title": "" }, { "docid": "08cfb0bb9ecba3a0455e4c564b96019d", "score": "0.6854881", "text": "function activate_loki_plugin() {\r\n\tInc\\Base\\Activate::activate();\r\n}", "title": "" }, { "docid": "91a50126261ffe632c2b84cf26dc68da", "score": "0.685318", "text": "function pluginAction()\n\t{\n\t\t$hooks = $this->_rivety_plugin->getHooksInUse();\n\t\t$this->view->hooks = $hooks;\n\t}", "title": "" }, { "docid": "6e34c2d1317f5f219f169797edb8dbe7", "score": "0.6852125", "text": "public function __construct(){\r\t\tregister_activation_hook(__FILE__, array(__CLASS__, 'check_plugin_activated'));\r\t\tregister_uninstall_hook(__FILE__, array(__CLASS__, 'uninstall'));\r\t\t\r\t\t//more action here\r\r\t}", "title": "" }, { "docid": "10a94fb1fe9138273633f51a574f3852", "score": "0.68506294", "text": "private static function single_activate() {\n\t\t\t\n\t\t//Always update plugin version\n\t\tupdate_option( self::$pluginDefaultSettings['plugin-version']['name'], self::$pluginDefaultSettings['plugin-version']['value'] );\n\n\t}", "title": "" }, { "docid": "cbe504c713cdd10b9ef5385d5244a468", "score": "0.6843948", "text": "function activate_justine_plugin() {\n Inc\\Base\\Activate::activate();\n}", "title": "" }, { "docid": "e3f4fc24cff674935a78170126c511b1", "score": "0.68358225", "text": "public function activate() {}", "title": "" }, { "docid": "ebd25fd99d71f76f379e9d0b5c1db7ae", "score": "0.6803734", "text": "public function activate(){\n // Activate the plugin\n $this->active = true;\n\n $model = new PluginModel(array(\n 'name' => $this->name,\n 'active' => 1\n ));\n $model->update();\n\n try{\n $this->getInstallerInstance()->activate();\n App::logger()->notice('The plugin ' . $this->name . ' has been activated');\n }\n catch(\\Exception $e){\n $this->active = false;\n\n $model->active = 0;\n $model->update();\n\n App::logger()->error('En error occured while activating plugin ' . $this->name . ' : ' . $e->getMessage());\n throw $e;\n }\n }", "title": "" }, { "docid": "111ba9ae57348f81b12c20ea49646ffe", "score": "0.6802605", "text": "public static function check_plugin_activated() {\r\t\t//your code here\r\t}", "title": "" }, { "docid": "27904126a8190ac1a80dd4a29f4d99f5", "score": "0.68018216", "text": "public function plugins_loaded() \n {\n // ...\n }", "title": "" }, { "docid": "fb4808e5077426973e89b941362706a8", "score": "0.6800327", "text": "function getStorifyOffersPlugin_pluginActivate_func()\n{\n add_option('getStorifyOffersPlugin_Activated_Plugin', 'getStorifyOffersPlugin_Activated');\n}", "title": "" }, { "docid": "7a5beaf3e9cf6b045d975c9aba5d58a9", "score": "0.6795035", "text": "function plugin_activated() {\n\t\tupdate_option('recommended_plugins_do_activation_redirect','true');\n\t}", "title": "" }, { "docid": "fc50ba7fabf341e4f6d36c8a41c33f47", "score": "0.67835146", "text": "function activate()\n {\n $thisPlugin = plugin_basename( __FILE__ );\n $activePlugins = get_option( 'active_plugins' );\n $reorderedPluginList = array();\n array_push( $reorderedPluginList, $thisPlugin );\n foreach ( $activePlugins as $plugin )\n {\n if ( $plugin != $thisPlugin )\n {\n $reorderedPluginList[] = $plugin;\n }\n }\n update_option( 'active_plugins', $reorderedPluginList );\n }", "title": "" }, { "docid": "5f6da120fe4dd91cc22f0424ca35d9ae", "score": "0.6778695", "text": "public static function activate()\n\t\t{\n\t\t}", "title": "" }, { "docid": "4788708bd70d51085fa73e5f20278280", "score": "0.6773115", "text": "public function activate() {\n\n\t}", "title": "" }, { "docid": "4788708bd70d51085fa73e5f20278280", "score": "0.6773115", "text": "public function activate() {\n\n\t}", "title": "" }, { "docid": "0f3b635f206a3e594c2ddceef5964b5a", "score": "0.6763903", "text": "public static function activate() {\n\t\t}", "title": "" }, { "docid": "a4c970630caa2e4577dde7ed407098d7", "score": "0.6760515", "text": "public function activate()\r\n {\r\n\tif( version_compare( get_bloginfo( 'version' ), '3.2', '<' ) ):\r\n\t deactivate_plugins( basename( __FILE__ ) ); //deaktifasi plugin\r\n\tendif;\r\n \r\n $this->save_options();\r\n \r\n \r\n //$rolecap = new emkapluginkit_rolecap();\r\n\t\t//$rolecap->add_role( 'Operator', 'Operator PPDB');\r\n\t\t//$rolecap->add_cap('Operator', array('manage_datappdb' ) );\r\n\t\t\r\n\t\t// prepare table menu\r\n\t\t//$tablemenu = $this->db->prefix.'adminmenu';\r\n\t\t\r\n\t\t//$sql = '';\r\n\t\t\r\n\t\t//$this->prepare_dbtable( $tablemenu, base64_decode($sql) );\r\n }", "title": "" }, { "docid": "7f09a7640cf172502f351b350fb0e98f", "score": "0.67561704", "text": "public function activate() \n\t{\n\t\t$this->fix_user_meta();\n\t}", "title": "" }, { "docid": "750169a39983bbebb6cf11956dd28519", "score": "0.6752402", "text": "function setup_activation() {\n\t\tadd_action('activate_plugin',array($this,'setup_exceptions'));\n\t\t\n\t\tforeach(array_merge($this->recommended,$this->optional) as $name=>$plugin) {\n\t\t\tregister_activation_hook($plugin['path'],array($this,'plugin_activated'));\n\t\t}\n\t}", "title": "" }, { "docid": "5eca03a1631b897cd31dabc0c3a10017", "score": "0.6734234", "text": "public function plugin_settings() {\r\n\t}", "title": "" }, { "docid": "dcc700d085ec6c34b3d13d0d2f732782", "score": "0.6700711", "text": "function activate_devitmeta() {\n require_once plugin_dir_path( __FILE__ ) . 'includes/class-devitmeta-activator.php';\n Devitmeta_Activator::activate();\n}", "title": "" }, { "docid": "aab53a8635cc05826f84084a515a1a72", "score": "0.66923803", "text": "private static function plugin_on_deactivate() {\r\n\t\t\r\n\t}", "title": "" }, { "docid": "a48473bb3a07bf6122cf839b84314434", "score": "0.6689929", "text": "function admin_init() {\n if (!$this->set_Plugin()) { return; }\n\n // Already been here? Get out.\n if ($this->initialized) { return; } \n $this->initialized = true;\n\n // Update system hook\n // Premium add-ons can use the admin_init hook to utilize this.\n //\n require_once(SLPLUS_PLUGINDIR . '/include/storelocatorplus-updates_class.php');\n\n // Activation Helpers\n // Updates are handled via WPCSL via namespace style call\n //\n require_once(SLPLUS_PLUGINDIR . '/include/storelocatorplus-activation_class.php');\n $this->plugin->Activate = new SLPlus_Activate();\n register_activation_hook( __FILE__, array($this->plugin->Activate,'update')); // WP built-in activation call\n\n // Admin UI Helpers\n //\n $this->attachAdminUI();\n $this->plugin->AdminUI->set_style_as_needed();\n $this->plugin->AdminUI->build_basic_admin_settings();\n\n // Action hook for 3rd party plugins\n //\n do_action('slp_admin_init_complete');\n }", "title": "" }, { "docid": "a1c1e2169ac5fb2e22204bf3b61b5ef6", "score": "0.6687362", "text": "public function init()\n {\n parent::init();\n self::$plugin = $this;\n\n $this->_registerLogger();\n $this->_redirectAfterInstall();\n $this->_registerEvents();\n\n }", "title": "" }, { "docid": "55092bf4122759c2170633e3ce17e92b", "score": "0.6682238", "text": "public function activate() {\n\n\t\t// stub\n\t}", "title": "" }, { "docid": "cf691413dd693fde056b75c9ed45ca6a", "score": "0.6680012", "text": "public function activate();", "title": "" }, { "docid": "cf691413dd693fde056b75c9ed45ca6a", "score": "0.6680012", "text": "public function activate();", "title": "" }, { "docid": "f57ef8f298fe52e54eef22b2984e7fdc", "score": "0.6670003", "text": "public function activate(){ \n set_transient( $this->plugin_slug.'_welcome_screen_activation_redirect', true, 30 );\n }", "title": "" }, { "docid": "9e5888bafd318464aa50a67fe00c2c94", "score": "0.6654309", "text": "public static function init() {\n register_activation_hook( TRAINEE_PLUGIN_FILE, [ 'LcTrainee_Install', 'pluginActivation' ] );\n register_deactivation_hook( TRAINEE_PLUGIN_FILE, [ 'LcTrainee_Install', 'pluginDeactivation' ] );\n }", "title": "" }, { "docid": "ae62fbb09d4ca17ba4af68bcf82e91b7", "score": "0.6642236", "text": "protected function setupRegistration() {\n register_activation_hook($this->_pluginFile, array($this, 'activate'));\n register_deactivation_hook($this->_pluginFile, array($this, 'deactivate'));\n }", "title": "" }, { "docid": "a551875de4669ffc1cc62aaea9139a07", "score": "0.6640237", "text": "function activate() {\n}", "title": "" }, { "docid": "9d7e5bf66ba06fb0fc354109e9e7b410", "score": "0.66339874", "text": "function init_plugin(){\r\n\t\tif( ! function_exists( 'ZNPB' ) ){\r\n\t\t\tadd_action( 'admin_notices', array( $this, 'show_admin_notice' ) );\r\n\t\t}\r\n\t\telse{\r\n\t\t\tadd_action( 'wp_enqueue_scripts', array($this, 'scripts') );\r\n\t\t\t//require dirname( __FILE__ ) . '/animated-text-element-shortcode.php';\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "f62a81dc2c13beb470875f02f5ce1619", "score": "0.6629932", "text": "public function postInit()\n {\n }", "title": "" }, { "docid": "f62a81dc2c13beb470875f02f5ce1619", "score": "0.6629932", "text": "public function postInit()\n {\n }", "title": "" }, { "docid": "b430c4512c3669345687c6aa6406b4a3", "score": "0.6623464", "text": "public function onPluginsInitialized()\n {\n $this->processDeprecatedSettings();\n }", "title": "" }, { "docid": "acbd9cf939eaf50952350a476ca4880f", "score": "0.6615113", "text": "private function __construct() {\r\n\t\t//if ( class_exists( 'Jetpack' ) && Jetpack::init()->is_module_active( 'sharedaddy' ) )\r\n\t\t\tadd_action( 'plugins_loaded', array( $this, 'setup' ) );\r\n\t}", "title": "" }, { "docid": "e8f6a0cbdca056bf37068608264199b8", "score": "0.66077775", "text": "public function plugin_activate(){ \n //call our custom content type function\n $this->register_location_content_type();\n //flush permalinks\n flush_rewrite_rules();\n}", "title": "" }, { "docid": "147e591a59f92fec2b68f8be5af1e2b0", "score": "0.6606986", "text": "function activatePlugin() {\n\t\t\t\tadd_option($this->optionsName);\n\t\t\t\t$default_options = array();\n\t\t\t\t$options = get_option($this->optionsName);\n\t\t\t\tif (!empty($options)) {\n\t\t\t\t\tforeach ($options as $key => $option)\n\t\t\t\t\t$default_options[$key] = $option;\n\t\t\t\t}\n\t\t\t\tupdate_option($this->optionsName, $default_options);\n\t\t\t\tglobal $wpdb;\n\t\t\t\tif($wpdb->get_var(\"SHOW TABLES LIKE '\". $this->category_table . \"'\") != $this->category_table) { // Table doesn't exist\n\t\t\t\t\t$sql = \"CREATE TABLE \" . $this->category_table . \" (\n\t\t\t\t\t\tcategory_id bigint(11) NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t\ttitle varchar(128) NOT NULL,\n\t\t\t\t\t\tshort_title varchar(128) NOT NULL,\n\t\t\t\t\t\tsort varchar(32) NOT NULL,\n\t\t\t\t\t\tadded TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\t\t\t\t\t\tenabled tinyint(1) NOT NULL,\n\t\t\t\t\t\tPRIMARY KEY category_id (category_id),\n\t\t\t\t\t\tUNIQUE(short_title)\n\t\t\t\t\t);\";\n\t\t\t\t\trequire_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n\t\t\t\t\tdbDelta($sql);\n\t\t\t\t}\n\t\t\t\tif($wpdb->get_var(\"SHOW TABLES LIKE '\" . $this->link_table . \"'\") != $this->link_table) { // Table doesn't exist\n\t\t\t\t\t$sql = \"CREATE TABLE \" . $this->link_table . \" (\n\t\t\t\t\t\tlink_id bigint(11) NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t\tcategory_id bigint(11) NOT NULL,\n\t\t\t\t\t\turl varchar(128) NOT NULL,\n\t\t\t\t\t\tpercent TINYINT(3) NOT NULL,\n\t\t\t\t\t\tclick_count bigint(11) NOT NULL,\n\t\t\t\t\t\tadded TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\t\t\t\t\t\tPRIMARY KEY link_id (link_id)\n\t\t\t\t\t);\";\n\t\t\t\t\tdbDelta($sql);\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "9374203556d602b62cdf443ea7d2b288", "score": "0.65987796", "text": "public function init() {\n\n\t\t// potentially handle a new activation\n\t\t$this->handle_activation();\n\n\t\t$installed_version = $this->get_installed_version();\n\t\t$plugin_version = $this->get_plugin()->get_version();\n\n\t\t// installed version lower than plugin version?\n\t\tif ( version_compare( $installed_version, $plugin_version, '<' ) ) {\n\n\t\t\tif ( ! $installed_version ) {\n\n\t\t\t\t$this->install();\n\n\t\t\t\t/**\n\t\t\t\t * Fires after the plugin has been installed.\n\t\t\t\t *\n\t\t\t\t * @since 5.1.0\n\t\t\t\t */\n\t\t\t\tdo_action( 'wc_' . $this->get_plugin()->get_id() . '_installed' );\n\n\t\t\t} else {\n\n\t\t\t\t$this->upgrade( $installed_version );\n\n\t\t\t\t// if the plugin never had any previous milestones, consider them all reached so their notices aren't displayed\n\t\t\t\tif ( ! $this->get_milestone_version() ) {\n\t\t\t\t\t$this->set_milestone_version( $plugin_version );\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Fires after the plugin has been updated.\n\t\t\t\t *\n\t\t\t\t * @since 5.1.0\n\t\t\t\t *\n\t\t\t\t * @param string $installed_version previously installed version\n\t\t\t\t */\n\t\t\t\tdo_action( 'wc_' . $this->get_plugin()->get_id() . '_updated', $installed_version );\n\t\t\t}\n\n\t\t\t// new version number\n\t\t\t$this->set_installed_version( $plugin_version );\n\t\t}\n\t}", "title": "" }, { "docid": "b74e764118b2ed7aee70822dcab9a73b", "score": "0.6595355", "text": "function onAfterInitialise()\n{\n\n}", "title": "" }, { "docid": "8314850a3c1db74a77ce6856d51b1b16", "score": "0.65776396", "text": "protected function _afterInit() {\n\t}", "title": "" }, { "docid": "86c287f7c6200b9e9753b44c99250c88", "score": "0.6573279", "text": "public static function activation_hook() {\n\t\t\tadd_option( 'forminator_activation_hook', 'activated' );\n\n\t\t\tself::set_free_installation_timestamp();\n\t\t}", "title": "" }, { "docid": "aebc7ded96321a444c7ce5f5a4e61d62", "score": "0.6564419", "text": "protected function postInit()\n\t{\n\t}", "title": "" }, { "docid": "49416566953dfe829ae40c886ba1477e", "score": "0.6559829", "text": "function ashe_plugin_auto_activation() {\n\n\t// Get the list of currently active plugins (Most likely an empty array)\n\t$active_plugins = (array) get_option( 'active_plugins', array() );\n\n\tarray_push( $active_plugins, 'one-click-demo-import/one-click-demo-import.php' );\n\n\t// Set the new plugin list in WordPress\n\tupdate_option( 'active_plugins', $active_plugins );\n\n}", "title": "" }, { "docid": "0055a825adc9867823cf6b83dc51499e", "score": "0.6532272", "text": "public static function initialisePlugin() {\r\n\t\r\n\t\tadd_filter('plugin_row_meta', array(__CLASS__, 'filter_plugin_row_meta'),10,2);\r\n\t\tadd_action('do_robots', array(__CLASS__, 'addRobotLinks'), 100, 0);\r\n\t\tadd_action('wp_head', array(__CLASS__, 'addRssLink'),100);\r\n\r\n\r\n\t\t// only include admin files when necessary.\r\n\t\tif (is_admin()) \r\n\t\t{\r\n\t\t\tinclude_once 'settings.php';\r\n\t\t\tinclude_once 'postMetaData.php';\r\n\t\t\tinclude_once 'categoryMetaData.php';\r\n\t\t\tsettings::addHooks();\r\n\t\t\tcategoryMetaData::addHooks();\r\n\t\t\tpostMetaData::addHooks();\t\r\n\t\r\n\t\t}\r\n\r\n\t\r\n\t\t\r\n\t\tif (!wp_get_schedule('xmsg_ping')) \r\n\t\t{\r\n\t\t\t// ping in 2 hours from when setup.\r\n\t\t\twp_schedule_event(time() + 60*60*2 , 'daily', 'xmsg_ping');\r\n\t\t}\r\n\r\n\t\tadd_action('xmsg_ping', array(__CLASS__, 'doPing'));\r\n\t\t\r\n\t\t// NB Network activation will not have set up the rules for the site.\r\n\t\t// Check if they exist and then reactivate.\r\n\t\tif (get_option(RULES_OPTION_NAME, null) != RULES_VERSION) \r\n\t\t{\r\n\t\t\tadd_action('wp_loaded', array(__CLASS__, 'activateRewriteRules'), 99999, 1);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "eeb9ab4c1c7808a3eb4f9f8eab18d177", "score": "0.65169007", "text": "static function init(){\n\t\tregister_activation_hook(NECTAR_FILE, array(get_class(), 'activate_the_plugin'));\n\t\t\n\t\t//add_action('blog_privacy_selector', array(get_class(), 'blog_privacy_selector'));\n\t\tadd_action('admin_menu', array(get_class(), 'admin_menu'), 1000);\n\t\t\n\t\t\n\t\t//dashboard only for admin\n\t\tadd_action('wp_dashboard_setup', array(get_class(), 'add_dashboard_widget'), 1000);\n\t\t\n\t}", "title": "" }, { "docid": "61b1be8465307bd3ca8e134336628509", "score": "0.6498531", "text": "static function activate_the_plugin(){\n\t\t// (wp-admin/options-reading.php)\n\t\tupdate_option('blog_public', '1');\n\t\t\n\t\t// (wp-admin/options-discussion.php)\n\t\tupdate_option('default_comment_status', 'closed');\n\t\tupdate_option('comments_notify', '0');\n\t\tupdate_option('moderation_notify', '0');\t\t\n\t}", "title": "" }, { "docid": "1dea791bb820c41632ea396753a10e0b", "score": "0.6495669", "text": "function ActivatePlugin(){\r\n\t$options = maybe_unserialize(get_option(\"VirtualTheme_options\"));\r\n\t$options['active'] = true;\r\n\tupdate_option(\"VirtualTheme_options\", $options);\r\n\tFlushRewrites();\r\n}", "title": "" }, { "docid": "b6f822a0d94dd3d03a38cb9627d12c37", "score": "0.64908314", "text": "public function hecf_plugin_deactivation()\n\t{\n\t}", "title": "" }, { "docid": "9609d8949acd326d12fb36da69a20bbc", "score": "0.64855397", "text": "private function init_actions() {\n\t\t\t/* Add theme page for activation page */\n\t\t\tadd_action('admin_menu', array( $this, 'neko_add_activation_page') );\n\n\t\t\t/* Activate and desactivate plugin management from Activation page */\n\t\t\tadd_action( 'admin_init', array( $this, 'neko_admin_init') );\n\n\t\t\t/* Redirecto to actiation page after theme activation */\n\t\t\t$this->redirect_after_theme_activation();\t\t\n\t\t}", "title": "" }, { "docid": "ea728565fd0d44830532cd7e2e376fb8", "score": "0.64820915", "text": "public function on_plugins_loaded()\n {\n // Check environment\n if (!RP_WCEC::check_environment()) {\n return;\n }\n\n // Load/parse plugin settings\n $this->opt = $this->get_options();\n\n // Hook to WordPress 'init' action\n add_action('init', array($this, 'on_init_pre'), 1);\n\n // Load assets conditionally\n add_action('init', array($this, 'enqueue_select2'), 1);\n\n // Load assets conditionally\n add_action('admin_enqueue_scripts', array($this, 'enqueue_backend_assets'));\n\n // Load some assets on all admin pages\n add_action('admin_enqueue_scripts', array($this, 'enqueue_backend_assets_all'));\n\n // Dequeue some WooCommerce assets on our own pages\n add_action('admin_enqueue_scripts', array($this, 'dequeue_woocommerce_scripts'), 11);\n\n // Add settings page menu link\n add_action('admin_menu', array($this, 'admin_menu'), 11);\n\n // Automatically login user after clicking on the auto login link\n add_action('init', array($this, 'auto_login'));\n }", "title": "" }, { "docid": "558d0760152166d75c195bdb1afed582", "score": "0.6480271", "text": "public static function plugin_activated ()\n\t\t\t{\n\t\t\t\t\n\t\t\t\tif ( version_compare( get_bloginfo('version'), '4.6', '<') ) {\n\t\t\t\t\t$message = \"Sorry! Impossible to activate plugin. <br />\";\n\t\t\t\t\t$message .= \"This Plugin requires at least WP Version 4.9\";\n\t\t\t\t\tdie( $message );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (version_compare(PHP_VERSION, '5.6', '<')){\n\t\t\t\t\t$message = \"Sorry! Impossible to activate plugin. <br />\";\n\t\t\t\t\t$message .= \"This Plugin requires minimum PHP Version 5.6.0\";\n\t\t\t\t\tdie( $message );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t * DO WHAT YOU WANT ON PLUGIN ACTIVATION.\n\t\t\t\t *\n\t\t\t\t * */\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "title": "" }, { "docid": "f9ffe48ad2f3ad6937fe276fcf4ea3fb", "score": "0.6477257", "text": "public function plug() {\n\t\t\n\t\tadd_action ( 'admin_init', array(&$this, 'wp_splash_image_back_init' ));\n\t\tadd_action ( 'admin_menu', array(&$this, 'wsi_menu' ));\n\t\tadd_action ( 'plugins_loaded', array(&$this, 'update_db_check' )); // OK since WP 3.1\n\t\tadd_filter ( 'plugin_action_links_'.WsiCommons::$pluginMainFile, array(&$this, 'wsi_filter_plugin_actions' ));\n\t\tadd_filter ( 'plugin_row_meta', array(&$this, 'set_plugin_meta'), 10, 2 );\n\n\t}", "title": "" }, { "docid": "a2e8ebb08344d08a3617404fc43e290a", "score": "0.64733", "text": "public function on_plugins_loaded()\n {\n\n if ($this->is_compatible()) {\n add_action('elementor/init', [$this, 'init']);\n }\n\n }", "title": "" }, { "docid": "c9d1d2544fd9621ab5e6efcc67d8510f", "score": "0.64680505", "text": "public function activate(): void\n {\n }", "title": "" }, { "docid": "d1879a84bff0c0e74e68fe5d699ea9a8", "score": "0.6467626", "text": "private function _init()\n {\n $this->_setPluginDefault();\n $this->_smartyconf();\n \n }", "title": "" }, { "docid": "49c275434227ab721eeac0f755062a33", "score": "0.64654005", "text": "private function init_hooks() {\n add_action( 'plugins_loaded', array( $this, 'plugins_loaded' ) );\n }", "title": "" }, { "docid": "1aaf7af0093cfb6e9eab2789d6ab41f0", "score": "0.6465032", "text": "public function plugins_loaded() {\n\t\t\t\t// ...\n\t\t\t}", "title": "" }, { "docid": "13a784c797a781c0fcf05d136e0fe3a4", "score": "0.64606684", "text": "public function after_setup() {\n\t\t/**\n\t\t * Fires after this plugin is setup, which should be on plugins_loaded\n\t\t * Should be used to access the main plugin class instance, possibly store a reference to it for later use\n\t\t * and remove any plugin action and filter hooks\n\t\t *\n\t\t * @since 1.0\n\t\t *\n\t\t * @param ACTI Main plugin class instance\n\t\t */\n\t\tdo_action( 'acti/after_setup', $this );\n\t}", "title": "" }, { "docid": "cadcf303e60769b06bb3a4288a526520", "score": "0.6460295", "text": "public function init_plugin() {\n $this->includes();\n $this->init_hooks();\n\n do_action( 'dokan_loaded' );\n }", "title": "" }, { "docid": "663ba649d8718562bc9fc0b2ec98aa48", "score": "0.6460262", "text": "function __construct()\n {\n // run define constants function\n $this->define_constants();\n require 'settings.php';\n\n// run when plugin activate\n register_activation_hook(__FILE__, 'has_tag_activate');\n// run when plugin deactivate\n register_deactivation_hook(__FILE__, 'has_tag_deactivate');\n\n// run (add plugin menu to admin panel) function\n add_action('admin_menu', array($this, 'has_tag_admin_menu'));\n\n// run (auto load class) function\n if (function_exists('__autoload')) {\n spl_autoload_register('__autoload');\n }\n spl_autoload_register(array($this, 'autoload'));\n\n\n }", "title": "" }, { "docid": "933d40dd398a9abdc11e82a9f1f1a1a7", "score": "0.64578277", "text": "public function afterInit(){}", "title": "" }, { "docid": "c83657dad9b4f5687bf9df5cabbd5211", "score": "0.64457303", "text": "function activate() {\n Inc\\Base\\Activator::activate();\n}", "title": "" }, { "docid": "311a9ebebf34a41a526a4262e2b9aa7e", "score": "0.6437518", "text": "function __construct() {\n $this->plugin = plugin_basename(__FILE__); \n\t}", "title": "" }, { "docid": "49b6a9d9cec6c91fe332a726019adb38", "score": "0.64314365", "text": "protected function doPrePluginOptionsSave() { }", "title": "" }, { "docid": "22c33e06bfba53f262753087e8e2e08a", "score": "0.6431195", "text": "public function init() {\n add_action( 'plugins_loaded', array( $this, 'load_files' ) );\n }", "title": "" }, { "docid": "3cdc37ee6cc9e06d87cadbcab931de6f", "score": "0.6428731", "text": "public function neko_admin_init() {\n\n\t\t\tif ( current_user_can( 'edit_theme_options' ) ) {\n\n\n\t\t\t\tif ( isset( $_GET['neko-deactivate'] ) && $_GET['neko-deactivate'] == 'deactivate-plugin' ) {\n\t\t\t\t\tcheck_admin_referer( 'neko-deactivate', 'neko-deactivate-nonce' );\n\n\t\t\t\t\t$plugins = TGM_Plugin_Activation::$instance->plugins;\n\n\t\t\t\t\tforeach( $plugins as $plugin ) {\n\t\t\t\t\t\tif ( $plugin['slug'] == $_GET['plugin'] ) {\n\t\t\t\t\t\t\tdeactivate_plugins( $plugin['file_path'] );\n\n\t\t\t\t\t\t\twp_redirect( admin_url( 'admin.php?page=neko-welcome-page&tab=plugininstall' ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} if ( isset( $_GET['neko-activate'] ) && $_GET['neko-activate'] == 'activate-plugin' ) {\n\t\t\t\t\tcheck_admin_referer( 'neko-activate', 'neko-activate-nonce' );\n\n\t\t\t\t\t$plugins = TGM_Plugin_Activation::$instance->plugins;\n\n\t\t\t\t\tforeach( $plugins as $plugin ) {\n\t\t\t\t\t\tif ( $plugin['slug'] == $_GET['plugin'] ) {\n\t\t\t\t\t\t\tactivate_plugin( $plugin['file_path'] );\n\n\t\t\t\t\t\t\twp_redirect( admin_url( 'admin.php?page=neko-welcome-page&tab=plugininstall' ) );\n\t\t\t\t\t\t\texit;\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}", "title": "" }, { "docid": "8a2decb9bafa7e834e5f0b6c1c4ecf27", "score": "0.6424759", "text": "function activate_eld_demo() {\n require_once plugin_dir_path( __FILE__ ) . 'includes/class-ambiverse-eld-activator.php';\n Ambiverse_ELD_Activator::activate();\n}", "title": "" }, { "docid": "c0c3722027eef140aaf7d2f8e638b522", "score": "0.6423816", "text": "function plugin_activate_all_enbled() {\n\tglobal $plugin_hooks;\n\n\t$plugins = plugin_load_from_cache();\n\tforeach ($plugins as $plugin) {\n\t\tinclude_once $GLOBALS['PLUGIN_PATH'] . $plugin;\n\t}\n}", "title": "" }, { "docid": "9354c26ec0316099178cd46b5e980ae4", "score": "0.6420904", "text": "function li_preloader_plugin_active() {\n\n\t\twp_register_script( 'plugin-script-active', plugins_url( 'main.js', __FILE__ ) );\n\t\twp_enqueue_script( 'plugin-script-active' );\n\n\t}", "title": "" }, { "docid": "ecad7139d8b15630e697a2744ca82ca6", "score": "0.641158", "text": "function onAfterInitialise()\n {\n }", "title": "" }, { "docid": "b0661b0adee13e27dd48ac29ca0c9876", "score": "0.64053017", "text": "function admin_start(){\r\n\t\t$adminConfigAction = new ALPAdminConfigAction($this->plugin_name, $this->plugin_base);\r\n\t\t$adminConfigAction->render();\r\n\t}", "title": "" }, { "docid": "5846243f4abcf693ff34355f0f67acb2", "score": "0.64041483", "text": "public static function activate() {\n // Information needed for creating the plugin's pages\n $page_definitions = array(\n 'login' => array(\n 'title' => __( 'Login', 'personalize-login' ),\n 'content' => '[custom-login-form]'\n ),\n 'register' => array(\n 'title' => __( 'Register', 'personalize-login' ),\n 'content' => '[custom-register-form]'\n ),\n 'Activate' => array(\n 'title' => __( 'Activation Page', 'personalize-login' ),\n ),\n 'password-lost' => array(\n 'title' => __( 'Forgot Your Password?', 'personalize-login' ),\n 'content' => '[custom-password-lost-form]'\n ),\n 'password-reset' => array(\n 'title' => __( 'Pick a New Password', 'personalize-login' ),\n 'content' => '[custom-password-reset-form]'\n )\n // 'member-account' => array(\n // 'title' => __( 'Your Account', 'personalize-login' ),\n // 'content' => '[account-info]'\n // ),\n );\n\n foreach ( $page_definitions as $slug => $page ) {\n // Check that the page doesn't exist already\n $query = new \\WP_Query( 'pagename=' . $slug );\n if ( ! $query->have_posts() ) {\n // Add the page using the data from the array above\n wp_insert_post(\n array(\n 'post_content' => $page['content'],\n 'post_name' => $slug,\n 'post_title' => $page['title'],\n 'post_status' => 'publish',\n 'post_type' => 'page',\n 'ping_status' => 'closed',\n 'comment_status' => 'closed',\n )\n );\n }\n }\n flush_rewrite_rules();\n }", "title": "" }, { "docid": "708571ae120e09d5b605463078ceaaf8", "score": "0.64031976", "text": "public function plugin_activate(){ \n //call our custom content type function\n $this->register_fcircles_content_type();\n //flush permalinks\n flush_rewrite_rules();\n}", "title": "" }, { "docid": "ed3a49520e591558d4ea84bef226d0bc", "score": "0.64005965", "text": "public function onPluginsInitialized()\n {\n if ($this->isAdmin()) {\n return;\n }\n $uri = $this->grav['uri'];\n $pluginRoute = $this->config->get('plugins.fbgraph.route');\n if ($uri->path() === $pluginRoute && strpos($uri->basename(), '.json') !== false) {\n $this->enable([\n 'onPageInitialized' => ['onPageInitialized', 0]\n ]);\n }\n $this->enable([\n 'onTwigInitialized' => ['onTwigInitialized', 0]\n ]);\n }", "title": "" }, { "docid": "56fa2d97b4cccd4cc802c5020deeb476", "score": "0.63868725", "text": "public function plugin_page() {\r\n\t}", "title": "" }, { "docid": "11f04d6c3f2e5afd25cbfaabf0810465", "score": "0.6384178", "text": "public final function activate() {\n\t\t$class = get_called_class();\n\t\tadd_shortcode( $class::shortcode , array( $this , 'process' ) );\n\t}", "title": "" } ]
748d24091da0749d04a9ec49b8578e64
24 /Periodos de pago
[ { "docid": "db3a2a21695c3bf688e810b476ea5399", "score": "0.53781337", "text": "function periodo($p, $tn){\n if($p > 24 || $tn == 1)\n {\n\t $objBDSQL = new ConexionSRV();\n\t $objBDSQL->conectarBD();\n\n\t $_queryFechas = \"SELECT CONVERT (VARCHAR (10), inicio, 103) AS 'FECHA1',\n CONVERT (VARCHAR (10), cierre, 103) AS 'FECHA2'\n FROM Periodos\n WHERE tiponom = 1\n AND periodo = $p-1\n AND ayo_operacion = \".$_SESSION['AYO_ACTUAL'].\"\n AND empresa = \".$_SESSION['ID_EMPRESA'].\";\";\n\n \t $_resultados = $objBDSQL->consultaBD($_queryFechas);\n if($_resultados['error'] == 1)\n {\n $file = fopen(\"log/log\".date(\"d-m-Y\").\".txt\", \"a\");\n fwrite($file, \":::::::::::::::::::::::ERROR SQL:::::::::::::::::::::::\".PHP_EOL);\n fwrite($file, '['.date('d/m/Y h:i:s A').']'.' - '.$_resultados['SQLSTATE'].PHP_EOL);\n fwrite($file, '['.date('d/m/Y h:i:s A').']'.' - '.$_resultados['CODIGO'].PHP_EOL);\n fwrite($file, '['.date('d/m/Y h:i:s A').']'.' - '.$_resultados['MENSAJE'].PHP_EOL);\n fwrite($file, '['.date('d/m/Y h:i:s A').']'.' - CONSULTA: '.$_queryFechas);\n fclose($file);\n return \"00/00/0000,00/00/0000,00/00/0000,00/00/0000\";\n /////////////////////////////\n $objBDSQL->cerrarBD();\n exit();\n }\n $_datos = $objBDSQL->obtenResult();\n\n $fecha1 = $_datos['FECHA1'];\n $fecha2 = $_datos['FECHA2'];\n $objBDSQL->liberarC();\n\n $_queryFechas = \"SELECT CONVERT (VARCHAR (10), inicio, 103) AS 'FECHA3',\n CONVERT (VARCHAR (10), cierre, 103) AS 'FECHA4'\n FROM Periodos\n WHERE tiponom = 1\n AND periodo = $p\n AND ayo_operacion = \".$_SESSION['AYO_ACTUAL'].\"\n AND empresa = \".$_SESSION['ID_EMPRESA'].\";\";\n\n \t $_resultados = $objBDSQL->consultaBD($_queryFechas);\n if($_resultados['error'] == 1)\n {\n $file = fopen(\"log/log\".date(\"d-m-Y\").\".txt\", \"a\");\n fwrite($file, \":::::::::::::::::::::::ERROR SQL:::::::::::::::::::::::\".PHP_EOL);\n fwrite($file, '['.date('d/m/Y h:i:s A').']'.' - '.$_resultados['SQLSTATE'].PHP_EOL);\n fwrite($file, '['.date('d/m/Y h:i:s A').']'.' - '.$_resultados['CODIGO'].PHP_EOL);\n fwrite($file, '['.date('d/m/Y h:i:s A').']'.' - '.$_resultados['MENSAJE'].PHP_EOL);\n fwrite($file, '['.date('d/m/Y h:i:s A').']'.' - CONSULTA: '.$_queryFechas);\n fclose($file);\n return \"00/00/0000,00/00/0000,00/00/0000,00/00/0000\";\n /////////////////////////////\n $objBDSQL->cerrarBD();\n exit();\n }\n $_datos = $objBDSQL->obtenResult();\n\n $fecha3 = $_datos['FECHA3'];\n $fecha4 = $_datos['FECHA4'];\n $objBDSQL->liberarC();\n\n\t $objBDSQL->cerrarBD();\n\t return $fecha1.\",\".$fecha2.\",\".$fecha3.\",\".$fecha4;\n exit();\n }\n switch ($p) {\n case 1:\n $fecha1 = $GLOBALS['A'][0];\n $fecha2 = $GLOBALS['A'][1];\n $fecha3 = $GLOBALS['A'][2];\n $fecha4 = $GLOBALS['A'][3];\n break;\n case 2:\n $fecha1 = $GLOBALS['B'][0];\n $fecha2 = $GLOBALS['B'][1];\n $fecha3 = $GLOBALS['B'][2];\n $fecha4 = $GLOBALS['B'][3];\n break;\n case 3:\n $fecha1 = $GLOBALS['C'][0];\n $fecha2 = $GLOBALS['C'][1];\n $fecha3 = $GLOBALS['C'][2];\n $fecha4 = $GLOBALS['C'][3];\n break;\n case 4:\n $fecha1 = $GLOBALS['D'][0];\n $fecha2 = $GLOBALS['D'][1];\n $fecha3 = $GLOBALS['D'][2];\n $fecha4 = $GLOBALS['D'][3];\n break;\n case 5:\n $fecha1 = $GLOBALS['E'][0];\n $fecha2 = $GLOBALS['E'][1];\n $fecha3 = $GLOBALS['E'][2];\n $fecha4 = $GLOBALS['E'][3];\n break;\n case 6:\n $fecha1 = $GLOBALS['F'][0];\n $fecha2 = $GLOBALS['F'][1];\n $fecha3 = $GLOBALS['F'][2];\n $fecha4 = $GLOBALS['F'][3];\n break;\n case 7:\n $fecha1 = $GLOBALS['G'][0];\n $fecha2 = $GLOBALS['G'][1];\n $fecha3 = $GLOBALS['G'][2];\n $fecha4 = $GLOBALS['G'][3];\n break;\n case 8:\n $fecha1 = $GLOBALS['H'][0];\n $fecha2 = $GLOBALS['H'][1];\n $fecha3 = $GLOBALS['H'][2];\n $fecha4 = $GLOBALS['H'][3];\n break;\n case 9:\n $fecha1 = $GLOBALS['I'][0];\n $fecha2 = $GLOBALS['I'][1];\n $fecha3 = $GLOBALS['I'][2];\n $fecha4 = $GLOBALS['I'][3];\n break;\n case 10:\n $fecha1 = $GLOBALS['J'][0];\n $fecha2 = $GLOBALS['J'][1];\n $fecha3 = $GLOBALS['J'][2];\n $fecha4 = $GLOBALS['J'][3];\n break;\n case 11:\n $fecha1 = $GLOBALS['K'][0];\n $fecha2 = $GLOBALS['K'][1];\n $fecha3 = $GLOBALS['K'][2];\n $fecha4 = $GLOBALS['K'][3];\n break;\n case 12:\n $fecha1 = $GLOBALS['L'][0];\n $fecha2 = $GLOBALS['L'][1];\n $fecha3 = $GLOBALS['L'][2];\n $fecha4 = $GLOBALS['L'][3];\n break;\n case 13:\n $fecha1 = $GLOBALS['M'][0];\n $fecha2 = $GLOBALS['M'][1];\n $fecha3 = $GLOBALS['M'][2];\n $fecha4 = $GLOBALS['M'][3];\n break;\n case 14:\n $fecha1 = $GLOBALS['N'][0];\n $fecha2 = $GLOBALS['N'][1];\n $fecha3 = $GLOBALS['N'][2];\n $fecha4 = $GLOBALS['N'][3];\n break;\n case 15:\n $fecha1 = $GLOBALS['O'][0];\n $fecha2 = $GLOBALS['O'][1];\n $fecha3 = $GLOBALS['O'][2];\n $fecha4 = $GLOBALS['O'][3];\n break;\n case 16:\n $fecha1 = $GLOBALS['P'][0];\n $fecha2 = $GLOBALS['P'][1];\n $fecha3 = $GLOBALS['P'][2];\n $fecha4 = $GLOBALS['P'][3];\n break;\n case 17:\n $fecha1 = $GLOBALS['Q'][0];\n $fecha2 = $GLOBALS['Q'][1];\n $fecha3 = $GLOBALS['Q'][2];\n $fecha4 = $GLOBALS['Q'][3];\n break;\n case 18:\n $fecha1 = $GLOBALS['R'][0];\n $fecha2 = $GLOBALS['R'][1];\n $fecha3 = $GLOBALS['R'][2];\n $fecha4 = $GLOBALS['R'][3];\n break;\n case 19:\n $fecha1 = $GLOBALS['S'][0];\n $fecha2 = $GLOBALS['S'][1];\n $fecha3 = $GLOBALS['S'][2];\n $fecha4 = $GLOBALS['S'][3];\n break;\n case 20:\n $fecha1 = $GLOBALS['T'][0];\n $fecha2 = $GLOBALS['T'][1];\n $fecha3 = $GLOBALS['T'][2];\n $fecha4 = $GLOBALS['T'][3];\n break;\n case 21:\n $fecha1 = $GLOBALS['U'][0];\n $fecha2 = $GLOBALS['U'][1];\n $fecha3 = $GLOBALS['U'][2];\n $fecha4 = $GLOBALS['U'][3];\n break;\n case 22:\n $fecha1 = $GLOBALS['V'][0];\n $fecha2 = $GLOBALS['V'][1];\n $fecha3 = $GLOBALS['V'][2];\n $fecha4 = $GLOBALS['V'][3];\n break;\n case 23:\n $fecha1 = $GLOBALS['W'][0];\n $fecha2 = $GLOBALS['W'][1];\n $fecha3 = $GLOBALS['W'][2];\n $fecha4 = $GLOBALS['W'][3];\n break;\n case 24:\n $fecha1 = $GLOBALS['X'][0];\n $fecha2 = $GLOBALS['X'][1];\n $fecha3 = $GLOBALS['X'][2];\n $fecha4 = $GLOBALS['X'][3];\n break;\n }\n\n return $fecha1.\",\".$fecha2.\",\".$fecha3.\",\".$fecha4;\n}", "title": "" } ]
[ { "docid": "8d59b4c4ce2f9da7d0a8386bdb44c4d9", "score": "0.6173105", "text": "public function periods();", "title": "" }, { "docid": "d3908cde128d283f42ff301b4830c420", "score": "0.5928828", "text": "public function getPeriod() {}", "title": "" }, { "docid": "d3685eb9c7cea0cecd3e67625c882db3", "score": "0.58894837", "text": "public function getPeriod();", "title": "" }, { "docid": "b37e0deacebcf0f6a21ec737a1878034", "score": "0.579499", "text": "function paggingInfo($obj)\n{\n return [\n 'start' => (($obj->currentPage()-1) * $obj->perPage() + 1),\n 'end' => (($obj->currentPage()*$obj->perPage()) > $obj->total() ? $obj->total() : ($obj->currentPage()*$obj->perPage())),\n 'total' => $obj->total()\n ];\n}", "title": "" }, { "docid": "43228fb124534a2671358436c56bf57c", "score": "0.57888734", "text": "function piePagina($usuario){\n\t\t$pie = '<table width=\"100%\" style=\"font-size: 10px; font-weight: bold;\">\n\t\t <tr>\n\t\t <td width=\"40%\">Generada por: '.$usuario.'</td>\n\t\t <td width=\"40%\">Fecha y hora creación: {DATE j/m/Y - h:i A}</td>\n\t\t <td width=\"20%\" align=\"right\">{PAGENO} de {nbpg} páginas</td>\n\t\t </tr>\n\t\t\t</table>';\n\n\t\treturn $pie;\n }", "title": "" }, { "docid": "675c4c4478b4f4b623b4248f51ede477", "score": "0.5746423", "text": "public function PeriodoPaqueteTest()\n\n {\n $fechaInicio='2019-08-17';\n $intervalo='P7D';\n $fechaFinal='2019-08-25';\n \n $response=$this->\n json('GET',\n '/api/periodopaquete/'.$fechaInicio.'/'.$fechaFinal);\n $response->assertStatus(200);//Si hay respuesta\n $response->assertJson(['r'=>20]);\n \n $this->assertTrue(true);\n\n }", "title": "" }, { "docid": "2503593e036b49c9c5935cad181f4c19", "score": "0.5693168", "text": "private function stats_by_period($total, $year, $month, $day)\n {\n $returned = array();\n $delta = 0;\n\n $sql = \" count(id) as NbPages, count(distinct IP) as NbIP,\n count(image_id) as NbImg, count(distinct category_id) as NbCat \";\n $sql_nfomax = \", MaxPages, MaxIP, MaxImg\";\n $sql_from = \" from \".HISTORY_TABLE.\" \";\n $sql_where = \"\";\n $sql_order = \"\";\n $sql_select = \"\";\n $sql_group = \"\";\n $sql_groupdef=\"\";\n\n if($day!=\"\")\n {\n $sql_groupdef=\"HOUR(time) as GId,\";\n $sql_select=\"select HOUR(time) as GId, \";\n $sql_where=\" where YEAR(date) = $year and MONTH(date) = $month and DAY(date) = $day \";\n $sql_group=\" group by GId \";\n $sql_order=\" order by GId asc\";\n\n for($i=0;$i<24;$i++)\n {\n $returned[$i] = array(\n \"GId\" => $i,\n \"NbPages\" => 0,\n \"NbIP\" => 0,\n \"NbImg\" => 0,\n \"NbCat\"=>0,\n \"MaxPages\" => 0,\n \"MaxIP\" => 0,\n \"MaxImg\" => 0\n );\n }\n }\n elseif($month!=\"\")\n {\n $sql_groupdef=\"DAY(date) as GId,\";\n $sql_select=\"select DAY(date) as GId, \";\n $sql_where=\" where YEAR(date) = $year and MONTH(date) = $month \";\n $sql_group=\" group by GId \";\n $sql_order=\" order by GId asc\";\n\n $delta = 1;\n $NbDays = strftime('%d', mktime(0,0,0,$month+1,0,$year));\n for($i=0;$i<$NbDays;$i++)\n {\n $returned[$i] = array(\n \"GId\" => $i+1,\n \"NbPages\" => 0,\n \"NbIP\" => 0,\n \"NbImg\" => 0,\n \"NbCat\"=>0,\n \"MaxPages\" => 0,\n \"MaxIP\" => 0,\n \"MaxImg\" => 0\n );\n }\n }\n elseif($year!=\"\")\n {\n $sql_groupdef=\"MONTH(date) as GId,\";\n $sql_select=\"select MONTH(date) as GId, \";\n $sql_where=\" where YEAR(date) = $year \";\n $sql_group=\" group by GId \";\n $sql_order=\" order by GId asc \";\n\n $delta = 1;\n for($i=0;$i<12;$i++)\n {\n $returned[$i] = array(\n \"GId\" => $i+1,\n \"NbPages\" => 0,\n \"NbIP\" => 0,\n \"NbImg\" => 0,\n \"NbCat\"=>0,\n \"MaxPages\" => 0,\n \"MaxIP\" => 0,\n \"MaxImg\" => 0\n );\n }\n }\n elseif($total!=\"Y\")\n {\n $sql_groupdef=\"YEAR(date) as GId,\";\n $sql_select=\"select YEAR(date) as GId, \";\n $sql_group=\" group by GId \";\n $sql_order=\" order by GId desc\";\n }\n else\n {\n $sql_select=\"select 'Tout' as GId, \"; $sql_nfomax=\", 0 as MaxPages, 0 as MaxIP, 0 as MaxImg\";\n }\n\n if($this->catfilter!=\"\")\n {\n $catfilter=$this->make_where_clause($this->catfilter);\n ($sql_where==\"\")?$sql_where=\" where \":$sql_where.=\" and \";\n $sql_where.=\" category_id IN (\".$catfilter.\")\";\n }\n\n if(($this->config['AStat_UseBlackList']!=\"false\")&&($this->config['AStat_BlackListedIP']!=\"\"))\n {\n ($sql_where==\"\")?$sql_where=\" where \":$sql_where.=\" AND \";\n ($this->config['AStat_UseBlackList']==\"true\")?$sql_where .= \" NOT \":\"\";\n $sql_where .= $this->make_IP_where_clause($this->config['AStat_BlackListedIP']);\n }\n\n $sql_max=\", (select max(n.MaxPages) as MaxPages, max(n.MaxIP) as MaxIP, max(n.MaxImg) as MaxImg\n from (select \".$sql_groupdef.\" count(id) as MaxPages, count(distinct IP) as MaxIP, count(image_id) as MaxImg\n from \".HISTORY_TABLE.$sql_where.$sql_group.\") as n) as n \";\n $sql=$sql_select.$sql.$sql_nfomax.$sql_from.$sql_max.$sql_where.$sql_group.$sql_order;\n\n $result = pwg_query($sql);\n\n $i=0;\n while ($row = pwg_db_fetch_assoc($result))\n {\n if($year.$month.$day==\"\")\n { $returned[$i] = $row; $i++; }\n else\n { $returned[$row[\"GId\"]-$delta] = $row; }\n }\n\n return($returned);\n }", "title": "" }, { "docid": "4ea52b690a07532bf3b6eb4b89d3035e", "score": "0.5600376", "text": "function paginar($actual, $total, $por_pagina, $enlace) {\n\n\t$ListaPaginas = \"\";\n\t$sBoostrap =\"\";\n\n\tif ( $por_pagina ==0 )\t$por_pagina=1;\n\n\tif ( $actual == 0 )\t$actual =1;\n\n\t$total_paginas = ceil($total/$por_pagina) +1;\n\n if ($total_paginas > 2)\n\t{\n\n\t$LimiteInferior = 3;\n\t$LimiteSuperior = $total_paginas - 2;\n\t//$Tama�oVentana = 5;\n\n\t$InicioVentana = $actual - 2 ;\n\t$FinVentana = $actual + 3 ;\n\n\t$sTextoSeparadorIzquierda =\"<li><a> ... </a> </li>\" ;\n\t$sTextoSeparadorDerecha =\"<li><a> ... </a> </li>\" ;\n\n\tif ($InicioVentana <= $LimiteInferior)\n\t{\n\t $InicioVentana = $LimiteInferior;\n\t // $FinVentana = $LimiteInferior + $Tama�oVentana;\n\t $sTextoSeparadorIzquierda =\"\";\n\t}\n\n\tif ($FinVentana >= $LimiteSuperior)\n\t{\n\t $FinVentana = $LimiteSuperior ;\n\t //$InicioVentana = $actual -3 ;\n\t $sTextoSeparadorDerecha =\"\";\n\t}\n\n\n\n\t // Siempre vana estar visibles las priemras dos opciones\n\tfor ($i=1; $i<$LimiteInferior; $i++)\n\t $ListaPaginas .= $this->generaBotonPaginacion($i,$i,$i==$actual? true: false);\n\n\t$ListaPaginas .= $sTextoSeparadorIzquierda;\n\n\t /* Desplegamos la ventana de tama�o 5, amenos que los limites,\n\t esten en esten detro del mminimo o del maximos, en ese caso\n\t yase calcularon y despleiga */\n\tfor ($i=$InicioVentana; $i<$FinVentana; $i++)\n\t $ListaPaginas .= $this->generaBotonPaginacion($i,$i,$i==$actual? true: false);\n\n\t$ListaPaginas .= $sTextoSeparadorDerecha;\n\n\t// Siempre estaran visibles almenos las ultimas dos opciones\n\tfor ($i= $LimiteSuperior; $i<$total_paginas; $i++)\n\t $ListaPaginas .= $this->generaBotonPaginacion($i,$i,$i==$actual? true: false);\n\n\t $sBoostrap.=\"<ul class=\".chr(34).\"pagination\".chr(34).\">\";\n\n $sBoostrap.= $this->generaBotonPaginacion(\"1\",\"Inicio\");\n $sBoostrap.= $ListaPaginas ;\n $sBoostrap.= $this->generaBotonPaginacion(--$total_paginas,\"Fin\");\n\n $sBoostrap.=\"</ul>\";\n\n\t}else\n\t{\n\t $total_paginas=2;\n\t$sBoostrap.=\"<ul class=\".chr(34).\"pagination\".chr(34).\">\";\n\t $sBoostrap.= $this->generaBotonPaginacion(\"1\",\"1\");\n\t$sBoostrap.=\"</ul>\";\n\t}\n\n\n\n\n\treturn $sBoostrap;\n}", "title": "" }, { "docid": "dbc83df97e7f3e41e45c21a6c1e610a2", "score": "0.55979633", "text": "private function getPagesForADay()\n {\n $this->runTest(\n 'Test 31. Get page viewes for a day',\n 'SELECT analytic.period, SUM(analytic_pages.view_count) as view_count\n FROM analytic_data analytic,\n analytic_page analytic_pages\n WHERE analytic.id = analytic_pages.analytic_id\n AND analytic.period >= \"2012-10-21 00:00\"\n AND analytic.period < \"2012-10-22 00:00\"\n GROUP BY analytic.period\n LIMIT 100'\n );\n }", "title": "" }, { "docid": "242f37d22c88caf381cf47cf557a2c61", "score": "0.55824274", "text": "static public function ctrPagosPendientes(){\n\n\n\t\t\t$respuesta = ModeloPagos::mdlPagosPendientes(\"pagos\");\n\n\t\t\treturn $respuesta;\n\n\n\t}", "title": "" }, { "docid": "610cb04cdac181bf386dab4e36894f73", "score": "0.55586916", "text": "private function getPagesForAWeek()\n {\n $this->runTest(\n 'Test 32. Get page viewes for a week',\n 'SELECT analytic.period, SUM(analytic_pages.view_count) as view_count\n FROM analytic_data analytic,\n analytic_page analytic_pages\n WHERE analytic.id = analytic_pages.analytic_id\n AND analytic.period >= \"2012-10-21 00:00\"\n AND analytic.period < \"2012-10-28 00:00\"\n GROUP BY analytic.period\n LIMIT 100'\n );\n }", "title": "" }, { "docid": "7e3f7b12c57b28b925f6689644104272", "score": "0.5523617", "text": "public function buscarPorPeriodo($data){\r\n if(isset($data) && $data != ''){\r\n $inicio = explode('/', substr($data,0,10));\r\n $fim = explode('/', substr($data,13,10));\r\n $inicioData = $inicio[2]. '-'. $inicio[1]. '-'. $inicio[0]. ' 00:00:00';\r\n $fimData = $fim[2]. '-'. $fim[1]. '-'. $fim[0]. ' 23:59:59'; \r\n return array($inicioData, $fimData);\r\n }else{\r\n $aux = mktime (0, 0, 0, date(\"m\"), date(\"d\")-3, date(\"Y\"));\r\n $fimData = date('Y-m-d');\r\n $inicioData = date('Y-m-d', $aux);\r\n \r\n return array($inicioData, $fimData);\r\n }\r\n }", "title": "" }, { "docid": "4607c6f4d7b307dbe2254e533f6e4141", "score": "0.5482735", "text": "public function perimetre()\n {\n // section -64--88-56-1--4a651011:16d84887350:-8000:0000000000000978 begin\n // section -64--88-56-1--4a651011:16d84887350:-8000:0000000000000978 end\n }", "title": "" }, { "docid": "ebc7e2bb68497386aee9faf6c47686f3", "score": "0.5479499", "text": "function pagination(){\n $s=\"SELECT COUNT(*) AS RecordCount FROM TAB_AYUDAS_MAESTRO\";\n $q=oci_parse($this->db, $s);\n oci_execute($q);\n while ( $r = oci_fetch_array($q, OCI_NUM) ){\n $totalRegistros=$r[0];\n }\n\n $noPaginas = $totalRegistros/$this->noRegistros;\n for($i=1; $i<$noPaginas+1; $i++) {\n if($i == 1){\n\n echo \"<input type='submit' class='btn btn-outline-info disabled' value='{$i}' name='pagina'>\"; //A la página actual no le pongo link\n\n }else{\n echo \"<input type='submit' class='btn btn-outline-info' value='{$i}' name='pagina'>&nbsp;\";\n }\n }\n }", "title": "" }, { "docid": "daa310838aa42ab2f3f0f375e2b0dd56", "score": "0.5464568", "text": "public function getPaginationArray()\n {\n $pages = [];\n\n /* Lien page précédente */\n if ($this->prevHtml && $this->currentPage > 1) {\n $pages[] = [\n 'text' => $this->prevHtml,\n 'num' => $this->currentPage - 1,\n 'current' => false,\n 'link' => true,\n ];\n }\n\n /* Lien des pages numérotées */\n for ($i = 1; $i <= $this->nbPages; $i++) {\n //Si il s'agit de la page actuelle\n if ($i == $this->currentPage) {\n $pages[] = [\n 'text' => $i,\n 'num' => $i,\n 'current' => true,\n 'link' => false,\n ];\n } else {\n /* Si première page\n * ou dernière page\n * ou toutes les pages à afficher\n */\n if ($i == 1\n || $i == $this->nbPages\n || $this->delta < 0\n || $i < $this->currentPage\n && ($i + $this->delta) >= $this->currentPage\n || $i > $this->currentPage\n && ($i - $this->delta) <= $this->currentPage\n ) {\n $pages[] = [\n 'text' => $i,\n 'num' => $i,\n 'current' => false,\n 'link' => true,\n ];\n } elseif ($i < $this->currentPage\n && ($i + $this->delta + 1) == $this->currentPage\n || $i > $this->currentPage\n && ($i - $this->delta - 1) == $this->currentPage\n ) {\n $pages[] = [\n 'text' => $this->deltaHtml,\n 'num' => $this->deltaHtml,\n 'current' => false,\n 'link' => false,\n ];\n }\n }\n }\n\n /* Lien page suivante*/\n if ($this->nextHtml && $this->currentPage < $this->nbPages) {\n $pages[] = [\n 'text' => $this->nextHtml,\n 'num' => $this->currentPage + 1,\n 'current' => false,\n 'link' => true,\n ];\n }\n\n return $pages;\n }", "title": "" }, { "docid": "50b4f79b1abad068ffbf10de4c129dd4", "score": "0.5449659", "text": "public function getPaginas() {\n // pega a quantidade de paginas\n $pround = intval($this->lin / $this->num);\n $paginas = ($this->lin / $this->num);\n $dec = 0;\n\n // verifica as paginas\n if ($pround == 0) { $paginas = 1; }\n else\n {\n // pega o decimal\n if (strlen($pround) == 1) { $dec = substr($paginas,2,2); }\n elseif (strlen($pround) == 2) { $dec = substr($paginas,3,2); }\n elseif (strlen($pround) == 3) { $dec = substr($paginas,4,2); }\n\n // verifica o decimal\n if (intval($dec) > 0) { $paginas = $pround + 1; }\n }\n\n // retorna as paginas\n return intval($paginas);\n }", "title": "" }, { "docid": "9fa2d268ac6da6da7b26ee344d6516f0", "score": "0.5424315", "text": "public function Fianza_Get_Fianzas_PeriodoPago() {\n\n\t\t$result = $this->catalogos_vincularfianza_module->catalogos_vincularfianza_get_autocomplet_periodopago($this->input->get('query'),$this->input->get('table'));\n\n\t\techo json_encode($result);\t\t\t\t\n\t\t\t\t\t\n\t\t\n\t}", "title": "" }, { "docid": "4ed62bf3ce8400308e05f203662c7d1a", "score": "0.54159653", "text": "function diasUteisPeriodo($dataInicial, $dataFinal, $apenasPerido = false)\n {\n $feriados = \\Config::get('core.feriados');\n\n $inicio = DateTime::createFromFormat('d/m/Y', $dataInicial);\n $final = DateTime::createFromFormat('d/m/Y', $dataFinal);\n\n $diasTotal = $final->diff($inicio)->days + 1;\n $period = new DatePeriod($inicio, new DateInterval('P1D'), $final);\n\n $diasMes = [];\n foreach ($period as $datePeriod) {\n if (in_array($datePeriod->format('d/m'), $feriados)) {\n $diasTotal--;\n } elseif (in_array($datePeriod->format('w'), ['0', '6'])) {\n $diasTotal--;\n } elseif ($apenasPerido == false) {\n if (array_key_exists($datePeriod->format('n'), $diasMes)) {\n $diasMes[$datePeriod->format('n')]++;\n } else {\n $diasMes[$datePeriod->format('n')] = 1;\n }\n }\n }\n\n if ($apenasPerido) {\n return $diasTotal;\n } else {\n return ['total' => $diasTotal, 'mes' => $diasMes];\n }\n }", "title": "" }, { "docid": "b544cabddac67006ff0a3ec7bc56e44a", "score": "0.541543", "text": "public function perPage(): int;", "title": "" }, { "docid": "1100d59e59089cecd44741e8292ae8dd", "score": "0.53951913", "text": "function page_gen() {// define function page_gen\nif (!isset($this->round_to)) {\n$this->round_to = 4;// set precicion like 12,300.2\n}\n}", "title": "" }, { "docid": "86e417d5f696b61516687bc1a8fcbf7d", "score": "0.5329418", "text": "function pagechart()\n\t{\n\t\t\n\t\t$this->set('fbpage',$this->Session->read('fbpage'));\n\t\t$this->set('dt',$this->Session->read('dt'));\n\t}", "title": "" }, { "docid": "c1ed1772534c569158b69535ca4d7e4f", "score": "0.53266156", "text": "public function reporte_periodo()\n {\n $legal = DB::table('safyc')\n ->join('deudas', 'deudas.id', '=', 'safyc.deuda_id')\n ->leftJoin(\n 'jurisdicciones',\n 'jurisdicciones.id',\n '=',\n 'safyc.jurisdiccion_id'\n )\n ->select(\n DB::raw(\n 'nombre as jurisdiccion, periodo, count(*) as cant_pagos, total, (total - sum(monto)) as pendiente, sum(monto) as pagado'\n )\n )\n ->where('periodo = 01/2017')\n ->groupBy('nombre', 'periodo', 'total')\n // ->orderBy('safyc.deuda_id', 'asc')\n ->simplePaginate(1000);\n\n return $legal;\n }", "title": "" }, { "docid": "59a47a81c995aaf80bc8988119b3afa1", "score": "0.5325331", "text": "function generaLimitesPagina($pagina, $tamano )\n{\n if( $pagina-1 > 0) { $inicio = ($pagina-1)*$tamano; } else { $inicio = 0; }\n $limitesPagina=\" \".$inicio.\",\".$tamano;\n\n return $limitesPagina;\n\n}", "title": "" }, { "docid": "994fbb4df72b09cc20ff85802206cad3", "score": "0.5304082", "text": "function pagarPedido(){\n }", "title": "" }, { "docid": "a2fc78c7ff03b6a1ee33b6e9899fe8b2", "score": "0.5281672", "text": "function periods() {\n\t\treturn $this->periods;\n\t}", "title": "" }, { "docid": "6105383f86122b651bf3940b4475d9b6", "score": "0.52809703", "text": "public function getExpirationPeriod(): int;", "title": "" }, { "docid": "ef4b8d9d305a9aa650616a6176b7e064", "score": "0.52734506", "text": "function getPeriodo(){\n\t\tif(setNoMenorQueCero($this->mPeriodoActivo) <= 0 AND $this->isPagable() == true){\n\t\t\t$sql\t\t\t\t\t= \"SELECT MAX(periodo_socio) AS 'parcialidad' FROM operaciones_mvtos WHERE recibo_afectado=\" . $this->mCodigoDeRecibo;\n\t\t\t$this->mPeriodoActivo\t= mifila($sql, \"parcialidad\");\n\t\t}\n\t\treturn $this->mPeriodoActivo;\n\t}", "title": "" }, { "docid": "0e1bb4b9ac41788db38107f4e6e4ee44", "score": "0.5271476", "text": "public function getDiasEnProduccion()\n {\n # code...\n $fechaPago = new Carbon($this->fechaInicioProduccion);\n $fechaTerminado = new Carbon($this->fechaTerminado);\n //le sumo uno porque si la diferencia es 0 significa que se hizo todo en el mismo dia\n return $fechaPago->diffInDays($fechaTerminado) + 1;\n }", "title": "" }, { "docid": "92687d1e677d130e0e3d164db14a9ebf", "score": "0.5260217", "text": "public function get_page_permastruct()\n {\n }", "title": "" }, { "docid": "804ed8bf9f5d029d28cc58f7ae111c3c", "score": "0.5260174", "text": "function pagination($tableau,$nbr_premier_par_page){\n\n $taille=taille_tableau($tableau);\n $nbr_page=ceil($taille / $nbr_premier_par_page);\n for ($i=0; $i < $nbr_page ; $i++) { \n $p=$i+1;\n echo\"<a href='exercice1.php?p=$p'>page $p </a>\";\n \n }\n $ligne_debut=0;\n $ligne_fin=10;\n\n $url_num_page=$_SERVER[\"HTTP_SEC_FETCH_USER\"];\n $page=$url_num_page[1];\n echo \"<br>******\".$page.\"******<br>\";\n echo '<table border=\"2\">';\n for ($ligne=$ligne_debut; $ligne < $ligne_fin; $ligne++) {\n $colonne_debut=0;\n $colonne_fin=10;\n echo '<tr border=\"2\">';\n for ($colonne=$colonne_debut; $colonne < $colonne_fin ; $colonne++) { \n $k=$ligne*$colonne+$page*($nbr_premier_par_page);\n echo '<td border=\"2\">'.$tableau[$k].'</td>';\n }\n echo'</tr>';\n }\n echo '<table>';\n }", "title": "" }, { "docid": "8f516668135b68f8a5babf6218a35e33", "score": "0.5255277", "text": "function paginacionTutorDelPadre($idPadre, $tipo) {\n\n $hijos = hijosDePadre($idPadre);\n $arrIds = array();\n// foreach ($hijos as $idH) {\n// array_push($arrIds, $idH->idpersonales);\n// }\n// //llenamos los hijos\n foreach ($hijos as $idH) {\n if (!in_array($idH->idpersonales, $arrIds) && $idH->idpersonales != \"\") {\n array_push($arrIds, $idH->idpersonales);\n //llenamos los tutores\n $arrTutores = tutoresDeAlumno($idH->id);\n foreach ($arrTutores as $t){\n if(!in_array($t, $arrIds) && $t!=\"\"){\n array_push($arrIds, $t);\n }\n }\n }\n }\n //array_push de los tutores tambien\n if ($tipo == \"recibidos\") {\n for ($i = 1; $i <= cantidadPaginas($arrIds, obtenerIdDatosPersonales(), 10); $i++) {\n// echo 'aaa';\n echo \"<a href='mensaje_revisar.php?tipo=recibidos&pagina=$i'>$i</a> \";\n }\n } else {\n for ($i = 1; $i <= cantidadPaginas(obtenerIdDatosPersonales(), $arrIds, 10); $i++) {\n echo \"<a href='mensaje_revisar.php?tipo=enviados&pagina=$i'>$i</a> \";\n }\n }\n}", "title": "" }, { "docid": "c5fd33562f19eff34b5946ca2cbacd4d", "score": "0.52519387", "text": "function megatron_pager($variables) {\n $output = \"\";\n $tags = $variables['tags'];\n $element = $variables['element'];\n $parameters = $variables['parameters'];\n $quantity = $variables['quantity'];\n global $pager_page_array, $pager_total;\n\n // Calculate various markers within this pager piece:\n // Middle is used to \"center\" pages around the current page.\n $pager_middle = ceil($quantity / 2);\n // current is the page we are currently paged to\n $pager_current = $pager_page_array[$element] + 1;\n // first is the first page listed by this pager piece (re quantity)\n $pager_first = $pager_current - $pager_middle + 1;\n // last is the last page listed by this pager piece (re quantity)\n $pager_last = $pager_current + $quantity - $pager_middle;\n // max is the maximum page number\n $pager_max = $pager_total[$element];\n // End of marker calculations.\n\n // Prepare for generation loop.\n $i = $pager_first;\n if ($pager_last > $pager_max) {\n // Adjust \"center\" if at end of query.\n $i = $i + ($pager_max - $pager_last);\n $pager_last = $pager_max;\n }\n if ($i <= 0) {\n // Adjust \"center\" if at start of query.\n $pager_last = $pager_last + (1 - $i);\n $i = 1;\n }\n\n // End of generation loop preparation.\n $li_first = theme('pager_first', array('text' => (isset($tags[0]) ? $tags[0] : t('first')), 'element' => $element, 'parameters' => $parameters));\n $li_previous = theme('pager_previous', array('text' => (isset($tags[1]) ? $tags[1] : t('previous')), 'element' => $element, 'interval' => 1, 'parameters' => $parameters));\n $li_next = theme('pager_next', array('text' => (isset($tags[3]) ? $tags[3] : t('next')), 'element' => $element, 'interval' => 1, 'parameters' => $parameters));\n $li_last = theme('pager_last', array('text' => (isset($tags[4]) ? $tags[4] : t('last')), 'element' => $element, 'parameters' => $parameters));\n\n if ($pager_total[$element] > 1) {\n /*\n if ($li_first) {\n $items[] = array(\n 'class' => array('pager-first'),\n 'data' => $li_first,\n );\n }\n */\n if ($li_previous) {\n $items[] = array(\n 'class' => array('prev'),\n 'data' => $li_previous,\n );\n }\n\n // When there is more than one page, create the pager list.\n if ($i != $pager_max) {\n if ($i > 1) {\n $items[] = array(\n 'class' => array('pager-ellipsis'),\n 'data' => '…',\n );\n }\n // Now generate the actual pager piece.\n for (; $i <= $pager_last && $i <= $pager_max; $i++) {\n if ($i < $pager_current) {\n $items[] = array(\n // 'class' => array('pager-item'),\n 'data' => theme('pager_previous', array('text' => $i, 'element' => $element, 'interval' => ($pager_current - $i), 'parameters' => $parameters)),\n );\n }\n if ($i == $pager_current) {\n $items[] = array(\n 'class' => array('active'), // Add the active class\n 'data' => l($i, '#', array('fragment' => '', 'external' => TRUE)),\n );\n }\n if ($i > $pager_current) {\n $items[] = array(\n //'class' => array('pager-item'),\n 'data' => theme('pager_next', array('text' => $i, 'element' => $element, 'interval' => ($i - $pager_current), 'parameters' => $parameters)),\n );\n }\n }\n if ($i < $pager_max) {\n $items[] = array(\n 'class' => array('pager-ellipsis'),\n 'data' => '…',\n );\n }\n }\n // End generation.\n if ($li_next) {\n $items[] = array(\n 'class' => array('next'),\n 'data' => $li_next,\n );\n }\n /*\n if ($li_last) {\n $items[] = array(\n 'class' => array('pager-last'),\n 'data' => $li_last,\n );\n }\n */\n\n return '<div class=\"pagination\">'. theme('item_list', array(\n 'items' => $items,\n //'attributes' => array('class' => array('pager')),\n )) . '</div>';\n }\n\n return $output;\n}", "title": "" }, { "docid": "6a5422a0a9fa902a94bbc2b7313c467f", "score": "0.52481914", "text": "private function getPagesForAMonth()\n {\n $this->runTest(\n 'Test 33. Get page viewes for a month',\n 'SELECT analytic.period, SUM(analytic_pages.view_count) as view_count\n FROM analytic_data analytic,\n analytic_page analytic_pages\n WHERE analytic.id = analytic_pages.analytic_id\n AND analytic.period >= \"2012-10-21 00:00\"\n AND analytic.period < \"2012-11-21 00:00\"\n GROUP BY analytic.period\n LIMIT 100'\n );\n }", "title": "" }, { "docid": "1c498baa6413dcbdbf821273d8adaad5", "score": "0.5247737", "text": "public function devolverUltimoPago();", "title": "" }, { "docid": "ce4e80b9aff1f024e251898beedc6ce0", "score": "0.52316713", "text": "public function get_pagenum()\n {\n }", "title": "" }, { "docid": "3380d3090d478f4291cf8c2e3014bce5", "score": "0.5220646", "text": "function fechaDiasAtras ($dias = 10) {\r\n\t$segundos = $dias * 24 * 60 * 60;\r\n return date (\"Y-m-d\", time() - $segundos);\r\n\r\n}", "title": "" }, { "docid": "b143c399772dd7d703da26be079af45f", "score": "0.52200925", "text": "private function get_nb_page() {\n global $DB;\n $data = array ();\n\n $maxpage = $this->get_max_page();\n if ($maxpage == -1) {\n return $data;\n }\n\n $now = new DateTime ( \"now\", core_date::get_user_timezone_object () );\n $req = \"select timecreated, navigation, page from {pastel_slide} where course = ? and activity = ?\";\n $rs = $DB->get_recordset_sql ( $req, array ($this->courseid, $this->activityid));\n\n foreach ($rs as $result) {\n $numpagequit = $result->page;\n $numpagearriv = $numpagequit + 1;\n if (strcmp($result->navigation, \"forward\") !== 0 ) {\n $numpagearriv = $numpagequit - 1;\n }\n if ($numpagearriv > $maxpage || $numpagearriv < 1) {\n continue;\n }\n if (isset ($data[$numpagequit])) {\n $tabtemps = $data[$numpagequit];\n $count = count($tabtemps);\n $tabtemps[$count - 1]->fin = $result->timecreated;\n } else {\n $temps = new stdClass ();\n $temps->debut = null;\n $temps->fin = $result->timecreated;\n $tabtemps = array();\n $tabtemps[] = $temps;\n $data[$numpagequit] = $tabtemps;\n }\n\n $temps = new stdClass ();\n $temps->debut = $result->timecreated + 1;\n if ($numpagearriv == $maxpage) {\n $temps->fin = $now;\n } else {\n $temps->fin = null;\n }\n\n if (isset ($data[$numpagearriv])) {\n $data[$numpagearriv][] = $temps;\n } else {\n $tabtemps = array();\n $tabtemps[] = $temps;\n $data[$numpagearriv] = $tabtemps;\n }\n }\n // Purge.\n foreach ($data as $key => $val) {\n $tempspage = $data[$key];\n foreach ($tempspage as $ind => $plage) {\n if (!isset($plage->fin)) {\n unset ($tempspage[$ind]);\n continue;\n }\n if (!isset($plage->debut)) {\n unset ($tempspage[$ind]);\n } else if (isset($plage->fin) && $plage->debut > $plage->fin ) {\n unset ($tempspage[$ind]);\n }\n }\n if (count($tempspage) == 0) {\n unset($data[$key]);\n }\n }\n\n return $data;\n }", "title": "" }, { "docid": "e0b6040753bacac7402451d7d99fe207", "score": "0.52185947", "text": "function Pagamento($campos){\n\t\t\t\n\t\t\tglobal $vkt_id;\n\t\t\t\t\t\n\t\t\t \n\t\t\t\t\t\t\t\n\t\t\t$config = mysql_fetch_object(mysql_query(\" SELECT * FROM estoque_config WHERE vkt_id = '$vkt_id' \"));\t\n\t\t\t\n\t\t\t/*Informações da Conta */\n\t\t\t$contaID = $config->conta_id;\n\t\t\t$centroCustoID = $config->centro_custo_id;\n\t\t\t$plContaID = $config->plano_conta_id;\n\t\t\t\n\t\t\t/*Informações da parcela*/\n\t\t\t$valorParcela = $campos['valor_parcela'];\n\t\t\t$desParcela = $campos['descricao_parcela'];\n\t\t\t$dataVencimento = $campos['data_vencimento_parcela'];\n\t\t\t$forma_pagamento_parcela = $campos['forma_pagamento_parcela']; // recebe a forma de pagamento de cada parcela\n\t\t\t$campos['data_aprovacao'] = date('Y-m-d');\n\t\t\t\n\t\t\t$efetivar_movimentacao = $campos[\"efetivar_movimentacao\"];\n\t\t\t\n\t\t\t\n\t\t\t$aMes = date('Y/m');\n\t\t\t\n\t\t\t\n\t\t\t//echo \"<div id='conteudo'>aqui esta a afuncao</div>\";\n\t\t\t\tfor($i=0;$i < sizeof($valorParcela);$i++){\n\t\t\t\t\t\n\t\t\t\t\t$status = 0;\n\t\t\t\t\t$dtd_info_movimento = \"\";\n\t\t\t\t\tif($efetivar_movimentacao[$i] == 1){\n\t\t\t\t\t\t$status = 1;\n\t\t\t\t\t\t$dtd_info_movimento = \"data_info_movimento=now(),\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$sql = \" INSERT INTO financeiro_movimento \n\t\t\t\t\t\tSET\n\t\t\t\t\t\t\tcliente_id = '$vkt_id',\n\t\t\t\t\t\t\tconta_id\t\t = '$contaID',\n\t\t\t\t\t\t\tinternauta_id\t = '\".$campos['cliente_id'].\"',\n\t\t\t\t\t\t\tdata_registro = '\".($campos['data_aprovacao']).\"',\n\t\t\t\t\t\t\tdata_vencimento\t = '\".dataBrToUsa($dataVencimento[$i]).\"',\n\t\t\t\t\t\t\tano_mes_referencia = '$aMes',\n\t\t\t\t\t\t\tdescricao\t\t = '\".$desParcela[$i].\"',\n\t\t\t\t\t\t\tdoc\t\t\t\t = '\".$campos['id'].\"',\n\t\t\t\t\t\t\tforma_pagamento = '\".$forma_pagamento_parcela[$i].\"',\n\t\t\t\t\t\t\tvalor_cadastro = '\".moedaBRToUsa($valorParcela[$i]).\"',\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$dtd_info_movimento\n\t\t\t\t\t\t\ttipo = 'receber',\n\t\t\t\t\t\t\tstatus = '$status' ,\n\t\t\t\t\t\t\torigem_id = '\".$campos['id'].\"',\n\t\t\t\t\t\t\torigem_tipo = 'venda' \n\t\t\t\t\t\t\";\n\t\t\t\t\t\t//echo $sql.\" \".mysql_error();\n\t\t\t\t\t\tmysql_query($sql);\n\t\t\t\t\t\t$movID = mysql_insert_id();\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*- SQL PARA TABELA financeiro_centro_has_movimento -*/\n\t\t\t\t\t\t$sqlCentroAsMov = \" INSERT INTO financeiro_centro_has_movimento\n\t\t\t\t\t\t\t\t\t\t\t\tSET\n\t\t\t\t\t\t\t\t\t\t\t\t\tmovimento_id = '$movID',\n\t\t\t\t\t\t\t\t\t\t\t\t\tplano_id = '$centroCustoID',\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalor = '\".moedaBRToUsa($valorParcela[$i]).\"'\";\n\t\t\t\t\t\tmysql_query($sqlCentroAsMov); \n\t\t\t\t\t\t//echo $sqlCentroAsMov;\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*- SQL PARA A TABELA financeiro_plano_has_movimento -*/ \n\t\t\t\t\t\t $sqlPlanoAsMov = \" INSERT INTO financeiro_plano_has_movimento \n\t\t\t\t\t\t\t\t\t\t\t\tSET\n\t\t\t\t\t\t\t\t\t\t\t\t\tmovimento_id = '$movID',\n\t\t\t\t\t\t\t\t\t\t\t\t\tplano_id = '$plContaID',\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalor = '\".moedaBRToUsa($valorParcela[$i]).\"'\n\t\t\t\t\t\t\t\t\t\t\t\t\";\n\t\t\t\t\t\tmysql_query($sqlPlanoAsMov);\n\t\t\t\t\t\t//echo $sqlPlanoAsMov;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($efetivar_movimentacao[$i] == 1){\n\t\t\t\t\t\t\tmovimenta($vkt_id,$contaID,$movID,moedaBRToUsa($valorParcela[$i]),0,\"financeiro\");\n\t\t\t\t\t\t//movimenta($cliente_id,$conta_id,$movimento_id,$entrada,$saida,$tipo_movimento);\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t/* UPDATE VENDA */\n\t\tmysql_query(\" UPDATE estoque_vendas SET status = 'pago' WHERE id = '\".$campos['id'].\"' \");\n\t\t\n\t}", "title": "" }, { "docid": "d77c9eafe441f9af560914589c22268e", "score": "0.52038443", "text": "public function getUltimoPeriodo($tipoPeriodo){\n\n }", "title": "" }, { "docid": "347c32c08119376fd1be68a070a23f2a", "score": "0.5203504", "text": "public function calcularSueldo(){\n $this->horas_trabajadas * 540;\n }", "title": "" }, { "docid": "7e5435969f0f8a2ea9017f8f93d6dc78", "score": "0.5200833", "text": "function paginar($vp_total_items,\r\n\t\t\t\t $vp_tamanio_pagina,\r\n\t\t\t\t $vp_script_paginado,\r\n\t\t\t\t $vf_pag,\r\n\t\t\t\t $vp_imprimir_en){\r\n\t\t\t\t \t\r\n// salida -> \r\n/*\r\n <table>\r\n \t<tr>\r\n \t\t<td>\r\n \t\t < - 1 - 2 - 3 - 4 - 5 - 6 - >\r\n \t\t</td>\r\n \t</tr>\r\n </table>\r\n*/\r\n// funcion paginado. por Marcos A. Botta\r\n// $vp_total_items: cantidad total de items\r\n// $vp_tamanio_pagina: cantidad de items que muestra por página\r\n// $vp_script_paginado: que script lo llamó (además cual llamará nuevamente)\r\n// $vp_imprimir_en: en que lugar de la página se imprime, eso tiene que estar dentro del template\r\n////////////////////////////////////////// paginado //////////////////////////////////////////\r\n\t// armo tabla de paginado\r\n\t$vl_cantidad_paginas = ceil($vp_total_items/$vp_tamanio_pagina);\r\n\tif($vl_cantidad_paginas<=1){\r\n\t\t$vl_tabal_paginado=\"\";\r\n\t\t}\r\n\telse\r\n\t\t{\r\n\t\t$vl_tabla_paginado = \"<table with=\\\"100%\\\"><tr><td>\";\r\n\t\tif($vf_pag>1){// si es la primer página -> no muestro link a anterior\r\n\t\t\t$vl_ant = $vf_pag - 1;\r\n\t\t\t$vl_tabla_paginado =\"$vl_tabla_paginado <a href=\\\"$vp_script_paginado\".\"vf_pag=$vl_ant\\\"><</a>\";\r\n\t\t\t}\t\t\t\r\n\r\n\t\tfor($vl_cont=1; $vl_cont<=$vl_cantidad_paginas;$vl_cont++){\r\n\t\t\tif($vl_cont==$vf_pag){ // si el es la página actual -> no linkeo\r\n\t\t\t\t$vl_tabla_paginado = \"$vl_tabla_paginado <font color=#000000><b>$vl_cont</b></font>\";\r\n\t\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t$vl_tabla_paginado = \"$vl_tabla_paginado\r\n\t\t \t\t\t\t\t\t\t <a href=\\\"$vp_script_paginado\".\"vf_pag=$vl_cont\\\">$vl_cont</a>\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\tif($vf_pag<$vl_cantidad_paginas){ // si es la ultima página -> no muestro link a siguiente\r\n\t\t\t$vl_sig = $vf_pag + 1;\r\n\t\t\t$vl_tabla_paginado = \"$vl_tabla_paginado <a href=\\\"$vp_script_paginado\".\"vf_pag=$vl_sig\\\">></a>\";\r\n\t\t\t}\r\n\t\r\n\t\t$vl_tabla_paginado = \"$vl_tabla_paginado</td></tr></table>\"; // fin de la tabla paginado\r\n\t\t}\r\n\t\t\r\nset_var($vp_imprimir_en,$vl_tabla_paginado);\r\n}", "title": "" }, { "docid": "66a8bcfec968297ea6cf36b261a9bcdb", "score": "0.5191443", "text": "private function getRegistrationsPerDay()\n {\n $this->runTest(\n 'Test 2. Get registrations per day',\n 'SELECT analytic.period, COUNT(*)\n FROM analytic_data analytic,\n analytic_customer customer\n WHERE customer.analytic_id = analytic.id\n AND customer.is_registered = true\n AND analytic.period >= \"2012-01-21\"\n AND analytic.period < \"2012-01-22\"\n GROUP BY period\n ORDER BY period'\n );\n }", "title": "" }, { "docid": "3b3df2694a8f263ce47dc272074659f0", "score": "0.5191171", "text": "function pagina2 ($resul, $conta, $num, $que, $ord,$codigo,$fechai, $fechaf) {\n\n\techo \"<div class='noimpri' style='font-size:80%'><span class = 'verdeb'>Página</span>\";\n\t$pag = ceil($resul/$num);\n\t$pagactu = ceil($conta/$num);\n\n\t$i = $pagactu - 5;\n\n\tif ($i > 1) {echo \" <A HREF=?conta=1&ord=$ord&codigo=$codigo&aportespagos=2&accion=fechad&fechai=$fechai&fechaf=$fechaf><<</a> <a href='?conta=\".($conta-$num).\"&ord=$ord&codigo=$codigo&aportespagos=2&accion=fechad&fechai=$fechai&fechaf=$fechaf'><</a>\";}\n\n\n\twhile ($i < $pagactu) {\n\n\t\tif ($i > 0) {echo \" <a href=?conta=\".((($i-1)*$num)+1).\"&ord=$ord&codigo=$codigo&aportespagos=2&accion=fechad&fechai=$fechai&fechaf=$fechaf>$i</a>\";}\n\t\t$i++;\n\n\t}\n\n\t$i++;\n\n\techo \" [<span class = 'verdeb'>$pagactu</span>]\";\n\n\t$n = $pagactu + 7;\n\n\twhile ($i < $n) {\n\n\t\tif ($i <= $pag) {echo \" <a href=?conta=\".((($i-1)*$num)+1).\"&ord=$ord&codigo=$codigo&aportespagos=2&accion=fechad&fechai=$fechai&fechaf=$fechaf>$i</a> \";}\n\t\t$i++;\n\n\t}\n\n\tif ($i <= $pag) {\n\t\techo \"<a href='?conta=\".($conta+$num).\"&ord=$ord&codigo=$codigo&aportespagos=2&accion=fechad&fechai=$fechai&fechaf=$fechaf'>></a> <a href='?conta=\".((((int)($resul/$num))*$num)+1).\"&ord=$ord'>>></a>\";\n\t}\n\n\techo \" de \".ceil($resul/$num).\" (\".$resul.\" $que)</div>\";\n\n\treturn $pagactu == ceil($resul/$num);\n\n}", "title": "" }, { "docid": "85cd5fecc158adebfbac7df86493b0f8", "score": "0.5188059", "text": "function calcular_pago()\n{\n\t//TODO\n\t\n\t//Devolver los valores de las referencias\n\t/*for()\n\t{\n\t$pago[][]=\n\t}\n\t*/\n\t$pago=0;\n\treturn $pago;\n\n}", "title": "" }, { "docid": "7a8f25021a4bc911937d445f5a979301", "score": "0.51836", "text": "private function subscriptionPeriod(){\n $this->accountInfo();\n\n $joined_date = $this->signup_date;\n $expiry_date = strtotime('+60 days', $joined_date);\n\n $num_day = abs($expiry_date - time());\n $num_days_left = intval($num_day/86400);\n\n $this->expireDate = $expiry_date;\n $this->daysLeft = $num_days_left;\n\n \n }", "title": "" }, { "docid": "144e5593c476c2d115ad596d000ac60b", "score": "0.51799357", "text": "public function get_paginador($pages,$page){\n\n $pag='<div class=\"pagination pagination-centered\"><ul>';\n $pagesToShow=4;\n\n // Página anterior.\n if ($page>1) { \n $pa=$page-1;\n $pag.=\"<li><a title='Previous' onClick='paginacion($pa,this.title);'> < < Previous </a>\"; \n }\n \n $start = $page - $pagesToShow;\n\n if ($start <= 0){\n $start = 1;\n }\n\n $end = $page + $pagesToShow;\n\n if ($end >= $pages){\n $end = $pages;\n }\n\n if ($start > 0) {\n for ($i = 1; $i < 4 && $i < $start; ++$i) {\n $li='<li>'; \n $pag.=$li.\"<a title='page $i' onClick='paginacion($i,this.title);'>$i</a></li>\";\n }\n }\n\n if ($start > 2) { \n $pag.=\"<li><a>...</a></li>\";\n }\n\n for ($i = $start; $i <= $end; ++$i) {\n if($i==$page) \n $li='<li class=\"active\">';\n else \n $li='<li>'; \n $pag.=$li.\"<a title='page $i' onClick='paginacion($i,this.title);'>$i</a></li>\";\n }\n\n if ($end < $pages - 3) {\n $pag.=\"<li><a>...</a></li>\";\n }\n\n if ($end <= $pages - 1) {\n for ($i = max($pages- 2, $end + 1); $i <= $pages; ++$i) {\n $li='<li>'; \n $pag.=$li.\"<a title='page $i' onClick='paginacion($i,this.title);'>$i</a></li>\";\n }\n }\n // Siguiente página\n if ($page<$pages) { \n $pa=$page+1; \n $pag.=\"<li><a title='Next' onClick='paginacion($pa,this.title);'> Next >> </a>\"; \n }\n\n $pag.='</ul></div>';\n\n return $pag;\n}", "title": "" }, { "docid": "8ba7ed743c9efc9eb10cb77b2c5c8922", "score": "0.51694316", "text": "function konfersitotalwaktu($total_detik){\n\t$jam = floor($total_detik/3600);\n\t$sisa = $total_detik% 3600;\n\t$menit = floor($sisa/60);\n\t$sisa = $sisa % 60;\n\t$detik = floor($sisa/1);\n\t\n\treturn($jam, $menit, $detik);\n}", "title": "" }, { "docid": "688cac6ebd94869806609189f5777c2c", "score": "0.51680326", "text": "function arquideasprod_pager($tags = array(), $limit = 10, $element = 0, $parameters = array(), $quantity = 9) {\n global $pager_page_array, $pager_total;\n\n // Calculate various markers within this pager piece:\n // Middle is used to \"center\" pages around the current page.\n $pager_middle = ceil($quantity / 2);\n // current is the page we are currently paged to\n $pager_current = $pager_page_array[$element] + 1;\n // first is the first page listed by this pager piece (re quantity)\n $pager_first = $pager_current - $pager_middle + 1;\n // last is the last page listed by this pager piece (re quantity)\n $pager_last = $pager_current + $quantity - $pager_middle;\n // max is the maximum page number\n $pager_max = $pager_total[$element];\n // End of marker calculations.\n\n // Prepare for generation loop.\n $i = $pager_first;\n if ($pager_last > $pager_max) {\n // Adjust \"center\" if at end of query.\n $i = $i + ($pager_max - $pager_last);\n $pager_last = $pager_max;\n }\n if ($i <= 0) {\n // Adjust \"center\" if at start of query.\n $pager_last = $pager_last + (1 - $i);\n $i = 1;\n }\n // End of generation loop preparation.\n\n $li_first = theme('pager_first', (isset($tags[0]) ? $tags[0] : t('« first')), $limit, $element, $parameters);\n $li_previous = theme('pager_previous', (isset($tags[1]) ? $tags[1] : '<<'), $limit, $element, 1, $parameters);\n $li_next = theme('pager_next', (isset($tags[3]) ? $tags[3] : '>>'), $limit, $element, 1, $parameters);\n $li_last = theme('pager_last', (isset($tags[4]) ? $tags[4] : t('last »')), $limit, $element, $parameters);\n\n if ($pager_total[$element] > 1) {\n if ($li_first) {\n $items[] = array(\n 'class' => 'pager-first',\n 'data' => $li_first,\n );\n }\n if ($li_previous) {\n $items[] = array(\n 'class' => 'pager-previous',\n 'data' => $li_previous,\n );\n }\n\n // When there is more than one page, create the pager list.\n if ($i != $pager_max) {\n if ($i > 1) {\n $items[] = array(\n 'class' => 'pager-ellipsis',\n 'data' => '…',\n );\n }\n $first = TRUE;\n // Now generate the actual pager piece.\n for (; $i <= $pager_last && $i <= $pager_max; $i++) {\n if ($i < $pager_current) {\n $items[] = array(\n 'class' => 'pager-item pager-number',\n 'data' => theme('pager_previous', $i, $limit, $element, ($pager_current - $i), $parameters),\n );\n }\n if ($i == $pager_current) {\n $items[] = array(\n 'class' => 'pager-current pager-number',\n 'data' => $i,\n );\n }\n if ($i > $pager_current) {\n $items[] = array(\n 'class' => 'pager-item pager-number',\n 'data' => theme('pager_next', $i, $limit, $element, ($i - $pager_current), $parameters),\n );\n }\n if ($first) {\n $items[sizeof($items) - 1]['class'] .= ' pager-number-first';\n\t $first = FALSE;\n }\n }\n if ($i < $pager_max) {\n $items[] = array(\n 'class' => 'pager-ellipsis',\n 'data' => '…',\n );\n }\n }\n $items[sizeof($items) - 1]['class'] .= ' pager-number-last';\n // End generation.\n if ($li_next) {\n $items[] = array(\n 'class' => 'pager-next',\n 'data' => $li_next,\n );\n }\n if ($li_last) {\n $items[] = array(\n 'class' => 'pager-last',\n 'data' => $li_last,\n );\n }\n return theme('item_list', $items, NULL, 'ul', array('class' => 'pager'));\n }\n}", "title": "" }, { "docid": "96ab3dd0fc5c016b6c01a8bbfa7d7159", "score": "0.51584744", "text": "public function getTaskPagination($table){\n $data = $this->getTask($table);\n $response['rpp']=5;\n $response['np']=ceil((count($data)/$response['rpp']));\n return $response;\n }", "title": "" }, { "docid": "0d2ab0f3d6c7dccc7921dcfb576cf098", "score": "0.5144101", "text": "public function getPagosPendientes(){\n\n $items = [];//arreglo de objetos de tipo pago\n\n //$aprobado = 1;\n $estadoPago = \"pendiente\";\n\n try{\n \n $query = $this->prepare('SELECT * FROM pagos WHERE estado_pago = :estadopago');\n //$query = $this->prepare('SELECT * FROM pagos WHERE id = :id');\n $query->execute(['estadopago' => $estadoPago]);\n\n //mientras que exista un objeto no null\n while($p = $query->fetch(PDO::FETCH_ASSOC)){\n $item = new PagosModel();\n //rellena objeto con informacion\n $item->from($p); \n \n array_push($items, $item);\n }\n\n return $items;\n\n }catch(PDOException $e){\n return false;\n }\n }", "title": "" }, { "docid": "871a6c646850e48625b33fcebbbf6ed6", "score": "0.5142692", "text": "function ADVISOR_bytime($num, $precision)\n{\n if ($num >= 1) { // per second\n $per = __('per second');\n } elseif ($num * 60 >= 1) { // per minute\n $num = $num * 60;\n $per = __('per minute');\n } elseif ($num * 60 * 60 >= 1 ) { // per hour\n $num = $num * 60 * 60;\n $per = __('per hour');\n } else {\n $num = $num * 60 * 60 * 24;\n $per = __('per day');\n }\n\n $num = round($num, $precision);\n\n if ($num == 0) {\n $num = '<' . PMA\\libraries\\Util::pow(10, -$precision);\n }\n\n return \"$num $per\";\n}", "title": "" }, { "docid": "e98814f3584bee9d33caacca876e4e5f", "score": "0.5141316", "text": "public function getDatePeriods()\n {\n return [\n '24h' => __('Last 24 Hours'),\n '7d' => __('Last 7 Days'),\n '1m' => __('Current Month'),\n '1y' => __('YTD'),\n '2y' => __('2YTD')\n ];\n }", "title": "" }, { "docid": "6d8b1f5b39fe419dc717b5bb465f87db", "score": "0.5136075", "text": "function pagina1 ($resul, $conta, $num, $que, $ord,$codigo,$fechai, $fechaf) {\n\n\techo \"<div class='noimpri' style='font-size:80%'><span class = 'verdeb'>Página</span>\";\n\t$pag = ceil($resul/$num);\n\t$pagactu = ceil($conta/$num);\n\n\t$i = $pagactu - 5;\n\n\tif ($i > 1) {echo \" <A HREF=?conta=1&ord=$ord&codigo=$codigo&aportespagos=1&accion=fechaa&fechai=$fechai&fechaf=$fechaf><<</a> <a href='?conta=\".($conta-$num).\"&ord=$ord&codigo=$codigo&aportespagos=1&accion=fechaa&fechai=$fechai&fechaf=$fechaf'><</a>\";}\n\n \n\twhile ($i < $pagactu) {\n\n\t\tif ($i > 0) {echo \" <a href=?conta=\".((($i-1)*$num)+1).\"&ord=$ord&codigo=$codigo&aportespagos=1&accion=fechaa&fechai=$fechai&fechaf=$fechaf>$i</a>\";}\n\t\t$i++;\n\n\t}\n\n\t$i++;\n\n\techo \" [<span class = 'verdeb'>$pagactu</span>]\";\n\n\t$n = $pagactu + 7;\n\n\twhile ($i < $n) {\n\n\t\tif ($i <= $pag) {echo \" <a href=?conta=\".((($i-1)*$num)+1).\"&ord=$ord&codigo=$codigo&aportespagos=1&accion=fechaa&fechai=$fechai&fechaf=$fechaf>$i</a> \";}\n\t\t$i++;\n\n\t}\n\n\tif ($i <= $pag) {\n\t\techo \"<a href='?conta=\".($conta+$num).\"&ord=$ord&codigo=$codigo&aportespagos=1&accion=fechaa&fechai=$fechai&fechaf=$fechaf'>></a> <a href='?conta=\".((((int)($resul/$num))*$num)+1).\"&ord=$ord'>>></a>\";\n\t}\n\n\techo \" de \".ceil($resul/$num).\" (\".$resul.\" $que)</div>\";\n\n\treturn $pagactu == ceil($resul/$num);\n\n}", "title": "" }, { "docid": "2bef5faac488db8ecdbbda101273835a", "score": "0.5129678", "text": "public function SiguientePago($fecha){\n $dia=substr($fecha,0,2);\n $mes=substr($fecha,3,2);\n $anio= date(\"Y\");\n $mes = $mes + 1;\n \n if($mes > 12) { \n $mes = \"01\"; \n $anio = 1 + date(\"Y\");\n }\n return $dia . \"-\" . $mes . \"-\" . $anio;\n }", "title": "" }, { "docid": "333b3e758ae61217583aff1bdf747742", "score": "0.5126447", "text": "function ajan_activity_per_page() {\n\techo ajan_get_activity_per_page();\n}", "title": "" }, { "docid": "f366dae53cd1124749db99cfe0b24dda", "score": "0.51217186", "text": "function smarty_modifier_date_period($params)\n{\n\t$daterange = new DatePeriod(new DateTime('2012-08-31T00:00:00'), new DateInterval('PT30M'), new DateTime('2012-08-31T23:59:59'));\n\n\treturn $daterange;\n}", "title": "" }, { "docid": "89b0f32730bd160841d6fd037d919911", "score": "0.51205665", "text": "function recorreFechas($cuenta){\n\t\t# PARA SABER CUANTO TIEMTPO SERAN RECORRIDAS LAS FECHAS\n\t\t$sql = \"SELECT * FROM cuentas WHERE id = \". $cuenta;\n\t\t$res = mysql_query($sql);\n\t\t$c = mysql_fetch_array($res);\n\t\t$tp = $c[\"tipo_pago\"];\n\t\t$dp = split(\"-\", $c[\"dias_pago\"]);\n\t\t# CALCULAMOS EL TIPO DE GENERACION DE FECHAS\n\t\t$cnt = 0;\n\t\t$n = 1;\n\t\tif($tp == 1){\n\t\t\t$tipo = \"week\";\n\t\t}elseif($tp == 2) { \n\t\t\t$tipo = \"week\";\n\t\t\t$n = 2;\n\t\t}elseif($tp == 3) { \n\t\t\t\n\t\t}else {\n\t\t\t$tipo = \"month\";\n\t\t}\n\t\t# AHORA SACAMOS LOA PAGOS QUE SERAN ACTUALIZADOS \n\t\t$sql = \"SELECT * FROM pagos WHERE cuenta = \".$cuenta.\" AND estado = 0 ORDER BY id ASC\";\n\t\t$res = mysql_query($sql);\n\t\twhile($p = mysql_fetch_array($res)) {\n\t\t\t$prxpago = $p[\"fecha\"];\n\t\t\tif($tp == 3){\n\t\t\t\t$a = (int)substr($prxpago, 0, -6);\n\t\t\t\t$m = (int)substr($prxpago, 5, -3);\n\t\t\t\t$d = (int)substr($prxpago, -2);\n\t\t\t\tif( $d > 15 ){\n\t\t\t\t\tif($m == 12){$m = 1; $a++;}else{ $m++;}\n\t\t\t\t\t$d = $dp[0];\n\t\t\t\t}else{\n\t\t\t\t\tif($m == 2 && $dp[1] == 30) {\n\t\t\t\t\t\t$d = 28;\n\t\t\t\t\t}else {\n\t\t\t\t\t\t$d = $dp[1];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($m < 10){$m = \"0\".$m;}\n\t\t\t\tif($d < 10){$d = \"0\".$d;}\n\t\t\t\t$prxpago = $a . \"-\" . $m . \"-\" . $d;\n\t\t\t\t#echo $prxpago . \" ~ \" . $dia[0] . $dia[1] . \"<br />\";\n\t\t\t}else {\n\t\t\t\t$prxpago = date('Y-m-d', strtotime($prxpago.' + '.$n.' '.$tipo));\n\t\t\t}\n\t\t\t$sql = \"UPDATE pagos SET fecha = '\".$prxpago.\"' WHERE id = \".$p[\"id\"];\n\t\t\t#echo $sql . \" ~ \" . $tp . \"<br />\";\n\t\t\tmysql_query($sql);\n\t\t}\n\t}", "title": "" }, { "docid": "042194c727e78f280a855b62b87604cb", "score": "0.51179045", "text": "public function getPagination();", "title": "" }, { "docid": "042194c727e78f280a855b62b87604cb", "score": "0.51179045", "text": "public function getPagination();", "title": "" }, { "docid": "72331359b04cd9e1d13aa81d052e5acb", "score": "0.51165503", "text": "function periodoAnterior(){\n\t \n\t $periodoActivo = Session::get_data('periodo');\n\t \n\t if(substr($periodoActivo,0,1) == 3)\n\t\t $result = \"1\".substr($periodoActivo,1,4);\n\t\t \n\t else if(substr($periodoActivo,0,1) == 1){\n\t\t $pastPeriodo = substr(Session::get_data('periodo'),1,4) - 1;\n\t\t \n\t\t $result = \"3\".$pastPeriodo;\n\t \n\t }\n\t \n\t return $result;\n\t}", "title": "" }, { "docid": "7e158b2cf0d700ee64beb8408ddd70cd", "score": "0.5115937", "text": "public function getPageGroup($enlace,$maxpags,$estilo) {\r\n \r\n $info=array();\r\n\t\t\t$urlpa=explode(\"?\",$_SERVER['REQUEST_URI']);\r\n //parse_str($_SERVER['prepare_STRING'],$info);\r\n\t\t\tparse_str($urlpa[1],$info);\r\n if(isset($info['pag'])) unset($info['pag']);\r\n if(isset($info['idelim'])) unset($info['idelim']);\r\n if(isset($info['pagprev'])) unset($info['pagprev']);\r\n if(isset($info['ctr'])) unset($info['ctr']);\r\n $params= http_build_query($info);\r\n if($params!=\"\")\r\n $enlace=$enlace.'&'.$params.'&pag=';\r\n else\r\n $enlace=$enlace.'&pag=';\r\n \r\n \r\n if($this->consul['total']>0)\r\n {\r\n $this->pagina['total_paginas'] = ceil($this->consul['total']/$this->consul['tampag']); \r\n $this->pagina['anterior'] = $this->consul['pagi'] - 1; \r\n $this->pagina['posterior'] = $this->consul['pagi'] + 1; \r\n $minimo = $maxpags ? max(1, $this->consul['pagi']-ceil($maxpags/2)): 1;\r\n $maximo = $maxpags ? min($this->pagina['total_paginas'], $this->consul['pagi']+floor($maxpags/2)): $this->pagina['total_paginas'];\r\n \r\n if ($this->consul['pagi'] >1)\r\n {\r\n $texto = \"<ul id='\".$estilo.\"'><li><a href=\\\"\".$enlace.$this->pagina['anterior'].\"\\\">«</a></li>\";\t\t\t\r\n }else{\r\n\t\t$texto = \"<ul id='\".$estilo.\"'><li></li>\";//<span>«</span>\r\n }\r\n \r\n if ($minimo!=1){\r\n\t\t$texto.=\"<li>...</li>\";\r\n }\r\n \r\n //\r\n for ($i=$minimo; $i < $this->consul['pagi']; $i++){\r\n\t\t$texto .= \"<li><a href=\\\"\".$enlace.$i.\"\\\">\".$i.\"</a></li>\";\r\n\t }\r\n \r\n $texto .= \"<li><strong>\".$this->consul['pagi'].\"</strong></li>\";\t\t \r\n \r\n for ($i=$this->consul['pagi']+1; $i<=$maximo; $i++){\t\t\t \r\n $texto .= \"<li><a href=\\\"\".$enlace.$i.\"\\\">\".$i.\"</a></li>\";\r\n }\r\n \r\n if ($maximo!=$this->pagina['total_paginas']){ $texto.=\"<li>...</li>\";}\r\n \r\n if ($this->consul['pagi']<$this->pagina['total_paginas']){\r\n\t\t$texto .= \"<li><a href=\\\"\".$enlace.$this->pagina['posterior'].\"\\\">»</a></li>\";\r\n }else{\r\n\t\t$texto .= \"<li></li>\";//<span>»</span>\r\n }\r\n \r\n return $texto.\"</ul>\";\t\t \r\n }else{\r\n return null;\r\n }\r\n\t}", "title": "" }, { "docid": "9cf10e0d30824c678dffbef53b164f79", "score": "0.51143026", "text": "function wphb_get_times() {\r\n\t$data = array();\r\n\tfor ( $i = 0; $i < 24; $i ++ ) {\r\n\t\tforeach ( apply_filters( 'wphb_scan_get_times_interval', array( '00' ) ) as $min ) {\r\n\t\t\t$time = $i . ':' . $min;\r\n\t\t\t$data[ $time ] = apply_filters( 'wphb_scan_get_times_hour_min', $time );\r\n\t\t}\r\n\t}\r\n\r\n\treturn apply_filters( 'wphb_scan_get_times', $data );\r\n}", "title": "" }, { "docid": "53dc55a1e96a8b1dd6e252bb4b2351d2", "score": "0.51141876", "text": "function generarFecha(){\n\t$fechaHoy = date(spanDateFormat);\t\n\t\n\tfor($i=1; $i <= 8; $i++){\n\t\t$fechaHoy = date(spanDateFormat, strtotime($fechaHoy.\"+ 1 day\"));\t\n\t\t$diaSemana = date(\"w\", strtotime($fechaHoy));\n\t\tif($diaSemana == 0){//domingo\n\t\t\t$fechaHoy = date(spanDateFormat,strtotime($fechaHoy.\"+ 1 day\"));\n\t\t}elseif($diaSemana == 6){//sabado\n\t\t\t$fechaHoy = date(spanDateFormat,strtotime($fechaHoy.\"+ 2 day\"));\n\t\t}\n\t} \t\n\t\n\treturn $fechaHoy;\n}", "title": "" }, { "docid": "405aa769095105e3c381bee8c4cb66ce", "score": "0.5111936", "text": "public function getStatisticBytesPerDay()\n {\n $to_array = [];\n $stat_per_day = [];\n $stat = \\Yii::$app->serviceStatistic;\n //array_push($to_array, Carbon::now());\n for($i = 1 ; $i < 7 ;$i++){\n $to = Carbon::now();\n $from = $to->subHours($i * 24);\n array_push($to_array, $from);\n }\n foreach ($to_array as $timestamp) {\n $now = Carbon::now();\n $statistic = $stat->get('sended_content_attrs',$timestamp,$timestamp)->sum('content_size');\n array_push($stat_per_day, $statistic / 1024 / 1024);\n }\n return $stat_per_day;\n }", "title": "" }, { "docid": "e705b869bf38fbea604ac9b9c6c53814", "score": "0.5110776", "text": "function hbl($fechainicio, $fechafin, $diasferiados = array()) {\n // Convirtiendo en timestamp las fechas\n\t\t\n\t\t// $fechainicio.\".....\".$fechafin;;\n\t\t\n $fechainicio = strtotime($fechainicio.\" 00:00:00\");\n\t $fechafin = strtotime($fechafin.\" 23:59:59\");\n \n // Incremento en 1 dia\n $diainc = 24*60*60;\n \n // Arreglo de dias habiles, inicianlizacion\n $diashabiles = array();\n \n // Se recorre desde la fecha de inicio a la fecha fin, incrementando en 1 dia\n for ($midia = $fechainicio; $midia <= $fechafin; $midia += $diainc) {\n // Si el dia indicado, no es sabado o domingo es habil\n if (!in_array(date('N', $midia), array(6,7))) { // DOC: http://www.php.net/manual/es/function.date.php\n // Si no es un dia feriado entonces es habil\n if (!in_array(date('Y-m-d', $midia), $diasferiados)) {\n array_push($diashabiles, date('Y-m-d', $midia));\n }\n }\n }\n //echo count($diashabiles);\n return count($diashabiles);\n}", "title": "" }, { "docid": "008560f0a51d763badae08174d1fae3a", "score": "0.511075", "text": "public function get_real_period()\r\n {\r\n #custome timezone\r\n $r = $this->query(\"SELECT report_count FROM system_parameter LIMIT 1\");\r\n $report_count = $r[0][0]['report_count'];\r\n $tz = $this->get_sys_timezone();\r\n $current_time = time();\r\n if ($report_count == '0')\r\n {\r\n //$start = date(\"Y-m-d H:i:s\", $current_time - (60 * 60)) . $tz;\r\n $start = date(\"Y-m-d H:i:sO\", strtotime(date(\"Y-m-d H:i:s\", $current_time - (60 * 60))));\r\n }\r\n else\r\n {\r\n //$start = date(\"Y-m-d 00:00:00\") . $tz;\r\n $start = date(\"Y-m-d H:i:sO\", strtotime(date(\"Y-m-d 00:00:00\")));\r\n }\r\n //$end = date(\"Y-m-d 23:59:59\") . $tz;\r\n\r\n\r\n $end = date(\"Y-m-d H:i:sO\", strtotime(date(\"Y-m-d 23:59:59{$tz}\")));\r\n $start_day = date(\"Y-m-d \");\r\n $end_day = date(\"Y-m-d \");\r\n return compact('start', 'end', 'start_day', 'end_day');\r\n }", "title": "" }, { "docid": "fe34b26f6fa692733d5dc1334b7c19d1", "score": "0.51032794", "text": "public static function periodRange(){\n\t\t$list = Yii::app()->db->createCommand('select left(soldon, 7) as mnth from sale group by 1 order by 1')->queryAll();\n\t\t$rs=array();\n\t\tforeach($list as $item)\n\t\t\t$rs[$item['mnth']]=$item['mnth'];\n\t\t//add one more item\n\t\t$myDate = new DateTime($item['mnth'] . '-01', new DateTimeZone('America/Los_Angeles'));\n\t\t$myDate->add(new DateInterval('P1M'));\n\t\t$strMyDate = date_format($myDate, \"Y-m\");\n\t\t$rs[$strMyDate]=$strMyDate;\n\t\t\n\t\treturn $rs;\n\t}", "title": "" }, { "docid": "8be60c100cec34098536a0a4782bc87a", "score": "0.51012623", "text": "function getPageviewChartData( $pDays = 7 ) {\n\t\t$now = mktime( 0, 0, 0, date( \"m\" ), date( \"d\" ), date( \"Y\" ));\n\t\t$dfrom = 0;\n\t\tif( $pDays != 0 ) $dfrom = $now - ( $pDays * 24 * 60 * 60 );\n\n\t\t$query = \"SELECT `stats_day`, `pageviews` FROM `\".BIT_DB_PREFIX.\"stats_pageviews` WHERE `stats_day`<=? AND `stats_day`>=? ORDER BY `stats_day` ASC\";\n\t\t$result = $this->mDb->query( $query,array( ( int )$now, ( int )$dfrom ));\n\t\t$ret = array();\n\t\t$n = ceil( $result->numRows() / 20 );\n\t\t$i = 0;\n\n\t\twhile( $res = $result->fetchRow() ) {\n\t\t\tif( $i % $n == 0 ) {\n\t\t\t\t$data = array(\n\t\t\t\t\tdate( \"j M Y\", $res[\"stats_day\"] ),\n\t\t\t\t\t$res[\"pageviews\"]\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t$data = array(\n\t\t\t\t\t\"\",\n\t\t\t\t\t$res[\"pageviews\"]\n\t\t\t\t);\n\t\t\t}\n\t\t\t$ret[] = $data;\n\t\t\t$i++;\n\t\t}\n\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "2f9e38b81b0b08aa85d781b0eb2b0c8b", "score": "0.5098119", "text": "function Paginate($values,$per_page){\n $total_values = count($values);\n//get the current page\n if(isset($_GET['page'])){\n $current_page = $_GET['page'];\n }else{\n//pages start with number 1\n $current_page = 1;\n }\n//define the number of the content on each page\n $counts = ceil($total_values / $per_page);\n $param1 = ($current_page - 1) * $per_page;\n $this->data = array_slice($values,$param1,$per_page);\n\n//number of pages are ascending\n for($x=1; $x<= $counts; $x++){\n $numbers[] = $x;\n }\n return $numbers;\n }", "title": "" }, { "docid": "934c7ab50a7f68d5b9366a713ebe9d58", "score": "0.5091822", "text": "public function DiasPendientes($iden){\n \t$db = new dbConn();\n \t\n if ($r = $db->select(\"activacionF, proximo_pagoF\", \"contratos\", \"WHERE id = '$iden'\")) { \n $activacion = $r[\"activacionF\"];\n $fpago = $r[\"proximo_pagoF\"];\n\t } unset($r); \n\n\t $consumo = $fpago - $activacion; \n\t $consumo = $consumo / 86400; //86400 equivale a un dia\n return $consumo;\n }", "title": "" }, { "docid": "6e3e27bcc19e6d2cfc03beef38705471", "score": "0.5086699", "text": "public function navigation($chunk='churchevents_calnavtpl', $params=NULL ){\r\n /**\r\n * 1. make the prevous URL\r\n * 2. make the next url\r\n * this is for the month view\r\n */\r\n $timeDiff = 3600*24*7;// 1 week\r\n $endTime = 3600*24*6;// 6 days\r\n $prev_url = $next_url = '';// init\r\n $time = 0;\r\n switch( $this->filters['view'] ) {\r\n case 'day':\r\n $timeDiff = 3600*24;// 1 day\r\n $endTime = 0;\r\n case 'week':\r\n $time = strtotime($this->filters['year'].'-'.$this->filters['month'].'-'.$this->filters['day']);\r\n $endTime += $time;\r\n $prev_url .= $this->url.'month='.date('n',$time - $timeDiff).'&amp;day='.date('j',$time - $timeDiff).'&amp;year='.date('Y',$time - $timeDiff).$params;\r\n $next_url .= $this->url.'month='.date('n',$time + $timeDiff).'&amp;day='.date('j',$time + $timeDiff).'&amp;year='.date('Y',$time + $timeDiff).$params;\r\n break;\r\n case 'year':\r\n $prev_url .= $this->url.'year='.($this->filters['year']-1).$params;\r\n $next_url .= $this->url.'year='.($this->filters['year']+1).$params;\r\n break;\r\n case 'month':\r\n default:\r\n # previous\r\n if ( $this->filters['month'] > 1) {\r\n $pre_month = $this->filters['month'] - 1;\r\n $pre_year = $this->filters['year'];\r\n } else {\r\n $pre_month = 12;\r\n $pre_year = $this->filters['year'] - 1;\r\n }\r\n \r\n $prev_url .= $this->url.'month='.$pre_month.'&amp;year='.$pre_year.$params;\r\n // next\r\n if ( $this->filters['month'] < 12 ) {\r\n $next_month = $this->filters['month'] + 1;\r\n $next_year = $this->filters['year'];\r\n } else {\r\n $next_month = 1;\r\n $next_year = $this->filters['year'] + 1;\r\n }\r\n $next_url .= $this->url.'month='.$next_month.'&amp;year='.$next_year.$params; \r\n $time = strtotime($this->filters['year'].'-'.$this->filters['month'].'-01');\r\n $endTime += date('t', $time) - 3600*24;// last day of the month\r\n }\r\n $properties = array(\r\n 'month' => $this->month_array[$this->filters['month']],\r\n 'day' => $this->filters['day'],\r\n 'year' => $this->filters['year'],\r\n 'startDate' => $time,\r\n 'endDate' => $endTime,\r\n 'startDateFormated' => strftime($this->filters['dateFormat'], $time),\r\n 'endDateFormated' => strftime($this->filters['dateFormat'], $endTime),\r\n 'previous' => $this->modx->lexicon('churchevents.previous'),\r\n 'next' => $this->modx->lexicon('churchevents.next'),\r\n 'prev_url' => $prev_url,\r\n 'next_url' => $next_url,\r\n 'view' => $this->filters['view']\r\n );\r\n return $this->getChunk($chunk,$properties);\r\n }", "title": "" }, { "docid": "7fd8e54e558b3904404cd933d93d8de6", "score": "0.50798434", "text": "static public function periodo($v)\n {\n $hora = static::date($v,\"H\");\n if($hora >= 0 && $hora < 12) return \"Manhã\";\n if($hora >= 12 && $hora < 18) return \"Tarde\";\n if($hora >= 18 && $hora < 23) return \"Noite\";\n return false;\n }", "title": "" }, { "docid": "1e3bf449cbebe298af12819f37700b01", "score": "0.50755984", "text": "protected function dayPortion(array $times): array\n {\n for ($i=0; $i<7; $i++){\n $times[$i] /= 24;\n }\n return $times;\n }", "title": "" }, { "docid": "9ae1f39dbc4993430b6bdf4f734d6ccc", "score": "0.50751084", "text": "public function twelve_hours() {}", "title": "" }, { "docid": "6f9e8739d2f62ffc9cbc46df6a7690ce", "score": "0.50719506", "text": "function pages($num) {\r\n\tif(is_float($num / 4)) {\r\n\t\treturn intval($num / 4) + 1;\r\n\t} else {\r\n\t\treturn $num / 4;\r\n\t};\r\n}", "title": "" }, { "docid": "4dbc91d6f454769d9879f49d35dff672", "score": "0.5064393", "text": "function zenexp_pager($variables) {\n $tags = $variables['tags'];\n $element = $variables['element'];\n $parameters = $variables['parameters'];\n $quantity = $variables['quantity'];\n global $pager_page_array, $pager_total;\n\n // Calculate various markers within this pager piece:\n // Middle is used to \"center\" pages around the current page.\n $pager_middle = ceil($quantity / 2);\n // current is the page we are currently paged to\n $pager_current = $pager_page_array[$element] + 1;\n // first is the first page listed by this pager piece (re quantity)\n $pager_first = $pager_current - $pager_middle + 1;\n // last is the last page listed by this pager piece (re quantity)\n $pager_last = $pager_current + $quantity - $pager_middle;\n // max is the maximum page number\n $pager_max = $pager_total[$element];\n // End of marker calculations.\n\n // Prepare for generation loop.\n $i = $pager_first;\n if ($pager_last > $pager_max) {\n // Adjust \"center\" if at end of query.\n $i = $i + ($pager_max - $pager_last);\n $pager_last = $pager_max;\n }\n if ($i <= 0) {\n // Adjust \"center\" if at start of query.\n $pager_last = $pager_last + (1 - $i);\n $i = 1;\n }\n // End of generation loop preparation.\n\n $li_first = theme('pager_first', array('text' => (isset($tags[0]) ? $tags[0] : t('« first')), 'element' => $element, 'parameters' => $parameters));\n $li_previous = theme('pager_previous', array('text' => (isset($tags[1]) ? $tags[1] : t('‹ previous')), 'element' => $element, 'interval' => 1, 'parameters' => $parameters));\n $li_next = theme('pager_next', array('text' => (isset($tags[3]) ? $tags[3] : t('next ›')), 'element' => $element, 'interval' => 1, 'parameters' => $parameters));\n $li_last = theme('pager_last', array('text' => (isset($tags[4]) ? $tags[4] : t('last »')), 'element' => $element, 'parameters' => $parameters));\n\n if ($pager_total[$element] > 1) {\n if ($li_first) {\n $items[] = array(\n 'class' => array('first'),\n 'data' => $li_first,\n );\n }\n if ($li_previous) {\n $items[] = array(\n 'class' => array('previous'),\n 'data' => $li_previous,\n );\n }\n\n // When there is more than one page, create the pager list.\n if ($i != $pager_max) {\n if ($i > 1) {\n $items[] = array(\n 'class' => array('disabled'),\n 'data' => '<span>…</span>',\n );\n }\n // Now generate the actual pager piece.\n for (; $i <= $pager_last && $i <= $pager_max; $i++) {\n if ($i < $pager_current) {\n $items[] = array(\n 'data' => theme('pager_previous', array('text' => $i, 'element' => $element, 'interval' => ($pager_current - $i), 'parameters' => $parameters)),\n );\n }\n if ($i == $pager_current) {\n $items[] = array(\n 'class' => array('active'),\n 'data' => \"<span>$i</span>\",\n );\n }\n if ($i > $pager_current) {\n $items[] = array(\n \n 'data' => theme('pager_next', array('text' => $i, 'element' => $element, 'interval' => ($i - $pager_current), 'parameters' => $parameters)),\n );\n }\n }\n if ($i < $pager_max) {\n $items[] = array(\n 'class' => array('disabled'),\n 'data' => '<span>…</span>',\n );\n }\n }\n // End generation.\n if ($li_next) {\n $items[] = array(\n 'class' => array('pager-next'),\n 'data' => $li_next,\n );\n }\n if ($li_last) {\n $items[] = array(\n 'class' => array('last'),\n 'data' => $li_last,\n );\n }\n return '<h2 class=\"element-invisible\">' . t('Pages') . '</h2>' . '<div class=\"clearfix text-center\">' . theme('item_list', array(\n 'items' => $items,\n 'class' => array('center'),\n 'attributes' => array('class' => array('pagination')),\n )) . '</div>';\n }\n}", "title": "" }, { "docid": "e06924f1a0fa5eeee68ec978bb048cb0", "score": "0.5060365", "text": "public function reporte_periodo()\n {\n\n $suministro = $this->conexion->suministros->last();\n $ultimo_valor = $suministro->ValorLeido;\n \n\n $lecturas = HistoLectura::where('Numero',$this->Numero)->where(function($q) use ($ultimo_valor){\n $q->where('Contador1',\">=\",$ultimo_valor);\n })\n ->orderBy('Fecha_Hora','ASC')->get();\n //el mas alto esta primero\n \n // obtengo 1 por hora\n $_maximos = [];\n foreach ($lecturas as $lectura) \n {\n $dia = date(\"Y-m-d\",strtotime($lectura->Fecha_Hora));//dia\n\n $existe = false;\n foreach ($_maximos as $key => $m) \n {\n if($m['dia'] == $dia)\n {\n $existe = true;\n }\n }\n\n\n if(!$existe)\n {\n $_maximos[] = \n [\n \"dia\"=>$dia,\n \"t_hora\"=>date(\"H:i\",strtotime($lectura->Fecha_Hora)),\n \"t_dia\"=>date(\"d-m-Y\",strtotime($lectura->Fecha_Hora)),\n \"label\"=>date(\"d/m/Y\",strtotime($lectura->Fecha_Hora)),\n \"valor\"=>round($lectura->Contador1,0, PHP_ROUND_HALF_DOWN)\n ]; \n }\n }\n \n // $_maximos = array_reverse($_maximos);\n foreach ($_maximos as $key => $reg) \n {\n \n if(isset($_maximos[$key - 1]))\n {\n \n\n $_maximos[$key][\"x\"] = $_maximos[$key][\"valor\"] - $_maximos[$key - 1][\"valor\"];\n if($_maximos[$key][\"x\"] < 0)\n {\n $_maximos[$key][\"x\"] = $_maximos[$key][\"x\"] + pow(10,$this->Digitos);///correccion\n }\n }\n }\n\n $_maximos[0][\"x\"] = $_maximos[1][\"x\"];\n array_shift($_maximos);\n\n return ($_maximos);//devuelvo al reves para el grafico\n\n }", "title": "" }, { "docid": "95967df268d37a055b2e1c16142fe902", "score": "0.5040221", "text": "function mk16_plus($days)\n{\n // @excel: =INT(Q2/2)+1\n $years = floor($days/360);\n $mk = floor($years/2) + 1;\n $ret[0] = $mk > 19 ? 19 : $mk;\n $ret[1] = $days - (($mk * 2) - 2);\n //print_r($ret);\n return $ret;\n}", "title": "" }, { "docid": "68fef3b7089ebb974389f52756f7fcdd", "score": "0.50400233", "text": "function get_pagination_stats($input)\r\n{\r\n $total_records = isset($input['total_records']) ? $input['total_records'] : 0;\r\n $page_num = isset($input['page_num']) ? $input['page_num'] : 1;\r\n $per_page = isset($input['per_page']) ? $input['per_page'] : 20;\r\n if(!is_numeric($page_num) || $page_num <= 0) {\r\n $page_num = 1;\r\n }\r\n if(!is_numeric($per_page) || $per_page <= 0) {\r\n $per_page = 10;\r\n }\r\n if($page_num == 1) $start_from = 0;\r\n else $start_from = (($page_num - 1) * $per_page);\r\n \r\n $total_pages = ceil($total_records / $per_page);\r\n $pagination = array(\r\n 'total_records' => $total_records,\r\n 'total_pages' => $total_pages,\r\n 'prev_page' => ($page_num > 1) ? ($page_num - 1) : '',\r\n 'page_num' => $page_num,\r\n 'next_page' => (empty($total_pages) || $total_pages == $page_num) ? '' : ($page_num + 1),\r\n 'start_from' => $start_from,\r\n 'per_page' => $per_page,\r\n );\r\n return $pagination;\r\n}", "title": "" }, { "docid": "4fd3949e52952bc89ba83c51ed30f003", "score": "0.50396144", "text": "function get_paging_data($rs) {\n\t\t\t\treturn array(\n\t\t\t\t\t\t\t\t'prevpage' => $rs->absolutepage() - 1,\n\t\t\t\t\t\t\t\t'currentpage' => $rs->absolutepage(),\n\t\t\t\t\t\t\t\t'nextpage' => $rs->absolutepage() + 1,\n\t\t\t\t\t\t\t\t'atfirstpage' => $rs->atfirstpage(),\n\t\t\t\t\t\t\t\t'atlastpage' => $rs->atlastpage(),\n\t\t\t\t\t\t\t\t'lastpageno' => $rs->lastpageno()\n\t\t\t\t\t\t);\n\t}", "title": "" }, { "docid": "a2f23f9c39c3a95987360916dfdf1eb6", "score": "0.50378835", "text": "function findWeekPeriod($week, $year)\n{\n\t$aPeriod = array();\n\t$x = 0;\n\nfor ($i = 6; $i >=0; $i--)\n{\n\t$aPeriod[] = date(\"Y-m-d\", mktime(0, 0, 0, 1, 1 + $week*7 + $x - $i, $year));\n}\n\n\treturn $aPeriod;\n}", "title": "" }, { "docid": "080599a67a7f635c6c3e82fe01ad6ce9", "score": "0.5036892", "text": "public function get_day_permastruct()\n {\n }", "title": "" }, { "docid": "d54c13a2b9bd4598fd98d2040629ac5c", "score": "0.5034527", "text": "function construct_start_end_array($pagenum = 0, $perpage = 0, $total = 0)\n{\n $first = $perpage * ($pagenum - 1);\n $last = $first + $perpage;\n if ($last > $total)\n {\n $last = $total;\n }\n $first++;\n \n return array('first' => number_format($first), 'last' => number_format($last));\n}", "title": "" }, { "docid": "1852f74a7e12192a1042838ef2eed79d", "score": "0.502741", "text": "public function pagination($nombre,$nombre_par_page){\n $nombre=(int)$nombre;\n $req=$this->_con->query('SELECT * from articles');\n // compter les nombres dess enregistrement\n $nombre_enregistrement=$req->rowCount();\n // recuperation de la partie entierer de resultat de la division \n $last_page=ceil($nombre_enregistrement/$nombre_par_page);\n $num=1;\n if(isset($nombre) and is_numeric($nombre)){\n if($nombre<=0){\n $num=1;\n }\n else if($nombre>=$last_page){\n $num=$last_page;\n } \n else\n $num=$nombre;\n if(!is_numeric($nombre))\n $num=1;\n }\n else{\n $num=1;\n }\n // la formule pour trouver la limite qui av sortir\n $limit='LIMIT '.(($num*$nombre_par_page)-$nombre_par_page).','.$nombre_par_page ;\n $pre=$this->_con->query(\"SELECT * FROM articles ORDER BY id DESC $limit\");\n self::$paginate='';\n // creation de pagination \n if($last_page>1){\n // verification de liens precedents\n if($num>1){\n $precedent=$num-1; \n self::$paginate.='<a href=\"page-'.$precedent.'\"><span class=\"next\">precedent</span></a>';\n for($i=$num-self::APRES_AVANT;$i<$num;$i++){\n if($i>0){\n self::$paginate.='<a href=\"page-'.$i.'\"><span class=\"lien\">'.$i.'</span></a>';\n }\n }\n }\n // lien du milieu du pagination\n self::$paginate.='<span>'.$num.'</span>';\n // verification de liens suivants\n if($num<$last_page){\n $suivant=$num+1;\n for($i=$num+1;$i<$num+self::APRES_AVANT;$i++){\n if($i>=$last_page){\n break;\n }\n self::$paginate.='<a href=\"page-'.$i.'\"><span class=\"lien\">'.$i.'</span></a>';\n }\n self::$paginate.='<a href=\"page-'.$suivant.'\"><span class=\"next\">suivant</span></a>'; \n }\n // fin condition last_page\n }\n\n return $pre->fetchAll(); \n }", "title": "" }, { "docid": "3d485987eb9acf41071a6aa2e6346e27", "score": "0.5025948", "text": "private function generar_dias ($dia_inicio, $dia_fin, $mes_inicio, $mes_fin, $i, $dias_seleccionados, $meses_intermedios){\r\n //guardamos los dias del periodo\r\n $dias=array();\r\n $anio=date('Y');\r\n switch($i){\r\n case 'mm' : while($dia_inicio <= $dia_fin){\r\n $fecha= date('d-m-Y', strtotime(\"$dia_inicio-$mes_inicio-$anio\"));\r\n //print_r(\"<br>\");\r\n //print_r($fecha);\r\n //print_r(\"<br>\");\r\n if($this->es_dia_valido(date('N', strtotime($fecha)), $dias_seleccionados)){\r\n $dias[]=$fecha;\r\n }\r\n\r\n $dia_inicio += 1;\r\n }\r\n\r\n break;\r\n\r\n case 'mc' : $this->obtener_dias($dia_inicio, $mes_inicio, $this->_meses[intval($mes_inicio)], $dias_seleccionados, &$dias);\r\n $this->obtener_dias(1, $mes_fin, $dia_fin, $dias_seleccionados, &$dias);\r\n\r\n break;\r\n\r\n case 'mnc': //obtenemos los dias para dia_inicio y mes_inicio\r\n $this->obtener_dias($dia_inicio, $mes_inicio, $this->_meses[intval($mes_inicio)], $dias_seleccionados, &$dias);\r\n \r\n //para los meses intermedios podemos obtener los dias sin problemas, avanzamos desde 1 \r\n //hasta el ultimo dia del mes y realizamos el descarte adecuado.\r\n foreach ($meses_intermedios as $clave=>$mes_i){ //mes_i contiene un valor entero\r\n $this->obtener_dias(1, $mes_i, $this->_meses[$mes_i], $dias_seleccionados, &$dias);\r\n }\r\n\r\n //obtenemos los dias para dia_fin y mes_fin\r\n $this->obtener_dias(1, $mes_fin, $dia_fin, $dias_seleccionados, &$dias);\r\n\r\n break;\r\n }\r\n\r\n return $dias;\r\n }", "title": "" }, { "docid": "7a243aac5298ead15b344a0c012375fd", "score": "0.50166994", "text": "public function getPeriodo() {\n return $this->iPeriodo;\n }", "title": "" }, { "docid": "17b849fcf14b2aab7c2437bac5a4ee70", "score": "0.5015163", "text": "public function getPaginas(){\r\n $paginacao = new Paginacao();\r\n return $paginacao->getPaginas();\r\n }", "title": "" }, { "docid": "a1b4215b51b88b6149ce4bdd338ae630", "score": "0.50135815", "text": "function listarFacturacionPeriodo(CTParametro $parametro){\n\t\t$obj=new MODImportarFacturResum($parametro);\n\t\t$res=$obj->listarFacturacionPeriodo();\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "5c9d6e1134158fb19ce03afe2bbde3e1", "score": "0.5012891", "text": "public function listarPago($tipo)\n\t{\n\n\n\n\t\t$this->_tipo = intval($tipo);\n\t\t$this->_sql = sprintf(\"\tSELECT \n\t\t\t\t\t\t\t\t\t SUM(trabajo.pago)\t\t\t\t\tAS z\n\n\t\t\t\t\t\t\t\t\t FROM trabajo \n\n\t\t\t\t\t\t\t\t\t\t WHERE trabajo.id_trabajo>=1 \n\n\t\t\t\t\t\t\t\t\t\t and\n\n\t\t\t\t\t\t\t\t\t\t week( trabajo.created_at )= week( now() )\n\n\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t ORDER BY trabajo.id_trabajo \n\t\t\t\t\t\t\t\t\t\t DESC;\",\n\t\t\t\t\t\t\t\t\t\t $this->_aliasColumnas);\n\t\t\n\t\treturn $this->sentenciaSQL($this->_sql, $this->_tipo);\n\t}", "title": "" }, { "docid": "4c19033c63484dd9d76a14bbf58e5eb9", "score": "0.50060576", "text": "function resta_dias($fecha)\n {\n\t$fec = getdate();\n\t$day = $fec['mday'];\n\t$mon = $fec['mon'];\n\t$year= $fec['year'];\n\t$x = \"$year-$mon-$day\";\n\t$x=strtotime($x);\n\t$y=strtotime($fecha);\n\t$segundos=intval($x-$y);\n\t$dias=intval(($segundos/3600)/24);\n\treturn $dias;\n }", "title": "" }, { "docid": "34561bbf4f37fcfd2a51b1fc3564c564", "score": "0.5000149", "text": "public function tabelapaginada()\n {\n //endereço atual da página\n $endereco = $_SERVER ['PHP_SELF'];\n /* Constantes de configuração */\n define('QTDE_REGISTROS', 2);\n define('RANGE_PAGINAS', 3);\n /* Recebe o número da página via parâmetro na URL */\n $pagina_atual = (isset($_GET['page']) && is_numeric($_GET['page'])) ? $_GET['page'] : 1;\n /* Calcula a linha inicial da consulta */\n $linha_inicial = ($pagina_atual - 1) * QTDE_REGISTROS;\n /* Instrução de consulta para paginação com MySQL */\n $sql = \"SELECT * FROM tb_livro LIMIT {$linha_inicial}, \" . QTDE_REGISTROS;\n $statement = Conexao::getInstance()->prepare($sql);\n $statement->execute();\n $dados = $statement->fetchAll(PDO::FETCH_OBJ);\n /* Conta quantos registos existem na tabela */\n $sqlContador = \"SELECT COUNT(*) AS total_registros FROM tb_livro\";\n $statement = Conexao::getInstance()->prepare($sqlContador);\n $statement->execute();\n $valor = $statement->fetch(PDO::FETCH_OBJ);\n /* Idêntifica a primeira página */\n $primeira_pagina = 1;\n /* Cálcula qual será a última página */\n $ultima_pagina = ceil($valor->total_registros / QTDE_REGISTROS);\n /* Cálcula qual será a página anterior em relação a página atual em exibição */\n $pagina_anterior = ($pagina_atual > 1) ? $pagina_atual - 1 : 0;\n /* Cálcula qual será a pŕoxima página em relação a página atual em exibição */\n $proxima_pagina = ($pagina_atual < $ultima_pagina) ? $pagina_atual + 1 : 0;\n /* Cálcula qual será a página inicial do nosso range */\n $range_inicial = (($pagina_atual - RANGE_PAGINAS) >= 1) ? $pagina_atual - RANGE_PAGINAS : 1;\n /* Cálcula qual será a página final do nosso range */\n $range_final = (($pagina_atual + RANGE_PAGINAS) <= $ultima_pagina) ? $pagina_atual + RANGE_PAGINAS : $ultima_pagina;\n /* Verifica se vai exibir o botão \"Primeiro\" e \"Pŕoximo\" */\n $exibir_botao_inicio = ($range_inicial < $pagina_atual) ? 'mostrar' : 'esconder';\n /* Verifica se vai exibir o botão \"Anterior\" e \"Último\" */\n $exibir_botao_final = ($range_final > $pagina_atual) ? 'mostrar' : 'esconder';\n if (!empty($dados)):\n echo \"\n <table class='table table-striped table-bordered'>\n <thead>\n <tr style='text-transform: uppercase;' class='active'>\n <th style='text-align: center; font-weight: bolder;'>ID</th>\n <th style='text-align: center; font-weight: bolder;'>Título</th>\n <th style='text-align: center; font-weight: bolder;'>Ano</th>\n <th style='text-align: center; font-weight: bolder;'>Edição</th>\n <th style='text-align: center; font-weight: bolder;'>Categoria</th>\n <th style='text-align: center; font-weight: bolder;'>Editora</th>\n <th style='text-align: center; font-weight: bolder;' colspan='2'>Ações</th>\n </tr>\n </thead>\n <tbody>\";\n foreach ($dados as $source):\n echo \"<tr>\n <td style='text-align: center'>\" . $source->idtb_livro . \"</td>\n <td style='text-align: center'>\" . $source->titulo . \"</td>\n <td style='text-align: center'>\" . $source->ano . \"</td>\n <td style='text-align: center'>\" . $source->edicao . \"</td>\n <td style='text-align: center'>\" . $source->tb_categoria_idtb_categoria . \"</td>\n <td style='text-align: center'>\" . $source->tb_editora_idtb_editora . \"</td>\n <td style='text-align: center'><a href='?act=upd&id=\" . $source->idtb_livro . \"' title='Alterar'><i class='ti-reload'></i></a></td>\n <td style='text-align: center'><a href='?act=del&id=\" . $source->idtb_livro . \"' title='Remover'><i class='ti-close'></i></a></td>\n </tr>\";\n endforeach;\n echo \"\n</tbody>\n </table>\n <div class='box-paginacao' style='text-align: center'>\n <a class='box-navegacao $exibir_botao_inicio' href='$endereco?page=$primeira_pagina' title='Primeira Página'> Primeira |</a>\n <a class='box-navegacao $exibir_botao_inicio' href='$endereco?page=$pagina_anterior' title='Página Anterior'> Anterior |</a>\n\";\n /* Loop para montar a páginação central com os números */\n for ($i = $range_inicial; $i <= $range_final; $i++):\n $destaque = ($i == $pagina_atual) ? 'destaque' : '';\n echo \"<a class='box-numero $destaque' href='$endereco?page=$i'> ( $i ) </a>\";\n endfor;\n echo \"<a class='box-navegacao $exibir_botao_final' href='$endereco?page=$proxima_pagina' title='Próxima Página'>| Próxima </a>\n <a class='box-navegacao $exibir_botao_final' href='$endereco?page=$ultima_pagina' title='Última Página'>| Última </a>\n </div>\";\n else:\n echo \"<p class='bg-danger'>Nenhum registro foi encontrado!</p>\n \";\n endif;\n }", "title": "" }, { "docid": "2d64ac032a9cb88e1c09476aa168ac1d", "score": "0.49949446", "text": "public function getPeriods() {\n\treturn $this->periods;\n }", "title": "" }, { "docid": "55f9669d81b1538aafb79497cf4a836d", "score": "0.49917018", "text": "function planmyday_woocommerce_pagination() {\n\t\t$style = planmyday_get_custom_option('blog_pagination');\n\t\tplanmyday_show_pagination(array(\n\t\t\t'class' => 'pagination_wrap pagination_' . esc_attr($style),\n\t\t\t'style' => $style,\n\t\t\t'button_class' => '',\n\t\t\t'first_text'=> '',\n\t\t\t'last_text' => '',\n\t\t\t'prev_text' => '',\n\t\t\t'next_text' => '',\n\t\t\t'pages_in_group' => $style=='pages' ? 10 : 20\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "37852ee147b45ed0808fc0eae7252901", "score": "0.49911258", "text": "public function __construct() {\n \n $DAY = new LetoPeriodStructureBean(1, null);\n\n $DIRTYDAYS = \n new LetoPeriodStructureBean(5, \n array (\n $DAY, $DAY, $DAY, $DAY, $DAY \n )\n ); \n\n $DIRTYDAYS_LEAP = \n new LetoPeriodStructureBean(6, \n array (\n $DAY, $DAY, $DAY, $DAY, $DAY, $DAY\n )\n ); \n\n $MONTH = \n new LetoPeriodStructureBean(36, \n array (\n $DAY, $DAY, $DAY, $DAY, $DAY, $DAY, \n $DAY, $DAY, $DAY, $DAY, $DAY, $DAY, \n $DAY, $DAY, $DAY, $DAY, $DAY, $DAY, \n $DAY, $DAY, $DAY, $DAY, $DAY, $DAY, \n $DAY, $DAY, $DAY, $DAY, $DAY, $DAY, \n $DAY, $DAY, $DAY, $DAY, $DAY, $DAY\n )\n );\n \n $YAR = new LetoBogomilMonth(36,$MONTH->getSubPeriods(), 1);\n $FIAR = new LetoBogomilMonth(36,$MONTH->getSubPeriods(), 2);\n $MAR = new LetoBogomilMonth(36,$MONTH->getSubPeriods(), 3);\n $RAR = new LetoBogomilMonth(36,$MONTH->getSubPeriods(), 4);\n $YUAR = new LetoBogomilMonth(36,$MONTH->getSubPeriods(), 5);\n $AVRAR = new LetoBogomilMonth(36,$MONTH->getSubPeriods(), 6);\n $SEVAR = new LetoBogomilMonth(36,$MONTH->getSubPeriods(), 7);\n $OKAR = new LetoBogomilMonth(36,$MONTH->getSubPeriods(), 8);\n $NOAR = new LetoBogomilMonth(36,$MONTH->getSubPeriods(), 9);\n $DEKAR = new LetoBogomilMonth(36,$MONTH->getSubPeriods(), 10);\n\n \n $YEAR = \n new LetoPeriodStructureBean(365, \n array ( \n $DIRTYDAYS,\n $YAR, $FIAR, $MAR, $RAR, $YUAR,\n $AVRAR, $SEVAR, $OKAR, $NOAR, $DEKAR \n )\n );\n //-----------------------------------------------------------\n // 1 YEAR\n //-----------------------------------------------------------\n $YEAR_LEAP = \n new LetoPeriodStructureBean(366, \n array ( \n $DIRTYDAYS_LEAP,\n $YAR, $FIAR, $MAR, $RAR, $YUAR,\n $AVRAR, $SEVAR, $OKAR, $NOAR, $DEKAR \n ),\n true\n );\n \n //-----------------------------------------------------------\n // 4 YEARS\n //-----------------------------------------------------------\n $YEARS_4 = \n new LetoPeriodStructureBean(1460, \n array (\n $YEAR, $YEAR, $YEAR, $YEAR\n )\n );\n $YEARS_4_LEAP = \n new LetoPeriodStructureBean(1461, \n array (\n $YEAR, $YEAR, $YEAR, $YEAR_LEAP\n ),\n true\n );\n \n //-----------------------------------------------------------\n // 60 YEARS\n //-----------------------------------------------------------\n $STAR_DAY = \n new LetoPeriodStructureBean(21914, \n array (\n $YEARS_4_LEAP, $YEARS_4_LEAP, $YEARS_4_LEAP, $YEARS_4_LEAP, $YEARS_4_LEAP,\n $YEARS_4_LEAP, $YEARS_4_LEAP, $YEARS_4_LEAP, $YEARS_4_LEAP, $YEARS_4_LEAP,\n $YEARS_4_LEAP, $YEARS_4_LEAP, $YEARS_4_LEAP, $YEARS_4_LEAP, $YEARS_4,\n )\n );\n $STAR_DAY_LEAP = \n new LetoPeriodStructureBean(21915, \n array (\n $YEARS_4_LEAP, $YEARS_4_LEAP, $YEARS_4_LEAP, $YEARS_4_LEAP, $YEARS_4_LEAP,\n $YEARS_4_LEAP, $YEARS_4_LEAP, $YEARS_4_LEAP, $YEARS_4_LEAP, $YEARS_4_LEAP,\n $YEARS_4_LEAP, $YEARS_4_LEAP, $YEARS_4_LEAP, $YEARS_4_LEAP, $YEARS_4_LEAP,\n ),\n true\n );\n \n //-----------------------------------------------------------\n // 420 YEARS\n //-----------------------------------------------------------\n $STAR_WEEK = \n new LetoPeriodStructureBean(153401, \n array (\n $STAR_DAY, \n $STAR_DAY_LEAP, \n $STAR_DAY, \n $STAR_DAY_LEAP, \n $STAR_DAY, \n $STAR_DAY_LEAP, \n $STAR_DAY\n )\n );\n $STAR_WEEK_LEAP = \n new LetoPeriodStructureBean(153402, \n array (\n $STAR_DAY, \n $STAR_DAY_LEAP, \n $STAR_DAY, \n $STAR_DAY_LEAP, \n $STAR_DAY, \n $STAR_DAY_LEAP, \n $STAR_DAY_LEAP\n ),\n true\n );\n \n //-----------------------------------------------------------\n // 1 680 YEARS\n //-----------------------------------------------------------\n $STAR_MONTH = \n new LetoPeriodStructureBean(613606, \n array (\n $STAR_WEEK_LEAP, $STAR_WEEK, $STAR_WEEK_LEAP, $STAR_WEEK\n )\n );\n $STAR_MONTH_LEAP = \n new LetoPeriodStructureBean(613607, \n array (\n $STAR_WEEK_LEAP, $STAR_WEEK, $STAR_WEEK_LEAP, $STAR_WEEK_LEAP\n ),\n true\n );\n \n //-----------------------------------------------------------\n // 20 160 YEARS\n //-----------------------------------------------------------\n $STAR_YEAR = \n new LetoPeriodStructureBean(7363282, \n array (\n $STAR_MONTH_LEAP, $STAR_MONTH_LEAP, $STAR_MONTH_LEAP,\n $STAR_MONTH_LEAP, $STAR_MONTH_LEAP, $STAR_MONTH,\n $STAR_MONTH_LEAP, $STAR_MONTH_LEAP, $STAR_MONTH_LEAP,\n $STAR_MONTH_LEAP, $STAR_MONTH_LEAP, $STAR_MONTH\n )\n );\n $STAR_YEAR_LEAP = \n new LetoPeriodStructureBean(7363283, \n array (\n $STAR_MONTH_LEAP, $STAR_MONTH_LEAP, $STAR_MONTH_LEAP,\n $STAR_MONTH_LEAP, $STAR_MONTH_LEAP, $STAR_MONTH,\n $STAR_MONTH_LEAP, $STAR_MONTH_LEAP, $STAR_MONTH_LEAP,\n $STAR_MONTH_LEAP, $STAR_MONTH_LEAP, $STAR_MONTH_LEAP\n ),\n true\n );\n \n //-----------------------------------------------------------\n // 80 640 YEARS\n //-----------------------------------------------------------\n $STAR_YEARS_4 = \n new LetoPeriodStructureBean(29453131, \n array (\n $STAR_YEAR_LEAP, $STAR_YEAR, $STAR_YEAR_LEAP, $STAR_YEAR_LEAP\n )\n );\n $STAR_YEARS_4_LEAP = \n new LetoPeriodStructureBean(29453132, \n array (\n $STAR_YEAR_LEAP, $STAR_YEAR_LEAP, $STAR_YEAR_LEAP, $STAR_YEAR_LEAP\n ),\n true\n );\n \n //-----------------------------------------------------------\n // 10 080 000 YEARS\n //-----------------------------------------------------------\n $STAR_YEARS_4x125 = \n new LetoPeriodStructureBean(3681641376, \n array (\n $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4,\n $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4,\n \n $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4,\n $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4,\n \n $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4,\n $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4,\n \n $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4,\n $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4,\n \n $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4,\n $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4,\n \n $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4,\n $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4,\n \n $STAR_YEARS_4, $STAR_YEARS_4,\n \n $STAR_YEARS_4_LEAP,\n \n $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4,\n $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4,\n \n $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4,\n $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4,\n \n $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4,\n $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4,\n \n $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4,\n $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4,\n \n $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4,\n $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4,\n \n $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4,\n $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4, $STAR_YEARS_4,\n \n $STAR_YEARS_4, $STAR_YEARS_4\n )\n );\n // -------------------------------------------------------------------------------------------//\n // T Y P E S //\n // -------------------------------------------------------------------------------------------//\n \n $DAY_PERIOD_TYPE = \n new LetoPeriodTypeBean(\"Day\", \"1 day period\",\n array ( $DAY )\n ); \n \n $MONTH_PERIOD_TYPE = \n new LetoPeriodTypeBean(\"Month\", \"5, 6 or 36 days period\", \n array ( \n $DIRTYDAYS,\n $YAR,\n $FIAR,\n $MAR,\n $RAR,\n $YUAR,\n $AVRAR,\n $SEVAR,\n $OKAR,\n $NOAR,\n $DEKAR,\n $DIRTYDAYS_LEAP,\n )\n );\n \n $YEAR_PERIOD_TYPE = \n new LetoPeriodTypeBean(\"Year\", \"Year\", \n array ( $YEAR, $YEAR_LEAP )\n );\n \n $YEARS_4_PERIOD_TYPE = \n new LetoPeriodTypeBean(\"4 years\", \"4 Years\", \n array ( $YEARS_4, $YEARS_4_LEAP )\n );\n \n $STAR_DAY_PERIOD_TYPE = \n new LetoPeriodTypeBean(\"Star Day\", \"60 years\", \n array ( $STAR_DAY, $STAR_DAY_LEAP )\n );\n \n $STAR_WEEK_PERIOD_TYPE = \n new LetoPeriodTypeBean(\"Star Week\", \"420 years\", \n array ( $STAR_WEEK, $STAR_WEEK_LEAP )\n );\n \n $STAR_MONTH_PERIOD_TYPE = \n new LetoPeriodTypeBean(\"Star Month\", \"1680 years\", \n array ( $STAR_MONTH, $STAR_MONTH_LEAP )\n );\n \n $STAR_YEAR_PERIOD_TYPE = \n new LetoPeriodTypeBean(\"Star Year\", \"2160 years\", \n array ( $STAR_YEAR, $STAR_YEAR_LEAP )\n );\n \n $STAR_YEAR_4_PERIOD_TYPE = \n new LetoPeriodTypeBean(\"Star 4 Years Period\", \"80640 years\", \n array ( $STAR_YEARS_4_LEAP, $STAR_YEARS_4 )\n );\n \n $STAR_YEAR_4x125_PERIOD_TYPE = \n new LetoPeriodTypeBean(\"Star 125 Years Period\", \"10 080 000 years\", \n array ( $STAR_YEARS_4x125 )\n );\n\n \n $this->TYPES = array ( \n $DAY_PERIOD_TYPE, \n $MONTH_PERIOD_TYPE,\n $YEAR_PERIOD_TYPE,\n $YEARS_4_PERIOD_TYPE,\n $STAR_DAY_PERIOD_TYPE,\n $STAR_WEEK_PERIOD_TYPE,\n $STAR_MONTH_PERIOD_TYPE,\n $STAR_YEAR_PERIOD_TYPE,\n $STAR_YEAR_4_PERIOD_TYPE,\n $STAR_YEAR_4x125_PERIOD_TYPE\n );\n //----------------------------\n //Day\n $LetoBogomil_DAYLengths = array();\n $DAY->setTotalLengthInPeriodTypes($LetoBogomil_DAYLengths);\n // Pseudo Month\n //----------------------------\n $LetoBogomil_DirtyDaysLengths = array($DAY_PERIOD_TYPE->getName() => '5');\n $DIRTYDAYS->setTotalLengthInPeriodTypes($LetoBogomil_DirtyDaysLengths);\n // Pseudo Month\n //----------------------------\n $LetoBogomil_DirtyDaysLeapLengths = array($DAY_PERIOD_TYPE->getName() => '6');\n $DIRTYDAYS_LEAP->setTotalLengthInPeriodTypes($LetoBogomil_DirtyDaysLeapLengths);\n //Month\n $LetoBogomil_YarLengths = array($DAY_PERIOD_TYPE->getName() => '36');\n $YAR->setTotalLengthInPeriodTypes($LetoBogomil_YarLengths);\n //----------------------------\n //Month\n $LetoBogomil_FiarLengths = array($DAY_PERIOD_TYPE->getName() => '36');\n $FIAR->setTotalLengthInPeriodTypes($LetoBogomil_FiarLengths);\n //----------------------------\n //Month\n $LetoBogomil_MarLengths = array($DAY_PERIOD_TYPE->getName() => '36');\n $MAR->setTotalLengthInPeriodTypes($LetoBogomil_MarLengths);\n //----------------------------\n //Month\n $LetoBogomil_RarLengths = array($DAY_PERIOD_TYPE->getName() => '36');\n $RAR->setTotalLengthInPeriodTypes($LetoBogomil_RarLengths);\n //----------------------------\n //Month\n $LetoBogomil_YuarLengths = array($DAY_PERIOD_TYPE->getName() => '36');\n $YUAR->setTotalLengthInPeriodTypes($LetoBogomil_YuarLengths);\n //----------------------------\n //Month\n $LetoBogomil_AvrarLengths = array($DAY_PERIOD_TYPE->getName() => '36');\n $AVRAR->setTotalLengthInPeriodTypes($LetoBogomil_AvrarLengths);\n //----------------------------\n //Month\n $LetoBogomil_SevarLengths = array($DAY_PERIOD_TYPE->getName() => '36');\n $SEVAR->setTotalLengthInPeriodTypes($LetoBogomil_SevarLengths);\n //----------------------------\n //Month\n $LetoBogomil_OkarLengths = array($DAY_PERIOD_TYPE->getName() => '36');\n $OKAR->setTotalLengthInPeriodTypes($LetoBogomil_OkarLengths);\n //----------------------------\n //Month\n $LetoBogomil_NoarLengths = array($DAY_PERIOD_TYPE->getName() => '36');\n $NOAR->setTotalLengthInPeriodTypes($LetoBogomil_NoarLengths);\n //----------------------------\n //Month\n $LetoBogomil_DekarLengths = array($DAY_PERIOD_TYPE->getName() => '36');\n $DEKAR->setTotalLengthInPeriodTypes($LetoBogomil_DekarLengths);\n //----------------------------\n //Year\n $LetoBogomil_YEARLengths = array($DAY_PERIOD_TYPE->getName() => '365', \n $MONTH_PERIOD_TYPE->getName() => '12');\n $YEAR->setTotalLengthInPeriodTypes($LetoBogomil_YEARLengths);\n //----------------------------\n //Year\n $LetoBogomil_YEAR_LEAPLengths = array($DAY_PERIOD_TYPE->getName() => '366', \n $MONTH_PERIOD_TYPE->getName() => '12');\n $YEAR_LEAP->setTotalLengthInPeriodTypes($LetoBogomil_YEAR_LEAPLengths);\n //----------------------------\n //4 years\n $LetoBogomil_YEARS_4Lengths = array($YEAR_PERIOD_TYPE->getName() => '4', \n $MONTH_PERIOD_TYPE->getName() => '48', \n $DAY_PERIOD_TYPE->getName() => '1460');\n $YEARS_4->setTotalLengthInPeriodTypes($LetoBogomil_YEARS_4Lengths);\n //----------------------------\n //4 years\n $LetoBogomil_YEARS_4_LEAPLengths = array($YEAR_PERIOD_TYPE->getName() => '4', \n $MONTH_PERIOD_TYPE->getName() => '48', \n $DAY_PERIOD_TYPE->getName() => '1461');\n $YEARS_4_LEAP->setTotalLengthInPeriodTypes($LetoBogomil_YEARS_4_LEAPLengths);\n //----------------------------\n //Star Day\n $LetoBogomil_STAR_DAYLengths = array($YEARS_4_PERIOD_TYPE->getName() => '15',\n $YEAR_PERIOD_TYPE->getName() => '60', \n $MONTH_PERIOD_TYPE->getName() => '720',\n $DAY_PERIOD_TYPE->getName() => '21914');\n $STAR_DAY->setTotalLengthInPeriodTypes($LetoBogomil_STAR_DAYLengths);\n //----------------------------\n //Star Day\n $LetoBogomil_STAR_DAY_LEAPLengths = array($YEARS_4_PERIOD_TYPE->getName() => '15',\n $YEAR_PERIOD_TYPE->getName() => '60', \n $MONTH_PERIOD_TYPE->getName() => '720',\n $DAY_PERIOD_TYPE->getName() => '21915');\n $STAR_DAY_LEAP->setTotalLengthInPeriodTypes($LetoBogomil_STAR_DAY_LEAPLengths);\n //----------------------------\n //Star Week\n $LetoBogomil_STAR_WEEKLengths = array($STAR_DAY_PERIOD_TYPE->getName() => '7',\n $YEARS_4_PERIOD_TYPE->getName() => '105',\n $YEAR_PERIOD_TYPE->getName() => '420',\n $MONTH_PERIOD_TYPE->getName() => '5040',\n $DAY_PERIOD_TYPE->getName() => '153401');\n $STAR_WEEK->setTotalLengthInPeriodTypes($LetoBogomil_STAR_WEEKLengths);\n //----------------------------\n //Star Week\n $LetoBogomil_STAR_WEEK_LEAPLengths = array($STAR_DAY_PERIOD_TYPE->getName() => '7',\n $YEARS_4_PERIOD_TYPE->getName() => '105',\n $YEAR_PERIOD_TYPE->getName() => '420',\n $MONTH_PERIOD_TYPE->getName() => '5040',\n $DAY_PERIOD_TYPE->getName() => '153402');\n $STAR_WEEK_LEAP->setTotalLengthInPeriodTypes($LetoBogomil_STAR_WEEK_LEAPLengths);\n //----------------------------\n //Star Month\n $LetoBogomil_STAR_MONTHLengths = array($STAR_WEEK_PERIOD_TYPE->getName() => '4',\n $STAR_DAY_PERIOD_TYPE->getName() => '28',\n $YEARS_4_PERIOD_TYPE->getName() => '420',\n $YEAR_PERIOD_TYPE->getName() => '1680',\n $MONTH_PERIOD_TYPE->getName() => '20160',\n $DAY_PERIOD_TYPE->getName() => '613606');\n $STAR_MONTH->setTotalLengthInPeriodTypes($LetoBogomil_STAR_MONTHLengths);\n //----------------------------\n //Star Month\n $LetoBogomil_STAR_MONTH_LEAPLengths = array($STAR_WEEK_PERIOD_TYPE->getName() => '4',\n $STAR_DAY_PERIOD_TYPE->getName() => '28',\n $YEARS_4_PERIOD_TYPE->getName() => '420',\n $YEAR_PERIOD_TYPE->getName() => '1680',\n $MONTH_PERIOD_TYPE->getName() => '20160',\n $DAY_PERIOD_TYPE->getName() => '613607');\n $STAR_MONTH_LEAP->setTotalLengthInPeriodTypes($LetoBogomil_STAR_MONTH_LEAPLengths);\n //----------------------------\n //Star Year\n $LetoBogomil_STAR_YEARLengths = array($STAR_MONTH_PERIOD_TYPE->getName() => '12',\n $STAR_WEEK_PERIOD_TYPE->getName() => '48',\n $STAR_DAY_PERIOD_TYPE->getName() => '336',\n $YEARS_4_PERIOD_TYPE->getName() => '5040',\n $YEAR_PERIOD_TYPE->getName() => '20160',\n $MONTH_PERIOD_TYPE->getName() => '241920',\n $DAY_PERIOD_TYPE->getName() => '7363282');\n $STAR_YEAR->setTotalLengthInPeriodTypes($LetoBogomil_STAR_YEARLengths);\n //----------------------------\n //Star Year\n $LetoBogomil_STAR_YEAR_LEAPLengths = array($STAR_MONTH_PERIOD_TYPE->getName() => '12',\n $STAR_WEEK_PERIOD_TYPE->getName() => '48',\n $STAR_DAY_PERIOD_TYPE->getName() => '336',\n $YEARS_4_PERIOD_TYPE->getName() => '5040',\n $YEAR_PERIOD_TYPE->getName() => '20160',\n $MONTH_PERIOD_TYPE->getName() => '241920',\n $DAY_PERIOD_TYPE->getName() => '7363283');\n $STAR_YEAR_LEAP->setTotalLengthInPeriodTypes($LetoBogomil_STAR_YEAR_LEAPLengths);\n //----------------------------\n //Star 4 Years Period\n $LetoBogomil_STAR_YEARS_4_LEAPLengths = array($STAR_YEAR_PERIOD_TYPE->getName() => '4',\n $STAR_MONTH_PERIOD_TYPE->getName() => '48',\n $STAR_WEEK_PERIOD_TYPE->getName() => '192',\n $STAR_DAY_PERIOD_TYPE->getName() => '1344',\n $YEARS_4_PERIOD_TYPE->getName() => '20160',\n $YEAR_PERIOD_TYPE->getName() => '80640',\n $MONTH_PERIOD_TYPE->getName() => '967680',\n $DAY_PERIOD_TYPE->getName() => '29453132');\n $STAR_YEARS_4_LEAP->setTotalLengthInPeriodTypes($LetoBogomil_STAR_YEARS_4_LEAPLengths);\n //----------------------------\n //Star 4 Years Period\n $LetoBogomil_STAR_YEARS_4Lengths = array($STAR_YEAR_PERIOD_TYPE->getName() => '4',\n $STAR_MONTH_PERIOD_TYPE->getName() => '48',\n $STAR_WEEK_PERIOD_TYPE->getName() => '192',\n $STAR_DAY_PERIOD_TYPE->getName() => '1344',\n $YEARS_4_PERIOD_TYPE->getName() => '20160',\n $YEAR_PERIOD_TYPE->getName() => '80640',\n $MONTH_PERIOD_TYPE->getName() => '967680',\n $DAY_PERIOD_TYPE->getName() => '29453131');\n $STAR_YEARS_4->setTotalLengthInPeriodTypes($LetoBogomil_STAR_YEARS_4Lengths);\n //----------------------------\n //Star 125 Years Period\n $LetoBogomil_STAR_YEARS_4x125Lengths = \n array($STAR_YEAR_4_PERIOD_TYPE->getName() => '125',\n $STAR_YEAR_PERIOD_TYPE->getName() => '500',\n $STAR_MONTH_PERIOD_TYPE->getName() => '6000',\n $STAR_WEEK_PERIOD_TYPE->getName() => '24000',\n $STAR_DAY_PERIOD_TYPE->getName() => '168000',\n $YEARS_4_PERIOD_TYPE->getName() => '2520000',\n $YEAR_PERIOD_TYPE->getName() => '10080000',\n $MONTH_PERIOD_TYPE->getName() => '120960000',\n $DAY_PERIOD_TYPE->getName() => '3681641376');\n $STAR_YEARS_4x125->setTotalLengthInPeriodTypes($LetoBogomil_STAR_YEARS_4x125Lengths);\n }", "title": "" }, { "docid": "6ca198dfdf7edb8fa5a3419b64e95ad5", "score": "0.49911034", "text": "private function paginar($sql)\r\n\t{\r\n\t\t$sqlCount \t = self::preparaQueryCount($sql);\r\n\t\t$totalRegistro = $this->db->pegaUm($sqlCount);\r\n\t\t// Pega offset da paginação (de onde deve começar a lista)\r\n\t\t$offset \t = self::offsetPaginacao($totalRegistro);\t\t\r\n\t\t$numRegistro = $this->numRegistro; \r\n\t\tif ($this->param['ordem']){\r\n\t\t\t$sql .= \" ORDER BY \" . $this->param['ordem'];\r\n\t\t}\r\n\t\t$sql \t\t .= \" LIMIT {$numRegistro} OFFSET {$offset}\";\r\n\t\t$dados \t\t = $this->db->carregar($sql);\r\n\t\treturn array(\"total\" \t\t => $totalRegistro,\r\n\t\t\t\t\t \"totalPagina\" \t => ceil($totalRegistro / $this->numRegistro),\r\n\t\t\t\t\t \"ordem\" \t \t => explode(\" \", $this->param['ordem']),\r\n\t\t\t\t\t \"pagina\" \t \t => $this->param['pag'],\r\n\t\t\t\t\t \"identificador\" => self::$identificador,\r\n\t\t\t\t\t \"dados\" \t\t => ($dados ? $dados : array()));\r\n\t}", "title": "" }, { "docid": "d8a4f0c0e70c93836c620395bfa0d0ed", "score": "0.49876386", "text": "public function getPage($page = 1, $rp = 10);", "title": "" }, { "docid": "dc55d83ed80edbb4cf828249e3ed0727", "score": "0.49853197", "text": "private function calculate_diff()\n\t{\t\t\n\t\t$diff = Kohana_Date::span($this->_time, $this->_next_time);\n\t\t// convert weeks to days\n\t\t$diff['days'] += $diff['weeks'] * 7;\n\t\t$diff['weeks'] = 0;\n\t\treturn $diff;\n\t}", "title": "" }, { "docid": "1c9479cd1f3e0158b5610435a8f637a3", "score": "0.4984222", "text": "function wct_talks_get_pagination_count() {\n\t\t$query_loop = wct()->query_loop;\n\t\t$start_num = intval( ( $query_loop->page - 1 ) * $query_loop->per_page ) + 1;\n\t\t$from_num = number_format_i18n( $start_num );\n\t\t$to_num = number_format_i18n( ( $start_num + ( $query_loop->per_page - 1 ) > $query_loop->total_talk_count ) ? $query_loop->total_talk_count : $start_num + ( $query_loop->per_page - 1 ) );\n\t\t$total = number_format_i18n( $query_loop->total_talk_count );\n\t\t$pag = sprintf( _n( 'Viewing %1$s to %2$s (of %3$s talks)', 'Viewing %1$s to %2$s (of %3$s talks)', $total, 'wordcamp-talks' ), $from_num, $to_num, $total );\n\n\t\t/**\n\t\t * @param string $pag the pagination count to output\n\t\t */\n\t\treturn apply_filters( 'wct_talks_get_pagination_count', $pag );\n\t}", "title": "" }, { "docid": "7fa2de507abc137014e4992b8d536b2b", "score": "0.49839926", "text": "function estadistica_31()\n\t\t{\n\t\t\t$this->sql=\"select count(*) as contador from publicacion \";\n\t\t\t$this->sql.=\"where tpub_id = (select tpub_id from tipo_publicacion where tpub_descripcion='patente') \";\n\t\t\t$this->sql.=\"and publicacion.pub_año between (YEAR(CURDATE())-2) AND YEAR(CURDATE())\";\n\t\t\treturn parent::ejecutaQUERY();\n\t\t}", "title": "" }, { "docid": "39a980ad1c8d8417fc78b1fdeabe8de6", "score": "0.4983761", "text": "public function getPages() {\n\t\t$this->pages = ceil($this->total / $this->perPage);\n\t\t// Validate current page\n\t\tif($this->currentPage < 1) {\n\t\t\t$this->currentPage = 1;\n\t\t} elseif($this->currentPage > $this->pages) {\n\t\t\t$this->currentPage = $this->pages;\n\t\t}\n\t\t// Get our page cut off\n\t\t$pageNumbers = $this->getPagesCutOff();\n\t\t// Init\n\t\t$next = $previous = $first = $last = null;\n\t\t// If we have more than one page add the first and previous\n\t\tif($this->pages > 1 && $this->currentPage > 1) {\n\t\t\t$first = $this->buildLink($this->strings['first'], $this->start, $this->getLocation(), $this->getParams(), array_merge($this->getLinkHtmlOptions(), array('_class' => 'first')));\n\t\t\t$previous = $this->buildLink($this->strings['previous'], $this->currentPage-1, $this->getLocation(), $this->getParams(), array_merge($this->getLinkHtmlOptions(), array('_class' => 'previous')));\n\t\t}\n\t\t// Loop and create links\n\t\tforeach($pageNumbers as $i) {\n\t\t\t$this->links[] = $this->buildLink($i, $i, $this->getLocation(), $this->getParams(), $this->getLinkHtmlOptions());\n\t\t}\n\t\t// If we have more than one page add the next and last\n\t\tif($this->pages > 1 && $this->currentPage < $this->pages) {\n\t\t\t$next = $this->buildLink($this->strings['next'], $this->currentPage+1, $this->getLocation(), $this->getParams(), array_merge($this->getLinkHtmlOptions(), array('_class' => 'next')));\n\t\t\t$last = $this->buildLink($this->strings['last'], $this->pages, $this->getLocation(), $this->getParams(), array_merge($this->getLinkHtmlOptions(), array('_class' => 'last')));\n\t\t}\n\t\treturn str_replace(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'{\n\t\titems\n\t}\n\t', '{\n\t\ttotal\n\t}\n\t', '{\n\t\tpages\n\t}\n\t', '{\n\t\tcurrent\n\t}\n\t', '{\n\t\tfirst\n\t}\n\t', '{\n\t\tprevious\n\t}\n\t', '{\n\t\tnext\n\t}\n\t', '{\n\t\tlast\n\t}\n\t',\n\t\t\t\t\t\t'{\n\t\tdataStart\n\t}\n\t', '{\n\t\tdataCurrent\n\t}\n\t', '{\n\t\tdataRange\n\t}\n\t', '{\n\t\tdataEnd\n\t}\n\t', '{\n\t\tdataLast\n\t}\n\t'\n\t\t\t\t\t), \n\t\t\t\t\tarray(\n\t\t\t\t\t\timplode(' ', $this->links), $this->total, $this->pages, $this->currentPage, $first, $previous, $next, $last,\n\t\t\t\t\t\t$this->dataStart, $this->currentPage, $this->perPage, $this->dataEnd, $this->pages\n\t\t\t\t\t), \n\t\t\t\t$this->itemsTemplate);\n\t}", "title": "" } ]
2ce52e9172bc0078ac6e40fbfe9cff0d
Returns the percentage of headshots relative to the shots hit with this weapon. Calculates the value if needed.
[ { "docid": "3b55c7864e18dc3955d5ebd37873ef2f", "score": "0.8047144", "text": "public function getHeadshotPercentage() {\n if(empty($this->headshotPercentage)) {\n $this->headshotPercentage = $this->headshots / $this->hits;\n }\n\n return $this->headshotPercentage;\n }", "title": "" } ]
[ { "docid": "8b9a82f8c26511415d03ba4c9f90d92f", "score": "0.7944715", "text": "public function getHitPercentage() {\n if(empty($this->hitPercentage)) {\n $this->hitPercentage = $this->hits / $this->shots;\n }\n\n return $this->hitPercentage;\n }", "title": "" }, { "docid": "2daa6868cb9bb71bf7594a8e0f7eed55", "score": "0.66923016", "text": "public function getHpPercentCount()\n {\n return $this->count(self::HP_PERCENT);\n }", "title": "" }, { "docid": "84c210eee177263c91ebad5012fce03e", "score": "0.6652099", "text": "public function getAvgShotsPerKill() {\n return $this->shots / $this->kills;\n }", "title": "" }, { "docid": "c6e792f7aac91e675119115a4dc36c7c", "score": "0.6339871", "text": "public function percentage() {\n\t\tif ( !isset( $this->cache[__METHOD__] ) ) {\n\t\t\t$this->cache[__METHOD__] = $this->calc( $this->rawPercentage(), 'percentage' );\n\t\t}\n\t\treturn $this->cache[__METHOD__];\n\t}", "title": "" }, { "docid": "edd978045be364289fa36b56b6850f1e", "score": "0.6119741", "text": "public function getPercentage()\n\t\t{\n\t\t\treturn $this->getCurrent() / $this->max;\n\t\t}", "title": "" }, { "docid": "29fafe6fabd89a4ef1fe4f89161817eb", "score": "0.60580033", "text": "public function getPercentage() {\n return $this->percentage;\n }", "title": "" }, { "docid": "cc5cda0346dbd633bd7c54f3e2678989", "score": "0.6045188", "text": "public function getPercent()\n {\n return $this->percent;\n }", "title": "" }, { "docid": "cc5cda0346dbd633bd7c54f3e2678989", "score": "0.6045188", "text": "public function getPercent()\n {\n return $this->percent;\n }", "title": "" }, { "docid": "3297992bc74e412cb18f07b60ac3c622", "score": "0.60353935", "text": "public function getHeadshots()\n {\n $qb = $this->createQueryBuilder('s');\n $qb->select('SUM(s.headshots)');\n $query = $qb->getQuery();\n return $query->getSingleScalarResult();\n }", "title": "" }, { "docid": "155bcb20e925a567e6875d234cd5a957", "score": "0.6026539", "text": "public function winPercentageSingle() {\n $played = $this->matchesPlayedSingle();\n\n if ($played !== 0) {\n return round($this->matchesWonSingle() / $this->matchesPlayedSingle() * 100);\n }\n\n return 0;\n }", "title": "" }, { "docid": "72c32d9321e913c80faabff99c1a51bc", "score": "0.60113704", "text": "public function getPercentUsed()\n {\n if ($this->_total > 0) {\n return ceil($this->_used / $this->_total * 100);\n } else {\n return 0;\n }\n }", "title": "" }, { "docid": "e07ce4e70e473a3405b20801ca4ebb31", "score": "0.59972084", "text": "public function getAttackPerMatch()\n {\n return bcmul($this->avgPerMatch, 3);\n }", "title": "" }, { "docid": "eaabb176b2e84ae9889597c76337f7bd", "score": "0.5991589", "text": "public function getPointsInPercent()\n\t{\n\t\tglobal $ilUser;\n\t\tif (strcmp($this->getSubType(), \"scorm2004\") == 0)\n\t\t{\n\t\t\t$res = ilObjSCORM2004LearningModule::_getUniqueScaledScoreForUser($this->getId(), $ilUser->getId());\n\t\t\tif (!is_null($res)) \n\t\t\t{\n\t\t\t\treturn $res * 100.0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn $res;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}", "title": "" }, { "docid": "51f7224a21fd4cc89208e095eae03fd0", "score": "0.59883326", "text": "public function getPercentage()\n {\n return isset($this->percentage) ? $this->percentage : 0.0;\n }", "title": "" }, { "docid": "66f7a7feb2e23318e848058d3b5bcbc6", "score": "0.5947955", "text": "public function getPercentage()\n\t{\n\t\treturn $this->percentage;\n\t}", "title": "" }, { "docid": "489b899eee71166f6ecf243c284d76da", "score": "0.5898376", "text": "public function getPercentage()\n\t{\n\t\treturn $this->percentage; \n\n\t}", "title": "" }, { "docid": "5dadd462e2d3b4f7c6c68f1a1fd879a3", "score": "0.5892265", "text": "private function calculateTotalAttack(Weapon $weapon, BaseStatStick $artifactStats)\n\t{\n\t\t$characterBaseAttack = $this->character->baseAttack;\n\t\t$weaponBaseAttack = $weapon->baseAttack;\n\n\t\t// Get attack bonus values\n\t\t$totalAttackPercent = $this->character->attackPercent + $weapon->attackPercent + $artifactStats->attackPercent;\n\t\t$totalFlatAttack = $this->character->flatAttack + $weapon->flatAttack + $artifactStats->flatAttack;\n\n\t\t// Smash it all together\n\t\treturn (($characterBaseAttack + $weaponBaseAttack) * (1 + ($totalAttackPercent / 100))) + $totalFlatAttack;\n\t}", "title": "" }, { "docid": "bf60e3d58c13cb158a3079e979a5bef1", "score": "0.58899134", "text": "function getPercentage()\n\t{\n\t\treturn $this->percentage;\n\t}", "title": "" }, { "docid": "3fe68f9e0fe17c886a1d6b68a849167e", "score": "0.58891064", "text": "public function getPercentage()\n {\n return $this->attribute( 'percentage_int' ) / 100;\n }", "title": "" }, { "docid": "6fefc34a13255e7f45ea9ad3acfc5ebb", "score": "0.5815488", "text": "function shootball($basepercent, $offenserating, $defenserating)\n{\n $shotchance = $basepercent + $offenserating - $defenserating * 2;\n $shotresult = rand(1, 100);\n\n if ($shotresult > $shotchance) {\n return 0;\n } else {\n return 1;\n }\n}", "title": "" }, { "docid": "9f462e9c13cb09e04d7276f14b9e54b8", "score": "0.57680964", "text": "public function getPercentageMultiplier()\n {\n return $this->percentage_multiplier;\n }", "title": "" }, { "docid": "e9c827851862c64568fbe9107c7d14fb", "score": "0.5767977", "text": "public function getPercentage() {\n\t\t// Count filled fields\n\t\t$filled = count($this->filled);\n\t\t\n\t\t// Return percentage rounded up to zero decimals\n\t\treturn number_format($filled / $this->total * 100, 0);\n\t}", "title": "" }, { "docid": "fb0db5b33e63a054b44a8edaca6cbe42", "score": "0.5750354", "text": "private function calculateSharpnessFactor()\n {\n return $this->calculateASharpnessFactor($this->getSource()->getArea(), $this->getRendered()->getArea());\n }", "title": "" }, { "docid": "c87b497d689526aabb54482f2a924d61", "score": "0.57379013", "text": "public function calculatePowerLevel(): int\n {\n return $this->getStrength() + $this->getWeaponPower();\n }", "title": "" }, { "docid": "74faf257e1a083ad4f126ad928608d0f", "score": "0.57350624", "text": "public function getWHIP()\n {\n $totalWalks = $this->getTotalWalks();\n $totalHits = $this->getTotalHits();\n $totalInningsPitched = $this->getTotalInningsPitched();\n\n return (($totalWalks + $totalHits) / $totalInningsPitched);\n }", "title": "" }, { "docid": "35b9e767ca0a0b6a3d0822d0aa93984f", "score": "0.56826055", "text": "public function lengthPercentage() {\n\t\tif ( !isset( $this->cache[__METHOD__] ) ) {\n\t\t\t$this->cache[__METHOD__] = $this->calc(\n\t\t\t\tnew Alternative( [ $this->rawLength(), $this->rawPercentage() ] ),\n\t\t\t\t'length'\n\t\t\t);\n\t\t}\n\t\treturn $this->cache[__METHOD__];\n\t}", "title": "" }, { "docid": "e1b6dddccc3f64ad72263b15899273ab", "score": "0.56791395", "text": "public function getPercentage(Collector $collector): float;", "title": "" }, { "docid": "19614c0fd5f31554508465bd3359fec8", "score": "0.56585175", "text": "public function getOverallStat(): int\n {\n return array_sum($this->starters);\n }", "title": "" }, { "docid": "45c5c09292f9423b1f8234cf292815ec", "score": "0.5648208", "text": "public function getUsage() : float\r\n {\r\n $usedSurfaceArea = 0;\r\n foreach ($this->usedRectangles as $usedRect) {\r\n $usedSurfaceArea += $usedRect->getWidth() * $usedRect->getHeight();\r\n if (get_class($usedRect) == 'BinPacking\\WindowedRectangle' &&\r\n $usedRect->getIsHollow()) {\r\n $usedSurfaceArea -= $usedRect->getWindow()->getWidth() * $usedRect->getWindow()->getHeight();\r\n }\r\n }\r\n\r\n return $usedSurfaceArea / ($this->binWidth * $this->binHeight);\r\n }", "title": "" }, { "docid": "e5a4d60ee697c7841bfead1fa715d3a7", "score": "0.56481886", "text": "function getHealth()\n {\n return $this->iHealth;\n }", "title": "" }, { "docid": "4565d7de470b287d96886e1d49895339", "score": "0.56424826", "text": "public function calculatePercentageOfFleetReportingTonerLevels ()\n {\n $percentage = 0;\n $totalDeviceCount = $this->getDevices()->allIncludedDeviceInstances->getCount();\n if ($totalDeviceCount > 0)\n {\n $deviceCount = 0;\n foreach ($this->getDevices()->allIncludedDeviceInstances->getDeviceInstances() as $deviceInstance)\n {\n if ($deviceInstance->isCapableOfReportingTonerLevels)\n {\n $deviceCount++;\n }\n }\n\n $percentage = $deviceCount / $totalDeviceCount * 100;\n }\n\n return $percentage;\n }", "title": "" }, { "docid": "c711f575958bf9d1931fa9a816ceba3b", "score": "0.563852", "text": "public function timePercentage() {\n\t\tif ( !isset( $this->cache[__METHOD__] ) ) {\n\t\t\t$this->cache[__METHOD__] = $this->calc(\n\t\t\t\tnew Alternative( [ $this->rawTime(), $this->rawPercentage() ] ),\n\t\t\t\t'time'\n\t\t\t);\n\t\t}\n\t\treturn $this->cache[__METHOD__];\n\t}", "title": "" }, { "docid": "31259360ceee37fb6e494590170ec85b", "score": "0.5637722", "text": "function calculatePercentScores()\n\t{\n\t\tif ($this->calculationType != 1)\n\t\t{\n\t\t\tforeach ( $this->students as $username => $stuObj )\n\t\t\t{\n\t\t\t\tif ( $stuObj->isWithdrawn() ) { continue; }\n\t\t\t\t\n\t\t\t\t$score = $this->students[$username]->totalPointsEarned;\n\t\t\t\t$poss = $this->students[$username]->possiblePoints;\n//print \"<!-- \".$score. \" / \". $poss. \" -->\\n\";\n\t\t\t\t$this->students[$username]->percentAverage =\n\t\t\t\t\tsprintf('%0.2f', ($score/$poss)*100);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "7b21bd1901895567649de967924473a7", "score": "0.563573", "text": "public function appendHpPercent($value)\n {\n return $this->append(self::HP_PERCENT, $value);\n }", "title": "" }, { "docid": "f727b47d6e92b32996b99562cbafb718", "score": "0.5617564", "text": "public function getProgressAttribute()\n {\n return $this->collected / $this->goal * 100;\n }", "title": "" }, { "docid": "18023837611dd2b029812ccbd35dcc9e", "score": "0.56159544", "text": "public function getCalledClassesPercent()\n {\n return $this->calculatePercent(\n $this->getNumCalledClasses(),\n $this->getNumClasses()\n );\n }", "title": "" }, { "docid": "48fec9157124dd1ea952ec715280ff60", "score": "0.56120485", "text": "public function getHealth()\n {\n return $this->health;\n }", "title": "" }, { "docid": "48fec9157124dd1ea952ec715280ff60", "score": "0.56120485", "text": "public function getHealth()\n {\n return $this->health;\n }", "title": "" }, { "docid": "48fec9157124dd1ea952ec715280ff60", "score": "0.56120485", "text": "public function getHealth()\n {\n return $this->health;\n }", "title": "" }, { "docid": "99dc82a7957f6e1f49164e69e093f3c3", "score": "0.5605471", "text": "public function getCompletionPercent()\n {\n return (int) $this->getProperty('completion_percent');\n }", "title": "" }, { "docid": "59abb43a54b7847dd16a02492ffb0884", "score": "0.5600303", "text": "public static function getUptimePercent() {\n $query = \" SELECT COUNT(*) AS total,\n SUM(v.uptime_lastday) AS uptime\n FROM {alchemy_identity}.vpn v\n join {alchemy_identity}.identity2 i ON v.id = i.vpn_id\n join account a ON i.account_id = a.id\n join account_story acs ON a.id = acs.account_id\n join story s ON acs.story_id = s.id\n WHERE v.state != 0\n AND v.state = 'Ready'\n AND i.status = 'ready'\n AND a.suspended_at IS NULL\n AND s.reclaimed_at IS NULL\";\n $result = DB::select(Functions::prefix($query));\n if (empty($result)) {\n return 0;\n }\n\n return $result[0]->total ? round($result[0]->uptime / $result[0]->total, 2) : 0;\n }", "title": "" }, { "docid": "9f98113e36e3829757b6624aab2125c3", "score": "0.55832475", "text": "public function getScore()\n {\n if ($this->isStrike()) {\n return 10;\n }\n\n if ($this->isGutterball()) {\n return 0;\n }\n\n if ($this->isSpare() && $previous = $this->getPrevious()) {\n return 10 - $previous->getScore();\n }\n\n return (int) $this->getValue();\n }", "title": "" }, { "docid": "09a550083717bc7d2da52d78847bb774", "score": "0.5581031", "text": "public function getGoalsMagicPoints(): float\n {\n return $this->goalsMagicPoints;\n }", "title": "" }, { "docid": "f5463d3a48bfa34da946c18527256063", "score": "0.55744874", "text": "public function getAvgHitsPerKill() {\n if(empty($this->avgHitsPerKill)) {\n $this->avgHitsPerKill = $this->hits / $this->kills;\n }\n\n return $this->avgHitsPerKill;\n }", "title": "" }, { "docid": "2fea6325fa1facb1a0e492bbaad8e9f3", "score": "0.5559811", "text": "public function getProjectileDamage(): int\n {\n }", "title": "" }, { "docid": "87a58a5d987ff2c33925a9e86b88a7e3", "score": "0.55463153", "text": "public function getSimilarityPercentage()\n {\n $this->initialize();\n $this->compare();\n\n return $this->percent;\n }", "title": "" }, { "docid": "147cf7c83c92913a910bedb90b2c5d62", "score": "0.5542235", "text": "public function get_base_defense(){\n return $this->get_info('player_base_defense');\n }", "title": "" }, { "docid": "23d528e81260c4989a1d0912bc8bc8ab", "score": "0.5536622", "text": "public function getSharpeRatio()\r\n\t{\r\n\t\t$statObj = new Statistics();\r\n\r\n\t\t// excess return\r\n\t\t$excessReturnArr = array();\r\n\t\t\r\n\t\tforeach ($this->strategyDailyReturnPerc AS $r) {\r\n\t\t\t$excessReturnArr[] = $r - $this->RFRperDayPerc;\r\n\t\t}\r\n\t\t\r\n\t\t$excessReturnMean = $statObj->mean($excessReturnArr);\r\n\t\t$excessReturnStddev = $statObj->standardDeviation($excessReturnArr);\r\n\t\t\r\n\t\t$sharpe = $excessReturnMean / $excessReturnStddev;\r\n\t\treturn $sharpe;\r\n\t}", "title": "" }, { "docid": "d56fdbf96f06238a87181b137727233b", "score": "0.5524836", "text": "public function numberPercentage() {\n\t\tif ( !isset( $this->cache[__METHOD__] ) ) {\n\t\t\t$this->cache[__METHOD__] = $this->calc(\n\t\t\t\tnew Alternative( [ $this->rawNumber(), $this->rawPercentage() ] ),\n\t\t\t\t'number'\n\t\t\t);\n\t\t}\n\t\treturn $this->cache[__METHOD__];\n\t}", "title": "" }, { "docid": "31d66375f8cb11e7e2beb2e34c1b33e4", "score": "0.5513644", "text": "public function getCalledMethodsPercent()\n {\n return $this->calculatePercent(\n $this->getNumCalledMethods(),\n $this->getNumMethods()\n );\n }", "title": "" }, { "docid": "f29d3067afad344ceb2e02f262beacf4", "score": "0.550599", "text": "public function getDuplicatedPercentage()\n {\n if (is_array($this->phpci->getLastTestOutput())) {\n foreach ($this->phpci->getLastTestOutput() as $logLine) {\n preg_match(\"/([0-9\\.]*)%/\",$logLine,$matches);\n if (isset($matches[1])) {\n return (float) trim($matches[1]);\n }\n }\n }\n\n return 0;\n }", "title": "" }, { "docid": "0ddc5b49a63552b0edf4023cc177ea77", "score": "0.5495105", "text": "public function getHpPercentAt($offset)\n {\n return $this->get(self::HP_PERCENT, $offset);\n }", "title": "" }, { "docid": "f707ef0e2ca38f936509b6d7ed753197", "score": "0.54945153", "text": "public function setsWinPercentageSingle() {\n $sets = $this->totalSetsSingle();\n\n if ($sets !== 0) {\n return round($this->setsWonSingle() / $sets * 100);\n }\n\n return 0;\n }", "title": "" }, { "docid": "7257333b1a104248e34f16c516efc66c", "score": "0.5493276", "text": "public function getProgressPercentage()\n {\n return $this->progress_percentage;\n }", "title": "" }, { "docid": "143e6c47128257130718de345ffac9f6", "score": "0.5473491", "text": "function compute_item_value($item)\n\t{\n\t //value is the half of the value in percent of damage\n\t return (($item['condition'] * str_replace(\".\", \"\", $item['value'])) * 0.005) * 0.5;\n\t}", "title": "" }, { "docid": "2918320f0c61c41a2c218d5a37433f4d", "score": "0.54642594", "text": "public function getTotalPercent($clamp = false) {\n $instance = $this->getActiveVersionInstance();\n if ($instance === null) {\n return NAN;\n }\n return $instance->getTotalPercent($clamp);\n }", "title": "" }, { "docid": "f054cf34c7e5c72e575b67d1965d6acf", "score": "0.54533815", "text": "public function getEstimated()\n\t\t{\n\t\t\tif(!$speed = $this->getSpeed() or !$this->getElapsed()) return 0;\n\n\t\t\treturn round($this->max / $speed);\n\t\t}", "title": "" }, { "docid": "414a5001ca8815153efef98355ff0c7b", "score": "0.5453186", "text": "public function getCountHeadshots()\n {\n return $this->headshots->count();\n }", "title": "" }, { "docid": "bc2ce38ffcb4b55f708207fe60b9f4a7", "score": "0.54452366", "text": "public function getRelativeUsage() {\r\n return $this->getUsed() / $this->getLimit();\r\n }", "title": "" }, { "docid": "010b0f0eb6693737833a72bb67de1253", "score": "0.54408526", "text": "public function rawPercentage() {\n\t\tif ( !isset( $this->cache[__METHOD__] ) ) {\n\t\t\t$this->cache[__METHOD__] = new TokenMatcher( Token::T_PERCENTAGE );\n\t\t}\n\t\treturn $this->cache[__METHOD__];\n\t}", "title": "" }, { "docid": "715e21687b985c2622d8bc9d423b142e", "score": "0.5431238", "text": "public static function getPercentageRaised()\n\t{\n\t\t$totalAmountRaised = 0;\n\t\t$allDonations = Donation::all();\n\t\tforeach ($allDonations as $donation) {\n\t\t\t$totalAmountRaised += $donation->amount;\n\t\t}\n\n\t\treturn ($totalAmountRaised / env('TOTAL_AMOUNT', 5000)) * 100;\n\t}", "title": "" }, { "docid": "b573657c70679632b0f3ce7280f189a3", "score": "0.5420916", "text": "private function calculate_stats()\n\t{\n\t\t$stat_names = array('attack', 'defense', 'shield', 'hp');\n\t\t\n\t\t// Make some ship objects for stat references.\n\t\t$ref_ships = Ship::get_reference_ships();\n\t\t\n\t\tforeach ( $this->ships as $fship )\n\t\t{\n\t\t\t// Get a reference to the generic ship object with ship stats for this type of ship.\n\t\t\t$ship = $ref_ships[$fship->type];\n\n\t\t\t$this->stats = array();\n\t\t\tforeach ( $stat_names as $stat_name )\n\t\t\t\t$this->stats[$stat_name] += ($ship->$stat_name * $fship->count);\n\t\t}\n\t}", "title": "" }, { "docid": "d0332042a194a364dde744c517d3f8fa", "score": "0.5412679", "text": "public function getPercent()\n {\n $total = AnnouncementUser::find()->where(['announcement_id' => $this->id])->count();\n if ($total == 0)\n return 0;\n\n return $this->getConfirmedCount() / $total * 100;\n }", "title": "" }, { "docid": "ef69d85d107da3ee265900e2aa3aa538", "score": "0.5388098", "text": "public function frequencyPercentage() {\n\t\tif ( !isset( $this->cache[__METHOD__] ) ) {\n\t\t\t$this->cache[__METHOD__] = $this->calc(\n\t\t\t\tnew Alternative( [ $this->rawFrequency(), $this->rawPercentage() ] ),\n\t\t\t\t'frequency'\n\t\t\t);\n\t\t}\n\t\treturn $this->cache[__METHOD__];\n\t}", "title": "" }, { "docid": "d2cfcaa473e0c8100d3a2a7b9b9ddb0c", "score": "0.53846896", "text": "public function readablePercentage()\n {\n if (isset($this->attributes['percentage'])) {\n return \"{$this->attributes['percentage']}%\";\n }\n\n return null;\n }", "title": "" }, { "docid": "275e6256de131130476f27d10cc2bd0c", "score": "0.5377137", "text": "public function getHomeScore()\n {\n return $this->data->home_points;\n }", "title": "" }, { "docid": "3d5448bdc4cd8cb4d517a6c8ddc9fc40", "score": "0.53701025", "text": "function getScoreUse(){\n\t\treturn $this->cptUse * 10 / $this->cptUseMax;\n\t}", "title": "" }, { "docid": "e978d7812dd80393e3eb476fe4bb714b", "score": "0.5366235", "text": "function getPriceperhit()\n\t{\n\t\treturn $this->priceperhit;\n\t}", "title": "" }, { "docid": "0781e6743b90c80e3eaba30aebd923a1", "score": "0.5359784", "text": "public function score()\n {\n $score = array_sum($this->getCardsValues());\n $bonus = @$this->handBonuses[$this->identifyHand()];\n\n if (strpos($this->identifyHand(), 'High') === 0) {\n $score += (max($this->getCardsValues()) * 2);\n }\n\n return $score + $bonus;\n }", "title": "" }, { "docid": "171b37f25d2892e07cc0a23d5498058e", "score": "0.5343844", "text": "public function getHealth(): int\n {\n }", "title": "" }, { "docid": "fc06b54f1fe58eb74c7aa835ae4ccacd", "score": "0.5323061", "text": "protected function determine_hit_dice() {\n\t\t$this->hit_dice = 1;\n\t\t$this->description = 'Common gray or red squirrels will bite only in self defense.';\n\t}", "title": "" }, { "docid": "3a0483968f067afeb3340abb16cdceb8", "score": "0.5322454", "text": "public function getUsagePercentage(): ?float\n {\n return $this->_usage_percentage;\n }", "title": "" }, { "docid": "13f0629633952000cd70d252478163be", "score": "0.53112733", "text": "public function getHumidityPercentageNorm() : float\n {\n return $this->humidityPercentageNorm;\n }", "title": "" }, { "docid": "e441d5db6cccb9d4d1286f46b547fa5c", "score": "0.53033674", "text": "function calculateDps($stdClassWeapon, $unitID){\r\n \r\n $weapon = arrayCastRecursive($stdClassWeapon); // StdClass are a PAIN to use in PHP\r\n \r\n // Hardcoded exceptions\r\n $specials = [\r\n 'UEL0103', // lobo\r\n 'XSL0103', // zthuee\r\n 'DAA0206', // mercy\r\n 'XAA0306' // solace\r\n ];\r\n \r\n $isSpecial = in_array($unitID, $specials);\r\n \r\n $shots = 1;\r\n \r\n if (isset($weapon[\"MuzzleSalvoSize\"])) $shots = calculateFireCycle($stdClassWeapon);\r\n \r\n \r\n // fall back to the old calculation formula for the special snowflakes\r\n \r\n if ($isSpecial) {\r\n return ($shots * $weapon[\"Damage\"] * ($weapon[\"DoTPulses\"] ?? 1) ) / (1/($weapon[\"RateOfFire\"]));\r\n }\r\n\r\n \r\n // the rof is rounded to the nearest tick since the game runs in ticks.\r\n // some weapons also have separate charge and reload times which results in them firing less often. yeah.\r\n // in theory if your total MuzzleSalvoDelay is longer than the reload time your weapon waits for the reload time twice,\r\n // but thats pretty much a bug so not taken into account here\r\n \r\n \r\n $trueReload = max(0.1*floor((10 / $weapon[\"RateOfFire\"]) + 0.5), 0.1); \r\n $trueReload = max(\r\n ($weapon[\"RackSalvoChargeTime\"] ?? 0) + ($weapon[\"RackSalvoReloadTime\"] ?? 0) + \r\n ($weapon[\"MuzzleSalvoDelay\"] ?? 0)*(($weapon[\"MuzzleSalvoSize\"] ?? 1)-1), \r\n $trueReload\r\n );\r\n\r\n $trueSalvoSize = 1;\r\n if (($weapon[\"MuzzleSalvoDelay\"] ?? 0) > 0) { // if theres no muzzle delay, all muzzles fire at the same time\r\n $trueSalvoSize = ($weapon[\"MuzzleSalvoSize\"] ?? 1);\r\n } else if ($weapon[\"RackBones\"] && count($weapon[\"RackBones\"]) > 0) { // dummy weapons dont have racks\r\n if ($weapon[\"RackFireTogether\"]) {\r\n $trueSalvoSize = count($weapon[\"RackBones\"]) * count($weapon[\"RackBones\"][0][\"MuzzleBones\"]);\r\n } else if (count($weapon[\"RackBones\"]) > 0) {\r\n $trueSalvoSize = count($weapon[\"RackBones\"][0][\"MuzzleBones\"]);\r\n }\r\n }\r\n\r\n $trueDamage = $weapon[\"Damage\"]*($weapon[\"DoTPulses\"] ?? 1) + ($weapon[\"InitialDamage\"] ?? 0);\r\n \r\n // beam weapons are a thing and do their own thing. yeah good luck working out that.\r\n $trueDamage = max((floor(($weapon[\"BeamLifetime\"] ?? 0) / (($weapon[\"BeamCollisionDelay\"] ?? 0)+0.1))+1)*$weapon[\"Damage\"], $trueDamage);\r\n $salvoDamage = $trueSalvoSize * $trueDamage * ($isSpecial ? $shots : 1);\r\n $trueDPS = ($salvoDamage / $trueReload);\r\n\r\n return $trueDPS;\r\n }", "title": "" }, { "docid": "66dd0d27ab553cfe3d6028643183e9dd", "score": "0.5296986", "text": "public function getSalesTaxPercent()\n {\n return $this->salesTaxPercent;\n }", "title": "" }, { "docid": "66dd0d27ab553cfe3d6028643183e9dd", "score": "0.5296986", "text": "public function getSalesTaxPercent()\n {\n return $this->salesTaxPercent;\n }", "title": "" }, { "docid": "728a98063d48498b2a511abd89865875", "score": "0.5285782", "text": "public function getFuel(): float\n {\n }", "title": "" }, { "docid": "c047d2eb44078ce2ee56bb9f91f7a372", "score": "0.52792525", "text": "function snax_get_upvotes_percentage( $post_id = 0 ) {\n\t$post = get_post( $post_id );\n\t$result = 0;\n\t$total = snax_get_vote_count( $post );\n\n\tif ( $total ) {\n\t\t$result = snax_get_upvote_count( $post ) / $total * 100;\n\t}\n\n\treturn $result;\n}", "title": "" }, { "docid": "062f2c6515b72a991ec366740e8d54d2", "score": "0.5276167", "text": "public function percentageComplete() {\n if (!$this->isScheduled()) {\n return 0;\n }\n $complete = 0;\n foreach ($this->schedule as $step) {\n if ($step->complete == \"1\") {\n $complete += $step->getScheduledTime();\n }\n }\n if ($complete == 0) {\n return 0;\n }\n return 100 * ($complete / $this->totalScheduled());\n }", "title": "" }, { "docid": "d22c82707f553e354843849be46e43fc", "score": "0.5274315", "text": "public static function ElementalDamageBoost($SkillProperty)\n\t{\n\t\tglobal $ElementalDamageBoost;\n\t\treturn $SkillProperty + ($ElementalDamageBoost / 100);\n\t}", "title": "" }, { "docid": "8b0b6560fb339b5aa7e34a8f8fcbdd0e", "score": "0.52683586", "text": "public function calculatePercentage() {\n if ($this->countAnswered === 0) { //prevent division by 0 error\n $this->correctPercentage = 0;\n }\n else {\n $percentCorrect = $this->countAnsweredCorrect / $this->countAnswered * 100;\n $this->correctPercentage = round($percentCorrect, 0);\n }\n }", "title": "" }, { "docid": "b5b4f4f7bb22efe213fa0b4fbaf90458", "score": "0.52669513", "text": "public function getPerfectPowerProperty()\n {\n if ($this->consumption && $this->fees && $this->perfect) {\n if (\\is_numeric($this->consumption) && \\is_numeric($this->fees) && \\is_numeric($this->perfect)) {\n return round($this->consumption / 1000 / $this->perfect, 2);\n }\n }\n\n return 0;\n }", "title": "" }, { "docid": "42911cf1b9575f52752fee323ed23468", "score": "0.52667534", "text": "public function getTotalArmorClass()\n {\n $total = \t$this->head->getArmorClass() +\n $this->chest->getArmorClass() +\n $this->arms->getArmorClass() +\n $this->legs->getArmorClass() +\n $this->feet->getArmorClass();\n\n return $total;\n }", "title": "" }, { "docid": "de6fb26d8c65677f99ac8f16dacd4496", "score": "0.52554375", "text": "public function getPercentPagesMatched()\n {\n return $this->percent_pages_matched;\n }", "title": "" }, { "docid": "ebc01d31d6248cc303fdde80eee15a35", "score": "0.5250724", "text": "public function totalPoints() {\n if ($this->totalPoints == Null) {\n foreach ($this->achievements as $achievement) {\n $this->totalPoints += $achievement->points;\n }\n }\n return $this->totalPoints;\n }", "title": "" }, { "docid": "d042ad948d3a191739367da2a5d3535b", "score": "0.52440083", "text": "public function getRiskPercentage()\n {\n return $this->riskPercentage;\n }", "title": "" }, { "docid": "b6fe42d97a6b1dcf525b6731a71045b9", "score": "0.5240784", "text": "function compute_item_repair_value($item)\n\t{\n\t //value is the half of the value in percent of damage\n\t return (100 - $item['condition']) * (str_replace(\".\", \"\", $item['value']) * 0.01);\n\t}", "title": "" }, { "docid": "6a78e7f78f439a2c4ba4ee6b525fb852", "score": "0.5235601", "text": "public function GetAverage()\n\t{\n\t\treturn round(array_sum($this->rolls) / count($this->rolls), 1);\n\t}", "title": "" }, { "docid": "42bd169fa9cc3b4c17a9ad481d840d45", "score": "0.5232879", "text": "public function getDamage(): int\n {\n }", "title": "" }, { "docid": "9138029e7d8f9a638b1ad8184400dff9", "score": "0.5229645", "text": "public function getDamage() {\n return $this->damage;\n }", "title": "" }, { "docid": "ece3c98191d470530b4657fc4611a0e6", "score": "0.5227979", "text": "public function getNamePercent()\n {\n return $this->cache->rememberForever('stage:name:percent', function () {\n return collect($this->getList())->reduce(function ($array, $item) {\n $array[$item['name']] = $item['percentage'];\n\n return $array;\n });\n });\n }", "title": "" }, { "docid": "4d97854644785dbab9567234b5a50715", "score": "0.52268267", "text": "public function anglePercentage() {\n\t\tif ( !isset( $this->cache[__METHOD__] ) ) {\n\t\t\t$this->cache[__METHOD__] = $this->calc(\n\t\t\t\tnew Alternative( [ $this->rawAngle(), $this->rawPercentage() ] ),\n\t\t\t\t'angle'\n\t\t\t);\n\t\t}\n\t\treturn $this->cache[__METHOD__];\n\t}", "title": "" }, { "docid": "a666bc876fea341f67d224da8bbe522e", "score": "0.52267706", "text": "public function getGoalScore()\n {\n return $this->goalScore;\n }", "title": "" }, { "docid": "7dada000de73a7b2323c0735eae53ba4", "score": "0.5224164", "text": "public function getScore(): float\n {\n return $this->score;\n }", "title": "" }, { "docid": "fee4b54528d69bde82cfc89fa74f895f", "score": "0.52225906", "text": "public function getProgress()\n\t{\n\t\tif ($this->steps_total <= 0)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\n\t\t$overall = $this->steps_done / $this->steps_total;\n\t\t$local = 0;\n\n\t\tif ($this->substeps_total > 0)\n\t\t{\n\t\t\t$local = $this->substeps_done / $this->substeps_total;\n\t\t}\n\n\t\treturn $overall + ($local / $this->steps_total);\n\t}", "title": "" }, { "docid": "5e8cef019efbbab93fab43b8ffd45ed1", "score": "0.52215785", "text": "public function shrimpDeadToPercent($item, $total_weight)\n {\n return number_format($item / $total_weight * 100, 2);\n }", "title": "" }, { "docid": "f6f6773627fb1c5d4cf06b3ff6a110d5", "score": "0.52105254", "text": "public function getDamage()\n {\n return $this->damage;\n }", "title": "" }, { "docid": "582ef07fceaf6847b9cfa621760a9494", "score": "0.5209957", "text": "public function getTaxPercent() {\n\t\treturn $this->tax_percent;\n\t}", "title": "" }, { "docid": "62049bafb05dbd2c8c6444be6d00bb97", "score": "0.520572", "text": "function hitRate($correctCalls = null, $totalCalls = null)\n {\n $hitRate = 0;\n if ($totalCalls != 0) {\n $hitRate = ($correctCalls/$totalCalls)*100;\n }\n return((int)round($hitRate));\n }", "title": "" }, { "docid": "4e979722037e2961a1645d728df317d4", "score": "0.51985854", "text": "public function pointsPerMatchSingle() {\n $matches = $this->matchesPlayedSingle();\n\n if ($matches !== 0) {\n return round($this->totalPointsSingle() / $matches);\n }\n\n return 0;\n }", "title": "" } ]
87ce30a47a9f34736eb3293a949f1fe2
Displays a particular model.
[ { "docid": "77ac01bec7ac7912d7e0c3867da2e322", "score": "0.0", "text": "public function actionView($id)\n {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }", "title": "" } ]
[ { "docid": "ac825dc8ad329dbfa7493730fd6f777a", "score": "0.7542682", "text": "public function actionView()\n\t{\n\t\t$model = $this->loadModel();\n\t\t$this->render('view',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "3f93fdba2a64fbb8fdb155d67b22fadb", "score": "0.75248843", "text": "public function show(Modelname $modelname)\n {\n //\n }", "title": "" }, { "docid": "8c1476530bcaf421c6e7c9662a785623", "score": "0.74330246", "text": "public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}", "title": "" }, { "docid": "8c1476530bcaf421c6e7c9662a785623", "score": "0.74330246", "text": "public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}", "title": "" }, { "docid": "8c1476530bcaf421c6e7c9662a785623", "score": "0.74330246", "text": "public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}", "title": "" }, { "docid": "7e6fe693c64cd15799892267d34ba977", "score": "0.7283679", "text": "public function display(){\n $view =& $this->getView( self::$viewName, 'html' );\n //$model =& $this->getModel( self::$modelName );\n //$view->setModel( $model, true );\n $view->display();\n }", "title": "" }, { "docid": "6170a85dc8165624b02b4227fb73ef58", "score": "0.7168367", "text": "public function show(Model $item);", "title": "" }, { "docid": "f4d30b369d13dac9c3ef7525d6a043f5", "score": "0.71455705", "text": "public function index()\n {\n $this->view(\"model\");\n }", "title": "" }, { "docid": "0f23d241ca9ac885eca7b1989109b4d5", "score": "0.712746", "text": "public function actionView($id)\n{\n$this->render('view',array(\n'model'=>$this->loadModel($id),\n));\n}", "title": "" }, { "docid": "e48d1d2c8f304237d99829096553ebc3", "score": "0.71064997", "text": "public function actionView() {\n\t\t$this->render('view',array('model'=>$this->loadModel()));\n\t}", "title": "" }, { "docid": "33cafcf2aacaff25ad034060f1a35186", "score": "0.7087181", "text": "public function actionView()\n {\n if (!isset($_GET['id']))\n $this->sendResponse(500, 'Error: Parameter <b>id</b> is missing');\n\n switch ($_GET['model']) {\n // Find respective model\n case 'phones':\n $model = Phones::model()->findByPk($_GET['id']);\n break;\n default:\n $this->sendResponse(501, sprintf(\n 'Mode <b>view</b> is not implemented for model <b>%s</b>',\n $_GET['model']));\n Yii::app()->end();\n }\n // Did we find the requested model? If not, raise an error\n if (is_null($model))\n $this->sendResponse(404, 'No Item found with id ' . $_GET['id']);\n else\n $this->sendResponse(200, CJSON::encode($model));\n }", "title": "" }, { "docid": "efc3cd6930db4ee6c7e0505cadfb51ed", "score": "0.70830923", "text": "public function actionView()\n {\n if(!isset($_GET['id']))\n $this->_sendResponse(500, 'Error: Parameter <b>id</b> is missing' );\n\n switch($_GET['model'])\n {\n // Find respective model\n case 'MyModel':\n $model = MyModel::model()->findByPk($_GET['id']);\n break;\n default:\n $this->_sendResponse(501, sprintf(\n 'Mode <b>view</b> is not implemented for model <b>%s</b>',\n $_GET['model']) );\n Yii::app()->end();\n }\n if(is_null($model))\n $this->_sendResponse(404, 'No Item found with id '.$_GET['id'], \"text/html\");\n else\n $this->_sendResponse(200, CJSON::encode($model));\n }", "title": "" }, { "docid": "5f1650eb7885e87242c77edd6474cb5a", "score": "0.70582217", "text": "public function show(model_Name $model_Name)\n {\n //\n return $model_Name;\n }", "title": "" }, { "docid": "2abae21ab5ce7437a08b38c1e490d91d", "score": "0.7033607", "text": "public function actionView($id) \n { \n $this->render('view',array( \n 'model'=>$this->loadModel($id), \n )); \n }", "title": "" }, { "docid": "b4ba7e7a0573e95bb034f4dab79dfdd5", "score": "0.699991", "text": "public function show(btl_model $btl_model)\n {\n //\n }", "title": "" }, { "docid": "a7418840a6b370ee47c893bf45ddb1b1", "score": "0.6999651", "text": "public function actionView($id)\n\t{\n\t\t$this->pageTitle = Yii::app()->name.' - '.$this->title_sin.' - Ver';\n \n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "2c88741393f1bac4fc3399895d324c94", "score": "0.6983485", "text": "public function actionView($id) {\n\t\t$this->render('view', array(\n\t\t\t'model' => $this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "e392e57b18a6b8001812e0d6cebab05d", "score": "0.69791055", "text": "public function actionView($id)\n {\n $this->render('view', ['model' => $this->loadModel($id)]);\n }", "title": "" }, { "docid": "a747b5eecfdacb861714466678fa6ca9", "score": "0.6972255", "text": "public function actionView($id) {\r\n $this->render('view', array(\r\n 'model' => $this->loadModel($id),\r\n ));\r\n }", "title": "" }, { "docid": "a747b5eecfdacb861714466678fa6ca9", "score": "0.6972255", "text": "public function actionView($id) {\r\n $this->render('view', array(\r\n 'model' => $this->loadModel($id),\r\n ));\r\n }", "title": "" }, { "docid": "a747b5eecfdacb861714466678fa6ca9", "score": "0.6972255", "text": "public function actionView($id) {\r\n $this->render('view', array(\r\n 'model' => $this->loadModel($id),\r\n ));\r\n }", "title": "" }, { "docid": "6c90d49e479f2021d8ac29f5ff6dc610", "score": "0.69588774", "text": "public function show(YoloModel $yoloModel)\n {\n //\n }", "title": "" }, { "docid": "a9278745c89e7f8f09e4efa116db3825", "score": "0.6958361", "text": "public function actionView($id) {\n\t\t$this->render ( 'view', array ('model' => $this->loadModel ( $id ) ) );\n\t}", "title": "" }, { "docid": "c19fb23639f763118a13de3d86830ec0", "score": "0.6945086", "text": "public function show(Model $model)\n {\n return $model;\n }", "title": "" }, { "docid": "5ff9b7d6ea18599a30f793124252e7e3", "score": "0.69437367", "text": "public function actionView($id)\r\n\t{\r\n\t\t$this->render('view',array(\r\n\t\t\t'model'=>$this->loadModel($id),\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "5ff9b7d6ea18599a30f793124252e7e3", "score": "0.69437367", "text": "public function actionView($id)\r\n\t{\r\n\t\t$this->render('view',array(\r\n\t\t\t'model'=>$this->loadModel($id),\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "5ff9b7d6ea18599a30f793124252e7e3", "score": "0.69437367", "text": "public function actionView($id)\r\n\t{\r\n\t\t$this->render('view',array(\r\n\t\t\t'model'=>$this->loadModel($id),\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "5ff9b7d6ea18599a30f793124252e7e3", "score": "0.69437367", "text": "public function actionView($id)\r\n\t{\r\n\t\t$this->render('view',array(\r\n\t\t\t'model'=>$this->loadModel($id),\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "5ff9b7d6ea18599a30f793124252e7e3", "score": "0.69437367", "text": "public function actionView($id)\r\n\t{\r\n\t\t$this->render('view',array(\r\n\t\t\t'model'=>$this->loadModel($id),\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "5ff9b7d6ea18599a30f793124252e7e3", "score": "0.69437367", "text": "public function actionView($id)\r\n\t{\r\n\t\t$this->render('view',array(\r\n\t\t\t'model'=>$this->loadModel($id),\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "5ff9b7d6ea18599a30f793124252e7e3", "score": "0.69437367", "text": "public function actionView($id)\r\n\t{\r\n\t\t$this->render('view',array(\r\n\t\t\t'model'=>$this->loadModel($id),\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "5ff9b7d6ea18599a30f793124252e7e3", "score": "0.69437367", "text": "public function actionView($id)\r\n\t{\r\n\t\t$this->render('view',array(\r\n\t\t\t'model'=>$this->loadModel($id),\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "5ff9b7d6ea18599a30f793124252e7e3", "score": "0.69437367", "text": "public function actionView($id)\r\n\t{\r\n\t\t$this->render('view',array(\r\n\t\t\t'model'=>$this->loadModel($id),\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "fc197c942b66a7220af331d4c5aa653a", "score": "0.6942107", "text": "public function actionView($id)\n\t{\n $this->render('view', array('model' => $this->loadModel($id)));\n\t}", "title": "" }, { "docid": "14b03d55e1aa527fd1ec42711bec60d0", "score": "0.6940251", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view', array(\n\t\t\t'model' => $this->loadModel($id)\n\t\t));\n\t}", "title": "" }, { "docid": "6f3d0b3bcf82d83c02aef4c25d8ebaf0", "score": "0.692199", "text": "public function actionView($id)\r\n\t{\r\n\t\t$this->render('view', array(\r\n\t\t\t'model' => $this->loadModel($id),\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "6bad7a95436c8d28248aa08deda8704d", "score": "0.6918672", "text": "public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }", "title": "" }, { "docid": "6bad7a95436c8d28248aa08deda8704d", "score": "0.6918672", "text": "public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }", "title": "" }, { "docid": "6bad7a95436c8d28248aa08deda8704d", "score": "0.6918672", "text": "public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }", "title": "" }, { "docid": "6bad7a95436c8d28248aa08deda8704d", "score": "0.6918672", "text": "public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }", "title": "" }, { "docid": "6bad7a95436c8d28248aa08deda8704d", "score": "0.6918672", "text": "public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }", "title": "" }, { "docid": "6bad7a95436c8d28248aa08deda8704d", "score": "0.6918672", "text": "public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }", "title": "" }, { "docid": "6bad7a95436c8d28248aa08deda8704d", "score": "0.6918672", "text": "public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }", "title": "" }, { "docid": "6bad7a95436c8d28248aa08deda8704d", "score": "0.6918672", "text": "public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }", "title": "" }, { "docid": "6bad7a95436c8d28248aa08deda8704d", "score": "0.6918672", "text": "public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }", "title": "" }, { "docid": "6bad7a95436c8d28248aa08deda8704d", "score": "0.6918672", "text": "public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }", "title": "" }, { "docid": "6bad7a95436c8d28248aa08deda8704d", "score": "0.6918672", "text": "public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }", "title": "" }, { "docid": "6bad7a95436c8d28248aa08deda8704d", "score": "0.6918672", "text": "public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }", "title": "" }, { "docid": "6bad7a95436c8d28248aa08deda8704d", "score": "0.6918672", "text": "public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }", "title": "" }, { "docid": "6bad7a95436c8d28248aa08deda8704d", "score": "0.6918672", "text": "public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }", "title": "" }, { "docid": "fe27f4be2975ba929352a22755519447", "score": "0.69076747", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t\t\n }", "title": "" }, { "docid": "3439f0e524daafb7e79e1a82f02c0cbe", "score": "0.69025946", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n}", "title": "" }, { "docid": "5cd58389cdc1f2c5ca8a0283dba4ae19", "score": "0.688486", "text": "public function actionView($id)\n\t\t{\n\t\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t\t));\n\t\t}", "title": "" }, { "docid": "5cd58389cdc1f2c5ca8a0283dba4ae19", "score": "0.688486", "text": "public function actionView($id)\n\t\t{\n\t\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t\t));\n\t\t}", "title": "" }, { "docid": "5cd58389cdc1f2c5ca8a0283dba4ae19", "score": "0.688486", "text": "public function actionView($id)\n\t\t{\n\t\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t\t));\n\t\t}", "title": "" }, { "docid": "0a990452d676b0187da5e5f74653e002", "score": "0.6882459", "text": "public function actionView()\n {\n $id = isset($_REQUEST['id'])?$_REQUEST['id']:null;\n \t$model = $this->findModel($id);\n \t\n \treturn CommonUtils::json_success($model);\n }", "title": "" }, { "docid": "f26093f09feded30bce1756afaad1021", "score": "0.688112", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t\t));\n\t}", "title": "" }, { "docid": "a98a7a7b8b925bdc9ccd4f8039150bad", "score": "0.68790245", "text": "public function show(MatpelModel $matpelModel)\n {\n //\n }", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" }, { "docid": "55960601ee733f31250b377f448dfa49", "score": "0.6868299", "text": "public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}", "title": "" } ]
d6b035715169bbc6f34cf874ebdda55d
/ Gets the 'router_listener' service. This service is shared. This method always returns the same instance of the service.
[ { "docid": "19e40d42ba842fc36d69585f16736981", "score": "0.8616823", "text": "protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener($this->get('router'), $this->get('request_stack'), ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, $this->get('monolog.logger.request', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }", "title": "" } ]
[ { "docid": "a0d89b4e20dabaef756cb07a713cd887", "score": "0.84949577", "text": "protected function getRouterListenerService()\n {\n $this->services['router_listener'] = $instance = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener($this->get('router'), $this->get('router.request_context', ContainerInterface::NULL_ON_INVALID_REFERENCE), $this->get('monolog.logger.request', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n\n $instance->setRequest($this->get('request', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n\n return $instance;\n }", "title": "" }, { "docid": "b5ea533678c3824ecfdcdc3aa2f7d21c", "score": "0.74308616", "text": "public function getRouter()\n {\n return $this->_app->getDI()->getShared(ServiceMeta::SERVICE_ROUTER);\n }", "title": "" }, { "docid": "7e12f97deef745d31e1ee19bc79e2c22", "score": "0.7172886", "text": "protected function getRouterService()\n {\n return $this->services['router'] = new \\Symfony\\Bundle\\FrameworkBundle\\Routing\\Router($this, (dirname(dirname(__DIR__)).'/config/routing_dev.yml'), array('cache_dir' => __DIR__, 'debug' => true, 'generator_class' => 'Symfony\\\\Component\\\\Routing\\\\Generator\\\\UrlGenerator', 'generator_base_class' => 'Symfony\\\\Component\\\\Routing\\\\Generator\\\\UrlGenerator', 'generator_dumper_class' => 'Symfony\\\\Component\\\\Routing\\\\Generator\\\\Dumper\\\\PhpGeneratorDumper', 'generator_cache_class' => 'appDevUrlGenerator', 'matcher_class' => 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\Routing\\\\RedirectableUrlMatcher', 'matcher_base_class' => 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\Routing\\\\RedirectableUrlMatcher', 'matcher_dumper_class' => 'Symfony\\\\Component\\\\Routing\\\\Matcher\\\\Dumper\\\\PhpMatcherDumper', 'matcher_cache_class' => 'appDevUrlMatcher', 'strict_requirements' => true), $this->get('router.request_context', ContainerInterface::NULL_ON_INVALID_REFERENCE), $this->get('monolog.logger.router', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }", "title": "" }, { "docid": "3d6c596cfb0f82636ec37ee3bc58967a", "score": "0.7001093", "text": "protected function getRouterService()\n {\n $this->services['router'] = $instance = new \\Symfony\\Bundle\\FrameworkBundle\\Routing\\Router($this, ($this->targetDirs[3].'/app/config/routing.yml'), array('cache_dir' => __DIR__, 'debug' => false, 'generator_class' => 'Symfony\\\\Component\\\\Routing\\\\Generator\\\\UrlGenerator', 'generator_base_class' => 'Symfony\\\\Component\\\\Routing\\\\Generator\\\\UrlGenerator', 'generator_dumper_class' => 'Symfony\\\\Component\\\\Routing\\\\Generator\\\\Dumper\\\\PhpGeneratorDumper', 'generator_cache_class' => 'appProdProjectContainerUrlGenerator', 'matcher_class' => 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\Routing\\\\RedirectableUrlMatcher', 'matcher_base_class' => 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\Routing\\\\RedirectableUrlMatcher', 'matcher_dumper_class' => 'Symfony\\\\Component\\\\Routing\\\\Matcher\\\\Dumper\\\\PhpMatcherDumper', 'matcher_cache_class' => 'appProdProjectContainerUrlMatcher', 'strict_requirements' => NULL), ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, $this->get('monolog.logger.router', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n\n $instance->setConfigCacheFactory($this->get('config_cache_factory'));\n\n return $instance;\n }", "title": "" }, { "docid": "b3ae967fc521ab333712b5ff6efd8cef", "score": "0.6990895", "text": "public function router()\n {\n return $this->_router;\n }", "title": "" }, { "docid": "6d4ee9d4bc85bd3eb13f393b30279c64", "score": "0.6966542", "text": "protected function getMonolog_Logger_RouterService()\n {\n $this->services['monolog.logger.router'] = $instance = new \\Symfony\\Bridge\\Monolog\\Logger('router');\n\n $instance->pushHandler($this->get('monolog.handler.console'));\n $instance->pushHandler($this->get('monolog.handler.main'));\n\n return $instance;\n }", "title": "" }, { "docid": "780552990dad840aa6d4bfa28ca9722b", "score": "0.69296587", "text": "public function & GetRouter () {\n\t\treturn $this->router;\n\t}", "title": "" }, { "docid": "a21158f9e6635dcc61dd9d0a7c6c08f2", "score": "0.69266087", "text": "protected function getDispatcherListener()\n {\n return $this->di->getShared('dispatcherListener');\n }", "title": "" }, { "docid": "07e83cd711aacae6280facbb96e7e165", "score": "0.6924823", "text": "public function getRouter(): Router\n {\n return $this->router;\n }", "title": "" }, { "docid": "7a561a7e03e0ada206b92158c854a38c", "score": "0.6911796", "text": "protected function getMonolog_Logger_RouterService()\n {\n $this->services['monolog.logger.router'] = $instance = new \\Symfony\\Bridge\\Monolog\\Logger('router');\n\n $instance->pushHandler($this->get('monolog.handler.firephp'));\n $instance->pushHandler($this->get('monolog.handler.main'));\n $instance->pushHandler($this->get('monolog.handler.debug'));\n\n return $instance;\n }", "title": "" }, { "docid": "3b4f553e5d4b514e9028d87241c3ec0d", "score": "0.6908733", "text": "public function getRouter()\n {\n return $this->router;\n }", "title": "" }, { "docid": "3b4f553e5d4b514e9028d87241c3ec0d", "score": "0.6908733", "text": "public function getRouter()\n {\n return $this->router;\n }", "title": "" }, { "docid": "e09078ad478ddaf5afecc8f06755397c", "score": "0.6874348", "text": "public function getRouter(): RouterInterface\n {\n return $this->router;\n }", "title": "" }, { "docid": "17def4abe5ef353606394738efbf46a6", "score": "0.6859051", "text": "protected function getDataCollector_RouterService()\n {\n return $this->services['data_collector.router'] = new \\Symfony\\Bundle\\FrameworkBundle\\DataCollector\\RouterDataCollector();\n }", "title": "" }, { "docid": "f60304305bf4d52ed6700121875dc7fa", "score": "0.68219936", "text": "public static function getInstance() {\n\n if (self::$instance == NULL) {\n self::$instance = new router();\n }\n return self::$instance;\n\n }", "title": "" }, { "docid": "bf71269d240abedcc507f6b8a1008a91", "score": "0.67853093", "text": "public function router()\n {\n if ($this->router === null) $this->router = new Net\\Router();\n return $this->router;\n }", "title": "" }, { "docid": "da813ee3b7458f98a68ffc0df1e9a919", "score": "0.6781535", "text": "public static function getRouter() {\n\t\tif (!Router::$INSTANCE) {\n\t\t\tRouter::$INSTANCE = new Router ();\n\t\t}\n\n\t\treturn Router::$INSTANCE;\n\t}", "title": "" }, { "docid": "3ccdfe0d94108b2fb7465d48cdf4fe66", "score": "0.67619616", "text": "public function router() \n\t{\n\t\treturn $this->router;\n\t}", "title": "" }, { "docid": "14e1e3f900d5c5f6079903786557693e", "score": "0.66684437", "text": "protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener($this->get('translator.default'), $this->get('request_stack'));\n }", "title": "" }, { "docid": "3dcd8d3a0df90514e72f9a039d703f2c", "score": "0.66503483", "text": "public static function getInstance() {\n if (Router::$instance === null) {\n Router::$instance = new Router();\n }\n return Router::$instance;\n }", "title": "" }, { "docid": "509b52368bec64b8d9ffcc5a1adff705", "score": "0.66492176", "text": "public function getRouter()\n {\n if (is_null($this->_router)) {\n $this->_router = new Router(['request' => $this->getRequest()]);\n }\n return $this->_router;\n }", "title": "" }, { "docid": "01a357228185627ef9817739983cb236", "score": "0.65304893", "text": "protected function getKnpMenu_Voter_RouterService()\n {\n return $this->services['knp_menu.voter.router'] = new \\Knp\\Menu\\Matcher\\Voter\\RouteVoter();\n }", "title": "" }, { "docid": "e75264ba1ca05633c086d6c8ab1e8b8c", "score": "0.6502954", "text": "public function getRouter() {\n\n // Return our router\n return $this->sRouter;\n }", "title": "" }, { "docid": "f2ac8b53f6d12c5edc97958be7a1801b", "score": "0.650042", "text": "public static function getInstance() : Router\n {\n if(is_null(self::$_instance))\n {\n self::$_instance = new Router(); \n }\n \n return self::$_instance;\n }", "title": "" }, { "docid": "94aea7534891ab1fa34c502fcdef7357", "score": "0.6498852", "text": "public static function getInstance(){\n if(self::$_instance == NULL)\n self::$_instance = new Lynx_Router;\n return self::$_instance;\n }", "title": "" }, { "docid": "e3cce7026ed13d48a4010a8badf457d6", "score": "0.64505845", "text": "public function getRouter(): LeagueRouter\n {\n return $this->routerContainer->getRouter();\n }", "title": "" }, { "docid": "22aad56a67fc92f2828ad4447d7d98b6", "score": "0.6442387", "text": "protected function getOroUi_RouterService()\n {\n if (!isset($this->scopedServices['request'])) {\n throw new InactiveScopeException('oro_ui.router', 'request');\n }\n\n return $this->services['oro_ui.router'] = $this->scopedServices['request']['oro_ui.router'] = new \\Oro\\Bundle\\UIBundle\\Route\\Router($this->get('request'), $this->get('router'));\n }", "title": "" }, { "docid": "fbe0b2856c5dffbfea3514c1c180ebb2", "score": "0.64290816", "text": "protected function getLocaleListenerService()\n {\n $this->services['locale_listener'] = $instance = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener('en', $this->get('router', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n\n $instance->setRequest($this->get('request', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n\n return $instance;\n }", "title": "" }, { "docid": "65da4c5bc648b0cf6307ccfd245399b4", "score": "0.6383826", "text": "public function router() {\n\n if (is_null($this->router)) {\n\n $this->router = new Router($this->routes());\n $this->filters();\n\n }\n\n return $this->router;\n\n }", "title": "" }, { "docid": "6a6928a5b6454ac643fe5c040b788e04", "score": "0.63548803", "text": "public function getRouterContainer(): RouterContainer\n {\n return $this->routerContainer;\n }", "title": "" }, { "docid": "314321fe677d562b1bf08a1f9f8f37d2", "score": "0.6344323", "text": "protected function getLocaleListenerService()\n {\n return $this->services['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener($this->get('request_stack'), 'en', $this->get('router', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }", "title": "" }, { "docid": "5b3d2fcef9584498c5b154f821aa6fb3", "score": "0.6329097", "text": "protected function getRouterObject()\n {\n if ($this->routerObj !== null) {\n return $this->routerObj;\n }\n\n return $this->routerObj = $this->buildCachedRouterObject();\n }", "title": "" }, { "docid": "8d6b934831034ab82fe5f40f84f76a63", "score": "0.6308545", "text": "protected function getTemplating_Helper_RouterService()\n {\n return $this->services['templating.helper.router'] = new \\Symfony\\Bundle\\FrameworkBundle\\Templating\\Helper\\RouterHelper($this->get('router'));\n }", "title": "" }, { "docid": "2c3ee76ae6152fa007e2ccbed3c48588", "score": "0.62973917", "text": "protected function getWebProfiler_Controller_RouterService()\n {\n return $this->services['web_profiler.controller.router'] = new \\Symfony\\Bundle\\WebProfilerBundle\\Controller\\RouterController($this->get('profiler', ContainerInterface::NULL_ON_INVALID_REFERENCE), $this->get('twig'), $this->get('router', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }", "title": "" }, { "docid": "5e5717d90f2da9aeccb90d401ad9ebc6", "score": "0.6247371", "text": "protected function getKnpMenu_Voter_RouterService()\n {\n return $this->services['knp_menu.voter.router'] = new \\Oro\\Bundle\\NavigationBundle\\Menu\\Matcher\\Voter\\RoutePatternVoter();\n }", "title": "" }, { "docid": "d89b76531610dddcfab503eb3eb96e07", "score": "0.6230572", "text": "protected function getOroLocale_LocaleListenerService()\n {\n $this->services['oro_locale.locale_listener'] = $instance = new \\Oro\\Bundle\\LocaleBundle\\EventListener\\LocaleListener($this->get('oro_locale.settings'), '2015-09-15T11:41:37+02:00');\n\n if ($this->has('request')) {\n $instance->setRequest($this->get('request', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }\n\n return $instance;\n }", "title": "" }, { "docid": "72ba1c867f8411baa1b06ee442942122", "score": "0.6226249", "text": "public function getRouter(): Zigra_Router\n {\n return Zigra_Router::singleton();\n }", "title": "" }, { "docid": "ffcbf62e51f9fbb901fb9e3f367e8632", "score": "0.62251097", "text": "public function getRouter(): ?Router\n {\n return $this->router;\n }", "title": "" }, { "docid": "5061657448b98fac853dd89df79f3e23", "score": "0.6202171", "text": "public function listener() {\n\t\treturn $this->_runtime['listener'];\n\t}", "title": "" }, { "docid": "e2dab5632d80e6b82131a7fe5c0372f9", "score": "0.6196463", "text": "function &getInstance() {\n\t\tstatic $instance = array();\n\n\t\tif (!$instance) {\n\t\t\t$instance[0] = new Router();\n\t\t}\n\t\treturn $instance[0];\n\t}", "title": "" }, { "docid": "04d9614f4130af71a6d432764565ccb9", "score": "0.615914", "text": "function &getRouter()\n\t{\n\t\t$router =& parent::getRouter('administrator');\n\t\treturn $router;\n\t}", "title": "" }, { "docid": "6827159d783b0b450e2ecb653f9d8470", "score": "0.6133412", "text": "protected function getVictoireSitemap_SitemapMenuListenerService()\n {\n return $this->services['victoire_sitemap.sitemap_menu_listener'] = new \\Victoire\\Bundle\\SitemapBundle\\Listener\\SiteMapMenuListener($this->get('victoire_core.admin_menu_builder'));\n }", "title": "" }, { "docid": "5c699bedb03d49ca7d3cd6ce12e7dd39", "score": "0.6089203", "text": "public function getRouter();", "title": "" }, { "docid": "08898f52528f46421232635e52454de6", "score": "0.60412437", "text": "private function __loadRouter()\n {\n return new Router();\n }", "title": "" }, { "docid": "b9b8e7603f5784e2ba5f077ade5bbd0b", "score": "0.59946877", "text": "protected static function getFacadeAccessor()\n {\n return Services::ROUTER;\n }", "title": "" }, { "docid": "6ce6eb68ae6fa18266d53c4dcb3a4a4e", "score": "0.59633654", "text": "protected function getOroEntity_Listener_NavigationListenerService()\n {\n return $this->services['oro_entity.listener.navigation_listener'] = new \\Oro\\Bundle\\EntityBundle\\EventListener\\NavigationListener($this->get('oro_security.security_facade'), $this->get('doctrine.orm.default_entity_manager'), $this->get('oro_entity_config.provider.entity'), $this->get('oro_entity_config.provider.extend'));\n }", "title": "" }, { "docid": "3a1478527c0a634f533d3c3d721d74d3", "score": "0.59048325", "text": "protected function getOroUser_Role_ListenerService()\n {\n return $this->services['oro_user.role.listener'] = new \\Oro\\Bundle\\UserBundle\\EventListener\\RoleListener($this->get('oro_security.link.sid_manager'));\n }", "title": "" }, { "docid": "83d9a33948b4bf056e2253bb93d2c5b8", "score": "0.5871971", "text": "public function loadRouter()\n {\n $router = $this->_app->getWebsite()->getDefaultRouter();\n $router->init();\n $this->_app->getDI()->setShared(ServiceMeta::SERVICE_ROUTER, $router);\n return $this;\n }", "title": "" }, { "docid": "00b63866927844523eabbd9618a11b24", "score": "0.5867121", "text": "function wp_router() {\n\tglobal $wp_router_controller;\n\n\t// If not initiated, initiate\n\tif ( !isset( $wp_router_controller ) ) {\n\t\t$wp_router_controller = new WP_Router;\n\t}\n\n\treturn $wp_router_controller;\n}", "title": "" }, { "docid": "346c5ebedf9b1112fb7a4c327ee7ff44", "score": "0.58552665", "text": "protected function getSensioFrameworkExtra_Cache_ListenerService()\n {\n return $this->services['sensio_framework_extra.cache.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\HttpCacheListener();\n }", "title": "" }, { "docid": "fab8cf758fd8377a22f67ed77694b328", "score": "0.5850853", "text": "protected function getFragment_ListenerService()\n {\n return $this->services['fragment.listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\FragmentListener($this->get('uri_signer'), '/_fragment');\n }", "title": "" }, { "docid": "fab8cf758fd8377a22f67ed77694b328", "score": "0.5850853", "text": "protected function getFragment_ListenerService()\n {\n return $this->services['fragment.listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\FragmentListener($this->get('uri_signer'), '/_fragment');\n }", "title": "" }, { "docid": "b723987831e24dc9a49ad32c769625aa", "score": "0.5834305", "text": "protected function getOroEntity_EventListener_RelationEntityGridSubscriberService()\n {\n $this->services['oro_entity.event_listener.relation_entity_grid_subscriber'] = $instance = new \\Oro\\Bundle\\EntityBundle\\EventListener\\RelationEntityGridListener($this->get('oro_entity_config.config_manager'), $this->get('oro_datagrid.datagrid.request_params'), $this->get('router'));\n\n if ($this->has('request')) {\n $instance->setRequest($this->get('request', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }\n\n return $instance;\n }", "title": "" }, { "docid": "bb23c57b97a2d5908499be05ff32232a", "score": "0.580233", "text": "protected function getVictoireCore_RoutingLoaderService()\n {\n return $this->services['victoire_core.routing_loader'] = new \\Victoire\\Bundle\\CoreBundle\\Route\\RouteLoader(array());\n }", "title": "" }, { "docid": "79a4e239fb0f663487e0911bac55a951", "score": "0.57979757", "text": "public function getRouteServer()\n\t{\n\t\treturn $this->route_server;\n\t}", "title": "" }, { "docid": "336883c55cc57c9a6e184c97dd746c4c", "score": "0.5797871", "text": "protected function getEventDispatcherService()\n {\n $this->services['event_dispatcher'] = $instance = new \\Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher($this);\n\n $instance->addListenerService('knp_pager.before', array(0 => 'knp_paginator.subscriber.paginate', 1 => 'before'), 0);\n $instance->addListenerService('knp_pager.pagination', array(0 => 'knp_paginator.subscriber.paginate', 1 => 'pagination'), 0);\n $instance->addListenerService('knp_pager.before', array(0 => 'knp_paginator.subscriber.sortable', 1 => 'before'), 1);\n $instance->addListenerService('knp_pager.before', array(0 => 'knp_paginator.subscriber.filtration', 1 => 'before'), 1);\n $instance->addListenerService('knp_pager.pagination', array(0 => 'knp_paginator.subscriber.sliding_pagination', 1 => 'pagination'), 1);\n $instance->addListenerService('kernel.controller', array(0 => 'data_collector.router', 1 => 'onKernelController'), 0);\n $instance->addListenerService('kernel.response', array(0 => 'monolog.handler.firephp', 1 => 'onKernelResponse'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'besimple.soap.request_format.listener', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('kernel.view', array(0 => 'besimple.soap.response.listener', 1 => 'onKernelView'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'fos_rest.body_listener', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('kernel.controller', array(0 => 'fos_rest.format_listener', 1 => 'onKernelController'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'knp_menu.listener.voters', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'knp_paginator.subscriber.sliding_pagination', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'lexik_maintenance.listener', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'nelmio_api_doc.event_listener.request', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('kernel.view', array(0 => 'oro_ui.view.listener', 1 => 'onKernelView'), 0);\n $instance->addListenerService('oro_menu.configure.application_menu', array(0 => 'oro_entity.listener.navigation_listener', 1 => 'onNavigationConfigure'), 0);\n $instance->addListenerService('oro_datagrid.datgrid.build.after.audit-log-grid', array(0 => 'oro_entity_config.event_listener.audit_log_grid_listener', 1 => 'onBuildAfter'), 0);\n $instance->addListenerService('oro_datagrid.datgrid.build.after.auditfield-log-grid', array(0 => 'oro_entity_config.event_listener.audit_log_grid_listener', 1 => 'onBuildAfter'), 0);\n $instance->addListenerService('oro_datagrid.datgrid.build.before.auditfield-log-grid', array(0 => 'oro_entity_config.event_listener.audit_log_grid_listener', 1 => 'onBuildBefore'), 0);\n $instance->addListenerService('kernel.controller', array(0 => 'oro_help.listener.help_link', 1 => 'onKernelController'), -200);\n $instance->addListenerService('kernel.response', array(0 => 'kernel.listener.nav_history_response', 1 => 'onResponse'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'kernel.listener.title_service.request_listener', 1 => 'onKernelRequest'), -255);\n $instance->addListenerService('kernel.response', array(0 => 'kernel.listener.hashnav_response', 1 => 'onResponse'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'oro_navigation.twig.hash_nav_extension', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('entity_form.render.before', array(0 => 'oro_organization.form.listener', 1 => 'addOwnerField'), 0);\n $instance->addListenerService('oro_datagrid.datgrid.build.after.bu-update-users-grid', array(0 => 'oro_organization.event_listener.bu_update_grid_listener', 1 => 'onBuildAfter'), 0);\n $instance->addListenerService('oro_datagrid.datgrid.build.after.bu-view-users-grid', array(0 => 'oro_organization.event_listener.bu_view_grid_listener', 1 => 'onBuildAfter'), 0);\n $instance->addListenerService('kernel.controller', array(0 => 'oro_security.listener.controller', 1 => 'onKernelController'), -1);\n $instance->addListenerService('security.interactive_login', array(0 => 'oro_user.security.login', 1 => 'onLogin'), 0);\n $instance->addListenerService('oro_datagrid.datgrid.build.after.users-email-grid', array(0 => 'oro_user.event_listener.user_email_grid_listener', 1 => 'onBuildAfter'), 0);\n $instance->addListenerService('oro_datagrid.datgrid.build.after.role-users-grid', array(0 => 'oro_user.event_listener.role_users_grid_listener', 1 => 'onBuildAfter'), 0);\n $instance->addListenerService('oro_datagrid.datgrid.build.after.group-users-grid', array(0 => 'oro_user.event_listener.group_users_grid_listener', 1 => 'onBuildAfter'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'oro_dataaudit.listener.kernel_listener', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('oro_datagrid.datgrid.build.after.audit-history-grid', array(0 => 'oro_dataaudit.event_listener.dataaudit_history_grid_listener', 1 => 'onBuildAfter'), 0);\n $instance->addListenerService('jsfv.pre_process', array(0 => 'jsfv.validation_groups_listener', 1 => 'onJsfvPreProcess'), 0);\n $instance->addListenerService('jsfv.post_process', array(0 => 'jsfv.repeated_field_listener', 1 => 'onJsfvPostProcess'), 0);\n $instance->addListenerService('oro_datagrid.datgrid.build.after.pim-role-user-grid', array(0 => 'pim_user.event_listener.role_users_grid_listener', 1 => 'onBuildAfter'), 0);\n $instance->addListenerService('oro_datagrid.datgrid.build.after.pim-group-user-grid', array(0 => 'pim_user.event_listener.group_users_grid_listener', 1 => 'onBuildAfter'), 0);\n $instance->addListenerService('oro_datagrid.datgrid.build.before', array(0 => 'pim_datagrid.event_listener.configure_sorters_listener', 1 => 'onBuildBefore'), 0);\n $instance->addListenerService('oro_datagrid.datgrid.build.after.export-profile-grid', array(0 => 'pim_import_export.event_listener.inject_job_type', 1 => 'onBuildAfter'), 0);\n $instance->addListenerService('oro_datagrid.datgrid.build.after.import-profile-grid', array(0 => 'pim_import_export.event_listener.inject_job_type', 1 => 'onBuildAfter'), 0);\n $instance->addListenerService('oro_datagrid.datgrid.build.after.export-execution-grid', array(0 => 'pim_import_export.event_listener.inject_job_type', 1 => 'onBuildAfter'), 0);\n $instance->addListenerService('oro_datagrid.datgrid.build.after.import-execution-grid', array(0 => 'pim_import_export.event_listener.inject_job_type', 1 => 'onBuildAfter'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'pim_versioning.event_subscriber.adduser', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('oro_datagrid.datgrid.build.after', array(0 => 'pim_enrich.event_listener.add_locale_code_to_grid', 1 => 'onBuildAfter'), 0);\n $instance->addListenerService('oro_datagrid.datgrid.build.before.product-grid', array(0 => 'pim_enrich.event_listener.product_grid_before_listener', 1 => 'buildBefore'), 0);\n $instance->addListenerService('oro_datagrid.datgrid.build.after.product-grid', array(0 => 'pim_enrich.event_listener.product_grid_after_listener', 1 => 'onBuildAfter'), 0);\n $instance->addListenerService('oro_datagrid.datgrid.build.before.product-group-grid', array(0 => 'pim_enrich.event_listener.product_group_grid_before_listener', 1 => 'buildBefore'), 0);\n $instance->addListenerService('oro_datagrid.datgrid.build.after.product-group-grid', array(0 => 'pim_enrich.event_listener.product_group_grid_after_listener', 1 => 'onBuildAfter'), 0);\n $instance->addListenerService('oro_datagrid.datgrid.build.before.product-variant-group-grid', array(0 => 'pim_enrich.event_listener.product_variant_group_grid_before_listener', 1 => 'buildBefore'), 0);\n $instance->addListenerService('oro_datagrid.datgrid.build.after.product-variant-group-grid', array(0 => 'pim_enrich.event_listener.product_variant_group_grid_after_listener', 1 => 'onBuildAfter'), 0);\n $instance->addListenerService('oro_datagrid.datgrid.build.after.group-grid', array(0 => 'pim_enrich.event_listener.group_grid_listener', 1 => 'onBuildAfter'), 0);\n $instance->addListenerService('oro_datagrid.datgrid.build.after.variant-group-grid', array(0 => 'pim_enrich.event_listener.variant_group_grid_listener', 1 => 'onBuildAfter'), 0);\n $instance->addListenerService('oro_datagrid.datgrid.build.before.association-product-grid', array(0 => 'pim_enrich.event_listener.association_product_grid_before_listener', 1 => 'buildBefore'), 0);\n $instance->addListenerService('oro_datagrid.datgrid.build.after.association-product-grid', array(0 => 'pim_enrich.event_listener.association_product_grid_after_listener', 1 => 'onBuildAfter'), 0);\n $instance->addListenerService('oro_datagrid.datgrid.build.after.association-group-grid', array(0 => 'pim_enrich.event_listener.association_group_grid_after_listener', 1 => 'onBuildAfter'), 0);\n $instance->addListenerService('oro_datagrid.datgrid.build.before.history-grid', array(0 => 'pim_enrich.event_listener.history_grid_listener', 1 => 'onBuildBefore'), 0);\n $instance->addListenerService('oro_datagrid.datgrid.build.before.product-history-grid', array(0 => 'pim_enrich.event_listener.history_grid_listener', 1 => 'onBuildBefore'), 0);\n $instance->addListenerService('clank.client.connected', array(0 => 'clank.client_event.listener', 1 => 'onClientConnect'), 0);\n $instance->addListenerService('clank.client.disconnected', array(0 => 'clank.client_event.listener', 1 => 'onClientDisconnect'), 0);\n $instance->addListenerService('clank.client.error', array(0 => 'clank.client_event.listener', 1 => 'onClientError'), 0);\n $instance->addSubscriberService('response_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ResponseListener');\n $instance->addSubscriberService('streamed_response_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\StreamedResponseListener');\n $instance->addSubscriberService('locale_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\LocaleListener');\n $instance->addSubscriberService('debug.emergency_logger_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ErrorsLoggerListener');\n $instance->addSubscriberService('debug.deprecation_logger_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ErrorsLoggerListener');\n $instance->addSubscriberService('session_listener', 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\EventListener\\\\SessionListener');\n $instance->addSubscriberService('session.save_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\SaveSessionListener');\n $instance->addSubscriberService('fragment.listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\FragmentListener');\n $instance->addSubscriberService('profiler_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ProfilerListener');\n $instance->addSubscriberService('data_collector.request', 'Symfony\\\\Component\\\\HttpKernel\\\\DataCollector\\\\RequestDataCollector');\n $instance->addSubscriberService('router_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\RouterListener');\n $instance->addSubscriberService('security.firewall', 'Symfony\\\\Component\\\\Security\\\\Http\\\\Firewall');\n $instance->addSubscriberService('security.rememberme.response_listener', 'Symfony\\\\Component\\\\Security\\\\Http\\\\RememberMe\\\\ResponseListener');\n $instance->addSubscriberService('twig.exception_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ExceptionListener');\n $instance->addSubscriberService('swiftmailer.email_sender.listener', 'Symfony\\\\Bundle\\\\SwiftmailerBundle\\\\EventListener\\\\EmailSenderListener');\n $instance->addSubscriberService('sensio_framework_extra.controller.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\ControllerListener');\n $instance->addSubscriberService('sensio_framework_extra.converter.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\ParamConverterListener');\n $instance->addSubscriberService('sensio_framework_extra.view.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\TemplateListener');\n $instance->addSubscriberService('sensio_framework_extra.cache.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\CacheListener');\n $instance->addSubscriberService('besimple.soap.exception_listener', 'BeSimple\\\\SoapBundle\\\\EventListener\\\\SoapExceptionListener');\n $instance->addSubscriberService('stof_doctrine_extensions.event_listener.locale', 'Pim\\\\Bundle\\\\EnrichBundle\\\\EventListener\\\\UserContextListener');\n $instance->addSubscriberService('oro_email.listener.config_subscriber', 'Oro\\\\Bundle\\\\EmailBundle\\\\EventListener\\\\ConfigSubscriber');\n $instance->addSubscriberService('oro_entity.owner.entity_config_subscriber', 'Oro\\\\Bundle\\\\EntityBundle\\\\EventListener\\\\EntityConfigSubscriber');\n $instance->addSubscriberService('oro_entity.event_listener.custom_entity_grid_subscriber', 'Oro\\\\Bundle\\\\EntityBundle\\\\EventListener\\\\CustomEntityGridListener');\n $instance->addSubscriberService('oro_entity.event_listener.relation_entity_grid_subscriber', 'Oro\\\\Bundle\\\\EntityBundle\\\\EventListener\\\\RelationEntityGridListener');\n $instance->addSubscriberService('oro_entity_config.event_listener.entityconfig_grid_listener', 'Oro\\\\Bundle\\\\EntityConfigBundle\\\\EventListener\\\\EntityConfigGridListener');\n $instance->addSubscriberService('oro_entity_config.event_listener.entityfields_grid_listener', 'Oro\\\\Bundle\\\\EntityConfigBundle\\\\EventListener\\\\FieldConfigGridListener');\n $instance->addSubscriberService('oro_entity_extend.listener.config_subscriber', 'Oro\\\\Bundle\\\\EntityExtendBundle\\\\EventListener\\\\ConfigSubscriber');\n $instance->addSubscriberService('oro_locale.locale_listener', 'Oro\\\\Bundle\\\\LocaleBundle\\\\EventListener\\\\LocaleListener');\n $instance->addSubscriberService('oro_security.owner.ownership_config_subscriber', 'Oro\\\\Bundle\\\\SecurityBundle\\\\EventListener\\\\OwnershipConfigSubscriber');\n $instance->addSubscriberService('oro_security.entity_security_config_subscriber', 'Oro\\\\Bundle\\\\SecurityBundle\\\\EventListener\\\\EntitySecurityMetadataConfigSubscriber');\n $instance->addSubscriberService('oro_security.listener.config_subscriber', 'Oro\\\\Bundle\\\\SecurityBundle\\\\EventListener\\\\ConfigSubscriber');\n $instance->addSubscriberService('akeneo_batch.logger_subscriber', 'Akeneo\\\\Bundle\\\\BatchBundle\\\\EventListener\\\\LoggerSubscriber');\n $instance->addSubscriberService('akeneo_batch.notification_subscriber', 'Akeneo\\\\Bundle\\\\BatchBundle\\\\EventListener\\\\NotificationSubscriber');\n $instance->addSubscriberService('akeneo_batch.set_job_execution_log_file_subscriber', 'Akeneo\\\\Bundle\\\\BatchBundle\\\\EventListener\\\\SetJobExecutionLogFileSubscriber');\n $instance->addSubscriberService('pim_user.event_subscriber.group', 'Pim\\\\Bundle\\\\UserBundle\\\\EventSubscriber\\\\GroupSubscriber');\n $instance->addSubscriberService('pim_notification.event_subscriber.job_execution_notifier', 'Pim\\\\Bundle\\\\NotificationBundle\\\\EventSubscriber\\\\JobExecutionNotifier');\n $instance->addSubscriberService('pim_catalog.event_subscriber.initialize_values', 'Pim\\\\Bundle\\\\CatalogBundle\\\\EventSubscriber\\\\InitializeValuesSubscriber');\n $instance->addSubscriberService('pim_catalog.event_subscriber.category.check_channels', 'Pim\\\\Bundle\\\\CatalogBundle\\\\EventSubscriber\\\\Category\\\\CheckChannelsOnDeletionSubscriber');\n $instance->addSubscriberService('pim_versioning.event_subscriber.addcontext', 'Pim\\\\Bundle\\\\VersioningBundle\\\\EventSubscriber\\\\AddContextSubscriber');\n $instance->addSubscriberService('pim_enrich.event_listener.request', 'Pim\\\\Bundle\\\\EnrichBundle\\\\EventListener\\\\RequestListener');\n $instance->addSubscriberService('pim_enrich.event_subscriber.translate_flash_messages', 'Pim\\\\Bundle\\\\EnrichBundle\\\\EventListener\\\\TranslateFlashMessagesSubscriber');\n $instance->addSubscriberService('pim_base_connector.event_listener.archivist', 'Pim\\\\Bundle\\\\BaseConnectorBundle\\\\EventListener\\\\JobExecutionArchivist');\n $instance->addSubscriberService('pim_base_connector.event_listener.invalid_items_collector', 'Pim\\\\Bundle\\\\BaseConnectorBundle\\\\EventListener\\\\InvalidItemsCollector');\n $instance->addSubscriberService('web_profiler.debug_toolbar', 'Symfony\\\\Bundle\\\\WebProfilerBundle\\\\EventListener\\\\WebDebugToolbarListener');\n\n return $instance;\n }", "title": "" }, { "docid": "067f0aa2a7bd015c581925a496a72456", "score": "0.5770271", "text": "protected function getVictoireCore_TemplateMenuListenerService()\n {\n return $this->services['victoire_core.template_menu_listener'] = new \\Victoire\\Bundle\\TemplateBundle\\Listener\\TemplateMenuListener($this->get('victoire_core.admin_menu_builder'));\n }", "title": "" }, { "docid": "088e0957ff22d19e7afa140fd92207c0", "score": "0.576018", "text": "protected function getPimEnrich_EventListener_HistoryGridListenerService()\n {\n return $this->services['pim_enrich.event_listener.history_grid_listener'] = new \\Pim\\Bundle\\DataGridBundle\\EventListener\\ConfigureHistoryGridListener($this->get('oro_datagrid.datagrid.request_params'));\n }", "title": "" }, { "docid": "76f6abd78aff6b5054a1406392099c5c", "score": "0.57525516", "text": "public final function getDispatcher()\n {\n if ($this->_dispatcher === null)\n {\n $this->_dispatcher = new TNvpServiceDispatcher(\n $this->getServiceInterface(), \n $this->getNvpUrl()\n );\n }\n \n return $this->_dispatcher;\n }", "title": "" }, { "docid": "db4c9d0a3b6d9ecac00f4d86997ca72d", "score": "0.5749381", "text": "protected function getOroSecurity_Listener_ConfigSubscriberService()\n {\n return $this->services['oro_security.listener.config_subscriber'] = new \\Oro\\Bundle\\SecurityBundle\\EventListener\\ConfigSubscriber();\n }", "title": "" }, { "docid": "b58e1b4fa13187d80b2e6acca3ccb52b", "score": "0.57321507", "text": "public function init()\n {\n if (!$this->_oInstance)\n {\n $this->_oInstance = new FlexRouter();\n $this->registerRouter();\n }\n return $this->_oInstance;\n }", "title": "" }, { "docid": "18279d1eb96aaefffdabd2ccf8aa63d2", "score": "0.57254565", "text": "protected function getKernel_Listener_NavHistoryResponseService()\n {\n return $this->services['kernel.listener.nav_history_response'] = new \\Oro\\Bundle\\NavigationBundle\\Event\\ResponseHistoryListener($this->get('oro_navigation.item.factory'), $this->get('security.context'), $this->get('doctrine.orm.default_entity_manager'), $this->get('oro_navigation.title_service'));\n }", "title": "" }, { "docid": "369c5a2b76e28df1f2aa147fb92fbbfe", "score": "0.5680372", "text": "protected function getVictoireCore_BackendMenuListenerService()\n {\n return $this->services['victoire_core.backend_menu_listener'] = new \\Victoire\\Bundle\\CoreBundle\\Listener\\BackendMenuListener($this->get('victoire_core.admin_menu_builder'));\n }", "title": "" }, { "docid": "76d74b56cb02906b48fd32777a82f1f3", "score": "0.56731695", "text": "protected function getSensioFrameworkExtra_Cache_ListenerService()\n {\n return $this->services['sensio_framework_extra.cache.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\CacheListener();\n }", "title": "" }, { "docid": "f04018aa09a0b2011702ee1e9f104cac", "score": "0.5659376", "text": "protected function getVictoireCore_PageMenuListenerService()\n {\n return $this->services['victoire_core.page_menu_listener'] = new \\Victoire\\Bundle\\PageBundle\\Listener\\PageMenuListener($this->get('victoire_core.admin_menu_builder'));\n }", "title": "" }, { "docid": "655ec45a2229ade0a90e3ecbb44419a9", "score": "0.56487477", "text": "protected function getVictoireCore_MediaMenuListenerService()\n {\n return $this->services['victoire_core.media_menu_listener'] = new \\Victoire\\Bundle\\MediaBundle\\EventListener\\MediaMenuListener($this->get('victoire_core.admin_menu_builder'));\n }", "title": "" }, { "docid": "e9808bdf406b74daf971540d53d16e92", "score": "0.5626169", "text": "protected function getVictoireCore_MenuDispatcherService()\n {\n return $this->services['victoire_core.menu_dispatcher'] = new \\Victoire\\Bundle\\CoreBundle\\Listener\\MenuDispatcher($this->get('event_dispatcher'), $this->get('security.token_storage'), $this->get('security.authorization_checker'));\n }", "title": "" }, { "docid": "b90c2dce265b07d45cd1fc4a9091071e", "score": "0.56254077", "text": "protected function getKernel_Listener_HashnavResponseService()\n {\n return $this->services['kernel.listener.hashnav_response'] = new \\Oro\\Bundle\\NavigationBundle\\Event\\ResponseHashnavListener($this->get('security.context'), $this->get('templating'));\n }", "title": "" }, { "docid": "7e0bcc303a9dee2972cf953b23014147", "score": "0.5622576", "text": "protected function getSensioFrameworkExtra_Security_ListenerService()\n {\n return $this->services['sensio_framework_extra.security.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\SecurityListener(NULL, new \\Sensio\\Bundle\\FrameworkExtraBundle\\Security\\ExpressionLanguage(), ${($_ = isset($this->services['security.authentication.trust_resolver']) ? $this->services['security.authentication.trust_resolver'] : $this->getSecurity_Authentication_TrustResolverService()) && false ?: '_'}, ${($_ = isset($this->services['security.role_hierarchy']) ? $this->services['security.role_hierarchy'] : $this->getSecurity_RoleHierarchyService()) && false ?: '_'}, $this->get('security.token_storage', ContainerInterface::NULL_ON_INVALID_REFERENCE), $this->get('security.authorization_checker', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }", "title": "" }, { "docid": "ab9e7dcb8d941c52a87684633e4b51c1", "score": "0.5619592", "text": "protected function getEventDispatcherService()\n {\n $this->services['event_dispatcher'] = $instance = new \\Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher($this);\n\n $instance->addListenerService('kernel.request', array(0 => 'knp_menu.listener.voters', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_blog.blog_menu_listener', 1 => 'addGlobal'), 90);\n $instance->addListenerService('victoire_core.article_menu.contextual', array(0 => 'victoire_blog.article_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.article_menu.contextual', array(0 => 'victoire_blog.article_settings_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.blog_menu.contextual', array(0 => 'victoire_blog.blog_menu.contextual', 1 => 'addBlogContextual'), 0);\n $instance->addListenerService('victoire_core.article_template_menu.contextual', array(0 => 'victoire_blog.article_template_menu.menu_listener.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.blog_menu.contextual', array(0 => 'victoire_blog.blog_page_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire.widget_filter.form.pre_set_data', array(0 => 'victoire.widget_filter.form.listener.presetdata', 1 => 'manageExtraFiltersFields'), 1);\n $instance->addListenerService('victoire.widget_filter.form.pre_submit', array(0 => 'victoire.widget_filter.form.listener.presubmit', 1 => 'manageExtraFiltersFields'), 1);\n $instance->addListenerService('victoire.widget_filter.form.date.set_default_value', array(0 => 'victoire.widget_filter.blog.set.default.values.form.listener', 1 => 'setDefaultDateValue'), 1);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_business_page.business_template_menu_listener', 1 => 'addGlobal'), 50);\n $instance->addListenerService('victoire_core.business_template_menu.contextual', array(0 => 'victoire_core.business_template_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_core.menu_dispatcher', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('victoire_core.backend_menu.global', array(0 => 'victoire_core.backend_menu_listener', 1 => 'addGlobal'), 100);\n $instance->addListenerService('kernel.controller', array(0 => 'victoire_core.listener.controller_listener', 1 => 'preExecuteAutorun'), 0);\n $instance->addListenerService('victoire.on_render_page', array(0 => 'victoire_core.view_css_listener', 1 => 'onRenderPage'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_i18n.kernelrequest.listener', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_core.media_menu_listener', 1 => 'addGlobal'), 60);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_core.page_menu_listener', 1 => 'addGlobal'), 100);\n $instance->addListenerService('victoire_core.page_menu.contextual', array(0 => 'victoire_core.page_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_sitemap.sitemap_menu_listener', 1 => 'addGlobal'), 70);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_core.template_menu_listener', 1 => 'addGlobal'), 80);\n $instance->addListenerService('victoire_core.template_menu.contextual', array(0 => 'victoire_core.template_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_twig.kernelrequest.listener', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_view_reference.cache_warmer', 1 => 'warmUp'), 0);\n $instance->addSubscriberService('response_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ResponseListener');\n $instance->addSubscriberService('streamed_response_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\StreamedResponseListener');\n $instance->addSubscriberService('locale_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\LocaleListener');\n $instance->addSubscriberService('validate_request_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ValidateRequestListener');\n $instance->addSubscriberService('translator_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\TranslatorListener');\n $instance->addSubscriberService('session_listener', 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\EventListener\\\\SessionListener');\n $instance->addSubscriberService('session.save_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\SaveSessionListener');\n $instance->addSubscriberService('fragment.listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\FragmentListener');\n $instance->addSubscriberService('debug.debug_handlers_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\DebugHandlersListener');\n $instance->addSubscriberService('router_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\RouterListener');\n $instance->addSubscriberService('security.firewall', 'Symfony\\\\Component\\\\Security\\\\Http\\\\Firewall');\n $instance->addSubscriberService('security.rememberme.response_listener', 'Symfony\\\\Component\\\\Security\\\\Http\\\\RememberMe\\\\ResponseListener');\n $instance->addSubscriberService('twig.exception_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ExceptionListener');\n $instance->addSubscriberService('monolog.handler.console', 'Symfony\\\\Bridge\\\\Monolog\\\\Handler\\\\ConsoleHandler');\n $instance->addSubscriberService('swiftmailer.email_sender.listener', 'Symfony\\\\Bundle\\\\SwiftmailerBundle\\\\EventListener\\\\EmailSenderListener');\n $instance->addSubscriberService('sensio_framework_extra.controller.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\ControllerListener');\n $instance->addSubscriberService('sensio_framework_extra.converter.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\ParamConverterListener');\n $instance->addSubscriberService('sensio_framework_extra.view.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\TemplateListener');\n $instance->addSubscriberService('sensio_framework_extra.cache.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\HttpCacheListener');\n $instance->addSubscriberService('sensio_framework_extra.security.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\SecurityListener');\n $instance->addSubscriberService('troopers_alertifybundle.event_listener', 'Troopers\\\\AlertifyBundle\\\\EventListener\\\\AlertifyListener');\n $instance->addSubscriberService('fos_user.security.interactive_login_listener', 'FOS\\\\UserBundle\\\\EventListener\\\\LastLoginListener');\n $instance->addSubscriberService('fos_user.listener.authentication', 'FOS\\\\UserBundle\\\\EventListener\\\\AuthenticationListener');\n $instance->addSubscriberService('fos_user.listener.flash', 'FOS\\\\UserBundle\\\\EventListener\\\\FlashListener');\n $instance->addSubscriberService('fos_user.listener.resetting', 'FOS\\\\UserBundle\\\\EventListener\\\\ResettingListener');\n $instance->addSubscriberService('victoire_core.cache_subscriber', 'Victoire\\\\Bundle\\\\CoreBundle\\\\EventSubscriber\\\\CacheSubscriber');\n $instance->addSubscriberService('victoire_i18n.locale_subscriber', 'Victoire\\\\Bundle\\\\I18nBundle\\\\Subscriber\\\\LocaleSubscriber');\n $instance->addSubscriberService('victoire_view_reference.listener', 'Victoire\\\\Bundle\\\\ViewReferenceBundle\\\\Listener\\\\ViewReferenceListener');\n\n return $instance;\n }", "title": "" }, { "docid": "92bdcc96dd9d2b0314b52c34dddf4769", "score": "0.561749", "text": "protected function getOroUi_View_ListenerService()\n {\n return $this->services['oro_ui.view.listener'] = new \\Oro\\Bundle\\UIBundle\\EventListener\\TemplateListener($this);\n }", "title": "" }, { "docid": "95c8dda928ebc24caa39922290cade93", "score": "0.56053495", "text": "protected function getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Bundle\\FrameworkBundle\\EventListener\\SessionListener($this);\n }", "title": "" }, { "docid": "95c8dda928ebc24caa39922290cade93", "score": "0.56053495", "text": "protected function getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Bundle\\FrameworkBundle\\EventListener\\SessionListener($this);\n }", "title": "" }, { "docid": "cab04824b14862c922815843dcfab0e5", "score": "0.55999154", "text": "protected function getSwiftmailer_EmailSender_ListenerService()\n {\n return $this->services['swiftmailer.email_sender.listener'] = new \\Symfony\\Bundle\\SwiftmailerBundle\\EventListener\\EmailSenderListener($this, $this->get('logger', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }", "title": "" }, { "docid": "cab04824b14862c922815843dcfab0e5", "score": "0.55999154", "text": "protected function getSwiftmailer_EmailSender_ListenerService()\n {\n return $this->services['swiftmailer.email_sender.listener'] = new \\Symfony\\Bundle\\SwiftmailerBundle\\EventListener\\EmailSenderListener($this, $this->get('logger', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }", "title": "" }, { "docid": "6cc8695d87535fd8af00c841bcd55cbb", "score": "0.55982435", "text": "private function getServiceLocator()\n {\n return $this->serviceLocator;\n }", "title": "" }, { "docid": "25207a3aea3e5f90a9b5a140349e8cbd", "score": "0.5584901", "text": "protected function getVictoireCore_Listener_ControllerListenerService()\n {\n return $this->services['victoire_core.listener.controller_listener'] = new \\Victoire\\Bundle\\CoreBundle\\Listener\\ControllerListener($this->get('event_dispatcher'));\n }", "title": "" }, { "docid": "9c8367308210886fee1e18e0a7cf69cf", "score": "0.55830747", "text": "protected function getOroDistribution_RoutingLoaderService()\n {\n return $this->services['oro_distribution.routing_loader'] = new \\Oro\\Bundle\\DistributionBundle\\Routing\\OroAutoLoader($this->get('file_locator'), $this->get('kernel'));\n }", "title": "" }, { "docid": "eee8f07cb522fc2c35d387528e44fb0d", "score": "0.55730766", "text": "protected function getSecurity_AccessListenerService()\n {\n return $this->services['security.access_listener'] = new \\Symfony\\Component\\Security\\Http\\Firewall\\AccessListener($this->get('security.context'), $this->get('security.access.decision_manager'), $this->get('security.access_map'), $this->get('security.authentication.manager'));\n }", "title": "" }, { "docid": "2efacd71966d23eed8bd829c9fd2ec45", "score": "0.55725694", "text": "protected function getDispatcher()\n {\n return $this->di->getShared('dispatcher');\n }", "title": "" }, { "docid": "809673414805d1aafdbf72c2711b291e", "score": "0.5548346", "text": "protected function getOroEmail_Listener_ConfigSubscriberService()\n {\n return $this->services['oro_email.listener.config_subscriber'] = new \\Oro\\Bundle\\EmailBundle\\EventListener\\ConfigSubscriber($this->get('oro_email.cache'), 'oro_email.available_in_template_fields');\n }", "title": "" }, { "docid": "2d24b9cd26ae583eb7b9fcf8240eaf1a", "score": "0.5543885", "text": "protected static function getFacadeAccessor()\n\t{\n\t\treturn static::$container->get('facade-router');\n\t}", "title": "" }, { "docid": "12c011e7312b631a732b5b7def81ac31", "score": "0.55396646", "text": "protected function getValidateRequestListenerService()\n {\n return $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener();\n }", "title": "" }, { "docid": "d441f8e0c200295e0790a386d3b6feef", "score": "0.5533162", "text": "public function getRouterBase();", "title": "" }, { "docid": "55aa38eeafadc5fafed66c3445f16f3a", "score": "0.5515495", "text": "public function getServiceLocator()\n {\n return $this->serviceLocator;\n }", "title": "" }, { "docid": "55aa38eeafadc5fafed66c3445f16f3a", "score": "0.5515495", "text": "public function getServiceLocator()\n {\n return $this->serviceLocator;\n }", "title": "" }, { "docid": "55aa38eeafadc5fafed66c3445f16f3a", "score": "0.5515495", "text": "public function getServiceLocator()\n {\n return $this->serviceLocator;\n }", "title": "" }, { "docid": "55aa38eeafadc5fafed66c3445f16f3a", "score": "0.5515495", "text": "public function getServiceLocator()\n {\n return $this->serviceLocator;\n }", "title": "" }, { "docid": "55aa38eeafadc5fafed66c3445f16f3a", "score": "0.5515495", "text": "public function getServiceLocator()\n {\n return $this->serviceLocator;\n }", "title": "" }, { "docid": "55aa38eeafadc5fafed66c3445f16f3a", "score": "0.5515495", "text": "public function getServiceLocator()\n {\n return $this->serviceLocator;\n }", "title": "" }, { "docid": "485d3d2d02395216379d1e386cd9cef4", "score": "0.5507496", "text": "protected function getProfilerListenerService()\n {\n return $this->services['profiler_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ProfilerListener($this->get('profiler'), NULL, false, false);\n }", "title": "" }, { "docid": "0e1bfb835b1b536821fdad232ea0da1e", "score": "0.5499599", "text": "protected function getFosRest_Routing_Loader_ProcessorService()\n {\n return $this->services['fos_rest.routing.loader.processor'] = new \\FOS\\RestBundle\\Routing\\Loader\\RestRouteProcessor();\n }", "title": "" }, { "docid": "e17011d372f81ae02bffbe9d640858cc", "score": "0.5487679", "text": "final public function getServiceLocator()\n\t{\n\t\tif ($this->serviceLocator === NULL) {\n\t\t\t$this->serviceLocator = $this->parent === NULL\n\t\t\t\t? Environment::getServiceLocator()\n\t\t\t\t: $this->parent->getServiceLocator();\n\t\t}\n\n\t\treturn $this->serviceLocator;\n\t}", "title": "" }, { "docid": "bdad29b6b76ba2cabe63cc37f0edd3d9", "score": "0.5483381", "text": "protected function getDebug_DebugHandlersListenerService()\n {\n return $this->services['debug.debug_handlers_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener(NULL, $this->get('monolog.logger.php', ContainerInterface::NULL_ON_INVALID_REFERENCE), -1, 0, false, ${($_ = isset($this->services['debug.file_link_formatter']) ? $this->services['debug.file_link_formatter'] : $this->getDebug_FileLinkFormatterService()) && false ?: '_'}, false);\n }", "title": "" }, { "docid": "649d70f64827fa1e11f0597ff67547df", "score": "0.5479656", "text": "public function getServiceLocator() {\n\t\treturn $this->serviceLocator;\n\t}", "title": "" }, { "docid": "ce99218ff24488a35381e1a21e03ed92", "score": "0.54721713", "text": "protected function getVictoireBlog_BlogMenuListenerService()\n {\n return $this->services['victoire_blog.blog_menu_listener'] = new \\Victoire\\Bundle\\BlogBundle\\Listener\\BlogMenuListener($this->get('victoire_core.admin_menu_builder'));\n }", "title": "" }, { "docid": "1ce2bdc84be7297da1f9940c392ac260", "score": "0.54671323", "text": "protected function resolveListener(string $listener)\n {\n return Container::getInstance()->make($listener);\n }", "title": "" }, { "docid": "c14343e74ec93ee1c2807ec2aa3fee7b", "score": "0.54375345", "text": "public function getServiceLocator()\n {\n \treturn $this->serviceLocator;\n }", "title": "" }, { "docid": "c14343e74ec93ee1c2807ec2aa3fee7b", "score": "0.54375345", "text": "public function getServiceLocator()\n {\n \treturn $this->serviceLocator;\n }", "title": "" }, { "docid": "70593980c8f903cfa7582574a928ff30", "score": "0.5427072", "text": "public function getServiceLocator() {\n\n\t\treturn $this->serviceLocator;\n\t\n\t}", "title": "" } ]
d9ee810e92a6334552a04ae4c15b497c
getClientAuthSignature Function getClientAuthSignature($method, $url, $date, $user, $secret) $method : The HTTP request method, e.g. GET, POST, etc. $url : The request URL $date : The GMT date timestamp, e.g. 24 Mar 2011 19:46:50Z $user : The web service user ID, e.g. bob $secret : The shared secret for the user Returns the authorization signature used by the web service.
[ { "docid": "10885b24f58260fa29fe543fdff8cf5b", "score": "0.8591421", "text": "function getClientAuthSignature($method, $url, $date, $user, $secret) {\n\n $request_url = parse_url($url);\n $query_string = $request_url['query'];\n\n parse_str($query_string,$params);\n // sort the parameters\n ksort($params);\n\n // create the canonicalized query\n $canonicalized_query = array();\n foreach ($params as $param=>$value)\n {\n $param = str_replace(\"%7E\", \"~\", rawurlencode($param));\n $value = str_replace(\"%7E\", \"~\", rawurlencode($value));\n $canonicalized_query[] = $param.\"=\".$value;\n }\n $canonicalized_query = implode(\"&\", $canonicalized_query);\n\n // create the string to sign\n $string_to_sign = $method.\"\\n\".$canonicalized_query.\"\\n\".$date;\n\n // calculate HMAC with SHA256 and base64-encoding\n $signature = base64_encode(hash_hmac(\"sha256\", $string_to_sign, $secret, True));\n\n // encode the signature for the request\n $signature = str_replace(\"%7E\", \"~\", rawurlencode($signature));\n\n return $signature;\n }", "title": "" } ]
[ { "docid": "e1be698157594842d76245e15098446e", "score": "0.6524972", "text": "function sign_request( $method, $url, $params = [] ) {\n//\t\tglobal $gConsumerSecret, $gTokenSecret;\n\n\t\t$parts = parse_url( $url );\n\n\t\t// We need to normalize the endpoint URL\n\t\t$scheme = isset( $parts['scheme'] ) ? $parts['scheme'] : 'http';\n\t\t$host = isset( $parts['host'] ) ? $parts['host'] : '';\n\t\t$port = isset( $parts['port'] ) ? $parts['port'] : ( $scheme == 'https' ? '443' : '80' );\n\t\t$path = isset( $parts['path'] ) ? $parts['path'] : '';\n\t\tif ( ( $scheme == 'https' && $port != '443' ) ||\n\t\t\t( $scheme == 'http' && $port != '80' )\n\t\t) {\n\t\t\t// Only include the port if it's not the default\n\t\t\t$host = \"$host:$port\";\n\t\t}\n\n\t\t// Also the parameters\n\t\t$pairs = [];\n\t\tparse_str( isset( $parts['query'] ) ? $parts['query'] : '', $query );\n\t\t$query += $params;\n\t\tunset( $query['oauth_signature'] );\n\t\tif ( $query ) {\n\t\t\t$query = array_combine(\n\t\t\t\t// rawurlencode follows RFC 3986 since PHP 5.3\n\t\t\t\tarray_map( 'rawurlencode', array_keys( $query ) ),\n\t\t\t\tarray_map( 'rawurlencode', array_values( $query ) )\n\t\t\t);\n\t\t\tksort( $query, SORT_STRING );\n\t\t\tforeach ( $query as $k => $v ) {\n\t\t\t\t$pairs[] = \"$k=$v\";\n\t\t\t}\n\t\t}\n\n\t\t$toSign = rawurlencode( strtoupper( $method ) ) . '&' .\n\t\t\trawurlencode( \"$scheme://$host$path\" ) . '&' .\n\t\t\trawurlencode( join( '&', $pairs ) );\n\t\t$key = rawurlencode( $this->gConsumerSecret ) . '&' . rawurlencode( $this->gTokenSecret );\n\t\treturn base64_encode( hash_hmac( 'sha1', $toSign, $key, true ) );\n\t}", "title": "" }, { "docid": "fcf1f7c7b1b6d51e5c6a5e0c554f586c", "score": "0.633011", "text": "function calcSignatureREST($secretKey, $httpUrl, $parameters,$httpMethod) {\r\n\t\t/*\r\n\t\terror_log(\"calculating sig.\");\r\n\t\terror_log(\"secret_key: \".$secretKey);\r\n\t\terror_log(\t\"httpUrl: $httpUrl\" );\r\n\t\terror_log(\"http method: $httpMethod\");\r\n\t\terror_log(\"params \".json_encode($parameters).\"\\n\");\r\n\t\t*/\r\n\t\t$req = OAuthRequest::from_request($httpMethod,$httpUrl, $parameters);\r\n\t\t$baseString = $req->get_signature_base_string(); \r\n\t\treturn base64_encode(hash_hmac('sha1', $baseString, base64_decode($secretKey), true));\r\n\t}", "title": "" }, { "docid": "ba47abe368895bf579f01d36cdabf2ff", "score": "0.63021624", "text": "private function sign_request($method, $url, $params, $token_secret) {\n\t\t$url = rawurlencode($url);\n\n\t\t//Handle the request parameters\n\t\tuksort($params, 'strcmp');\n\n\t\t// Generate key=value pairs\n\t\t$pairs = array();\n\t\t\n\t\tforeach ($params as $key=>$value ) {\n\t\t\tif (is_array($value)) {\n\t\t\t\t// If the value is an array, it's because there are multiple \n\t\t\t\t// with the same key, sort them, then add all the pairs\n\t\t\t\tnatsort($value);\n\t\t\t\tforeach ($value as $v2) {\n\t\t\t\t\t$pairs[] = $key . '=' . $v2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$pairs[] = $key . '=' . $value;\n\t\t\t}\n\t\t}\n\n\t\t$params = implode(\"&\", $pairs);\n\t\t$params = rawurlencode($params);\n\t\t\n\t\t//Concat them all\n\t\t$base_string = $method . \"&\" . $url . \"&\" . $params;\n\t\t\n\t\t// Make the key\n\t\t$key = $this->shared_secret . \"&\" . $token_secret;//$this->token_secret;\n\t\t\n\n\t\tswitch ($this->signature_method) {\n\t\t\tcase 'HMAC-SHA1':\n\t\t\t\t$str = hash_hmac('sha1', $base_string, $key, TRUE);\n\t\t\t\t$str = base64_encode($str);\n\t\t\t\treturn rawurlencode($str);\n\t\t\t\tbreak;\n\t\t\tcase 'PLAINTEXT':\n\t\t\t\treturn rawurlencode($key);\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "8e3c5088e6adcba25b4e48b103d16def", "score": "0.61268425", "text": "private function generateAndSignSignature($params, $url, $requestMethod)\r\n {\r\n $baseString = $this->generateBaseString($params, $url, $requestMethod);\r\n\r\n $this->signatureBaseString = $baseString;\r\n\r\n $signature = $this->sign($baseString);\r\n\r\n return $signature;\r\n }", "title": "" }, { "docid": "507af0e3c090b3ec14ab7d570d7b50e9", "score": "0.61239177", "text": "public function getServerSignature();", "title": "" }, { "docid": "acc363e4fbfef7f150ea9899b06d7ef7", "score": "0.6079512", "text": "private function generateSignature($requestUrl, $method, $params, $tokenSecret = '') {\n $base = $this->generateSignatureBase($requestUrl, $method, $params);\n\n $signatureKey = rawurlencode($this->consumerSecret).'&';\n\n if($tokenSecret !== '') {\n $signatureKey .= rawurlencode($tokenSecret);\n }\n\n return base64_encode(hash_hmac('sha1', $base, $signatureKey, true));\n }", "title": "" }, { "docid": "9658213ab50cac1f4dfa26bde622c955", "score": "0.60316026", "text": "protected function generateSignature($url) {\n $sign = \"GET\\n\" . strtolower(self::$ServiceHost) . \"\\n/\\n\". $url;\n echo \"String to sign: \\n\" . $sign . \"\\n\";\n $sig = base64_encode(hash_hmac('sha256', $sign, $this->secretAccessKey, true));\n echo \"\\nSignature: \" . $sig .\"\\n\";\n return rawurlencode($sig);\n }", "title": "" }, { "docid": "9772a837e73e6b79e34a786d1e02f2e8", "score": "0.6030362", "text": "private static function getSignature($date, $salt)\n\t{\n\t\treturn hash_hmac('md5', $date . $salt, self::$api_secret);\n\t}", "title": "" }, { "docid": "ebdb123a05f9a02d38d443293e01ea2c", "score": "0.6016946", "text": "public static function signRequest($method, $url, $parameters, $clientSecret, $tokenSecret = '')\n {\n // Validate required parameters\n foreach (array('oauth_consumer_key', 'oauth_timestamp', 'oauth_nonce', 'oauth_version', 'oauth_signature_method') as $parameter) {\n if (!isset($parameters[$parameter])) {\n throw new \\RuntimeException(sprintf('Parameter \"%s\" must be set.', $parameter));\n }\n }\n\n // Remove oauth_signature if present\n // Ref: Spec: 9.1.1 (\"The oauth_signature parameter MUST be excluded.\")\n if (isset($parameters['oauth_signature'])) {\n unset($parameters['oauth_signature']);\n }\n\n // Parameters are sorted by name, using lexicographical byte value ordering.\n // Ref: Spec: 9.1.1 (1)\n uksort($parameters, 'strcmp');\n\n // http_build_query should use RFC3986\n $parts = array(\n $method,\n rawurlencode($url),\n rawurlencode(str_replace(array('%7E','+'), array('~','%20'), http_build_query($parameters))),\n );\n\n $baseString = implode('&', $parts);\n\n $keyParts = array(\n rawurlencode($clientSecret),\n rawurlencode($tokenSecret),\n );\n\n $key = implode('&', $keyParts);\n\n return base64_encode(hash_hmac('sha1', $baseString, $key, true));\n }", "title": "" }, { "docid": "b10ad79da84f25339dce410ba185101c", "score": "0.5988777", "text": "public function getSignature( $method, $endpoint, $authorizationParams, $urlParams = array() ) {\r\n\t\t\t// url params need to be included in the signature\r\n\t\t\t$authorizationParams = array_merge( $authorizationParams, $urlParams );\r\n\r\n\t\t\t// make sure to sort\r\n\t\t\tuksort( $authorizationParams, 'strcmp' );\r\n\r\n\t\t\tforeach ( $authorizationParams as $key => $value ) { // encode keys and params\r\n\t\t\t\t$authorizationParams[$key] = rawurlencode( $key ) . '=' . rawurlencode( $value );\r\n\t\t\t}\r\n\r\n\t\t\t$signatureBase = array( // signature base array\r\n\t\t\t\trawurlencode( $method ), // encoded method\r\n\t\t\t\trawurlencode( $endpoint ), // encoded endpoint\r\n\t\t\t\trawurlencode( implode( '&', $authorizationParams ) ), // authorization params delimited by '&'\r\n\t\t\t);\r\n\r\n\t\t\t// create the signature base string delimited by '&'\r\n\t\t\t$signatureBaseString = implode( '&', $signatureBase );\r\n\r\n\t\t\t$signatureKey = array( // signature key\r\n\t\t\t\trawurlencode( $this->_consumerSecret ), // encoded consumer secret\r\n\t\t\t\t$this->_oauthTokenSecret ? rawurlencode( $this->_oauthTokenSecret ) : '' // endocded access token if we have one\r\n\t\t\t);\r\n\r\n\t\t\t// create the signature key string delimited by '&'\r\n\t\t\t$signatureKeyString = implode( '&', $signatureKey );\r\n\r\n\t\t\t// return base64 encoded hmac as required by twitter\r\n\t\t\treturn base64_encode( hash_hmac( 'sha1', $signatureBaseString, $signatureKeyString, true ) );\r\n\t\t}", "title": "" }, { "docid": "31a50b97b1991760e789ec89241751ab", "score": "0.59773266", "text": "public function sign($url,$secret){\n\n // decode base64\n $secret=base64_decode($secret,true);\n\n $signKey=hash_hmac(\"sha512\",$this->getDate(),$secret,true);\n\n $signature=hash_hmac(\"sha512\",$url,$signKey,true);\n\n return base64_encode($signature);\n }", "title": "" }, { "docid": "e2907501c556d43b08ffb56a0e42d2c0", "score": "0.5946934", "text": "private function signature () {\n\t\t$url = $this->defaults['method'].\"\\n\".$this->defaults['url'].$this->region.\"\\n\".$this->defaults['uri'].\"\\n\".$this->query_string;\n\t\t$signature = base64_encode(hash_hmac($this->defaults['hash'], $url, $this->private_key, true));\n\t\treturn str_replace(\"%7E\", \"~\", rawurlencode($signature));\n\t}", "title": "" }, { "docid": "0a2e0e36250b17b7cec2576d4574ee81", "score": "0.5907131", "text": "private function _request($url, $call_params = NULL, $request_method = 'GET', $ContentTypeIfAny = NULL)\n {\n // Prepare oauth arguments, we need these separate because they are sent in a header, not on the url\n {\n $oauth_params = array(\n 'oauth_consumer_key' => $this->ConsumerKey,\n 'oauth_version' => '1.0',\n 'oauth_signature_method' => 'HMAC-SHA1',\n 'oauth_timestamp' => time(),\n 'oauth_nonce' => md5(uniqid(microtime()))\n );\n\n if($token = $this->get_token()) \n {\n $oauth_params['oauth_token'] = $token['oauth_token'];\n }\n\n // We might have oauth parameters in the call_params, move them out\n if(is_array($call_params))\n {\n foreach(array_keys($call_params) as $k) \n {\n if(preg_match('/^oauth_/', $k)) \n {\n $oauth_params[$k] = $call_params[$k];\n unset($call_params[$k]);\n }\n }\n }\n }\n \n // Now we can sign our request, note that any post body is not signed (params are tho?).\n {\n $signing_parameters = array_merge($oauth_params, is_array($call_params) ? $call_params:array());\n \n // The parameters must be sorted alphabetically ignoring case\n uksort($signing_parameters, array($this, 'strcmp_nocase')); \n\n // This is not the same as to_query_string() because the parts have no parameter names \n $base = implode('&', $this->codec()->rawurlencode(array(\n strtoupper($request_method),\n $url,\n $this->codec()->to_query_string($signing_parameters)\n )));\n\n // This is not the same as to_query_string() because the parts have no parameter names \n $key = implode('&', $this->codec()->rawurlencode(array(\n $this->ConsumerSecret,\n isset($token['oauth_token_secret']) ? $token['oauth_token_secret'] : ''\n )));\n\n // Hash the base with the key to produce signature\n $oauth_params['oauth_signature'] = base64_encode(hash_hmac('sha1', $base, $key, true)); \n }\n \n // We can now create the OAuth authorization header from the parameters and signature\n $Headers = array(\n 'Authorization: OAuth realm=\"\",' . $this->codec()->to_query_string($oauth_params, 1, 0, ',')\n );\n \n $FormPostData = NULL;\n \n // Assemble the URL, Headers and any Form Data \n {\n switch(strtoupper($request_method))\n {\n case 'POST':\n if(isset($call_params) && is_array($call_params)) \n {\n $FormPostData = $this->codec()->to_query_string($call_params);\n if(!isset($ContentTypeIfAny)) $ContentTypeIfAny = 'application/x-www-form-urlencoded';\n }\n else\n {\n $FormPostData = $call_params;\n }\n break;\n \n case 'GET':\n if(is_array($call_params) && count($call_params)) \n {\n $url .= '?' . $this->codec()->to_query_string($call_params);\n $FormPostData = NULL;\n }\n \n // If we have a cache handler, since this is a GET request we can\n // cache this, the cache key needs to be unique \n // to the URL\n // any non-oauth headers\n // own consumer key\n // and the authenticated user's token\n if(isset($this->CacheCallbacks))\n {\n $CacheKey \n = $url . ':' . \n implode(array_slice($Headers, 1), 1) . ':' .\n $this->ConsumerKey . ':' .\n $token['oauth_token']\n ;\n }\n break;\n\n case 'DELETE':\n if(is_array($call_params) && count($call_params)) \n {\n $url .= '?' . $this->codec()->to_query_string($call_params); \n $FormPostData = NULL;\n }\n break;\n }\n\n if(isset($ContentTypeIfAny))\n {\n $Headers[] = 'Content-type: ' . $ContentTypeIfAny;\n }\n } \n \n // If we are caching the request, check if we have one that isn't expired\n if(isset($CacheKey))\n {\n if($CachedResult = call_user_func_array($this->CacheCallbacks['retrieve'], array($CacheKey)))\n {\n list($response, $info) = $CachedResult; \n $ResponseClass = $this->ResponseClass;\n return new $ResponseClass($response, $info, $this->codec());\n }\n }\n\n // Now we do the http request, which is done with curl in this class\n list($response,$info) = $this->perform_http_request($url, $request_method, $Headers, $FormPostData);\n\n // Curl has done it's bit, so wrap the response we got into the appropriate response class and return\n $ResponseClass = $this->ResponseClass;\n $ResponseObject = new $ResponseClass($response, $info, $this->codec());\n \n // If we are caching the request, do so provided it was OK, using the expires the response parsed out of the headers\n if(isset($CacheKey) && $ResponseObject->is_ok())\n {\n call_user_func_array($this->CacheCallbacks['store'], array(array($response, $info), $CacheKey, $ResponseObject->expires()));\n }\n \n return $ResponseObject;\n }", "title": "" }, { "docid": "5845b0d35bf4a87c3a8bc42640002dab", "score": "0.59001577", "text": "public function getSignature();", "title": "" }, { "docid": "5845b0d35bf4a87c3a8bc42640002dab", "score": "0.59001577", "text": "public function getSignature();", "title": "" }, { "docid": "5845b0d35bf4a87c3a8bc42640002dab", "score": "0.59001577", "text": "public function getSignature();", "title": "" }, { "docid": "5845b0d35bf4a87c3a8bc42640002dab", "score": "0.59001577", "text": "public function getSignature();", "title": "" }, { "docid": "52ce1fa0a1a5a9f4d41cf6a3b9a69e3e", "score": "0.58763397", "text": "public function calculateSignature($get)\n {\n if (!is_array($get)) {\n $query = parse_url($get, PHP_URL_QUERY);\n $get = array();\n parse_str($query, $get);\n }\n\n $preConvert = function($arr) use (&$preConvert) {\n $params = [];\n foreach ($arr as $name => $value) {\n if ($name == 'signature') {\n continue;\n }\n\n if (is_array($value)) {\n $value = implode('', $preConvert($value));\n }\n\n $params[] = $name . '=' . $value;\n }\n return $params;\n };\n\n $params = $preConvert($get);\n\n sort($params);\n\n return md5($this->client_secret . implode('', $params));\n }", "title": "" }, { "docid": "0988da6ef99a818cf15d15be64368fc8", "score": "0.5869668", "text": "public function calculateDataSignature( $method, $url, $params){\n\t\t// encode data\n\t\t$lines = array();\n\t\t$lines[] = strtoupper($method);\n\t\t$lines[] = $this->urlencode( $url );\n\t\t$lines[] = $this->urlencode( $this->serializeParams($params) );\n\t\t\n\t\t\n\t\t$plain = implode('&', $lines);\n\n\n\t\t// get signature key\n\t\t$key = $this->urlencode($this->consumer_secret) . '&';\n\t\t\n\t\tif($this->token_secret){\n\t\t\t$key .= $this->urlencode($this->token_secret);\n\t\t}\n\n\t\t// generate signature\n\t\t$signature = base64_encode(hash_hmac('sha1', $plain, $key, TRUE ));\n\t\treturn $signature;\n\t}", "title": "" }, { "docid": "82507e7e829397464153b0995403de6d", "score": "0.58024514", "text": "private function getSignature(string $method)\n {\n return md5($this->devId . $method . $this->authKey . $this->getTimestamp());\n }", "title": "" }, { "docid": "d1d51f4b415504568e16532993ee92a6", "score": "0.5801231", "text": "protected function getSignature($service_url,$salon_id,$timestamp){\n $host = self::REPORTS_SERVER_URL;\n //print \"<br/>\";\n $private_key = self::REPORTS_PRIVATEKEY;\n $uri = $service_url;\n //$params['TimeStamp'] = urldecode($timestamp);\n $params['TimeStamp'] = $timestamp;\n $params['salon_id'] = $salon_id;\n $method = 'POST';\n // create the canonicalized query\n $canonicalized_query = array();\n foreach ($params as $param=>$value){\n $param = str_replace('%7E', '~', rawurlencode($param));\n $value = str_replace('%7E', '~', rawurlencode($value));\n $canonicalized_query[] = $param.'='.$value;\n }\n $canonicalized_query = implode('&', $canonicalized_query);\n $string_to_sign = $method.\"\\n\".$host.\"\\n\".$uri.\"\\n\".$canonicalized_query;\n $signature = base64_encode(hash_hmac('sha1', $string_to_sign, $private_key, TRUE));\n $signature = str_replace('%7E', '~', rawurlencode($signature));\n // $signature = $host.$uri.'?'.$canonicalized_query.'&Signature='.$signature;\n return $signature;\n }", "title": "" }, { "docid": "5005628d6ffa06643ed9eb783117a738", "score": "0.57800597", "text": "function sign($method, $baseurl, $params = array())\n{\n echo base64_encode(hash_hmac('sha1', getBaseString($method, $baseurl, $params), 'GDdmIQH6jhtmLUypg82g&', true));\n}", "title": "" }, { "docid": "b01d23f50eda71e8dad21f990c8918c7", "score": "0.5742291", "text": "private function createSignature($url) {\n $url = str_replace($this->configuration['baseURL'], '', $url); // we're stripping off the base url part for generating the signature\n $this->signature = base64_encode(hash_hmac('sha256', strtolower($url), base64_decode($this->configuration['privateKey']),true));\n $this->request['header']['Authorization'] = $this->signature;\n }", "title": "" }, { "docid": "cf25f2d34106b27ce5bbcdda394d37aa", "score": "0.57305557", "text": "abstract public function build_signature( $request, $consumer, $token );", "title": "" }, { "docid": "c02ccdc2d5a901e73ec820a2ceb39b04", "score": "0.5684151", "text": "private function sign($request)\r\n\t{\r\n\t\t$timestamp = gmdate(\"Y-m-d\\TH:i:s\\Z\"); \r\n\t\t$timestamp = str_replace(':', '%3A', $timestamp);\r\n\t\t\r\n\t\t$request['Timestamp'] = $timestamp;\r\n\t\t$request['Version'] = $this->apiversion;\r\n\t\t\r\n\t\tksort($request, SORT_STRING);\r\n\t\t\r\n\t\t$prepend = \"GET\\n{$this->baseurl}\\n{$this->urlpath}\\n\";\r\n\t\t\r\n\t\t$requestStr = $this->build_query($request);\r\n\r\n\t\t$prependStr = $prepend . $requestStr;\r\n\t\t\r\n\t\t$signature = hash_hmac($this->hashalgo, $prependStr, $this->secretKey, true);\r\n\t\t$signature = base64_encode($signature);\r\n\t\t$signature = str_replace('+', '%2B', $signature);\r\n\t\t$signature = str_replace('=', '%3D', $signature);\r\n\t\t\r\n\t\t$requestStr .= \"&Signature=$signature\";\r\n\t\t\r\n\t\treturn $requestStr;\r\n\t}", "title": "" }, { "docid": "3ce293a137fe3317392d1991d55bb84e", "score": "0.56787103", "text": "function signature($signature);", "title": "" }, { "docid": "3ac9789a9bef6df57012e94feb1924c4", "score": "0.56344634", "text": "private function oauthSignature()\n {\n $oauth_hash = '';\n\n // consumer key\n $oauth_hash .= 'count=' . $this->count;\n\n $oauth_hash .= '&oauth_consumer_key=' . $this->consumerKey;\n\n $oauth_hash .= '&oauth_nonce=' . time() . '&';\n\n $oauth_hash .= 'oauth_signature_method=HMAC-SHA1&';\n\n $oauth_hash .= 'oauth_timestamp=' . time() . '&';\n\n $oauth_hash .= 'oauth_token='.$this->accessToken;\n\n $oauth_hash .= '&oauth_version=1.0';\n\n $oauth_hash .= '&q='.$this->query;\n\n $base = 'GET';\n\n $base .= '&';\n\n $base .= rawurlencode($this->url);\n\n $base .= '&';\n\n $base .= rawurlencode($oauth_hash);\n\n // consumer secret\n $key = rawurlencode($this->consumerSecret);\n\n $key .= '&';\n\n $key .= rawurlencode($this->accessTokenSecret);\n\n $signature = base64_encode(hash_hmac('sha1', $base, $key, true));\n\n $signature = rawurlencode($signature);\n\n return $signature;\n }", "title": "" }, { "docid": "276081196d23b61fbe3d4b86d1e29ec7", "score": "0.5633647", "text": "function buildSignature($course, $d, $cnt){\n\t$domain = $_SERVER['HTTP_HOST'];\n\t\n\t// Consumer secret (not to be placed in the page sent to the client)\n\t$consumer_secret = 'c1341201e32a4a32e02e17a84260c5c79aec7fea';\n\t\n\t// Call to generate the String concatenation that will be hashed\n\t$preHashString = generateSsoPreHashString(buildJSON($course, $d, $cnt), $domain, $consumer_secret);\n\t\n\t// $signature is created by hashing $preHashString\n\treturn hash('sha256', $preHashString);\n\t\n}", "title": "" }, { "docid": "427005f3169a17477d09d8060eff2386", "score": "0.5612954", "text": "private function generateRequestSignature($host, $path, $timestamp)\n {\n $data = $host . \":\" .\n $path . \":\" .\n $this->getProject()->getProperty('zendserver.config.userAgent') . \":\" .\n gmdate('D, d M Y H:i:s ', $timestamp) . 'GMT';\n\n return $this->getProject()->getProperty('zendserver.config.user').'; '\n . hash_hmac('sha256', $data, $this->getProject()->getProperty('zendserver.config.apiKey'));\n }", "title": "" }, { "docid": "6580bb205ffdb68fb0582d82f5462916", "score": "0.5596008", "text": "function getSignature($request, $key)\n {\n return base64_encode(hash_hmac('sha256', $request, $key, true));\n }", "title": "" }, { "docid": "42da1a966455cb937841614f215d4c7a", "score": "0.5576264", "text": "function signature() {\n\tstatic $sig;\n\tif ( isset( $sig ) ) {\n\t\treturn $sig;\n\t}\n\t$headers\t= httpHeaders();\n\t$skip\t\t= [\n\t\t'Access-Control-Request-Headers',\n\t\t'Access-Control-Request-Method',\n\t\t'Upgrade-Insecure-Requests',\n\t\t'If-Unmodified-Since',\n\t\t'If-Modified-Since',\n\t\t'Accept-Datetime',\n\t\t'Accept-Encoding',\n\t\t'Content-Length',\n\t\t'Authorization',\n\t\t'Cache-Control',\n\t\t'If-None-Match',\n\t\t'Content-Type',\n\t\t'Content-Md5',\n\t\t'Connection',\n\t\t'Forwarded',\n\t\t'If-Match',\n\t\t'Referer',\n\t\t'Cookie',\n\t\t'Expect',\n\t\t'Accept',\n\t\t'Pragma',\n\t\t'Date',\n\t\t'A-Im',\n\t\t'TE'\n\t];\n\t\n\t$search\t\t= \n\t\\array_diff_key( \n\t\t$headers, \\array_reverse( $skip ) \n\t);\n\t\n\t$sig\t\t= '';\n\tforeach ( $search as $k => $v ) {\n\t\t$sig .= $v[0];\n\t}\n\t\n\treturn $sig;\n}", "title": "" }, { "docid": "09ab8d77d5e7cc25e0d89c44fa831eb1", "score": "0.5567797", "text": "public function sign($uri, array $parameters = [], $method = 'POST');", "title": "" }, { "docid": "89abeb255c45730b80376c7136e5ef72", "score": "0.55508316", "text": "public function generateSignature($requestTime, $publicId, $secretKey)\r\n\t{\r\n\t\t$digest = $this->generateDigest(trim($requestTime), trim($publicId), trim($secretKey));\r\n\t\treturn hash('sha256', $digest);\r\n\t}", "title": "" }, { "docid": "8f8eab237cfc90604e3455bfc1f72041", "score": "0.55433893", "text": "private function checkSignature()\n {\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n \n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n \n $token = TOKEN;\n $tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n sort($tmpArr, SORT_STRING);\n $tmpStr = implode( $tmpArr );\n $tmpStr = sha1( $tmpStr );\n \n if( $tmpStr == $signature ){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "43a737ea9cb7ccb5e6030b6313bbbd8c", "score": "0.55091125", "text": "private function checkSignature()\r\n\t{\r\n if (!defined(\"TOKEN\")) {\r\n throw new Exception('TOKEN is not defined!');\r\n }\r\n if( !empty( $_GET[\"signature\"] ) ){\r\n \t$signature = $_GET[\"signature\"];\r\n }else{\r\n \t$signature = '';\r\n }\r\n if( !empty( $_GET[\"timestamp\"] ) ){\r\n \t$timestamp = $_GET[\"timestamp\"];\r\n }else{\r\n \t$timestamp = '';\r\n }\r\n if( !empty( $_GET[\"nonce\"] ) ){\r\n \t$nonce = $_GET[\"nonce\"];\r\n }else{\r\n \t$nonce = '';\r\n }\r\n\t\t$token = TOKEN;\r\n\t\t$tmpArr = array($token, $timestamp, $nonce);\r\n // use SORT_STRING rule\r\n\t\tsort($tmpArr, SORT_STRING);\r\n\t\t$tmpStr = implode( $tmpArr );\r\n\t\t$tmpStr = sha1( $tmpStr );\r\n\t//\t$this->writelog( $tmpStr, 1, $url );\r\n\t//\t$this->writelog( $signature, 2, $url );\r\n\t\tif( $tmpStr == $signature ){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "0195d949f7f1b1d4c11fbc58ff2dce00", "score": "0.55049586", "text": "final public function getSignature($service, $method, $nonce, $timestamp)\n {\n $sign = $service . strtolower($method) . $timestamp;\n $sign .= $nonce;\n $hmac = $this->hmac($sign);\n if ($hmac) {\n return $hmac;\n }\n return false;\n }", "title": "" }, { "docid": "b6d0d6c4bf21fc3583b99a1aec27cd9d", "score": "0.54981995", "text": "private function checkSignature()\n {\n// if (!defined(\"TOKEN\")) {\n// throw new Exception('TOKEN is not defined!');\n// }\n\n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n\n $token = C('TOKEN');\n $tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n sort($tmpArr, SORT_STRING);\n $tmpStr = implode($tmpArr);\n $tmpStr = sha1($tmpStr);\n\n if ($tmpStr == $signature) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "bcd0d4bb34ff1effd39d38c6494347d6", "score": "0.5472815", "text": "private function getSignatureKey($key, $date, $region, $service)\n {\n $kSecret = 'AWS4' . $key;\n $kDate = hash_hmac('sha256', $date, $kSecret, true);\n $kRegion = hash_hmac('sha256', $region, $kDate, true);\n $kService = hash_hmac('sha256', $service, $kRegion, true);\n $kSigning = hash_hmac('sha256', $this->aws4Request, $kService, true);\n\n return $kSigning;\n }", "title": "" }, { "docid": "7eef819f1ef0fc6fccab40c6b480b8b8", "score": "0.546547", "text": "function sign_hmac_sha1($method, $baseurl, $secret, array $parameters)\n{\n $data = $method.'&';\n $data .= urlencode($baseurl).'&';\n $oauth = '';\n ksort($parameters);\n //Put the token secret in if it does not exist. It\n //will be empty if it does not exist as per the spec.\n if(!array_key_exists('oauth_token_secret', $parameters))$parameters['oauth_token_secret'] = '';\n foreach($parameters as $key => $value)\n {\n //Don't include the token secret into the base string\n if(strtolower($key) != 'oauth_token_secret')$oauth .= \"&{$key}={$value}\";\n } \n $data .= urlencode(substr($oauth, 1));\n $secret .= '&'.$parameters['oauth_token_secret'];\n \n return base64_encode(hash_hmac('sha1', $data, $secret, true));\n}", "title": "" }, { "docid": "f71bf2d98d6e0805f8bb4461d9ce42f7", "score": "0.5442331", "text": "static public function getAuthSignature($channelSecret, $uri, $queryOrBody, $nonce)\n {\n $authMacText = $channelSecret . $uri . $queryOrBody . $nonce;\n return base64_encode(hash_hmac('sha256', $authMacText, $channelSecret, true));\n }", "title": "" }, { "docid": "15cec6e55a23aac0cf278380fd724917", "score": "0.5436622", "text": "public function getGeneratedSignatureFromUrl(string $url)\n {\n $urlComponents = parse($url);\n return $this->getUrlSignature($urlComponents);\n\n }", "title": "" }, { "docid": "cc085fb292c30dcd4465dadcc89f514b", "score": "0.5407211", "text": "private function buildSignedRequest($method, $uri, $nonce, $timestamp, $paramList) {\n\n\t\t//if not set, version is 1.0\n\t\t@$this->version or $this->version = \"1.0.0\";\n\t\t$secret\t= $this->secret;\n\n\t\t//no auth/request token yet!\n\t\t$signedAuthFields = array( \t'oauth_partner_key' \t\t=> $this->partnerKey,\n\t\t\t\t\t\t \t\t\t'oauth_signature_method'\t=> $this->sigMethod,\n\t\t\t\t\t\t \t\t\t'oauth_timestamp'\t\t\t=> $timestamp,\n\t\t\t\t\t\t \t\t\t'oauth_version'\t\t\t\t=> $this->version,\n\t\t\t\t\t\t \t\t\t'oauth_nonce'\t\t\t\t=> $nonce,\n\t\t\t\t\t\t \t\t\t'tokbox_jabberid'\t\t\t=> $this->jabberId\n\t\t\t\t\t\t\t\t);\n\n\t\t$paramList = array_merge($paramList, $signedAuthFields);\n\n\t\t//Calculate the request signature - doesn't include params with underscores\n\t\t//Sort the paramaters w/o underscores\n\t\t$requestString = $method . \"&\" . $uri . \"&\" . $this->generateRequestString($paramList);\n\n\t\t//Sign the requestString with the stored secret, and check it against the passed sig\n\t\tswitch($this->sigMethod) {\n\t\tcase \"SIMPLE-MD5\":\n\t\t\t$signedString = md5($requestString . $secret);\n\t\t\tbreak;\n\t\tcase \"HMAC-SHA1\":\n\t\t\t$signedString = base64_encode( hash_hmac('sha1', $requestString, $secret, true));\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthrow new Exception(\"No signature method selected\");\n\t\t}\n\n\t\treturn $signedString;\n\t}", "title": "" }, { "docid": "f20266f238558ec95f7eab5cacaae449", "score": "0.5396022", "text": "protected function generateSignature($param)\n\t{\n\t\t$signature['method'] = 'GET';\n\t\t$signature['host'] = 'webservices.amazon.com';\n\t\t$signature['uri'] = '/onca/xml';\n\t\t\n\t\t$param['Service'] = 'AWSECommerceService';\n\t\t$param['AWSAccessKeyId'] = $this->_publicKey;\n\t\t$param['AssociateTag'] = $this->_associateTag;\n\t\t$param['Timestamp'] = gmdate(\"Y-m-d\\TH:i:s\\Z\");\n\t\t$param['Version'] = '2011-08-01';\n\t\tksort($param);\n\t\t\n\t\t// URL encode key/value pairs\n\t\tforeach($param as $key => $value)\n\t\t{\n\t\t\t$key = str_replace(\"%7E\", \"~\", rawurlencode($key));\n\t\t\t$value = str_replace(\"%7E\", \"~\", rawurlencode($value));\n\t\t\t$queryParamsUrl[] = $key . '=' . $value;\n\t\t}\n\t\t\n\t\t// add ampersands between key/value pairs\n\t\t$signature['queryUrl'] = implode(\"&\", $queryParamsUrl);\n\t\t\n\t\t// start signature creation\n\t\t$stringToSign = $signature['method'] . \"\\n\" . $signature['host'] . \"\\n\" . $signature['uri'] . \"\\n\" . $signature['queryUrl'];\n\t\t$signature['string'] = str_replace(\"%7E\", \"~\", rawurlencode(base64_encode(hash_hmac(\"sha256\", $stringToSign, $this->_privateKey, TRUE))));\n\t\treturn $signature;\n\t}", "title": "" }, { "docid": "f1e10e08a906c1ab63c86a249c5e2c14", "score": "0.53860205", "text": "private function _generateSignatureKey()\n {\n $date_h = hash_hmac('sha256', $this->_date, 'AWS4' . $this->aws_secret_key, true);\n $region_h = hash_hmac('sha256', $this->_region, $date_h, true);\n $service_h = hash_hmac('sha256', 'email', $region_h, true);\n $signing_h = hash_hmac('sha256', 'aws4_request', $service_h, true);\n\n return $signing_h;\n }", "title": "" }, { "docid": "fa60e6351899a46184d9c6677ca21954", "score": "0.5384356", "text": "public function oauth_signature($basestring)\n {\n // Create $hashkey (see 1. above)\n $hashkey = \"$this->consumer_secret&$this->oauth_token_secret\";\n // Create $oauth_signature using $basesecret & $haskey\n $oauth_signature = hash_hmac('sha1', $basestring, $hashkey, true);\n // Encode $oauth_signature\n $oauth_signature = base64_encode($oauth_signature);\n // Add to $fields array\n return $oauth_signature;\n }", "title": "" }, { "docid": "c75f718594284a151ae92cf2c01ebd2a", "score": "0.5378925", "text": "public function calculateSignature($requestUrl, $requestMethod, $consumerId, $privateKey, $timestamp=null)\n {\n $this->timestamp = $timestamp;\n if(is_null($this->timestamp) || !is_numeric($this->timestamp)){\n $this->timestamp = $this->getMilliseconds();\n }\n\n /**\n * Append values into string for signing\n */\n $message = $consumerId.\"\\n\".$requestUrl.\"\\n\".strtoupper($requestMethod).\"\\n\".$this->timestamp.\"\\n\";\n\n /**\n * Get RSA object for signing\n */\n $rsa = new RSA();\n $decodedPrivateKey = base64_decode($privateKey);\n $rsa->setPrivateKeyFormat(RSA::PRIVATE_FORMAT_PKCS8);\n $rsa->setPublicKeyFormat(RSA::PRIVATE_FORMAT_PKCS8);\n\n /**\n * Load private key\n */\n try {\n if($rsa->loadKey($decodedPrivateKey, RSA::PRIVATE_FORMAT_PKCS8)) \n {\n /**\n * Make sure we use SHA256 for signing\n */\n $rsa->setHash('sha256');\n $rsa->setSignatureMode(RSA::SIGNATURE_PKCS1);\n $signed = $rsa->sign($message);\n /**\n * Return Base64 Encode generated signature\n */\n return base64_encode($signed);\n }\n\n else {\n throw new \\Exception(\"Unable to load private key\");\n }\n }\n catch (\\Exception $e){\n return $e;\n }\n }", "title": "" }, { "docid": "cff6b5f531e9588bc99b22078b793944", "score": "0.5377213", "text": "function oAuthRequest($url, $method, $params = array()) {\n\t\tif (strrpos($url, \"https://\") !== 0 && strrpos($url, \"http://\") !== 0) {\n\t\t\t$url = $this->host . $url;\n\t\t}\n\t\n\t\t$request = OAuthRequest::from_consumer_and_token($this->consumer, $this->token, $method, $url, $params);\n\t\t$request->sign_request($this->sha1_method, $this->consumer, $this->token);\n\t\t\n\t\tswitch ($method) {\n\t\t\tcase \"GET\":\n\t\t\t\treturn $this->http($request->to_url(), \"GET\");\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn $this->http($request->get_normalized_http_url(), $method, $request->to_postdata());\n\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "0dd1f226928c088da4f71f449ee13765", "score": "0.5346115", "text": "function getAuthParams( $method, $url, $params){\n\t\t$auth_params = array();\n\t\t$auth_params['oauth_consumer_key'] = $this->consumer_key;\n\t\t$auth_params['oauth_nonce'] = $this->getNonce();\n\t\t$auth_params['oauth_signature_method'] = 'HMAC-SHA1';\n\t\t$auth_params['oauth_timestamp'] = $this->getTimestamp();\n\t\t$auth_params['oauth_version'] = '1.0';\n\t\t\n\t\tif( isset($params['oauth_callback']) ){\n\t\t\t$auth_params['oauth_callback'] = $params['oauth_callback'];\n\t\t}\n\t\t\n\t\tif($this->token){\n\t\t\t$auth_params['oauth_token'] = $this->token;\n\t\t}\n\t\t\n\t\t$all_params = array_merge($params, $auth_params);\n\t\t$auth_params['oauth_signature'] = $this->calculateDataSignature($method, $url, $all_params);\n\t\t\n\t\tksort($auth_params);\n\t\treturn $auth_params;\n\t}", "title": "" }, { "docid": "0e9de50363568468fbe490a0b65d9a35", "score": "0.5342916", "text": "public function getImageSignature () {}", "title": "" }, { "docid": "b7d59f9865e30d34a9b5fc51b281066e", "score": "0.5342332", "text": "private function checkSignature()\n {\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n \n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n \n $token = TOKEN;\n $tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n sort($tmpArr, SORT_STRING);\n $tmpStr = implode( $tmpArr );\n $tmpStr = sha1( $tmpStr );\n \n if( $tmpStr == $signature ){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "6b4f0005c928d2d36fe49b71955928b7", "score": "0.53407604", "text": "public function getSignature(){\n\t\t$string = $this->getHeader() . '.' . $this->getPayload();\n\t\t$hash = $this->getHash($string);\n\t\treturn $hash;\n\t}", "title": "" }, { "docid": "cdc8dbe05b24a68901186a1136d6e693", "score": "0.53327054", "text": "private function checkSignature()\r\n {\r\n if (!defined(\"TOKEN\")) {\r\n throw new Exception('TOKEN is not defined!');\r\n }\r\n \r\n $signature = $_GET[\"signature\"];\r\n $timestamp = $_GET[\"timestamp\"];\r\n $nonce = $_GET[\"nonce\"];\r\n \r\n $token = TOKEN;\r\n $tmpArr = array($token, $timestamp, $nonce);\r\n // use SORT_STRING rule\r\n sort($tmpArr, SORT_STRING);\r\n $tmpStr = implode( $tmpArr );\r\n $tmpStr = sha1( $tmpStr );\r\n \r\n if( $tmpStr == $signature ){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "a71555dd1a6f84eb8e3c424a1baf3533", "score": "0.53318936", "text": "private function getAuthorization($url, $method, &$params, $flags) {\n $oauth = array(\n 'oauth_consumer_key' => $this->ck,\n 'oauth_signature_method' => 'HMAC-SHA1',\n 'oauth_timestamp' => time(),\n 'oauth_version' => '1.0a',\n 'oauth_nonce' => md5(mt_rand()),\n 'oauth_token' => $this->ot,\n );\n $key = array($this->cs, $this->os);\n if ($flags & self::MODE_REQUEST_TOKEN) {\n $key[1] = '';\n if (isset($params['oauth_callback'])) {\n $oauth['oauth_callback'] = $params['oauth_callback'];\n }\n unset($oauth['oauth_token'], $oauth['oauth_callback']);\n }\n if ($flags & self::MODE_ACCESS_TOKEN) {\n $oauth['oauth_verifier'] = $params['oauth_verifier'];\n unset($params['oauth_verifier']);\n }\n $base = $oauth + $params;\n uksort($base, 'strnatcmp');\n $oauth['oauth_signature'] = base64_encode(hash_hmac(\n 'sha1',\n implode('&', array_map('rawurlencode', array(\n $method,\n $url,\n str_replace(\n array('+', '%7E'), \n array('%20', '~'), \n http_build_query($base, '', '&')\n ),\n ))),\n implode('&', array_map('rawurlencode', $key)),\n true\n ));\n $tmp = array();\n foreach ($oauth as $key => $value) {\n $tmp[] = urlencode($key) . '=\"' . urlencode($value) . '\"'; \n }\n return array(\n 'Authorization: OAuth ' . implode(', ', $tmp)\n );\n }", "title": "" }, { "docid": "3f56751513a8a0d4bfd8229dbae24bde", "score": "0.5326213", "text": "protected function generateSignature($signatureUri, $time, $request = '')\n {\n $hash = null;\n if (is_array($request)) {\n $data = json_encode($request, JSON_UNESCAPED_SLASHES);\n $hash = hash('sha256', $data);\n } else {\n $hash = hash('sha256', $request);\n }\n $signatureString = $signatureUri . ':' . $this->accessToken . ':' . $hash . ':' . $time;\n return hash_hmac('sha256', $signatureString, $this->api_secret);\n }", "title": "" }, { "docid": "2fbaa1dcdcd650c845bb27ce0ba067a1", "score": "0.5324538", "text": "function tadc_verify_request_signature($secret, array $args = array())\n{\n // Generate our key to sign\n $keys = array();\n foreach(array_keys($args) as $key)\n {\n $keys[] = urlencode($key);\n }\n $values = array();\n foreach(array_values($args) as $value)\n {\n $values[] = urlencode($value);\n }\n\n $params = array_combine($keys, $values);\n\n // Parameters are sorted by name, using lexicographical byte value ordering.\n // Ref: Spec: 9.1.1 (1)\n uksort($params, 'strcmp');\n\n $pairs = array();\n foreach ($params as $parameter => $value) {\n if (is_array($value)) {\n // If two or more parameters share the same name, they are sorted by their value\n // Ref: Spec: 9.1.1 (1)\n natsort($value);\n foreach ($value as $duplicate_value) {\n $pairs[] = $parameter . '=' . $duplicate_value;\n }\n } else {\n $pairs[] = $parameter . '=' . $value;\n }\n }\n $key = urlencode(implode(\"&\", $pairs));\n return hash_hmac('sha256', $key, $secret);\n}", "title": "" }, { "docid": "a5373cd779d11b5439b6282574daaab7", "score": "0.5323115", "text": "private function checkSignature()\n {\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n \n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n \n $token = TOKEN;\n $tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n sort($tmpArr, SORT_STRING);\n $tmpStr = implode( $tmpArr );\n $tmpStr = sha1( $tmpStr );\n \n if( $tmpStr == $signature ){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "bec970e6bb4f37778603fd8c5c49bfc5", "score": "0.53083754", "text": "public static function getSignature($method)\n {\n switch ($method) {\n case 'HMAC-SHA1':\n return new Signature\\HMACSHA1();\n break;\n\n case 'RSA-SHA1':\n return new Signature\\RSASHA1();\n break;\n\n case 'PLAINTEXT':\n return new Signature\\PLAINTEXT();\n break;\n\n default:\n throw new RuntimeException('Invalid signature method');\n break;\n }\n }", "title": "" }, { "docid": "b4d5707a2cf19a7b97be21d1b15a9005", "score": "0.5300466", "text": "public function getSignatureRequestKey();", "title": "" }, { "docid": "4760bce303a23c57f08b363681d71d5f", "score": "0.52974415", "text": "private function checkSignature(){\n if (!defined(\"TOKEN\")){\n throw new Exception('TOKEN is not defined!');\n }\n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n $token = TOKEN;\n $tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n sort($tmpArr, SORT_STRING);\n $tmpStr = implode( $tmpArr );\n $tmpStr = sha1( $tmpStr );\n if( $tmpStr == $signature ){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "240c9d051c20b8a2d58fc3a11dc9af5d", "score": "0.528891", "text": "public function generateSignature()\n {\n $signatureArray = array();\n\n // Create a pre-hash string based on the security credentials\n // The order is important\n foreach ($this->validSecurityKeys as $key) {\n if (array_key_exists($key, $this->securityPacket)) {\n array_push($signatureArray, $this->securityPacket[$key]);\n }\n }\n\n // Add the secret\n array_push($signatureArray, $this->secret);\n\n // Add the requestPacket if necessary\n if ($this->signRequestData && !empty($this->requestString)) {\n array_push($signatureArray, $this->requestString);\n }\n\n // Add the action if necessary\n if (!empty($this->action)) {\n array_push($signatureArray, $this->action);\n }\n\n return $this->hashValue($signatureArray);\n }", "title": "" }, { "docid": "27d6829cbd617ffffc35245a361d10f7", "score": "0.52844346", "text": "public function sign($uri, array $parameters = [], $httpMethod = 'POST');", "title": "" }, { "docid": "7240733e3012dfecb9ab4ebbd6727f66", "score": "0.52786374", "text": "private function checkSignature()\n {\n\n #if (!defined(\"TOKEN\")) {\n\n #throw new Exception('TOKEN is not defined!');\n\n #}\n\n\n $signature = $_GET[\"signature\"];\n\n $timestamp = $_GET[\"timestamp\"];\n\n $nonce = $_GET[\"nonce\"];\n\n\n $token = 'jamxio';\n\n $tmpArr = array($token, $timestamp, $nonce);\n\n // use SORT_STRING rule\n\n sort($tmpArr, SORT_STRING);\n\n $tmpStr = implode($tmpArr);\n\n $tmpStr = sha1($tmpStr);\n\n\n if ($tmpStr == $signature) {\n\n return true;\n\n } else {\n\n return false;\n\n }\n\n }", "title": "" }, { "docid": "31f0b5d8d094dfe99dc468b209d7fc71", "score": "0.52754384", "text": "public function authAPI($url, $request_path, $method = 'GET', $body = '')\n {\n $body = is_array($body) ? json_encode($body) : $body; // Body must be in json format\n $timestamp = time() * 1000;\n $what = $timestamp . $method . $request_path . $body;\n $kc_api_sign = base64_encode(hash_hmac(\"sha256\", $what, $this->secret, true));\n $updated_passphrase = base64_encode(hash_hmac(\"sha256\", $this->passphrase, $this->secret, true)); // For the V2\n\n $curl = curl_init();\n curl_setopt_array($curl, array(\n CURLOPT_URL => $url,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 120,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => $method,\n CURLOPT_HTTPHEADER => array(\n 'Content-Type: application/json',\n 'KC-API-KEY:' . $this->key,\n 'KC-API-SIGN:' . $kc_api_sign,\n 'KC-API-TIMESTAMP:' . $timestamp,\n 'KC-API-PASSPHRASE:' . $updated_passphrase,\n 'KC-API-KEY-VERSION: 2'\n )\n ));\n\n $response = curl_exec($curl);\n $err = curl_error($curl);\n curl_close($curl);\n\n if ($err) {\n return ['error' => 1, 'result' => json_decode($err)];\n } else {\n return ['error' => 0, 'result' => json_decode($response)];\n }\n }", "title": "" }, { "docid": "53f730b7dab6781b3bbc0e395d9036a5", "score": "0.5270838", "text": "private function oAuthRequest($url, $parameters, $method) {\n\t\t$defaults = array (\n\t\t\t\"oauth_version\" => '1.0',\n\t\t\t\"oauth_nonce\" => md5(microtime() . mt_rand()),\n\t\t\t\"oauth_timestamp\" => time(),\n\t\t\t\"oauth_consumer_key\" => $this->_config['consumer_key'],\n\t\t\t\"oauth_token\" => $this->_config['access_token'],\n\t\t\t\"oauth_signature_method\" => \"HMAC-SHA1\"\n\t\t);\n\n\t\t$request_data = ($method == \"GET\") ? array_merge($defaults, $parameters) : $defaults;\n\n\t\t// Percent encode\n\t\t$keys = array_map(\"rawurlencode\", array_keys($request_data));\n\t\t$values = array_map(\"rawurlencode\", array_values($request_data));\n\n\t\t// Recombine and sort\n\t\t$request_data = array_combine($keys, $values);\n\t\tksort($request_data);\n\n\t\t// Stringup\n\t\t$parameterString = array();\n\t\tforeach ($request_data as $key => $value) {\n\t\t\t$parameterString[] = $key . \"=\" . $value;\n\t\t}\n\t\t$parameterString = implode(\"&\", $parameterString);\n\n\t\t// Now create the base string\n\t\t$base = strtoupper($method) . \"&\" . rawurlencode($url) . \"&\" . rawurlencode($parameterString);\n\n\t\t// And the signing ket\n\t\t$key = rawurlencode($this->_config['consumer_secret']) . \"&\" . rawurlencode($this->_config['access_secret']);\n\n\t\t// Signature\n\t\t$signature = base64_encode(hash_hmac('sha1', $base, $key, true));\n\n\t\t// Build header string\n\t\t$header_data = array_merge($defaults, array('oauth_signature' => $signature));\n\t\t$header = array();\n\t\tforeach ($header_data as $key => $value) {\n\t\t\t$header[] = rawurlencode($key) . \"=\\\"\" . rawurlencode($value) . \"\\\"\";\n\t\t}\n\t\t$header = \"Authorization: OAuth \" . implode(\", \", $header);\n\n\t\t// Send off the request\n\t\tswitch ($method) {\n\t\t\tcase \"GET\":\n\t\t\t\t// Rebuild URL\n\t\t\t\tif (count($parameters) > 0) {\n\t\t\t\t\t$params = array();\n\t\t\t\t\tforeach ($parameters as $k => $v) {\n\t\t\t\t\t\t$params[] = rawurlencode($k) . \"=\" . rawurlencode($v);\n\t\t\t\t\t}\n\t\t\t\t\t$url .= \"?\" . implode(\"&\", $params);\n\t\t\t\t}\n\n\t\t\t\treturn $this->curl($url, \"GET\", array($header));\n\t\t\tcase \"POST\":\n\t\t\t\treturn $this->curl($url, \"POST\", array($header), $parameters);\n\t\t}\n\t}", "title": "" }, { "docid": "f3d7f747291fb642c7080326ba080933", "score": "0.5269415", "text": "public function checkSignature()\n\t{\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n \n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n \t\t\n\t\t$token = TOKEN;\n\t\t$tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n\t\tsort($tmpArr, SORT_STRING);\n\t\t$tmpStr = implode( $tmpArr );\n\t\t$tmpStr = sha1( $tmpStr );\n\t\t\n\t\tif( $tmpStr == $signature ){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "19790f77fdc118856f9642ef14f9d754", "score": "0.52681756", "text": "private function generateSignature($key, $secret, $timestamp)\n {\n return hash_hmac('sha1', $timestamp . $key, $secret);\n }", "title": "" }, { "docid": "aeb9bb744b832e5df51284e113c1e55a", "score": "0.52671754", "text": "function accessToken($requestParameters, $requestMethod, $requestUrl);", "title": "" }, { "docid": "2bdf6b7cdbcd8994aa6b3358aab9e86f", "score": "0.5266164", "text": "private function checkSignature()\n {\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n\n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n\n $token = TOKEN;\n $tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n sort($tmpArr, SORT_STRING);\n $tmpStr = implode( $tmpArr );\n $tmpStr = sha1( $tmpStr );\n\n if( $tmpStr == $signature ){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "2bdf6b7cdbcd8994aa6b3358aab9e86f", "score": "0.5266164", "text": "private function checkSignature()\n {\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n\n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n\n $token = TOKEN;\n $tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n sort($tmpArr, SORT_STRING);\n $tmpStr = implode( $tmpArr );\n $tmpStr = sha1( $tmpStr );\n\n if( $tmpStr == $signature ){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "2bdf6b7cdbcd8994aa6b3358aab9e86f", "score": "0.5266164", "text": "private function checkSignature()\n {\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n\n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n\n $token = TOKEN;\n $tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n sort($tmpArr, SORT_STRING);\n $tmpStr = implode( $tmpArr );\n $tmpStr = sha1( $tmpStr );\n\n if( $tmpStr == $signature ){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "fdb7732794e887523b0b517f53d3efd2", "score": "0.526168", "text": "private function checkSignature()\n\t{\n\t\t$signature = isset($_GET[\"signature\"])?$_GET[\"signature\"]:'';\n\t\t$timestamp = isset($_GET[\"timestamp\"])?$_GET[\"timestamp\"]:'';\n\t\t$nonce = isset($_GET[\"nonce\"])?$_GET[\"nonce\"]:'';\n\n\t\t$tmpArr = array(self::$token, $timestamp, $nonce);\n\t\tsort($tmpArr, SORT_STRING);\n\t\t$tmpStr = implode($tmpArr);\n\t\t$tmpStr = sha1($tmpStr);\n\t\t\n\t\tif($tmpStr == $signature){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "989dd4d6258529fe0ab79b2d3e7abfed", "score": "0.525879", "text": "private static function sign(Array $params, $secret) {\n\t\t\n\t\t//~ 取出sig, sig参数不需要签名\n\t\tunset($params['sig']);\n\t\t\n\t\t//~ 解析数组\n\t\t$params = self::parse_params($params);\n\t\t\n\t\t//~ 1.按字典顺序升值排序查询数组\n\t\tksort($params,SORT_STRING);\n\t\t\n\t\t//~ 2.拼接排好序的query string\n\t\t$params_kv = array_map(function($k, $v){\n\t\t\treturn $k.'='.$v;\n\t\t}, array_keys($params), array_values($params));\n\t\t$query_string = join('&', $params_kv);\n\t\t\n\t\t//~ 3.拼接query string与签名密钥\n\t\t$query_string .= '|' . $secret;\n\t\t\n\t\t//~ 4.用加密算法加密,即得参数签名sign\n\t\t$sign = sha1($query_string);\n\t\t\n\t\treturn $sign;\n\t}", "title": "" }, { "docid": "df021793a84d2e218278f04b96247cdb", "score": "0.5257326", "text": "private function signature(array $params)\n {\n \t$shaString = '';\n ksort($params);\n foreach ($params as $key => $value) {\n $shaString .= \"$key=$value\";\n }\n $shaString = $this->sha_request.$shaString.$this->sha_request;\n return hash(\"sha256\", $shaString);\n\n }", "title": "" }, { "docid": "4ee2bc83ba435dd3486edcf8963d183b", "score": "0.52559876", "text": "function calculateStringToSignV2($url, $method, array $parameters)\n{\n $data = $method;\n $data .= \"\\n\";\n $url = str_replace(array('http://', 'https://'), array('', ''), $url);\n $data .= $url;\n $data .= \"\\n\";\n uksort($parameters, 'strcmp');\n $data .= _getParametersAsString($parameters);\n return $data;\n}", "title": "" }, { "docid": "01f19fefc786135793fda7679bc38106", "score": "0.5242089", "text": "abstract public function buildSignature(\\dhawton\\OAuth\\Request $request, \\dhawton\\OAuth\\Consumer $consumer, \\dhawton\\OAuth\\Token $token);", "title": "" }, { "docid": "78308b58838635d68ffb9e8e5602a5f1", "score": "0.52387464", "text": "private function checkSignature()\n\t{\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n \n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n \t\t\n\t\t$token = TOKEN;\n\t\t$tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n\t\tsort($tmpArr, SORT_STRING);\n\t\t$tmpStr = implode( $tmpArr );\n\t\t$tmpStr = sha1( $tmpStr );\n\t\t\n\t\tif( $tmpStr == $signature ){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "78308b58838635d68ffb9e8e5602a5f1", "score": "0.52387464", "text": "private function checkSignature()\n\t{\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n \n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n \t\t\n\t\t$token = TOKEN;\n\t\t$tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n\t\tsort($tmpArr, SORT_STRING);\n\t\t$tmpStr = implode( $tmpArr );\n\t\t$tmpStr = sha1( $tmpStr );\n\t\t\n\t\tif( $tmpStr == $signature ){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "78308b58838635d68ffb9e8e5602a5f1", "score": "0.52387464", "text": "private function checkSignature()\n\t{\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n \n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n \t\t\n\t\t$token = TOKEN;\n\t\t$tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n\t\tsort($tmpArr, SORT_STRING);\n\t\t$tmpStr = implode( $tmpArr );\n\t\t$tmpStr = sha1( $tmpStr );\n\t\t\n\t\tif( $tmpStr == $signature ){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "78308b58838635d68ffb9e8e5602a5f1", "score": "0.52387464", "text": "private function checkSignature()\n\t{\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n \n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n \t\t\n\t\t$token = TOKEN;\n\t\t$tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n\t\tsort($tmpArr, SORT_STRING);\n\t\t$tmpStr = implode( $tmpArr );\n\t\t$tmpStr = sha1( $tmpStr );\n\t\t\n\t\tif( $tmpStr == $signature ){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "78308b58838635d68ffb9e8e5602a5f1", "score": "0.52387464", "text": "private function checkSignature()\n\t{\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n \n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n \t\t\n\t\t$token = TOKEN;\n\t\t$tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n\t\tsort($tmpArr, SORT_STRING);\n\t\t$tmpStr = implode( $tmpArr );\n\t\t$tmpStr = sha1( $tmpStr );\n\t\t\n\t\tif( $tmpStr == $signature ){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "78308b58838635d68ffb9e8e5602a5f1", "score": "0.52387464", "text": "private function checkSignature()\n\t{\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n \n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n \t\t\n\t\t$token = TOKEN;\n\t\t$tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n\t\tsort($tmpArr, SORT_STRING);\n\t\t$tmpStr = implode( $tmpArr );\n\t\t$tmpStr = sha1( $tmpStr );\n\t\t\n\t\tif( $tmpStr == $signature ){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "78308b58838635d68ffb9e8e5602a5f1", "score": "0.52387464", "text": "private function checkSignature()\n\t{\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n \n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n \t\t\n\t\t$token = TOKEN;\n\t\t$tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n\t\tsort($tmpArr, SORT_STRING);\n\t\t$tmpStr = implode( $tmpArr );\n\t\t$tmpStr = sha1( $tmpStr );\n\t\t\n\t\tif( $tmpStr == $signature ){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "a390e0d6216fa2ca185ecf69b00c17f8", "score": "0.5235739", "text": "private function checkSignature(){\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n exit;\n }\n \n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n $token = TOKEN;\n $tmpArr = array($token, $timestamp, $nonce);\n sort($tmpArr, SORT_STRING);\n $tmpStr = implode( $tmpArr );\n $tmpStr = sha1( $tmpStr );\n\t\tif( $tmpStr == $signature ){\n return true;\n\t \t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "cb9d025e656c64e3b967d22e96d3b9cd", "score": "0.52313614", "text": "function yourls_auth_signature( $username = false ) {\n\tif( !$username && defined('YOURLS_USER') ) {\n\t\t$username = YOURLS_USER;\n\t}\n\treturn ( $username ? substr( yourls_salt( $username ), 0, 10 ) : 'Cannot generate auth signature: no username' );\n}", "title": "" }, { "docid": "61ad47f22977541fbbb98cde75b0174c", "score": "0.5226972", "text": "function createHmacAuth($method, $path, $timestamp) {\n\tglobal $key, $secret;\n\t$str = $method . ' ' . $path . $timestamp;\n\t$hash = hash_hmac('sha1', $str, $secret);\n\treturn $key . ':' . $hash;\n}", "title": "" }, { "docid": "35d2dc2408bc2357c7370098de7aa92b", "score": "0.52211165", "text": "private function __getSignature($string) {\n\t\treturn base64_encode(hash_hmac('sha256', $string, $this->sqs->getSecretKey(), true));\n\t}", "title": "" }, { "docid": "845150c01427efc3f1050bacbb2c87f6", "score": "0.5219755", "text": "private function checkSignature()\n {\n if (!defined(\"TOKEN\")) {\n throw new \\Exception('TOKEN is not defined!');\n }\n\n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n\n $token = TOKEN;\n $tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n sort($tmpArr, SORT_STRING);\n $tmpStr = implode( $tmpArr );\n $tmpStr = sha1( $tmpStr );\n\n if( $tmpStr == $signature ){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "4a3d26fdf957b265d3b963fa0f6e9344", "score": "0.5217667", "text": "private function checkSignature()\n {\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n \n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n \n $token = TOKEN;\n $tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n sort($tmpArr, SORT_STRING);\n $tmpStr = implode( $tmpArr );\n $tmpStr = sha1( $tmpStr );\n \n if( $tmpStr == $signature ){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "df2a5efb8e4c51ffb9852a29fcb100fd", "score": "0.5211515", "text": "private function checkSignature() {\n if (!$this->token) {\n throw new Exception('TOKEN is not defined!');\n }\n\n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n\n $token = $this->token;\n $tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n sort($tmpArr, SORT_STRING);\n $tmpStr = implode( $tmpArr );\n $tmpStr = sha1( $tmpStr );\n\n if( $tmpStr == $signature ){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "e750f20ad11c3f575998eb5f14d2e1f5", "score": "0.5204299", "text": "public function buildOauth($url, $requestMethod)\n {\n if (!in_array(strtolower($requestMethod), array('post', 'get')))\n {\n throw new Exception('Request method must be either POST or GET');\n }\n $consumer_key = $this->consumer_key;\n $consumer_secret = $this->consumer_secret;\n $oauth_access_token = $this->oauth_access_token;\n $oauth_access_token_secret = $this->oauth_access_token_secret;\n $oauth = array(\n 'oauth_consumer_key' => $consumer_key,\n 'oauth_nonce' => time(),\n 'oauth_signature_method' => 'HMAC-SHA1',\n 'oauth_token' => $oauth_access_token,\n 'oauth_timestamp' => time(),\n 'oauth_version' => '1.0'\n );\n $getfield = $this->getGetfield();\n if (!is_null($getfield))\n {\n $getfields = str_replace('?', '', explode('&', $getfield));\n foreach ($getfields as $g)\n {\n $split = explode('=', $g);\n /** In case a null is passed through **/\n if (isset($split[1]))\n {\n $oauth[$split[0]] = urldecode($split[1]);\n }\n }\n }\n $postfields = $this->getPostfields();\n if (!is_null($postfields)) {\n foreach ($postfields as $key => $value) {\n $oauth[$key] = $value;\n }\n }\n $base_info = $this->buildBaseString($url, $requestMethod, $oauth);\n $composite_key = rawurlencode($consumer_secret) . '&' . rawurlencode($oauth_access_token_secret);\n $oauth_signature = base64_encode(hash_hmac('sha1', $base_info, $composite_key, true));\n $oauth['oauth_signature'] = $oauth_signature;\n $this->url = $url;\n $this->requestMethod = $requestMethod;\n $this->oauth = $oauth;\n return $this;\n }", "title": "" }, { "docid": "8647b8219e6046944aab676a1ff730bc", "score": "0.5201011", "text": "public function buildAuthorizationHeader($apiKey, $apiSecret, $date) {\n $toSign = $apiSecret . $apiKey . $date;\n\n //Sign using SHA1.\n $messageBytes = utf8_encode($toSign);\n $secretBytes = utf8_encode($apiSecret);\n $result = hash_hmac('sha1', $messageBytes, $secretBytes);\n\n //Encode the result in base 64.\n $signature = base64_encode($result);\n\n //Concat all results like this: SP:APIKey:signature\n return \"SP:\" . $apiKey . ':' . $signature;\n }", "title": "" }, { "docid": "17a8fa16a9497b76465094dc042c543e", "score": "0.51974213", "text": "public function checkSignature()\n {\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n\n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n\n $token = TOKEN;\n $tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n sort($tmpArr, SORT_STRING);\n $tmpStr = implode($tmpArr);\n $tmpStr = sha1($tmpStr);\n\n if ($tmpStr == $signature) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "4a3938f542c076e250a047d83183f101", "score": "0.5183697", "text": "private function __getSignature($string) {\n\t\treturn base64_encode(hash_hmac('sha256', $string, $this->ses->getSecretKey(), true));\n\t}", "title": "" }, { "docid": "f4818858ee49f0534e97bcbd2e3ba4db", "score": "0.51794523", "text": "function oAuthRequest($url, $method, $parameters, $auth_header = FALSE) {\n if (strrpos($url, 'https://') !== 0 && strrpos($url, 'http://') !== 0) {\n $url = \"{$this->host}{$url}\" . ($this->decode_json ? '.' . $this->format : '');\n }\n \n $request = OAuthRequest::from_consumer_and_token($this->consumer, $this->token, $method, $url, $parameters);\n $request->sign_request($this->sha1_method, $this->consumer, $this->token);\n switch ($method) {\n case 'GET':\n return $this->http($request->to_url(), 'GET', NULL, ($auth_header ? $request->to_header() : NULL));\n default:\n return $this->http($request->get_normalized_http_url(), $method, $request->to_postdata(), ($auth_header ? $request->to_header() : NULL));\n }\n }", "title": "" }, { "docid": "86f461ebfa08da05950b3dc484840373", "score": "0.5141912", "text": "protected function getSignature($msg, $secret)\n {\n return hash_hmac('sha256', $msg, $secret);\n }", "title": "" }, { "docid": "2c5882bad4716dd7163d4f25f7c53783", "score": "0.5137012", "text": "public function testBuildSignature()\n {\n $client = $this->getMockBuilder('Idio\\Api\\Client')\n ->setMethods(array('date'))\n ->getMock();\n\n // The signature changes by day, so stub the day to always\n // be the 1st January 2000...\n $client->expects($this->exactly(2))\n ->method('date')\n ->will($this->returnValue('2000-01-01'));\n\n $client->setAppCredentials(\n 'abcdefghij',\n '1234567890'\n )->setDeliveryCredentials(\n 'klmnopqrst',\n '0987654321'\n );\n\n $this->assertEquals(\n array(\n 'X-App-Authentication: abcdefghij:Mjc4N2M4NWM5ZDc4NDg4ZTkyMmJhOTVlMTljYTZlMTg0MWZkYTBhNA==',\n 'X-Delivery-Authentication: klmnopqrst:M2E2YTcxNmQxNDZmNWRjZTRhMGZmM2RjNjNhZmQ1OWY1NTYwMWZkMA=='\n ),\n $client->getHeaders('GET', '/test'),\n \"Expecting the signatures to be correct\"\n );\n }", "title": "" }, { "docid": "6ce1e259d734845ab0640961be32300a", "score": "0.5129198", "text": "protected static function generateSignature($params, $secret) {\n // work with sorted data\n ksort($params);\n\n // generate the base string\n $base_string = '';\n foreach($params as $key => $value) {\n $base_string .= $key . '=' . $value;\n }\n $base_string .= $secret;\n\n return md5($base_string);\n }", "title": "" }, { "docid": "3b16a798cf8a6a9f19755203e1e9933a", "score": "0.5120061", "text": "private function checkSignature()\n {\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n\n $token = TOKEN;\n $tmpArr = array($token, $timestamp, $nonce);\n sort($tmpArr, SORT_STRING);\n $tmpStr = implode( $tmpArr );\n $tmpStr = sha1( $tmpStr );\n\n if ($tmpStr == $signature) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "38625097ddc8de06cbb50888921978bd", "score": "0.51183367", "text": "public function createSignature(){\r\n\r\n // the salt for calculating hashmac is timestamp + public_api_key\r\n $salt = $this->timestamp . $this->public_api_key;\r\n\r\n if(empty($this->private_api_key)){\r\n return false;\r\n }\r\n\r\n if (function_exists('hash_hmac')) {\r\n return hash_hmac('sha1', $salt, $this->private_api_key);\r\n }\r\n\r\n return $this->custom_hmac('sha1', $salt, $this->private_api_key, false);\r\n\r\n }", "title": "" }, { "docid": "7c1e45529ec44bff94a2d8aca7d77975", "score": "0.5109204", "text": "protected function createMarketoSoapHeaderSignature(){\n \n $dtObj = new DateTime('now', $this->dateTimeZone);\n $timeStamp = $dtObj->format(DATE_W3C);\n $encryptString = $timeStamp . $this->userId;\n \n $signature['hash'] = hash_hmac(\n 'sha1', \n $encryptString, \n $this->secretKey\n );\n $signature['timeStamp'] = $timeStamp;\n \n return $signature;\n \n }", "title": "" } ]
a39ed388f7a7971bd8530cbd13409548
Log the fact that we sent this user an email. This is logged to field tx_memberexpiry_emailsenttime in fe_users.
[ { "docid": "c5113ae5548262da80f5975827a7e730", "score": "0.72290283", "text": "function logEmailSent( $uid, $time ) {\n\t\t/*Example update query:\n\t\tChange prof./free prof. members to free and move the endtime to expired field:\n\t\tUPDATE fe_users\n\t\tSET tx_memberexpiry_emailsenttime = 1111317260 \n\t\tWHERE uid=6461\n\t\t*/\n\t\t\n\t\t$emailSentTime = $time;\n\t\t\n\t\tif ($uid && $uid!=0) {\n\t\t\t//run the query\n\t\t\t$fields_values = array(\n\t\t\t\t'tx_memberexpiry_emailsenttime' => $emailSentTime\n\t\t\t);\n\t\t\tif ($this->debug) {\n\t\t\t\techo \"\\n<br>function logEmailSent( $uid ) {\";\n\t\t\t\techo $this->db->UPDATEquery( 'fe_users', 'uid='.$uid, $fields_values);\t\n\t\t\t}\n \t\t\t$this->db->exec_UPDATEquery( 'fe_users', 'uid='.$uid, $fields_values);\n\t\t\t\n\t\t}\n\t\t\n\t}", "title": "" } ]
[ { "docid": "bc488059a4d3c9df9d0b714098a80282", "score": "0.62799144", "text": "function sendMailing()\n {\n\t\tif ((count($this->emailUsers)>0) && $this->emailSubject && $this->emailBody){\n\t\t\tif ($this->addTime){\n\t\t\t\t//append timestamp logic to the email \n\t\t\t\t$additionalString = \"\\n\"; \n\t\t\t\t$additionalString .=\"This emai was sent on \".date('l jS Y', $this->timestamp);\n\t\t\t\t$this->emailBody .= $additionalString;\n\t\t\t}\n\n\t\t\tforeach($this->emailUsers as $emailUser){\t\t\n\t\t\t\tmail($emailUser, $this->emailSubject, $this->emailBody); \n\t\t\t\t$this->logEmail($emailUser, $this->emailSubject);\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "226e0a6f5f0532d5d37f71581a468275", "score": "0.6078233", "text": "function reengagement_email_user($reengagement, $inprogress) {\n global $DB, $SITE, $CFG;\n $istotara = false;\n if (file_exists($CFG->dirroot.'/totara')) {\n $istotara = true;\n }\n $user = $DB->get_record('user', array('id' => $inprogress->userid));\n if (!empty($user->deleted)) {\n // User has been deleted - don't send an e-mail.\n return true;\n }\n if (!empty($reengagement->suppresstarget)) {\n $targetcomplete = reengagement_check_target_completion($user->id, $reengagement->suppresstarget);\n if ($targetcomplete) {\n debugging('', DEBUG_DEVELOPER) && mtrace('Reengagement modules: User:'.$user->id.\n ' has completed target activity:'.$reengagement->suppresstarget.' suppressing email.');\n return true;\n }\n }\n // Where cron isn't run regularly, we could get a glut requests to send email that are either ancient, or too late to be useful.\n if (!empty($inprogress->timedue) && (($inprogress->timedue + 2 * DAYSECS) < time())) {\n // We should have sent this email more than two days ago.\n // Don't send.\n debugging('', DEBUG_ALL) && mtrace('Reengagement: ip id ' . $inprogress->id . 'User:'.$user->id.\n ' Email not sent - was due more than 2 days ago.');\n return true;\n }\n if (!empty($inprogress->timeoverdue) && ($inprogress->timeoverdue < time())) {\n // There's a deadline hint provided, and we're past it.\n // Don't send.\n debugging('', DEBUG_ALL) && mtrace('Reengagement: ip id ' . $inprogress->id . 'User:'.$user->id.\n ' Email not sent - past usefulness deadline.');\n return true;\n }\n\n debugging('', DEBUG_DEVELOPER) && mtrace('Reengagement modules: User:'.$user->id.' Sending email.');\n\n $templateddetails = reengagement_template_variables($reengagement, $inprogress, $user);\n $plaintext = html_to_text($templateddetails['emailcontent']);\n\n $emailresult = true;\n if ($istotara &&\n ($reengagement->emailrecipient == REENGAGEMENT_RECIPIENT_MANAGER) ||\n ($reengagement->emailrecipient == REENGAGEMENT_RECIPIENT_BOTH)) {\n // We're supposed to email the user's manager(s).\n $managerids = \\totara_job\\job_assignment::get_all_manager_userids($user->id);\n if (empty($managerids)) {\n // User has no manager(s).\n debugging('', DEBUG_ALL) && mtrace(\"user $user->id has no managers - not sending any manager emails.\");\n } else {\n // User has manager(s).\n foreach ($managerids as $managerid) {\n $manager = $DB->get_record('user', array('id' => $managerid));\n $managersendresult = reengagement_send_notification($manager,\n $templateddetails['emailsubjectmanager'],\n html_to_text($templateddetails['emailcontentmanager']),\n $templateddetails['emailcontentmanager'],\n $reengagement\n );\n if (!$managersendresult) {\n mtrace(\"failed to send manager of user $user->id email for reengagement $reengagement->id\");\n }\n $emailresult = $emailresult && $managersendresult;\n }\n }\n }\n if (($reengagement->emailrecipient == REENGAGEMENT_RECIPIENT_USER) ||\n ($reengagement->emailrecipient == REENGAGEMENT_RECIPIENT_BOTH)) {\n // We are supposed to send email to the user.\n $usersendresult = reengagement_send_notification($user,\n $templateddetails['emailsubject'],\n $plaintext,\n $templateddetails['emailcontent'],\n $reengagement\n );\n if (!$usersendresult) {\n mtrace(\"failed to send user $user->id email for reengagement $reengagement->id\");\n }\n $emailresult = $emailresult && $usersendresult;\n }\n\n if (!empty($reengagement->thirdpartyemails)) {\n // Process third-party emails.\n $emails = array_map('trim', explode(',', $reengagement->thirdpartyemails));\n foreach ($emails as $emailaddress) {\n if (!validate_email($emailaddress)) {\n debugging('', DEBUG_ALL) && mtrace(\"invalid third-party email: $email - skipping send\");\n continue;\n }\n if ($istotara) {\n $thirdpartyuser = \\totara_core\\totara_user::get_external_user($emailaddress);\n } else {\n $thirdpartyuser = core_user::get_noreply_user();\n $thirdpartyuser->firstname = $emailaddress;\n $thirdpartyuser->email = $emailaddress;\n $thirdpartyuser->maildisplay = 1;\n $thirdpartyuser->emailstop = 0;\n }\n\n debugging('', DEBUG_ALL) && mtrace(\"sending third-party email to: $emailaddress\");\n\n $usersendresult = reengagement_send_notification($thirdpartyuser,\n $templateddetails['emailsubjectthirdparty'],\n html_to_text($templateddetails['emailcontentthirdparty']),\n $templateddetails['emailcontentthirdparty'],\n $reengagement\n );\n if (!$usersendresult) {\n mtrace(\"failed to send user $user->id email for reengagement $reengagement->id\");\n }\n $emailresult = $emailresult && $usersendresult;\n\n }\n }\n\n return $emailresult;\n}", "title": "" }, { "docid": "2dcecc858e8cdb3b1342c6e41ea596eb", "score": "0.5875876", "text": "public function show_resend_email_notification() {\n if ( ! isset( $_GET['resend_email'] ) || $_GET['resend_email'] !== 'sent' ) {\n return;\n }\n\n if ( ! is_account_page() ) {\n return;\n }\n\n if ( is_user_logged_in() ) {\n return;\n }\n\n wc_add_notice( __( 'A new verification email has been sent to your email. Please verify to login.', 'dokan' ) );\n }", "title": "" }, { "docid": "05fb6fb205da75e0cd8a226b4993b432", "score": "0.58214635", "text": "function gb_send_missed_payment_email() {\n\n\t// Loop through all members\n\t$members = get_users( array( 'role' => 'Member' ) );\n\n\t// Determine if next due date is within the next five days AND if an email has been sent for that date.\n\tforeach ( $members as $member ) {\n\n\t\t// If the member is paid up, early exit.\n\t\t$balance = get_member_overdue_balance( $member, false );\n\n\t\tif ( ! $balance ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t$recently_sent = $member->recently_sent_missed_payment_email;\n\n\t\tif ( $recently_sent && current_time( 'timestamp' ) < strtotime( '+3 days', $recently_sent ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t$append = var_export( array(\n\t\t\t'balance' => $balance,\n\t\t\t'recently_sent' => $recently_sent,\n\t\t\t'current_time' => current_time( 'timestamp' ),\n\t\t\t'three_days' => strtotime( '+3 days', $recently_sent )\n\t\t), 1 );\n\n\t\t$mail = gb_send_email( 'missed-payment', $member, 'Missed Payment', $append );\n\n\t\tif ( $mail ) {\n\t\t\tupdate_user_meta( $member->ID, 'recently_sent_missed_payment_email', current_time( 'timestamp' ) );\n\t\t}\n\t}\n\n}", "title": "" }, { "docid": "1f216439fc5460bfb507e80af05a3c1f", "score": "0.57988733", "text": "function user_email_verified( $user ){\r\n\t\t$this->blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );\r\n\t\t$this->user_login = stripslashes( $user->user_login );\r\n\t\t$this->user_email = stripslashes( $user->user_email );\r\n\t\t$this->emails_sent = get_user_meta( $user->ID, 'emails_sent', true );\r\n\t\t$this->user_email_verified_notification = get_user_meta( $user->ID, 'user_email_verified_notification', true );\r\n\t\t$message = sprintf( __( 'Thank you for confirming your email with %s!', $this->domain ), $this->blogname ) . \"\\r\\n\\n\";\r\n\t\t$message .= sprintf( __( 'Your E-mail has been Confirmed and Your Registration for %s is awaiting an Administrator Approval', $this->domain ), $this->blogname ) . \"\\r\\n\\n\";\r\n\t\t$message .= sprintf( __( 'Username: %s', $this->domain ), $this->user_login ) . \"\\r\\n\";\r\n\t\t@wp_mail( $this->user_email, sprintf( __( '[%s] Email Confirmed', $this->domain ), $this->blogname ), $message );\r\n\t\t$this->emails_sent++;\r\n\t\t$this->user_email_verified_notification++;\r\n\t\tupdate_user_meta( $user->ID, 'emails_sent', $this->emails_sent );\r\n\t\tupdate_user_meta( $user->ID, 'user_email_verified_notification', true );\r\n\t}", "title": "" }, { "docid": "087d1721e85d3449e8eb4a3408f510ca", "score": "0.5761788", "text": "public function sendEmailVerificationNotification()\n {\n $this->email_verification_sent_at = Carbon::now();\n $this->notify(new VerifyApiEmail);\n $this->save();\n }", "title": "" }, { "docid": "50da3222184fa798c5f4e0124bd09afa", "score": "0.5732012", "text": "protected function sendEmailUser()\n {\n $subject = Yii::$app->getModule('billing')->t('{APP}: you\\'ve got a new invoice #{ID}', ['ID' => $this->id_invoice, 'APP' => Yii::$app->name]);\n return Yii::$app->mailer\n ->compose(\n [\n 'html' => 'new-invoice-user-html',\n 'text' => 'new-invoice-user-text'\n ],\n ['title' => $subject, 'model' => $this]\n )\n ->setFrom([\\common\\models\\Setting::getValue('outgoingMail') => Yii::$app->name])\n ->setTo($this->account->email)\n ->setSubject($subject)\n ->send();\n }", "title": "" }, { "docid": "bc1302b1cee15ccdef0a1f991fa249d1", "score": "0.5731033", "text": "public function membershipExpiry() // email for when a membership is about to expire\r\n\r\n {\r\n\r\n $time = Time::today();\r\n $time->addDays(7);\r\n\r\n $now = $time->i18nFormat('d MMMM, YYYY');\r\n\r\n\r\n $this->loadModel('Users');\r\n $memberships = TableRegistry::get('Memberships');\r\n $user_expiry = $memberships->find()\r\n ->contain(['Users','Users.Salutations'])\r\n ->where(['expiry_date' => $time])\r\n ->all();\r\n\r\n $results = $user_expiry->isEmpty();\r\n\r\n\r\n if (!$results) {\r\n foreach ($user_expiry as $user) {\r\n\r\n $email = new Email('default');\r\n\r\n $email->transport();\r\n\r\n $email->from(['[email protected]' => 'Eating Disorders Victoria'])\r\n ->to([$user->user['email_address'] => $user->user['given_name']])\r\n // ->to(['[email protected]'])\r\n ->template('membershipRenewalReminder')\r\n ->viewVars(['fname'=> $user->user['given_name'], 'lname'=>$user->user['family_name'], 'date'=>$now])\r\n ->emailformat('html')\r\n ->subject('Your EDV membership expires soon')\r\n ->send();\r\n\r\n\r\n }\r\n\r\n }\r\n }", "title": "" }, { "docid": "fcab4b5ca080909cdbd990cd22b811d1", "score": "0.5695921", "text": "public function sendEmail()\n {\n /* @var $user User */\n $user = User::findOne([\n 'status' => User::STATUS_ACTIVE,\n 'email' => $this->email,\n ]);\n\n if (!$user) {\n return false;\n }\n \n if (!User::isPasswordResetTokenValid($user->password_reset_token)) {\n $user->generatePasswordResetToken();\n if (!$user->save()) {\n return false;\n }\n }\n\n $params = [\n 'resetLink' => Url::to(['/site/reset-password', 'token'=>$user->password_reset_token], true),\n ];\n Notifications::get('user-reset-password-request', $user->id)->setParams($params)->setChannel('email')->send();\n return true;\n }", "title": "" }, { "docid": "6fdc94da0e8d295de52227349ddc7c1a", "score": "0.5691732", "text": "function personalinvite_send($user)\r\n{\r\n\tglobal $current_user;\r\n\t$headers = \"MIME-Version: 1.0\\n\" .\r\n\t\"From: \" . $current_user->user_email . \"\\n\" .\r\n\t\"Content-Type: text/plain; charset=\\\"\" . get_settings('blog_charset') . \"\\\"\\n\";\r\n\twp_mail($user->user_email, stripslashes(trim($_POST[\"subject\"])), stripslashes(trim($_POST[\"message\"])), $headers);\r\n\tupdate_usermeta($user->id, \"personal_welcome_sent\", \"Sent by \" . $current_user->user_email . \" on \" . date(\"F j, Y, g:i a\"));\r\n}", "title": "" }, { "docid": "7f6f6a8a481d9d91cec529b85356b143", "score": "0.56635654", "text": "private function log_email($email, $sent) {\n\n $message = \"\\nEmail sent at \".date('m/d/y h:i:s');\n $message .= \"\\nFrom:\".$email->from. '@'.$this->remote_addr;\n $message .= \"\\nTo: \".$email->to;\n\t\tforeach($email->cc as $cc) {\n $message .=\"\\nCc:\".$cc;\n }\n foreach($email->bcc as $bcc) {\n $message .=\"\\nBcc:\".$bcc;\n }\n $message .= \"\\nSubject: \".$email->subject;\n $message .= \"\\nAttachments: \".count($email->attachments).' ';\n if($this->log_body) {\n $message .= \"\\nBody: \".$email->body;\n $message .= \"\\nBody_HTML: \".$email->body_HTML;\n }\n \n $names = Array();\n foreach($email->attachments as $attachment) {\n $names[] = $attachment->name;\n }\n\n $message .= \"(\".implode(\",\", $names).\")\";\n\n\n if($sent) {\n return $this->logger->sb_Email_Writer_Sent($message);\n } else {\n return $this->logger->sb_Email_Writer_Error($message);\n }\n\n }", "title": "" }, { "docid": "d7203365c0ed70c4317e91b5aeb33836", "score": "0.5644042", "text": "public function onSendActivationEmail() {\n\t\ttry {\n\t\t\tif (! $user = $this->user ()) {\n\t\t\t\tthrow new ApplicationException ( Lang::get ( 'rainlab.user::lang.account.login_first' ) );\n\t\t\t}\n\t\t\t\n\t\t\tif ($user->is_activated) {\n\t\t\t\tthrow new ApplicationException ( Lang::get ( 'rainlab.user::lang.account.already_active' ) );\n\t\t\t}\n\t\t\t\n\t\t\tFlash::success ( Lang::get ( 'rainlab.user::lang.account.activation_email_sent' ) );\n\t\t\t\n\t\t\t$this->sendActivationEmail ( $user );\n\t\t} catch ( Exception $ex ) {\n\t\t\tif (Request::ajax ())\n\t\t\t\tthrow $ex;\n\t\t\telse\n\t\t\t\tFlash::error ( $ex->getMessage () );\n\t\t}\n\t\t\n\t\t/*\n\t\t * Redirect\n\t\t */\n\t\tif ($redirect = $this->makeRedirection ()) {\n\t\t\treturn $redirect;\n\t\t}\n\t}", "title": "" }, { "docid": "c1d6a42b9d1352e70610e539cbfe3dbc", "score": "0.56396055", "text": "public function sendNotifications()\n {\n if ($this->_getUser()) {\n if ($this->sendEmail()) {\n return self::STATUS_EMAIL_SENT;\n }\n }\n }", "title": "" }, { "docid": "76b2bc53c7bd3f79d9cc97eb53f8da2a", "score": "0.56349224", "text": "protected function shouldSendEmailNow() {\n\t\tif ( $this->timeSinceLastEmail() > $this->emailInterval ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "9d03d422b6600d151f917370f6cbf03c", "score": "0.55871177", "text": "private function sendCodeViaEmail()\n {\n if (!$this->user->isEmailVerified()) {\n $this->user->notify(new VerifyEmail());\n }\n }", "title": "" }, { "docid": "fb78faca7f6faf14a2205bc8b6dd6047", "score": "0.5580497", "text": "abstract function sender_email();", "title": "" }, { "docid": "5f264bc01799716769341ccf38cffb30", "score": "0.5555293", "text": "public function sendTrialTimeLeftMail()\n\t{\n\t\tif(!$this->isTrial())\n\t\t\treturn true;\n\t\t\n\t\t$message = \\GO\\Base\\Mail\\Message::newInstance();\n\t\t$subject = vsprintf(\\GO::t('user_trial_email_title','servermanager'),array($this->username));\n\t\t$message->setSubject($subject);\n\t\t\n\t\t$fromName = \\GO::config()->title;\n\t\n\t\t$parts = explode('@', \\GO::config()->webmaster_email);\n\t\t$fromEmail = 'noreply@'.$parts[1];\n\t\t\n\t\t$toEmail = $this->installation->config['webmaster_email'];\n\n\t\t$emailBody = \\GO::t('user_trial_email_body','servermanager'); //TODO: add to translation\n\t\t$emailBody = vsprintf($emailBody,array($this->username, $this->trialDaysLeft));\n\t\t\n\t\t$message->setBody($emailBody);\n\t\t$message->addFrom($fromEmail,$fromName);\n\t\t$message->addTo($toEmail);\n\t\t\n\t\treturn \\GO\\Base\\Mail\\Mailer::newGoInstance()->send($message);\n\t}", "title": "" }, { "docid": "18b05e71125821025f021aa2c4c2654b", "score": "0.5554453", "text": "public function requestEmail()\n {\n event(new EmailChangeRequested(Auth::user()));\n\n return 'success';\n }", "title": "" }, { "docid": "b4bf70371313b50c6cadf490301eefe0", "score": "0.55538154", "text": "public function dontSeeEmailIsSent()\n {\n $this->seeEmailIsSent(0);\n }", "title": "" }, { "docid": "8374de1b0ef6d5abbfe75322920d9e1a", "score": "0.55530816", "text": "public function sendResetEmail() {\n\t\t$userAction = new UserAction();\n\t\t$result = $userAction->sendResetMail($this->userInfo);\n\t\t$this->email = StringUtils::maskEmail($this->userInfo->email, '*');\n\t\t$this->success = $result;\n\t}", "title": "" }, { "docid": "b909378139cce79f8acf54a2ecddf794", "score": "0.5552524", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new AbyssUserVerifyEmail);\n }", "title": "" }, { "docid": "e719a135f8a5af7db8dba5e5b3515327", "score": "0.5547306", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new EmailVerificationReceived());\n }", "title": "" }, { "docid": "79019f6247c852354607bede028c3b2b", "score": "0.5490091", "text": "public function sendUserActivationEmail(User $user);", "title": "" }, { "docid": "cb1b760108f044eee08402d7d6975ba0", "score": "0.54406726", "text": "public function sendEmail()\n {\n switch($this->userType){\n case self::EMPLOYEE:\n $offUser = Employees::findOne([\n 'isactive' => 'Active',\n 'employee_id' => $this->sid,\n ]);\n break;\n\n case self::STUDENT:\n $offUser = Students::findOne([\n 'isactive' => 'Active',\n 'admission_id' => $this->sid,\n ]);\n break;\n }\n\n if (isset($offUser)) {\n $offUser->generateSignupRequestToken();\n if ($offUser->save()) {\n return \\Yii::$app->mailer->compose('signUpRequest', ['offUser' => $offUser, 'requestData' => $this])\n ->setFrom([\\Yii::$app->params['supportEmail'] => \\Yii::$app->name . ' robot'])\n ->setTo($offUser->email)\n ->setSubject('Signup request on ' . \\Yii::$app->name)\n ->send();\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "e07b9a2368d80e7c4b1f10e37f36ba00", "score": "0.5436895", "text": "private function _send_email(){\n\t\t\t$email = new cEmails();\n\t\t\t$email->class_settings = $this->class_settings;\n\t\t\t\n\t\t\t$email->class_settings[ 'action_to_perform' ] = 'send_mail';\n\t\t\t\n\t\t\t$email->class_settings[ 'destination' ]['email'][] = $this->class_settings[ 'user_email' ];\n\t\t\t$email->class_settings[ 'destination' ]['full_name'][] = $this->class_settings[ 'user_full_name' ];\n\t\t\t$email->class_settings[ 'destination' ]['id'][] = $this->class_settings[ 'user_id' ];\n\t\t\t\n\t\t\t$email->mail_certificate = $this->class_settings[ 'mail_certificate' ];\n\t\t\t\n\t\t\t$email->emails();\n\t\t\t\n\t\t}", "title": "" }, { "docid": "f4695aa3ee04d9f22b9d3a1c936c0d03", "score": "0.54244936", "text": "public function log_sending_email_result( $type, Log_In_Footer $log_in_footer_object, $email_type ) {\n\t\t$args = [];\n\t\tif ( 'fail' === $type ) {\n\t\t\t$args['log_message'] = 'Sending email for '.$this->email_type.' was not Successful!!!';\n\t\t} else {\n\t\t\t$args['log_message'] = 'Sending email for '.$this->email_type.' was Successful.';\n\t\t}\n\t\t$args['file_name'] = SIAWOOD_PRODUCTS_LOGS . 'email-logs.txt';\n\t\t$args['type'] = $email_type;\n\t\t$log_in_footer_object->register_add_action_with_arguments( $args );\n\n\t}", "title": "" }, { "docid": "94f388ec814bf9e2ba3646507dc03649", "score": "0.54226995", "text": "public function sendEmail()\n {\n $customer = Customer::findOne([\n 'email' => $this->email,\n 'status' => Customer::STATUS_INACTIVE\n ]);\n\n if ($customer === null) {\n return false;\n }\n\n return Yii::$app\n ->mailer\n ->compose(\n ['html' => 'signupVerification-html', 'text' => 'signupVerification-text'],\n ['customer' => $customer]\n )\n ->setFrom([Yii::$app->params['supportEmail'] => Yii::$app->name])\n ->setTo($this->email)\n ->setSubject(Yii::t('common', 'Mail.SignUpVerification.Subject', ['name' => Yii::$app->name]))\n ->send();\n }", "title": "" }, { "docid": "be3db5fa78ed48a9d6c414c48bf8c87f", "score": "0.54222596", "text": "public function sendUserSignUpEmail(User $user);", "title": "" }, { "docid": "fdd0a7719a8701c8fdcb469a1c6daf7d", "score": "0.53998506", "text": "public function actionEmailSend()\n {\n $verifyEmail = VerifyEmail::findOne(['user_id' => user()->id]);\n $verifyEmail = $verifyEmail ?: new VerifyEmail();\n $verifyEmail->user_id = user()->id;\n $verifyEmail->email = user()->identity->email;\n $verifyEmail->code = rand(111111, 999999);\n $verifyEmail->status = VerifyEmail::STATUS_PENDING;\n\n $verifyEmail->sendVerificationEmail();\n $verifyEmail->save();\n\n return ['send' => true];\n }", "title": "" }, { "docid": "81b739aad759810c147c9af0d6dd67a7", "score": "0.5397666", "text": "public function testEmailSent()\n {\n if ($nextEmail = $this->email->testEmail())\n {\n Mail::fake();\n $testEmail = new AtosMemoMail($nextEmail);\n Mail::send($testEmail);\n Mail::assertSent(AtosMemoMail::class);\n }\n }", "title": "" }, { "docid": "06ff6dfd8ba9a3b290b19ae62fa94cd1", "score": "0.53941697", "text": "public function onSendEmailToRestorePassword(RestorePasswordSendEmailEvent $event)\n\t{\n\t\t$request = $event->getRequest();\n\t\t$email = $request->get('email');\n\n\t\t$em = $this->doctrine->getEntityManager();\n\n\t\t/**\n\t\t * @var \\AppBundle\\Entity\\User $user\n\t\t */\n\t\t$user = $em->getRepository('AppBundle:User')\n\t\t\t->findOneByEmail($email);\n\n\t\ttry {\n\t\t\tif (!$user) {\n\t\t\t\tthrow new \\Exception(\"Not found any person with email : $email\");\n\t\t\t}\n\n\t\t\t$hoursFromLastRestoreLinkSend = DateTimeHelper::getDiffInHours(\n\t\t\t\t$user->getRestoreDate(),\n\t\t\t\tnew \\DateTime()\n\t\t\t);\n\t\t\t$maxHoursToRestore = $this->getMaxHoursForRestoreLink();\n\n\t\t\tif ($hoursFromLastRestoreLinkSend < $maxHoursToRestore) {\n\t\t\t\techo $hoursFromLastRestoreLinkSend;\n\t\t\t\tthrow new \\Exception(\"Restore link already sent, try again later\");\n\t\t\t}\n\n\t\t\t//generate temp link\n\t\t\t$this->tmpLinkGenerator->setUser($user);\n\n\t\t\t/**\n\t\t\t * @var \\AppBundle\\TempLinkGenerator\\TempLink $tempLink\n\t\t\t */\n\t\t\t$tempLink = $this->tmpLinkGenerator->generateLink();\n\n\t\t\t//send email to restore password by link\n\t\t\t$isSent = $this->sendEmailWithTempLink($email, $tempLink->link);\n\n\t\t\t//is sent email\n\t\t\tif (!$isSent) {\n\t\t\t\tthrow new \\Exception('Can\\'t send email');\n\t\t\t}\n\n\t\t\t$restoreTime = new \\DateTime();\n\t\t\t$restoreTime->setTimestamp($tempLink->time);\n\n\t\t\t$user->setRestoreDate($restoreTime);\n\t\t\t$em->flush();\n\n\t\t\t/**\n\t\t\t * @todo refactoring put all messages to dictionary and use only aliases\n\t\t\t */\n\t\t\t$this->twig->addGlobal('message', \"Message is sent\");\n\n\t\t} catch (\\Exception $e) {\n\t\t\t$this->twig->addGlobal('message', $e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "81228de7ec3253fd54f3a9331b67e04c", "score": "0.5391494", "text": "public function onEmailChange( $member, $new, $old )\n\t{\n\t\t$member->logHistory( 'core', 'email_change', array( 'old' => $old, 'new' => $new ) );\n\t}", "title": "" }, { "docid": "e5e8b7cb6aaab80c5eea683cf74e689a", "score": "0.53875726", "text": "public function AfterSendEMailSuccess()\n {\n }", "title": "" }, { "docid": "29455925fb1789fba9c0068f46c447f2", "score": "0.537878", "text": "function wyz_check_if_user_greeting_mail( $user_id ) {\n\n\tif ('on' == get_option( 'wyz_user_email_verification' ))return;\n\n\twyz_user_greeting_mail( $user_id );\t\n}", "title": "" }, { "docid": "8c0214115c9a8c34c5ec38e99a8fc198", "score": "0.5375588", "text": "public function sentDeclinedEmail()\n {\n return $this->_updateSentStatus('sent_declined_email');\n }", "title": "" }, { "docid": "834dea4f729213465a6de99499bb9722", "score": "0.5365777", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new QueuedVerifyEmail);\n }", "title": "" }, { "docid": "834dea4f729213465a6de99499bb9722", "score": "0.5365777", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new QueuedVerifyEmail);\n }", "title": "" }, { "docid": "f789df0c67afe896c90a2930ebc011b9", "score": "0.5363434", "text": "public function sendMail()\n {\n $this->calculate();\n return $this->sendEmailAdmin() && $this->sendEmailUser();\n }", "title": "" }, { "docid": "ed7b3d3d7022665544d169221e245ff2", "score": "0.535643", "text": "function limit_login_notify_email($user) {\n\t$ip = limit_login_get_address();\n\t$whitelisted = is_limit_login_ip_whitelisted($ip);\n\n\t$retries = get_option('limit_login_retries');\n\tif (!is_array($retries)) {\n\t\t$retries = array();\n\t}\n\n\t/* check if we are at the right nr to do notification */\n\tif ( isset($retries[$ip])\n\t\t && ( ($retries[$ip] / limit_login_option('allowed_retries'))\n\t\t\t % limit_login_option('notify_email_after') ) != 0 ) {\n\t\treturn;\n\t}\n\n\t/* Format message. First current lockout duration */\n\tif (!isset($retries[$ip])) {\n\t\t/* longer lockout */\n\t\t$count = limit_login_option('allowed_retries')\n\t\t\t* limit_login_option('allowed_lockouts');\n\t\t$lockouts = limit_login_option('allowed_lockouts');\n\t\t$time = round(limit_login_option('long_duration') / 3600);\n\t\t$when = sprintf(_n('%d hour', '%d hours', $time, 'limit-login-attempts'), $time);\n\t} else {\n\t\t/* normal lockout */\n\t\t$count = $retries[$ip];\n\t\t$lockouts = floor($count / limit_login_option('allowed_retries'));\n\t\t$time = round(limit_login_option('lockout_duration') / 60);\n\t\t$when = sprintf(_n('%d minute', '%d minutes', $time, 'limit-login-attempts'), $time);\n\t}\n\n\t$blogname = is_limit_login_multisite() ? get_site_option('site_name') : get_option('blogname');\n\n\tif ($whitelisted) {\n\t\t$subject = sprintf(__(\"[%s] Failed login attempts from whitelisted IP\"\n\t\t\t\t , 'limit-login-attempts')\n\t\t\t\t , $blogname);\n\t} else {\n\t\t$subject = sprintf(__(\"[%s] Too many failed login attempts\"\n\t\t\t\t , 'limit-login-attempts')\n\t\t\t\t , $blogname);\n\t}\n\n\t$message = sprintf(__(\"%d failed login attempts (%d lockout(s)) from IP: %s\"\n\t\t\t , 'limit-login-attempts') . \"\\r\\n\\r\\n\"\n\t\t\t , $count, $lockouts, $ip);\n\tif ($user != '') {\n\t\t$message .= sprintf(__(\"Last user attempted: %s\", 'limit-login-attempts')\n\t\t\t\t . \"\\r\\n\\r\\n\" , $user);\n\t}\n\tif ($whitelisted) {\n\t\t$message .= __(\"IP was NOT blocked because of external whitelist.\", 'limit-login-attempts');\n\t} else {\n\t\t$message .= sprintf(__(\"IP was blocked for %s\", 'limit-login-attempts'), $when);\n\t}\n\n\t$admin_email = is_limit_login_multisite() ? get_site_option('admin_email') : get_option('admin_email');\n\n\t@wp_mail($admin_email, $subject, $message);\n}", "title": "" }, { "docid": "6d120e4d6632a01fcc49b46f96529d19", "score": "0.5355022", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail);\n }", "title": "" }, { "docid": "6d120e4d6632a01fcc49b46f96529d19", "score": "0.5355022", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail);\n }", "title": "" }, { "docid": "6d120e4d6632a01fcc49b46f96529d19", "score": "0.5355022", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail);\n }", "title": "" }, { "docid": "6d120e4d6632a01fcc49b46f96529d19", "score": "0.5355022", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail);\n }", "title": "" }, { "docid": "6d120e4d6632a01fcc49b46f96529d19", "score": "0.5355022", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail);\n }", "title": "" }, { "docid": "1795813f066505745b15a65ea9bb6474", "score": "0.5353078", "text": "protected function timeSinceLastEmail() {\n\t\t// if there is no timestamp, next email should be sent right away\n\t\t// set the time diff longer than the email interval\n\t\tif ( !$this->timestamp ) {\n\t\t\treturn $this->emailInterval + 600;\n\t\t}\n\n\t\t$now = wfTimestamp( TS_UNIX );\n\n\t\treturn $now - wfTimestamp( TS_UNIX, $this->timestamp );\n\t}", "title": "" }, { "docid": "6c067fdde665eb283fe7def235d1b4ad", "score": "0.53462404", "text": "public function sendPaymentReceivedMail()\n {\n // We cannot send emails without an email address\n if (!$this->UllUser->email)\n {\n return;\n }\n \n $mail = new ullsfMail('ull_course_payment_received');\n \n $mail->setFrom(\n sfConfig::get('app_ull_course_from_address'),\n sfConfig::get('app_ull_course_from_name')\n );\n $mail->addAddress($this->UllUser);\n\n $mail->usePartial('ullCourse/paymentReceivedMail', array(\n 'booking' => $this\n ));\n \n $mail->send();\n }", "title": "" }, { "docid": "f429ebd519ae4c7f282cf15d58a4fd4f", "score": "0.534245", "text": "function gb_send_upcoming_payment_due_email() {\n\n\t// Loop through all members\n\t$members = get_users( array( 'role' => 'Member' ) );\n\t$five_days = strtotime( '+5 days', current_time( 'timestamp') );\n\n\t// Determine if next due date is within the next five days AND if an email has been sent for that date.\n\tforeach ( $members as $member ) {\n\n\t\t// If the member is paid up, early exit.\n\t\t$balance = get_member_current_balance( $member, false );\n\n\t\tif ( ! $balance ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t$next_due_date = get_member_due_date( $member );\n\t\t$due_date = strtotime( $next_due_date );\n\n\t\t// If there is no upcoming due date - either all in the past, or more than five days out.\n\t\tif ( ! $next_due_date || ( $due_date > $five_days ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// send email if w/in 5 days\n\n\t\tif ( ! $member->{\"upcoming_reminder_for_{$due_date}_sent\"} ) {\n\t\t\t$mail = gb_send_email( 'upcoming-payment', $member, 'Upcoming Payment Information' );\n\n\t\t\tif ( $mail ) {\n\t\t\t\tupdate_user_meta( $member->ID, \"upcoming_reminder_for_{$due_date}_sent\", 'sent' );\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "5bfccbdb06919945e33e2f3cf6d6b58f", "score": "0.53381616", "text": "public function sendImmediateEmail() {\n\t\treturn $this->immediateEmail;\n\t}", "title": "" }, { "docid": "ca76981037fb75e772a4ed3c6be7d864", "score": "0.53351676", "text": "public static function confirmation_email_logging($email=\"\") {\n\t\t$database = new Database;\n\n\t\t$email = $database->escape_value($email);\n\t\t$sql = \"SELECT * FROM \".self::$table_name.\" \";\n\t\t$sql .= \"WHERE email = '{$email}' \";\n\t\t// $sql .= \"AND password = '{$password_hashed}' \";\n\t\t// $sql .= \"AND role = '{$role}' \";\n\t\t$sql .= \"LIMIT 1\";\n\t\t$result_array = self::find_by_sql($sql);\n\t\t\tif(!empty($result_array)){\n\t\t\t\tself::update_logging_time($email);\n\t\t\t}\n\t\treturn !empty($result_array) ? array_shift($result_array) : false;\n\t}", "title": "" }, { "docid": "3d903c24c8fe155ec98208db4e202f4c", "score": "0.5331708", "text": "public function auto_send_email_free_plan_expired()\n {\n $this->load->model('user_group_model');\n\n /** @var array $this_day */\n $yesterday_timestamp = strtotime('-1 day', business_time());\n\n // Find all of the free contract is limit on yesterday\n $user_contract_res = $this->user_contract_model\n ->select('user.id AS user_id, user.login_id, user.nickname, user.email')\n ->with_user()\n ->where('expired_time >=', business_date('Y-m-d 00:00:00', $yesterday_timestamp))\n ->where('expired_time <=', business_date('Y-m-d 23:59:59', $yesterday_timestamp))\n ->where('user_contract.status', 'free')\n ->where('user.status', 'active')\n ->all();\n\n foreach ($user_contract_res AS $contract) {\n log_message('info', sprintf('[Free_plan_expired] Send email to user %s | %s', $contract->user_id, $contract->login_id));\n\n // List email of user and user parent\n $list_emails = [$contract->email];\n\n // Find all parents in all groups that student join in\n $res = $this->user_group_model\n ->select('DISTINCT(user.email)')\n ->join('user', 'user.id = user_group.user_id')\n ->where('group_id IN (SELECT group_id FROM user_group WHERE user_id = '.$contract->user_id.')')\n ->where('user.primary_type', 'parent')\n ->where('user.status', 'active')\n ->all();\n\n foreach ($res AS $record) {\n if (!empty($record->email) && !in_array($record->email, $list_emails)) {\n $list_emails = array_merge($list_emails, [$record->email]);\n }\n }\n\n foreach ($list_emails AS $email) {\n $this->schooltv_email->send('batch_monthly_payment_free_plan_expired', $email, [\n 'user_id' => $contract->login_id,\n 'user_name' => !empty($contract->nickname) ? $contract->nickname : DEFAULT_NICKNAME,\n 'url' => $this->config->item('site_url') . 'pay_service/' . $contract->user_id\n ], ['queuing' => TRUE]);\n }\n }\n\n $this->send_email_from_queue();\n }", "title": "" }, { "docid": "37321d1a8f5e96c513e477223d6c2f26", "score": "0.53263664", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new EmailVerification($this->verification_token));\n }", "title": "" }, { "docid": "7030371a588dc347e229e718bc204670", "score": "0.53062636", "text": "function reg_alert($email) {\n\t\t$to ='';\n\t\t$subject ='';\n\t\t$emailfrom ='';\n\t\t$headers ='';\n\t\t$sent ='';\n\t\t$attachments='';\n\t\t$user_query = new WP_User_Query( array( 'role' => 'Administrator' ) );\n\t\tif ( ! empty( $user_query->results ) ) {\n\t\t\tforeach ( $user_query->results as $user ) {\n\t\t\t\twrite_log('$user->user_email:');\n\t\t\t\twrite_log($user->user_email);\n\t\t\t\t$to .= $user->user_email.',';\n\n\t\t\t}\n\t\t\t$to = rtrim($to, \",\");\n\t\t\t$site = get_bloginfo('title');\n\t\t\t$subject = 'New Email Sign-up at '. $site;\n\t\t\t$body = 'You have a new email sign-up at '.get_bloginfo('name').'. ';\n\t\t\t$body .= 'New subscription: '.$email.' ';\t\t\t\n\t\t\t//$emailfrom = get_bloginfo('admin_email');\n\t\t\t//$emailfrom = get_bloginfo('name');\n\t\t\t//$headers = 'From: <'.$emailfrom.'>\\r\\n';\n\t\t\twrite_log('print_r $email:');\n\t\t\twrite_log($email);\n\t\t\twrite_log('--$to:');\n\t\t\twrite_log($to);\n\t\t\twrite_log('--$subject:');\n\t\t\twrite_log($subject);\n\t\t\twrite_log('--$body:');\n\t\t\twrite_log($body);\n\t\t\twrite_log('--headers:');\n\t\t\twrite_log($headers);\n\t\t\t//$headers = '';// empty for troubleshooting\n\t\t\t//$sent = wp_mail( $to, $subject, $body, $headers, $attachments );\n\t\t\t$phpsent = mail($to, $subject, $body, $headers );\n\t\t\twrite_log('sent?:');\n\t\t\tif ($sent == true){\n\t\t\t\twrite_log('email sent!:');\n\t\t\t\twrite_log($sent);\n\t\t\t} else {\n\t\t\t\twrite_log('email send failed');\n\t\t\t}\n\t\t\tif ($phpsent == true){\n\t\t\t\twrite_log('email $phpsent!:');\n\t\t\t\twrite_log($phpsent);\n\t\t\t} else {\n\t\t\t\twrite_log('email $phpsent failed');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "88231a5cb41cebe809402dd941f963e9", "score": "0.529856", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail($this->customer_nr));\n }", "title": "" }, { "docid": "6cf0b5589c62a8d0f3be0080db02ec7c", "score": "0.52964056", "text": "public function sendEmailVerificationNotification()\n {\n if ($this->shouldVerifyEmail()) {\n rescue(function () {\n $this->notify(new VerifyEmail());\n }, function (Throwable $exception) {\n logger()->error(\"Unable to send email verification: `{$exception->getMessage()}`\");\n });\n }\n }", "title": "" }, { "docid": "a756db141086a0f1baa5fd1e6e4f4ac0", "score": "0.5294376", "text": "protected function _logSent() {\n\t\t$oLog = commsOutboundLog::getInstance(\n\t\t\t$this->getMessage()->getOutboundTypeID(), $this->getMessage()->getGatewayID(),\n\t\t\t$this->getMessage()->getGatewayAccountID(), $this->getMessage()->getNetworkID()\n\t\t);\n\t\t$oLog->incrementSent()->save();\n\t\t$oLog = null;\n\t\tunset($oLog);\n\t}", "title": "" }, { "docid": "70328f1246d5751dc36778536076f4f2", "score": "0.5291323", "text": "public function dontSeeEmailIsSent(): void\n {\n $this->assertThat($this->getMessageMailerEvents(), new MailerConstraint\\EmailCount(0));\n }", "title": "" }, { "docid": "6f804c74cb0955b9b91b2534473156e5", "score": "0.52879936", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new MyEmailVerification());\n }", "title": "" }, { "docid": "674c20a8b6740498856c09978d432bca", "score": "0.5273996", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new Notifications\\VerifyEmail);\n }", "title": "" }, { "docid": "674c20a8b6740498856c09978d432bca", "score": "0.5273996", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new Notifications\\VerifyEmail);\n }", "title": "" }, { "docid": "286f111fdbe4e9f55f80daacba59f75a", "score": "0.5269492", "text": "public function onSendEmail()\n\t{\n\t\t$this->user = Auth::getUser();\n\n\t\tif (session_status() == PHP_SESSION_NONE)\n\t\t\tsession_start();\n\t\t$graph = new Graph();\n\t\t$graph->setAccessToken($_SESSION['access_token']);\n\t\t$me = $this->getMe();\n\n\t\t//Create a new sender object\n\t\t$sender = new Model\\Recipient();\n\t\t$sEmail = new Model\\EmailAddress();\n\t\t$sEmail->setName($me->getGivenName());\n\t\t$sEmail->setAddress($this->user->email);\n\t\t$sender->setEmailAddress($sEmail);\n\t\t\n\t\t//Create a new recipient object\n\t\t$recipient = new Model\\Recipient();\n\t\t$rEmail = new Model\\EmailAddress();\n\t\t$rEmail->setAddress($_POST['input_email']);\n\t\t$recipient->setEmailAddress($rEmail);\n\n\t\t//Set the body of the message\n\t\t$body = new Model\\ItemBody();\n\t\t$body->setContent($_POST['input_body']);\n\t\t$body->setContentType(Model\\BodyType::HTML);\n\n\t\t//Create a new message\n\t\t$mail = new Model\\Message();\n\t\t$mail->setSubject($_POST['input_subject'])\n\t\t\t ->setBody($body)\n\t\t\t ->setSender($sender)\n\t\t\t ->setFrom($sender)\n\t\t\t ->setToRecipients(array($recipient));\n\n\t\t//Send the mail through Graph\n\t\t$request = $graph->createRequest(\"POST\", \"/me/sendMail\")\n\t\t\t\t\t\t ->attachBody(array (\"message\" => $mail));\n\t\t$request->execute();\n\n\n\t\t//Return to the email view\n\t\treturn Redirect::to('/mail');\n\t}", "title": "" }, { "docid": "ee1714a5b7229c34ff96ed55189d911f", "score": "0.5223047", "text": "public function sendNotification() {\n\t \n\t if (!$this->NotificationSent) {\n \t $notification = new NotificationEmail($this->Member(), $this);\n \t if ($notification->send()) {\n \t $this->NotificationSent = true;\n \t $this->write();\n \t }\n\t }\n\t}", "title": "" }, { "docid": "20e912c63a9204907bfa1bb9a7295992", "score": "0.52215016", "text": "public function getSenderEmail();", "title": "" }, { "docid": "9d912c94bf4f19d1fb62e5ad6111ce4d", "score": "0.52204293", "text": "public function sendEmail()\n {\n $this ->user->email = '[email protected]';\n\n\n $this->dispatch(new SendSusbscriptionEmail($this ->user));\n\n return \"prova\";\n }", "title": "" }, { "docid": "7b38ea65cf9587021ba25058829b011e", "score": "0.52197963", "text": "function user_notification_email($email,$user) {\n\t$protocol_content = (Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://';\n\t$link=$protocol_content.$_SERVER['HTTP_HOST'];\n\t$sub=\"Thank You For Registration\";\n\t$vars = array(\n\t '{firstname}' => $user['fname'], \n\t\t\t'{lastname}' => $user['lname'], \n\t\t\t'{email}' => $email,\n\t\t\t'{passwd}'=> $user['pass']\n\t);\n $id_lang = (int)Configuration::get('PS_LANG_DEFAULT');\n\t\tMail::Send($id_lang, 'account',$sub, $vars, $email);\n}", "title": "" }, { "docid": "1baae6c6098dc823ba5288b18b0405a8", "score": "0.5209312", "text": "public function ur_get_profile_details_changed_email() {\n\n\t\t\t$message = apply_filters(\n\t\t\t\t'user_registration_profile_details_changed_email_message',\n\t\t\t\tsprintf(\n\t\t\t\t\t__(\n\t\t\t\t\t\t'User has changed profile information for the following account:<br/>\n\nSiteName: {{blog_info}} <br/>\nUsername: {{username}} <br/>\n\n{{all_fields}}\n<br/>\nThank You!',\n\t\t\t\t\t\t'user-registration'\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\n\t\t\treturn $message;\n\t\t}", "title": "" }, { "docid": "e0b46d30a05f29e01f808efda203d8ba", "score": "0.51998323", "text": "public function sendEmail()\n {\n /* @var $user User */\n $user = User::findByEmail($this->email);\n\n if (!$user) {\n return false;\n }\n\n $time = time();\n $userEmail = $user->email;\n $link = Yii::$app->urlManager->createAbsoluteUrl([\n 'site/reset-password',\n 'id' => $user->id,\n 'time' => $time,\n 'hash' => md5($userEmail->email . $user->password_hash . $time),\n ]);\n\n return Yii::$app->mailer\n ->compose(\n [\n 'html' => 'reset-password-html',\n 'text' => 'reset-password-text',\n ],\n [\n 'user' => $user,\n 'link' => $link,\n ]\n )\n ->setFrom([Yii::$app->params['adminEmail'] => Yii::$app->name . ' Robot'])\n ->setTo($this->email)\n ->setSubject('Reset password for ' . Yii::$app->name)\n ->send();\n }", "title": "" }, { "docid": "41aca58e89114527cf5dacd536426429", "score": "0.51985717", "text": "protected static function email_verified_at(): mixed\n\t{\n\t\treturn self::$query->email_verified_at;\n\t}", "title": "" }, { "docid": "a1bb15a7a689c7308d30b7f367050ee0", "score": "0.5196734", "text": "function ura_admin_new_user_notification_email( $user_id ){\r\n\t\t$options = get_option( 'csds_userRegAide_Options' );\r\n\t\t$user = new WP_User( $user_id );\r\n\t\t$fields = get_option( 'csds_userRegAide_registrationFields' );\r\n\t\t$this->ura_approve = $options['new_user_approve'];\r\n\t\t$this->bp_approve = $options['buddy_press_approval'];\r\n\t\t$this->bp_registration = $options['buddy_press_registration'];\r\n\t\t$this->approval_status = get_user_meta( $user_id, 'approval_status', true );\r\n\t\t$this->user_login = stripslashes( $user->user_login );\r\n\t\t$this->user_email = stripslashes( $user->user_email );\r\n\t\t$message = ( string ) '';\r\n\t\t$this->blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );\r\n\t\t$this->admin_notification = get_user_meta( $user_id, 'admin_notification', true );\r\n\t\t\r\n\t\tif( $this->ura_approve == 1 ){\r\n\t\t\tif( empty( $this->approval_status ) || $this->approval_status == 'pending' && $this->admin_notification <= 0 ){\r\n\t\t\t\t$message = sprintf( __( 'A new user has registered on your site and is awaiting approval at %s:', $this->domain ), $this->blogname ) . \"\\r\\n\\r\\n\";\r\n\t\t\t\t$message .= sprintf( __( 'Username: %s', $this->domain ), $this->user_login ) . \"\\r\\n\\r\\n\";\r\n\t\t\t\t$message .= sprintf( __( 'E-mail: %s', $this->domain ), $this->user_email ) . \"\\r\\n\";\r\n\t\t\t\t@wp_mail( get_option( 'admin_email' ), sprintf( __( '[%s] New User Registration Alert', $this->domain ), $this->blogname ), $message );\r\n\t\t\t\t$this->admin_notification++;\r\n\t\t\t}elseif( $this->approval_status == 'approved' ){\r\n\t\t\t\t$message = sprintf( __( 'A new user has registered on your site %s:', $this->domain ), $this->blogname ) . \"\\r\\n\\r\\n\";\r\n\t\t\t\t$message .= sprintf( __( 'Username: %s', $this->domain ), $this->user_login ) . \"\\r\\n\\r\\n\";\r\n\t\t\t\t$message .= sprintf( __( 'E-mail: %s', $this->domain ), $this->user_email ) . \"\\r\\n\";\r\n\t\t\t\t@wp_mail( get_option( 'admin_email' ), sprintf( __( '[%s] New User Registration Alert', $this->domain ), $this->blogname ), $message );\r\n\t\t\t\t$this->admin_notification++;\r\n\t\t\t}\r\n\t\t}elseif( $this->ura_approve == 2 ){\r\n\t\t\t$message = sprintf( __( 'A new user has registered on your site %s:', $this->domain ), $this->blogname ) . \"\\r\\n\\r\\n\";\r\n\t\t\t$message .= sprintf( __( 'Username: %s', $this->domain ), $this->user_login ) . \"\\r\\n\\r\\n\";\r\n\t\t\t$message .= sprintf( __( 'E-mail: %s', $this->domain ), $this->user_email ) . \"\\r\\n\";\r\n\t\t\t@wp_mail( get_option( 'admin_email' ), sprintf( __( '[%s] New User Registration Alert', $this->domain ), $this->blogname ), $message );\r\n\t\t\t$this->admin_notification++;\r\n\t\t}\r\n\t\tupdate_user_meta( $user_id, 'admin_notification', $this->admin_notification );\r\n\t\treturn;\r\n\t}", "title": "" }, { "docid": "ffaee42feb728c1469e55b9d7aa6ccb2", "score": "0.519473", "text": "public function sendEmail()\n {\n /* @var $user User */\n $user = User::findOne([\n 'status' => User::STATUS_ACTIVE,\n 'email' => $this->email,\n ]);\n\n if ($user) {\n $textBody = Yii::t('app', 'Ваш логин') . ': ' .\n $user->username . ' ' .\n Yii::t('app', 'Ваш платежный пароль') . ': ' .\n $user->pay_pass;\n return \\Yii::$app->mailer->compose()\n ->setFrom(['[email protected]' => \\Yii::$app->name . ' robot'])\n ->setTo($user->email)\n ->setSubject(Yii::t('app', 'Регистрация на сайте Ферма') . '!')\n ->setTextBody($textBody)\n ->send();\n }\n\n return false;\n }", "title": "" }, { "docid": "832166fa871c59e3d96021882f93c3af", "score": "0.51893246", "text": "public function getSendingTime()\n {\n return $this->sending_time;\n }", "title": "" }, { "docid": "512eabf8d1b40d144b2d251309bf67ce", "score": "0.5186064", "text": "public function email() {\n return $this->user_email;\n }", "title": "" }, { "docid": "2c9c0afb0bb7c00ae5ad5b50b7fb2c43", "score": "0.5185512", "text": "function log_emails_send($hook, $type, $result, $params) {\n $message = $params['notification'];\n\n $sender = $message->getSender();\n $recipient = $message->getRecipient();\n\n if (!$sender) {\n return false;\n }\n\n if (!$recipient || !$recipient->email) {\n return false;\n }\n\n $to = $recipient->email;\n\n $site = elgg_get_site_entity();\n // If there's an email address, use it - but only if it's not from a user.\n if (!($sender instanceof \\ElggUser) && $sender->email) {\n $from = $sender->email;\n } else if ($site->email) {\n $from = $site->email;\n } else {\n // If all else fails, use the domain of the site.\n $from = 'noreply@' . $site->getDomain();\n }\n\n $date = date(\"Y-m-d H:i:s\"); \n error_log(sprintf(elgg_echo('log_emails:content'), $from, $to, $date, $message->subject, $message->body), 3, \"php://stderr\");\n\n return true;\n //return elgg_send_email($from, $to, $message->subject, $message->body, $params);\n}", "title": "" }, { "docid": "3d1578a094acd1d175b1e6d2a02b563a", "score": "0.51806694", "text": "public static function sendUserEmail(AfterUserRegisteredEvent $event)\n {\n $user = User::findOne($event->userId);\n if ($user !== null && isset($event->data['emailTemplateId'])) {\n EmailHelper::sendNewMessage(\n $user->email,\n $event->data['emailTemplateId'],\n [\n 'languageId' => $event->languageId,\n 'password' => $event->password,\n 'userId' => $event->userId,\n ]\n );\n }\n }", "title": "" }, { "docid": "8321fe21b4624bca4b457cf1dbbeccb1", "score": "0.5177193", "text": "public function send_welcome_email( $user_id ) {\n $args = array(\n 'tokens' => array(\n ),\n );\n \n // add each xprofile field value of the user as an available token (e.g. {{xprofile.1}} for the field_id of \"1\")\n $xprofile_field_ids = bp_xprofile_get_fields_by_visibility_levels( $user_id, array( 'public', 'friends', 'loggedin', 'adminsonly' ) );\n foreach( $xprofile_field_ids as $field_id ) {\n $token_key = 'xprofile.' . $field_id;\n $args['tokens'][$token_key] = xprofile_get_field_data( $field_id, $user_id );\n }\n \n // send args and user ID to receive email\n bp_send_email( 'activation_completed', $user_id, $args );\n }", "title": "" }, { "docid": "1bb581b05005345d82f3a97d66ad0dcb", "score": "0.5175924", "text": "public function emailDate();", "title": "" }, { "docid": "194dce117ee731b6dd51d3644596a9dc", "score": "0.5174519", "text": "protected function _sendMail()\n {}", "title": "" }, { "docid": "261a684843192df566a66d940b40a2b8", "score": "0.51721966", "text": "public function getPendingEmailTime()\n {\n return Carbon::createFromTimestamp($this->bit->email_change_time);\n }", "title": "" }, { "docid": "9be1ce96955a7ad72e8c8caa5e0ded81", "score": "0.5172181", "text": "function sendExpiryNotifications( $days ) {\n\t\t\n\t\tif ($this->debug) echo \"sendExpiryNotifications( $days )\";\n\t\t\n\t\t//What is \"now/today\" for the purposes of expired \"today\" or 1 day from \n\t\t//\"today\"? : We will define it as 1 minute past 12 midnight on today's date.\n\t\t//This is so the definition of \"now\" isn't constantly moving as we\n\t\t//do processing.\n\t\t$today = mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\"));\n\t\tif ($this->debug) {\n echo '$today ' . $today; //debug\n\t\t\techo '<br />';\n\t\t\techo date( 'r', $today );\n\t\t\techo '<br />';\n echo ' time() ' . time(); //debug\n\t\t\techo '<br />';\n }\n\t\t\n \n\t\t//Example: Need to know which items expire 1 day from today. \n //min below would be today + 1day\n //max would be min + 1 day.\n //Then find all rows that have endtime between min and max\n\t\t$expiry_period_min = $today + ($days * $this->SECONDS_PER_DAY);\n\t\t$expiry_period_max = $expiry_period_min - 1 + $this->SECONDS_PER_DAY;\n \n\t\tif ($this->debug) {\n\t\t\tcbDebug( 'expiry_period_min', date( 'r', $expiry_period_min ) );\t\n\t\t\tcbDebug( 'expiry_period_max', date( 'r', $expiry_period_max ) );\t\n }\n\n /* Example query:\n SELECT name, email, endtime\n FROM fe_users\n WHERE endtime >=1111317260\n AND endtime <1111403660\n AND ( usergroup REGEXP \"[[:<:]]2[[:>:]]\" OR usergroup REGEXP \"[[:<:]]4[[:>:]]\" )\n\t\tAND NOT (tx_memberexpiry_emailsenttime >= 1111317260 and \n\t\t\ttx_memberexpiry_emailsenttime < 1111403660)\n */\n \n $where = \"endtime >= $expiry_period_min and endtime < $expiry_period_max \";\n\t\t$where .= 'AND ( usergroup REGEXP \"[[:<:]]'.$this->PROFESSIONAL_MEMBER_GROUPID.'[[:>:]]\" ' \n\t\t\t. 'OR usergroup REGEXP \"[[:<:]]'.$this->COMPLIMENTARY_PROF_MEMBER_GROUPID.'[[:>:]]\" )';\n\t\t$where .= \" AND NOT ( tx_memberexpiry_emailsenttime = $today ) \";\n\t\t$columns = 'uid, first_name name, email, endtime, usergroup, username, deleted, disable';\n $query\t= $this->db->SELECTquery($columns, 'fe_users', $where );\n\t\tcbDebug( 'File ' . __FILE__, 'Line ' . __LINE__ );\t\n\t\tcbDebug( 'query', $query );\t\n $expiring_rows = $this->db->exec_SELECTgetRows($columns, 'fe_users', $where );\n if ($this->debug) {\n\t\t\tprint_r( $expiring_rows ); echo \"\\n<br>\"; //debug\n\t\t\techo $where;\n\t\t}\n \n\t\t$expireDate\t\t\t\t\t\t= $expiry_period_min;\n $expiry_formatted_date_full\t\t= $this->getExpireTimeFormatted('date', $expireDate); \n\t\t$expiry_days_text \t\t\t\t\t= $this->getExpireTimeFormatted('days', $days);\n\t\t$expiry_formatted_date_noyear \t= $this->getExpireTimeFormatted('date_noyear', $expireDate);\n $replacement_patterns = array(\n\t\t\t\"/\\#\\#\\#MEMBER_NAME\\#\\#\\#/\"\n\t\t\t, \"/\\#\\#\\#MEMBERSHIP_EXPIRY_DATE_FULL\\#\\#\\#/\"\n\t\t\t, \"/\\#\\#\\#USER_NAME\\#\\#\\#/\"\n\t\t\t, \"/\\#\\#\\#MEMBERSHIP_EXPIRY_DAYS\\#\\#\\#/\"\n\t\t\t, \"/\\#\\#\\#MEMBERSHIP_EXPIRY_DATE_NOYEAR\\#\\#\\#/\"\n\t\t\t); \n \n //For each expiring row, send an email.\n //debug\n if ($this->debug) echo \"\\n<br>Printing rows\";\n foreach ( $expiring_rows as $row ) {\n\n set_time_limit(30);\n\t\t\t\n\t\t\t//compensate for blank name fields\n\t\t\t$name1 = $row['name'] == '' ? $this->defaultMemberName : $row['name'];\n\t\t\t$name = $this->capitalizeWords($name1);\n\t\t\t$user_name = $row['username'];\n\t\t\t\n //debug\n if ($this->debug) {\n\t\t\t\techo '<br>';\n\t\t\t\tprint_r( $row );\n\t\t\t\techo 'Dear ' . $name ;\n\t\t\t\techo 'Your membership expires ' . $expiry_formatted_date_full . '.';\n\t\t\t\techo '<br />';\n }\n\t\t\t\n\t\t\t//note: reference $replacement_patterns above\n $replacement_text = array(\n\t\t\t\t$name\n\t\t\t\t, $expiry_formatted_date_full\n\t\t\t\t, $user_name\n\t\t\t\t, $expiry_days_text\n\t\t\t\t, $expiry_formatted_date_noyear\n\t\t\t);\n $htmlBody = $this->prepareTemplate($this->templateExpiring, \n $replacement_patterns, $replacement_text\n );\n \n\t\t\t// don't email old person\n\t\t\tif ( ! $row['deleted'] && ! $row['disable'] )\n\t\t\t{\n \t$this->sendEmail( $htmlBody, $row['email'] );\n\t\t\t}\n\t\t\t$this->logEmailSent( $row['uid'], $today );\n }\n \n\n\t}", "title": "" }, { "docid": "364b21837ebb978d3e1ca5629863662d", "score": "0.51643276", "text": "public function sendInvitation() {\n $users = new Table('users');\n $user = $users->findFirst('id DESC')->where(array('role' => 'invited'));\n \n // have we actually retrieved the user?\n if (!Fari_Filter::isInt($user->id)) throw new UserNotFoundException();\n\n // form the email\n $this->mailer->addTo($user->email)->addFrom('[email protected]', 'Clubhouse');\n $this->mailer->setSubject('You\\'re invited to join Clubhouse');\n\n $this->mailer->setBody(\n \"Hi {$user->first},\\nYou're invited to join Clubhouse, our group chat system.\\n\\n\".\n \"Click this link to get started:\\n\" .\n url('account/invitation/' . $user->invitation . '/', FALSE, TRUE) .\n \"\\n\\nThanks\"\n );\n\n //$this->mailer->send();\n }", "title": "" }, { "docid": "776f3847f0648f3bed48ad005fdc66db", "score": "0.51593953", "text": "function getDateMailed() {\n\t\treturn $this->getData('dateMailed');\n\t}", "title": "" }, { "docid": "5ecce75bc37a3c658bcfdb2936635423", "score": "0.51566917", "text": "public function message()\n {\n return 'This e-mail is reserved for another user.';\n }", "title": "" }, { "docid": "a91e00e4acfd7fccbde5e078dbb6bfbc", "score": "0.5152608", "text": "protected function logUser()\n {\n if ($this->shouldCollect('user') === false) {\n return;\n }\n\n $user = $this->yiiApp->user;\n if (\\method_exists($user, 'getIsGuest') && $user->getIsGuest()) {\n return;\n }\n\n $channelOpts = array(\n 'channelIcon' => 'fa fa-user-o',\n 'nested' => false,\n );\n $debug = $this->debug->rootInstance->getChannel('User', $channelOpts);\n\n $identityData = $user->model->attributes;\n if ($user->model instanceof \\CModel) {\n $identityData = array();\n foreach ($user->model->attributes as $key => $val) {\n $key = $user->model->getAttributeLabel($key);\n $identityData[$key] = $val;\n }\n }\n $debug->table(\\get_class($user), $identityData);\n $this->logAuthClass();\n }", "title": "" }, { "docid": "965c5101184e537a7b5a8159e8de09c2", "score": "0.515127", "text": "public function notifyUserClosedTender(){\n\t\t$data = $_REQUEST;\n\t\t$user = Member::get()->filter(array(\n\t\t\t\t'Email' => $data['email']\n\t\t))->first();\n\t\t$tender = Tender::get()->byID($data['tenderId']);\n\t\t$tenderTitle = $tender->Title;\n\t\t$tenderId = $data['tenderId'];\n\t\t//send email\n\t\t$email = new Email();\n\t\t$email\n\t\t->setTo($data['email'])\n\t\t->setSubject(\"Job for Pricing, Closed Tender: $tenderTitle, $tenderId\")\n\t\t->setTemplate('JobForPricingCTEmail')\n\t\t->populateTemplate(new ArrayData(array(\n\t\t\t\t'Tender' => $tender\n\t\t)));\n\t\tif ($email->send()) {\n\t\t\techo \"The user is notified.\";\n\t\t} else {\n\t\t\techo \"Email could not be sent, please try later.\";\n\t\t}\n\t\tdie();\n\t}", "title": "" }, { "docid": "f3237abc10f021e6cc0cefe38d60d3d0", "score": "0.51435894", "text": "public function mailingUser() {\n\n $ev = Event::find()->all();\n \n foreach($ev as $k) {\n if ($k->type_ == 'email' ) {\n $user_to_mail = User::findOne(['username' => $k->to_])->email;\n $user_from_mail = User::findOne(['username' => $k->from_])->email;\n $mail = new MailMessage([\n 'from' => $user_from_mail,\n 'to' => $user_to_mail,\n 'subject'=> $k->title_,\n 'body'=> $k->message_\n ]);\n $mail->send();\n }\n }\n }", "title": "" }, { "docid": "10d08790d9a62636969c97862f5bc7eb", "score": "0.51381594", "text": "function set_password_email_instructions( $user ){\r\n\t\t$this->blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );\r\n\t\t$this->user_login = stripslashes( $user->user_login );\r\n\t\t$this->user_email = stripslashes( $user->user_email );\r\n\t\t$this->emails_sent = get_user_meta( $user->ID, 'emails_sent', true );\r\n\t\t$this->approval_status = get_user_meta( $user->ID, 'approval_status', true );\r\n\t\t$e_verified = get_user_meta( $user->ID, 'password_set', true );\r\n\t\tif( $this->approval_status == 'approved' ){\r\n\t\t\tif( $e_verified == 2 ){\r\n\t\t\t\t$message = sprintf( __( 'Thank you for registering with %s!', $this->domain ), $this->blogname ) . \"\\r\\n\\n\";\r\n\t\t\t\t$message .= sprintf( __( 'You need to follow the instructions below to finalize', $this->domain ) ) . \"\\r\\n\\n\";\r\n\t\t\t\t$message .= sprintf( __( 'the registration process and set your new password so ', $this->domain ) ) . \"\\r\\n\\n\";\r\n\t\t\t\t$message .= sprintf( __( 'you can login and start using your new account!', $this->domain ) ) . \"\\r\\n\\n\";\r\n\t\t\t\t$message .= sprintf( __( 'Credentials:', $this->domain ) ). \"\\r\\n\";\r\n\t\t\t\t$message .= sprintf( __( 'Username: %s', $this->domain ), $this->user_login ) . \"\\r\\n\";\r\n\t\t\t\t$message .= apply_filters( 'user_password_key', $user );\r\n\t\t\t\tif( @wp_mail( $this->user_email, sprintf( __( '[%s] Finalize New User Account Instructions' ), $this->blogname ), $message ) ){\r\n\t\t\t\t\t$this->emails_sent++;\r\n\t\t\t\t\tupdate_user_meta( $user->ID, 'emails_sent', $this->emails_sent );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif( $e_verified == 2 ){\r\n\t\t\t\t$message = sprintf( __( 'Thank you for registering with %s!', $this->domain ), $this->blogname ) . \"\\r\\n\\n\";\r\n\t\t\t\t$message .= sprintf( __( 'Your Account needs Approval for an ', $this->domain ) ) . \"\\r\\n\\n\";\r\n\t\t\t\t$message .= sprintf( __( 'Administrator Before ', $this->domain ) ) . \"\\r\\n\\n\";\r\n\t\t\t\t$message .= sprintf( __( 'you can login and start using your new account!', $this->domain ) ) . \"\\r\\n\\n\";\r\n\t\t\t\t$message .= sprintf( __( 'Credentials:', $this->domain ) ). \"\\r\\n\";\r\n\t\t\t\t$message .= sprintf( __( 'Username: %s', $this->domain ), $this->user_login ) . \"\\r\\n\";\r\n\t\t\t\tif( @wp_mail( $this->user_email, sprintf( __( '[%s] New User Account Approval' ), $this->blogname ), $message ) ){\r\n\t\t\t\t\t$this->emails_sent++;\r\n\t\t\t\t\tupdate_user_meta( $user->ID, 'emails_sent', $this->emails_sent );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "1d7fb4103f15a2ea25a68ca2466bc721", "score": "0.51366985", "text": "public function send_verification_email_again() {\n if ( empty( $_GET['dokan_email_verification_again'] ) ) {\n return;\n }\n\n if ( is_user_logged_in() ) {\n return;\n }\n\n $user_id = wc_clean( $_GET['dokan_email_verification_again'] );\n\n if ( get_userdata( $user_id ) === false ) {\n return;\n }\n\n if ( ! class_exists( 'WC_Email_Customer_New_Account' ) ) {\n require_once WC_ABSPATH . '/includes/emails/class-wc-email-customer-new-account.php';\n }\n\n $email = new \\WC_Email_Customer_New_Account;\n\n $email->trigger( $user_id );\n\n wp_redirect( add_query_arg( array( 'resend_email' => 'sent' ), wc_get_page_permalink( 'myaccount' ) ) );\n }", "title": "" }, { "docid": "807b6a2c1e1b394c14005e2bd2002ff1", "score": "0.513559", "text": "public static function update_logging_time($email='') {\n\t\t$database = new Database;\n\n\t\t$time_now=time();\n\t\t$query= \"UPDATE \".self::$table_name.\" SET last_login={$time_now} WHERE email='{$email}' LIMIT 1\";\n\t\t\t$result_array = $database->query($query);\n\t}", "title": "" }, { "docid": "b9acfbc553f3771653bf6c35c849215e", "score": "0.5134678", "text": "public function it_send_emails_to_users_who_has_a_plan_about_to_expire_in_three_days()\n {\n Mail::fake();\n\n $this->travelTo('2020-01-01 00:00:00');\n\n PlanUser::withoutEvents(function() {\n factory(PlanUser::class)->create([\n 'finish_date' => '2020-01-04 00:00:00',\n 'plan_status_id' => PlanStatus::ACTIVE,\n ]);\n \n // end of the day\n factory(PlanUser::class)->create([\n 'finish_date' => '2020-01-04 23:59:59',\n 'plan_status_id' => PlanStatus::ACTIVE,\n ]);\n });\n\n $this->artisan($this->signature);\n\n Mail::assertSent(ToExpireEmail::class, 2);\n }", "title": "" }, { "docid": "bf87a58d8093dad1dbb043e364bb2602", "score": "0.5126461", "text": "public function getSentAt()\n {\n return $this->sentAt;\n }", "title": "" }, { "docid": "1edd0135eab2c3672ea1ca94a1dd68db", "score": "0.512408", "text": "public function get_email_user()\n {\n return $this->_email_user;\n }", "title": "" }, { "docid": "f6ea7af3c02e59feb6b9b31707c139ac", "score": "0.5116056", "text": "public function checkMailattempt() {\n global $app;\n $dtoday = new MySBDateTime('NOW');\n if( !empty($this->mailattempt_date) ) {\n $ldate = new MySBDateTime($this->mailattempt_date);\n $ddiff = $ldate->absDiff('i');\n if( $ddiff<=1440 )\n $app->displayStopAlert(_G('SBGT_mailattempt_max'),10,false);\n }\n $this->update( array( 'mailattempt_date'=>$dtoday->date_string ) );\n return true;\n }", "title": "" }, { "docid": "6b81ca12e12d38fdee680782c6256a30", "score": "0.5111851", "text": "public function sendActivationMail($event)\r\n {\r\n $email = $event->user->email;\r\n $name = $event->user->fullname;\r\n $datas = [\r\n 'user' => $event->user,\r\n 'activation' => Activation::create($event->user)\r\n ];\r\n Mail::queue(config('laravel-user-module.views.email.activation'), $datas, function($message) use($email,$name) {\r\n $message->to($email, $name)\r\n ->subject(lmcTrans('laravel-user-module/auth.activation.mail_subject'));\r\n });\r\n }", "title": "" }, { "docid": "07bc3a63c85074728eb021d70c2d284d", "score": "0.51111805", "text": "public function seeEmailIsSent(int $expectedCount = 1): void\n {\n $this->assertThat($this->getMessageMailerEvents(), new MailerConstraint\\EmailCount($expectedCount));\n }", "title": "" }, { "docid": "6f1b27b7f86c0e9e9f5ccdd71e7ce3a5", "score": "0.51057833", "text": "public function sendUserPasswordResetEmail(User $user);", "title": "" }, { "docid": "63acd3bd92e9f6c546adaf678a7f9fe7", "score": "0.5098365", "text": "function message_notification_email_sender_user($sender_account_type, $email_from)\n {\n $system_url = base_url();\n $sender_account_type = $sender_account_type;\n $email_from = $email_from;\n $email_to = $this->db->get_where('admin', array(\n 'admin_id' => 1\n ))->row()->email;\n $email_sub = \"New Message\";\n $email_msg = \"You have a new message from \" . $sender_account_type . \".<br \\>\";\n $email_msg .= \"Check the message at \" . $system_url;\n $this->do_email($email_msg, $email_sub, $email_to, $email_from);\n }", "title": "" }, { "docid": "3a96c7eae285647e7f96104564ff2cbe", "score": "0.50928885", "text": "public function send() {\n\t\techo 'email real send';\n\t}", "title": "" }, { "docid": "5485b71b7fa5a76ebc7ff47e8bc80e52", "score": "0.50890493", "text": "function sendGrantsReciptEmail() {\n\t\t$oQueue = commsOutboundManager::newQueueFromApplicationMessageGroup(\n\t\t\t0, mofilmMessages::MSG_GRP_USR_GRNT_RECEIVED\n\t\t);\n\t\t\n\t\t$oUser = mofilmUserManager::getInstanceByID($this->getUserID());\n\t\t$oObject = $this->getGrants()->getSource();\n\t\t\n\t\tcommsOutboundManager::setCustomerInMessageStack($oQueue, $this->getUserID());\n\t\tcommsOutboundManager::setRecipientInMessageStack($oQueue, $oUser->getEmail());\n\t\tcommsOutboundManager::replaceDataInMessageStack($oQueue, array('%mofilm.username%', '%mofilm.brand%', '%mofilm.event%'), array($oUser->getFullname(), $oObject->getName(), $oObject->getEvent()->getName()));\n\n\t\treturn $oQueue->send();\n\t}", "title": "" }, { "docid": "dc46e0d5e67aa49f9eab123de8f5a8c2", "score": "0.5088051", "text": "function purchase_done_staff_mail($order_id)\n{\n $member_id = $GLOBALS['SITE_DB']->query_select_value('shopping_order', 'c_member', array('id' => $order_id));\n $displayname = $GLOBALS['FORUM_DRIVER']->get_username($member_id, true);\n $username = $GLOBALS['FORUM_DRIVER']->get_username($member_id);\n\n require_code('notifications');\n\n $subject = do_lang('ORDER_PLACED_MAIL_SUBJECT', get_site_name(), strval($order_id), array($displayname, $username), get_site_default_lang());\n $message = do_notification_lang('ORDER_PLACED_MAIL_MESSAGE', comcode_escape(get_site_name()), comcode_escape($displayname), array(strval($order_id), strval($member_id), comcode_escape($username)), get_site_default_lang());\n\n dispatch_notification('new_order', null, $subject, $message);\n}", "title": "" }, { "docid": "4d8b600db3d8c238a825e428c3351684", "score": "0.50854075", "text": "public function sendEmail()\n\t{\n\t\tif (empty($this->get('crmid'))) {\n\t\t\treturn;\n\t\t}\n\t\t$moduleName = 'Contacts';\n\t\t$recordModel = Vtiger_Record_Model::getInstanceById($this->get('crmid'), $moduleName);\n\t\tif ($recordModel->get('emailoptout')) {\n\t\t\t\\App\\Mailer::sendFromTemplate([\n\t\t\t\t'template' => 'YetiPortalRegister',\n\t\t\t\t'moduleName' => $moduleName,\n\t\t\t\t'recordId' => $this->get('crmid'),\n\t\t\t\t'to' => $this->get('user_name'),\n\t\t\t\t'password' => $this->changes['password'],\n\t\t\t\t'login' => $this->get('user_name'),\n\t\t\t\t'acceptable_url' => Settings_WebserviceApps_Record_Model::getInstanceById($this->get('server_id'))->get('url'),\n\t\t\t]);\n\t\t}\n\t}", "title": "" }, { "docid": "b1034d4d09d74c3e421ee88175b7afac", "score": "0.50840396", "text": "public function getEmailForPasswordReset()\n {\n return $this->user_email;\n }", "title": "" } ]
39c15bc19050ac0b874aa9807556de90
Should these paths be updated?
[ { "docid": "c5ab4de449de4261db68f2ecbaa7e979", "score": "0.0", "text": "public static function isDiff($path1, $path2)\n {\n unset($path1[\"timestamp\"]);\n unset($path2[\"timestamp\"]);\n $diffKeys = array_diff_key($path1, $path2);\n $diffValues = array_diff($path1, $path2);\n\n return count($diffKeys) > 0 || count($diffValues) > 0;\n }", "title": "" } ]
[ { "docid": "57b52ed86f3af36cb82ed68acd32ea78", "score": "0.67464817", "text": "public function addPaths ( );", "title": "" }, { "docid": "e5a1630b1fdc05d37b896f3e484d04e3", "score": "0.6543258", "text": "function conf_rel_path(){\n\t\tglobal $project, $rel_path;\n\t\t$current_path_array = path_to_array(path_at_last_slash());\n\t\t$current_path_length = count($current_path_array);\n\t\t$project_array = path_to_array($project);\n\t\t$project_length = count($project_array);\n\t\t$rel_path_temp = \"\";\n\t\t\t\t\n\t\tfor($index = 0; $index < $current_path_length && $index < $project_length; $index++){\n\t\t if(($current_path_array[$index] != $project_array[$index]) || ($index+1 == $project_length)){\n\t\t\t\t$rel_path_temp = str_repeat(\"../\", $current_path_length - $index - 1);\n\t\t\t break;\n\t\t\t}\n\t\t}\t\t\t\t\n\t\t\t\t\t\n\t\tif(!isset($rel_path) || $rel_path_temp != $rel_path){\n\t\t\t$rel_path = $rel_path_temp;\n\t\t set_rel_path();\n\t\t}\n\t}", "title": "" }, { "docid": "da9da4cc4a38193ed65bae59ff36260c", "score": "0.6305518", "text": "protected function fixPaths()\n { \n if ($this->hasBasePath() && $this->basePath === '/') {\n $this->basePath = '';\n }\n\n if ($this->hasBasePath() && !$this->hasScriptPath()) {\n $this->scriptPath = '/';\n } elseif ($this->hasScriptPath() && !$this->hasBasePath()) {\n $this->basePath = '';\n }\n }", "title": "" }, { "docid": "23b30462d4cbc43576d975ffcacea9d1", "score": "0.6277997", "text": "private function resetFolderPaths()\n {\n // Unbind the existing paths\n $statement = $this->conn->prepare('\n DELETE FROM paths\n WHERE descendant_id IN (\n SELECT d FROM (\n SELECT descendant_id as d FROM paths\n WHERE ancestor_id = ?\n ) as dct\n )\n AND ancestor_id IN (\n SELECT a FROM (\n SELECT ancestor_id AS a FROM paths\n WHERE descendant_id = ?\n AND ancestor_id <> ?\n ) as ct\n )\n ');\n $statement->execute([$this->id, $this->id, $this->id]);\n\n // Bind the new paths\n $statement = $this->conn->prepare('\n INSERT INTO paths (ancestor_id, descendant_id, depth)\n SELECT supertbl.ancestor_id, subtbl.descendant_id, supertbl.depth+subtbl.depth+1\n FROM paths as supertbl\n CROSS JOIN paths as subtbl\n WHERE supertbl.descendant_id = ?\n AND subtbl.ancestor_id = ?\n ');\n\n $statement->execute([$this->parent_id, $this->id]);\n }", "title": "" }, { "docid": "0a83d18cad0330f63a1072141569996e", "score": "0.6228479", "text": "protected abstract function getPath();", "title": "" }, { "docid": "bdb7cff03e5e7f57fccc561af2542f86", "score": "0.6214563", "text": "protected function computePaths()\n {\n if (!$this->hasBasePath() && !$this->hasScriptPath()) {\n return;\n }\n\n $this->fixPaths();\n\n $entry = basename($this->basePath);\n $baseFolder = dirname($this->basePath);\n\n if (substr($this->path, 0, strlen($baseFolder)) !== $baseFolder) {\n $this->basePath = null;\n $this->scriptPath = null;\n return;\n }\n\n if (substr($this->path, strlen($baseFolder) + 1, strlen($entry)) === $entry) {\n $this->scriptPath = substr($this->path, strlen($this->basePath));\n } else {\n $this->basePath = $baseFolder;\n $this->scriptPath = substr($this->path, strlen($baseFolder));\n }\n\n if ($this->scriptPath === false) {\n $this->scriptPath = '/';\n }\n }", "title": "" }, { "docid": "b344c89b4b2fa3ba4e37aa7d1a2950f1", "score": "0.61700505", "text": "function updateFileReferences($oldpath,$newpath){\n\trequire_once('HTMPaths.lib.php');\n\t$oldroot = $GLOBALS['documentroot'].'/'.trim($oldpath,'/');\n\t$newroot = $GLOBALS['documentroot'].'/'.trim($newpath,'/');\n\tif(file_exists($oldroot) && is_dir($oldroot)){\n\t\t$childroots = glob($oldroot.'/*');\n\t\tforeach($childroots as $childroot){\n\t\t\tif(basename($childroot)!='_thumbs'){\n\t\t\t\t$oldchild = rtrim($oldpath,'/').'/'.basename($childroot);\n\t\t\t\t$newchild = rtrim($newpath,'/').'/'.basename($childroot);\n\t\t\t\tupdateFileReferences($oldchild,$newchild);\n\t\t\t}\n\t\t}\n\t}elseif(file_exists($newroot) && is_dir($newroot)){\n\t\t$childroots = glob($newroot.'/*');\n\t\tforeach($childroots as $childroot){\n\t\t\tif(basename($childroot)!='_thumbs'){\n\t\t\t\t$oldchild = rtrim($oldpath,'/').'/'.basename($childroot);\n\t\t\t\t$newchild = rtrim($newpath,'/').'/'.basename($childroot);\n\t\t\t\tupdateFileReferences($oldchild,$newchild);\n\t\t\t}\n\t\t}\n\t}else{\n\t\tresetHTMPathsInTable('content','content',$oldpath,$newpath);\n\t\tresetHTMPathsInTable('contentproperties','value',$oldpath,$newpath);\n\t\t$data = array('oldpath'=>$oldpath,'newpath'=>$newpath);\n\t\tfireEvent('htmpathResetting',$data);\n\t}\n}", "title": "" }, { "docid": "d44752f228949e4cc94a2cce38effb69", "score": "0.6146136", "text": "public function getPaths(){}", "title": "" }, { "docid": "d89d7937ade97ed20ac93825f4991368", "score": "0.6145352", "text": "function check_base_consistency()\n\t{\n\t\t$syspath = array();\n\t\tarray_push($syspath, BASE_DIR.'/log');\n\t\tarray_push($syspath, BASE_DIR.'/tmp');\n\t\tarray_push($syspath, BASE_DIR.'/config/entityoverlay');\n\t\tarray_push($syspath, BASE_DIR.'/mq_rpc/listeners');\n\t\tarray_push($syspath, BASE_DIR.'/original');\n\t\tarray_push($syspath, BASE_DIR.'/media');\n\t\tarray_push($syspath, BASE_DIR.'/thumb');\n\t\tarray_push($syspath, BASE_DIR.'/helpers/render');\n\t\tarray_push($syspath, BASE_DIR.'/data-plugins');\n\t\t//array_push($syspath, BASE_DIR.'/views/layout');\n\t\t//array_push($syspath, BASE_DIR.'/widgets');\n\t\t$this->dirsSetup($syspath);\n\t}", "title": "" }, { "docid": "e75494f2730b4a2b78e3b3ae75870ac7", "score": "0.6076713", "text": "protected function uniquePaths()\n {\n return [\n $this->newPath(),\n $this->newPath(\"../{$this->handle}.yaml\"),\n $this->newPath(\"../../trees/collections/{$this->handle}.yaml\"),\n ];\n }", "title": "" }, { "docid": "6d4751a2dad18487b66f12e4497d74b4", "score": "0.6061909", "text": "private function dataPaths($path)\n {\n $default_mods_data = json_decode(file_get_contents(\"$path/data/mods/default.json\"));\n\n // a new path (core) was added, contains basic json definitions\n $paths = array(\"$path/data/core\", \"$path/data/json\");\n\n // add default-loaded mods to the path list\n foreach ($default_mods_data[0]->dependencies as $mod) {\n $paths[] = $this->modDirectory($path, $mod);\n }\n\n $modlist = array_filter(glob(\"$path/data/mods/*\"), \"is_dir\");\n $this->set(\"modlist\", array());\n\n foreach ($modlist as $mod) {\n $modinfo = $this->find_modinfo_json($mod);\n if ($modinfo === null) {\n \\Log::info(\"[dataPaths] Could not find modinfo.json in $mod\");\n continue;\n }\n $isolatedname = \"dda\";\n if (stripos($mod, \"data/mods\") !== false) {\n $aftermodstring = substr($mod, stripos($mod, \"data/mods\") + 10);\n if (stripos($aftermodstring, \"/\") !== false) {\n $aftermodstringcutoff = stripos($aftermodstring, \"/\");\n $isolatedname = substr($aftermodstring, 0, $aftermodstringcutoff);\n } else {\n $isolatedname = $aftermodstring;\n }\n $isolatedname = strtolower($isolatedname);\n }\n\n // JSON structure is different than earlier mod versions\n if (is_array($modinfo)) {\n if (!isset($modinfo[0]->obsolete) || $modinfo[0]->obsolete == false) {\n $paths[] = $mod;\n }\n $id = \"dda\";\n if (isset($modinfo[0]->id)) {\n $id = strtolower($modinfo[0]->id);\n }\n\n if ($id != \"dda\") {\n $this->append(\"modlist\", $id);\n }\n\n $this->set(\"modident.$isolatedname\", $id);\n if (isset($modinfo[0]->dependencies)) {\n foreach ($modinfo[0]->dependencies as $dep) {\n if ($dep != \"dda\") {\n $this->append(\"moddep.$id\", strtolower($dep));\n }\n }\n }\n } else {\n if (!isset($modinfo->obsolete) || $modinfo->obsolete == false) {\n $paths[] = $mod;\n }\n $id = \"dda\";\n if (isset($modinfo->id)) {\n $id = strtolower($modinfo->id);\n }\n $this->set(\"modident.$isolatedname\", $id);\n if (isset($modinfo->dependencies)) {\n foreach ($modinfo->dependencies as $dep) {\n if ($dep != \"dda\") {\n $this->append(\"moddep.$id\", strtolower($dep));\n }\n }\n }\n }\n }\n\n return $paths;\n }", "title": "" }, { "docid": "4d26be6eefadf34388f681387fbdd578", "score": "0.6056952", "text": "private function setPathsInContainer(): void\n {\n $this->setInstance('path:base', $this->basePath);\n $this->setInstance('path:app', $this->basePath . DIRECTORY_SEPARATOR . 'app');\n $this->setInstance('path:config', $this->basePath . DIRECTORY_SEPARATOR . 'config');\n $this->setInstance('path:public', $this->basePath . DIRECTORY_SEPARATOR . 'public');\n $this->setInstance('path:tmp', $this->basePath . DIRECTORY_SEPARATOR . 'tmp');\n $this->setInstance('path:database', $this->basePath . DIRECTORY_SEPARATOR . 'database');\n }", "title": "" }, { "docid": "417edb71d9865af9a7f8f86f94e0f9c1", "score": "0.6054986", "text": "protected function computePath()\n {\n $this->fixPaths();\n $this->path = $this->basePath . ($this->scriptPath === '/' ? '' : $this->scriptPath);\n }", "title": "" }, { "docid": "87c82ebd99d9170dd90c3c6c594fa389", "score": "0.60152566", "text": "protected function setPaths()\n {\n $config = $this->builder->getConfiguration();\n\n $this->verbose->vvln(' <fg=cyan>?</fg=cyan> Paths to set:');\n\n foreach ($config->getPaths() as $relative => $absolute) {\n if (is_integer($relative)) {\n $this->verbose->vvln(\n sprintf(\n ' <fg=yellow>-</fg=yellow> %s',\n $absolute\n )\n );\n } else {\n $this->verbose->vvln(\n sprintf(\n ' <fg=yellow>-</fg=yellow> %s (as: %s)',\n $absolute,\n $relative\n )\n );\n }\n }\n\n $this->verbose->vvln(' <fg=magenta>*</fg=magenta> Paths being set:');\n\n switch ($this->output->getVerbosity()) {\n case OutputInterface::VERBOSITY_QUIET:\n case OutputInterface::VERBOSITY_NORMAL:\n $this->builder->setPaths();\n\n break;\n\n case OutputInterface::VERBOSITY_VERBOSE:\n case OutputInterface::VERBOSITY_VERY_VERBOSE:\n $this->setProgressBarStyles();\n\n $bar = new ProgressBar($this->output);\n $bar->setRedrawFrequency(13);\n\n $this\n ->builder\n ->getEventDispatcher()\n ->addSubscriber(new ProgressSubscriber($bar))\n ;\n\n $this->builder->setPaths();\n\n $bar->finish();\n $this->output->writeln('');\n\n break;\n\n case OutputInterface::VERBOSITY_DEBUG:\n $this\n ->builder\n ->getEventDispatcher()\n ->addSubscriber(new ReportSubscriber($this->output))\n ;\n\n $this->builder->setPaths();\n\n break;\n }\n\n $this->changes++;\n }", "title": "" }, { "docid": "5a9180189c07e8d2bd66a6a04641e4f7", "score": "0.5941529", "text": "public function getOldPath();", "title": "" }, { "docid": "e27595b2cd4fc61268ad68385c3746b7", "score": "0.59360236", "text": "protected function setPaths()\n {\n $pathPackage = realpath(__DIR__.'/../../../../');\n $pathBase = realpath(base_path());\n\n // Set CLI path.\n $this->pathCli = $pathBase.'/vendor/bin/'.$this::CLI_TOOL;\n if (!file_exists($this->pathCli)) {\n $this->pathCli = $pathPackage.'/vendor/bin/'.$this::CLI_TOOL;\n }\n\n // Set ruleset paths.\n $this->pathRulesetStock = $pathPackage.'/rulesets/'.$this::CLI_TOOL.'.xml';\n $this->pathRulesetLocal = $pathBase.'/'.$this::CLI_TOOL.'.xml';\n $this->pathRulesetLocalLegacy = $pathBase.'/app/'.$this::CLI_TOOL.'.xml';\n\n // Set active ruleset.\n $this->pathRuleset = $this->pathRulesetStock;\n if (is_readable($this->pathRulesetLocal)) {\n $this->pathRuleset = $this->pathRulesetLocal;\n } elseif (is_readable($this->pathRulesetLocalLegacy)) {\n $this->pathRuleset = $this->pathRulesetLocalLegacy;\n }\n }", "title": "" }, { "docid": "1120e7a89e931a77f187ab50d622cc0c", "score": "0.59343934", "text": "function makePath(){\n $this->isWall = FALSE;\n }", "title": "" }, { "docid": "6bc892c643c8384f65da9c2f2167eaeb", "score": "0.59195346", "text": "abstract public function get_path();", "title": "" }, { "docid": "6bc892c643c8384f65da9c2f2167eaeb", "score": "0.59195346", "text": "abstract public function get_path();", "title": "" }, { "docid": "c86a769b19bffa2d603934e8c6a2803e", "score": "0.58963066", "text": "protected function uniquePaths()\n {\n return [\n $this->newPath(),\n $this->newPath('../pages.yaml'),\n $this->newPath('../../structures/pages.yaml'),\n ];\n }", "title": "" }, { "docid": "9d53e270eb627d75c40437f1015b37a5", "score": "0.5895587", "text": "function update_paths($dbh,$path,$new_path,$case_id) {\n\t$find_old_paths = $dbh->prepare('SELECT * FROM cm_documents WHERE folder = :old_path AND case_id = :case_id');\n\n\t$find_old_paths->bindParam(':old_path',$path);\n\n\t$find_old_paths->bindParam(':case_id',$case_id);\n\n\t$find_old_paths->execute();\n\n\t$paths = $find_old_paths->fetchAll(PDO::FETCH_ASSOC);\n\n\tforeach ($paths as $path_item) {\n\n\t\t$update_folders = $dbh->prepare(\"UPDATE cm_documents SET folder = '$new_path' WHERE id = '$path_item[id]'\");\n\n\t\t$update_folders->execute();\n\t}\n\n\t//change the containing folder for every folder which resides in the recently changed folder\n\n\t$find_old_containers = $dbh->prepare(\"SELECT * FROM cm_documents WHERE containing_folder LIKE :container AND case_id = $case_id\");\n\n\t$find_old_containers->bindParam(':container',$path);\n\n\t$find_old_containers->execute();\n\n\t$containers = $find_old_containers->fetchAll(PDO::FETCH_ASSOC);\n\n\tforeach ($containers as $container_item) {\n\n\t\t$pp = str_replace($path, '', $container_item['folder']);\n\n\t\t$new_subfolder_path = $new_path . $pp;\n\n\t\t$update_containers = $dbh->prepare(\"UPDATE cm_documents SET containing_folder = '$new_path', folder = '$new_subfolder_path' WHERE id = '$container_item[id]'\");\n\n\t\t$update_containers->execute();\n\t}\n\n\t//Now, find all documents and subfolders that are further down the tree\n\t//1. Update the folder field\n\t$find_folder_fields = $dbh->prepare(\"SELECT * FROM cm_documents WHERE folder LIKE '$path%' AND case_id = '$case_id'\");\n\n\t$find_folder_fields->execute();\n\n\t$folder_fields = $find_folder_fields->fetchAll(PDO::FETCH_ASSOC);\n\n\tforeach ($folder_fields as $folder_field) {\n\t\t//if the new path is not already in the folder field as a result of previous queries\n\t\tif (!stristr($folder_field['folder'],$new_path))\n\t\t{\n\t\t\t$descendants = str_replace($path, '', $folder_field['folder']);\n\n\t\t\t$new_folder_field = $new_path . $descendants;\n\n\t\t\t$update_folder_fields = $dbh->prepare(\"UPDATE cm_documents SET folder = '$new_folder_field' WHERE id = '$folder_field[id]'\");\n\n\t\t\t$update_folder_fields->execute();\n\t\t}\n\t}\n\n\t//2.update the container field\n\n\t$find_container_fields = $dbh->prepare(\"SELECT * FROM cm_documents WHERE containing_folder LIKE '$path%' AND case_id = '$case_id'\");\n\n\t$find_container_fields->execute();\n\n\t$container_fields = $find_container_fields->fetchAll(PDO::FETCH_ASSOC);\n\n\tforeach ($container_fields as $container_field) {\n\n\t\t//if the new path is not already in the container field as a result of previous queries\n\t\tif (!stristr($container_field['containing_folder'],$new_path)) {\n\t\t\t$descendants = str_replace($path, '', $container_field['containing_folder']);\n\n\t\t\t$new_container_field = $new_path . $descendants;\n\n\t\t\t$update_container_fields = $dbh->prepare(\"UPDATE cm_documents SET containing_folder = '$new_container_field' WHERE id = '$container_field[id]'\");\n\n\t\t\t$update_container_fields->execute();\n\t\t}\n\t}\n\n}", "title": "" }, { "docid": "404ccd492d005fb4527773bc1bbb5394", "score": "0.5886695", "text": "private function rebuildString(): void\n {\n $path = $this->isAbsolute() ? '/' : '';\n $path .= implode('/', $this->getElements());\n $path .= $this->isDirectory() ? '/' : '';\n if ('//' === $path) {\n $path = '/';\n }\n\n $this->pathString = $path;\n }", "title": "" }, { "docid": "6b8b115bbecce988f0b315f16eb70c57", "score": "0.585219", "text": "public function flushPaths()\n {\n $this->scheduledPaths = [];\n }", "title": "" }, { "docid": "33e1959c21b3758b05eb29a0f62e103b", "score": "0.5833421", "text": "public function setPaths(array $paths){}", "title": "" }, { "docid": "510a4efa022d1f2b5cd6d63ed0502dd4", "score": "0.5831299", "text": "private function initPaths()\n {\n $this->basePath = $this->getBasePath();\n $package = str_slug($this->package);\n $this->paths = [\n 'migrations' => [\n 'src' => $this->getSourcePath('database/migrations'),\n 'dest' => database_path('migrations'),\n ],\n 'factories' => [\n 'src' => $this->getSourcePath('database/factories'),\n 'dest' => database_path('factories'),\n ],\n 'seeds' => [\n 'src' => $this->getSourcePath('database/Seeds'),\n 'dest' => database_path('seeds'),\n ],\n 'config' => [\n 'src' => $this->getSourcePath('config'),\n 'dest' => config_path($package),\n ],\n 'views' => [\n 'src' => $this->getSourcePath('resources/views'),\n 'dest' => base_path('resources/views/vendor/'.$package),\n ],\n 'trans' => [\n 'src' => $this->getSourcePath('resources/lang'),\n 'dest' => base_path('resources/lang/vendor/'.$package),\n ],\n 'assets' => [\n 'src' => $this->getSourcePath('resources/assets'),\n 'dest' => public_path('vendor/'.$package),\n ],\n 'assets_ex' => [\n 'src' => $this->getSourcePath('resources/assets_ex'),\n 'dest' => public_path(),\n ],\n 'routes' => [\n 'src' => $this->getSourcePath('src/Http/routes.php'),\n 'dest' => null,\n ],\n ];\n return $this;\n }", "title": "" }, { "docid": "26c2d8f783c4617a9d30be4ee21d0bc5", "score": "0.57970613", "text": "private function _mockPath()\n {\n $categoryModelMock = $this->getModelMock('oggetto_news/category', array('getPath'));\n $categoryModelMock->expects($this->any())\n ->method('getPath')\n ->will($this->returnValue('1/2/3'));\n $this->replaceByMock('model', 'oggetto_news/category', $categoryModelMock);\n }", "title": "" }, { "docid": "95af7da97b086886d9f0b320251f9cce", "score": "0.5791396", "text": "public function setupPaths($path)\r\n {\r\n $this->path_project = realpath($path);\r\n $this->path_configphp = realpath($this->path_project.'/_config.php');\r\n $this->path_configyml = realpath($this->path_project.'/_config/config.yml');\r\n $this->path_root = realpath($this->path_project.'/..');\r\n $this->path_ssversion = realpath($this->path_project.'/../framework/')\r\n ? realpath($this->path_project.'/../framework/silverstripe_version')\r\n : realpath($this->path_project.'/../sapphire/silverstripe_version');\r\n $this->path_composer = realpath($this->path_root.'/composer.lock');\r\n }", "title": "" }, { "docid": "f180bd63c2e5e63d17b6d7556a455abd", "score": "0.57886815", "text": "function getPath();", "title": "" }, { "docid": "f180bd63c2e5e63d17b6d7556a455abd", "score": "0.57886815", "text": "function getPath();", "title": "" }, { "docid": "d13df82f8eb5f524fd3082e2b0bf22fd", "score": "0.5730657", "text": "public function test_verifies_paths_are_correct()\n\t{\t\n\t\t$path = NULL;\n\n\t\t// Set the ID to the specific node you want to test\n\t\t$id = 31;\n\n\t\t// Use the paper copy of the decision tree to set the path values to a node\n\t\t$paperPath = '1.1.0.1.0.1.0';\n\n\t\t$nodes = TracksController::$nodes;\n\t\tforeach($nodes as $key => $value){\n\t\t\tif($value['id'] === $id){\n\t\t\t\t$path = $value['path'];\n\t\t\t}\n\t\t}\n\t\t// If a node has multiple paths, search that array as well\n\t\tif(is_array($path)){\n\t\t\t$key = array_search($paperPath, $path);\n\t\t\t$path = isset($path[$key]) ? $path[$key] : '';\n\t\t}\n\n\t\t$this->assertTrue($path === $paperPath);\n\t}", "title": "" }, { "docid": "5db23f8f81db3d6474e317999dc389cb", "score": "0.5729358", "text": "public function path($path)\n {\n $this->paths = array_unique(array_merge($this->paths, [$path]));\n }", "title": "" }, { "docid": "a0e360381be46790c94ac6dff3aadaac", "score": "0.57270604", "text": "public function setPath($newPath);", "title": "" }, { "docid": "4d2306ce9a8a98cf1913f66b2871f036", "score": "0.57179904", "text": "protected function uniquePaths()\n {\n return [\n $this->newPath(),\n $this->blueprintPath(),\n $this->submissionsPath(),\n ];\n }", "title": "" }, { "docid": "29a9f8909ef108beb66fc5ffd049f8fa", "score": "0.5710641", "text": "private static function _incPath()\n {\n $inc = get_include_path();\n $new = realpath(dirname(__FILE__) . DIRECTORY_SEPARATOR . '..');\n\n // If we have a path, and our new directory is in it, we\n // have nothing to do.\n if (empty($inc))\n set_include_path($new);\n else if (!in_array($new, explode(PATH_SEPARATOR, $inc)))\n set_include_path($new . PATH_SEPARATOR . $inc);\n }", "title": "" }, { "docid": "5f15bf91b65c5ac3d4fbe5425dfd4de9", "score": "0.5668339", "text": "abstract public function getPath(): string;", "title": "" }, { "docid": "0b177c82dbd95e0c52f1147d34c348b9", "score": "0.5667806", "text": "function setPath($p){\n if(! isset($this->FOLDER) || $p != $this->FOLDER->getPath() && $p != '') {\n $this->FOLDER = new Folder($p);\n $this->PATH = $this->FOLDER->getPath();\n\n $this->setPics($this->FOLDER->getArrayOfPictures());\n }\n }", "title": "" }, { "docid": "34be06ef34c93cccae6c64f31a23b753", "score": "0.56519383", "text": "public function testPaths() {\n\t\t$result = App::paths();\n\t\t$this->assertArrayHasKey('Plugin', $result);\n\t\t$this->assertArrayHasKey('Controller', $result);\n\t\t$this->assertArrayHasKey('Controller/Component', $result);\n\t}", "title": "" }, { "docid": "de2ab675e7ec78eb71a97238fb5c4e0a", "score": "0.56494343", "text": "function checkPaths() {\n\tif(!file_exists(MODEL_PATH)) {\n\t\tmkdir(MODEL_PATH);\n\t}\n\tif(!file_exists(ENTITY_PATH)) {\n\t\tmkdir(ENTITY_PATH);\n\t}\n\tif(!file_exists(REPOSITORY_PATH)) {\n\t\tmkdir(REPOSITORY_PATH);\n\t}\n}", "title": "" }, { "docid": "9738a0f6107bf43925bed39b0fab1c7c", "score": "0.564134", "text": "private function pathExists() {\n\t\t\n\t}", "title": "" }, { "docid": "fe914490b89f7d69c5f62ff7a787dff5", "score": "0.5624667", "text": "public static function initPaths ()\n {\n if (false === self::$_isInitPaths) {\n defined('APPLICATION_PATH')\n or define('APPLICATION_PATH', realpath(dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..'));\n defined('CONFIGS_PATH')\n or define('CONFIGS_PATH', APPLICATION_PATH . DIRECTORY_SEPARATOR . 'configs');\n\t\t\t/*\n\t\t\tdefined('LIBRARY_PATH')\n or define('LIBRARY_PATH', APPLICATION_PATH . DIRECTORY_SEPARATOR . 'library');\n defined('VENDORS_PATH')\n or define('VENDORS_PATH', LIBRARY_PATH . DIRECTORY_SEPARATOR . 'vendors');\n\t\t\t */\n set_include_path(\n APPLICATION_PATH\n /*. PATH_SEPARATOR . LIBRARY_PATH\n . PATH_SEPARATOR . VENDORS_PATH\n\t\t\t\t. PATH_SEPARATOR . APPLICATION_PATH . DIRECTORY_SEPARATOR . 'helpers'*/\n . PATH_SEPARATOR . get_include_path()\n );\n\n self::$_isInitPaths = true;\n }\n }", "title": "" }, { "docid": "4ec8ddb7bebd9482cf7f32283f9f9e13", "score": "0.561378", "text": "private function setFolderPaths()\n {\n $descendant = $this->id;\n\n $ancestor = $this->parent_id ? $this->parent_id : $descendant;\n\n $statement = $this->conn->prepare('\n INSERT INTO paths (ancestor_id, descendant_id, depth)\n SELECT ancestor_id, ?, depth+1\n FROM paths\n WHERE descendant_id = ?\n UNION ALL SELECT ?, ?, 0\n ');\n $statement->execute([$descendant, $ancestor, $descendant, $descendant]);\n }", "title": "" }, { "docid": "55abf05367c5958e2d01a28ce7f85ad3", "score": "0.56128204", "text": "function has_path() {\n return TRUE;\n }", "title": "" }, { "docid": "9b0fe3082f4113a7df43d80c38bb6842", "score": "0.561256", "text": "private function useCustomPaths(): void\n {\n foreach ($this->config->get('paths', []) as $key => $path) {\n $isApp = $key == 'path';\n $key = $isApp ? $key : 'path.' . $key;\n $path = realpath($this->app->basePath() . '/' . $path);\n if ($isApp) {\n $this->app->useAppPath($path);\n } else {\n $this->app->setPath($key, $path);\n }\n }\n }", "title": "" }, { "docid": "04797b6866ae8bb1a1ac331ff5a6af6e", "score": "0.56000227", "text": "function has_path() { return FALSE; }", "title": "" }, { "docid": "a8b142edbf7b0b96f66c76fae5071d9a", "score": "0.55636734", "text": "protected function bindPathsInContainer()\n {\n $this->instance('path', $this->basePath());\n $this->instance('path.base', $this->basePath());\n $this->instance('path.lang', $this->langPath());\n $this->instance('path.config', $this->configPath());\n $this->instance('path.storage', $this->storagePath());\n $this->instance('path.resources', $this->resourcePath());\n $this->instance('path.bootstrap', $this->bootstrapPath());\n }", "title": "" }, { "docid": "e6b4da03e23f2479a7ad89669961b1a3", "score": "0.55622697", "text": "public function createPath()\n {\n }", "title": "" }, { "docid": "65cf56b314e8912d02fb1a054e6786a7", "score": "0.5558294", "text": "public static function setPath ($path)\n\t{\n\t\tself::$paths = array ();\n\t\tself::$pathpriorities = array ();\n\n\t\tself::addPath ($path, '', 0);\n\t}", "title": "" }, { "docid": "4413e94d8d6c194f3625499bc337410c", "score": "0.55560476", "text": "public function setPaths($name=null,$path=null)\r\n {\r\n // save the globally identified paths to\r\n // the global container object of the resta.\r\n if($name!==null && $path!==null && file_exists($path)){\r\n $this->register('paths',$name,$path);\r\n }\r\n }", "title": "" }, { "docid": "ec758cfe9321db4ac4ebf3e3e353d5e6", "score": "0.5555209", "text": "public function setPath(array $path){}", "title": "" }, { "docid": "ec758cfe9321db4ac4ebf3e3e353d5e6", "score": "0.5555209", "text": "public function setPath(array $path){}", "title": "" }, { "docid": "6e27fffa8ef57672f5ca0dcba61f9b49", "score": "0.5545783", "text": "public function savePath()\n {\n\n $orm = $this->getOrm();\n $orm->save($this->entityBuizSecurityPath);\n\n }", "title": "" }, { "docid": "bb9351c870f236d7bede3351b46f4c19", "score": "0.55448246", "text": "public function getPaths();", "title": "" }, { "docid": "aabbfb9f4936be2d66d98c0ceeb69923", "score": "0.55366546", "text": "protected function addViewPaths()\n {\n foreach ($this->viewPaths as $viewPath) {\n $this->addViewPath($viewPath);\n }\n }", "title": "" }, { "docid": "95475ba0516d4e581beb15d9147fc11d", "score": "0.55321497", "text": "public function getPaths(): array;", "title": "" }, { "docid": "95475ba0516d4e581beb15d9147fc11d", "score": "0.55321497", "text": "public function getPaths(): array;", "title": "" }, { "docid": "bcf82996a1f6079339c946cfadeb0d2e", "score": "0.5527793", "text": "public function setViewPaths() {\n $this->setVar('TEMPLATES_URL', $this->config->website->params->url . TEMPLATES_DIR);\n $this->setVar('IMAGES_URL', $this->config->website->params->url . IMAGES_DIR . '/' . $this->requestModule);\n $this->setVar('SITE_URL', $this->config->website->params->url);\n }", "title": "" }, { "docid": "08bdaf5833434bebaa2667b70385ccb9", "score": "0.5511078", "text": "protected function setSitePaths()\n\t{\n\t\t/** Base URLs for Site and Application */\n\t\tServices::Registry()->set('Configuration', 'site_base_url', BASE_URL);\n\t\t$path = Services::Registry()->get('Configuration', 'application_path', '');\n\t\tServices::Registry()->set('Configuration', 'application_base_url', BASE_URL . $path);\n\n\t\tif (defined('SITE_NAME')) {\n\t\t} else {\n\t\t\tdefine('SITE_NAME',\n\t\t\tServices::Registry()->get('Configuration', 'site_name', SITE_ID));\n\t\t}\n\n\t\tif (defined('SITE_CACHE_FOLDER')) {\n\t\t} else {\n\t\t\tdefine('SITE_CACHE_FOLDER', SITE_BASE_PATH\n\t\t\t\t. '/' . Services::Registry()->get('Configuration', 'system_cache_folder', 'cache'));\n\t\t}\n\t\tif (defined('SITE_LOGS_FOLDER')) {\n\t\t} else {\n\n\t\t\tdefine('SITE_LOGS_FOLDER', SITE_BASE_PATH\n\t\t\t\t. '/' . Services::Registry()->get('Configuration', 'system_logs_folder', 'logs'));\n\t\t}\n\n\t\t/** following must be within the web document folder */\n\t\tif (defined('SITE_MEDIA_FOLDER')) {\n\t\t} else {\n\t\t\tdefine('SITE_MEDIA_FOLDER', SITE_BASE_PATH\n\t\t\t\t. '/' . Services::Registry()->get('Configuration', 'system_media_folder', 'media'));\n\t\t}\n\t\tif (defined('SITE_MEDIA_URL')) {\n\t\t} else {\n\t\t\tdefine('SITE_MEDIA_URL', SITE_BASE_URL_RESOURCES\n\t\t\t\t. '/' . Services::Registry()->get('Configuration', 'system_media_url', 'media'));\n\t\t}\n\n\t\t/** following must be within the web document folder */\n\t\tif (defined('SITE_TEMP_FOLDER')) {\n\t\t} else {\n\t\t\tdefine('SITE_TEMP_FOLDER', SITE_BASE_PATH\n\t\t\t\t. '/' . Services::Registry()->get('Configuration', 'system_temp_folder', SITE_BASE_PATH . '/temp'));\n\t\t}\n\t\tif (defined('SITE_TEMP_URL')) {\n\t\t} else {\n\t\t\tdefine('SITE_TEMP_URL', SITE_BASE_URL_RESOURCES\n\t\t\t\t. '/' . Services::Registry()->get('Configuration', 'system_temp_url', 'temp'));\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "610f06ba9e8a6e39c6744cbe69cb24e3", "score": "0.5511069", "text": "public function testSetPath() {\n $testPath = sprintf('/tmp/%s', uniqid('unit_test_path_'));\n $this->path->setPath($testPath);\n $this->assertEquals($testPath, $this->path->getPath());\n }", "title": "" }, { "docid": "43fd286ffbd3e341a5a1ba587f8c7f5d", "score": "0.55089736", "text": "function set_path_variables() {\n global $ConfSitePATH, $ConfSiteBase, $ConfSiteSuffix;\n if (!@$ConfSitePATH) {\n $ConfSitePATH = substr(__FILE__, 0, strrpos(__FILE__, \"/\"));\n while ($ConfSitePATH !== \"\" && !file_exists(\"$ConfSitePATH/src/init.php\"))\n $ConfSitePATH = substr($ConfSitePATH, 0, strrpos($ConfSitePATH, \"/\"));\n if ($ConfSitePATH === \"\")\n $ConfSitePATH = \"/var/www/html\";\n }\n require_once(\"$ConfSitePATH/lib/navigation.php\");\n if (@$ConfSiteBase === null)\n $ConfSiteBase = Navigation::siteurl();\n if (@$ConfSiteSuffix === null)\n $ConfSiteSuffix = Navigation::php_suffix();\n}", "title": "" }, { "docid": "17d74d92003d0f03692187a3e9854501", "score": "0.5506173", "text": "public function updateAssets(){\n $globalRevision = $this->_getGlobalRevision($this->_config->path);\n $versions = $this->_getRevisions($this->_config->path);\n\n // to keep version maps updated their version set to global revision\n $versions[$this->_config->path_versions_games] = $globalRevision;\n $versions[$this->_config->path_versions_www_games] = $globalRevision;\n\n // save versions map\n $pathVersions = $this->appRoot . $this->_config->path_versions_games;\n $this->_saveVersions($versions, $pathVersions);\n\n // save games versions map\n $pathVersionsAssets = $this->appRoot . $this->_config->path_versions_www_games;\n $this->_saveVersions($versions, $pathVersionsAssets, $this->_config->template_games);\n }", "title": "" }, { "docid": "3a6c0d9f50d5618af3f44a43fe844ed8", "score": "0.54940695", "text": "protected function getPath($path) {\n $this->dir = $path . '/programista.it-cache';\n $this->path = $this->dir . '/' . $this->id;\n }", "title": "" }, { "docid": "4893deebf1aa469ad68ef5adc7baedbd", "score": "0.54811233", "text": "private function setPath( $path ){\n $path = (string) $path;\n if( $fixed = self::abs($path) ){\n $path = $fixed;\n $this->rel = false;\n }\n else {\n $this->rel = true;\n }\n if( $path !== $this->path ){\n $this->path = $path;\n $this->info = null;\n }\n return $path;\n }", "title": "" }, { "docid": "a852c450041a796043b84c69a57e6969", "score": "0.5471507", "text": "protected function bindPathsInContainer()\n {\n $this->instance('path', $this->path());\n }", "title": "" }, { "docid": "e869dfea5554f3a72b19d79d2f684557", "score": "0.5460223", "text": "public function ensureDirectories() {\n $moduleId = $this->module->id;\n return [\n \"/$moduleId/framework/cache\",\n \"/$moduleId/framework/sessions\",\n \"/$moduleId/framework/views\",\n \"/$moduleId/logs\",\n \"/$moduleId/bootstrap\",\n \"/$moduleId/bootstrap/cache\" \n ];\n }", "title": "" }, { "docid": "2f4d701b3a0309addc20401ee409de1e", "score": "0.5454515", "text": "private function _initViewPaths()\n {\n $this->_view->addPath($this->_viewsDir.'layouts');\n $this->_view->addPath($this->_viewsDir.'shared');\n $this->_view->addPath($this->_viewsDir.$this->_shortName);\n }", "title": "" }, { "docid": "de507218d803edaa0dcb444607c3f4ae", "score": "0.54472095", "text": "public function affectedPaths()\n {\n return [$this->userGroup->yamlPath()];\n }", "title": "" }, { "docid": "6675b407e7f5b02fde9fe01bd83af317", "score": "0.5441674", "text": "function getPath(){\n return $this->PATH;\n }", "title": "" }, { "docid": "c923b2dc6d932db1b7d7bfddb9f562e3", "score": "0.54382384", "text": "public function path();", "title": "" }, { "docid": "c923b2dc6d932db1b7d7bfddb9f562e3", "score": "0.54382384", "text": "public function path();", "title": "" }, { "docid": "73dcb9370db11800231c7b41820d1c18", "score": "0.54372585", "text": "function beforeSave(){\n\t\tif((strpos($this['path'], \"http\") === 0) OR (strpos($this['path'], \"https\") === 0) OR (strpos($this['path'], \"#\") === 0)OR (strpos($this['path'], \"/\") === 0)){\n\t\t\treturn;\n\t\t\t// do nothing\n\t\t}\n\n\t\tif(!$this['order']) $this['order']=0;\n\n\t\t// check for same entry or not\n\t\t$this['path'] = str_replace(\".html\", \"\", $this['path']);\n\n\t\t$new_path = $this['path'];\n\t\t$temp_array = explode(\".\", $new_path);\n\t\tif(strtolower(trim(end($temp_array))) != \"html\"){\n\t\t\t$new_path .= \".html\";\n\t\t}\n\t\t\n\t\t$old_webpage = $this->add('xepan\\cms\\Model_Webpage');\n\t\t$old_webpage->addCondition('path',$new_path);\n\t\tif($this['is_template'])\n\t\t\t$old_webpage->addCondition('is_template',1);\n\t\telse\n\t\t\t$old_webpage->addCondition([['is_template',0],['is_template',null]]);\n\n\t\t$old_webpage->addCondition('id','<>', $this->id);\n\t\t\n\t\t$old_webpage->tryLoadAny();\n\t\tif($old_webpage->loaded()){\n\t\t\tthrow $this->exception('file already exist on this path, change the path','ValidityCheck')->setField('path');\n\t\t}\n\n\t\t// creating file System\n\t\t$path = $this->api->pathfinder->base_location->base_path.'/websites/'.$this->app->current_website_name.\"/www\";\n\t\tif($this['is_template']){\n\t\t\t$path .= \"/layout\";\n\t\t}\n\n\t\t$path_array = explode(\"/\", $this['path']);\n\t\t$count = count($path_array);\n\n\t\t$original_name=\"\";\n\t\t//for loop check folder or file exist or not\n\t\tfor ($i=0; $i < $count ; $i++) {\n\t\t\t$name = trim($path_array[$i]);\n\t\t\t$name = $this->app->normalizeName($name,'-');\n\n\t\t\tif(!strlen($name)){\n\t\t\t\tthrow $this->exception('wrong path file name must define','ValidityCheck')->setField('path');\n\t\t\t}\n\t\t\t\n\t\t\t//check if count is last for file\n\t\t\tif($count == ($i+1)){\n\t\t\t\t$temp_array = explode(\".\", $name);\n\t\t\t\tif(strtolower(trim(end($temp_array))) != \"html\"){\n\t\t\t\t\t$name .= \".html\";\n\t\t\t\t}\n\n\t\t\t\t$path .= \"/\".$name;\n\t\t\t\tif(!file_exists($path)){\n\t\t\t\t\t$file = \\Nette\\Utils\\FileSystem::write($path,\" \");\n\t\t \t\t}\n\n\t\t\t\t$original_name .= $name;\n\t\t\t}else{\n\t\t\t\t// for creation of folder\n\t\t\t\t$path .= \"/\".$name;\n\t\t\t\tif(!file_exists($path)){\n\t\t\t\t\t$folder = \\Nette\\Utils\\FileSystem::createDir($path);\n\t\t \t\t}\n\n\t\t\t\t$original_name .= $name.\"/\";\n\t\t\t}\n\n\t\t}\n\n\t\t$this['path'] = $original_name;\n\t}", "title": "" }, { "docid": "3efc5163e9f0157d7f04f14dae42e341", "score": "0.543594", "text": "private function set($path) { $this->_path = $this->clean($path); }", "title": "" }, { "docid": "b4be5d12b43989b361df708a714e8d50", "score": "0.54289216", "text": "public function getPath(){}", "title": "" }, { "docid": "b4be5d12b43989b361df708a714e8d50", "score": "0.54289216", "text": "public function getPath(){}", "title": "" }, { "docid": "9870f5046c755f9ffc2604598059d9fb", "score": "0.5420814", "text": "public static function enableFullPath() {\n\t\tself::$_fullPathEnabled = true;\n\t}", "title": "" }, { "docid": "d27df174eba8ed852dd68d7341e4906b", "score": "0.5419394", "text": "public function getNewPath() {\n return $this->newPath;\n }", "title": "" }, { "docid": "af4a4550069c4dfa27298f97d132959c", "score": "0.5408435", "text": "protected function getPath(){\n\t\treturn self::PATH;\n\t}", "title": "" }, { "docid": "e1544b18527ad01e44420841fc7615e8", "score": "0.5405593", "text": "function edan_record_admin_pathauto_bulk_update_batch_process(&$context) {\n // We are using Pathauto to store the pattern we want to use, but the actual path data comes from EDAN.\n\n // But, we do want to rebuild the menus:\n menu_rebuild();\n\n}", "title": "" }, { "docid": "b868ab96dfcec73289a961efaeb8b05b", "score": "0.54010123", "text": "public function testFoldersUpdate()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "6cbc213fbcb93aa14c10c430aba0ad62", "score": "0.53971666", "text": "public function refresh() \r\n {\r\n $this->setPropertiesToDirectory($this->fullName());\r\n $this->directories = array();\r\n $this->files = array();\r\n $this->parent = null;\r\n }", "title": "" }, { "docid": "7d9208d19b9b24da08dabc8b9cccd2cc", "score": "0.5396422", "text": "private function updateFullUrl(): void\n {\n $this->url = $this->root() . $this->relative();\n }", "title": "" }, { "docid": "c5ee2100b2f24096d862e23bfce3b1a5", "score": "0.53946173", "text": "public function testUpdateLocation()\n {\n }", "title": "" }, { "docid": "79c6cc8f39e5e5a897d22a784bb4d3a8", "score": "0.53906596", "text": "public static function getPaths() {\n\t\treturn ['create', 'import', 'logout'];\n\t}", "title": "" }, { "docid": "61dca08ee99778f75510bf6a82b6b365", "score": "0.53828806", "text": "public function changePath($path)\n\t{\n\t\t$this->path = $path;\n\t}", "title": "" }, { "docid": "e92b490248d58e47ccc3805349362270", "score": "0.5375197", "text": "public function setFullPath($new_path)\n\t{\n\t\t$this->full_path = $new_path;\n\t\t$this->is_saved = false;\n\t}", "title": "" }, { "docid": "4968d8a1df4631e46cf254bc88c0e61f", "score": "0.5370957", "text": "private function setDefaultPaths(): void\n {\n if (empty($this->viewPaths)) {\n $this->viewPaths = [sprintf('%1$s/views/', dirname(__DIR__, 2))];\n }\n }", "title": "" }, { "docid": "f200cf4152ca6d1031708834adf1293a", "score": "0.53647566", "text": "function paths_options() {\r\n include('paths.html');\t\r\n\t\t}", "title": "" }, { "docid": "e96a5afee461f69c961084067685a0c0", "score": "0.5356606", "text": "function ew_WritePaths() {\n\techo 'DOCUMENT_ROOT=' . ew_ServerVar(\"DOCUMENT_ROOT\") . \"<br>\";\n\techo 'EW_ROOT_RELATIVE_PATH=' . EW_ROOT_RELATIVE_PATH . \"<br>\";\n\techo 'ew_AppRoot()=' . ew_AppRoot() . \"<br>\";\n\techo 'realpath(\".\")=' . realpath(\".\") . \"<br>\";\n\techo '__FILE__=' . __FILE__ . \"<br>\";\n}", "title": "" }, { "docid": "433f5e1c5733dbc5096ad384bbab7be0", "score": "0.5352167", "text": "private function setBasePath() {\n\t\t$this->getSection('paths')->getParamSet()->addParam(\n\t\t\tnew systemConfigParam(\n\t\t\t\t'base',\n\t\t\t\tutilityStringFunction::cleanDirSlashes(dirname(dirname(dirname(dirname(__FILE__))))),\n\t\t\t\ttrue\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "8bbf66976c62ad058a48c944b34b8a63", "score": "0.53519195", "text": "public function iAmInThePath($path)\n {\n $this->moveToNewPath($path);\n }", "title": "" }, { "docid": "f1d1d01f77e0fc3ecd2b34fdb35535d5", "score": "0.5350515", "text": "public function load_path();", "title": "" }, { "docid": "3d81145cabfa854aacf4c9b35462a033", "score": "0.5347365", "text": "function setExcludePaths($newPaths, $oldPaths, $writeToFile = false)\n{\n if (false != $writeToFile && file_exists($writeToFile)) {\n $content = file($writeToFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);\n foreach ($content as $lineNum => $line) {\n $newKey = array_search($line, $newPaths);\n if (false !== $newKey) {\n unset($newPaths[$newKey]);\n }\n\n $oldKey = array_search($line, $oldPaths);\n if (false !== $oldKey) {\n unset($content[$lineNum]);\n }\n }\n $content = array_merge($content, $newPaths);\n formatContent($content);\n file_put_contents($writeToFile, $content);\n }\n formatContent($newPaths);\n// file_put_contents(getcwd() . DIRECTORY_SEPARATOR . 'exclude.log', $newPaths);\n}", "title": "" }, { "docid": "e29c1f29ec4b4fe9c76647a6ee81d6be", "score": "0.533784", "text": "public function testSetPath() {\n\n $obj = new RgProfils();\n\n $obj->setPath(\"path\");\n $this->assertEquals(\"path\", $obj->getPath());\n }", "title": "" }, { "docid": "c033ad93068991174c61f0026b55cf3d", "score": "0.53371", "text": "private function setHelpersPath() {\n\t\t$ns = array (\n\t\t\t\t'Model\\\\' => \\Core\\Base\\Front::_dirname ( $this->getModuleDirectory () ) . '\\Model\\\\',\n\t\t\t\t'Helper\\\\' => \\Core\\Base\\Front::_dirname ( $this->getModuleDirectory () ) . '\\Helper\\\\',\n\t\t\t\t'Plugin\\\\' => \\Core\\Base\\Front::_dirname ( $this->getModuleDirectory () ) . '\\Plugin\\\\',\n\t\t\t\t'Widget\\\\' => \\Core\\Base\\Front::_dirname ( $this->getModuleDirectory () ) . '\\Widget\\\\' \n\t\t);\n\t\tforeach ( $ns as $namespace => $path ) {\n\t\t\t$glob = glob ( $path . '*' );\n\t\t\tif ($glob) {\n\t\t\t\tforeach ( $glob as $p ) {\n\t\t\t\t\tif (is_dir ( $p )) {\n\t\t\t\t\t\t$bnam = basename ( $p );\n\t\t\t\t\t\t$ns [$this->formatModuleName ( $namespace . '_' . $bnam )] = $path . $this->formatModuleName ( $bnam ) . DIRECTORY_SEPARATOR;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\\Core\\Loader\\Autoloader::getInstance ()->registerNamespace ( $ns );\n\t}", "title": "" }, { "docid": "bf0acfc8d3aecb08cdee01e8e99d6a5f", "score": "0.5333547", "text": "function _paths($plugin = null, $cached = true) {\n\t\t$paths = $this->__paths($plugin, $cached);\n\n\t\tif (!empty($this->theme)) {\n\t\t\t$count = count($paths);\n\t\t\tfor ($i = 0; $i < $count; $i++) {\n\t\t\t\t// >>> CUSTOMIZE MODIFY 2011/03/24 ryuring\n\t\t\t\t// プラグインパスにテーマのパスを追加した為、\n\t\t\t\t// テーマのパスをさらにテーマのパスに整形しないように調整\n\t\t\t\t//$themePaths[] = $paths[$i] . 'themed'. DS . $this->theme . DS;\n\t\t\t\t// ---\n\t\t\t\tif(strpos($paths[$i],'themed') === false) {\n\t\t\t\t\t$themePaths[] = $paths[$i] . 'themed'. DS . $this->theme . DS;\n\t\t\t\t}\n\t\t\t\t// <<<\n\t\t\t}\n\t\t\t$paths = array_merge($themePaths, $paths);\n\t\t}\n\n\t\tif (empty($this->__paths)) {\n\t\t\t$this->__paths = $paths;\n\t\t}\n\n\t\treturn $paths;\n\t}", "title": "" }, { "docid": "01c8770e9413e9cd04a3e448de239336", "score": "0.53297156", "text": "static function _pathinate($p,$b = API_BASE) { return realpath($b . '/' . $p); }", "title": "" }, { "docid": "167b3cea51057f5f8645df4f1473881c", "score": "0.5327423", "text": "public function setOldPath($oldPath);", "title": "" }, { "docid": "93a12226ab22b430d28899a368a2956e", "score": "0.53268623", "text": "public function updateG(){\n $globalVersion = $this->_getGlobalRevision($this->_config->path);\n $versions = $this->_getRevisions($this->_config->path);\n\n // to keep version maps updated their version set to global revision\n $versions[$this->_config->path_versions] = $globalVersion;\n $versions[$this->_config->path_versions_www] = $globalVersion;\n\n // get www public files versions\n $versionsWww = $this->_filterWww($versions);\n\n // save versions map\n $pathVersions = $this->appRoot . $this->_config->path_versions;\n $this->_saveVersions($versions, $pathVersions);\n\n // save www versions map\n $pathVersionsWww = $this->appRoot . $this->_config->path_versions_www;\n $this->_saveVersions($versionsWww, $pathVersionsWww, $this->_config->template);\n }", "title": "" }, { "docid": "f630e4aec7e91c5099f7f4a86d8501a9", "score": "0.53248984", "text": "private function buildPath()\n {\n $this->_builtPath = '/' . PathHelper::normalizePath($this->baseDir . DIRECTORY_SEPARATOR . trim\n ($this->directory, '/') . DIRECTORY_SEPARATOR . trim($this->name, \"/\"));\n }", "title": "" }, { "docid": "09660b605d0eb74dddde06593d5d0b67", "score": "0.531967", "text": "public function testGetPath() {\n $this->assertEquals($this->testPath, $this->path->getPath());\n }", "title": "" }, { "docid": "9b6663b17021afdc6efd6f1f6449a26e", "score": "0.53148675", "text": "public function get_paths()\n\t{\n\t\treturn $this->paths;\n\t}", "title": "" }, { "docid": "1560ccfd74faaac6f389f942318c7cb7", "score": "0.5313324", "text": "protected function routeUpdate()\n {\n }", "title": "" } ]
5ce81354e7eae85f1c8de8133203f414
Set up the setting for aggregated multidimensional values. When a multidimensional setting gets aggregated, all of its preview and update calls get combined into one call, greatly improving performance.
[ { "docid": "e65be66ced665891bb0116fff783e74d", "score": "0.8098138", "text": "protected function aggregate_multidimensional() {\n\t\t$id_base = $this->id_data['base'];\n\t\tif ( ! isset( self::$aggregated_multidimensionals[ $this->type ] ) ) {\n\t\t\tself::$aggregated_multidimensionals[ $this->type ] = array();\n\t\t}\n\t\tif ( ! isset( self::$aggregated_multidimensionals[ $this->type ][ $id_base ] ) ) {\n\t\t\tself::$aggregated_multidimensionals[ $this->type ][ $id_base ] = array(\n\t\t\t\t'previewed_instances' => array(), // Calling preview() will add the $setting to the array.\n\t\t\t\t'preview_applied_instances' => array(), // Flags for which settings have had their values applied.\n\t\t\t\t'root_value' => $this->get_root_value( array() ), // Root value for initial state, manipulated by preview and update calls.\n\t\t\t);\n\t\t}\n\n\t\tif ( ! empty( $this->id_data['keys'] ) ) {\n\t\t\t// Note the preview-applied flag is cleared at priority 9 to ensure it is cleared before a deferred-preview runs.\n\t\t\tadd_action( \"customize_post_value_set_{$this->id}\", array( $this, '_clear_aggregated_multidimensional_preview_applied_flag' ), 9 );\n\t\t\t$this->is_multidimensional_aggregated = true;\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "2eccedf006f0d5a379a39827aeaf7120", "score": "0.57341766", "text": "public function setDynamicDataBuilderSetting(){\n \n $this->ddbconfigTable = \"config_master\";\n $this->measuresSelectionTable = \"measures_selection\";\n $this->outputColumnsTable = \"output_columns\";\n $this->timeSelectionTable = \"time_selection\";\n $this->filterSettingTable = \"filter_setting\";\n\n $this->timeSelectionUnit \t= \"days\";\n \n $this->outputDateOptions = array(\n\t\t\tarray(\"id\" => \"MYDATE\", \"value\" => \"My Date\", \"selected\" => true)/* ,\n\t\t\tarray(\"id\" => \"YEAR\", \"value\" => \"Year\", \"selected\" => false),\n\t\t\tarray(\"id\" => \"WEEK\", \"value\" => \"Week\", \"selected\" => false),\n\t\t\tarray(\"id\" => \"PERIOD\", \"value\" => \"WM Week\", \"selected\" => false) */\n\t\t);\n\n // measure selection list\n $this->pageArray[\"MEASURE_SELECTION_LIST\"] = array(\n array('measureID' => 1, 'jsonKey'=>'VALUE', 'measureName' => 'VALUE', 'selected'=>true),\n array('measureID' => 2, 'jsonKey'=>'VOLUME', 'measureName' => 'VOLUME', 'selected'=>true),\n array('measureID' => 3, 'jsonKey'=>'PRICE', 'measureName' => 'AVE PRICE', 'selected'=>false)\n );\n \n\t\t$this->dataArray['WEEK']['TYPE'] = \"T\";\n\t\t$this->dataArray['YEAR']['TYPE'] = \"T\";\n\n\t\t$this->dataArray['MYDATE']['NAME'] = $this->maintable.\".mydate\";\n\t\t$this->dataArray['MYDATE']['NAME_ALIASE'] = 'MYDATE';\n\t\t$this->dataArray['MYDATE']['TYPE'] = \"T\";\n \n\t\t$this->dataArray['PERIOD']['NAME'] = $this->maintable.\".period\";\n\t\t$this->dataArray['PERIOD']['NAME_ALIASE'] = 'WMWEEK';\n\t\t$this->dataArray['PERIOD']['TYPE'] = \"T\";\n\n $this->measureArray['M3']['VAL'] = \"(SUM(IFNULL(\".$this->ProjectValue.\",0))/SUM(IFNULL(\".$this->ProjectVolume.\",1)))\";\n $this->measureArray['M3']['ALIASE'] = \"PRICE\";\n $this->measureArray['M3']['attr'] = \"PRICE\";\n $this->measureArray['M3']['dataDecimalPlaces'] = 2;\n \n //SET FILTER PAGES\n $this->filterPages = array(\n array(\"filterHeader\" => \"Time Selection\", \"outputColumnHeader\" => \"\", \"templateName\" => 'views/filter/timeSelection.html', \"isDynamic\" => false, \"step\" => 1, \"isVisible\" => true),\n array(\"filterHeader\" => \"Product Selection\", \"outputColumnHeader\" => \"Product Options\", \"templateName\" => 'views/filter/filter.html', \"isDynamic\" => true, \"step\" => 2, \"isVisible\" => true, \"tabsConfiguration\" => array(), \"config\" => array(\n \"table_name\" => $this->skutable,\n \"helper_table\" => $this->productHelperTables,\n \"setting_name\" => \"product_settings\",\n \"helper_link\" => $this->productHelperLink,\n \"type\" => \"P\",\n \"enable_setting_name\" => \"has_product_filter\"\n )\n ),\n array(\"filterHeader\" => \"KDR Selection\", \"outputColumnHeader\" => \"KDR Options\", \"templateName\" => 'views/filter/filter.html', \"isDynamic\" => true, \"step\" => 3, \"isVisible\" => true, \"tabsConfiguration\" => array(), \"config\" => array(\n \"table_name\" => $this->skulisttable,\n \"helper_table\" => $this->skulisttable,\n \"setting_name\" => \"kdr_settings\",\n \"helper_link\" => $this->skuListHelperLink,\n \"type\" => \"K\",\n \"enable_setting_name\" => \"has_kdr\"\n )\n ),\n array(\"filterHeader\" => \"Market Selection\", \"outputColumnHeader\" => \"Market Options\", \"templateName\" => 'views/filter/filter.html', \"isDynamic\" => true, \"step\" => 4, \"isVisible\" => true, \"tabsConfiguration\" => array(), \"config\" => array(\n \"table_name\" => $this->storetable,\n \"helper_table\" => $this->geoHelperTables,\n \"setting_name\" => \"market_settings\",\n \"helper_link\" => $this->geoHelperLink,\n \"type\" => \"M\",\n \"enable_setting_name\" => \"has_market_filter\"\n )\n ),\n array(\"filterHeader\" => \"Territory Selection\", \"outputColumnHeader\" => \"Territory Options\", \"templateName\" => 'views/filter/filter.html', \"isDynamic\" => true, \"step\" => 5, \"isVisible\" => true, \"tabsConfiguration\" => array(), \"config\" => array(\n \"table_name\" => $this->territorytable,\n \"helper_table\" => $this->territoryHelperTables,\n \"setting_name\" => \"territory_settings\",\n \"helper_link\" => $this->territoryHelperLink,\n \"type\" => \"T\",\n \"enable_setting_name\" => \"has_territory\"\n )\n ),\n array(\"filterHeader\" => \"Account Selection\", \"outputColumnHeader\" => \"Account Options\", \"templateName\" => 'views/filter/filter.html', \"isDynamic\" => true, \"step\" => 6, \"isVisible\" => true, \"tabsConfiguration\" => array(), \"config\" => array( \n \"table_name\" => $this->fgroupTable, \n \"helper_table\" => $this->fgroupTable,\n \"setting_name\" => \"account_settings\", \n \"helper_link\" => $this->fgroupTableHelperLink, \n \"type\" => \"A\",\n \"enable_setting_name\" => \"has_account\" \n )\n ),\n array(\"filterHeader\" => \"Measures Selection\", \"outputColumnHeader\" => \"\", \"templateName\" => 'views/filter/measureSelection.html', \"isDynamic\" => false, \"step\" => 7, \"isVisible\" => true),\n array(\"filterHeader\" => \"Output Selection\", \"outputColumnHeader\" => \"\", \"templateName\" => 'views/filter/outputColumn.html', \"isDynamic\" => false, \"step\" => 8, \"isVisible\" => true)\n );\n }", "title": "" }, { "docid": "6a4b6a25c2d6d283053b2a4c5de8bd13", "score": "0.5719348", "text": "private function setAggregationData ()\n {\n $sql = 'SELECT ' . $this->aggregation_operator . '(' . $this->aggregation_column . ')' . ' as \\'' . str_replace('`', '', $this->aggregation_column) . '\\' FROM ' . $this->sql['tables'] . ' WHERE ' . $this->sql['joins'];\n\n if ( $this->query )\n $sql .= ' and (' . $this->query . ')';\n\n $sql .= $this->deletedQuery();\n\n $this->data = DB::select(DB::raw($sql));\n }", "title": "" }, { "docid": "731c4d450aea7a24e741b4323d0ea37e", "score": "0.55558604", "text": "function setCubeByDimensions($themeid, $cubeDimensions, $units, $rootSetId){\n //return an assoc array with cube name and id\n global $db;\n if(count($cubeDimensions)==0) return false; //don't insert cube for \"totals\"\n //1. insert / update the cubedim records\n $cubeDimIds = [\"null\", \"null\", \"null\"];\n $dimNames = [];\n foreach($cubeDimensions as $i => &$cubeDimension){\n $dimName = $cubeDimension[\"dimension\"];\n $dimNames[] = $dimName;\n $sql = \"select dimid from cubedims where themeid=$themeid and dimkey='$dimName'\";\n $result = runQuery($sql, \"cubeDim search\");\n if($result->num_rows==0){\n $list = [];\n foreach($cubeDimension[\"list\"] as $j=>&$item){\n if(!isset($item[\"sumWithNext\"])){\n $list[] = isset($item[\"short\"]) ? $item[\"short\"] : $item[\"name\"];\n /*$listItem = [\"name\"=>$item[\"name\"]];\n if(isset($item[\"short\"])) $listItem[\"short\"] = $item[\"short\"];\n if(isset($item[\"color\"])) $listItem[\"short\"] = $item[\"color\"];\n $list[] = $listItem;*/\n }\n }\n $sqlDimJson = safeStringSQL(json_encode($list));\n $sql=\"insert into cubedims (themeid, dimkey, name, json) values($themeid, '$dimName', '$dimName', $sqlDimJson) on duplicate key update name='$dimName', json= $sqlDimJson\";\n if(!runQuery($sql, \"insert cubedim\")) throw new Exception(\"error: unable to insert dimension $dimName for themeid $themeid\");\n $thisDimId = $db->insert_id;\n } else {\n $dim = $result->fetch_assoc();\n $thisDimId = $dim[\"dimid\"];\n }\n if(strtolower($cubeDimensions[$i][\"dimension\"])==\"sex\" && $i==1){\n $cubeDimIds[2] = $thisDimId; //population pyramids\n } else {\n $cubeDimIds[$i] = $thisDimId;\n }\n }\n\n //2. insert / update the cube record\n $cubeName = count($cubeDimensions)==0?\"total\":\"by \".implode($dimNames, \", \");\n $sql = \"select cubeid from cubes where themeid=$themeid and name='$cubeName' and units='$units'\";\n $result = runQuery($sql, \"cube fetch\");\n if($result->num_rows==0){\n $sql=\"insert into cubes (themeid, name, units, totsetid, bardimid, stackdimid, sidedimid) values($themeid,'$cubeName','$units', $rootSetId, $cubeDimIds[0], $cubeDimIds[1], $cubeDimIds[2])\";\n if(!runQuery($sql, \"insert cube\")) throw new Exception(\"error: unable to insert cube $cubeName for themeid $themeid\");\n $cubeid = $db->insert_id;\n } else {\n $row = $result->fetch_assoc();\n $cubeid = $row[\"cubeid\"];\n runQuery(\"update cubes set totsetid = $rootSetId, bardimid=$cubeDimIds[0], stackdimid=$cubeDimIds[1], sidedimid=$cubeDimIds[2] where cubeid=$cubeid\");\n }\n return [\"name\"=>$cubeName, \"id\"=>$cubeid];\n}", "title": "" }, { "docid": "d2eb9e14d06f93f82785a0fa712419a8", "score": "0.55325973", "text": "static public function reset_aggregated_multidimensionals() {\n\t\tself::$aggregated_multidimensionals = array();\n\t}", "title": "" }, { "docid": "01b436e2c03f2eafa239d50b93e11889", "score": "0.5424851", "text": "private function setGroupingData ()\n {\n //get proper definition of the user column data\n $columns = explode(',', $this->grouping_column);\n $selects = '';\n foreach ( $columns as $column ) {\n if ( $selects )\n $selects .= ', ' . $column . ' as \\'' . str_replace('`', '', $column) . '\\'';\n else\n $selects .= $column . ' as \\'' . str_replace('`', '', $column) . '\\'';\n }\n\n //see if the operator for grouping is defined\n $grouper = $this->aggregation_operator ? $this->aggregation_operator . '(' . $this->aggregation_column . ')' . ' as ' . $this->aggregation_column : 'count(1) as count';\n\n $sql = 'SELECT ' . $selects . ' , ' . $grouper . ' FROM ' . $this->sql['tables'] . ' WHERE ' . $this->sql['joins'];\n if ( $this->query )\n $sql .= ' and (' . $this->query . ')';\n\n $sql .= $this->deletedQuery();\n $sql .= ' group by ' . $this->grouping_column;\n\n if ( $this->order )\n $sql .= ' ORDER BY ' . $this->order;\n\n $sql .= ' LIMIT ' . $this->limit . ' OFFSET ' . $this->limit * ( $this->page - 1 );\n\n $this->data = DB::select(DB::raw($sql));\n\n //setup the stats data against the grouping\n $this->setGroupingDataStats();\n }", "title": "" }, { "docid": "35aaff64c3f8693ded2c90c9abe17ece", "score": "0.53191465", "text": "final public function _multidimensional_preview_filter( $original ) {\n\t\tif ( ! $this->is_current_blog_previewed() ) {\n\t\t\treturn $original;\n\t\t}\n\n\t\t$id_base = $this->id_data['base'];\n\n\t\t// If no settings have been previewed yet (which should not be the case, since $this is), just pass through the original value.\n\t\tif ( empty( self::$aggregated_multidimensionals[ $this->type ][ $id_base ]['previewed_instances'] ) ) {\n\t\t\treturn $original;\n\t\t}\n\n\t\tforeach ( self::$aggregated_multidimensionals[ $this->type ][ $id_base ]['previewed_instances'] as $previewed_setting ) {\n\t\t\t// Skip applying previewed value for any settings that have already been applied.\n\t\t\tif ( ! empty( self::$aggregated_multidimensionals[ $this->type ][ $id_base ]['preview_applied_instances'][ $previewed_setting->id ] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Do the replacements of the posted/default sub value into the root value.\n\t\t\t$value = $previewed_setting->post_value( $previewed_setting->default );\n\t\t\t$root = self::$aggregated_multidimensionals[ $previewed_setting->type ][ $id_base ]['root_value'];\n\t\t\t$root = $previewed_setting->multidimensional_replace( $root, $previewed_setting->id_data['keys'], $value );\n\t\t\tself::$aggregated_multidimensionals[ $previewed_setting->type ][ $id_base ]['root_value'] = $root;\n\n\t\t\t// Mark this setting having been applied so that it will be skipped when the filter is called again.\n\t\t\tself::$aggregated_multidimensionals[ $previewed_setting->type ][ $id_base ]['preview_applied_instances'][ $previewed_setting->id ] = true;\n\t\t}\n\n\t\treturn self::$aggregated_multidimensionals[ $this->type ][ $id_base ]['root_value'];\n\t}", "title": "" }, { "docid": "b9cbdfc308244185e8575aa2ab25cdd2", "score": "0.52208155", "text": "public function setPreconfiguredValue() {\n $configValues = $this->getProduct()->getPreconfiguredValues()->getSuperGroup();\n if (is_array($configValues)) {\n $associatedProducts = $this->getAssociatedProducts();\n foreach ($associatedProducts as $item) {\n if (isset($configValues[$item->getId()])) {\n $item->setQty($configValues[$item->getId()]);\n }\n }\n }\n return $this;\n }", "title": "" }, { "docid": "b9cbdfc308244185e8575aa2ab25cdd2", "score": "0.52208155", "text": "public function setPreconfiguredValue() {\n $configValues = $this->getProduct()->getPreconfiguredValues()->getSuperGroup();\n if (is_array($configValues)) {\n $associatedProducts = $this->getAssociatedProducts();\n foreach ($associatedProducts as $item) {\n if (isset($configValues[$item->getId()])) {\n $item->setQty($configValues[$item->getId()]);\n }\n }\n }\n return $this;\n }", "title": "" }, { "docid": "64cb6cfc2c591d09bf67f82665ea3adc", "score": "0.52008337", "text": "private function distributionGrid()\r\n\t{\r\n $this->settingVars->tableUsedForQuery = $this->measureFields = array();\r\n $this->measureFields[] = $this->accountID;\r\n $this->measureFields[] = $this->accountName;\r\n\t\t\r\n $this->settingVars->useRequiredTablesOnly = true;\r\n if (is_array($this->measureFields) && !empty($this->measureFields)) {\r\n $this->prepareTablesUsedForQuery($this->measureFields);\r\n }\r\n $this->queryPart = $this->getAll();\r\n\r\n $options = array();\r\n if (!empty(filters\\timeFilter::$tyWeekRange))\r\n $options['tyLyRange']['SALES'] = filters\\timeFilter::$tyWeekRange;\r\n\r\n $measureSelect = config\\MeasureConfigure::prepareSelect($this->settingVars, $this->queryVars, array('M'.$_REQUEST['ValueVolume']), $options);\r\n $measureSelect = implode(\", \", $measureSelect);\t\t\t\r\n\t\t\r\n\t\t/*Note(18-07-2017): Currently we have not enabled the Measure configuration from the backend. If in future there are in use of Measures at that time we need to optimize this query for all measures. */\r\n\t\t$query = \"SELECT \".$this->accountID.\" AS ID\".\r\n\t\t\t\t \",\".$this->accountName.\" AS ACCOUNT\".\r\n\t\t\t\t \",MAX(\".$this->storeCountField.\") AS STORE \".\r\n\t\t\t\t \", \".$measureSelect.\" \".\r\n\t\t\t\t //\",SUM( (CASE WHEN \".filters\\timeFilter::$tyWeekRange.\" THEN 1 ELSE 0 END) * \" . $this->ValueVolume . \" ) AS SALES \".\r\n\t\t\t\t \"FROM \".$this->settingVars->tablename.$this->queryPart.\" AND (\".filters\\timeFilter::$tyWeekRange.\") \".\r\n\t\t\t\t \"GROUP BY ID, ACCOUNT \".\r\n\t\t\t\t \"ORDER BY SALES DESC\";\r\n\t\t\r\n\t\t$redisOutput = $this->redisCache->checkAndReadByQueryHashFromCache($query);\r\n if ($redisOutput === false) {\r\n $result = $this->queryVars->queryHandler->runQuery($query, $this->queryVars->linkid, db\\ResultTypes::$TYPE_OBJECT);\r\n $this->redisCache->setDataForHash($result);\r\n } else {\r\n $result = $redisOutput;\r\n }\r\n\t\t\r\n\t\t$tempGridArr = array();\r\n\t\tif (is_array($result) && !empty($result)) {\r\n\t\t\tforeach($result as $key=>$row) {\r\n\t\t\t\t$temp \t\t\t\t\t=array();\r\n $temp['SKUID'] \t\t= $row['ID'];\r\n\t\t\t\t$temp['SKU_NAME'] \t= $row['ACCOUNT'];\r\n\t\t\t\t$temp['L13_SALE'] \t= number_format($row['SALES'], 2, '.', ',');\r\n\t\t\t\t$temp['L13_AVE_SALE'] = number_format(($row['SALES']/13), 2, '.', ',');\r\n\t\t\t\t$temp['STORES'] \t= number_format($row['STORE'], 0, '.', ',');\r\n\t\t\t\t$tempGridArr[] \t\t\t= $temp;\r\n\t\t\t}\r\n\t\t}\r\n \r\n\t\t$this->jsonOutput['distributionGrid'] = $tempGridArr;\r\n\t\t$this->jsonOutput['doNotIncludeID'] = $this->doNotIncludeID;\r\n\t}", "title": "" }, { "docid": "9da3c8c820d258ebba9e38a232d0fffa", "score": "0.5186699", "text": "public function run()\n {\n Setting::query()->truncate();\n Setting::insert(\n [\n 'group' => Setting::GROUP_SEO,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_TEXT,\n 'key' => 'meta_title',\n 'value' => null,\n 'extra' => null,\n ]\n , [\n 'group' => Setting::GROUP_SEO,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_TEXTAREA,\n 'key' => 'meta_description',\n 'value' => null,\n 'extra' => null,\n ]\n , [\n 'group' => Setting::GROUP_SEO,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_NUMBER,\n 'key' => 'google_analytic_track_id',\n 'value' => null,\n 'extra' => null,\n ]\n , [\n 'group' => Setting::GROUP_GENERAL,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_EMAIL,\n 'key' => 'email',\n 'value' => null,\n 'extra' => null,\n ]\n , [\n 'group' => Setting::GROUP_GENERAL,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_TEXT,\n 'key' => 'brand',\n 'value' => null,\n 'extra' => null,\n ]\n\n , [\n 'group' => Setting::GROUP_GENERAL,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_NUMBER,\n 'key' => 'postal_code',\n 'value' => null,\n 'extra' => null,\n ]\n\n , [\n 'group' => Setting::GROUP_SOCIALS,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_TEXT,\n 'key' => 'telegram',\n 'value' => null,\n 'extra' => null,\n ]\n , [\n 'group' => Setting::GROUP_SOCIALS,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_TEXT,\n 'key' => 'instagram',\n 'value' => null,\n 'extra' => null,\n ]\n , [\n 'group' => Setting::GROUP_SOCIALS,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_TEXT,\n 'key' => 'twitter',\n 'value' => null,\n 'extra' => null,\n ]\n , [\n 'group' => Setting::GROUP_SOCIALS,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_TEXT,\n 'key' => 'linkedin',\n 'value' => null,\n 'extra' => null,\n ]\n , [\n 'group' => Setting::GROUP_SOCIALS,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_TEXT,\n 'key' => 'facebook',\n 'value' => null,\n 'extra' => null,\n ], [\n 'group' => Setting::GROUP_SOCIALS,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_TEXT,\n 'key' => 'pinterest',\n 'value' => null,\n 'extra' => null,\n ]\n\n , [\n 'group' => Setting::GROUP_PHONES,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_NUMBER,\n 'key' => 'primary_phone',\n 'value' => null,\n 'extra' => null,\n ]\n , [\n 'group' => Setting::GROUP_PHONES,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_NUMBER,\n 'key' => 'secondary_phone',\n 'value' => null,\n 'extra' => null,\n ]\n , [\n 'group' => Setting::GROUP_PHONES,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_NUMBER,\n 'key' => 'primary_mobile',\n 'value' => null,\n 'extra' => null,\n ]\n , [\n 'group' => Setting::GROUP_PHONES,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_NUMBER,\n 'key' => 'secondary_mobile',\n 'value' => null,\n 'extra' => null,\n ]\n , [\n 'group' => Setting::GROUP_LOGOS,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_IMAGE,\n 'key' => 'large_logo',\n 'value' => null,\n 'extra' => null,\n ]\n , [\n 'group' => Setting::GROUP_LOGOS,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_IMAGE,\n 'key' => 'small_logo',\n 'value' => null,\n 'extra' => null,\n ]\n , [\n 'group' => Setting::GROUP_LOGOS,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_IMAGE,\n 'key' => 'fav_icon',\n 'value' => null,\n 'extra' => null,\n ]\n , [\n 'group' => Setting::GROUP_ADDRESSES,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_TEXTAREA,\n 'key' => 'primary_address',\n 'value' => null,\n 'extra' => null,\n ]\n , [\n 'group' => Setting::GROUP_ADDRESSES,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_TEXTAREA,\n 'key' => 'secondary_address',\n 'value' => null,\n 'extra' => null,\n ]\n , [\n 'group' => Setting::GROUP_ADDRESSES,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_TEXTAREA,\n 'key' => 'secondary_address',\n 'value' => null,\n 'extra' => null,\n ]\n , [\n 'group' => Setting::GROUP_ADDRESSES,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_TEXT,\n 'key' => 'location_map',\n 'value' => null,\n 'extra' => null,\n ] , [\n 'group' => Setting::GROUP_TEXTS,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_EDITOR,\n 'key' => 'about_us_text',\n 'value' => null,\n 'extra' => null,\n ]\n , [\n 'group' => Setting::GROUP_TEXTS,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_EDITOR,\n 'key' => 'contact_text',\n 'value' => null,\n 'extra' => null,\n ]\n , [\n 'group' => Setting::GROUP_TEXTS,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_EDITOR,\n 'key' => 'header_text',\n 'value' => null,\n 'extra' => null,\n ]\n , [\n 'group' => Setting::GROUP_TEXTS,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_EDITOR,\n 'key' => 'footer_text',\n 'value' => null,\n 'extra' => null,\n ]\n , [\n 'group' => Setting::GROUP_IMAGES,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_IMAGE,\n 'key' => 'about_us_image',\n 'value' => null,\n 'extra' => null,\n ]\n , [\n 'group' => Setting::GROUP_IMAGES,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_IMAGE,\n 'key' => 'contact_image',\n 'value' => null,\n 'extra' => null,\n ]\n , [\n 'group' => Setting::GROUP_IMAGES,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_IMAGE,\n 'key' => 'blog_image',\n 'value' => null,\n 'extra' => null,\n ]\n , [\n 'group' => Setting::GROUP_SYMBOLS,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_EDITOR,\n 'key' => 'enamad',\n 'value' => null,\n 'extra' => null,\n ]\n , [\n 'group' => Setting::GROUP_SYMBOLS,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_EDITOR,\n 'key' => 'ecunion',\n 'value' => null,\n 'extra' => null,\n ]\n , [\n 'group' => Setting::GROUP_SYMBOLS,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_EDITOR,\n 'key' => 'eanjoman',\n 'value' => null,\n 'extra' => null,\n ]\n , [\n 'group' => Setting::GROUP_SYMBOLS,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_EDITOR,\n 'key' => 'samandehi',\n 'value' => null,\n 'extra' => null,\n ]\n , [\n 'group' => Setting::GROUP_SYMBOLS,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_EDITOR,\n 'key' => 'saramad',\n 'value' => null,\n 'extra' => null,\n ] , [\n 'group' => Setting::GROUP_SYMBOLS,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_EDITOR,\n 'key' => 'zarinpal',\n 'value' => null,\n 'extra' => null,\n ]\n , [\n 'group' => Setting::GROUP_SYMBOLS,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_EDITOR,\n 'key' => 'mellat',\n 'value' => null,\n 'extra' => null,\n ]\n , [\n 'group' => Setting::GROUP_SHOP,\n 'access' => Setting::ACCESS_FRONT,\n 'type' => Setting::TYPE_NUMBER,\n 'key' => 'value_added',\n 'value' => null,\n 'extra' => null,\n ]\n );\n }", "title": "" }, { "docid": "f6da51ca8ef6834bc96d67ec6b3f0bca", "score": "0.51159525", "text": "private function setupSetiings(){\n\n\n if(Schema::hasTable('website_settings')) {\n $allSettings=WebsiteSetting::all();\n\n $defaultD=[];\n foreach ($allSettings as $s){\n\n switch ($s->display_type){\n case '0':\n $defaultD[$s->name]=$s->value;\n break;\n case '8':\n $defaultD[$s->name]=(bool)$s->value;\n break;\n }\n\n\n }\n\n\n config()->set('default_var',$defaultD);\n\n $max_file_size = config('default_var.website_max_file_upload_size') ?? 10;\n $max_file_size = (1024 * 1024) * (is_array($max_file_size))?$max_file_size['value']:$max_file_size;\n config('media-library.max_file_size', $max_file_size);\n\n\n\n }\n define('USER_ROLE', 2);\n define('ADMIN_ROLE', 1);\n define('MODERATOR_ROLE', 3);\n define('VENDOR_ROLE', 4);\n\n }", "title": "" }, { "docid": "ff791149d341a16d6b64ed304d027f13", "score": "0.5083911", "text": "protected function buildValues(): void {\r\n\r\n if($this -> values instanceof Select) {\r\n\r\n $build = $this -> values -> build();\r\n $this -> query[] = $build -> getQuery();\r\n $this -> bind = array_merge($this -> bind, $build -> getParameters());\r\n }\r\n elseif(false === $this -> isMultidimensionalArray($this -> values) && false === $this -> isSequentialArray($this -> values)) {\r\n\r\n $this -> query[] = 'VALUES';\r\n $tmp = [];\r\n\r\n foreach($this -> values as $value) {\r\n\r\n if($value instanceof Select) {\r\n\r\n $build = $value -> build();\r\n $this -> bind = array_merge($build -> getParameters(), $this -> bind);\r\n $tmp[] = sprintf('(%s)', $build -> getQuery());\r\n }\r\n elseif($value instanceof Raw) {\r\n $tmp[] = $value -> __toString();\r\n }\r\n else {\r\n\r\n $this -> bind[] = $value;\r\n $tmp[] = '?';\r\n }\r\n }\r\n\r\n $this -> query[] = sprintf('(%s)', implode(', ', $tmp));\r\n }\r\n elseif(true === $this -> isMultidimensionalArray($this -> values)) {\r\n\r\n $this -> query[] = 'VALUES';\r\n $sets = [];\r\n\r\n foreach($this -> values as $values) {\r\n\r\n $tmp = [];\r\n\r\n foreach($values as $value) {\r\n\r\n if($value instanceof Raw) {\r\n $tmp[] = $value -> __toString();\r\n }\r\n else {\r\n\r\n $this -> bind[] = $value;\r\n $tmp[] = '?';\r\n }\r\n }\r\n\r\n $sets[] = sprintf('(%s)', implode(', ', $tmp));\r\n }\r\n\r\n $this -> query[] = implode(', ', $sets);\r\n }\r\n }", "title": "" }, { "docid": "3dd87bacfdb56c846ab7a51a332970ea", "score": "0.50082445", "text": "public static function gridFunctionAllData($querypart, $selectPart, $groupByPart, $jsonTag, &$jsonOutput, $indexInDataArray, $havingTYValue = \"TYVALUE\", $havingLYValue = \"LYVALUE\") {\r\n // $measureSelectionArr = self::getMeasures();\r\n $valueVolume = getValueVolume(self::$settingVars);\r\n\r\n /*$measureArr = $measureSelectionArr = array();\r\n if(is_array(self::$settingVars->pageArray[\"MEASURE_SELECTION_LIST\"]) && !empty(self::$settingVars->pageArray[\"MEASURE_SELECTION_LIST\"])){\r\n foreach (self::$settingVars->pageArray[\"MEASURE_SELECTION_LIST\"] as $key => $measureVal) {\r\n $options = array();\r\n $measureKey = 'M' . $measureVal['measureID'];\r\n $measure = self::$settingVars->measureArray[$measureKey];\r\n \r\n if (!empty(filters\\timeFilter::$tyWeekRange)) {\r\n if(($measureVal['measureID'] == $_REQUEST['ValueVolume']))\r\n $havingTYValue = \"TY\" . $measure['ALIASE'];\r\n $measureTYValue = \"TY\" . $measure['ALIASE'];\r\n $options['tyLyRange'][$measureTYValue] = trim(filters\\timeFilter::$tyWeekRange);\r\n // $measureSelectionArr[] = \"SUM( (CASE WHEN \" . filters\\timeFilter::$tyWeekRange . \" THEN 1 ELSE 0 END) * \" . $measure['VAL'] . \") AS TY\" . $measure['ALIASE'];\r\n }\r\n\r\n if (!empty(filters\\timeFilter::$lyWeekRange)) {\r\n if(($measureVal['measureID'] == $_REQUEST['ValueVolume']))\r\n $havingLYValue = \"LY\" . $measure['ALIASE'];\r\n $measureLYValue = \"LY\" . $measure['ALIASE'];\r\n $options['tyLyRange'][$measureLYValue] = trim(filters\\timeFilter::$lyWeekRange);\r\n // $measureSelectionArr[] = \"SUM( (CASE WHEN \" . filters\\timeFilter::$lyWeekRange . \" THEN 1 ELSE 0 END) * \" . $measure['VAL'] . \") AS LY\" . $measure['ALIASE'];\r\n }\r\n $measureArr[$measureKey] = config\\MeasureConfigure::prepareSelect(self::$settingVars, self::$queryVars, array($measureKey), $options); \r\n $measureSelectionArr = array_merge($measureSelectionArr,$measureArr[$measureKey]);\r\n }\r\n }*/\r\n\r\n $projectStructureType = \"projectstructure\\\\\".self::$settingVars->projectStructureType;\r\n $structureClass = new $projectStructureType();\r\n $measureSelectPart = $structureClass->prepareMeasureSelectPart(self::$settingVars, self::$queryVars);\r\n $measureSelectionArr = $measureSelectPart['measureSelectionArr'];\r\n $havingTYValue = $measureSelectPart['havingTYValue'];\r\n $havingLYValue = $measureSelectPart['havingLYValue'];\r\n \r\n $jsonNodes = array();\r\n\r\n $tablename = explode(\",\", self::$settingVars->tablename);\r\n if (self::$settingVars->dataArray[$indexInDataArray]['special'] == 1 && !in_array(self::$settingVars->dataArray[$indexInDataArray]['tablename'], $tablename)) {\r\n $tableName = self::$settingVars->tablename . \",\" . self::$settingVars->dataArray[$indexInDataArray]['tablename'];\r\n $queryPart = $querypart . \" AND \" . self::$settingVars->dataArray[$indexInDataArray]['connectingField'];\r\n $tablename = explode(\",\", self::$settingVars->tablename);\r\n } else {\r\n $tableName = self::$settingVars->tablename;\r\n $queryPart = $querypart;\r\n }\r\n\r\n $havingArray = $filterArray = array();\r\n\r\n if (!empty(filters\\timeFilter::$tyWeekRange)) {\r\n $filterArray[] = filters\\timeFilter::$tyWeekRange;\r\n $havingArray[] = $havingTYValue.\"<>0\";\r\n }\r\n\r\n if (!empty(filters\\timeFilter::$lyWeekRange)) {\r\n $filterArray[] = filters\\timeFilter::$lyWeekRange;\r\n $havingArray[] = $havingLYValue.\"<>0\";\r\n }\r\n\r\n $daysWhere = (!empty($filterArray)) ? \" AND (\" . implode(\" OR \", $filterArray) . \") \" : \"\";\r\n\r\n //ADD SUM/COUNT PART TO THE QUERY\r\n /*$query = \"SELECT \" . implode(\",\", $selectPart) . \",\" . implode(\",\", $measureSelectionArr) . \" \" .\r\n \"FROM \" . $tableName . $queryPart . $daysWhere .\r\n \"GROUP BY \" . implode(\",\", $groupByPart) . \" \" .\r\n \"HAVING \".implode(\" OR \", $havingArray).\" ORDER BY \".$havingTYValue.\" DESC\";*/\r\n\r\n $query = \"SELECT \" . implode(\",\", $selectPart) . \", \" . implode(\",\", $measureSelectionArr) . \" \" .\r\n \"FROM \" . $tableName . $queryPart . trim($daysWhere) .' '.\r\n \"GROUP BY \" . implode(\",\", $groupByPart);\r\n\r\n $redisCache = new utils\\RedisCache(self::$queryVars);\r\n $redisOutput = $redisCache->checkAndReadByQueryHashFromCache($query);\r\n if ($redisOutput === false) {\r\n $result = self::$queryVars->queryHandler->runQuery($query, self::$queryVars->linkid, db\\ResultTypes::$TYPE_OBJECT);\r\n $redisCache->setDataForHash($result);\r\n } else {\r\n $result = $redisOutput;\r\n }\r\n\r\n /*$requiredGridFields[] = $havingTYValue;\r\n $requiredGridFields[] = $havingLYValue;\r\n if(isset($selectPart) && is_array($selectPart) && count($selectPart)>0){\r\n foreach ($selectPart as $ky => $selPtVal) {\r\n $colVal = explode(' AS ', $selPtVal);\r\n if(isset($colVal[1]) && !empty($colVal[1])) {\r\n $requiredGridFields[] = trim($colVal[1]);\r\n }else{\r\n $requiredGridFields[] = trim($selPtVal);\r\n }\r\n }\r\n }\r\n $result = $redisCache->getRequiredData($result, $requiredGridFields, $havingTYValue, $havingTYValue, $havingLYValue);\r\n\r\n $tempResult = array();\r\n foreach ($result as $key => $data) {\r\n //COLLECT ALL QUERY ALIASES TO ADD AS JSON-TAG \r\n if (empty($jsonNodes) || count($jsonNodes) != count($data))\r\n $jsonNodes = array_keys($data);\r\n $temp = array();\r\n foreach ($jsonNodes as $index => $node) {\r\n $temp[$node] = ($data[$node]) ? htmlspecialchars_decode($data[$node]) : 0;\r\n }\r\n $tempResult[] = $temp;\r\n }*/\r\n $jsonOutput[$jsonTag] = $result;\r\n }", "title": "" }, { "docid": "4b2b8307195212162f1ea41cce001512", "score": "0.50040513", "text": "private function _updateGlobalSets()\n {\n if ($this->_isMysql) {\n $sql = 'update {{%elements}} [[e]]\ninner join {{%globalsets}} [[g]] on [[g.id]] = [[e.id]]\nset [[e.fieldLayoutId]] = [[g.fieldLayoutId]]\nwhere [[e.type]] = :type';\n } else {\n $sql = 'update {{%elements}} [[e]]\nset [[fieldLayoutId]] = [[g.fieldLayoutId]]\nfrom {{%globalsets}} [[g]]\nwhere [[g.id]] = [[e.id]] and [[e.type]] = :type';\n }\n\n $this->execute($sql, [':type' => GlobalSet::class]);\n }", "title": "" }, { "docid": "ebe47dbe4a941a025e93c22d13491bd0", "score": "0.49988812", "text": "public function initVarSetConfig($indexIdentifier) {\r\n\t\t$this->varSetConfig = array(\r\n\t\t\t\r\n\t\t\t'Gallery-list' => array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'GETvar' => 'tx_yag_pi1[contextIdentifier]',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'GETvar' => 'tx_yag_pi1[controller]',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'GETvar' => 'tx_yag_pi1[action]',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'GETvar' => 'tx_yag_pi1[context' . $indexIdentifier . '][galleryUid]',\r\n\t\t\t\t\t'lookUpTable' => array(\r\n\t\t\t\t\t\t'table' => 'tx_yag_domain_model_gallery',\r\n\t\t\t\t\t\t'id_field' => 'uid',\r\n\t\t\t\t\t\t'alias_field' => 'name',\r\n\t\t\t\t\t\t'addWhereClause' => ' AND deleted !=1 AND hidden !=1',\r\n\t\t\t\t\t\t'useUniqueCache' => 1,\r\n\t\t\t\t\t\t'useUniqueCache_conf' => array(\r\n\t\t\t\t\t\t\t'strtolower' => 1,\r\n\t\t\t\t\t\t\t'spaceCharacter' => '-',\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t)\r\n\t\t\t\t),\r\n\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'GETvar' => 'tx_yag_pi1[galleryList' . $indexIdentifier . '][pagerCollection][page]',\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t\t\r\n\t\t\r\n\t\t\t 'Gallery-index' => array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'GETvar' => 'tx_yag_pi1[contextIdentifier]',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'GETvar' => 'tx_yag_pi1[controller]',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'GETvar' => 'tx_yag_pi1[action]',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'GETvar' => 'tx_yag_pi1[context' . $indexIdentifier . '][galleryUid]',\r\n\t\t\t\t\t'lookUpTable' => array(\r\n\t\t\t\t\t\t'table' => 'tx_yag_domain_model_gallery',\r\n\t\t\t\t\t\t'id_field' => 'uid',\r\n\t\t\t\t\t\t'alias_field' => 'name',\r\n\t\t\t\t\t\t'addWhereClause' => ' AND deleted !=1 AND hidden !=1',\r\n\t\t\t\t\t\t'useUniqueCache' => 1,\r\n\t\t\t\t\t\t'useUniqueCache_conf' => array(\r\n\t\t\t\t\t\t\t'strtolower' => 1,\r\n\t\t\t\t\t\t\t'spaceCharacter' => '-',\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t)\r\n\t\t\t\t),\r\n\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'GETvar' => 'tx_yag_pi1[albumList' . $indexIdentifier . '][pagerCollection][page]',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'GETvar' => 'tx_yag_pi1[itemList' . $indexIdentifier . '][pagerCollection][page]',\r\n\t\t\t\t\t'noMatch' => 'null'\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'GETvar' => 'tx_yag_pi1[context' . $indexIdentifier . '][albumUid]',\r\n\t\t\t\t\t'noMatch' => 'null'\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t'ItemList-list' => array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'GETvar' => 'tx_yag_pi1[contextIdentifier]',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'GETvar' => 'tx_yag_pi1[controller]',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'GETvar' => 'tx_yag_pi1[action]',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'GETvar' => 'tx_yag_pi1[context' . $indexIdentifier . '][galleryUid]',\r\n\t\t\t\t\t'lookUpTable' => array(\r\n\t\t\t\t\t\t'table' => 'tx_yag_domain_model_gallery',\r\n\t\t\t\t\t\t'id_field' => 'uid',\r\n\t\t\t\t\t\t'alias_field' => 'name',\r\n\t\t\t\t\t\t'addWhereClause' => ' AND deleted !=1 AND hidden !=1',\r\n\t\t\t\t\t\t'useUniqueCache' => 1,\r\n\t\t\t\t\t\t'useUniqueCache_conf' => array(\r\n\t\t\t\t\t\t\t'strtolower' => 1,\r\n\t\t\t\t\t\t\t'spaceCharacter' => '-',\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t)\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'GETvar' => 'tx_yag_pi1[context' . $indexIdentifier . '][albumUid]',\r\n\t\t\t\t\t'lookUpTable' => array(\r\n\t\t\t\t\t\t'table' => 'tx_yag_domain_model_album',\r\n\t\t\t\t\t\t'id_field' => 'uid',\r\n\t\t\t\t\t\t'alias_field' => 'name',\r\n\t\t\t\t\t\t'addWhereClause' => ' AND deleted !=1 AND hidden !=1',\r\n\t\t\t\t\t\t'useUniqueCache' => 1,\r\n\t\t\t\t\t\t'useUniqueCache_conf' => array(\r\n\t\t\t\t\t\t\t'strtolower' => 1,\r\n\t\t\t\t\t\t\t'spaceCharacter' => '-',\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t)\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'GETvar' => 'tx_yag_pi1[itemList' . $indexIdentifier . '][pagerCollection][page]',\r\n\t\t\t\t),\r\n\t\t\t),\r\n\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t'Item-show' => array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'GETvar' => 'tx_yag_pi1[contextIdentifier]',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'GETvar' => 'tx_yag_pi1[controller]',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'GETvar' => 'tx_yag_pi1[action]',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'GETvar' => 'tx_yag_pi1[context' . $indexIdentifier . '][galleryUid]',\r\n\t\t\t\t\t'lookUpTable' => array(\r\n\t\t\t\t\t\t'table' => 'tx_yag_domain_model_gallery',\r\n\t\t\t\t\t\t'id_field' => 'uid',\r\n\t\t\t\t\t\t'alias_field' => 'name',\r\n\t\t\t\t\t\t'addWhereClause' => ' AND deleted !=1 AND hidden !=1',\r\n\t\t\t\t\t\t'useUniqueCache' => 1,\r\n\t\t\t\t\t\t'useUniqueCache_conf' => array(\r\n\t\t\t\t\t\t\t'strtolower' => 1,\r\n\t\t\t\t\t\t\t'spaceCharacter' => '-',\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t)\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'GETvar' => 'tx_yag_pi1[context' . $indexIdentifier . '][albumUid]',\r\n\t\t\t\t\t'lookUpTable' => array(\r\n\t\t\t\t\t\t'table' => 'tx_yag_domain_model_album',\r\n\t\t\t\t\t\t'id_field' => 'uid',\r\n\t\t\t\t\t\t'alias_field' => 'name',\r\n\t\t\t\t\t\t'addWhereClause' => ' AND deleted !=1 AND hidden !=1',\r\n\t\t\t\t\t\t'useUniqueCache' => 1,\r\n\t\t\t\t\t\t'useUniqueCache_conf' => array(\r\n\t\t\t\t\t\t\t'strtolower' => 1,\r\n\t\t\t\t\t\t\t'spaceCharacter' => '-',\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t)\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'GETvar' => 'tx_yag_pi1[itemListOffset]',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'GETvar' => 'tx_yag_pi1[itemList' . $indexIdentifier . '][pagerCollection][page]',\r\n\t\t\t\t\t'noMatch' => 'null'\r\n\t\t\t\t),\r\n\t\t\t)\r\n\t\t);\r\n\t\t\r\n\t\t$this->varSetConfig['ItemList-submitFilter'] = $this->varSetConfig['ItemList-list'];\r\n\t\t\r\n\t}", "title": "" }, { "docid": "62089362631a8bd41c92dc7f98412526", "score": "0.4995746", "text": "public function set_image_sizes() {\n\t\t\t// Get theme set image sizes.\n\t\t\t$this->image_sizes = apply_filters( 'photonfill_image_sizes', $this->image_sizes );\n\n\t\t\tif ( ! is_array( $this->image_sizes ) ) {\n\t\t\t\t$this->image_sizes = array();\n\t\t\t}\n\n\t\t\t// If none, let's guess.\n\t\t\tif ( empty( $this->image_sizes ) ) {\n\t\t\t\t$this->image_sizes = $this->create_image_sizes();\n\t\t\t}\n\n\t\t\t// Make sure we have a full element so we can iterate properly later.\n\t\t\tif ( ! array_key_exists( 'full', $this->image_sizes ) ) {\n\t\t\t\t// Make sure the `full` breakpoint exists.\n\t\t\t\tforeach ( $this->breakpoints as $breakpoint => $breakpoint_widths ) {\n\t\t\t\t\t$this->image_sizes['full'][ $breakpoint ] = array();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "abf8532e596e8a204fdd9444a5e76426", "score": "0.49737853", "text": "public function preview() {\n\t\tif ( ! isset( $this->_previewed_blog_id ) ) {\n\t\t\t$this->_previewed_blog_id = get_current_blog_id();\n\t\t}\n\n\t\t// Prevent re-previewing an already-previewed setting.\n\t\tif ( $this->is_previewed ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$id_base = $this->id_data['base'];\n\t\t$is_multidimensional = ! empty( $this->id_data['keys'] );\n\t\t$multidimensional_filter = array( $this, '_multidimensional_preview_filter' );\n\n\t\t/*\n\t\t * Check if the setting has a pre-existing value (an isset check),\n\t\t * and if doesn't have any incoming post value. If both checks are true,\n\t\t * then the preview short-circuits because there is nothing that needs\n\t\t * to be previewed.\n\t\t */\n\t\t$undefined = new stdClass();\n\t\t$needs_preview = ( $undefined !== $this->post_value( $undefined ) );\n\t\t$value = null;\n\n\t\t// Since no post value was defined, check if we have an initial value set.\n\t\tif ( ! $needs_preview ) {\n\t\t\tif ( $this->is_multidimensional_aggregated ) {\n\t\t\t\t$root = self::$aggregated_multidimensionals[ $this->type ][ $id_base ]['root_value'];\n\t\t\t\t$value = $this->multidimensional_get( $root, $this->id_data['keys'], $undefined );\n\t\t\t} else {\n\t\t\t\t$default = $this->default;\n\t\t\t\t$this->default = $undefined; // Temporarily set default to undefined so we can detect if existing value is set.\n\t\t\t\t$value = $this->value();\n\t\t\t\t$this->default = $default;\n\t\t\t}\n\t\t\t$needs_preview = ( $undefined === $value ); // Because the default needs to be supplied.\n\t\t}\n\n\t\t// If the setting does not need previewing now, defer to when it has a value to preview.\n\t\tif ( ! $needs_preview ) {\n\t\t\tif ( ! has_action( \"customize_post_value_set_{$this->id}\", array( $this, 'preview' ) ) ) {\n\t\t\t\tadd_action( \"customize_post_value_set_{$this->id}\", array( $this, 'preview' ) );\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\tswitch ( $this->type ) {\n\t\t\tcase 'theme_mod' :\n\t\t\t\tif ( ! $is_multidimensional ) {\n\t\t\t\t\tadd_filter( \"theme_mod_{$id_base}\", array( $this, '_preview_filter' ) );\n\t\t\t\t} else {\n\t\t\t\t\tif ( empty( self::$aggregated_multidimensionals[ $this->type ][ $id_base ]['previewed_instances'] ) ) {\n\t\t\t\t\t\t// Only add this filter once for this ID base.\n\t\t\t\t\t\tadd_filter( \"theme_mod_{$id_base}\", $multidimensional_filter );\n\t\t\t\t\t}\n\t\t\t\t\tself::$aggregated_multidimensionals[ $this->type ][ $id_base ]['previewed_instances'][ $this->id ] = $this;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'option' :\n\t\t\t\tif ( ! $is_multidimensional ) {\n\t\t\t\t\tadd_filter( \"pre_option_{$id_base}\", array( $this, '_preview_filter' ) );\n\t\t\t\t} else {\n\t\t\t\t\tif ( empty( self::$aggregated_multidimensionals[ $this->type ][ $id_base ]['previewed_instances'] ) ) {\n\t\t\t\t\t\t// Only add these filters once for this ID base.\n\t\t\t\t\t\tadd_filter( \"option_{$id_base}\", $multidimensional_filter );\n\t\t\t\t\t\tadd_filter( \"default_option_{$id_base}\", $multidimensional_filter );\n\t\t\t\t\t}\n\t\t\t\t\tself::$aggregated_multidimensionals[ $this->type ][ $id_base ]['previewed_instances'][ $this->id ] = $this;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault :\n\n\t\t\t\t/**\n\t\t\t\t * Fires when the WP_Customize_Setting::preview() method is called for settings\n\t\t\t\t * not handled as theme_mods or options.\n\t\t\t\t *\n\t\t\t\t * The dynamic portion of the hook name, `$this->id`, refers to the setting ID.\n\t\t\t\t *\n\t\t\t\t * @since 3.4.0\n\t\t\t\t *\n\t\t\t\t * @param WP_Customize_Setting $this WP_Customize_Setting instance.\n\t\t\t\t */\n\t\t\t\tdo_action( \"customize_preview_{$this->id}\", $this );\n\n\t\t\t\t/**\n\t\t\t\t * Fires when the WP_Customize_Setting::preview() method is called for settings\n\t\t\t\t * not handled as theme_mods or options.\n\t\t\t\t *\n\t\t\t\t * The dynamic portion of the hook name, `$this->type`, refers to the setting type.\n\t\t\t\t *\n\t\t\t\t * @since 4.1.0\n\t\t\t\t *\n\t\t\t\t * @param WP_Customize_Setting $this WP_Customize_Setting instance.\n\t\t\t\t */\n\t\t\t\tdo_action( \"customize_preview_{$this->type}\", $this );\n\t\t}\n\n\t\t$this->is_previewed = true;\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "f2ae87fd0872101fb76c08e6a482eb39", "score": "0.49684775", "text": "protected function initializeValues()\n {\n foreach ($this->params as $name => $infos) {\n if (isset($infos['multivalues']) && $infos['multivalues']) {\n $this->values[$name] = [];\n } elseif (isset($infos['subobject']) && $infos['subobject']) {\n $tmp = get_class($this);\n $parts = explode('\\\\', $tmp);\n array_pop($parts);\n $className = implode('\\\\', $parts) . '\\\\' . $infos['type'];\n $this->values[$name] = new $className();\n } else {\n $this->values[$name] = null;\n }\n }\n }", "title": "" }, { "docid": "f813e8f37c2c9ac21047d2f87545ebe3", "score": "0.49606177", "text": "public function InitAdvancedSettings()\n\t{\n\t\t// Parse and Split _customFilters\n\t\tif ( strlen($this->_customFilters) > 0 ) \n\t\t{\n\t\t\t// First of all split by comma\n\t\t\t$tmpFilterValues = explode( \",\", $this->_customFilters );\n\t\t\n\t\t\t//Loop through mappings\n\t\t\tforeach ($tmpFilterValues as &$myFilterValue )\n\t\t\t{\n\t\t\t\t// Split subvalues\n\t\t\t\t$tmpArray = explode( \"=>\", $myFilterValue );\n\t\t\t\t\n\t\t\t\t// Set into temporary array\n\t\t\t\t$tmpfilterid = trim($tmpArray[0]);\n\t\t\t\t\n\t\t\t\t// Set advanced property\n\t\t\t\tif ( isset($this->_arrCustomFilters[$tmpfilterid]) ) \n\t\t\t\t{\n\t\t\t\t\t// Copy New value first!\n\t\t\t\t\t$szNewVal = trim($tmpArray[1]);\n\n\t\t\t\t\t// Negated logic\n\t\t\t\t\tif ( \n\t\t\t\t\t\t\t$this->_arrCustomFilters[$tmpfilterid][FILTER_TYPE] == FILTER_TYPE_NUMBER && \n\t\t\t\t\t\t\t!(isset($this->_arrCustomFilters[$tmpfilterid]['MinValue']) && intval($szNewVal) < $this->_arrCustomFilters[$tmpfilterid]['MinValue']) && \n\t\t\t\t\t\t\t!(isset($this->_arrCustomFilters[$tmpfilterid]['MaxValue']) && intval($szNewVal) >= $this->_arrCustomFilters[$tmpfilterid]['MaxValue']) \n\t\t\t\t\t\t) \n\t\t\t\t\t{\n\t\t\t\t\t\tif ( $tmpfilterid == '_maxHosts' ) \n\t\t\t\t\t\t\t$this->_maxHosts = intval($szNewVal); \n\t\t\t\t\t\telse if ( $tmpfilterid == '_maxMsgsPerHost' ) \n\t\t\t\t\t\t\t$this->_maxMsgsPerHost = intval($szNewVal); \n\t\t\t\t\t\telse if ( $tmpfilterid == '_colorThreshold' ) \n\t\t\t\t\t\t\t$this->_colorThreshold = intval($szNewVal); \n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// Write to debuglog\n\t\t\t\t\t\tOutputDebugMessage(\"Failed setting advanced report option property '\" . $tmpfilterid . \"', value not in value range!\", DEBUG_ERROR);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "3025983d7471f7f7b088c6bf3c5367a4", "score": "0.4954513", "text": "protected function buildValues()\r\n {\r\n $keyValuePairs = $this->dto->getAllKeyValuePairsInParamsAndFieldsSetByApplication();\r\n foreach ($keyValuePairs as $key => $value) {\r\n $this->bindParam->add(\"s\", $value);\r\n }\r\n $this->buildWhereValues();\r\n }", "title": "" }, { "docid": "9e4825f03885a22f7c011ae7fe28d4b2", "score": "0.4939116", "text": "function buildDatasetFromDatabase()\n {\n foreach ( $this->configs as $config )\n {\n $config->buildDatasetFromDatabase();\n }\n }", "title": "" }, { "docid": "709570ba7d7e84512d425f005c3bab10", "score": "0.49317577", "text": "private function processSetting() {\n $settings = array();\n foreach ($this->settings as $key) {\n if (isset($this->atts[$key])) {\n $settings[$key] = $this->atts[$key];\n }\n }\n\n if (!empty($settings)) {\n $this->atts['data']['settings'] = json_encode($settings);\n }\n }", "title": "" }, { "docid": "f676bb5c0fb085cd8b6b5a3cb5120db1", "score": "0.49042174", "text": "final public function _clear_aggregated_multidimensional_preview_applied_flag() {\n\t\tunset( self::$aggregated_multidimensionals[ $this->type ][ $this->id_data['base'] ]['preview_applied_instances'][ $this->id ] );\n\t}", "title": "" }, { "docid": "5bb9dfbf8526cd45fde48b11c37439aa", "score": "0.48949575", "text": "private function set_grids() { \n $grids = array();\n foreach ($this->arr as $k => $row) {\n if ($k <= 2) {\n $row_num = 1;\n }\n if ($k > 2 && $k <= 5) {\n $row_num = 2;\n }\n if ($k > 5 && $k <= 8) {\n $row_num = 3;\n }\n\n foreach ($row as $kk => $r) {\n if ($kk <= 2) {\n $col_num = 1;\n }\n if ($kk > 2 && $kk <= 5) {\n $col_num = 2;\n }\n if ($kk > 5 && $kk <= 8) {\n $col_num = 3;\n }\n $grids[$row_num][$col_num][] = $r;\n }\n }\n $this->grids = $grids;\n }", "title": "" }, { "docid": "38ed5c5c82af6e2ef85498666db035b4", "score": "0.48935366", "text": "public function getFieldSets() {\n\t\t$save_params=$this->session->userdata('save_params');\t\t\n\t\t$this->params=$save_params;\n\t\t$params = $this->params;\n\t\t\n\t\t$fields = array(\n\t\t\t'model' => array(\n\t\t\t\t'field' => 'model',\n\t\t\t\t//'required' => false,\n\t\t\t\t'copy' => true,\n\t\t\t\t'name' => 'Model',\n\t\t\t\t'must'\t=> 'must',\n\t\t\t\t//'descr' => 'A unique product code required'\n\t\t\t\t'descr' => 'A unique product model required'\n\t\t\t),\n\t\t\t'sku' => array(\n\t\t\t\t'field' => 'sku',\n\t\t\t\t'copy' => true,\n\t\t\t\t'name' => 'SKU',\n\t\t\t\t'descr' => ''\n\t\t\t),\n\t\t\t'upc' => array(\n\t\t\t\t'field' => 'upc',\n\t\t\t\t'copy' => true,\n\t\t\t\t'name' => 'UPC',\n\t\t\t\t'descr' => 'Universal Product Code',\n\t\t\t),\t\t\t\n\t\t\t'ean' => array(\n\t\t\t\t'field' => 'ean',\n\t\t\t\t'copy' => true,\n\t\t\t\t'name' => 'EAN',\n\t\t\t\t'descr' => 'European Article Number',\n\t\t\t),\n\t\t\t'jan' => array(\n\t\t\t\t'field' => 'jan',\n\t\t\t\t'copy' => true,\n\t\t\t\t'name' => 'JAN',\n\t\t\t\t'descr' => 'Japanese Article Number',\n\t\t\t),\n\t\t\t'isbn' => array(\n\t\t\t\t'field' => 'isbn',\n\t\t\t\t'copy' => true,\n\t\t\t\t'name' => 'ISBN',\n\t\t\t\t'descr' => 'International Standard Book Number',\n\t\t\t),\n\t\t\t'mpn' => array(\n\t\t\t\t'field' => 'mpn',\n\t\t\t\t'copy' => true,\n\t\t\t\t'name' => 'MPN',\n\t\t\t\t'descr' => 'Manufacturer Part Number',\n\t\t\t),\t\t\t\n\t\t\tarray(\n\t\t\t\t'field' => 'name',\n\t\t\t\t'name' => 'Product Name',\n\t\t\t\t'descr' => 'Product name',\n\t\t\t\t'must'\t=> 'must'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'field' => 'product_description',\n\t\t\t\t'name' => 'Description',\n\t\t\t\t'descr' => 'Product description',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'field' => 'category_id',\n\t\t\t\t'name' => 'Category ID',\n\t\t\t\t'descr' => \"If this field is specified then the 'category name' field will be ignored\",\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'field' => 'category',\n\t\t\t\t'name' => 'Category Name',\n\t\t\t\t'descr' => 'Full category path. Example: category' . $this->params['cat_separator'] . 'subcategory1' . $this->params['cat_separator'] . 'subcategory2',\n\t\t\t\t'tip' => htmlspecialchars('This product import extension can find or create categories by name. CSV Category Import extension.'),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'field' => 'location',\n\t\t\t\t'copy' => true,\n\t\t\t\t'name' => 'Location',\n\t\t\t\t'descr' => 'This field is not used in front-end but it can be defined for products'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'field' => 'quantity',\n\t\t\t\t'copy' => true,\n\t\t\t\t'name' => 'Quantity',\n\t\t\t\t'descr' => ''\n\t\t\t),\t\t\t\n\t\t\tarray(\n\t\t\t\t'field' => 'min_quantity',\n\t\t\t\t'copy' => true,\n\t\t\t\t'name' => 'Minimum Quantity',\n\t\t\t\t'descr' => ''\n\t\t\t),\n\t\t\t'subtract' => array(\n\t\t\t\t'field' => 'subtract_stock',\n\t\t\t\t'copy' => true,\n\t\t\t\t'name' => 'Subtract Stock',\n\t\t\t\t'descr' => \"1 - Yes, 0 - No.\"\n\t\t\t),\n\t\t\t'stock_status' => array(\n\t\t\t\t'field' => 'stock_status_id',\n\t\t\t\t'name' => 'Out of Stock Status',\n\t\t\t\t'descr' => 'Name of the stock status. Only stock statuses registered in the store are processed.'\n\t\t\t),\t\t\t \n\t\t\t'shipping' => array(\n\t\t\t\t'field' => 'shipping',\n\t\t\t\t'copy' => true,\n\t\t\t\t'name' => 'Requires Shipping',\n\t\t\t\t'descr' => '1 - Yes, 0 - No.'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'field' => 'status',\n\t\t\t\t'name' => 'Status',\n\t\t\t\t'descr' => \"Status 'Enabled' can be defined by '1' or 'Y'. If the status column is not used then behavior depends on the extension settings.\"\n\t\t\t),\t\t\t\n\t\t\tarray(\n\t\t\t\t'field' => 'image',\n\t\t\t\t'name' => 'Main Product Image',\n\t\t\t\t'descr' => \"A relative path to the image file within 'image' directory or URL.\"\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'field' => 'additional_image',\n\t\t\t\t'name' => 'Additional Product Image',\n\t\t\t\t'descr' => \"A relative path to the image file within 'image' directory or URL.\"\n\t\t\t),\n\t\t\tarray(\t\t\t\t\n\t\t\t\t'field' => 'manufacturer_id',\n\t\t\t\t'name' => 'Manufacturer',\n\t\t\t\t'descr' => 'Manufacturer name'\n\t\t\t),\n\t\t\tarray(\t\t\t\t\n\t\t\t\t'field' => 'manufacture_catalog_no',\n\t\t\t\t'name' => 'Manufacture Catalog No',\n\t\t\t\t'descr' => 'Manufacture catalog no'\n\t\t\t),\n\t\t\tarray(\t\t\t\t\n\t\t\t\t'field' => 'manufacture_product_code',\n\t\t\t\t'name' => 'Manufacture Product Code',\n\t\t\t\t'descr' => 'Manufacture product code'\n\t\t\t),\n\t\t\tarray(\t\t\t\t\n\t\t\t\t'field' => 'manufacture_catalog_name',\n\t\t\t\t'name' => 'Manufacture Catalog Name',\n\t\t\t\t'descr' => 'Manufacture catalog name'\n\t\t\t),\t\t\t\n\t\t\tarray(\n\t\t\t\t'field' => 'price',\n\t\t\t\t'name' => 'Price',\n\t\t\t\t'descr' => 'Regular product price in primary currency (' . $this->common->config('config_currency') . ')',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'field' => 'manufacturer_price',\n\t\t\t\t'name' => 'Manufacturer Price',\n\t\t\t\t'descr' => 'Product manufacturer price in primary currency (' . $this->common->config('config_currency') . ')',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'field' => 'tax_class_id',\n\t\t\t\t'name' => 'Tax class',\n\t\t\t\t'descr' => 'Tax class'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'field' => 'weight',\n\t\t\t\t'name' => 'Weight',\n\t\t\t\t'descr' => 'Weight class units (declared in the store) can be used with the value. Example: 15.98lbs (no spaces).'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'field' => 'length',\n\t\t\t\t'name' => 'Length',\n\t\t\t\t'descr' => 'Length class units (declared in the store) can be used with the value. Example: 1.70m (no spaces)'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'field' => 'width',\n\t\t\t\t'name' => 'Width',\n\t\t\t\t'descr' => 'Length class units (declared in the store) can be used with the value. Example: 1.70m (no spaces)'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'field' => 'height',\n\t\t\t\t'name' => 'Height',\n\t\t\t\t'descr' => 'Length class units (declared in the store) can be used with the value. Example: 1.70m (no spaces)'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'field' => 'meta_keyword',\n\t\t\t\t'name' => 'Meta tag keywords',\n\t\t\t\t'descr' => ''\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'field' => 'meta_title',\n\t\t\t\t'name' => 'Meta title',\n\t\t\t\t'descr' => ''\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'field' => 'meta_description',\n\t\t\t\t'name' => 'Meta tag description',\n\t\t\t\t'descr' => ''\n\t\t\t),\n\t\t\t'points' => array(\n\t\t\t\t'field' => 'points',\n\t\t\t\t'copy' => true,\n\t\t\t\t'name' => 'Points Required',\n\t\t\t\t'descr' => 'Number of reward points required to make purchase'\n\t\t\t),\n\t\t\t'sort_order' => array(\n\t\t\t\t'field' => 'sort_order',\n\t\t\t\t'copy' => true,\n\t\t\t\t'name' => 'Sort Order',\n\t\t\t\t'descr' => ''\n\t\t\t),\n\t\t\t/*array(\n\t\t\t\t'field' => 'seo_keyword',\n\t\t\t\t'name' => 'SEO Keyword',\n\t\t\t\t'descr' => 'SEO friendly URL for the product. Make sure that it is unique in the store.'\n\t\t\t),*/\n\t\t\tarray(\n\t\t\t\t'field' => 'seo_url',\n\t\t\t\t'name' => 'SEO URL',\n\t\t\t\t'must'\t=> 'must',\n\t\t\t\t'descr' => 'SEO friendly URL for the product. Make sure that it is unique in the store.'\t\t\t\t\n\t\t\t),\n\t\t\t/*array(\n\t\t\t\t'field' => 'product_tags',\n\t\t\t\t'name' => 'Product Tags',\n\t\t\t\t'descr' => 'List of product tags separated by comma'\n\t\t\t),*/\n\t\t\tarray(\n\t\t\t\t'field' => 'date_available',\n\t\t\t\t'name' => 'Date Available',\n\t\t\t\t'descr' => 'Format: YYYY-MM-DD, Example: 2012-03-25'\n\t\t\t),\n\t\t\t/*array(\n\t\t\t\t'field' => 'related_product',\n\t\t\t\t'name' => 'Related Product',\n\t\t\t\t'descr' => 'model identifier of the related product',\n\t\t\t),*/\n\t\t\t'downloads' => array(\n\t\t\t\t'field' => 'downloads',\n\t\t\t\t'name' => 'Downloads',\n\t\t\t\t'descr' => 'Downloadable file(s)',\n\t\t\t),\n\t\t\t/*'layout' => array(\n\t\t\t\t'field' => 'layout',\n\t\t\t\t'name' => 'Laytout',\n\t\t\t\t'descr' => 'Product layout'\n\t\t\t),*/\n\t\t);\n\t\t\n\t\t/*$enable_delete_flag = true;\n\t\tif ($enable_delete_flag) {\n\t\t\t$fields[] = array(\n\t\t\t\t'field' => 'delete_product_flag',\n\t\t\t\t'name' => '\"Delete Product\" Flag',\n\t\t\t\t'descr' => 'Any non-empty value will be treated as positive confirmation, be careful',\n\t\t\t);\n\t\t\t$fields[] = array(\n\t\t\t\t'field' => 'remove_from_store',\n\t\t\t\t'name' => 'Remove from Store',\n\t\t\t\t'descr' => \"Set this flag to a non empty value in order to remove the product from the stores selected on the prevous step (without real deletion from the database). It might be useful for multi-store solutions.\",\n\t\t\t);\n\t\t}*/\n\t\t\n\t\t/*if ($this->config->get('ka_pi_enable_product_id')) {\n\t\t\t$product_id_field = array(\n\t\t\t\t'field' => 'product_id',\n\t\t\t\t'name' => 'product_id',\n\t\t\t\t'descr' => 'You import this value at your own risk.'\n\t\t\t);\n\t\t\tarray_unshift($fields, $product_id_field);\n\t\t}*/\n\n\t\t$this->addCustomProductFields($fields);\n\t\t\n\t\t/*foreach ($this->key_fields as $kfk => $kfv) {\n\t\t\t$fields[$kfv]['required'] = true;\n\t\t}*/\n\t\t\n\t\t$specials = array(\n\t\t\tarray(\n\t\t\t\t'field' => 'customer_group',\n\t\t\t\t'name' => 'Customer Group',\n\t\t\t\t'descr' => ''\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'field' => 'priority',\n\t\t\t\t'name' => 'Prioirity',\n\t\t\t\t'descr' => ''\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'field' => 'price',\n\t\t\t\t'name' => 'Price',\n\t\t\t\t'descr' => ''\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'field' => 'date_start',\n\t\t\t\t'name' => 'Date Start',\n\t\t\t\t'descr' => 'Format: YYYY-MM-DD, Example: 2012-03-25'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'field' => 'date_end',\n\t\t\t\t'name' => 'Date End',\n\t\t\t\t'descr' => 'Format: YYYY-MM-DD, Example: 2012-03-25'\n\t\t\t),\n\t\t);\t\t\t\n\n\t\t$discounts = array(\n\t\t\tarray(\n\t\t\t\t'field' => 'customer_group',\n\t\t\t\t'name' => 'Customer Group',\n\t\t\t\t'descr' => ''\n\t\t\t),\n\t\t\t'quantity' => array(\n\t\t\t\t'field' => 'quantity',\n\t\t\t\t'name' => 'Quantity',\n\t\t\t\t'descr' => ''\n\t\t\t),\n\t\t\t'priority' => array(\n\t\t\t\t'field' => 'priority',\n\t\t\t\t'name' => 'Prioirity',\n\t\t\t\t'descr' => ''\n\t\t\t),\n\t\t\t'price' => array(\n\t\t\t\t'field' => 'price',\n\t\t\t\t'name' => 'Price',\n\t\t\t\t'descr' => ''\n\t\t\t),\n\t\t\t'date_start' => array(\n\t\t\t\t'field' => 'date_start',\n\t\t\t\t'name' => 'Date Start',\n\t\t\t\t'descr' => 'Format: YYYY-MM-DD, Example: 2012-03-25'\n\t\t\t),\n\t\t\t'date_end' => array(\n\t\t\t\t'field' => 'date_end',\n\t\t\t\t'name' => 'Date End',\n\t\t\t\t'descr' => 'Format: YYYY-MM-DD, Example: 2012-03-25'\n\t\t\t),\n\t\t);\t\t\t\n\n\t\t$reward_points = array(\n\t\t\t'customer_group' => array(\n\t\t\t\t'field' => 'customer_group',\n\t\t\t\t'name' => 'Customer Group',\n\t\t\t\t'descr' => '',\n\t\t\t),\n\t\t\t'points' => array(\n\t\t\t\t'field' => 'points',\n\t\t\t\t'name' => 'Reward Points',\n\t\t\t\t'descr' => '',\n\t\t\t),\n\t\t);\n\n\t\t$ext_options = array(\n\t\t\t'name' => array(\n\t\t\t\t'field' => 'name',\n\t\t\t\t'name' => 'Option Name',\n\t\t\t\t'descr' => 'required'\n\t\t\t),\n\t\t\t'type' => array(\n\t\t\t\t'field' => 'type',\n\t\t\t\t'name' => 'Option Type',\n\t\t\t\t'descr' => 'required'\n\t\t\t),\n\t\t\t'value' => array(\n\t\t\t\t'field' => 'value',\n\t\t\t\t'name' => 'Option Value',\n\t\t\t\t'descr' => 'required'\n\t\t\t),\n\t\t\t'required' => array(\n\t\t\t\t'field' => 'required',\n\t\t\t\t'name' => 'Option Required',\n\t\t\t\t'descr' => ''\n\t\t\t),\n\t\t\t'image' => array(\n\t\t\t\t'field' => 'image',\n\t\t\t\t'name' => 'Option Image',\n\t\t\t\t'descr' => ''\n\t\t\t),\n\t\t\t'sort_order' => array(\n\t\t\t\t'field' => 'sort_order',\n\t\t\t\t'name' => 'Value Sort Order',\n\t\t\t\t'descr' => 'Sort order for option values'\n\t\t\t),\n\t\t\t'group_sort_order' => array(\n\t\t\t\t'field' => 'group_sort_order',\n\t\t\t\t'name' => 'Group Sort Order',\n\t\t\t\t'descr' => 'Sort order for option groups. Empty cells are skipped.'\n\t\t\t),\n\t\t\t'quantity' => array(\n\t\t\t\t'field' => 'quantity',\n\t\t\t\t'name' => 'Option Quantity',\n\t\t\t\t'descr' => ''\n\t\t\t),\n\t\t\t'subtract' => array(\n\t\t\t\t'field' => 'subtract',\n\t\t\t\t'name' => 'Option Subtract',\n\t\t\t\t'descr' => ''\n\t\t\t),\n\t\t\t'price' => array(\n\t\t\t\t'field' => 'price',\n\t\t\t\t'name' => 'Option Price',\n\t\t\t\t'descr' => ''\n\t\t\t),\n\t\t\t'points' => array(\n\t\t\t\t'field' => 'points',\n\t\t\t\t'name' => 'Option Points',\n\t\t\t\t'descr' => ''\n\t\t\t),\n\t\t\t'weight' => array(\n\t\t\t\t'field' => 'weight',\n\t\t\t\t'name' => 'Option Weight',\n\t\t\t\t'descr' => ''\n\t\t\t),\n\t\t);\n\n\t\t$reviews = array(\n\t\t\t'author' => array(\n\t\t\t\t'field' => 'author',\n\t\t\t\t'name' => 'Author',\n\t\t\t\t'descr' => 'Text field. Mandatory.'\n\t\t\t),\n\t\t\t'text' => array(\n\t\t\t\t'field' => 'text',\n\t\t\t\t'name' => 'Review Text',\n\t\t\t\t'descr' => 'Mandatory.'\n\t\t\t),\n\t\t\t'rating' => array(\n\t\t\t\t'field' => 'rating',\n\t\t\t\t'name' => 'Rating',\n\t\t\t\t'descr' => 'Mandatory. number (1 - 5)'\n\t\t\t),\n\t\t\t'status' => array(\n\t\t\t\t'field' => 'status',\n\t\t\t\t'name' => 'Status',\n\t\t\t\t'descr' => '1 - enabled (default value), 0 - disabled'\n\t\t\t),\n\t\t\t'date_added' => array(\n\t\t\t\t'field' => 'date_added',\n\t\t\t\t'name' => 'Date Added',\n\t\t\t\t'descr' => 'Recommended format:YYYY-MM-DD HH:MM:SS'\n\t\t\t),\n\t\t\t'date_modified' => array(\n\t\t\t\t'field' => 'date_modified',\n\t\t\t\t'name' => 'Date Modified',\n\t\t\t\t'descr' => 'Recommended format:YYYY-MM-DD HH:MM:SS'\n\t\t\t),\n\t\t);\n\t\t\n\t\t$sets = array(\n\t\t\t'fields' => $fields,\n\t\t\t'discounts' => $discounts,\n\t\t\t'specials' => $specials,\n\t\t\t'reward_points' => $reward_points,\n\t\t\t'ext_options' => $ext_options,\n\t\t\t'reviews' => $reviews,\n\t\t);\n\t\n\t\t$sets['attributes'] = $this->attributes->getAttributes();\n\t\t\n\t\t$sets['options'] = $this->option->getOptions();\n\t\t\n\t\t$sets['filter_groups'] = $this->filter->getFilterGroups();\n\t\t\n\t\t/*$sets['product_profiles'] = array(\n\t\t\t'name' => array(\n\t\t\t\t'field' => 'name',\n\t\t\t\t'name' => 'Profile name',\n\t\t\t\t'descr' => '',\n\t\t\t),\n\t\t\t'customer_group' => array(\n\t\t\t\t'field' => 'customer_group',\n\t\t\t\t'name' => 'Customer Group',\n\t\t\t\t'descr' => '',\n\t\t\t),\n\t\t);*/\n\t\t/*echo \"<pre>\";\n\t\tprint_r($sets['attributes']);\n\t\techo \"</pre>\";\t\n\t\texit;*/\n\t\treturn $sets;\n\t}", "title": "" }, { "docid": "98059e53efa9b0dd7897903b4ac2a2f4", "score": "0.48873982", "text": "private function setGroupingDataStats ()\n {\n $sql = 'SELECT ' . $this->grouping_column . ' , count(1) count FROM ' . $this->sql['tables'] . ' WHERE ' . $this->sql['joins'];\n if ( $this->query )\n $sql .= ' and (' . $this->query . ')';\n\n $sql .= $this->deletedQuery();\n $sql .= ' group by ' . $this->grouping_column;\n\n $sql = 'SELECT COUNT(1) count FROM (' . $sql . ') a';\n $this->stats = [\n 'total' => DB::select(DB::raw($sql))[0]->count,\n 'page' => $this->page,\n 'record' => $this->limit,\n ];\n }", "title": "" }, { "docid": "969bda475884e50ce2d0fc650dbfdcf1", "score": "0.48858818", "text": "public static function grid_options()\n {\n return array(\n array(\n 'type' => 'responsive_sizes',\n 'param_name' => 'num_cols',\n 'heading' => __( 'Number of Columns', RF_FRAMEWORK_DOMAIN ),\n 'group' => __( 'Grid', RF_FRAMEWORK_DOMAIN ),\n 'devices' => array('lg','md','sm','xs'),\n 'fields' => array('width')\n ),\n array(\n 'type' => 'checkbox',\n 'param_name' => 'use_filter',\n 'heading' => __( 'Use Filter', RF_FRAMEWORK_DOMAIN ),\n 'group' => __( 'Grid', RF_FRAMEWORK_DOMAIN ),\n 'value' => array(\n __( 'Yes', RF_FRAMEWORK_DOMAIN ) => 'yes'\n )\n ),\n array(\n 'type' => 'dropdown',\n 'param_name' => 'filter_taxonomy',\n 'heading' => __( 'Filter Source', RF_FRAMEWORK_DOMAIN ),\n 'group' => __( 'Grid', RF_FRAMEWORK_DOMAIN ),\n 'value' => self::get_taxonomy_options(),\n 'description' => __( 'The taxonomy for which terms are used to filter the data', RF_FRAMEWORK_DOMAIN ),\n 'dependency' => array(\n 'element' => 'use_filter',\n 'value' => 'yes'\n )\n ),\n array(\n 'type' => 'checkbox',\n 'param_name' => 'filter_all',\n 'heading' => __( 'Include Show All', RF_FRAMEWORK_DOMAIN ),\n 'group' => __( 'Grid', RF_FRAMEWORK_DOMAIN ),\n 'value' => array(\n __( 'Yes', RF_FRAMEWORK_DOMAIN ) => 'yes'\n ),\n 'dependency' => array(\n 'element' => 'use_filter',\n 'value' => 'yes'\n )\n )\n );\n }", "title": "" }, { "docid": "69780aa581a2143d1482c67078512d95", "score": "0.48830768", "text": "public function values()\n\t{\n\t\t$args = func_get_args();\n\n\t\tforeach ($args as $array)\n\t\t{\n\t\t\tif (is_array($array))\n\t\t\t{\n\t\t\t\t$this->_settings['values'] = array_merge($this->_settings['values'], $array);\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "b31fc438f8fd152191f090cb942d5b32", "score": "0.48563138", "text": "public function getMultipleGroupedData()\r\n\t{\r\n\t\t$calculatedData = $this->getCalculatedData();\r\n\r\n\t\t$grouping = $this->getFormElement('groupingBy');\r\n\t\t$groupingValue = $grouping ? $grouping->getValue() : null;\r\n\r\n\t\t$calculateField = $this->getFormElement('calculate');\r\n\t\t$calculateValue = $calculateField ? $calculateField->getValue() : null;\r\n\r\n\t\t$items = [];\r\n\t\t$config = [];\r\n\t\tif ($groupingValue == self::GROUPING_BY_DATE)\r\n\t\t{\r\n\t\t\t$config['mode'] = 'date';\r\n\t\t}\r\n\r\n\t\t$amount = [];\r\n\t\t$amount['value'] = 0;\r\n\t\t$amount['prefix'] = '';\r\n\t\t$amount['postfix'] = '';\r\n\r\n\t\t$amountCalculateItem = $calculatedData['amount'];\r\n\t\t$calculatedDataValues = array_values($calculatedData);\r\n\t\t$currencyOfFirstElement = isset($calculatedDataValues[0]['currencyId']) ? $calculatedDataValues[0]['currencyId'] : 'RUB';\r\n\r\n\t\tswitch ($calculateValue)\r\n\t\t{\r\n\t\t\tcase self::WHAT_WILL_CALCULATE_DEAL_CONVERSION:\r\n\t\t\t\t$amount['value'] = round($amountCalculateItem, 2);\r\n\t\t\t\t$amount['postfix'] = '%';\r\n\t\t\t\tbreak;\r\n\t\t\tcase self::WHAT_WILL_CALCULATE_DEAL_SUM:\r\n\t\t\tcase self::WHAT_WILL_CALCULATE_DEAL_WON_SUM:\r\n\t\t\tcase self::WHAT_WILL_CALCULATE_FIRST_DEAL_WON_SUM:\r\n\t\t\tcase self::WHAT_WILL_CALCULATE_RETURN_DEAL_WON_SUM:\r\n\t\t\t\t$amount['value'] = \\CCrmCurrency::MoneyToString(round($amountCalculateItem, 2), $currencyOfFirstElement);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\t$amount['value'] = $amountCalculateItem;\r\n\t\t}\r\n\r\n\t\tunset($calculatedData['amount']);\r\n\r\n\t\tforeach ($calculatedData as $groupingKey => $item)\r\n\t\t{\r\n\r\n\t\t\t$resultItem = array(\r\n\t\t\t\t'groupBy' => $groupingKey,\r\n\t\t\t\t'label' => $item['title'],\r\n\t\t\t\t'value' => $item['value'],\r\n\t\t\t);\r\n\r\n\t\t\tswitch ($calculateValue)\r\n\t\t\t{\r\n\t\t\t\tcase self::WHAT_WILL_CALCULATE_DEAL_CONVERSION:\r\n\t\t\t\t\t$resultItem['postfix'] = '%';\r\n\t\t\t\t\t$resultItem['value'] = round($resultItem['value'], 2);\r\n\t\t\t\t\t$resultItem['slider'] = false;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase self::WHAT_WILL_CALCULATE_DEAL_SUM:\r\n\t\t\t\tcase self::WHAT_WILL_CALCULATE_DEAL_WON_SUM:\r\n\t\t\t\tcase self::WHAT_WILL_CALCULATE_FIRST_DEAL_WON_SUM:\r\n\t\t\t\tcase self::WHAT_WILL_CALCULATE_RETURN_DEAL_WON_SUM:\r\n\t\t\t\t\t$view = $this->getView();\r\n\t\t\t\t\tif (!($view instanceof LinearGraph))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$resultItem['value'] = \\CCrmCurrency::MoneyToString($resultItem['value'], $item['currencyId']);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tswitch ($groupingValue)\r\n\t\t\t{\r\n\t\t\t\tcase self::GROUPING_BY_RESPONSIBLE:\r\n\t\t\t\t\t$resultItem['slider'] = true;\r\n\t\t\t\t\t$resultItem['targetUrl'] = $this->getTargetUrl('/crm/deal/analytics/list/', [\r\n\t\t\t\t\t\t'ASSIGNED_BY_ID_label' => $item['title'],\r\n\t\t\t\t\t\t'ASSIGNED_BY_ID_value' => $groupingKey,\r\n\t\t\t\t\t\t'ASSIGNED_BY_ID' => $groupingKey,\r\n\t\t\t\t\t]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\t$items[] = $resultItem;\r\n\t\t\t$config['groupsLabelMap'][$groupingKey] = $item['title'];\r\n\t\t\t$config['groupsLogoMap'][$groupingKey] = $item['logo'];\r\n\t\t\t$config['groupsTargetUrlMap'][$groupingKey] = $item['targetUrl'];\r\n\t\t}\r\n\r\n\r\n\r\n\t\t$config['reportTitle'] = $this->getFormElement('label')->getValue();\r\n\t\t$config['reportColor'] = $this->getFormElement('color')->getValue();\r\n\t\t$config['reportTitleShort'] = 'dasda';\r\n\t\t$config['reportTitleMedium'] = 'meduim';\r\n\r\n\t\tif ($groupingValue === self::GROUPING_BY_RESPONSIBLE)\r\n\t\t{\r\n\t\t\t$sliderDisableCalculateTypes = [\r\n\t\t\t\tself::WHAT_WILL_CALCULATE_DEAL_CONVERSION\r\n\t\t\t];\r\n\t\t\tif (!in_array($calculateValue, $sliderDisableCalculateTypes))\r\n\t\t\t{\r\n\t\t\t\t$amount['slider'] = true;\r\n\t\t\t\t$amount['targetUrl'] = $this->getTargetUrl('/crm/deal/analytics/list/');\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\t$config['amount'] = $amount;\r\n\t\t$result = [\r\n\t\t\t'items' => $items,\r\n\t\t\t'config' => $config,\r\n\t\t];\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "a252bd7ae1917dae8df0e923829a0966", "score": "0.4850929", "text": "public function fillGrid(){\r\n\t\tparent::fillGrid($this->grid,Array('prtGHQ'),'reg_sales LEFT JOIN vw_product_type ON prtID=activity');\r\n\t}", "title": "" }, { "docid": "c76bb544d4a97b8056755a147fb143d7", "score": "0.48474783", "text": "private function _setConfigs() {\n\t}", "title": "" }, { "docid": "2954a2a1826367e6ee45607e0a8b9f28", "score": "0.48293552", "text": "abstract protected function setValues();", "title": "" }, { "docid": "2954a2a1826367e6ee45607e0a8b9f28", "score": "0.48293552", "text": "abstract protected function setValues();", "title": "" }, { "docid": "213d364cfaa2632a321b8c334d43bcc6", "score": "0.4804837", "text": "protected function set_root_value( $value ) {\n\t\t$id_base = $this->id_data['base'];\n\t\tif ( 'option' === $this->type ) {\n\t\t\t$autoload = true;\n\t\t\tif ( isset( self::$aggregated_multidimensionals[ $this->type ][ $this->id_data['base'] ]['autoload'] ) ) {\n\t\t\t\t$autoload = self::$aggregated_multidimensionals[ $this->type ][ $this->id_data['base'] ]['autoload'];\n\t\t\t}\n\t\t\treturn update_option( $id_base, $value, $autoload );\n\t\t} elseif ( 'theme_mod' === $this->type ) {\n\t\t\tset_theme_mod( $id_base, $value );\n\t\t\treturn true;\n\t\t} else {\n\t\t\t/*\n\t\t\t * Any WP_Customize_Setting subclass implementing aggregate multidimensional\n\t\t\t * will need to override this method to obtain the data from the appropriate\n\t\t\t * location.\n\t\t\t */\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "d438f2317e01d3ce89fe84c56978216b", "score": "0.48048037", "text": "function section_optionator( $settings ){\n\n\t\t$settings = wp_parse_args( $settings, $this->optionator_default );\n\n\t\t\t$array = array(\n\n\t\t\t\t'starbar_options'\t=> array(\n\t\t\t\t\t'type'\t=> 'multi_option',\n\t\t\t\t\t'title' => 'StarBar Configuration',\n\t\t\t\t\t'selectvalues'\t=> array(\n\n\t\t\t\t\t\t'starbar_count' => array(\n\t\t\t\t\t\t\t'type' \t\t\t=> 'count_select',\n\t\t\t\t\t\t\t'count_start'\t=> 1,\n\t\t\t\t\t\t\t'count_number'\t=> 12,\n\t\t\t\t\t\t\t'default'\t\t=> '3',\n\t\t\t\t\t\t\t'inputlabel' \t=> __( 'Number of StarBars to Configure', 'starbar' )\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'starbar_total'\t=> array(\n\t\t\t\t\t\t\t'type' \t\t\t=> 'text',\n\t\t\t\t\t\t\t'default'\t\t=> 100,\n\t\t\t\t\t\t\t'inputlabel' \t\t=> __( 'Starbar Total Count (Number)', 'starbar' )\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'starbar_modifier'\t=> array(\n\t\t\t\t\t\t\t'type' \t\t\t=> 'text',\n\t\t\t\t\t\t\t'default'\t\t=> '%',\n\t\t\t\t\t\t\t'inputlabel' \t\t=> __( 'Starbar Modifier (Text Added to Stats)', 'starbar' )\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'starbar_format'\t=> array(\n\t\t\t\t\t\t\t'type' \t\t\t=> 'select',\n\t\t\t\t\t\t\t'selectvalues'\t\t=> array(\n\t\t\t\t\t\t\t\t'append'\t\t=> array( 'name' => 'Append Modifier (Default)' ),\n\t\t\t\t\t\t\t\t'prepend'\t \t=> array( 'name' => 'Prepend Modifier' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t'default'\t\t=> 'append',\n\t\t\t\t\t\t'inputlabel' \t=> __( 'Starbar Format', 'pagelines' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'starbar_container_title'\t=> array(\n\t\t\t\t\t\t\t'type' \t\t\t=> 'text',\n\t\t\t\t\t\t\t'default'\t\t=> 'StarBar',\n\t\t\t\t\t\t\t'inputlabel' \t=> __( 'StarBar Title (Optional)', 'starbar' ),\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\n\t\tglobal $post_ID;\n\n\t\t$oset = array('post_id' => $post_ID, 'clone_id' => $settings['clone_id'], 'type' => $settings['type']);\n\n\t\t$slides = (pl_setting( 'starbar_count' , $oset )) ? pl_setting( 'starbar_count' , $oset ) : $this->default_limit;\n\n\t\t$opts = array();\n\n\t\tfor($i = 1; $i <= $slides; $i++){\n\n\t\t\t$opts[ 'starbar_descriptor_' . $i ]\t= array(\n\t\t\t\t\t'inputlabel'\t\t=> sprintf( __( 'Starbar #%s Description', 'starbar' ), $i ),\n\t\t\t\t\t'type'\t\t=> 'text'\n\t\t\t);\n\t\t\t$opts['starbar_value_' . $i ] = array(\n\t\t\t\t\t'inputlabel'\t=> sprintf( __( 'Starbar #%s Value', 'starbar' ), $i ),\n\t\t\t\t\t'type'\t=> 'text',\n\n\t\t\t);\n\t\t}\n\t\t\t$array['starbars_data'] = array(\n\t\t\t\t'title' \t=> __( 'StarBar Values', 'starbar' ),\n\t\t\t\t'type' \t\t=> 'multi_option',\n\t\t\t\t'selectvalues' \t\t=> $opts\n\t\t\t\t);\n\n\t\t\t$metatab_settings = array(\n\t\t\t\t\t'id' \t\t=> 'starbar_options',\n\t\t\t\t\t'name' \t\t=> __( 'Starbar', 'starbar' ),\n\t\t\t\t\t'icon' \t\t=> $this->icon,\n\t\t\t\t\t'clone_id'\t=> $settings['clone_id'],\n\t\t\t\t\t'active'\t=> $settings['active']\n\t\t\t\t);\n\t\t\tregister_metatab( $metatab_settings, $array );\n\t}", "title": "" }, { "docid": "a76fa82fffe02fed8577b1d3cc944044", "score": "0.4799558", "text": "function setAggregate($pGrp, $pRes=0, $pCol=false, $pTipo='S') {\n if ($pCol) $this->groups[$pGrp]->resume[$pRes][$pCol] = $pTipo;\n}", "title": "" }, { "docid": "021598093a2daf6fef31018d28ea9b34", "score": "0.47793347", "text": "function sumfields_initialize_user_settings() {\n $fields = array();\n sumfields_save_setting('active_fields', $fields);\n\n // Which financial_type_ids are used to calculate the general contribution\n // summary fields?\n $values = sumfields_get_all_financial_types();\n sumfields_save_setting('financial_type_ids', array_keys($values));\n\n // Which financial_type_ids are used to calculate the last membership\n // payment fields?\n sumfields_save_setting('membership_financial_type_ids', array_keys($values));\n\n // Which event type ids are used when calculating event fields?\n $values = sumfields_get_all_event_types();\n sumfields_save_setting('event_type_ids', array_keys($values));\n\n // Which participant status ids are used to calculate attendended events \n $values = sumfields_get_all_participant_status_types();\n // When initializing, only use the attended.\n $initial_status_types = preg_grep('/Attended/', $values);\n sumfields_save_setting('participant_status_ids', array_keys($initial_status_types));\n\n // Which participant status ids are used to calculate no shows\n $values = sumfields_get_all_participant_status_types();\n // When initializing, only use 'No-show' if it exists, otherwise nothing\n // (note: no-show was added in 4.4) \n $initial_noshow_status_types = preg_grep('/No-show/', $values);\n sumfields_save_setting('participant_noshow_status_ids', array_keys($initial_noshow_status_types));\n}", "title": "" }, { "docid": "a3c4b34c86b2a1391d0bf3d99f5d678b", "score": "0.47759157", "text": "function setValues() {\n\t}", "title": "" }, { "docid": "4772b2dadc00780efe6e0e228afb51a6", "score": "0.47571093", "text": "protected function set_grid_items() {\n\t\t// Test input for array with posts.\n\t\tif ( is_array( $this->input ) && count( $this->input ) > 0 ) {\n\t\t // Retrieve all items for this block.\n\t\t\t// Reset grid items array.\n\t\t\t$this->grid_items = array();\n\t\t\tforeach ( $this->input as $item ) {\n\t\t\t\tif ( is_array( $item ) ) {\n\t\t\t\t\t$this->add_grid_item( $this->create_grid_item_from_layout( $item ) );\n\t\t\t\t} elseif ( is_object( $item ) || is_numeric( $item ) ) {\n\t\t\t\t\t$this->add_grid_item( self::create_grid_item_from_post( $item, $this->element ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ( count( $this->grid_items ) > 0 ) {\n\t\t\t$this->has_grid_items = true;\n\t\t}\n\t}", "title": "" }, { "docid": "96ad7b0c5cf248cd2229caaedb524884", "score": "0.47265163", "text": "public function thawPropertiesSetsPropertyValues() {}", "title": "" }, { "docid": "62f428cb8f66abfd0384f5f356cff29e", "score": "0.47089645", "text": "public function getDataWithTypeFieldAndFieldIsMultiDimensional() : void {}", "title": "" }, { "docid": "dacaaea7dd0633cfa91d90725a3c7171", "score": "0.47019428", "text": "protected function setImageMagickDetailSettings() {}", "title": "" }, { "docid": "53cb6aee695f575e7104680b35b64423", "score": "0.46958566", "text": "function get_settings_fields() {\n $settings_fields = array(\n\t\t 'general_uc_section' => array(\n array(\n 'name' => 'innerzoom',\n 'label' => __( 'Inner zoom', 'uc-woocommerce-zoom' ),\n 'desc' => __( 'Displaying zoom magnifier inside image.', 'uc-woocommerce-zoom' ),\n 'type' => 'radio',\n 'default' => 'false',\n 'options' => array(\n 'true' => 'Yes',\n 'false' => 'No'\n )\n ),\n\t\t\t\tarray(\n\t\t 'name' => 'cursorshade',\n\t\t 'label' => __( 'Cursor shade', 'uc-woocommerce-zoom' ),\n\t\t 'desc' => __( 'Displaying rectangle under cursor.', 'uc-woocommerce-zoom' ),\n\t\t 'type' => 'radio',\n\t\t 'default' => 'true',\n 'options' => array(\n 'true' => 'Yes',\n 'false' => 'No'\n \t)\n ),\n array(\n 'name' => 'magnifierpos',\n 'label' => __( 'Magnifier position', 'uc-woocommerce-zoom' ),\n 'desc' => __( 'Displaying where container been. Default right.', 'uc-woocommerce-zoom' ),\n 'type' => 'radio',\n 'default' => 'right',\n 'options' => array(\n 'right' => 'Right',\n 'left' => 'Left'\n )\n ), \n array(\n 'name' => 'zoomstart',\n 'label' => __( 'Zoom level', 'uc-woocommerce-zoom' ),\n 'desc' => __( 'Change zoom on hover. Default zoom 2 times.', 'uc-woocommerce-zoom' ),\n 'type' => 'number',\n 'default' => '2' \n ),\n array(\n 'name' => 'magnifycursor',\n 'label' => __( 'Cursor view', 'uc-woocommerce-zoom' ),\n 'desc' => __( 'Change cursor style on hover. Default CSS cursor \"crosshair\".', 'uc-woocommerce-zoom' ),\n 'type' => 'select',\n 'default' => 'crosshair',\n 'options' => array(\n 'crosshair' => 'Default cursor',\n 'pointer' => 'Pointer cursor',\n 'cursor' => 'Windows cursor'\n )\n ),\n array(\n\t\t 'name' => 'cursorshadecolor',\n\t\t 'label' => __( 'Cursor color shade', 'uc-woocommerce-zoom' ),\n\t\t 'desc' => __( 'Change color rectangle under cursor. Default grey.', 'uc-woocommerce-zoom' ),\n\t\t 'type'\t\t=> 'color',\n\t\t 'default' => '#cecece' \n\t\t\t\t),\n array(\n 'name' => 'cursorshadeopacity',\n 'label' => __( 'Cursor color shade opacity', 'uc-woocommerce-zoom' ),\n 'desc' => __( 'Change cursor color shade opacity. Default opacity 0.3.', 'uc-woocommerce-zoom' ),\n 'type' => 'select',\n 'default' => '0.3',\n 'options' => array(\n '0.1' => '0.1',\n '0.2' => '0.2',\n '0.3' => '0.3',\n '0.4' => '0.4',\n '0.5' => '0.5',\n '0.6' => '0.6',\n '0.7' => '0.7',\n '0.8' => '0.8',\n '0.9' => '0.9'\n )\n )\n\t\t\t)\n\t\t);\n\t\treturn $settings_fields;\n }", "title": "" }, { "docid": "219ffe74c309324fdc53d080eb526eae", "score": "0.4669652", "text": "public function getMultipleData()\r\n\t{\r\n\r\n\t\t$calculatedData = $this->getCalculatedData();\r\n\t\t$items = [];\r\n\t\t$amountDealCount = 0;\r\n\t\t$amountDealSum = 0;\r\n\t\t$amountDealCurrencyId = 'RUB';\r\n\t\t$config = [\r\n\t\t\t'title' => $this->getFormElement('label')->getValue()\r\n\t\t];\r\n\r\n\t\tif (!empty($calculatedData))\r\n\t\t{\r\n\t\t\t$calculateField = $this->getFormElement('calculate');\r\n\t\t\t$calculateValue = $calculateField ? $calculateField->getValue() : null;\r\n\t\t\tswitch ($calculateValue)\r\n\t\t\t{\r\n\t\t\t\tcase self::WHAT_WILL_CALCULATE_DEAL_CONVERSION:\r\n\t\t\t\t\t$config['mode'] = 'singleData';\r\n\t\t\t\t\t$config['unitOfMeasurement'] = '%';\r\n\t\t\t\t\t$item['value'] = round($calculatedData['withoutGrouping'], 2);\r\n\t\t\t\t\t$item['color'] = '#9DCF00';\r\n\t\t\t\t\t$items[] = $item;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tforeach ($calculatedData as $key => $data)\r\n\t\t\t\t\t{\r\n\r\n\t\t\t\t\t\tif ($key === 'amount') //TODO: optimise calculating of amount values\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t//TEMP solution for funnel\r\n\t\t\t\t\t\tif ($this->getView()->getKey() === ColumnFunnel::VIEW_KEY)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$funnelCalculateModeField = $this->getWidgetHandler()->getFormElement('calculateMode');\r\n\t\t\t\t\t\t\t$funnelCalculateModeValue = $funnelCalculateModeField->getValue();\r\n\r\n\t\t\t\t\t\t\tif ($funnelCalculateModeValue === ColumnFunnel::CLASSIC_CALCULATE_MODE)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tforeach ($items as &$previewsItem)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$previewsItem['value'] += $data['value'];\r\n\t\t\t\t\t\t\t\t\tif (isset($data['additionalValues']['sum']))\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tif (!isset($previewsItem['additionalValues']['sum']['value']))\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t$previewsItem['additionalValues']['sum']['value'] = 0;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t$previewsItem['additionalValues']['sum']['value'] += $data['additionalValues']['sum']['VALUE'];\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t$item = [\r\n\t\t\t\t\t\t\t'label' => $data['title'],\r\n\t\t\t\t\t\t\t'value' => $data['value'],\r\n\t\t\t\t\t\t\t'color' => $data['color'],\r\n\t\t\t\t\t\t];\r\n\r\n\t\t\t\t\t\t$amountDealCount += $data['value'];\r\n\t\t\t\t\t\tif (isset($data['additionalValues']['sum']))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$item['additionalValues']['sum'] = [\r\n\t\t\t\t\t\t\t\t'value' => $data['additionalValues']['sum']['VALUE'],\r\n\t\t\t\t\t\t\t\t'currencyId' => $data['additionalValues']['sum']['currencyId']\r\n\t\t\t\t\t\t\t];\r\n\t\t\t\t\t\t\t$amountDealSum += $data['additionalValues']['sum']['VALUE'];\r\n\t\t\t\t\t\t\t$amountDealCurrencyId = $data['additionalValues']['sum']['currencyId'];\r\n\t\t\t\t\t\t\t$config['additionalValues']['sum']['titleShort'] = Loc::getMessage('CRM_REPORT_DEAL_HANDLER_DEAL_SUM_SHORT_TITLE');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$items[] = $item;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$calculateField = $this->getFormElement('calculate');\r\n\t\t\t\t\t$calculateValue = $calculateField ? $calculateField->getValue() : null;\r\n\r\n\t\t\t\t\tswitch ($calculateValue)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcase self::WHAT_WILL_CALCULATE_DEAL_COUNT_AND_SUM:\r\n\t\t\t\t\t\t\tforeach ($items as &$item)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$item['additionalValues']['sum']['value'] = \\CCrmCurrency::MoneyToString($item['additionalValues']['sum']['value'], $item['additionalValues']['sum']['currencyId']);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$config['titleShort'] = Loc::getMessage('CRM_REPORT_DEAL_HANDLER_DEAL_COUNT_SHORT_TITLE');\r\n\t\t\t\t\t$config['titleMedium'] = 'medium';\r\n\r\n\r\n\t\t\t\t\t$config['valuesAmount'] = [\r\n\t\t\t\t\t\t'firstAdditionalAmount' => [\r\n\t\t\t\t\t\t\t'title' => Loc::getMessage('CRM_REPORT_DEAL_HANDLER_DEAL_SUM_SHORT_TITLE'),\r\n\t\t\t\t\t\t\t'value' => \\CCrmCurrency::MoneyToString($amountDealSum, $amountDealCurrencyId),\r\n\t\t\t\t\t\t],\r\n\t\t\t\t\t\t'secondAdditionalAmount' => [\r\n\t\t\t\t\t\t\t'title' => Loc::getMessage('CRM_REPORT_DEAL_HANDLER_DEAL_COUNT_SHORT_TITLE'),\r\n\t\t\t\t\t\t\t'value' => $amountDealCount\r\n\t\t\t\t\t\t]\r\n\t\t\t\t\t];\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\r\n\r\n\r\n\t\treturn [\r\n\t\t\t'items' => $items,\r\n\t\t\t'config' => $config,\r\n\t\t];\r\n\t}", "title": "" }, { "docid": "a2b72559c09bdca0528a6a0e66ac51cc", "score": "0.46664056", "text": "private function setup_totals_metric(): void {\n\t\t$this->totals = $this->registry->getOrRegisterGauge(\n\t\t\t'prompress',\n\t\t\t'posts_total',\n\t\t\t'Returns the total number of posts',\n\t\t\t[\n\t\t\t\t'post_type',\n\t\t\t],\n\t\t);\n\t}", "title": "" }, { "docid": "151d1e4e2a293b8063effd06c6f0db56", "score": "0.46586415", "text": "public function testUpdateAggregateMetricsForSubmission()\n {\n /** @var Tracker_ProducerModel $producerModel */\n $producerModel = MidasLoader::loadModel('Producer', 'tracker');\n /** @var Tracker_SubmissionModel $submissionModel */\n $submissionModel = MidasLoader::loadModel('Submission', 'tracker');\n /** @var AggregateMetricModel $aggregateMetricModel */\n $aggregateMetricModel = MidasLoader::loadModel('AggregateMetric', 'tracker');\n /** @var AggregateMetricSpecModel $aggregateMetricSpecModel */\n $aggregateMetricSpecModel = MidasLoader::loadModel('AggregateMetricSpec', 'tracker');\n\n /** @var Tracker_ProducerDao $producer100Dao */\n $producer100Dao = $producerModel->load(100);\n /** @var Tracker_SubmissionDao $submission1Dao */\n $submission1Dao = $submissionModel->load(1);\n /** @var Tracker_SubmissionDao $submission2Dao */\n $submission2Dao = $submissionModel->load(2);\n\n // Keep the counts of saved metrics to ensure new ones are saved.\n $submission1Metrics = $aggregateMetricModel->updateAggregateMetricsForSubmission($submission1Dao);\n $submission1MetricsInitialCount = count($submission1Metrics);\n $submission2Metrics = $aggregateMetricModel->updateAggregateMetricsForSubmission($submission2Dao);\n $submission2MetricsInitialCount = count($submission2Metrics);\n\n // Create a new AMS, with a value of 5.0 for submission 1 and 10.0 for submission 2.\n /** @var Tracker_AggregateMetricSpecDao $greedyError25thPercentileAMSDao */\n $name = '25th Percentile Greedy error';\n $spec = \"percentile('Greedy error', 25)\";\n $greedyError25thPercentileAMSDao = $aggregateMetricSpecModel->createAggregateMetricSpec($producer100Dao, $name, $spec);\n\n $submission1AggregateMetricDaos = $aggregateMetricModel->updateAggregateMetricsForSubmission($submission1Dao);\n $submission1MetricValues = array(\n array(19.0 => false),\n array(11.0 => false),\n array(44.0 => false),\n array(36.0 => false),\n array(5.0 => false),\n array(1.0 => false),\n );\n $this->assertEquals(count($submission1AggregateMetricDaos), count($submission1MetricValues));\n\n /** @var Tracker_AggregateMetricDao $submission1AggregateMetricDao */\n foreach ($submission1AggregateMetricDaos as $submission1AggregateMetricDao) {\n /** @var int $index */\n /** @var array $submission1MetricValue */\n foreach ($submission1MetricValues as $index => $submission1MetricValue) {\n if ($submission1AggregateMetricDao->getValue() == key($submission1MetricValue)) {\n $submission1MetricValues[$index] = array(key($submission1MetricValue) => true);\n }\n }\n }\n /** @var int $index */\n /** @var float $submission1MetricValue */\n foreach ($submission1MetricValues as $index => $submission1MetricValue) {\n $this->assertTrue($submission1MetricValue[key($submission1MetricValue)]);\n }\n\n // Add 4 trends with a scalar each and test again.\n $extraTrends = $this->createAdditionalGreedyErrorSubmission1Scalars();\n\n $submission1AggregateMetricDaos = $aggregateMetricModel->updateAggregateMetricsForSubmission($submission1Dao);\n $submission1MetricValues = array(\n array(23.0 => false),\n array(13.0 => false),\n array(44.0 => false),\n array(36.0 => false),\n array(6.0 => false),\n array(1.0 => false),\n );\n $this->assertEquals(count($submission1AggregateMetricDaos), count($submission1MetricValues));\n\n /** @var Tracker_AggregateMetricDao $submission1AggregateMetricDao */\n foreach ($submission1AggregateMetricDaos as $submission1AggregateMetricDao) {\n /** @var int $index */\n /** @var array $submission1MetricValue */\n foreach ($submission1MetricValues as $index => $submission1MetricValue) {\n if ($submission1AggregateMetricDao->getValue() == key($submission1MetricValue)) {\n $submission1MetricValues[$index] = array(key($submission1MetricValue) => true);\n }\n }\n }\n /** @var int $index */\n /** @var float $submission1MetricValue */\n foreach ($submission1MetricValues as $index => $submission1MetricValue) {\n $this->assertTrue($submission1MetricValue[key($submission1MetricValue)]);\n }\n\n $this->deleteExtraTrends($extraTrends);\n\n // Retest after deletion.\n $submission1AggregateMetricDaos = $aggregateMetricModel->updateAggregateMetricsForSubmission($submission1Dao);\n $submission1MetricValues = array(\n array(19.0 => false),\n array(11.0 => false),\n array(44.0 => false),\n array(36.0 => false),\n array(5.0 => false),\n array(1.0 => false),\n );\n $this->assertEquals(count($submission1AggregateMetricDaos), count($submission1MetricValues));\n\n /** @var Tracker_AggregateMetricDao $submission1AggregateMetricDao */\n foreach ($submission1AggregateMetricDaos as $submission1AggregateMetricDao) {\n /** @var int $index */\n /** @var array $submission1MetricValue */\n foreach ($submission1MetricValues as $index => $submission1MetricValue) {\n if ($submission1AggregateMetricDao->getValue() == key($submission1MetricValue)) {\n $submission1MetricValues[$index] = array(key($submission1MetricValue) => true);\n }\n }\n }\n /** @var int $index */\n /** @var float $submission1MetricValue */\n foreach ($submission1MetricValues as $index => $submission1MetricValue) {\n $this->assertTrue($submission1MetricValue[key($submission1MetricValue)]);\n }\n\n // Submission 2.\n\n $submission2AggregateMetricDaos = $aggregateMetricModel->updateAggregateMetricsForSubmission($submission2Dao);\n $submission2MetricValues = array(\n array(22.0 => false),\n array(38.0 => false),\n array(46.0 => false),\n array(54.0 => false),\n array(10.0 => false),\n array(2.0 => false),\n );\n $this->assertEquals(count($submission2AggregateMetricDaos), count($submission2MetricValues));\n\n /** @var Tracker_AggregateMetricDao $submission2AggregateMetricDao */\n foreach ($submission2AggregateMetricDaos as $submission2AggregateMetricDao) {\n /** @var int $index */\n /** @var array $submission2MetricValue */\n foreach ($submission2MetricValues as $index => $submission2MetricValue) {\n if ($submission2AggregateMetricDao->getValue() == key($submission2MetricValue)) {\n $submission2MetricValues[$index] = array(key($submission2MetricValue) => true);\n }\n }\n }\n /** @var int $index */\n /** @var float $submission2MetricValue */\n foreach ($submission2MetricValues as $index => $submission2MetricValue) {\n $this->assertTrue($submission2MetricValue[key($submission2MetricValue)]);\n }\n\n // Test null input.\n $nullSubmissionAggregateMetrics = $aggregateMetricModel->updateAggregateMetricsForSubmission(null);\n $this->assertFalse($nullSubmissionAggregateMetrics);\n\n // Finally ensure that new aggregate metrics have been saved.\n $submission1Metrics = $aggregateMetricModel->getAggregateMetricsForSubmission($submission1Dao);\n $submission1MetricsFinalCount = count($submission1Metrics);\n $submission2Metrics = $aggregateMetricModel->getAggregateMetricsForSubmission($submission2Dao);\n $submission2MetricsFinalCount = count($submission2Metrics);\n\n $this->assertEquals($submission1MetricsInitialCount + 1, $submission1MetricsFinalCount);\n $this->assertEquals($submission2MetricsInitialCount + 1, $submission2MetricsFinalCount);\n }", "title": "" }, { "docid": "519b23df582925f1cd737991f8851866", "score": "0.46573877", "text": "public function parse_all() {\n\n\t\t$vars = $_POST;\n\t\t$s = $this->Setting->find('first',array('order'=>'Setting.created ASC'));\n\t\t\n\t\t$this->Client->create();\n\t\t$data = array();\n\t\tforeach ($vars as $row=>$value) {\n\t\t\t$data['Client'][$row] = $value;\n\t\t}\n\t\t\n\t\t$data = array();\n\t\tforeach ($vars as $row=>$value) {\n\t\t\tif (substr($row,0,1)=='I') {\n\t\t\t\t$data['Client'][substr($row,0)] = $value;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($this->Client->save($data)) {\n\t\t\t$id = $this->Client->getLastInsertID();\n\t\t\tforeach ($vars as $row=>$value) {\n\t\t\t\tif (substr($row,0,1)=='c') {\n\t\t\t\t\t$f = $this->Category->findById(substr($row,1));\n\t\t\t\t\t\n\t\t\t\t\t$i = 1;\n\t\t\t\t\twhile($i<=$s['Setting']['leads_per_industry']){\n\t\t\t\t\t\t$this->Category->Record->create();\n\t\t\t\t\t\t$data = array();\n\t\t\t\t\t\t$data['Record']['client_id'] = $id;\n\t\t\t\t\t\t$data['Record']['category_id'] = substr($row,1);\n\t\t\t\t\t\tif ($f['Category']['use_ranges']=='1') {\n\t\t\t\t\t\t\tif ($value==false) {\n\t\t\t\t\t\t\t\t$data['Record']['select'] = '0';\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (isset($vars['v'.substr($row,1)])) {\n\t\t\t\t\t\t\t\t\t$data['Record']['range_id'] = $vars['v'.substr($row,1)];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$data['Record']['select'] = '1';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$data['Record']['select'] = $value;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->Category->Record->save($data);\n\t\t\t\t\t\t$this->Category->Record->id = false;\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\techo 'done';\n\t\t} else {\n\t\t\techo 'Error: failed to save information.';\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "709ed068ff755683184fab07a7582b74", "score": "0.4657107", "text": "protected function _postPopulate() {}", "title": "" }, { "docid": "7c7ff78ecc56dc308840f4f1a46a30d0", "score": "0.46523538", "text": "private function populate() {\r\n\t\tglobal $wpdb;\r\n\r\n\t\tif ( $item = $wpdb->get_row( $wpdb->prepare( \"SELECT * FROM {$wpdb->prefix}{$this->table} WHERE ID = %d\", $this->ID ) ) ) {\r\n\t\t\tforeach ( $item as $key => $val ) :\r\n\t\t\t\t$this->_properties[$key] = $val;\r\n\t\t\tendforeach;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "16a1e5cb6fdfd80c2cb472ba6c6d1c56", "score": "0.46438423", "text": "private function addItemizedConfig() {\n assert($this->isItemized(), 'The count must be itemized');\n\n $bucketBy = $this->summaryConfig['bucketBy'];\n\n if ($this->dataDictionary->fieldExists($bucketBy)) {\n $bucketByLabel = $this->dataDictionary->getFieldLabel($bucketBy);\n $this->summaryConfig['bucketByFieldExists'] = true;\n $this->summaryConfig['bucketByLabel'] = $bucketByLabel;\n $this->summaryConfig['data'] = $this->mapBucketData();\n } else {\n $this->summaryConfig['bucketByFieldExists'] = false;\n }\n }", "title": "" }, { "docid": "a076c9a1fe8fc0d8d5c12d8260cd1447", "score": "0.4612684", "text": "private function setItems()\n\t{\n\t\t// build our query\n\t\tlist($query, $parameters) = $this->buildQuery();\n\n\t\t// get locale from the database\n\t\t$items = (array) BackendModel::getDB()->getRecords($query, $parameters);\n\n\t\t// init\n\t\t$this->locale = array();\n\n\t\t// group by application, module, type and name\n\t\tforeach($items as $item)\n\t\t{\n\t\t\t$this->locale[$item['application']][$item['module']][$item['type']][$item['name']][] = $item;\n\t\t}\n\n\t\t// no need to keep this around\n\t\tunset($items);\n\t}", "title": "" }, { "docid": "4bd2e1e21393593ea5f3adc048d30f5f", "score": "0.46080694", "text": "public function setMultiple(array $configData);", "title": "" }, { "docid": "71078d0022e47e89e8a82e3eda82c616", "score": "0.46009094", "text": "function fieldValuesAdaptation( $fields, $table, $listing_type = false )\n\t{\n\t\tglobal $config, $rlCache, $edit_mode;\n\n\t\tif ( !$GLOBALS['data_formats'] )\n\t\t{\n\t\t\t$format = $this -> fetch( array( 'ID', 'Key', 'Order_type'), array( 'Parent_ID' => '0', 'Status' => 'active' ) , 'ORDER BY `Key`', null, 'data_formats' );\n\t\t\tforeach ($format as $key => $val)\n\t\t\t{\n\t\t\t\t$data_formats[$format[$key]['Key']] = $val;\n\t\t\t}\n\t\t\tunset($format);\n\t\t\t$GLOBALS['data_formats'] = $data_formats;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data_formats = $GLOBALS['data_formats'];\n\t\t}\n\t\t\n\t\tif ( !empty($fields) )\n\t\t{\n\t\t\tforeach ($fields as $index => $value)\n\t\t\t{\n\t\t\t\tif ( $fields[$index]['Type'] == 'select' || $fields[$index]['Type'] == 'checkbox' || $fields[$index]['Type'] == 'radio' || $fields[$index]['Type'] == 'mixed' )\n\t\t\t\t{\n\t\t\t\t\t// bind with data formats\n\t\t\t\t\tif ( $data_formats[$fields[$index]['Condition']] )\n\t\t\t\t\t{\n\t\t\t\t\t\t$format_values = false;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($fields[$index]['Condition'] == 'years')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$step = 0;\n\t\t\t\t\t\t\tfor( $i = date('Y')+2; $i>= 1940; $i-- )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$format_values[$step]['name'] = $i;\n\t\t\t\t\t\t\t\t$format_values[$step]['Key'] = $i;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$step++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$format_values = $GLOBALS['rlCategories'] -> getDF($fields[$index]['Condition'], $data_formats[$fields[$index]['Condition']]['Order_type']);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$fields[$index]['Values'] = $format_values;\n\t\t\t\t\t\tunset($format_values);\n\t\t\t\t\t}\n\t\t\t\t\telse \n\t\t\t\t\t{\n\t\t\t\t\t\t$adapted = array();\n\t\t\t\t\t\tswitch ($fields[$index]['Key']){\n\t\t\t\t\t\t\tcase 'Category_ID':\n\t\t\t\t\t\t\t\tif( $GLOBALS['rlListingTypes'] -> types[$listing_type]['Search_multi_categories'] )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$fields[$index]['Values'] = $GLOBALS['rlCategories'] -> getCategories(0, $listing_type);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$fields[$index]['Values'] = $GLOBALS['rlCategories'] -> getCatTitles($listing_type);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcase 'posted_by':\n\t\t\t\t\t\t\t\t$this -> loadClass('Account');\n\t\t\t\t\t\t\t\t$tmp_account_types = $GLOBALS['rlAccount'] -> getAccountTypes('visitor');\n\t\t\t\t\t\t\t\tforeach ($tmp_account_types as $tmp_account_type)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ( $tmp_account_type['Abilities'] )\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$adapted[$tmp_account_type['Key']] = array(\n\t\t\t\t\t\t\t\t\t\t\t'ID' => $tmp_account_type['Key'],\n\t\t\t\t\t\t\t\t\t\t\t'pName' => 'account_types+name+'. $tmp_account_type['Key']\n\t\t\t\t\t\t\t\t\t\t);\n\t\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\t$fields[$index]['Values'] = $adapted;\n\t\t\t\t\t\t\t\tunset($tmp_account_types, $adapted);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t$values = explode(',', $fields[$index]['Values']);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif ($fields[$index]['Type'] == 'checkbox')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$default = explode(',', $fields[$index]['Default']);\n\t\t\t\t\t\t\t\t\t$fields[$index]['Default'] = $default;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tforeach ($values as $row)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$adapted[$row]['Key'] = $fields[$index]['Key'] . '_' . $row;\n\t\t\t\t\t\t\t\t\t$adapted[$row]['pName'] = $table .'+name+'. $adapted[$row]['Key'];\n\t\t\t\t\t\t\t\t\t$adapted[$row]['ID'] = $row;\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\t$fields[$index]['Values'] = $adapted;\n\t\t\t\t\t\t\t\tunset($adapted);\n\t\t\t\t\t\t\t\tbreak;\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}\n\t\tunset($data_formats);\n\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "0b24a7815f601fef3ffbbca5ed4f60cd", "score": "0.45876148", "text": "private function expandDimension()\n\t{\n\t\t$this->sortDimension();\n\n\t\t$newPocketDimension = $this->pocketDimension;\n\t\tforeach($this->pocketDimension as $z => $zDim)\n\t\t{\n\t\t\tforeach($this->pocketDimension[$z] as $y => $yDim)\n\t\t\t{\n\t\t\t\tforeach($this->pocketDimension[$z][$y] as $x => $value)\n\t\t\t\t{\n\t\t\t\t\t$this->setNearbyInactive($z,$y,$x,$newPocketDimension);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->pocketDimension = $newPocketDimension;\n\t\tunset($newPocketDimension);\n\t}", "title": "" }, { "docid": "e9e2c9606d9431b9f14708f0be3c1e7a", "score": "0.45866817", "text": "public function setAll($array);", "title": "" }, { "docid": "d56fd362adf041b73e65fd0e3f5694de", "score": "0.45853657", "text": "public function replaceAndAppendScalarValuesRecursiveCorrectlyMergesArraysDataProvider() {}", "title": "" }, { "docid": "a3d75a18ed5529d94e5dda14511b29ae", "score": "0.45829457", "text": "public function setValues(&$values)\n {\n\t\tif(empty($values)) return;\n\t\tforeach($values as $field=>$value) \n\t\t{\n\t\t\tif(isset($this->fld->$field) && is_object($this->fld->$field)) \n\t\t\t\t$this->fld->$field->setValue($value);\n\t\t\telseif($field=='limit' && is_a($this, 'DB_Select'))\n\t\t\t\t$this->setLimit($value);\n\t\t\telseif($field=='start' && is_a($this, 'DB_Select'))\n\t\t\t\t$this->setOffset($value);\n\t\t}\n\t}", "title": "" }, { "docid": "b8c379affd364da7b10eaa21c825f102", "score": "0.45828587", "text": "public function configure()\n {\n parent::configure();\n \n // get the source from the original pager\n $source = $this->getPager()->getDataSource();\n // redefine the pager\n// $this->pager = new sfDataSourcePagerJqFlexi($source);\n\n // define the javascript formatter\n $this->setJavaScriptFormatter(new sfGridFormatterJqFlexi($this));\n \n // define the json formatter for JqFlexi\n $this->setDataFormatter(new sfGridFormatterJsonJqFlexi($this));\n }", "title": "" }, { "docid": "9d9a1e0c77fa673bc72403608d54fb45", "score": "0.45806828", "text": "public function run()\n {\n FrontSetting::create(['key' => 'featured_jobs_price', 'value' => 0]);\n FrontSetting::create(['key' => 'featured_jobs_days', 'value' => 10]);\n FrontSetting::create(['key' => 'featured_jobs_quota', 'value' => 10]);\n FrontSetting::create(['key' => 'featured_companies_price', 'value' => 0]);\n FrontSetting::create(['key' => 'featured_companies_days', 'value' => 10]);\n FrontSetting::create(['key' => 'featured_companies_quota', 'value' => 10]);\n FrontSetting::create(['key' => 'featured_jobs_enable', 'value' => false]);\n FrontSetting::create(['key' => 'featured_companies_enable', 'value' => false]);\n }", "title": "" }, { "docid": "4a3cf2699280abf04fc826cf057c394b", "score": "0.4580057", "text": "private function _merge_values() {\n $this->_values = $this->default_data;\n $this->_values = array_merge($this->_values, $this->saved_data);\n $this->_values = array_merge($this->_values, $this->posted_data);\n }", "title": "" }, { "docid": "0a3be7f265ac8323161d03313837512b", "score": "0.4578061", "text": "protected function setupAssetGrid()\n {\n \ttry {\n $sqf = new Struct_Util_SmartQueryFilter();\n $response = $sqf->handleGrid(\n \t$this->getRequest(), false, $this->_defaultObjectName,\n \tarray(), // default filters\n \tarray(), // default order\n \tarray(), // exclude\n \tarray(), // chain\n \t10, \"Json\"\n );\n $this->view->result = array(\"Asset\" => $response->result);\n $this->view->data = array(\"Asset\" => $response->data);\n \t}\n \tcatch (Exception $e)\n \t{\n \t\tvar_dump(\"$e\"); exit();\n \t}\n }", "title": "" }, { "docid": "63aa143729c456150d34a395cdbe4439", "score": "0.45764753", "text": "public function getViewsData() {\n $data = parent::getViewsData();\n return $data;\n\n/**\n * The fields views data can be altered/ovveride here by manipulationg the data array for\n * a specific field before $return_as_object\n*/\n/*\n $data = array();\n $data['metsis_basket']['table']['group'] = t('METSIS Basket');\n $data['metsis_basket']['table']['base'] = array(\n 'title' => t('METSIS Basket'),\n 'help' => t('Contains METSIS basket records and fields that are to be available in Views.'),\n );\n $data['metsis_basket']['table']['join'] = array(\n 'node' => array(\n 'left_field' => 'nid',\n 'field' => 'node_id',\n ),\n );\n $data['metsis_basket']['iid'] = array(\n 'title' => t('IID'),\n 'help' => t('The Item ID.'),\n 'field' => array(\n 'id' => 'numeric',\n ),\n 'sort' => array(\n 'sort' => 'standard',),\n 'filter' => array(\n 'id' => 'numeric',\n ),\n );\n $data['metsis_basket']['uid'] = array(\n 'title' => t('UID'),\n 'help' => t('The user ID.'),\n 'field' => array(\n 'id' => 'numeric',\n ),\n 'sort' => array(\n 'sort' => 'standard',),\n 'filter' => array(\n 'id' => 'numeric',\n ),\n 'argument' => array(\n 'id' => 'standard',\n 'numeric' => TRUE,\n 'validate type' => 'nid',\n ),\n );\n $data['metsis_basket']['user_name'] = array(\n 'title' => t('User name'),\n 'help' => t('The user name'),\n 'field' => array(\n 'id' => 'standard',\n 'click sortable' => TRUE,\n ),\n 'sort' => array(\n 'id' => 'standard',\n ),\n 'filter' => array(\n 'id' => 'string',\n ),\n );\n $data['metsis_basket']['session_id'] = array('title' => t('Session ID'), 'help' => t('The session ID'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['basket_timestamp'] = array(\n 'title' => t('Basket timestamp'),\n 'help' => t('The timestamp for when item was added to basket'),\n 'field' => array(\n 'id' => 'date',\n 'click sortable' => TRUE,),\n 'sort' => array(\n 'id' => 'date',\n ),\n 'filter' => array(\n 'id' => 'date',\n ),\n );\n $data['metsis_basket']['solr_id'] = array('title' => t('SOLR id'), 'help' => t('SOLR id field'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['_version_'] = array('title' => t('SOLR _version_'), 'help' => t('SOLR _version_'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['last_metadata_update'] = array('title' => t('Last metadata update'), 'help' => t('last metadata update'), 'field' => array('handler' => 'views_handler_field_date', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort_date',), 'filter' => array('handler' => 'views_handler_filter_date',),);\n $data['metsis_basket']['personell_email'] = array('title' => t('Personell email'), 'help' => t('The personell_email'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['platform_long_name'] = array('title' => t('Platform long name'), 'help' => t('platform_long_name'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['data_center_contact_name'] = array('title' => t('Data center contact name'), 'help' => t('data_center_contact_name'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['collection'] = array('title' => t('Collection'), 'help' => t('collection'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['geographic_extent_rectangle_east'] = array('title' => t('Geographic extent rectangle east'), 'help' => t('geographic_extent_rectangle_east'), 'field' => array('handler' => 'views_handler_field',), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string', 'click sortable' => TRUE,),);\n $data['metsis_basket']['geographic_extent_rectangle_west'] = array('title' => t('Geographic extent rectangle west'), 'help' => t('geographic_extent_rectangle_west'), 'field' => array('handler' => 'views_handler_field',), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['geographic_extent_rectangle_north'] = array('title' => t('Geographic extent rectangle north'), 'help' => t('geographic_extent_rectangle_north'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['geographic_extent_rectangle_south'] = array('title' => t('Geographic extent rectangle south'), 'help' => t('geographic_extent_rectangle_south'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['data_center_data_center_url'] = array('title' => t('Data center data center URL'), 'help' => t('data_center_data_center_url'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['platform_short_name'] = array('title' => t('Platform short name'), 'help' => t('platform_short_name'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['related_information_resource'] = array('title' => t('Related information resource'), 'help' => t('related_information_resource'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['project_long_name'] = array('title' => t('Project long name'), 'help' => t('project_long_name'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['data_access_resource_http'] = array('title' => t('Data access resource HTTP'), 'help' => t('data_access_resource_http'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['data_access_resource_opendap'] = array('title' => t('Data access resource OPenDAP'), 'help' => t('data_access_resource_opendap'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['data_access_resource_ogc_wms'] = array('title' => t('Data access resource OGC WMS'), 'help' => t('data_access_resource_ogc_wms'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['data_access_resource_ODATA'] = array('title' => t('Data access resource ODATA'), 'help' => t('data_access_resource_ODATA'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['dataset_production_status'] = array('title' => t('Dataset production status'), 'help' => t('dataset_production_status'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['access_constraint'] = array('title' => t('Access constraint'), 'help' => t('access_constraint'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['iso_topic_category'] = array('title' => t('ISO topic category'), 'help' => t('iso_topic_category'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['temporal_extent_start_date'] = array('title' => t('Temporal extent start date'), 'help' => t('temporal_extent_start_date'), 'field' => array('handler' => 'views_handler_field_date', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort_date',), 'filter' => array('handler' => 'views_handler_filter_date',),);\n $data['metsis_basket']['Temporal extent end date'] = array('title' => t('temporal_extent_end_date'), 'help' => t('temporal_extent_end_date'), 'field' => array('handler' => 'views_handler_field_date', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort_date',), 'filter' => array('handler' => 'views_handler_filter_date',),);\n $data['metsis_basket']['data_center_data_center_name_long_name'] = array('title' => t('Data center data center name long name'), 'help' => t('data_center_data_center_name_long_name'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['dataset_language'] = array('title' => t('Dataset language'), 'help' => t('dataset_language'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['data_center_contact_role'] = array('title' => t('Data center contact role'), 'help' => t('data_center_contact_role'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['data_access_type'] = array('title' => t('Data access type'), 'help' => t('data_access_type'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['project_short_name'] = array('title' => t('Project short name'), 'help' => t('project_short_name'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['abstract'] = array('title' => t('Abstract'), 'help' => t('abstract'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['activity_type'] = array('title' => t('Activity type'), 'help' => t('activity_type'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['keywords_keyword'] = array('title' => t('Keywords keyword'), 'help' => t('keywords_keyword'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['related_information_type'] = array('title' => t('Related information type'), 'help' => t('related_information_type'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['data_access_wms_layers_wms_layer'] = array('title' => t('Data access wms layers wms layer'), 'help' => t('data access wms layers wms layer'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['operational_status'] = array('title' => t('Operational status'), 'help' => t('operational_status'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['instrument_long_name'] = array('title' => t('Instrument long name'), 'help' => t('instrument_long_name'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['personnel_organisation'] = array('title' => t('Personnel organisation'), 'help' => t('personnel_organisation'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['data_center_contact_email'] = array('title' => t('Data center contact email'), 'help' => t('data_center_contact_email'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['instrument_short_name'] = array('title' => t('Instrument short name'), 'help' => t('instrument_short_name'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['personnel_role'] = array('title' => t('Personnel role'), 'help' => t('personnel_role'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['data_access_description'] = array('title' => t('Data access description'), 'help' => t('data_access_description'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['cloud_cover_value'] = array('title' => t('Cloud cover value'), 'help' => t('cloud_cover_value'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'iews_handler_field_numeric',),);\n $data['metsis_basket']['metadata_identifier'] = array(\n 'title' => t('Metadata identifier'),\n 'help' => t('The metadata identifier'),\n 'field' => array(\n 'id' => 'standard',\n 'click sortable' => TRUE,\n ),\n 'sort' => array(\n 'id' => 'standard',\n ),\n 'filter' => array(\n 'id' => 'string',\n ),\n );\n $data['metsis_basket']['data_center_data_center_name_short_name'] = array('title' => t('Data center data center name short name'), 'help' => t('data_center_data_center_name_short_name'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['metadata_status'] = array('title' => t('Metadata status'), 'help' => t('metadata_status'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['personnel_name'] = array('title' => t('Personnel name'), 'help' => t('personnel_name'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['title'] = array('title' => t('Title'), 'help' => t('title'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_basket']['bbox'] = array('title' => t('BBOX'), 'help' => t('BBOX'), 'field' => array('handler' => 'views_handler_field', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_string',),);\n $data['metsis_cache']['node_id'] = array('title' => t('Node ID'), 'help' => t('The record node ID.'), 'field' => array('handler' => 'views_handler_field_node', 'click sortable' => TRUE,), 'sort' => array('handler' => 'views_handler_sort',), 'filter' => array('handler' => 'views_handler_filter_numeric',), 'relationship' => array('base' => 'node', 'field' => 'node_id', 'handler' => 'views_handler_relationship', 'label' => t('Node'),), 'argument' => array('handler' => 'views_handler_argument_node_nid', 'numeric' => TRUE, 'validate type' => 'nid',),);\n return $data;\n */\n }", "title": "" }, { "docid": "9309d663bc3e440fdceb009d0a6d9aca", "score": "0.45744577", "text": "public function setNewCollections()\n {\n $this->collectionImportStatusCObj = $this->dataBaseCObj->importStatus;\n $this->collectionTmpNodesCObj = $this->dataBaseCObj->tmpNodes;\n $this->collectionTmpNodeTagCObj = $this->dataBaseCObj->tmpNodeTag;\n $this->collectionTmpWaysCObj = $this->dataBaseCObj->tmpWays;\n $this->collectionTmpWayTagCObj = $this->dataBaseCObj->tmpWayTag;\n $this->collectionTmpWayNodeCObj = $this->dataBaseCObj->tmpWaysNode;\n\n $this->collectionSetupFillCObj = $this->dataBaseCObj->setupFill;\n $this->collectionSetupMapCObj = $this->dataBaseCObj->setupMap;\n\n $this->collectionNodesCObj = $this->dataBaseCObj->nodes;\n $this->collectionWaysCObj = $this->dataBaseCObj->ways;\n \n $this->collectionKeyValueDistinctCObj = $this->dataBaseCObj->keyValueDistinct;\n $this->collectionImportFileCObj = $this->dataBaseCObj->fileToProcess;\n }", "title": "" }, { "docid": "97516936e899016aae8a3cdf47c6d3c2", "score": "0.45676222", "text": "protected function setup()\n {\n $resultCount = $this->count();\n $totalCount = $this->paginator->getTotalCount();\n $limit = $this->paginator->getLimit();\n $offset = $this->paginator->calculateOffset($this->currentPage);\n\n $this->setupIndex($totalCount, $resultCount, $offset, $limit);\n $this->setupPages();\n }", "title": "" }, { "docid": "6191c2695de84b1d9f55d40c4bfc5ea9", "score": "0.45607042", "text": "protected function processConfigurableFields()\n {\n $fields = $this->_config->get(\"fields\");\n $attributes = $this->_config->get(\"attributes\");\n $units = $this->_config->get(\"units\");\n $inventory = $this->_config->get('inventory');\n\n $brand = $this->getAttributeValue($attributes['brands']);\n\n if ($brand && $brand !== 'No') {\n $this->brands = [\n [\n 'name' => $brand,\n ],\n ];\n }\n\n foreach (['height', 'length', 'width'] as $key) {\n $keyField = \"dimention_{$key}\";\n\n if (!isset($fields[$keyField]) || !$fields[$keyField]) {\n continue;\n }\n\n $attr = $this->getAttributeValue($fields[$keyField]);\n\n if (!$attr || $attr <= 0) {\n continue;\n }\n\n if (isset($units['dimension'])) {\n $dimensions[$key] = [\n 'value' => (float)$attr,\n 'unit' => $units['dimension'],\n ];\n } else {\n $dimensions[$key] = [\n 'value' => (float)$attr,\n ];\n }\n }\n\n $weight = (float)$this->_product->getWeight();\n\n if ($weight > 0) {\n if (isset($units['weight'])) {\n $dimensions['weight'] = [\n 'value' => $weight,\n 'unit' => $units['weight'],\n ];\n } else {\n $dimensions['weight'] = [\n 'value' => $weight,\n ];\n }\n }\n\n if (!empty($dimensions)) {\n $this->dimensions = $dimensions;\n }\n\n foreach ([\"ean\", \"mpn\"] as $key) {\n if (!isset($inventory[$key]) || !$inventory[$key]) {\n continue;\n }\n\n $attr = $this->getAttributeValue($inventory[$key]);\n\n if ($attr === null) {\n continue;\n }\n\n $this->{$key} = $attr;\n }\n\n foreach ([\"sizeType\", \"size\", \"color\", \"gender\", \"material\", \"pattern\", \"age_group\", \"condition\"] as $key) {\n if (!isset($attributes[$key]) || !$attributes[$key]) {\n continue;\n }\n\n $attr = $this->getAttributeValue($attributes[$key]);\n\n if ($attr === null) {\n continue;\n }\n\n if ($this->checkType($this->getAttributeType($attr)) !== 'string' && $attr == false) {\n continue;\n }\n\n $this->{$key} = $attr;\n }\n }", "title": "" }, { "docid": "18ea36c1f8d0c4c585f5a137ab27fb58", "score": "0.45553178", "text": "public function setUserConfig()\n {\n \\Debugbar::startMeasure('get-account-metadetails','Get Account Site_url & IMG Dir');\n // URLS & DIRECTORIES\n \\Config::set('site_url', config('app.user')->account()->metadetails('type','site_url', true)->get('data'));\n \\Config::set('img_dir', config('app.user')->account()->metadetails('type','dir_images', true)->get('data'));\n \\Debugbar::stopMeasure('get-account-metadetails');\n // GRID\n \\Debugbar::startMeasure('custom-fragments','Get Custom Fragment Blueprints');\n \\Config::set('custom.fragments', config('app.user')->account()->details()->where('type','fragment')->keyBy('name'));\n \\Debugbar::stopMeasure('custom-fragments');\n // GRID\n \\Config::set('user.grid-sm',2);\n \\Config::set('user.grid-md',12);\n \\Config::set('user.grid-lg',16);\n }", "title": "" }, { "docid": "57a2d185ace8214e8fc15bb061ebd715", "score": "0.45524687", "text": "function setValues() {\n\t\t$affils = getAffiliations();\n\t\t$this->values = array();\n\t\tforeach($affils as $key => $val) {\n\t\t\tif($val == 'Global')\n\t\t\t\tcontinue;\n\t\t\t$this->values[$key] = $val;\n\t\t}\n\t}", "title": "" }, { "docid": "9638a13d29c0655f30b6f59d91e9a7fd", "score": "0.4549678", "text": "function prepare()\r\n {\r\n $t = $this->dataset;\r\n $this->dataset = [];\r\n\r\n $this->name = preg_replace('/\\s+/', '_', $this->name);\r\n\r\n if(!$this->name)\r\n {\r\n $this->name = rand(0,1000) . '_' . strtotime('now');\r\n }\r\n\r\n if(!is_array($t))\r\n {\r\n return;\r\n }\r\n\r\n // Attributes\r\n $label_a = $this->setting['item_label'];\r\n $value_a = $this->setting['item_value'];\r\n $cat_a = $this->setting['item_category'];\r\n $sublabel = $this->setting['item_sublabel'];\r\n\r\n foreach($t as $row)\r\n {\r\n if(!isset($row[$label_a]) || !isset($row[$value_a]))\r\n {\r\n continue;\r\n }\r\n\r\n $category = $row[$cat_a] ? $row[$cat_a] : 0;\r\n\r\n if($category === 0)\r\n {\r\n $category = 'Unclassified';\r\n }\r\n\r\n if(!isset($this->dataset[$category]))\r\n {\r\n $this->dataset[$category] = array();\r\n }\r\n\r\n $this->dataset[$category][] = (object)array\r\n (\r\n 'name' => $row[$label_a],\r\n 'value' => $row[$value_a],\r\n 'subtitle' => $sublabel ? $row[$sublabel] : null\r\n );\r\n }\r\n }", "title": "" }, { "docid": "587202030a1d8e386564ccddbeac6588", "score": "0.45467567", "text": "protected function _setConfig() {\n\t\t$config = [];\n\t\t$currentConfig = $this->_modelConfigSearchInfo->getConfig();\n\t\tif (!empty($this->_searchInfo) && is_array($this->_searchInfo)) {\n\t\t\t$config = $this->_searchInfo + $currentConfig;\n\t\t}\n\n\t\tif (!empty($this->AutocompleteLimit) && is_numeric($this->AutocompleteLimit)) {\n\t\t\t$config = Hash::merge($config, ['AutocompleteLimit' => $this->AutocompleteLimit] + $currentConfig);\n\t\t}\n\n\t\tif (!empty($config)) {\n\t\t\tConfigure::write('CakeSearchInfo', $config);\n\t\t}\n\t}", "title": "" }, { "docid": "6be4c30e339b35626364ffe0d4f73768", "score": "0.45454854", "text": "protected function _prePopulate() {}", "title": "" }, { "docid": "2908854c0ffa21ff769d6dd70da62f27", "score": "0.4539719", "text": "public function init_settings() {\n\t\t$attribute_array = array();\n\t\t$std_attribute = '';\n\n\t\t$this->settings = array(\n\t\t\t'title' => array(\n\t\t\t\t'type' => 'text',\n\t\t\t\t'std' => __( 'Filter by', 'woocommerce' ),\n\t\t\t\t'label' => __( 'Title', 'woocommerce' ),\n\t\t\t),\n\t\t\t'attribute' => array(\n\t\t\t\t'type' => 'select',\n\t\t\t\t'std' => 'Product Category',\n\t\t\t\t'label' => __( 'Category', 'woocommerce' ),\n\t\t\t\t'options' => array('product_cat'=>'Product Category'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "fa0334990dd91e2e0af165d88dd8fc34", "score": "0.4534632", "text": "private function setValues()\n {\n foreach ($this->mapping as $mergeTag => $fieldname) {\n if ($mergeTag !== 'EMAIL') {\n $this->values[$mergeTag] = $this->formatValue($this->hook->getValue($fieldname));\n }\n }\n }", "title": "" }, { "docid": "a4883102a8fa6df2028a15543288bd9c", "score": "0.4526092", "text": "public function getMediaSettings($myType = array())\n\t{\n\t\t// choose from settings first...\n\t\t$this->Setting = ClassRegistry::init('Setting');\n\t\t$mySetting = $this->Setting->findAllByName('sites');\n\t\tforeach ($mySetting as $key => $value) \n\t\t{\n\t\t\tif($value['Setting']['key'] == 'display_width')\n\t\t\t{\n\t\t\t\t$result['display_width'] = $value['Setting']['value'];\n\t\t\t}\n\t\t\telse if($value['Setting']['key'] == 'display_height')\n\t\t\t{\n\t\t\t\t$result['display_height'] = $value['Setting']['value'];\n\t\t\t}\n\t\t\telse if($value['Setting']['key'] == 'display_crop')\n\t\t\t{\n\t\t\t\t$result['display_crop'] = $value['Setting']['value'];\n\t\t\t}\n\t\t\telse if($value['Setting']['key'] == 'thumb_width')\n\t\t\t{\n\t\t\t\t$result['thumb_width'] = $value['Setting']['value'];\n\t\t\t}\n\t\t\telse if($value['Setting']['key'] == 'thumb_height')\n\t\t\t{\n\t\t\t\t$result['thumb_height'] = $value['Setting']['value'];\n\t\t\t}\n\t\t\telse if($value['Setting']['key'] == 'thumb_crop')\n\t\t\t{\n\t\t\t\t$result['thumb_crop'] = $value['Setting']['value'];\n\t\t\t}\n\t\t}\n\t\t\n\t\t// if in type meta exist, use that :D\n\t\t$this->TypeMeta = ClassRegistry::init('TypeMeta');\n\t\t$myTypeMeta = $this->TypeMeta->findAllByTypeId($myType['Type']['id']);\n\t\tforeach ($myTypeMeta as $key => $value) \n\t\t{\n\t\t\tif($value['TypeMeta']['key'] == 'display_width')\n\t\t\t{\n\t\t\t\t$result['display_width'] = $value['TypeMeta']['value'];\n\t\t\t}\n\t\t\telse if($value['TypeMeta']['key'] == 'display_height')\n\t\t\t{\n\t\t\t\t$result['display_height'] = $value['TypeMeta']['value'];\n\t\t\t}\n\t\t\telse if($value['TypeMeta']['key'] == 'display_crop')\n\t\t\t{\n\t\t\t\t$result['display_crop'] = $value['TypeMeta']['value'];\n\t\t\t}\n\t\t\telse if($value['TypeMeta']['key'] == 'thumb_width')\n\t\t\t{\n\t\t\t\t$result['thumb_width'] = $value['TypeMeta']['value'];\n\t\t\t}\n\t\t\telse if($value['TypeMeta']['key'] == 'thumb_height')\n\t\t\t{\n\t\t\t\t$result['thumb_height'] = $value['TypeMeta']['value'];\n\t\t\t}\n\t\t\telse if($value['TypeMeta']['key'] == 'thumb_crop')\n\t\t\t{\n\t\t\t\t$result['thumb_crop'] = $value['TypeMeta']['value'];\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "f5a9376ef211062d4fbedecc9d40ca62", "score": "0.45147276", "text": "function addingRecordDefaultSettings(){\n\n $settings[] = array(\n \"name\"=>\"maxRows\",\n \"defaultValue\"=>10,\n \"type\"=>\"int\",\n \"required\"=>1,\n \"description\"=>\"Number of label rows per page\"\n );\n\n $settings[] = array(\n \"name\"=>\"maxColumns\",\n \"defaultValue\"=>3,\n \"type\"=>\"int\",\n \"required\"=>1,\n \"description\"=>\"Number of label columns per page\"\n );\n\n $settings[] = array(\n \"name\"=>\"startTop\",\n \"defaultValue\"=>1/2,\n \"type\"=>\"real\",\n \"required\"=>1,\n \"description\"=>\"Top Margin of page\"\n );\n\n $settings[] = array(\n \"name\"=>\"startLeft\",\n \"defaultValue\"=>3/16,\n \"type\"=>\"real\",\n \"required\"=>1,\n \"description\"=>\"Left Margin of page\"\n );\n\n $settings[] = array(\n \"name\"=>\"columnMargin\",\n \"defaultValue\"=>1/8,\n \"type\"=>\"real\",\n \"required\"=>1,\n \"description\"=>\"Distance between columns\"\n );\n\n $settings[] = array(\n \"name\"=>\"labelHeight\",\n \"defaultValue\"=>1,\n \"type\"=>\"real\",\n \"required\"=>1,\n \"description\"=>\"Height of a single label\"\n );\n\n $settings[] = array(\n \"name\"=>\"labelHeight\",\n \"defaultValue\"=>2 + 5/8,\n \"type\"=>\"real\",\n \"required\"=>1,\n \"description\"=>\"Width of a single label\"\n );\n\n $settings[] = array(\n \"name\"=>\"labelMarginLeft\",\n \"defaultValue\"=>1/16,\n \"type\"=>\"real\",\n \"required\"=>1,\n \"description\"=>\"Distance from left between the start of an individual to the text being put on it\"\n );\n\n $settings[] = array(\n \"name\"=>\"labelMarginTop\",\n \"defaultValue\"=>1/8,\n \"type\"=>\"real\",\n \"required\"=>1,\n \"description\"=>\"Distance from top between start of an individual to the text being put on it\"\n );\n\n $settings[] = array(\n \"name\"=>\"queryStatement\",\n \"defaultValue\"=>'SELECT \"no data in first row\" AS `rowText1`, \"no data in second row\" AS `rowText2` FROM `'.$this->maintable.'`',\n \"type\"=>\"text\",\n \"required\"=>1,\n \"description\"=>\"SQL SELECT and FROM clauses defining the data to be retrieved. Each line printed should be selected as a column in the format `rowText(X)`, where (X) is the line number it will be printed on\"\n );\n\n $settings[] = array(\n \"name\"=>\"rowText1Font\",\n \"defaultValue\"=>\"Arial,B,9\",\n \"type\"=>\"string\",\n \"required\"=>0,\n \"description\"=>\"Comma separated list of FPDF font parameters defining font settings for the label text. You can change the font on subsequent lines by adding an additional setting rowText(x)Font where (x) is the line number the font change occurs.\"\n );\n\n return $settings;\n\n }", "title": "" }, { "docid": "36af91b6ad26b9972ee2d87d37eb135b", "score": "0.45111126", "text": "public function setContainerEntries()\n {\n $this->dependencies['Runtimedata']->reference_data->extensions = $this->product_result;\n $this->set_container_entries['Runtimedata'] = $this->dependencies['Runtimedata'];\n\n return $this->set_container_entries;\n }", "title": "" }, { "docid": "37682aa56ef5c7e1de4b28b5a1a49ef6", "score": "0.45091775", "text": "protected function setPluginOptions()\n {\n $i = 1;\n\n foreach ($this->dataset as $d) {\n /* Generate name */\n if (empty($d['name'])) {\n $d['name'] = str_replace('-', '_', $this->options['id'] . '_ta_' . $i);\n }\n if (empty($d['displayKey'])) {\n $d['displayKey'] = 'name';\n }\n $source = $d['name']; //str_replace('-', '_', $this->options['id'] . '_src_' . $i);\n $config = Json::encode($this->parseSource($d['source'], $d['displayKey']));\n $this->_bloodhound[] = \"var {$source} = new Bloodhound({$config});\\n{$source}.initialize();\\n\";\n $d['source'] = new JsExpression(\"{$source}.ttAdapter()\");\n $this->_datasets[] = $d;\n $i++;\n }\n }", "title": "" }, { "docid": "4a35e0c0d646f34a49535e1bf466f3ce", "score": "0.45058864", "text": "public function buildProceduresAndValues()\n {\n $this->showAll();\n }", "title": "" }, { "docid": "8c5518163db113b43b7b9b1c43baaca1", "score": "0.44940934", "text": "public function dataObject()\n {\n $array = $this->query();\n $keys = $this->filter->keys;\n $keysSubgroup = $this->filter->keysSubgroup();\n \n $subgroup = strtolower($this->filter->subgroup);\n if ($subgroup == 'channel') {\n $details = new Utilities;\n $allSubgroups = $details->allChannels();\n } else {\n $allSubgroups = array_values($keysSubgroup);\n $allSubgroups = array_unique($allSubgroups);\n }\n \n $group = $this->filter->group;\n if ($group == 'channel') {\n $details = new Utilities;\n $programs = $details->allChannels();\n } elseif ($group == 'initiative') {\n $details = new Utilities;\n $programs = $details->channelInitiatives($this->filter->channel);\n }\n\n // Build Return Array to structure data\n $returnArray = $this->buildReturnArray();\n\n $tables = $this->range->tables();\n $years = $this->range->years();\n foreach ($years as $year) {\n foreach ($tables as $type => $metrics) {\n $items = $array[$year][$type];\n foreach ($items as $item) {\n $pro = $item->program;\n $metric = strtolower($item->metric);\n if ($type == 'budget') {\n $metric = $metric . 'Budget';\n } elseif ($type == 'forecast') {\n // $metric = $metric . 'Forecast';\n }\n if ($group != 'program') {\n $key = (string) $keys[$pro];\n } else {\n $key = $pro;\n }\n // Define subkey\n if ($subgroup == 'channel' || $subgroup == 'initiative') {\n $subkey = (string)$item->$subgroup;\n } elseif ($subgroup == 'program') {\n $subkey = $pro;\n } else {\n $subkey = (string)$keysSubgroup[$pro];\n }\n if ($subkey != '99') {\n $returnArray[$key][$subkey]->$metric += (int) $item->total;\n }\n }\n }\n }\n // Remove empty subgroup objects\n foreach ($returnArray as $group => $subgroups) {\n foreach ($subgroups as $subgroup => $obj) {\n $sum = $obj->leads + $obj->leadsBudget + $obj->leadsForecast;\n $sum += $obj->spend + $obj->spendBudget + $obj->spendForecast;\n if ($sum == 0) {\n unset($returnArray[$group][$subgroup]);\n }\n }\n }\n\n $returnObject = new \\StdClass();\n $returnObject->data = $returnArray;\n $returnObject->pace = $this->range->pace();\n\n return json_encode($returnObject);\n }", "title": "" }, { "docid": "edb367e37cdba5e61d1974e6eb3f5303", "score": "0.44857892", "text": "function settings_api_init() {\n\t\tglobal $wp_settings_sections;\n\n\t\t// Add the setting field [tiled_galleries] and place it in Settings > Media\n\t\tif ( isset( $wp_settings_sections['media']['carousel_section'] ) ) {\n\t\t\t$section = 'carousel_section';\n\t\t} else {\n\t\t\t$section = 'default';\n\t\t}\n\n\t\tadd_settings_field( 'tiled_galleries', __( 'Tiled Galleries', 'jetpack' ), array( $this, 'setting_html' ), 'media', $section );\n\t\tregister_setting( 'media', 'tiled_galleries', 'esc_attr' );\n\t}", "title": "" }, { "docid": "b27e1912f320f8256bc0e3e7eb4ad5e3", "score": "0.44808486", "text": "function AJaddConfigMultiVal() {\n\t\tif(! checkUserHasPerm('Site Configuration (global)')) {\n\t\t\t$arr = array('status' => 'noaccess',\n\t\t\t 'msg' => _('You do not have access to modify the submitted settings.'));\n\t\t\tsendJSON($arr);\n\t\t\treturn;\n\t\t}\n\t\t$newkey = processInputVar('multivalid', ARG_NUMERIC);\n\t\t$newval = processInputVar('multival', ARG_STRING);\n\t\tif(! array_key_exists($newkey, $this->units)) {\n\t\t\t$arr = array('status' => 'failed',\n\t\t\t 'msgid' => \"{$this->domidbase}msg\",\n\t\t\t 'btn' => \"{$this->domidbase}addbtn\",\n\t\t\t 'errmsg' => _(\"Invalid item selected for new value\"));\n\t\t\tsendJSON($arr);\n\t\t\treturn;\n\t\t}\n\t\tif(! $this->validateValue($newval)) {\n\t\t\t$arr = array('status' => 'failed',\n\t\t\t 'msgid' => \"{$this->domidbase}msg\",\n\t\t\t 'btn' => \"{$this->domidbase}addbtn\",\n\t\t\t 'errmsg' => _(\"Invalid value submitted\"));\n\t\t\tif(isset($this->invalidvaluemsg))\n\t\t\t\t$arr['errmsg'] = $this->invalidvaluemsg;\n\t\t\tsendJSON($arr);\n\t\t\treturn;\n\t\t}\n\t\tsetVariable(\"{$this->domidbase}|$newkey\", $newval, 'none');\n\t\t$this->setValues();\n\t\t$addcont = addContinuationsEntry('AJaddConfigMultiVal', $this->basecdata);\n\t\t$delcont = addContinuationsEntry('AJdeleteMultiSetting', $this->basecdata);\n\t\t$savecont = addContinuationsEntry('AJupdateAllSettings', $this->basecdata);\n\t\t$arr = array('status' => 'success',\n\t\t 'msgid' => \"{$this->domidbase}msg\",\n\t\t 'addid' => \"{$this->domidbase}|$newkey\",\n\t\t 'addname' => $this->units[$newkey]['name'],\n\t\t 'addval' => $newval,\n\t\t 'delkey' => $newkey,\n\t\t 'extrafunc' => \"{$this->jsname}.{$this->addCBextra}\",\n\t\t 'addcont' => $addcont,\n\t\t 'delcont' => $delcont,\n\t\t 'savecont' => $savecont,\n\t\t 'msg' => $this->addmsg,\n\t\t 'regexp' => $this->constraint,\n\t\t 'invalidmsg' => str_replace('&amp;', '&', $this->invalidmsg));\n\t\tsendJSON($arr);\n\t}", "title": "" }, { "docid": "bb85effb24f0cb013bb379746d8a11c1", "score": "0.44797662", "text": "function set_image_sizes(){\n\t\tupdate_option('thumbnail_size_w', 320);\n\t\tupdate_option('thumbnail_size_h', 241);\t\n\t\tupdate_option('thumbnail_crop', 0);\n\t\t\n\t\tupdate_option('medium_size_w', 338);\n\t\tupdate_option('medium_size_h', 254);\n\t\t\n\t\tupdate_option('medium_large_size_w', 405);\n\t\tupdate_option('medium_large_size_h', 304);\n\t\t\n\t\tupdate_option('large_size_w', 540);\n\t\tupdate_option('large_size_h', 405);\n\n\t\tupdate_option('image_default_align', 'center');\n\t\tupdate_option('image_default_size', 'large');\n }", "title": "" }, { "docid": "344ccfd2c5df47bf975a481625517615", "score": "0.4478611", "text": "function settings_init() {\n\n $post_types = get_post_types(array('public' => true)); \n foreach ( $post_types as $post_type ) {\n $obj = get_post_type_object($post_type);\n $post_type_id = $obj->name;\n $post_type_name = $obj->labels->name;\n $option_group = 'ptip-'.$post_type_id;\n\n $options = array();\n $pages = get_posts(array('post_type' => 'page', 'orderby' => 'title', 'order' => 'ASC', 'posts_per_page' => -1));\n foreach ($pages as $page) {\n $options[$page->ID] = $page->post_title;\n }\n\n $settings = array();\n $settings[] = array(\n 'section_id' => 'index',\n 'section_title' => '',\n 'section_description' => '',\n 'section_order' => 5,\n 'fields' => array(\n array(\n 'id' => 'page',\n 'title' => 'Index Page',\n 'type' => 'select',\n 'choices' => $options\n )\n )\n );\n\n $this->settings_objects[$post_type_id] = new PTIP_WordPressSettingsFramework( $settings, $option_group );\n add_filter( $option_group .'_settings_validate', array(&$this, 'validate_settings') );\n }\n\n }", "title": "" }, { "docid": "bb98cb2f939eebb9d028f596e37c2c63", "score": "0.44785586", "text": "function sumfields_save_setting($key, $value) {\n $group = 'Summary Fields';\n CRM_Core_BAO_Setting::setItem($value, $group, $key);\n}", "title": "" }, { "docid": "c201e142b777503cb457ecebf50d3d68", "score": "0.4477832", "text": "private function setValues($values)\r\n\t{\r\n\t\t$this->nconfig->setValues($values);\r\n /*\r\n\t\tforeach ($values as $name=>$val)\r\n\t\t{\r\n\t\t\tif (is_array($val))\r\n\t\t\t{\r\n if(!isset($this->m_settings[$name]))\r\n $this->m_settings[$name] = array();\r\n\t\t\t\telse if(!is_array($this->m_settings[$name]))\r\n\t\t\t\t\t$this->m_settings[$name] = array();\r\n\r\n\t\t\t\tforeach ($val as $subname=>$subval)\r\n\t\t\t\t\t$this->m_settings[$name][$subname] = $subval;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->m_settings[$name] = $val;\r\n\t\t\t}\r\n\t\t}\r\n */\r\n\t}", "title": "" }, { "docid": "3991f5e578efa09be0a23059c25c09ab", "score": "0.44735914", "text": "private function hydrate()\n {\n if ($this->hydrated) {\n return;\n }\n\n $this->table = config('Settings')->database['table'] ?? 'settings';\n\n $rawValues = db_connect()->table($this->table)->get()->getResultObject();\n\n foreach($rawValues as $row) {\n if (! array_key_exists($row->class, $this->settings)) {\n $this->settings[$row->class] = [];\n }\n\n $this->settings[$row->class][$row->key] = $row->value;\n }\n\n $this->hydrated = true;\n }", "title": "" }, { "docid": "fc6286638a15c27b3a72215e5ff55981", "score": "0.4472838", "text": "function get_settings_fields() {\n\t\t// Fields\n\t\t$image_sizes = get_intermediate_image_sizes();\n\t\t$image_sizes[] = 'full';\n\n\t\t$post_types = get_post_types( array( 'public' => TRUE ) );\n\t\tunset( $post_types['attachment'] );\n\n\t\t$mime_types = array();\n\t\tforeach ( rurls_get_mime_types() as $type => $details ) {\n\t\t\t$mime_types[ $type ] = $details['title'] . \" <small><em>($type)</em></small>\";\n\t\t}\n\n\t\t$fields = array(\n\t\t\t'mime_types' => array(\n\t\t\t\t'title' => __( 'Mime Types' ),\n\t\t\t\t'description' => __( 'Select which type of remote link will be included in the summary.' ),\n\t\t\t\t'type' => 'checkboxes',\n\t\t\t\t'options' => $mime_types,\n\t\t\t\t'section' => 'rurls_summary_options',\n\t\t\t),\n\t\t\t'post_types' => array(\n\t\t\t\t'title' => __( 'Post Types' ),\n\t\t\t\t'description' => __( 'Select which post types should be examined for remote urls.' ),\n\t\t\t\t'type' => 'checkboxes',\n\t\t\t\t'options' => $post_types,\n\t\t\t\t'section' => 'rurls_summary_options',\n\t\t\t),\n\t\t\t'comment_summary' => array(\n\t\t\t\t'title' => __( 'Comments' ),\n\t\t\t\t'description' => __( 'Examine and summarize comments content.' ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'section' => 'rurls_summary_options',\n\t\t\t),\n\t\t\t'image_size' => array(\n\t\t\t\t'title' => __( 'Image Size' ),\n\t\t\t\t'description' => __( 'Size of images displayed in summary.' ),\n\t\t\t\t'type' => 'select',\n\t\t\t\t'options' => array_combine( $image_sizes, $image_sizes ),\n\t\t\t\t'section' => 'rurls_summary_options',\n\t\t\t),\n\t\t\t'domain_blacklist' => array(\n\t\t\t\t'title' => __( 'Domain Blacklist' ),\n\t\t\t\t'description' => __( 'List domains that should not be remotely fetched. Place one domain per line, without http protocol. Useful if having conflicts with this plugin and your CDN.' ),\n\t\t\t\t'type' => 'textarea',\n\t\t\t\t'section' => 'rurls_summary_options',\n\t\t\t\t'sanitize' => array( $this, 'sanitize_textarea' ),\n\t\t\t),\n\t\t\t'default_stylesheet' => array(\n\t\t\t\t'title' => __( 'Default Stylesheet' ),\n\t\t\t\t'description' => __( 'Include the default stylesheet during summary output.' ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'section' => 'rurls_summary_options',\n\t\t\t),\n\t\t);\n\n\t\t$fields = apply_filters( 'rurls-settings-fields', $fields );\n\n\t\t// some simple pre-processing\n\t\tforeach ( $fields as $key => &$field ) {\n\t\t\t$field['key'] = $key;\n\t\t\t$field['name'] = RURLS_SETTINGS_NAME . '[' . $key . ']';\n\t\t}\n\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "cf69616c1636f2f71c2de2eaddfdd28a", "score": "0.44691563", "text": "protected function settings() : array\n {\n return [\n 'key' => \"{$this->unique}-group\",\n 'title' => $this->title,\n 'fields' => [\n \n ],\n 'location' => [\n [\n [\n 'param' => 'block',\n 'operator' => '==',\n 'value' => \"acf/{$this->unique}\"\n ]\n ]\n ]\n ];\n }", "title": "" }, { "docid": "4efc4c79a196e2ba44bc139ba152b146", "score": "0.44661015", "text": "protected function _process()\n {\n $result = array();\n foreach ($this->_data['profile'] as $name => $values) {\n list($parent, $func) = $this->splitName($name);\n\n // Generate collapsed data.\n if (isset($result[$func])) {\n $result[$func] = $this->_sumKeys($result[$func], $values);\n $result[$func]['parents'][] = $parent;\n } else {\n $result[$func] = $values;\n $result[$func]['parents'] = array($parent);\n }\n\n // Build the indexed data.\n if ($parent === null) {\n $parent = self::NO_PARENT;\n }\n if (!isset($this->_indexed[$parent])) {\n $this->_indexed[$parent] = array();\n }\n $this->_indexed[$parent][$func] = $values;\n }\n $this->_collapsed = $result;\n }", "title": "" }, { "docid": "8b7f0976439d42224d0f43deff92d820", "score": "0.44641384", "text": "public function build()\n {\n $config = parent::build();\n if (array_key_exists('collapsed', $config)) {\n $fieldKey = $this->fieldsBuilder->getField($config['collapsed'])->getKey();\n $fieldKey = preg_replace('/^field_/', '', $fieldKey);\n $config['collapsed'] = $this->getName() . '_' . $fieldKey;\n }\n return $config;\n }", "title": "" }, { "docid": "e1ca0de992be1334780b4e4b71c2bb32", "score": "0.44523093", "text": "public function setSections() {\n\n\t\t\t$grve_social_options = array(\n\t\t\t\t'twitter' => 'Twitter',\n\t\t\t\t'facebook' => 'Facebook',\n\t\t\t\t'google-plus' => 'Google Plus',\n\t\t\t\t'instagram' => 'instagram',\n\t\t\t\t'linkedin' => 'LinkedIn',\n\t\t\t\t'tumblr' => 'Tumblr',\n\t\t\t\t'pinterest' => 'Pinterest',\n\t\t\t\t'github' => 'Github',\n\t\t\t\t'dribbble' => 'Dribbble',\n\t\t\t\t'reddit' => 'reddit',\n\t\t\t\t'flickr' => 'Flickr',\n\t\t\t\t'skype' => 'Skype',\n\t\t\t\t'youtube' => 'YouTube',\n\t\t\t\t'vimeo' => 'Vimeo',\n\t\t\t\t'wechat' => 'WeChat',\n\t\t\t\t'weibo' => 'Weibo',\n\t\t\t\t'renren' => 'Renren',\n\t\t\t\t'qq' => 'QQ',\n\t\t\t\t'rss' => 'RSS',\n\t\t\t);\n\n\t\t\t$grve_portfolio_social_options = array(\n\t\t\t\t'twitter' => 'Twitter',\n\t\t\t\t'facebook' => 'Facebook',\n\t\t\t\t'linkedin' => 'LinkedIn',\n\t\t\t\t'google-plus' => 'Google Plus',\n\t\t\t\t'pinterest' => 'Pinterest',\n\t\t\t\t'grve-likes' => '(Greatives) Likes',\n\t\t\t);\n\n\t\t\t$grve_blog_social_options = array(\n\t\t\t\t'twitter' => 'Twitter',\n\t\t\t\t'facebook' => 'Facebook',\n\t\t\t\t'linkedin' => 'LinkedIn',\n\t\t\t\t'google-plus' => 'Google Plus',\n\t\t\t\t'grve-likes' => '(Greatives) Likes',\n\t\t\t);\n\n\t\t\t$grve_layout_selection = array(\n\t\t\t\t'none' => array('alt' => __( 'Full Width', GRVE_THEME_TRANSLATE ), 'img' => ReduxFramework::$_url . 'assets/img/1col.png'),\n\t\t\t\t'left' => array('alt' => __( 'Left Sidebar', GRVE_THEME_TRANSLATE ), 'img' => ReduxFramework::$_url . 'assets/img/2cl.png'),\n\t\t\t\t'right' => array('alt' => __( 'Right Sidebar', GRVE_THEME_TRANSLATE ), 'img' => ReduxFramework::$_url . 'assets/img/2cr.png'),\n\t\t\t);\n\n\t\t\t$grve_align_selection = array(\n\t\t\t\t'left' => __( 'Left', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'right' => __( 'Right', GRVE_THEME_TRANSLATE ),\n\t\t\t);\n\n\t\t\t$grve_background_type = array(\n\t\t\t\t'transparent' => __( 'None', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'colored' => __( 'Background', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'advanced' => __( 'Stretched Background', GRVE_THEME_TRANSLATE ),\n\t\t\t);\n\n\t\t\t$grve_safe_button_options = array(\n\t\t\t\t'search' => __( 'Search', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'language' => __( 'Language selector (WPML Required)', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'newsletter' => __( 'Newsletter', GRVE_THEME_TRANSLATE ),\n\t\t\t);\n\n\t\t\t$grve_header_menu_options = array(\n\t\t\t\t'cart' => __( 'Shopping Cart (WooCommerce Required)', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'search' => __( 'Search', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'newsletter' => __( 'Newsletter', GRVE_THEME_TRANSLATE ),\n\t\t\t);\n\t\t\t$grve_top_bar_options = array(\n\t\t\t\t'search' => __( 'Search', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'language' => __( 'Language selector (WPML Required)', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'newsletter' => __( 'Newsletter', GRVE_THEME_TRANSLATE ),\n\t\t\t);\n\n\t\t\t$grve_menu_animations = array(\n\t\t\t\t'none' => __( 'None', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'fade-in' => __( 'Fade in', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'fade-in-up' => __( 'Fade in Up', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'fade-in-down' => __( 'Fade in Down', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'fade-in-left' => __( 'Fade in Left', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'fade-in-right' => __( 'Fade in Right', GRVE_THEME_TRANSLATE ),\n\t\t\t);\n\n\t\t\t$grve_color_selection = array(\n\t\t\t\t'dark' => __( 'Dark', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'light' => __( 'Light', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'primary-1' => __( 'Primary 1', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'primary-2' => __( 'Primary 2', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'primary-3' => __( 'Primary 3', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'primary-4' => __( 'Primary 4', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'primary-5' => __( 'Primary 5', GRVE_THEME_TRANSLATE ),\n\t\t\t);\n\n\t\t\t$grve_bg_color_selection = array(\n\t\t\t\t'none' => __( 'None', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'dark' => __( 'Dark', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'light' => __( 'Light', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'primary-1' => __( 'Primary 1', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'primary-2' => __( 'Primary 2', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'primary-3' => __( 'Primary 3', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'primary-4' => __( 'Primary 4', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'primary-5' => __( 'Primary 5', GRVE_THEME_TRANSLATE ),\n\t\t\t);\n\n\t\t\t$grve_footer_column_selection = array(\n\t\t\t\t'footer-1' => array('alt' => __( 'Footer 1', GRVE_THEME_TRANSLATE ), 'img' => get_template_directory_uri() . '/includes/images/footer/footer-1.png' ),\n\t\t\t\t'footer-2' => array('alt' => __( 'Footer 2', GRVE_THEME_TRANSLATE ), 'img' => get_template_directory_uri() . '/includes/images/footer/footer-2.png' ),\n\t\t\t\t'footer-3' => array('alt' => __( 'Footer 3', GRVE_THEME_TRANSLATE ), 'img' => get_template_directory_uri() . '/includes/images/footer/footer-3.png' ),\n\t\t\t\t'footer-4' => array('alt' => __( 'Footer 4', GRVE_THEME_TRANSLATE ), 'img' => get_template_directory_uri() . '/includes/images/footer/footer-4.png' ),\n\t\t\t\t'footer-5' => array('alt' => __( 'Footer 5', GRVE_THEME_TRANSLATE ), 'img' => get_template_directory_uri() . '/includes/images/footer/footer-5.png' ),\n\t\t\t\t'footer-6' => array('alt' => __( 'Footer 6', GRVE_THEME_TRANSLATE ), 'img' => get_template_directory_uri() . '/includes/images/footer/footer-6.png' ),\n\t\t\t\t'footer-7' => array('alt' => __( 'Footer 7', GRVE_THEME_TRANSLATE ), 'img' => get_template_directory_uri() . '/includes/images/footer/footer-7.png' ),\n\t\t\t\t'footer-8' => array('alt' => __( 'Footer 8', GRVE_THEME_TRANSLATE ), 'img' => get_template_directory_uri() . '/includes/images/footer/footer-8.png' ),\n\t\t\t\t'footer-9' => array('alt' => __( 'Footer 9', GRVE_THEME_TRANSLATE ), 'img' => get_template_directory_uri() . '/includes/images/footer/footer-9.png' ),\n\t\t\t);\n\n\t\t\t$grve_opacity_selection = array(\n\t\t\t\t'0' => '0%',\n\t\t\t\t'0.05' => '5%',\n\t\t\t\t'0.10' => '10%',\n\t\t\t\t'0.15' => '15%',\n\t\t\t\t'0.20' => '20%',\n\t\t\t\t'0.25' => '25%',\n\t\t\t\t'0.30' => '30%',\n\t\t\t\t'0.35' => '35%',\n\t\t\t\t'0.40' => '40%',\n\t\t\t\t'0.45' => '45%',\n\t\t\t\t'0.50' => '50%',\n\t\t\t\t'0.55' => '55%',\n\t\t\t\t'0.60' => '60%',\n\t\t\t\t'0.65' => '65%',\n\t\t\t\t'0.70' => '70%',\n\t\t\t\t'0.75' => '75%',\n\t\t\t\t'0.80' => '80%',\n\t\t\t\t'0.85' => '85%',\n\t\t\t\t'0.90' => '90%',\n\t\t\t\t'0.95' => '95%',\n\t\t\t\t'1' => '100%',\n\t\t\t);\n\n\t\t\t//Skin Presets\n\t\t\t$grve_skin_palette_1 = '{\"top_bar_bg_color\":\"#303030\",\"top_bar_font_color\":\"#c9c9c9\",\"top_bar_link_color\":\"#c9c9c9\",\"top_bar_hover_color\":\"#ff6863\",\"top_bar_border_color\":\"#4f4f4f\",\"logo_background\":\"transparent\",\"menu_type\":\"simply\",\"header_background_color\":\"#ffffff\",\"header_background_color_opacity\":\"1\",\"logo_background_color\":\"#ff6863\",\"menu_text_color\":\"#3C3A35\",\"menu_text_hover_color\":\"#ff6863\",\"menu_active_bg_color\":\"#ff6863\",\"menu_active_text_color\":\"#ffffff\",\"submenu_text_color\":\"#808080\",\"submenu_text_hover_color\":\"#ffffff\",\"submenu_bg_color\":\"#222222\",\"submenu_active_bg_color\":\"#ff6863\",\"submenu_border_color\":\"#4f4f4f\",\"safe_button_icon_color\":\"#3C3A35\",\"safe_button_bg_color\":\"#ff6863\",\"safe_button_bg_color_opacity\":\"0\",\"safe_button_icon_hover_color\":\"#ff6863\",\"safe_button_bg_hover_color\":\"#222222\",\"safe_button_bg_hover_color_opacity\":\"1\",\"header_sticky_background_color\":\"#ffffff\",\"header_sticky_background_color_opacity\":\"1\",\"logo_sticky_background_color\":\"#ff6863\",\"sticky_menu_text_color\":\"#3C3A35\",\"sticky_menu_text_hover_color\":\"#ff6863\",\"sticky_menu_active_bg_color\":\"#ff6863\",\"sticky_menu_active_text_color\":\"#ffffff\",\"sticky_submenu_text_color\":\"#808080\",\"sticky_submenu_text_hover_color\":\"#ffffff\",\"sticky_submenu_bg_color\":\"#222222\",\"sticky_submenu_hover_bg_color\":\"#ff6863\",\"sticky_submenu_border_color\":\"#4f4f4f\",\"sticky_safe_button_icon_color\":\"#ff6863\",\"sticky_safe_button_bg_color\":\"#191918\",\"sticky_safe_button_bg_color_opacity\":\"0\",\"sticky_safe_button_icon_hover_color\":\"#ffffff\",\"sticky_safe_button_bg_hover_color\":\"#222222\",\"sticky_safe_button_bg_hover_color_opacity\":\"1\",\"header_light_background_color\":\"#3C3A35\",\"header_light_background_color_opacity\":\"0\",\"logo_light_background_color\":\"#ff6863\",\"light_menu_text_color\":\"#ffffff\",\"light_menu_text_hover_color\":\"#ff6863\",\"light_menu_active_bg_color\":\"#ff6863\",\"light_menu_active_text_color\":\"#ffffff\",\"light_submenu_text_color\":\"#808080\",\"light_submenu_text_hover_color\":\"#ffffff\",\"light_submenu_bg_color\":\"#222222\",\"light_submenu_active_bg_color\":\"#ff6863\",\"light_submenu_border_color\":\"#4f4f4f\",\"light_safe_button_icon_color\":\"#ffffff\",\"light_safe_button_bg_color\":\"#ff6863\",\"light_safe_button_bg_color_opacity\":\"0\",\"light_safe_button_icon_hover_color\":\"#ff6863\",\"light_safe_button_bg_hover_color\":\"#222222\",\"light_safe_button_bg_hover_color_opacity\":\"0\",\"header_dark_background_color\":\"#ffffff\",\"header_dark_background_color_opacity\":\"0\",\"logo_dark_background_color\":\"#ff6863\",\"dark_menu_text_color\":\"#3C3A35\",\"dark_menu_text_hover_color\":\"#ff6863\",\"dark_menu_active_bg_color\":\"#ff6863\",\"dark_menu_active_text_color\":\"#ffffff\",\"dark_submenu_text_color\":\"#808080\",\"dark_submenu_text_hover_color\":\"#ffffff\",\"dark_submenu_bg_color\":\"#222222\",\"dark_submenu_active_bg_color\":\"#ff6863\",\"dark_submenu_border_color\":\"#4f4f4f\",\"dark_safe_button_icon_color\":\"#3C3A35\",\"dark_safe_button_bg_color\":\"#ff6863\",\"dark_safe_button_bg_color_opacity\":\"0\",\"dark_safe_button_icon_hover_color\":\"#ff6863\",\"dark_safe_button_bg_hover_color\":\"#222222\",\"dark_safe_button_bg_hover_color_opacity\":\"0\",\"theme_body_background_color\":\"#ffffff\",\"body_heading_color\":\"#454545\",\"body_text_color\":\"#6e7177\",\"body_text_link_color\":\"#ff6863\",\"body_text_link_hover_color\":\"#FF4441\",\"body_border_color\":\"#e4e4e4\",\"body_primary_1_color\":\"#ff6863\",\"body_primary_1_hover_color\":\"#FF4441\",\"body_primary_2_color\":\"#8E8174\",\"body_primary_2_hover_color\":\"#735D47\",\"body_primary_3_color\":\"#86C8B7\",\"body_primary_3_hover_color\":\"#58b49c\",\"body_primary_4_color\":\"#CDB3D8\",\"body_primary_4_hover_color\":\"#BB8CCF\",\"body_primary_5_color\":\"#8CB6CF\",\"body_primary_5_hover_color\":\"#619CBE\",\"blog_sidebar_bg_color\":\"none\",\"post_sidebar_bg_color\":\"none\",\"page_sidebar_bg_color\":\"none\",\"portfolio_sidebar_bg_color\":\"none\",\"bottom_bar_bg_color\":\"#303030\",\"bottom_bar_text_color\":\"#ffffff\",\"bottom_bar_link_color\":\"#ffffff\",\"bottom_bar_hover_color\":\"#ff6863\",\"bottom_bar_button_bg\":\"#ff6863\",\"bottom_bar_button_hover_bg\":\"#2d2c29\",\"footer_widgets_bg_color\":\"#252525\",\"footer_widgets_headings_color\":\"#ffffff\",\"footer_widgets_font_color\":\"#a0a0a0\",\"footer_widgets_link_color\":\"#a0a0a0\",\"footer_widgets_hover_color\":\"#ff6863\",\"footer_widgets_border_color\":\"#444444\",\"footer_bar_bg_color\":\"#222222\",\"footer_bar_font_color\":\"#7a7a7a\",\"footer_bar_link_color\":\"#7a7a7a\",\"footer_bar_hover_color\":\"#ff6863\",\"post_title_background_color\":\"#303030\",\"post_title_color\":\"light\",\"post_fields_bar_background_color\":\"#252525\",\"post_fields_bar_text_color\":\"#B2B2B2\",\"post_fields_bar_text_hover_color\":\"#ffffff\",\"post_fields_bar_background_hover_color\":\"#ff6863\",\"post_fields_bar_border_color\":\"#303030\",\"page_title_background_color\":\"#303030\",\"page_title_color\":\"light\",\"page_description_color\":\"light\",\"page_anchor_menu_background_color\":\"#252525\",\"page_anchor_menu_text_color\":\"#B2B2B2\",\"page_anchor_menu_text_hover_color\":\"#ffffff\",\"page_anchor_menu_background_hover_color\":\"#ff6863\",\"page_anchor_menu_border_color\":\"#303030\",\"portfolio_title_background_color\":\"#303030\",\"portfolio_title_color\":\"light\",\"portfolio_description_color\":\"light\",\"portfolio_fields_bar_background_color\":\"#252525\",\"portfolio_fields_bar_text_color\":\"#B2B2B2\",\"portfolio_fields_bar_text_hover_color\":\"#ffffff\",\"portfolio_fields_bar_background_hover_color\":\"#ff6863\",\"portfolio_fields_bar_border_color\":\"#303030\"}';\n\t\t\t$grve_skin_palette_2 = '{\"top_bar_bg_color\":\"#ffffff\",\"top_bar_font_color\":\"#cccccc\",\"top_bar_link_color\":\"#cccccc\",\"top_bar_hover_color\":\"#333333\",\"top_bar_border_color\":\"#e4e4e4\",\"logo_background\":\"transparent\",\"menu_type\":\"simply\",\"header_background_color\":\"#ffffff\",\"header_background_color_opacity\":\"1\",\"logo_background_color\":\"#ebebeb\",\"menu_text_color\":\"#777777\",\"menu_text_hover_color\":\"#00c5c0\",\"menu_active_bg_color\":\"#00c5c0\",\"menu_active_text_color\":\"#ffffff\",\"submenu_text_color\":\"#a2a2a2\",\"submenu_text_hover_color\":\"#ffffff\",\"submenu_bg_color\":\"#333333\",\"submenu_active_bg_color\":\"#00c5c0\",\"submenu_border_color\":\"#404040\",\"safe_button_icon_color\":\"#ffffff\",\"safe_button_bg_color\":\"#00c5c0\",\"safe_button_bg_color_opacity\":\"1\",\"safe_button_icon_hover_color\":\"#00c5c0\",\"safe_button_bg_hover_color\":\"#333333\",\"safe_button_bg_hover_color_opacity\":\"1\",\"header_sticky_background_color\":\"#ffffff\",\"header_sticky_background_color_opacity\":\"1\",\"logo_sticky_background_color\":\"#ebebeb\",\"sticky_menu_text_color\":\"#777777\",\"sticky_menu_text_hover_color\":\"#00c5c0\",\"sticky_menu_active_bg_color\":\"#00c5c0\",\"sticky_menu_active_text_color\":\"#ffffff\",\"sticky_submenu_text_color\":\"#a2a2a2\",\"sticky_submenu_text_hover_color\":\"#ffffff\",\"sticky_submenu_bg_color\":\"#333333\",\"sticky_submenu_hover_bg_color\":\"#00c5c0\",\"sticky_submenu_border_color\":\"#404040\",\"sticky_safe_button_icon_color\":\"#ffffff\",\"sticky_safe_button_bg_color\":\"#00c5c0\",\"sticky_safe_button_bg_color_opacity\":\"1\",\"sticky_safe_button_icon_hover_color\":\"#00c5c0\",\"sticky_safe_button_bg_hover_color\":\"#333333\",\"sticky_safe_button_bg_hover_color_opacity\":\"1\",\"header_light_background_color\":\"#3C3A35\",\"header_light_background_color_opacity\":\"0\",\"logo_light_background_color\":\"#ebebeb\",\"light_menu_text_color\":\"#777777\",\"light_menu_text_hover_color\":\"#00c5c0\",\"light_menu_active_bg_color\":\"#00c5c0\",\"light_menu_active_text_color\":\"#ffffff\",\"light_submenu_text_color\":\"#a2a2a2\",\"light_submenu_text_hover_color\":\"#ffffff\",\"light_submenu_bg_color\":\"#333333\",\"light_submenu_active_bg_color\":\"#00c5c0\",\"light_submenu_border_color\":\"#404040\",\"light_safe_button_icon_color\":\"#ffffff\",\"light_safe_button_bg_color\":\"#00c5c0\",\"light_safe_button_bg_color_opacity\":\"1\",\"light_safe_button_icon_hover_color\":\"#00c5c0\",\"light_safe_button_bg_hover_color\":\"#333333\",\"light_safe_button_bg_hover_color_opacity\":\"1\",\"header_dark_background_color\":\"#ffffff\",\"header_dark_background_color_opacity\":\"0\",\"logo_dark_background_color\":\"#ebebeb\",\"dark_menu_text_color\":\"#777777\",\"dark_menu_text_hover_color\":\"#00c5c0\",\"dark_menu_active_bg_color\":\"#00c5c0\",\"dark_menu_active_text_color\":\"#ffffff\",\"dark_submenu_text_color\":\"#a2a2a2\",\"dark_submenu_text_hover_color\":\"#ffffff\",\"dark_submenu_bg_color\":\"#333333\",\"dark_submenu_active_bg_color\":\"#00c5c0\",\"dark_submenu_border_color\":\"#404040\",\"dark_safe_button_icon_color\":\"#ffffff\",\"dark_safe_button_bg_color\":\"#00c5c0\",\"dark_safe_button_bg_color_opacity\":\"1\",\"dark_safe_button_icon_hover_color\":\"#00c5c0\",\"dark_safe_button_bg_hover_color\":\"#333333\",\"dark_safe_button_bg_hover_color_opacity\":\"1\",\"theme_body_background_color\":\"#ffffff\",\"body_heading_color\":\"#7a7a7a\",\"body_text_color\":\"#a5a5a5\",\"body_text_link_color\":\"#00c5c0\",\"body_text_link_hover_color\":\"#00e1dd\",\"body_border_color\":\"#e4e4e4\",\"body_primary_1_color\":\"#00c5c0\",\"body_primary_1_hover_color\":\"#00e1dd\",\"body_primary_2_color\":\"#ff6363\",\"body_primary_2_hover_color\":\"#ff8383\",\"body_primary_3_color\":\"#26425f\",\"body_primary_3_hover_color\":\"#395d7e\",\"body_primary_4_color\":\"#f99200\",\"body_primary_4_hover_color\":\"#f9b657\",\"body_primary_5_color\":\"#0070f9\",\"body_primary_5_hover_color\":\"#26a9fd\",\"blog_sidebar_bg_color\":\"none\",\"post_sidebar_bg_color\":\"none\",\"page_sidebar_bg_color\":\"none\",\"portfolio_sidebar_bg_color\":\"none\",\"bottom_bar_bg_color\":\"#EBEBEB\",\"bottom_bar_text_color\":\"#888888\",\"bottom_bar_link_color\":\"#888888\",\"bottom_bar_hover_color\":\"#00C5C0\",\"bottom_bar_button_bg\":\"#333333\",\"bottom_bar_button_hover_bg\":\"#222222\",\"footer_widgets_bg_color\":\"#333333\",\"footer_widgets_headings_color\":\"#ffffff\",\"footer_widgets_font_color\":\"#aeaeae\",\"footer_widgets_link_color\":\"#C8C8C8\",\"footer_widgets_hover_color\":\"#00C5C0\",\"footer_widgets_border_color\":\"#444444\",\"footer_bar_bg_color\":\"#232323\",\"footer_bar_font_color\":\"#777777\",\"footer_bar_link_color\":\"#777777\",\"footer_bar_hover_color\":\"#00C5C0\",\"post_title_background_color\":\"#006661\",\"post_title_color\":\"light\",\"post_fields_bar_background_color\":\"#ebebeb\",\"post_fields_bar_text_color\":\"#999999\",\"post_fields_bar_text_hover_color\":\"#00c5c0\",\"post_fields_bar_background_hover_color\":\"#d9d9d9\",\"post_fields_bar_border_color\":\"#e0e0e0\",\"page_title_background_color\":\"#006661\",\"page_title_color\":\"light\",\"page_description_color\":\"primary-1\",\"page_anchor_menu_background_color\":\"#ebebeb\",\"page_anchor_menu_text_color\":\"#999999\",\"page_anchor_menu_text_hover_color\":\"#00c5c0\",\"page_anchor_menu_background_hover_color\":\"#d9d9d9\",\"page_anchor_menu_border_color\":\"#e0e0e0\",\"portfolio_title_background_color\":\"#006661\",\"portfolio_title_color\":\"light\",\"portfolio_description_color\":\"primary-1\",\"portfolio_fields_bar_background_color\":\"#ebebeb\",\"portfolio_fields_bar_text_color\":\"#999999\",\"portfolio_fields_bar_text_hover_color\":\"#00c5c0\",\"portfolio_fields_bar_background_hover_color\":\"#d9d9d9\",\"portfolio_fields_bar_border_color\":\"#e0e0e0\"}';\n\t\t\t$grve_skin_palette_3 = '{\"top_bar_bg_color\":\"#ffffff\",\"top_bar_font_color\":\"#dedede\",\"top_bar_link_color\":\"#dedede\",\"top_bar_hover_color\":\"#303030\",\"top_bar_border_color\":\"#f0f0f0\",\"logo_background\":\"transparent\",\"menu_type\":\"simply\",\"header_background_color\":\"#ffffff\",\"header_background_color_opacity\":\"1\",\"logo_background_color\":\"#ffdd9f\",\"menu_text_color\":\"#7a7a7a\",\"menu_text_hover_color\":\"#eaae40\",\"menu_active_bg_color\":\"#f7c05c\",\"menu_active_text_color\":\"#ffffff\",\"submenu_text_color\":\"#a2a2a2\",\"submenu_text_hover_color\":\"#ffffff\",\"submenu_bg_color\":\"#303030\",\"submenu_active_bg_color\":\"#f7c05c\",\"submenu_border_color\":\"#4e4e4e\",\"safe_button_icon_color\":\"#ffffff\",\"safe_button_bg_color\":\"#303030\",\"safe_button_bg_color_opacity\":\"1\",\"safe_button_icon_hover_color\":\"#ffffff\",\"safe_button_bg_hover_color\":\"#303030\",\"safe_button_bg_hover_color_opacity\":\"1\",\"header_sticky_background_color\":\"#ffffff\",\"header_sticky_background_color_opacity\":\"1\",\"logo_sticky_background_color\":\"#ffdd9f\",\"sticky_menu_text_color\":\"#7a7a7a\",\"sticky_menu_text_hover_color\":\"#eaae40\",\"sticky_menu_active_bg_color\":\"#f7c05c\",\"sticky_menu_active_text_color\":\"#ffffff\",\"sticky_submenu_text_color\":\"#a2a2a2\",\"sticky_submenu_text_hover_color\":\"#ffffff\",\"sticky_submenu_bg_color\":\"#303030\",\"sticky_submenu_hover_bg_color\":\"#f7c05c\",\"sticky_submenu_border_color\":\"#4e4e4e\",\"sticky_safe_button_icon_color\":\"#ffffff\",\"sticky_safe_button_bg_color\":\"#303030\",\"sticky_safe_button_bg_color_opacity\":\"1\",\"sticky_safe_button_icon_hover_color\":\"#ffffff\",\"sticky_safe_button_bg_hover_color\":\"#303030\",\"sticky_safe_button_bg_hover_color_opacity\":\"1\",\"header_light_background_color\":\"#434343\",\"header_light_background_color_opacity\":\"0\",\"logo_light_background_color\":\"#ffdd9f\",\"light_menu_text_color\":\"#ffffff\",\"light_menu_text_hover_color\":\"#eaae40\",\"light_menu_active_bg_color\":\"#f7c05c\",\"light_menu_active_text_color\":\"#ffffff\",\"light_submenu_text_color\":\"#a2a2a2\",\"light_submenu_text_hover_color\":\"#ffffff\",\"light_submenu_bg_color\":\"#303030\",\"light_submenu_active_bg_color\":\"#f7c05c\",\"light_submenu_border_color\":\"#4e4e4e\",\"light_safe_button_icon_color\":\"#ffffff\",\"light_safe_button_bg_color\":\"#303030\",\"light_safe_button_bg_color_opacity\":\"1\",\"light_safe_button_icon_hover_color\":\"#ffffff\",\"light_safe_button_bg_hover_color\":\"#303030\",\"light_safe_button_bg_hover_color_opacity\":\"1\",\"header_dark_background_color\":\"#ffffff\",\"header_dark_background_color_opacity\":\"0\",\"logo_dark_background_color\":\"#ffdd9f\",\"dark_menu_text_color\":\"#7a7a7a\",\"dark_menu_text_hover_color\":\"#eaae40\",\"dark_menu_active_bg_color\":\"#f7c05c\",\"dark_menu_active_text_color\":\"#ffffff\",\"dark_submenu_text_color\":\"#a2a2a2\",\"dark_submenu_text_hover_color\":\"#ffffff\",\"dark_submenu_bg_color\":\"#303030\",\"dark_submenu_active_bg_color\":\"#f7c05c\",\"dark_submenu_border_color\":\"#4e4e4e\",\"dark_safe_button_icon_color\":\"#ffffff\",\"dark_safe_button_bg_color\":\"#303030\",\"dark_safe_button_bg_color_opacity\":\"1\",\"dark_safe_button_icon_hover_color\":\"#ffffff\",\"dark_safe_button_bg_hover_color\":\"#303030\",\"dark_safe_button_bg_hover_color_opacity\":\"1\",\"theme_body_background_color\":\"#ffffff\",\"body_heading_color\":\"#7a7a7a\",\"body_text_color\":\"#a5a5a5\",\"body_text_link_color\":\"#eaae40\",\"body_text_link_hover_color\":\"#303030\",\"body_border_color\":\"#e4e4e4\",\"body_primary_1_color\":\"#f7c05c\",\"body_primary_1_hover_color\":\"#f4a737\",\"body_primary_2_color\":\"#85eeb5\",\"body_primary_2_hover_color\":\"#54e797\",\"body_primary_3_color\":\"#a159cd\",\"body_primary_3_hover_color\":\"#7b35b9\",\"body_primary_4_color\":\"#5ca2f7\",\"body_primary_4_hover_color\":\"#377df4\",\"body_primary_5_color\":\"#35c1c4\",\"body_primary_5_hover_color\":\"#20a8ac\",\"blog_sidebar_bg_color\":\"none\",\"post_sidebar_bg_color\":\"none\",\"page_sidebar_bg_color\":\"none\",\"portfolio_sidebar_bg_color\":\"none\",\"bottom_bar_bg_color\":\"#ffffff\",\"bottom_bar_text_color\":\"#a5a5a5\",\"bottom_bar_link_color\":\"#a5a5a5\",\"bottom_bar_hover_color\":\"#303030\",\"bottom_bar_button_bg\":\"#303030\",\"bottom_bar_button_hover_bg\":\"#f7c05c\",\"footer_widgets_bg_color\":\"#ffffff\",\"footer_widgets_headings_color\":\"#7a7a7a\",\"footer_widgets_font_color\":\"#7a7a7a\",\"footer_widgets_link_color\":\"#eaae40\",\"footer_widgets_hover_color\":\"#303030\",\"footer_widgets_border_color\":\"#e0e0e0\",\"footer_bar_bg_color\":\"#ffffff\",\"footer_bar_font_color\":\"#7a7a7a\",\"footer_bar_link_color\":\"#7a7a7a\",\"footer_bar_hover_color\":\"#303030\",\"post_title_background_color\":\"#f4f4f4\",\"post_title_color\":\"dark\",\"post_fields_bar_background_color\":\"#434343\",\"post_fields_bar_text_color\":\"#b29b6f\",\"post_fields_bar_text_hover_color\":\"#ffffff\",\"post_fields_bar_background_hover_color\":\"#f9c972\",\"post_fields_bar_border_color\":\"#5c5c5c\",\"page_title_background_color\":\"#f4f4f4\",\"page_title_color\":\"dark\",\"page_description_color\":\"dark\",\"page_anchor_menu_background_color\":\"#434343\",\"page_anchor_menu_text_color\":\"#b29b6f\",\"page_anchor_menu_text_hover_color\":\"#ffffff\",\"page_anchor_menu_background_hover_color\":\"#f9c972\",\"page_anchor_menu_border_color\":\"#5c5c5c\",\"portfolio_title_background_color\":\"#f4f4f4\",\"portfolio_title_color\":\"dark\",\"portfolio_description_color\":\"dark\",\"portfolio_fields_bar_background_color\":\"#434343\",\"portfolio_fields_bar_text_color\":\"#b29b6f\",\"portfolio_fields_bar_text_hover_color\":\"#ffffff\",\"portfolio_fields_bar_background_hover_color\":\"#f9c972\",\"portfolio_fields_bar_border_color\":\"#5c5c5c\"}';\n\t\t\t$grve_skin_palette_4 = '{\"top_bar_bg_color\":\"#ffffff\",\"top_bar_font_color\":\"#c9c9c9\",\"top_bar_link_color\":\"#c9c9c9\",\"top_bar_hover_color\":\"#222222\",\"top_bar_border_color\":\"#ededed\",\"logo_background\":\"transparent\",\"menu_type\":\"simply\",\"header_background_color\":\"#ffffff\",\"header_background_color_opacity\":\"1\",\"logo_background_color\":\"#e6c81e\",\"menu_text_color\":\"#bbbbbb\",\"menu_text_hover_color\":\"#ecba16\",\"menu_active_bg_color\":\"#ecba16\",\"menu_active_text_color\":\"#ffffff\",\"submenu_text_color\":\"#999999\",\"submenu_text_hover_color\":\"#222222\",\"submenu_bg_color\":\"#ededed\",\"submenu_active_bg_color\":\"#ffffff\",\"submenu_border_color\":\"#d4d4d4\",\"safe_button_icon_color\":\"#222222\",\"safe_button_bg_color\":\"#ffffff\",\"safe_button_bg_color_opacity\":\"1\",\"safe_button_icon_hover_color\":\"#ffffff\",\"safe_button_bg_hover_color\":\"#1a1a1a\",\"safe_button_bg_hover_color_opacity\":\"1\",\"header_sticky_background_color\":\"#222222\",\"header_sticky_background_color_opacity\":\"1\",\"logo_sticky_background_color\":\"#e6c81e\",\"sticky_menu_text_color\":\"#bbbbbb\",\"sticky_menu_text_hover_color\":\"#ecba16\",\"sticky_menu_active_bg_color\":\"#ecba16\",\"sticky_menu_active_text_color\":\"#ffffff\",\"sticky_submenu_text_color\":\"#999999\",\"sticky_submenu_text_hover_color\":\"#222222\",\"sticky_submenu_bg_color\":\"#ededed\",\"sticky_submenu_hover_bg_color\":\"#ffffff\",\"sticky_submenu_border_color\":\"#d4d4d4\",\"sticky_safe_button_icon_color\":\"#ffffff\",\"sticky_safe_button_bg_color\":\"#222222\",\"sticky_safe_button_bg_color_opacity\":\"1\",\"sticky_safe_button_icon_hover_color\":\"#ffffff\",\"sticky_safe_button_bg_hover_color\":\"#1a1a1a\",\"sticky_safe_button_bg_hover_color_opacity\":\"1\",\"header_light_background_color\":\"#ffffff\",\"header_light_background_color_opacity\":\"1\",\"logo_light_background_color\":\"#e6c81e\",\"light_menu_text_color\":\"#bbbbbb\",\"light_menu_text_hover_color\":\"#ecba16\",\"light_menu_active_bg_color\":\"#ecba16\",\"light_menu_active_text_color\":\"#ffffff\",\"light_submenu_text_color\":\"#999999\",\"light_submenu_text_hover_color\":\"#222222\",\"light_submenu_bg_color\":\"#ededed\",\"light_submenu_active_bg_color\":\"#ffffff\",\"light_submenu_border_color\":\"#d4d4d4\",\"light_safe_button_icon_color\":\"#222222\",\"light_safe_button_bg_color\":\"#ffffff\",\"light_safe_button_bg_color_opacity\":\"1\",\"light_safe_button_icon_hover_color\":\"#ffffff\",\"light_safe_button_bg_hover_color\":\"#1a1a1a\",\"light_safe_button_bg_hover_color_opacity\":\"1\",\"header_dark_background_color\":\"#222222\",\"header_dark_background_color_opacity\":\"1\",\"logo_dark_background_color\":\"#e6c81e\",\"dark_menu_text_color\":\"#bbbbbb\",\"dark_menu_text_hover_color\":\"#ecba16\",\"dark_menu_active_bg_color\":\"#ecba16\",\"dark_menu_active_text_color\":\"#ffffff\",\"dark_submenu_text_color\":\"#999999\",\"dark_submenu_text_hover_color\":\"#222222\",\"dark_submenu_bg_color\":\"#ededed\",\"dark_submenu_active_bg_color\":\"#ffffff\",\"dark_submenu_border_color\":\"#d4d4d4\",\"dark_safe_button_icon_color\":\"#ffffff\",\"dark_safe_button_bg_color\":\"#1a1a1a\",\"dark_safe_button_bg_color_opacity\":\"1\",\"dark_safe_button_icon_hover_color\":\"#ffffff\",\"dark_safe_button_bg_hover_color\":\"#1a1a1a\",\"dark_safe_button_bg_hover_color_opacity\":\"1\",\"theme_body_background_color\":\"#ffffff\",\"body_heading_color\":\"#454545\",\"body_text_color\":\"#a5a5a5\",\"body_text_link_color\":\"#e6c81e\",\"body_text_link_hover_color\":\"#ECBA16\",\"body_border_color\":\"#e4e4e4\",\"body_primary_1_color\":\"#e6c81e\",\"body_primary_1_hover_color\":\"#ECBA16\",\"body_primary_2_color\":\"#94b305\",\"body_primary_2_hover_color\":\"#618f02\",\"body_primary_3_color\":\"#b3057b\",\"body_primary_3_hover_color\":\"#8f0240\",\"body_primary_4_color\":\"#5973e9\",\"body_primary_4_hover_color\":\"#2f3cdf\",\"body_primary_5_color\":\"#76bef5\",\"body_primary_5_hover_color\":\"#3d9ff0\",\"blog_sidebar_bg_color\":\"none\",\"post_sidebar_bg_color\":\"none\",\"page_sidebar_bg_color\":\"none\",\"portfolio_sidebar_bg_color\":\"none\",\"bottom_bar_bg_color\":\"#1a1a1a\",\"bottom_bar_text_color\":\"#ffffff\",\"bottom_bar_link_color\":\"#ffffff\",\"bottom_bar_hover_color\":\"#e6c81e\",\"bottom_bar_button_bg\":\"#e6c81e\",\"bottom_bar_button_hover_bg\":\"#222222\",\"footer_widgets_bg_color\":\"#222222\",\"footer_widgets_headings_color\":\"#ffffff\",\"footer_widgets_font_color\":\"#a0a0a0\",\"footer_widgets_link_color\":\"#a0a0a0\",\"footer_widgets_hover_color\":\"#e6c81e\",\"footer_widgets_border_color\":\"#444444\",\"footer_bar_bg_color\":\"#1a1a1a\",\"footer_bar_font_color\":\"#7a7a7a\",\"footer_bar_link_color\":\"#7a7a7a\",\"footer_bar_hover_color\":\"#e6c81e\",\"post_title_background_color\":\"#f5f5f5\",\"post_title_color\":\"dark\",\"post_fields_bar_background_color\":\"#222222\",\"post_fields_bar_text_color\":\"#b2b2b2\",\"post_fields_bar_text_hover_color\":\"#ffffff\",\"post_fields_bar_background_hover_color\":\"#1a1a1a\",\"post_fields_bar_border_color\":\"#303030\",\"page_title_background_color\":\"#f5f5f5\",\"page_title_color\":\"dark\",\"page_description_color\":\"dark\",\"page_anchor_menu_background_color\":\"#222222\",\"page_anchor_menu_text_color\":\"#b2b2b2\",\"page_anchor_menu_text_hover_color\":\"#ffffff\",\"page_anchor_menu_background_hover_color\":\"#1a1a1a\",\"page_anchor_menu_border_color\":\"#303030\",\"portfolio_title_background_color\":\"#f5f5f5\",\"portfolio_title_color\":\"dark\",\"portfolio_description_color\":\"dark\",\"portfolio_fields_bar_background_color\":\"#222222\",\"portfolio_fields_bar_text_color\":\"#b2b2b2\",\"portfolio_fields_bar_text_hover_color\":\"#ffffff\",\"portfolio_fields_bar_background_hover_color\":\"#1a1a1a\",\"portfolio_fields_bar_border_color\":\"#303030\"}';\n\t\t\t$grve_skin_palette_5 = '{\"top_bar_bg_color\":\"#303030\",\"top_bar_font_color\":\"#c9c9c9\",\"top_bar_link_color\":\"#c9c9c9\",\"top_bar_hover_color\":\"#F00000\",\"top_bar_border_color\":\"#4f4f4f\",\"logo_background\":\"advanced\",\"menu_type\":\"simply\",\"header_background_color\":\"#000000\",\"header_background_color_opacity\":\"0.10\",\"logo_background_color\":\"#000000\",\"menu_text_color\":\"#ffffff\",\"menu_text_hover_color\":\"#F00000\",\"menu_active_bg_color\":\"#F00000\",\"menu_active_text_color\":\"#ffffff\",\"submenu_text_color\":\"#808080\",\"submenu_text_hover_color\":\"#ffffff\",\"submenu_bg_color\":\"#222222\",\"submenu_active_bg_color\":\"#F00000\",\"submenu_border_color\":\"#4f4f4f\",\"safe_button_icon_color\":\"#ffffff\",\"safe_button_bg_color\":\"#000000\",\"safe_button_bg_color_opacity\":\"1\",\"safe_button_icon_hover_color\":\"#F00000\",\"safe_button_bg_hover_color\":\"#000000\",\"safe_button_bg_hover_color_opacity\":\"1\",\"header_sticky_background_color\":\"#000000\",\"header_sticky_background_color_opacity\":\"0.70\",\"logo_sticky_background_color\":\"#F00000\",\"sticky_menu_text_color\":\"#ffffff\",\"sticky_menu_text_hover_color\":\"#F00000\",\"sticky_menu_active_bg_color\":\"#F00000\",\"sticky_menu_active_text_color\":\"#ffffff\",\"sticky_submenu_text_color\":\"#808080\",\"sticky_submenu_text_hover_color\":\"#ffffff\",\"sticky_submenu_bg_color\":\"#222222\",\"sticky_submenu_hover_bg_color\":\"#F00000\",\"sticky_submenu_border_color\":\"#4f4f4f\",\"sticky_safe_button_icon_color\":\"#ffffff\",\"sticky_safe_button_bg_color\":\"#ff0000\",\"sticky_safe_button_bg_color_opacity\":\"1\",\"sticky_safe_button_icon_hover_color\":\"#ffffff\",\"sticky_safe_button_bg_hover_color\":\"#222222\",\"sticky_safe_button_bg_hover_color_opacity\":\"1\",\"header_light_background_color\":\"#3C3A35\",\"header_light_background_color_opacity\":\"0\",\"logo_light_background_color\":\"#000000\",\"light_menu_text_color\":\"#ffffff\",\"light_menu_text_hover_color\":\"#F00000\",\"light_menu_active_bg_color\":\"#F00000\",\"light_menu_active_text_color\":\"#ffffff\",\"light_submenu_text_color\":\"#808080\",\"light_submenu_text_hover_color\":\"#ffffff\",\"light_submenu_bg_color\":\"#222222\",\"light_submenu_active_bg_color\":\"#f00000\",\"light_submenu_border_color\":\"#4f4f4f\",\"light_safe_button_icon_color\":\"#ffffff\",\"light_safe_button_bg_color\":\"#000000\",\"light_safe_button_bg_color_opacity\":\"1\",\"light_safe_button_icon_hover_color\":\"#ffffff\",\"light_safe_button_bg_hover_color\":\"#000000\",\"light_safe_button_bg_hover_color_opacity\":\"1\",\"header_dark_background_color\":\"#ffffff\",\"header_dark_background_color_opacity\":\"0\",\"logo_dark_background_color\":\"#F00000\",\"dark_menu_text_color\":\"#3C3A35\",\"dark_menu_text_hover_color\":\"#F00000\",\"dark_menu_active_bg_color\":\"#F00000\",\"dark_menu_active_text_color\":\"#ffffff\",\"dark_submenu_text_color\":\"#808080\",\"dark_submenu_text_hover_color\":\"#ffffff\",\"dark_submenu_bg_color\":\"#222222\",\"dark_submenu_active_bg_color\":\"#F00000\",\"dark_submenu_border_color\":\"#4f4f4f\",\"dark_safe_button_icon_color\":\"#ffffff\",\"dark_safe_button_bg_color\":\"#F00000\",\"dark_safe_button_bg_color_opacity\":\"1\",\"dark_safe_button_icon_hover_color\":\"#ffffff\",\"dark_safe_button_bg_hover_color\":\"#000000\",\"dark_safe_button_bg_hover_color_opacity\":\"1\",\"theme_body_background_color\":\"#ffffff\",\"body_heading_color\":\"#000000\",\"body_text_color\":\"#a5a5a5\",\"body_text_link_color\":\"#ff0000\",\"body_text_link_hover_color\":\"#a80000\",\"body_border_color\":\"#e4e4e4\",\"body_primary_1_color\":\"#F00000\",\"body_primary_1_hover_color\":\"#a80000\",\"body_primary_2_color\":\"#ffa100\",\"body_primary_2_hover_color\":\"#cc7300\",\"body_primary_3_color\":\"#1e73be\",\"body_primary_3_hover_color\":\"#1b45b7\",\"body_primary_4_color\":\"#e2008b\",\"body_primary_4_hover_color\":\"#ba0047\",\"body_primary_5_color\":\"#d3e045\",\"body_primary_5_hover_color\":\"#afbf3b\",\"blog_sidebar_bg_color\":\"none\",\"post_sidebar_bg_color\":\"none\",\"page_sidebar_bg_color\":\"none\",\"portfolio_sidebar_bg_color\":\"none\",\"bottom_bar_bg_color\":\"#303030\",\"bottom_bar_text_color\":\"#ffffff\",\"bottom_bar_link_color\":\"#ffffff\",\"bottom_bar_hover_color\":\"#ff0000\",\"bottom_bar_button_bg\":\"#ff0000\",\"bottom_bar_button_hover_bg\":\"#000000\",\"footer_widgets_bg_color\":\"#1c1c1c\",\"footer_widgets_headings_color\":\"#ffffff\",\"footer_widgets_font_color\":\"#a0a0a0\",\"footer_widgets_link_color\":\"#a0a0a0\",\"footer_widgets_hover_color\":\"#ff0000\",\"footer_widgets_border_color\":\"#444444\",\"footer_bar_bg_color\":\"#000000\",\"footer_bar_font_color\":\"#7a7a7a\",\"footer_bar_link_color\":\"#7a7a7a\",\"footer_bar_hover_color\":\"#F00000\",\"post_title_background_color\":\"#303030\",\"post_title_color\":\"light\",\"post_fields_bar_background_color\":\"#252525\",\"post_fields_bar_text_color\":\"#808080\",\"post_fields_bar_text_hover_color\":\"#ffffff\",\"post_fields_bar_background_hover_color\":\"#F00000\",\"post_fields_bar_border_color\":\"#303030\",\"page_title_background_color\":\"#303030\",\"page_title_color\":\"light\",\"page_description_color\":\"light\",\"page_anchor_menu_background_color\":\"#252525\",\"page_anchor_menu_text_color\":\"#808080\",\"page_anchor_menu_text_hover_color\":\"#ffffff\",\"page_anchor_menu_background_hover_color\":\"#F00000\",\"page_anchor_menu_border_color\":\"#303030\",\"portfolio_title_background_color\":\"#303030\",\"portfolio_title_color\":\"light\",\"portfolio_description_color\":\"light\",\"portfolio_fields_bar_background_color\":\"#252525\",\"portfolio_fields_bar_text_color\":\"#808080\",\"portfolio_fields_bar_text_hover_color\":\"#ffffff\",\"portfolio_fields_bar_background_hover_color\":\"#F00000\",\"portfolio_fields_bar_border_color\":\"#303030\"}';\n\t\t\t$grve_skin_palette_6 = '{\"top_bar_bg_color\":\"#000000\",\"top_bar_font_color\":\"#8c8c8c\",\"top_bar_link_color\":\"#15D5A9\",\"top_bar_hover_color\":\"#ffffff\",\"top_bar_border_color\":\"#272727\",\"logo_background\":\"transparent\",\"menu_type\":\"simply\",\"header_background_color\":\"#000000\",\"header_background_color_opacity\":\"1\",\"logo_background_color\":\"#000000\",\"menu_text_color\":\"#ffffff\",\"menu_text_hover_color\":\"#15D5A9\",\"menu_active_bg_color\":\"#15D5A9\",\"menu_active_text_color\":\"#ffffff\",\"submenu_text_color\":\"#8c8c8c\",\"submenu_text_hover_color\":\"#ffffff\",\"submenu_bg_color\":\"#000000\",\"submenu_active_bg_color\":\"#15D5A9\",\"submenu_border_color\":\"#272727\",\"safe_button_icon_color\":\"#15D5A9\",\"safe_button_bg_color\":\"#000000\",\"safe_button_bg_color_opacity\":\"0\",\"safe_button_icon_hover_color\":\"#ffffff\",\"safe_button_bg_hover_color\":\"#000000\",\"safe_button_bg_hover_color_opacity\":\"1\",\"header_sticky_background_color\":\"#000000\",\"header_sticky_background_color_opacity\":\"1\",\"logo_sticky_background_color\":\"#000000\",\"sticky_menu_text_color\":\"#ffffff\",\"sticky_menu_text_hover_color\":\"#15D5A9\",\"sticky_menu_active_bg_color\":\"#15D5A9\",\"sticky_menu_active_text_color\":\"#ffffff\",\"sticky_submenu_text_color\":\"#8c8c8c\",\"sticky_submenu_text_hover_color\":\"#ffffff\",\"sticky_submenu_bg_color\":\"#000000\",\"sticky_submenu_hover_bg_color\":\"#15D5A9\",\"sticky_submenu_border_color\":\"#272727\",\"sticky_safe_button_icon_color\":\"#15D5A9\",\"sticky_safe_button_bg_color\":\"#000000\",\"sticky_safe_button_bg_color_opacity\":\"0\",\"sticky_safe_button_icon_hover_color\":\"#ffffff\",\"sticky_safe_button_bg_hover_color\":\"#000000\",\"sticky_safe_button_bg_hover_color_opacity\":\"1\",\"header_light_background_color\":\"#000000\",\"header_light_background_color_opacity\":\"0.75\",\"logo_light_background_color\":\"#000000\",\"light_menu_text_color\":\"#ffffff\",\"light_menu_text_hover_color\":\"#15D5A9\",\"light_menu_active_bg_color\":\"#15D5A9\",\"light_menu_active_text_color\":\"#ffffff\",\"light_submenu_text_color\":\"#8c8c8c\",\"light_submenu_text_hover_color\":\"#ffffff\",\"light_submenu_bg_color\":\"#000000\",\"light_submenu_active_bg_color\":\"#15D5A9\",\"light_submenu_border_color\":\"#272727\",\"light_safe_button_icon_color\":\"#15D5A9\",\"light_safe_button_bg_color\":\"#000000\",\"light_safe_button_bg_color_opacity\":\"1\",\"light_safe_button_icon_hover_color\":\"#ffffff\",\"light_safe_button_bg_hover_color\":\"#000000\",\"light_safe_button_bg_hover_color_opacity\":\"1\",\"header_dark_background_color\":\"#ffffff\",\"header_dark_background_color_opacity\":\"0.75\",\"logo_dark_background_color\":\"#ffffff\",\"dark_menu_text_color\":\"#000000\",\"dark_menu_text_hover_color\":\"#15D5A9\",\"dark_menu_active_bg_color\":\"#15D5A9\",\"dark_menu_active_text_color\":\"#ffffff\",\"dark_submenu_text_color\":\"#8c8c8c\",\"dark_submenu_text_hover_color\":\"#ffffff\",\"dark_submenu_bg_color\":\"#000000\",\"dark_submenu_active_bg_color\":\"#15D5A9\",\"dark_submenu_border_color\":\"#272727\",\"dark_safe_button_icon_color\":\"#15D5A9\",\"dark_safe_button_bg_color\":\"#000000\",\"dark_safe_button_bg_color_opacity\":\"1\",\"dark_safe_button_icon_hover_color\":\"#ffffff\",\"dark_safe_button_bg_hover_color\":\"#000000\",\"dark_safe_button_bg_hover_color_opacity\":\"1\",\"theme_body_background_color\":\"#ffffff\",\"body_heading_color\":\"#7a7a7a\",\"body_text_color\":\"#a5a5a5\",\"body_text_link_color\":\"#15d5a9\",\"body_text_link_hover_color\":\"#07c081\",\"body_border_color\":\"#e4e4e4\",\"body_primary_1_color\":\"#15D5A9\",\"body_primary_1_hover_color\":\"#07c081\",\"body_primary_2_color\":\"#4dc2e3\",\"body_primary_2_hover_color\":\"#26a5d4\",\"body_primary_3_color\":\"#cc1a87\",\"body_primary_3_hover_color\":\"#b30957\",\"body_primary_4_color\":\"#96cf34\",\"body_primary_4_hover_color\":\"#68b716\",\"body_primary_5_color\":\"#f99200\",\"body_primary_5_hover_color\":\"#f56300\",\"blog_sidebar_bg_color\":\"none\",\"post_sidebar_bg_color\":\"none\",\"page_sidebar_bg_color\":\"none\",\"portfolio_sidebar_bg_color\":\"none\",\"bottom_bar_bg_color\":\"#222222\",\"bottom_bar_text_color\":\"#ffffff\",\"bottom_bar_link_color\":\"#ffffff\",\"bottom_bar_hover_color\":\"#15D5A9\",\"bottom_bar_button_bg\":\"#15D5A9\",\"bottom_bar_button_hover_bg\":\"#000000\",\"footer_widgets_bg_color\":\"#131313\",\"footer_widgets_headings_color\":\"#ffffff\",\"footer_widgets_font_color\":\"#595959\",\"footer_widgets_link_color\":\"#595959\",\"footer_widgets_hover_color\":\"#15D5A9\",\"footer_widgets_border_color\":\"#444444\",\"footer_bar_bg_color\":\"#000000\",\"footer_bar_font_color\":\"#7a7a7a\",\"footer_bar_link_color\":\"#7a7a7a\",\"footer_bar_hover_color\":\"#15D5A9\",\"post_title_background_color\":\"#2c2c2c\",\"post_title_color\":\"light\",\"post_fields_bar_background_color\":\"#131313\",\"post_fields_bar_text_color\":\"#b2b2b2\",\"post_fields_bar_text_hover_color\":\"#15D5A9\",\"post_fields_bar_background_hover_color\":\"#000000\",\"post_fields_bar_border_color\":\"#303030\",\"page_title_background_color\":\"#2c2c2c\",\"page_title_color\":\"light\",\"page_description_color\":\"primary-1\",\"page_anchor_menu_background_color\":\"#131313\",\"page_anchor_menu_text_color\":\"#b2b2b2\",\"page_anchor_menu_text_hover_color\":\"#15D5A9\",\"page_anchor_menu_background_hover_color\":\"#000000\",\"page_anchor_menu_border_color\":\"#303030\",\"portfolio_title_background_color\":\"#2c2c2c\",\"portfolio_title_color\":\"light\",\"portfolio_description_color\":\"primary-1\",\"portfolio_fields_bar_background_color\":\"#131313\",\"portfolio_fields_bar_text_color\":\"#b2b2b2\",\"portfolio_fields_bar_text_hover_color\":\"#15D5A9\",\"portfolio_fields_bar_background_hover_color\":\"#000000\",\"portfolio_fields_bar_border_color\":\"#303030\"}';\n\n\n\t\t\t// ACTUAL DECLARATION OF SECTIONS\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'icon' => 'el-icon-cogs',\n\t\t\t\t'title' => __( 'General Settings', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'customizer' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id'=>'favicon',\n\t\t\t\t\t\t'url'=> true,\n\t\t\t\t\t\t'type' => 'media',\n\t\t\t\t\t\t'title' => __( 'Favicon', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => array( 'url' => get_template_directory_uri() .'/images/favicons/favicon.ico' ),\n\t\t\t\t\t\t'subtitle' => __( 'Upload your site favicon.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id'=>'smooth_scroll_enabled',\n\t\t\t\t\t\t'type' => 'switch',\n\t\t\t\t\t\t'title' => __( 'Smooth Scroll', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Enable or Disable Smooth Scroll.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => '1',\n\t\t\t\t\t\t'on' => __( 'On', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'off' => __( 'Off', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id'=>'back_to_top_enabled',\n\t\t\t\t\t\t'type' => 'switch',\n\t\t\t\t\t\t'title' => __( 'Back to Top', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Enable or Disable the Back to Top button.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => '1',\n\t\t\t\t\t\t'on' => __( 'On', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'off' => __( 'Off', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'replace_admin_logo',\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'title' => __( 'Replace Admin Logo', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Select if you want to replace admin logo with company logo.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => 0,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'tracking_code',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'title' => __( 'Tracking ID', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Type your Google Analytics Tracking ID e.g: UA-XXXXXXXX-X.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => ''\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'title' => __( 'Top Bar Options', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'header' => '',\n\t\t\t\t'desc' => '',\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'icon' => 'el-icon-arrow-up',\n\t\t\t\t'submenu' => true,\n\t\t\t\t'customizer' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id'=>'top_bar_enabled',\n\t\t\t\t\t\t'type' => 'switch',\n\t\t\t\t\t\t'title' => __( 'Top Bar Area', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Enable or Disable TopBar Area to show above your header.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => '0',\n\t\t\t\t\t\t'on' => __( 'On', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'off' => __( 'Off', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'top_bar_height',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'default' => '40',\n\t\t\t\t\t\t'title' => __( 'Top Bar Height', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Enter the Top Bar height in px (Default is 50).', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'validate' => 'numeric',\n\t\t\t\t\t\t'required' => array( 'top_bar_enabled', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'info_top_bar_left',\n\t\t\t\t\t\t'type' => 'info',\n\t\t\t\t\t\t'class' => 'grve-redux-sub-info',\n\t\t\t\t\t\t'title' => __( 'Left Top Bar Area', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'required' => array( 'top_bar_enabled', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id'=>'top_bar_left_enabled',\n\t\t\t\t\t\t'type' => 'switch',\n\t\t\t\t\t\t'title' => __( 'Left Area', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Enable or Disable the Left TopBar Area.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => '0',\n\t\t\t\t\t\t'on' => __( 'On', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'off' => __( 'Off', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'required' => array( 'top_bar_enabled', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'top_bar_left_options',\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'title' => __( 'Left Area Elements', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Enable / Disable the elements you like to show in the Left TopBar Area.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_top_bar_options,\n\t\t\t\t\t\t'required' => array(\n\t\t\t\t\t\t\tarray( 'top_bar_enabled', 'equals', '1' ),\n\t\t\t\t\t\t\tarray( 'top_bar_left_enabled', 'equals', '1' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'top_bar_left_text',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'title' => __( 'Left Area Text', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Place the text you wish for your Left TopBar Area.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t'required' => array(\n\t\t\t\t\t\t\tarray( 'top_bar_enabled', 'equals', '1' ),\n\t\t\t\t\t\t\tarray( 'top_bar_left_enabled', 'equals', '1' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id'=>'top_bar_left_social_visibility',\n\t\t\t\t\t\t'type' => 'switch',\n\t\t\t\t\t\t'title' => __( 'Left Area Social Icons Visibility', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Enable and add social icons for the Left TopBar Area.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => '0',\n\t\t\t\t\t\t'on' => __( 'On', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'off' => __( 'Off', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'required' => array(\n\t\t\t\t\t\t\tarray( 'top_bar_enabled', 'equals', '1' ),\n\t\t\t\t\t\t\tarray( 'top_bar_left_enabled', 'equals', '1' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'top_bar_left_social_options',\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'title' => __( 'Left Area Social Icons', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select your social icons.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'desc' => '',\n\t\t\t\t\t\t'label' => true,\n\t\t\t\t\t\t'options' => $grve_social_options,\n\t\t\t\t\t\t'required' => array(\n\t\t\t\t\t\t\tarray( 'top_bar_enabled', 'equals', '1' ),\n\t\t\t\t\t\t\tarray( 'top_bar_left_enabled', 'equals', '1' ),\n\t\t\t\t\t\t\tarray( 'top_bar_left_social_visibility', 'equals', '1' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'info_top_bar_right',\n\t\t\t\t\t\t'type' => 'info',\n\t\t\t\t\t\t'class' => 'grve-redux-sub-info',\n\t\t\t\t\t\t'title' => __( 'Right Top Bar Area', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'required' => array( 'top_bar_enabled', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id'=>'top_bar_right_enabled',\n\t\t\t\t\t\t'type' => 'switch',\n\t\t\t\t\t\t'title' => __( 'Right Area', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Enable or Disable the Right TopBar Area.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => '0',\n\t\t\t\t\t\t'on' => __( 'On', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'off' => __( 'Off', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'required' => array( 'top_bar_enabled', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'top_bar_right_options',\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'title' => __( 'Right Area Elements', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Enable / Disable the elements you like to show in the Right TopBar Area.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_top_bar_options,\n\t\t\t\t\t\t'required' => array(\n\t\t\t\t\t\t\tarray( 'top_bar_enabled', 'equals', '1' ),\n\t\t\t\t\t\t\tarray( 'top_bar_right_enabled', 'equals', '1' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'top_bar_right_text',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'title' => __( 'Right Area Text', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Place the text you wish for your Right TopBar Area.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t'required' => array(\n\t\t\t\t\t\t\tarray( 'top_bar_enabled', 'equals', '1' ),\n\t\t\t\t\t\t\tarray( 'top_bar_right_enabled', 'equals', '1' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id'=>'top_bar_right_social_visibility',\n\t\t\t\t\t\t'type' => 'switch',\n\t\t\t\t\t\t'title' => __( 'Right Area Social Icons Visibility', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Enable and add social icons for the Right TopBar Area.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => '0',\n\t\t\t\t\t\t'on' => __( 'On', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'off' => __( 'Off', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'required' => array(\n\t\t\t\t\t\t\tarray( 'top_bar_enabled', 'equals', '1' ),\n\t\t\t\t\t\t\tarray( 'top_bar_right_enabled', 'equals', '1' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'top_bar_right_social_options',\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'title' => __( 'Right Area Social Icons', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select your social icons.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'desc' => '',\n\t\t\t\t\t\t'label' => true,\n\t\t\t\t\t\t'options' => $grve_social_options,\n\t\t\t\t\t\t'required' => array(\n\t\t\t\t\t\t\tarray( 'top_bar_enabled', 'equals', '1' ),\n\t\t\t\t\t\t\tarray( 'top_bar_right_enabled', 'equals', '1' ),\n\t\t\t\t\t\t\tarray( 'top_bar_right_social_visibility', 'equals', '1' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'title' => __( 'Header Options', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'header' => '',\n\t\t\t\t'desc' => '',\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'icon' => 'el-icon-screen',\n\t\t\t\t'submenu' => true,\n\t\t\t\t'customizer' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'header_height',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'default' => '70',\n\t\t\t\t\t\t'title' => __( 'Header Height', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Enter Header height in px (Default is 70).', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'validate' => 'numeric',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'info_default_logo_options',\n\t\t\t\t\t\t'type' => 'info',\n\t\t\t\t\t\t'class' => 'grve-redux-sub-info',\n\t\t\t\t\t\t'title' => __( 'Logo options for the Default Header', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'logo',\n\t\t\t\t\t\t'url' => true,\n\t\t\t\t\t\t'type' => 'media',\n\t\t\t\t\t\t'title' => __( 'Logo', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'read-only' => false,\n\t\t\t\t\t\t'default' => array( 'url' => get_template_directory_uri() .'/images/logos/logo-default.png', 'width' => '94', 'height' => '20' ),\n\t\t\t\t\t\t'subtitle' => __( 'Upload your logo here.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'retina_logo',\n\t\t\t\t\t\t'url' => true,\n\t\t\t\t\t\t'type' => 'media',\n\t\t\t\t\t\t'title' => __( 'Retina Logo', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'read-only' => false,\n\t\t\t\t\t\t'default' => array( 'url' => get_template_directory_uri() .'/images/logos/[email protected]', 'width' => '188', 'height' => '40' ),\n\t\t\t\t\t\t'subtitle' => __( 'Upload the retina version (2x) of your logo.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'logo_align',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'compiler' => true,\n\t\t\t\t\t\t'title' => __( 'Logo Alignment', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select the position of your logo.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_align_selection,\n\t\t\t\t\t\t'default' => 'left',\n\t\t\t\t\t\t'validate' => 'not_empty',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'info_menu_options',\n\t\t\t\t\t\t'type' => 'info',\n\t\t\t\t\t\t'class' => 'grve-redux-sub-info',\n\t\t\t\t\t\t'title' => __( 'Menu options for the Default Header', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'menu_align',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'compiler' => true,\n\t\t\t\t\t\t'title' => __( 'Menu Alignment', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select the position of your menu.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_align_selection,\n\t\t\t\t\t\t'default' => 'right',\n\t\t\t\t\t\t'validate' => 'not_empty',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'submenu_animation',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __( 'Sub Menu Animation', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Choose animation effect for the submenu.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_menu_animations,\n\t\t\t\t\t\t'default' => 'none',\n\t\t\t\t\t\t'validate' => 'not_empty',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'info_safe_button',\n\t\t\t\t\t\t'type' => 'info',\n\t\t\t\t\t\t'class' => 'grve-redux-sub-info',\n\t\t\t\t\t\t'title' => __( 'Safe Button options for the Default Header', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id'=>'safe_button_enabled',\n\t\t\t\t\t\t'type' => 'switch',\n\t\t\t\t\t\t'title' => __( 'Safe Button', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Enable or disable the Safe Button. Then select the elements you wish to include into this.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => '0',\n\t\t\t\t\t\t'on' => __( 'On', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'off' => __( 'Off', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'safe_button_align',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'compiler' => true,\n\t\t\t\t\t\t'title' => __( 'Safe Button Alignment', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Set the alignment of your Safe Button.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_align_selection,\n\t\t\t\t\t\t'default' => 'right',\n\t\t\t\t\t\t'validate' => 'not_empty',\n\t\t\t\t\t\t'required' => array( 'safe_button_enabled', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'safe_button_size',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'default' => '70',\n\t\t\t\t\t\t'title' => __( 'Safe Button Size', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Enter Safe Button size in px (Default is 50).', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'validate' => 'numeric',\n\t\t\t\t\t\t'required' => array( 'safe_button_enabled', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'safe_button_right_space',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'default' => '0',\n\t\t\t\t\t\t'title' => __( 'Safe Button Space', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Enter Safe Button right space in px (Default is 20).', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'validate' => 'numeric',\n\t\t\t\t\t\t'required' => array(\n\t\t\t\t\t\t\tarray( 'safe_button_enabled', 'equals', '1' ),\n\t\t\t\t\t\t\tarray( 'safe_button_align', 'equals', 'right' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'safe_button_left_space',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'default' => '0',\n\t\t\t\t\t\t'title' => __( 'Safe Button Space', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Enter Safe Button left space in px (Default is 20).', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'validate' => 'numeric',\n\t\t\t\t\t\t'required' => array(\n\t\t\t\t\t\t\tarray( 'safe_button_enabled', 'equals', '1' ),\n\t\t\t\t\t\t\tarray( 'safe_button_align', 'equals', 'left' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'safe_button_options',\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'title' => __( 'Safe Button Options', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Enable / Disable any of the safe button options besides.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_safe_button_options,\n\t\t\t\t\t\t'required' => array( 'safe_button_enabled', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'safe_button_option_search_text',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'title' => __( 'Safe Button Search Text', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Type text for the search option.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => 'Search For',\n\t\t\t\t\t\t'required' => array( 'safe_button_enabled', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'safe_button_option_language_text',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'title' => __( 'Safe Button Language Text', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Type text for the language selector option.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => 'Select Language',\n\t\t\t\t\t\t'required' => array( 'safe_button_enabled', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'safe_button_option_newsletter_text',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'title' => __( 'Safe Button Newsletter Text', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Type text for the newsletter option.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => 'Newsletter',\n\t\t\t\t\t\t'required' => array( 'safe_button_enabled', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id'=>'safe_button_social_visibility',\n\t\t\t\t\t\t'type' => 'switch',\n\t\t\t\t\t\t'title' => __( 'Safe Button Social Icons Visibility', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Enable and add social icons to be placed in the safe button.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => '0',\n\t\t\t\t\t\t'on' => __( 'On', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'off' => __( 'Off', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'required' => array( 'safe_button_enabled', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'safe_button_option_social_text',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'title' => __( 'Safe Button Social Icons Text', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Type text for the social icons option.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => 'Stay Connected',\n\t\t\t\t\t\t'required' => array(\n\t\t\t\t\t\t\tarray( 'safe_button_enabled', 'equals', '1' ),\n\t\t\t\t\t\t\tarray( 'safe_button_social_visibility', 'equals', '1' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'safe_button_social_options',\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'title' => __( 'Safe Button Social Icons', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select your safe button social icons.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'desc' => '',\n\t\t\t\t\t\t'label' => true,\n\t\t\t\t\t\t'options' => $grve_social_options,\n\t\t\t\t\t\t'required' => array(\n\t\t\t\t\t\t\tarray( 'safe_button_enabled', 'equals', '1' ),\n\t\t\t\t\t\t\tarray( 'safe_button_social_visibility', 'equals', '1' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'info_menu_elements',\n\t\t\t\t\t\t'type' => 'info',\n\t\t\t\t\t\t'class' => 'grve-redux-sub-info',\n\t\t\t\t\t\t'title' => __( 'Menu Elements options for the Default Header', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id'=>'header_menu_options_enabled',\n\t\t\t\t\t\t'type' => 'switch',\n\t\t\t\t\t\t'title' => __( 'Menu Elements', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Enable or disable the use of various elements in your header like shop cart, socials, search, language selector and newsletter.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => '0',\n\t\t\t\t\t\t'on' => __( 'On', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'off' => __( 'Off', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'header_menu_options',\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'title' => __( 'Menu Elements Options', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Enable / Disable various menu elements options.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_header_menu_options,\n\t\t\t\t\t\t'required' => array( 'header_menu_options_enabled', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id'=>'header_menu_social_visibility',\n\t\t\t\t\t\t'type' => 'switch',\n\t\t\t\t\t\t'title' => __( 'Menu Social Icons Visibility', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Enable and add social icons in your header.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => '0',\n\t\t\t\t\t\t'on' => __( 'On', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'off' => __( 'Off', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'required' => array( 'header_menu_options_enabled', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'header_menu_social_options',\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'title' => __( 'Menu Social Icons', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select the social icons.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'desc' => '',\n\t\t\t\t\t\t'label' => true,\n\t\t\t\t\t\t'options' => $grve_social_options,\n\t\t\t\t\t\t'required' => array(\n\t\t\t\t\t\t\tarray( 'header_menu_options_enabled', 'equals', '1' ),\n\t\t\t\t\t\t\tarray( 'header_menu_social_visibility', 'equals', '1' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'header_menu_options_align',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'compiler' => true,\n\t\t\t\t\t\t'title' => __( 'Various Elements Alignment', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Set the alignment of your header elements.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_align_selection,\n\t\t\t\t\t\t'default' => 'right',\n\t\t\t\t\t\t'validate' => 'not_empty',\n\t\t\t\t\t\t'required' => array( 'header_menu_options_enabled', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'title' => __( 'Sticky Header Options', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'header' => '',\n\t\t\t\t'desc' => '',\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'icon' => 'el-icon-screen',\n\t\t\t\t'submenu' => true,\n\t\t\t\t'customizer' => false,\n\t\t\t\t'subsection' => true,\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id'=>'header_sticky_enabled',\n\t\t\t\t\t\t'type' => 'switch',\n\t\t\t\t\t\t'title' => __( 'Sticky Header', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Enable the Sticky Header when scrolling down the page.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => '0',\n\t\t\t\t\t\t'on' => __( 'On', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'off' => __( 'Off', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'header_sticky_type',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __( 'Sticky Header Type', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Select the type for the Sticky Header.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'simply' => __( 'Simple', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\t'advanced' => __( 'Advanced', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\t'shrink' => __( 'Shrink', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => 'simply',\n\t\t\t\t\t\t'validate' => 'not_empty',\n\t\t\t\t\t\t'required' => array( 'header_sticky_enabled', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'info_logo_sticky',\n\t\t\t\t\t\t'type' => 'info',\n\t\t\t\t\t\t'class' => 'grve-redux-sub-info',\n\t\t\t\t\t\t'title' => __( 'Logo Settings for the Sticky Header', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'required' => array( 'header_sticky_enabled', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'logo_sticky',\n\t\t\t\t\t\t'url'=> true,\n\t\t\t\t\t\t'type' => 'media',\n\t\t\t\t\t\t'title' => __( 'Logo Sticky Header', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'read-only' => false,\n\t\t\t\t\t\t'default' => array( 'url' => get_template_directory_uri() .'/images/logos/logo-default.png', 'width' => '94', 'height' => '20' ),\n\t\t\t\t\t\t'subtitle' => __( 'Upload your logo for the Sticky Header.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'required' => array( 'header_sticky_enabled', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'retina_logo_sticky',\n\t\t\t\t\t\t'url'=> true,\n\t\t\t\t\t\t'type' => 'media',\n\t\t\t\t\t\t'title' => __( 'Retina Logo Sticky Header', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'read-only' => false,\n\t\t\t\t\t\t'default' => array( 'url' => get_template_directory_uri() .'/images/logos/[email protected]', 'width' => '188', 'height' => '40' ),\n\t\t\t\t\t\t'subtitle' => __( 'Upload the retina version (2x) of your logo in the sticky header.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'required' => array( 'header_sticky_enabled', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'title' => __( 'Light Header Options', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'header' => '',\n\t\t\t\t'desc' => __( 'Notice that, there is no need to use the Light Header if you do not intend to integrate the Feature Section with the Header in pages and single portfolio items (where Osmosis provides the Feature Section).', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'icon' => 'el-icon-screen',\n\t\t\t\t'submenu' => true,\n\t\t\t\t'customizer' => false,\n\t\t\t\t'subsection' => true,\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'info_logo_light',\n\t\t\t\t\t\t'type' => 'info',\n\t\t\t\t\t\t'class' => 'grve-redux-sub-info',\n\t\t\t\t\t\t'title' => __( 'Logo Settings for the Light Header', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'logo_light',\n\t\t\t\t\t\t'url'=> true,\n\t\t\t\t\t\t'type' => 'media',\n\t\t\t\t\t\t'title' => __( 'Logo', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'read-only' => false,\n\t\t\t\t\t\t'default' => array( 'url' => get_template_directory_uri() .'/images/logos/logo-light.png', 'width' => '94', 'height' => '20' ),\n\t\t\t\t\t\t'subtitle' => __( 'Upload your logo for the Light Header.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'retina_logo_light',\n\t\t\t\t\t\t'url'=> true,\n\t\t\t\t\t\t'type' => 'media',\n\t\t\t\t\t\t'title' => __( 'Retina Logo Light Header', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'read-only' => false,\n\t\t\t\t\t\t'default' => array( 'url' => get_template_directory_uri() .'/images/logos/[email protected]', 'width' => '188', 'height' => '40' ),\n\t\t\t\t\t\t'subtitle' => __( 'Upload the retina version (2x) of your logo in the Light Header.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'title' => __( 'Dark Header Options', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'header' => '',\n\t\t\t\t'desc' => __( 'Notice that, there is no need to use the Dark Header if you do not intend to integrate the Feature Section with the Header in pages and single portfolio items (where Osmosis provides the Feature Section).', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'icon' => 'el-icon-screen',\n\t\t\t\t'submenu' => true,\n\t\t\t\t'customizer' => false,\n\t\t\t\t'subsection' => true,\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'info_logo_dark',\n\t\t\t\t\t\t'type' => 'info',\n\t\t\t\t\t\t'class' => 'grve-redux-sub-info',\n\t\t\t\t\t\t'title' => __( 'Logo Settings for the Dark Header', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'logo_dark',\n\t\t\t\t\t\t'url' => true,\n\t\t\t\t\t\t'type' => 'media',\n\t\t\t\t\t\t'title' => __( 'Logo', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'read-only' => false,\n\t\t\t\t\t\t'default' => array( 'url' => get_template_directory_uri() .'/images/logos/logo-dark.png', 'width' => '94', 'height' => '20' ),\n\t\t\t\t\t\t'subtitle' => __( 'Upload your logo for the Dark Header.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'retina_logo_dark',\n\t\t\t\t\t\t'url' => true,\n\t\t\t\t\t\t'type' => 'media',\n\t\t\t\t\t\t'title' => __( 'Retina Logo Dark Header', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'read-only' => false,\n\t\t\t\t\t\t'default' => array( 'url' => get_template_directory_uri() .'/images/logos/[email protected]', 'width' => '188', 'height' => '40' ),\n\t\t\t\t\t\t'subtitle' => __( 'Upload the retina version (2x) of your logo in the Dark Header.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'icon' => 'el-icon-arrow-down',\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'title' => __( 'Bottom Bar Options', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'submenu' => true,\n\t\t\t\t'customizer' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id'=>'bottom_bar_enabled',\n\t\t\t\t\t\t'type' => 'switch',\n\t\t\t\t\t\t'title' => __( 'Bottom Bar', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Enable or Disable Bottom Bar Area to show above your footer.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => '0',\n\t\t\t\t\t\t'on' => __( 'On', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'off' => __( 'Off', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'bottom_bar_spacing',\n\t\t\t\t\t\t'type' => 'spacing',\n\t\t\t\t\t\t'output' => array('#grve-above-footer'),\n\t\t\t\t\t\t'mode' => 'padding',\n\t\t\t\t\t\t'units' => 'px',\n\t\t\t\t\t\t'units_extended' => 'false',\n\t\t\t\t\t\t'left' => 'false',\n\t\t\t\t\t\t'right' => 'false',\n\t\t\t\t\t\t'title' => __( 'Spacing', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Set the spacing of the Bottom Bar Area.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'desc' => __( 'Set spacing Top, Bottom in px.', GRVE_THEME_TRANSLATE),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'padding-top' => '65px',\n\t\t\t\t\t\t\t'padding-bottom' => '65px',\n\t\t\t\t\t\t\t'units' => 'px',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'required' => array( 'bottom_bar_enabled', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id'=>'bottom_bar_social_visibility',\n\t\t\t\t\t\t'type' => 'switch',\n\t\t\t\t\t\t'title' => __( 'Bottom Bar Social Visibility', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Enable and add socials for the Bottom Bar Area.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => '0',\n\t\t\t\t\t\t'on' => __( 'On', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'off' => __( 'Off', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'required' => array( 'bottom_bar_enabled', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'bottom_bar_social_options',\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'title' => __( 'Bottom Bar Socials', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select your social icons.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'desc' => '',\n\t\t\t\t\t\t'label' => true,\n\t\t\t\t\t\t'options' => $grve_social_options,\n\t\t\t\t\t\t'required' => array(\n\t\t\t\t\t\t\tarray( 'bottom_bar_enabled', 'equals', '1' ),\n\t\t\t\t\t\t\tarray( 'bottom_bar_social_visibility', 'equals', '1' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id'=>'bottom_bar_newsletter_visibility',\n\t\t\t\t\t\t'type' => 'switch',\n\t\t\t\t\t\t'title' => __( 'Bottom Bar Newsletter', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Enable the newsletter form in the Bottom Bar Area.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => '0',\n\t\t\t\t\t\t'on' => __( 'On', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'off' => __( 'Off', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'required' => array( 'bottom_bar_enabled', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'icon' => 'el-icon-arrow-down',\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'title' => __( 'Footer Options', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'submenu' => true,\n\t\t\t\t'customizer' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'info_footer_widgets',\n\t\t\t\t\t\t'type' => 'info',\n\t\t\t\t\t\t'class' => 'grve-redux-sub-info',\n\t\t\t\t\t\t'title' => __( 'Footer Widgets Settings', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id'=>'footer_widgets_visibility',\n\t\t\t\t\t\t'type' => 'switch',\n\t\t\t\t\t\t'title' => __( 'Footer Widgets Visibility', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Enable the Footer Area to show the widget areas of the footer.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => '0',\n\t\t\t\t\t\t'on' => __( 'On', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'off' => __( 'Off', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'footer_widgets_layout',\n\t\t\t\t\t\t'type' => 'image_select',\n\t\t\t\t\t\t'compiler' => true,\n\t\t\t\t\t\t'title' => __( 'Footer Column Layout', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select Footer column layout.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_footer_column_selection,\n\t\t\t\t\t\t'default' => 'footer-1',\n\t\t\t\t\t\t'required' => array( 'footer_widgets_visibility', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'footer_section_type',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __( 'Footer Full Width', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Select Yes if you like a full-width Footer Area.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'fullwidth-background' => __( 'No', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\t'fullwidth-element' => __( 'Yes', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => 'fullwidth-background',\n\t\t\t\t\t\t'validate' => 'not_empty',\n\t\t\t\t\t\t'required' => array( 'footer_widgets_visibility', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'footer_widgets_spacing',\n\t\t\t\t\t\t'type' => 'spacing',\n\t\t\t\t\t\t'output' => array('#grve-footer-area'),\n\t\t\t\t\t\t'mode' => 'padding',\n\t\t\t\t\t\t'units' => 'px',\n\t\t\t\t\t\t'units_extended' => 'false',\n\t\t\t\t\t\t'left' => 'false',\n\t\t\t\t\t\t'right' => 'false',\n\t\t\t\t\t\t'title' => __( 'Spacing', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Set the spacing of Footer Area.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'desc' => __( 'Set spacing Top, Bottom in px.', GRVE_THEME_TRANSLATE),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'padding-top' => '70px',\n\t\t\t\t\t\t\t'padding-bottom' => '70px',\n\t\t\t\t\t\t\t'units' => 'px',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'required' => array( 'footer_widgets_visibility', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'info_footer_bar',\n\t\t\t\t\t\t'type' => 'info',\n\t\t\t\t\t\t'class' => 'grve-redux-sub-info',\n\t\t\t\t\t\t'title' => __( 'Footer Bar Settings', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id'=>'footer_bar_visibility',\n\t\t\t\t\t\t'type' => 'switch',\n\t\t\t\t\t\t'title' => __( 'Footer Bar Visibility', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Enable the Footer Bar Area for the copyright, bottom menu and socials.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => '1',\n\t\t\t\t\t\t'on' => __( 'On', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'off' => __( 'Off', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'footer_bar_section_type',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __( 'Footer Bar Full Width', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Select Yes if you like a full-width Footer Bar Area.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'fullwidth-background' => __( 'No', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\t'fullwidth-element' => __( 'Yes', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => 'fullwidth-background',\n\t\t\t\t\t\t'validate' => 'not_empty',\n\t\t\t\t\t\t'required' => array( 'footer_bar_visibility', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'footer_bar_align_center',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __( 'Footer Bar Center', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Select if the Footer Bar elements will be centered.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'no' => __( 'No', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\t'yes' => __( 'Yes', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => 'yes',\n\t\t\t\t\t\t'validate' => 'not_empty',\n\t\t\t\t\t\t'required' => array( 'footer_bar_visibility', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'footer_bar_spacing',\n\t\t\t\t\t\t'type' => 'spacing',\n\t\t\t\t\t\t'output' => array('#grve-footer-bar'),\n\t\t\t\t\t\t'mode' => 'padding',\n\t\t\t\t\t\t'units' => 'px',\n\t\t\t\t\t\t'units_extended' => 'false',\n\t\t\t\t\t\t'left' => 'false',\n\t\t\t\t\t\t'right' => 'false',\n\t\t\t\t\t\t'title' => __( 'Spacing', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Set the spacing of Footer Bar Area.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'desc' => __( 'Set spacing Top, Bottom in px.', GRVE_THEME_TRANSLATE),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'padding-top' => '20px',\n\t\t\t\t\t\t\t'padding-bottom' => '20px',\n\t\t\t\t\t\t\t'units' => 'px',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'required' => array( 'footer_bar_visibility', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id'=>'footer_copyright_visibility',\n\t\t\t\t\t\t'type' => 'switch',\n\t\t\t\t\t\t'title' => __( 'Footer Copyright Visibility', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Enable the Footer Copyright Area. Edit it as you wish.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => '1',\n\t\t\t\t\t\t'on' => __( 'On', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'off' => __( 'Off', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'required' => array( 'footer_bar_visibility', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'footer_copyright_text',\n\t\t\t\t\t\t'type' => 'editor',\n\t\t\t\t\t\t'title' => __( 'Copyright Text', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Type your copyright text or anything else you want.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => 'Copyright 2014 - All Rights Reserved.',\n\t\t\t\t\t\t'required' => array(\n\t\t\t\t\t\t\tarray( 'footer_bar_visibility', 'equals', '1' ),\n\t\t\t\t\t\t\tarray( 'footer_copyright_visibility', 'equals', '1' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id'=>'second_area_visibility',\n\t\t\t\t\t\t'type' => 'button_set',\n\t\t\t\t\t\t'title' => __( 'Second Footer Area', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'This is the second position in the Footer Bar Area. You can easily add the Bottom Menu or socials.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'1' => __( 'Hide', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\t'2' => __( 'Menu', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\t'3' => __( 'Socials', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => '1',\n\t\t\t\t\t\t'required' => array( 'footer_bar_visibility', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'footer_social_options',\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'title' => __( 'Footer Social items', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select your social icons.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'desc' => '',\n\t\t\t\t\t\t'label' => true,\n\t\t\t\t\t\t'options' => $grve_social_options,\n\t\t\t\t\t\t'required' => array(\n\t\t\t\t\t\t\tarray( 'footer_bar_visibility', 'equals', '1' ),\n\t\t\t\t\t\t\tarray( 'second_area_visibility', 'equals', '3' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'icon' => 'el-icon-edit',\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'title' => __( 'Blog Options', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'desc' => __( 'Changes here will affect the settings for the assigned blog page in case you have set a Static Page as blog page in Settings > Reading > Front Page Displays', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'submenu' => true,\n\t\t\t\t'customizer' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'blog_layout',\n\t\t\t\t\t\t'type' => 'image_select',\n\t\t\t\t\t\t'compiler' => true,\n\t\t\t\t\t\t'title' => __( 'Blog Layout', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select the layout for the assigned blog page. Choose among Full Width, Left Sidebar or Right Sidebar.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_layout_selection,\n\t\t\t\t\t\t'default' => 'right',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'blog_sidebar',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __( 'Blog Sidebar', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select the sidebar for the assigned blog page.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'data' => 'sidebar',\n\t\t\t\t\t\t'default' => 'grve-default-sidebar',\n\t\t\t\t\t\t'validate' => 'not_empty',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id'=>'blog_title',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __( 'Blog Title', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Select if you want to use the site name and tagline as blog title or hide it.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'sitetitle' => __( 'Site Title / Tagline', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\t'none' => __( 'None', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => 'sitetitle',\n\t\t\t\t\t\t'validate' => 'not_empty',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'blog_auto_excerpt',\n\t\t\t\t\t\t'type' => 'switch',\n\t\t\t\t\t\t'title' => __( 'Auto Excerpt', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( \"Adds automatic excerpt to all posts. If auto excerpt is off, blog will show all content, a desired 'cut-off' can be inserted in each post with more quicktag.\", GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => '0',\n\t\t\t\t\t\t'on' => __( 'On', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'off' => __( 'Off', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id'=>'blog_excerpt_length',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'default' => '55',\n\t\t\t\t\t\t'title' => __( 'Excerpt Length', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Type how many words you want to display in your post excerpts (Default is 55).', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'validate' => 'numeric',\n\t\t\t\t\t\t'required' => array( 'blog_auto_excerpt', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'blog_excerpt_more',\n\t\t\t\t\t\t'type' => 'switch',\n\t\t\t\t\t\t'title' => __( 'Read More', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( \"Adds a read more button after the excerpt or more quicktag.\", GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => '1',\n\t\t\t\t\t\t'on' => __( 'On', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'off' => __( 'Off', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id'=>'blog_comments_visibility',\n\t\t\t\t\t\t'type' => 'switch',\n\t\t\t\t\t\t'title' => __( 'Comments Visibility', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Easily disable the comments of your blog.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => '1',\n\t\t\t\t\t\t'on' => __( 'On', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'off' => __( 'Off', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'title' => __( 'Single Post Settings', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'header' => '',\n\t\t\t\t'desc' => '',\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'icon' => 'el-icon-screen',\n\t\t\t\t'submenu' => true,\n\t\t\t\t'customizer' => false,\n\t\t\t\t'subsection' => true,\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'post_layout',\n\t\t\t\t\t\t'type' => 'image_select',\n\t\t\t\t\t\t'compiler' => true,\n\t\t\t\t\t\t'title' => __( 'Post Layout', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select the layout for the single post format. Choose among Full Width, Left Sidebar or Right Sidebar.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_layout_selection,\n\t\t\t\t\t\t'default' => 'right',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'post_sidebar',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __( 'Post Sidebar', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select the sidebar for the single posts.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'data' => 'sidebar',\n\t\t\t\t\t\t'default' => 'grve-default-sidebar',\n\t\t\t\t\t\t'validate' => 'not_empty',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'post_style',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'compiler' => true,\n\t\t\t\t\t\t'title' => __( 'Post Style', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select the style for the single post', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'default' => __( 'Osmosis', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\t'classic' => __( 'Classic', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => 'default',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'blog_social',\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'title' => __( 'Social Share', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Enable / Disable post social shares for the single posts.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_blog_social_options,\n\t\t\t\t\t\t'default' => 0,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'post_author_visibility',\n\t\t\t\t\t\t'type' => 'switch',\n\t\t\t\t\t\t'title' => __( 'Author Info Visibility', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Enable / Disable the Author Info field.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => '1',\n\t\t\t\t\t\t'on' => __( 'On', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'off' => __( 'Off', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id'=>'post_related_visibility',\n\t\t\t\t\t\t'type' => 'switch',\n\t\t\t\t\t\t'title' => __( 'Related Posts Visibility', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Enable / Disable the visibility of the related posts.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => '1',\n\t\t\t\t\t\t'on' => __( 'On', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'off' => __( 'Off', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'info_style_post_title',\n\t\t\t\t\t\t'type' => 'info',\n\t\t\t\t\t\t'class' => 'grve-redux-sub-info',\n\t\t\t\t\t\t'title' => __( 'Single Post Title Settings', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Set the style for the default single post title.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'post_title_height',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'default' => '350',\n\t\t\t\t\t\t'title' => __( 'Post Title Height', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Enter the Post title height in px (Default is 350px).', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'validate' => 'numeric',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'icon' => 'el-icon-pencil',\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'title' => __( 'Page Options', GRVE_THEME_TRANSLATE),\n\t\t\t\t'subtitle' => __( 'You can find the basic settings for the pages here.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'submenu' => true,\n\t\t\t\t'customizer' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'page_layout',\n\t\t\t\t\t\t'type' => 'image_select',\n\t\t\t\t\t\t'compiler' => true,\n\t\t\t\t\t\t'title' => __( 'Page Layout', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select the layout for the pages. Choose among Full Width, Left Sidebar or Right Sidebar.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_layout_selection,\n\t\t\t\t\t\t'default' => 'none',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'page_sidebar',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __( 'Page Sidebar', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select the default sidebar for the pages in case you do not use full width layout.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'data' => 'sidebar',\n\t\t\t\t\t\t'default' => 'grve-default-sidebar',\n\t\t\t\t\t\t'validate' => 'not_empty',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id'=>'page_comments_visibility',\n\t\t\t\t\t\t'type' => 'switch',\n\t\t\t\t\t\t'title' => __( 'Comments Visibility', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Easily disable the comments for all pages.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => '0',\n\t\t\t\t\t\t'on' => __( 'On', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'off' => __( 'Off', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'info_style_page_title',\n\t\t\t\t\t\t'type' => 'info',\n\t\t\t\t\t\t'class' => 'grve-redux-sub-info',\n\t\t\t\t\t\t'title' => __( 'Page Title Settings', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Set the style for the default page title.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'page_title_height',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'default' => '350',\n\t\t\t\t\t\t'title' => __( 'Page Title Height', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Enter Page title height in px (Default is 200).', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'validate' => 'numeric',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'page_title_alignment',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __( 'Page Title Alignment', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Select your alignment for the default page title.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'left' => __( 'Left', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\t'right' => __( 'Right', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\t'center' => __( 'Center', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => 'center',\n\t\t\t\t\t\t'validate' => 'not_empty',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'info_style_page_anchor_menu',\n\t\t\t\t\t\t'type' => 'info',\n\t\t\t\t\t\t'class' => 'grve-redux-sub-info',\n\t\t\t\t\t\t'title' => __( 'Anchor Menu Bar Settings', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Define your preferences for the Anchor Menu Bar where you can place a custom sticky menu per page.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'page_anchor_menu_height',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'default' => '70',\n\t\t\t\t\t\t'title' => __( 'Anchor Menu Height', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Enter Anchor Menu height in px (Default is 70).', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'validate' => 'numeric',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'icon' => 'el-icon-briefcase',\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'title' => __( 'Portfolio Options', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'submenu' => true,\n\t\t\t\t'customizer' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id'=>'portfolio_slug',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'default' => 'portfolio',\n\t\t\t\t\t\t'title' => __( 'Slug', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( \"Enter Portfolio Slug (Default is 'portfolio').\", GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'desc' => __( \"Slug must not be used anywhere else (e.g: category, page, post).\", GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'validate' => 'not_empty',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'portfolio_layout',\n\t\t\t\t\t\t'type' => 'image_select',\n\t\t\t\t\t\t'compiler' => true,\n\t\t\t\t\t\t'title' => __( 'Portfolio Layout', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select the default layout for the Portfolio (single portfolio items). Choose among Full Width, Left Sidebar or Right Sidebar.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_layout_selection,\n\t\t\t\t\t\t'default' => 'none',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'portfolio_sidebar',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __( 'Portfolio Sidebar', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select the default sidebar for the single portfolio items.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'data' => 'sidebar',\n\t\t\t\t\t\t'default' => 'grve-default-sidebar',\n\t\t\t\t\t\t'validate' => 'not_empty',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'portfolio_social',\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'title' => __( 'Social Share', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Enable / Disable the social shares you like in the single portfolio items.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_portfolio_social_options,\n\t\t\t\t\t\t'default' => 0,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id'=>'portfolio_recents_visibility',\n\t\t\t\t\t\t'type' => 'switch',\n\t\t\t\t\t\t'title' => __( 'Recent Items Visibility', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Easily disable the recent items carousel.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => '1',\n\t\t\t\t\t\t'on' => __( 'On', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'off' => __( 'Off', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id'=>'portfolio_comments_visibility',\n\t\t\t\t\t\t'type' => 'switch',\n\t\t\t\t\t\t'title' => __( 'Comments Visibility', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Easily disable the comments of your portfolio.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => '1',\n\t\t\t\t\t\t'on' => __( 'On', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'off' => __( 'Off', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'info_style_portfolio_title',\n\t\t\t\t\t\t'type' => 'info',\n\t\t\t\t\t\t'class' => 'grve-redux-sub-info',\n\t\t\t\t\t\t'title' => __( 'Portfolio Title Settings', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Set the style for the single default portfolio title.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'portfolio_title_height',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'default' => '350',\n\t\t\t\t\t\t'title' => __( 'Portfolio Title Height', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Enter Portfolio title height in px (Default is 200px).', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'validate' => 'numeric',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'portfolio_title_alignment',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __( 'Portfolio Title Alignment', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Select the alignment for the title.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'left' => __( 'Left', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\t'right' => __( 'Right', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\t'center' => __( 'Center', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => 'center',\n\t\t\t\t\t\t'validate' => 'not_empty',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'title' => __( 'Typography Options', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'header' => '',\n\t\t\t\t'desc' => '',\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'icon' => 'el-icon-font',\n\t\t\t\t'submenu' => true,\n\t\t\t\t'customizer' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'info_body_typography',\n\t\t\t\t\t\t'type' => 'info',\n\t\t\t\t\t\t'class' => 'grve-redux-sub-info',\n\t\t\t\t\t\t'title' => __( 'Main Body Fonts', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'body_font',\n\t\t\t\t\t\t'type' => 'typography',\n\t\t\t\t\t\t'title' => __( 'Body Font', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Specify the body font properties.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'google' => true,\n\t\t\t\t\t\t'line-height'=> false,\n\t\t\t\t\t\t'text-align'=> false,\n\t\t\t\t\t\t'color'=> false,\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'font-size' => '14px',\n\t\t\t\t\t\t\t'font-family' => 'Open Sans',\n\t\t\t\t\t\t\t'font-weight' => '400',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'info_menu_typography',\n\t\t\t\t\t\t'type' => 'info',\n\t\t\t\t\t\t'class' => 'grve-redux-sub-info',\n\t\t\t\t\t\t'title' => __( 'Main Menu Fonts', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'main_menu_font',\n\t\t\t\t\t\t'type' => 'typography',\n\t\t\t\t\t\t'title' => __( 'Menu Font', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Specify the menu font properties.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'google' => true,\n\t\t\t\t\t\t'line-height' => false,\n\t\t\t\t\t\t'text-align' => false,\n\t\t\t\t\t\t'color'=> false,\n\t\t\t\t\t\t'text-transform' => true,\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'font-family' => 'Open Sans',\n\t\t\t\t\t\t\t'font-size' => '11px',\n\t\t\t\t\t\t\t'font-weight' => '700',\n\t\t\t\t\t\t\t'text-transform' => 'uppercase',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'sub_menu_font',\n\t\t\t\t\t\t'type' => 'typography',\n\t\t\t\t\t\t'title' => __( 'Submenu Font', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Specify the submenu font properties.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'google' => true,\n\t\t\t\t\t\t'line-height' => false,\n\t\t\t\t\t\t'text-align' => false,\n\t\t\t\t\t\t'color'=> false,\n\t\t\t\t\t\t'text-transform' => true,\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'font-family' => 'Open Sans',\n\t\t\t\t\t\t\t'font-size' => '11px',\n\t\t\t\t\t\t\t'font-weight' => '600',\n\t\t\t\t\t\t\t'text-transform' => 'uppercase',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'info_headers_typography',\n\t\t\t\t\t\t'type' => 'info',\n\t\t\t\t\t\t'class' => 'grve-redux-sub-info',\n\t\t\t\t\t\t'title' => __( 'Headers Fonts', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'h1_font',\n\t\t\t\t\t\t'type' => 'typography',\n\t\t\t\t\t\t'title' => __( 'H1 Font', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Specify the H1 font.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'google' => true,\n\t\t\t\t\t\t'line-height' => false,\n\t\t\t\t\t\t'text-align' => false,\n\t\t\t\t\t\t'color'=> false,\n\t\t\t\t\t\t'text-transform' => true,\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'font-family' => 'Open Sans',\n\t\t\t\t\t\t\t'font-size' => '48px',\n\t\t\t\t\t\t\t'font-weight' => '600',\n\t\t\t\t\t\t\t'text-transform' => 'none',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'h2_font',\n\t\t\t\t\t\t'type' => 'typography',\n\t\t\t\t\t\t'title' => __( 'H2 Font', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Specify the H2 font.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'google' => true,\n\t\t\t\t\t\t'line-height' => false,\n\t\t\t\t\t\t'text-align' => false,\n\t\t\t\t\t\t'color'=> false,\n\t\t\t\t\t\t'text-transform' => true,\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'font-family' => 'Open Sans',\n\t\t\t\t\t\t\t'font-size' => '36px',\n\t\t\t\t\t\t\t'font-weight' => '600',\n\t\t\t\t\t\t\t'text-transform' => 'none',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'h3_font',\n\t\t\t\t\t\t'type' => 'typography',\n\t\t\t\t\t\t'title' => __( 'H3 Font', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Specify the H3 font.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'google' => true,\n\t\t\t\t\t\t'line-height' => false,\n\t\t\t\t\t\t'text-align' => false,\n\t\t\t\t\t\t'color'=> false,\n\t\t\t\t\t\t'text-transform' => true,\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'font-family' => 'Open Sans',\n\t\t\t\t\t\t\t'font-size' => '30px',\n\t\t\t\t\t\t\t'font-weight' => '600',\n\t\t\t\t\t\t\t'text-transform' => 'none',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'h4_font',\n\t\t\t\t\t\t'type' => 'typography',\n\t\t\t\t\t\t'title' => __( 'H4 Font', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Specify the H4 font.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'google' => true,\n\t\t\t\t\t\t'line-height' => false,\n\t\t\t\t\t\t'text-align' => false,\n\t\t\t\t\t\t'color'=> false,\n\t\t\t\t\t\t'text-transform' => true,\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'font-family' => 'Open Sans',\n\t\t\t\t\t\t\t'font-size' => '24px',\n\t\t\t\t\t\t\t'font-weight' => '600',\n\t\t\t\t\t\t\t'text-transform' => 'none',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'h5_font',\n\t\t\t\t\t\t'type' => 'typography',\n\t\t\t\t\t\t'title' => __( 'H5 Font', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Specify the H5 font.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'google' => true,\n\t\t\t\t\t\t'line-height' => false,\n\t\t\t\t\t\t'text-align' => false,\n\t\t\t\t\t\t'color'=> false,\n\t\t\t\t\t\t'text-transform' => true,\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'font-family' => 'Open Sans',\n\t\t\t\t\t\t\t'font-size' => '20px',\n\t\t\t\t\t\t\t'font-weight' => '600',\n\t\t\t\t\t\t\t'text-transform' => 'none',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'h6_font',\n\t\t\t\t\t\t'type' => 'typography',\n\t\t\t\t\t\t'title' => __( 'H6 Font', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Specify the H6 font.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'google' => true,\n\t\t\t\t\t\t'line-height' => false,\n\t\t\t\t\t\t'text-align' => false,\n\t\t\t\t\t\t'color'=> false,\n\t\t\t\t\t\t'text-transform' => true,\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'font-family' => 'Open Sans',\n\t\t\t\t\t\t\t'font-size' => '14px',\n\t\t\t\t\t\t\t'font-weight' => '600',\n\t\t\t\t\t\t\t'text-transform' => 'none',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'info_page_typography',\n\t\t\t\t\t\t'type' => 'info',\n\t\t\t\t\t\t'class' => 'grve-redux-sub-info',\n\t\t\t\t\t\t'title' => __( 'Page Typography', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'page_title',\n\t\t\t\t\t\t'type' => 'typography',\n\t\t\t\t\t\t'title' => __( 'Page Title', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Specify the font for the default page titles.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'google' => true,\n\t\t\t\t\t\t'line-height' => false,\n\t\t\t\t\t\t'text-align' => false,\n\t\t\t\t\t\t'color'=> false,\n\t\t\t\t\t\t'text-transform' => true,\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'font-family' => 'Open Sans',\n\t\t\t\t\t\t\t'font-size' => '60px',\n\t\t\t\t\t\t\t'font-weight' => '700',\n\t\t\t\t\t\t\t'text-transform' => 'uppercase',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'page_description',\n\t\t\t\t\t\t'type' => 'typography',\n\t\t\t\t\t\t'title' => __( 'Page Description', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Specify font for the page description.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'google' => true,\n\t\t\t\t\t\t'line-height' => false,\n\t\t\t\t\t\t'text-align' => false,\n\t\t\t\t\t\t'color'=> false,\n\t\t\t\t\t\t'text-transform' => true,\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'font-family' => 'Open Sans',\n\t\t\t\t\t\t\t'font-size' => '24px',\n\t\t\t\t\t\t\t'font-weight' => '600',\n\t\t\t\t\t\t\t'text-transform' => '',\n\t\t\t\t\t\t\t'font-style' => 'italic',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'info_post_typography',\n\t\t\t\t\t\t'type' => 'info',\n\t\t\t\t\t\t'class' => 'grve-redux-sub-info',\n\t\t\t\t\t\t'title' => __( 'Single Post Typography', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'post_title',\n\t\t\t\t\t\t'type' => 'typography',\n\t\t\t\t\t\t'title' => __( 'Single Post Title', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Specify the font for the single post titles.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'google' => true,\n\t\t\t\t\t\t'line-height' => false,\n\t\t\t\t\t\t'text-align' => false,\n\t\t\t\t\t\t'color'=> false,\n\t\t\t\t\t\t'text-transform' => true,\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'font-family' => 'Open Sans',\n\t\t\t\t\t\t\t'font-size' => '60px',\n\t\t\t\t\t\t\t'font-weight' => '700',\n\t\t\t\t\t\t\t'text-transform' => 'uppercase',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'info_portfolio_typography',\n\t\t\t\t\t\t'type' => 'info',\n\t\t\t\t\t\t'class' => 'grve-redux-sub-info',\n\t\t\t\t\t\t'title' => __( 'Portfolio Typography', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'portfolio_title',\n\t\t\t\t\t\t'type' => 'typography',\n\t\t\t\t\t\t'title' => __( 'Portfolio Title', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Specify the font for the default single portfolio titles.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'google' => true,\n\t\t\t\t\t\t'line-height' => false,\n\t\t\t\t\t\t'text-align' => false,\n\t\t\t\t\t\t'color'=> false,\n\t\t\t\t\t\t'text-transform' => true,\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'font-family' => 'Open Sans',\n\t\t\t\t\t\t\t'font-size' => '60px',\n\t\t\t\t\t\t\t'font-weight' => '700',\n\t\t\t\t\t\t\t'text-transform' => 'uppercase',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'portfolio_description',\n\t\t\t\t\t\t'type' => 'typography',\n\t\t\t\t\t\t'title' => __( 'Portfolio Description', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Specify the font for the default single portfolio description.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'google' => true,\n\t\t\t\t\t\t'line-height' => false,\n\t\t\t\t\t\t'text-align' => false,\n\t\t\t\t\t\t'color'=> false,\n\t\t\t\t\t\t'text-transform' => true,\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'font-family' => 'Open Sans',\n\t\t\t\t\t\t\t'font-size' => '24px',\n\t\t\t\t\t\t\t'font-weight' => '600',\n\t\t\t\t\t\t\t'text-transform' => '',\n\t\t\t\t\t\t\t'font-style' => 'italic',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'info_feature_typography',\n\t\t\t\t\t\t'type' => 'info',\n\t\t\t\t\t\t'class' => 'grve-redux-sub-info',\n\t\t\t\t\t\t'title' => __( 'Feature Section Typography', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'custom_title',\n\t\t\t\t\t\t'type' => 'typography',\n\t\t\t\t\t\t'title' => __( 'Custom Title', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Specify the font for the custom title in the feature section.<br>(Custom Title, Custom Size Slider Title)', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'google' => true,\n\t\t\t\t\t\t'line-height' => false,\n\t\t\t\t\t\t'text-align' => false,\n\t\t\t\t\t\t'color'=> false,\n\t\t\t\t\t\t'text-transform' => true,\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'font-family' => 'Open Sans',\n\t\t\t\t\t\t\t'font-size' => '60px',\n\t\t\t\t\t\t\t'font-weight' => '700',\n\t\t\t\t\t\t\t'text-transform' => 'uppercase',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'custom_description',\n\t\t\t\t\t\t'type' => 'typography',\n\t\t\t\t\t\t'title' => __( 'Custom Description', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Specify the font for the custom description in the feature section.<br>(Custom Description, Custom Size Slider Description)', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'google' => true,\n\t\t\t\t\t\t'line-height' => false,\n\t\t\t\t\t\t'text-align' => false,\n\t\t\t\t\t\t'color'=> false,\n\t\t\t\t\t\t'text-transform' => true,\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'font-family' => 'Open Sans',\n\t\t\t\t\t\t\t'font-size' => '24px',\n\t\t\t\t\t\t\t'font-weight' => '600',\n\t\t\t\t\t\t\t'text-transform' => '',\n\t\t\t\t\t\t\t'font-style' => 'italic',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'fullscreen_custom_title',\n\t\t\t\t\t\t'type' => 'typography',\n\t\t\t\t\t\t'title' => __( 'Custom Title for Fullscreen Section', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Specify the font for the custom title in the feature section in case you use full screen mode.<br>(Custom Title, Custom Size Slider Title)', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'google' => true,\n\t\t\t\t\t\t'line-height' => false,\n\t\t\t\t\t\t'text-align' => false,\n\t\t\t\t\t\t'color'=> false,\n\t\t\t\t\t\t'text-transform' => true,\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'font-family' => 'Open Sans',\n\t\t\t\t\t\t\t'font-size' => '70px',\n\t\t\t\t\t\t\t'font-weight' => '800',\n\t\t\t\t\t\t\t'text-transform' => 'uppercase',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'fullscreen_custom_description',\n\t\t\t\t\t\t'type' => 'typography',\n\t\t\t\t\t\t'title' => __( 'Custom Description for Fullscreen Section', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Specify the font for the custom description in the feature section in case you use full screen mode.<br>(Custom Description, Custom Size Slider Description)', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'google' => true,\n\t\t\t\t\t\t'line-height' => false,\n\t\t\t\t\t\t'text-align' => false,\n\t\t\t\t\t\t'color'=> false,\n\t\t\t\t\t\t'text-transform' => true,\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'font-family' => 'Open Sans',\n\t\t\t\t\t\t\t'font-size' => '28px',\n\t\t\t\t\t\t\t'font-weight' => '600',\n\t\t\t\t\t\t\t'text-transform' => '',\n\t\t\t\t\t\t\t'font-style' => 'italic',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'info_special_typography',\n\t\t\t\t\t\t'type' => 'info',\n\t\t\t\t\t\t'class' => 'grve-redux-sub-info',\n\t\t\t\t\t\t'title' => __( 'Special Text Typography', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'leader_text',\n\t\t\t\t\t\t'type' => 'typography',\n\t\t\t\t\t\t'title' => __( 'Leader Text', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Specify the style for the leader text.<br> This is used in various elements (Text block, Testimonial...)', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'google' => true,\n\t\t\t\t\t\t'line-height' => false,\n\t\t\t\t\t\t'text-align' => false,\n\t\t\t\t\t\t'color'=> false,\n\t\t\t\t\t\t'text-transform' => true,\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'font-family' => 'Open Sans',\n\t\t\t\t\t\t\t'font-size' => '28px',\n\t\t\t\t\t\t\t'font-weight' => '300',\n\t\t\t\t\t\t\t'text-transform' => '',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'subtitle_text',\n\t\t\t\t\t\t'type' => 'typography',\n\t\t\t\t\t\t'title' => __( 'Subtitle Text', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Specify the style for the subtitle text.<br> This is used in various elements (Slogan Subtitle...)', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'google' => true,\n\t\t\t\t\t\t'line-height' => false,\n\t\t\t\t\t\t'text-align' => false,\n\t\t\t\t\t\t'color'=> false,\n\t\t\t\t\t\t'text-transform' => true,\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'font-family' => 'Open Sans',\n\t\t\t\t\t\t\t'font-size' => '18px',\n\t\t\t\t\t\t\t'font-weight' => '400',\n\t\t\t\t\t\t\t'text-transform' => '',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'small_text',\n\t\t\t\t\t\t'type' => 'typography',\n\t\t\t\t\t\t'title' => __( 'Small Text', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Specify the style for the small text.<br>This is used in various elements (Tags, Post Meta...)', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'google' => true,\n\t\t\t\t\t\t'line-height' => false,\n\t\t\t\t\t\t'text-align' => false,\n\t\t\t\t\t\t'color'=> false,\n\t\t\t\t\t\t'text-transform' => true,\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'font-family' => 'Open Sans',\n\t\t\t\t\t\t\t'font-size' => '10px',\n\t\t\t\t\t\t\t'font-weight' => '700',\n\t\t\t\t\t\t\t'text-transform' => 'uppercase',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'link_text',\n\t\t\t\t\t\t'type' => 'typography',\n\t\t\t\t\t\t'title' => __( 'Link Text', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Specify the style for the link text.<br>This is used in various elements (Buttons, Read More...)', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'google' => true,\n\t\t\t\t\t\t'line-height' => false,\n\t\t\t\t\t\t'text-align' => false,\n\t\t\t\t\t\t'color'=> false,\n\t\t\t\t\t\t'text-transform' => true,\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'font-family' => 'Open Sans',\n\t\t\t\t\t\t\t'font-size' => '11px',\n\t\t\t\t\t\t\t'font-weight' => '700',\n\t\t\t\t\t\t\t'text-transform' => 'uppercase',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'icon' => 'el-icon-file-edit',\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'title' => __( 'CSS / JS Options', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'submenu' => true,\n\t\t\t\t'customizer' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'info_style_css_code',\n\t\t\t\t\t\t'type' => 'info',\n\t\t\t\t\t\t'class' => 'grve-redux-sub-info',\n\t\t\t\t\t\t'title' => __( 'CSS', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'css_code',\n\t\t\t\t\t\t'type' => 'ace_editor',\n\t\t\t\t\t\t'title' => __( 'CSS Code', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Paste your CSS code here.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'mode' => 'css',\n\t\t\t\t\t\t'theme' => 'monokai',\n\t\t\t\t\t\t'desc' => '',\n\t\t\t\t\t\t'default' => ''\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'info_style_js_code',\n\t\t\t\t\t\t'type' => 'info',\n\t\t\t\t\t\t'class' => 'grve-redux-sub-info',\n\t\t\t\t\t\t'title' => __( 'JS', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'custom_js',\n\t\t\t\t\t\t'type' => 'ace_editor',\n\t\t\t\t\t\t'mode' => 'javascript',\n\t\t\t\t\t\t'theme' => 'chrome',\n\t\t\t\t\t\t'title' => __( 'JS Code', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Add your custom JavaScript code here. Please do not include any script tags.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'desc' => '',\n\t\t\t\t\t\t'default' => ''\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'icon' => 'el-icon-brush',\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'title' => __( 'Style Options', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'desc' => sprintf( __('To customize the color scheme, please use the <a href=\"%s\">Live Color Customizer</a>.', GRVE_THEME_TRANSLATE), admin_url('/customize.php') ),\n\t\t\t\t'customizer' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'info_style_color_preset',\n\t\t\t\t\t\t'type' => 'info',\n\t\t\t\t\t\t'class' => 'grve-redux-sub-info',\n\t\t\t\t\t\t'title' => __( 'Skin Presets', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'skin_preset',\n\t\t\t\t\t\t'type' => 'image_select',\n\t\t\t\t\t\t'presets' => true,\n\t\t\t\t\t\t'title' => __( 'Select your Skin', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => 0,\n\t\t\t\t\t\t'subtitle' => __( 'The presets are created based on the content of the demos. However, you can use them as you wish in order to customize your color scheme.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'palette-1' => array('alt' => 'Main Demo', 'title' => __( 'Main Demo', GRVE_THEME_TRANSLATE ), 'img' => get_template_directory_uri() . '/includes/images/skins/palette-1.png', 'presets' => $grve_skin_palette_1 ),\n\t\t\t\t\t\t\t'palette-2' => array('alt' => 'Corporate Demo', 'title' => __( 'Corporate Demo', GRVE_THEME_TRANSLATE ), 'img' => get_template_directory_uri() . '/includes/images/skins/palette-2.png', 'presets' => $grve_skin_palette_2 ),\n\t\t\t\t\t\t\t'palette-3' => array('alt' => 'Blog Demo', 'title' => __( 'Blog Demo', GRVE_THEME_TRANSLATE ), 'img' => get_template_directory_uri() . '/includes/images/skins/palette-3.png', 'presets' => $grve_skin_palette_3 ),\n\t\t\t\t\t\t\t'palette-4' => array('alt' => 'Interior Demo', 'title' => __( 'Interior Demo', GRVE_THEME_TRANSLATE ), 'img' => get_template_directory_uri() . '/includes/images/skins/palette-4.png', 'presets' => $grve_skin_palette_4 ),\n\t\t\t\t\t\t\t'palette-5' => array('alt' => 'Photography Demo', 'title' => __( 'Photography Demo', GRVE_THEME_TRANSLATE ), 'img' => get_template_directory_uri() . '/includes/images/skins/palette-5.png', 'presets' => $grve_skin_palette_5 ),\n\t\t\t\t\t\t\t'palette-6' => array('alt' => 'One Page Demo', 'title' => __( 'One Page Demo', GRVE_THEME_TRANSLATE ), 'img' => get_template_directory_uri() . '/includes/images/skins/palette-6.png', 'presets' => $grve_skin_palette_6 ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'icon' => 'el-icon-brush',\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'title' => __( 'Colors - Top Bar', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'desc' => __( 'Set your color preferences for the TopBar (you will see the changes in the live preview only if TopBar is enabled).', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'submenu' => false,\n\t\t\t\t'panel' => false,\n\t\t\t\t'subsection' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\t//Top Bar Color Settings\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'top_bar_bg_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Top Bar Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Background color for your Top Bar.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#303030',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t\t'mode' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'top_bar_font_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Top Bar Font Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Font color for your Top Bar.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#c9c9c9',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t\t'mode' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'top_bar_link_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Top Bar Link Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Link color for your Top Bar.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#c9c9c9',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t\t'mode' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'top_bar_hover_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Top Bar Hover Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Hover color for your Top Bar.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t\t'mode' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'top_bar_border_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Border Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Border color for your Top Bar.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#4f4f4f',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t\t'mode' => 'color',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'icon' => 'el-icon-brush',\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'title' => __( 'Logo Background & Menu Type', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'desc' => __( 'Here, you can select, if you like, to use background for your logo and the type of the main menu.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'submenu' => false,\n\t\t\t\t'panel' => false,\n\t\t\t\t'subsection' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'logo_background',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __( 'Logo Background', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select the background type of the logo.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_background_type,\n\t\t\t\t\t\t'default' => 'transparent',\n\t\t\t\t\t\t'validate' => 'not_empty',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'menu_type',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __( 'Menu Type', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Select the type of the default Menu.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'simply' => __( 'Simple', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\t'button' => __( 'Button', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\t'box' => __( 'Box', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\t'hidden' => __( 'Hidden', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => 'simply',\n\t\t\t\t\t\t'validate' => 'not_empty',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'icon' => 'el-icon-brush',\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'title' => __( 'Colors - Default Header', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'desc' => __( 'Set your color preferences for the Default Header. Keep in mind that the basic settings for the Default Header are in Theme Options > Header Options.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'submenu' => false,\n\t\t\t\t'panel' => false,\n\t\t\t\t'subsection' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\t//Default Header Color Settings\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'header_background_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a background color for the header.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ffffff',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'header_background_color_opacity',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __('Background Opacity', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select opacity for the background of the header.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_opacity_selection,\n\t\t\t\t\t\t\"default\" => '1',\n\t\t\t\t\t),\n\t\t\t\t\t//Logo Color Settings\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'logo_background_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Logo Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a background color for the logo.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\t//Menu Color Settings\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'menu_text_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Menu Text Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for the menu text.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#3C3A35',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'menu_text_hover_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Menu Text Hover Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for the hover menu text.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'menu_active_bg_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Menu Active Background Color (Button and Box menu types only)', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a background color for the active menu.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'menu_active_text_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Menu Active Text Color (Button and Box menu types only)', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for the active menu text.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ffffff',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'submenu_text_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Sub Menu Text Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for the sub menu text.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#808080',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'submenu_text_hover_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Sub Menu Text Hover Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for the hover sub menu text.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ffffff',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'submenu_bg_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Sub Menu Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a background color for the sub menu.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#222222',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'submenu_active_bg_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Sub Menu Active Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a background color for the active sub menu.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'submenu_border_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Sub Menu Border Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a border color for the sub menu.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#4f4f4f',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\t//Safe Button Color Settings\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'safe_button_icon_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Safe Button Icon Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for the safe button icon.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#3C3A35',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'safe_button_bg_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Safe Button Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a background color for the safe button.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'safe_button_bg_color_opacity',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __('Safe Button Background Opacity', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select opacity for the safe button background.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_opacity_selection,\n\t\t\t\t\t\t\"default\" => '0',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'safe_button_icon_hover_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Safe Button Icon Hover Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for the hover safe button icon.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'safe_button_bg_hover_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Safe Button Background Hover Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a background color for the hover safe button.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#222222',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'safe_button_bg_hover_color_opacity',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __('Safe Button Background Hover Opacity', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select opacity for the hover safe button background.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_opacity_selection,\n\t\t\t\t\t\t\"default\" => '1',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'icon' => 'el-icon-brush',\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'title' => __( 'Colors - Sticky Header', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'desc' => __( 'Set your color preferences for the Sticky Header. You can enable/disable, select the type and logo for the sticky header in Theme Options > Header Options > Sticky Header Options.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'submenu' => false,\n\t\t\t\t'panel' => false,\n\t\t\t\t'subsection' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\t//Sticky Header Color Settings\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'header_sticky_background_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a background color for the header.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ffffff',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'header_sticky_background_color_opacity',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __('Background Opacity', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select opacity for the background of the header.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_opacity_selection,\n\t\t\t\t\t\t\"default\" => '1',\n\t\t\t\t\t),\n\t\t\t\t\t//Logo Color Settings\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'logo_sticky_background_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Logo Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a background color for the logo.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\t//Menu Color Settings\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'sticky_menu_text_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Menu Text Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for the menu text.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#3C3A35',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'sticky_menu_text_hover_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Menu Text Hover Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for the hover menu text.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'sticky_menu_active_bg_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Menu Active Background Color (Button and Box menu types only)', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a background color for the active menu.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'sticky_menu_active_text_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Menu Active Text Color (Button and Box menu types only)', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for the active menu text.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ffffff',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'sticky_submenu_text_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Sub Menu Text Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for the sub menu text.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#808080',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'sticky_submenu_text_hover_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Sub Menu Text Hover Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for the hover sub menu text.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ffffff',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'sticky_submenu_bg_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Sub Menu Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a background color for the sub menu.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#222222',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'sticky_submenu_hover_bg_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Sub Menu Background Hover Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a background color for the hover sub menu.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'sticky_submenu_border_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Sub Menu Border Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a border color for the sub menu.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#4f4f4f',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\t//Safe Button Color Settings\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'sticky_safe_button_icon_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Safe Button Icon Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for the safe button icon.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'sticky_safe_button_bg_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Safe Button Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a background color for the safe button.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#191918',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'sticky_safe_button_bg_color_opacity',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __('Safe Button Background Opacity', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select opacity for the safe button background.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_opacity_selection,\n\t\t\t\t\t\t\"default\" => '0',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'sticky_safe_button_icon_hover_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Safe Button Icon Hover Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for the hover safe button icon.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ffffff',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'sticky_safe_button_bg_hover_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Safe Button Background Hover Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a background color for the hover safe button.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#222222',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'sticky_safe_button_bg_hover_color_opacity',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __('Safe Button Background Hover Opacity', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select opacity for the hover safe button background.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_opacity_selection,\n\t\t\t\t\t\t\"default\" => '1',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'icon' => 'el-icon-brush',\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'title' => __( 'Colors - Light Header', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'desc' => __( 'Notice that, there is no need to style the Light Header if you do not intend to integrate the Feature Section with the Header in pages and single portfolio items (where Osmosis provides the Feature Section). Upload logo for the Light Header in Theme Options > Header Options > Dark Header Options.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'submenu' => false,\n\t\t\t\t'panel' => false,\n\t\t\t\t'subsection' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\t//Light Header Color Settings\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'header_light_background_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a background color for the header.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#3C3A35',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'header_light_background_color_opacity',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __('Background Opacity', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select opacity for the background of the header.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_opacity_selection,\n\t\t\t\t\t\t\"default\" => '0',\n\t\t\t\t\t),\n\t\t\t\t\t//Logo Color Settings\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'logo_light_background_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Logo Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\t//Menu Color Settings\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'light_menu_text_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Menu Text Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for the menu text.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ffffff',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'light_menu_text_hover_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Menu Text Hover Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for the hover menu text.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'light_menu_active_bg_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Menu Active Background Color (Button and Box menu types only)', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a background color for the active menu.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'light_menu_active_text_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Menu Active Text Color (Button and Box menu types only)', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for the active menu text.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ffffff',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'light_submenu_text_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Sub Menu Text Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for the sub menu text.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#808080',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'light_submenu_text_hover_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Sub Menu Text Hover Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for the hover sub menu text.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ffffff',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'light_submenu_bg_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Sub Menu Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a background color for the sub menu.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#222222',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'light_submenu_active_bg_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Sub Menu Active Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a background color for the active sub menu.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'light_submenu_border_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Sub Menu Border Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a border color for the sub menu.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#4f4f4f',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\t//Safe Button Color Settings\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'light_safe_button_icon_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Safe Button Icon Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for the safe button icon.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ffffff',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'light_safe_button_bg_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Safe Button Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a background color for the safe button.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'light_safe_button_bg_color_opacity',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __('Safe Button Background Opacity', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select opacity for the safe button background.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_opacity_selection,\n\t\t\t\t\t\t\"default\" => '0',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'light_safe_button_icon_hover_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Safe Button Icon Hover Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for the hover safe button icon.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'light_safe_button_bg_hover_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Safe Button Background Hover Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a background color for the hover safe button.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#222222',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'light_safe_button_bg_hover_color_opacity',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __('Safe Button Background Hover Opacity', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select opacity for the hover safe button background.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_opacity_selection,\n\t\t\t\t\t\t\"default\" => '0',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\t\t\t$this->sections[] = array(\n\t\t\t\t'icon' => 'el-icon-brush',\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'title' => __( 'Colors - Dark Header', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'desc' => __( 'Notice that, there is no need to style the Dark Header if you do not intend to integrate the Feature Section with the Header in pages and single portfolio items (where Osmosis provides the Feature Section). Upload logo for the Dark Header in Theme Options > Header Options > Dark Header Options.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'submenu' => false,\n\t\t\t\t'panel' => false,\n\t\t\t\t'subsection' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\t//Dark Header Color Settings\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'header_dark_background_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a background color for the header.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ffffff',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'header_dark_background_color_opacity',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __('Background Opacity', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select opacity for the background of the header.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_opacity_selection,\n\t\t\t\t\t\t\"default\" => '0',\n\t\t\t\t\t),\n\t\t\t\t\t//Logo Color Settings\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'logo_dark_background_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Logo Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\t//Menu Color Settings\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'dark_menu_text_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Menu Text Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for the menu text.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#3C3A35',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'dark_menu_text_hover_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Menu Text Hover Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for the hover menu text.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'dark_menu_active_bg_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Menu Active Background Color (Button and Box menu types only)', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a background color for the active menu.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'dark_menu_active_text_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Menu Active Text Color (Button and Box menu types only)', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for the active menu text.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ffffff',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'dark_submenu_text_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Sub Menu Text Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for the sub menu text.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#808080',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'dark_submenu_text_hover_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Sub Menu Text Hover Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for the hover sub menu text.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ffffff',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'dark_submenu_bg_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Sub Menu Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a background color for the sub menu.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#222222',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'dark_submenu_active_bg_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Sub Menu Active Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a background color for the active sub menu.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'dark_submenu_border_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Sub Menu Border Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a border color for the sub menu.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#4f4f4f',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\t//Safe Button Color Settings\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'dark_safe_button_icon_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Safe Button Icon Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for the safe button icon.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#3C3A35',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'dark_safe_button_bg_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Safe Button Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a background color for the safe button.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'dark_safe_button_bg_color_opacity',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __('Safe Button Background Opacity', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select opacity for the safe button background.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_opacity_selection,\n\t\t\t\t\t\t\"default\" => '0',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'dark_safe_button_icon_hover_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Safe Button Icon Hover Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for the hover safe button icon.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'dark_safe_button_bg_hover_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Safe Button Background Hover Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a background color for the hover safe button.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#222222',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'dark_safe_button_bg_hover_color_opacity',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __('Safe Button Background Hover Opacity', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select opacity for the hover safe button background.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_opacity_selection,\n\t\t\t\t\t\t\"default\" => '0',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'title' => __( 'Colors - Main Content', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'header' => '',\n\t\t\t\t'desc' => __( 'Set your color preferences for the main content area of your site.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'icon' => 'el-icon-brush',\n\t\t\t\t'submenu' => false,\n\t\t\t\t'panel' => false,\n\t\t\t\t'subsection' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'theme_body_background_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a background color for the text.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ffffff',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'body_heading_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Headings Text Color (h1-h6)', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for headings text.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#454545',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'body_text_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Text Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for the text.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#6e7177',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'body_text_link_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Link Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for the links.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'body_text_link_hover_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Hover Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for hover text.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#FF4441',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'body_border_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Border Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a border color.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#e4e4e4',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'body_primary_1_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Primary 1 Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for primary 1.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'body_primary_1_hover_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Primary 1 Hover Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for primary 1 hover.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#FF4441',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'body_primary_2_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Primary 2 Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for primary 2.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#8E8174',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'body_primary_2_hover_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Primary 2 Hover Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for primary 2 hover.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#735D47',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'body_primary_3_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Primary 3 Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for primary 3.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#86C8B7',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'body_primary_3_hover_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Primary 3 Hover Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for primary 3 hover.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#58b49c',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'body_primary_4_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Primary 4 Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for primary 4.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#CDB3D8',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'body_primary_4_hover_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Primary 4 Hover Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for primary 4 hover.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#BB8CCF',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'body_primary_5_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Primary 5 Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for primary 5.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#8CB6CF',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'body_primary_5_hover_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Primary 5 Hover Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color for primary 5 hover.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#619CBE',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'title' => __( 'Colors - Sidebars', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'header' => '',\n\t\t\t\t'desc' => __( 'Set the background colors for the sidebars. Notice that you can override these in pages, single posts and single portfolios.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'icon' => 'el-icon-brush',\n\t\t\t\t'submenu' => false,\n\t\t\t\t'panel' => false,\n\t\t\t\t'subsection' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'blog_sidebar_bg_color',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __( 'Blog Sidebar Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select the background color for the sidebar of the assigned blog page.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_bg_color_selection,\n\t\t\t\t\t\t'default' => 'none',\n\t\t\t\t\t\t'validate' => 'not_empty',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'post_sidebar_bg_color',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __( 'Post Sidebar Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select the background color of your sidebar in single posts.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_bg_color_selection,\n\t\t\t\t\t\t'default' => 'none',\n\t\t\t\t\t\t'validate' => 'not_empty',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'page_sidebar_bg_color',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __( 'Page Sidebar Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select the background color for your sidebar in pages.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_bg_color_selection,\n\t\t\t\t\t\t'default' => 'none',\n\t\t\t\t\t\t'validate' => 'not_empty',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'portfolio_sidebar_bg_color',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __( 'Portfolio Sidebar Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Select the background color for the sidebar in portfolio items.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_bg_color_selection,\n\t\t\t\t\t\t'default' => 'none',\n\t\t\t\t\t\t'validate' => 'not_empty',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'title' => __( 'Colors - Bottom Bar Area', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'header' => '',\n\t\t\t\t'desc' => __( 'Set your color preferences for the Bottom Bar Area (the area above the footer). Define this area in Theme Options > Bottom Bar Options.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'icon' => 'el-icon-brush',\n\t\t\t\t'submenu' => false,\n\t\t\t\t'panel' => false,\n\t\t\t\t'subsection' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\t//Bottom Bar Color Settings\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'bottom_bar_bg_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Background color for your Bottom Bar.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#303030',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'bottom_bar_text_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Text Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Text color for your Bottom Bar.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ffffff',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'bottom_bar_link_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Link Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Link color for your Bottom Bar.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ffffff',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'bottom_bar_hover_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Hover Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Hover color for your Bottom Bar.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'bottom_bar_button_bg',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Button Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Button background color for your Bottom Bar.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'bottom_bar_button_hover_bg',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Button Background Hover Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Button background hover color for your Bottom Bar.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#2d2c29',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'title' => __( 'Colors - Footer Area', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'header' => '',\n\t\t\t\t'desc' => __( 'Set your color preferences for the Footer Area. Define the Footer Area in Theme Options > Footer Options.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'icon' => 'el-icon-brush',\n\t\t\t\t'submenu' => false,\n\t\t\t\t'panel' => false,\n\t\t\t\t'subsection' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\t//Footer Area Color Settings\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'footer_widgets_bg_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Background color for your Footer Area.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#252525',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'footer_widgets_headings_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Headings Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Headings color for your Footer Area.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ffffff',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'footer_widgets_font_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Font Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Font color for your Footer Area.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#a0a0a0',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'footer_widgets_link_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Link Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Link color for your Footer Area.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#a0a0a0',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'footer_widgets_hover_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Hover Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Hover color for your Footer Area.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'footer_widgets_border_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Border Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Border color for your Footer Area.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#444444',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'title' => __( 'Colors - Footer Bar Area', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'header' => '',\n\t\t\t\t'desc' => __( 'Set your color preferences for the Footer Bar Area(copyright area). Define the Footer Bar Area in Theme Options > Footer Options.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'icon' => 'el-icon-brush',\n\t\t\t\t'submenu' => false,\n\t\t\t\t'panel' => false,\n\t\t\t\t'subsection' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\t//Footer Bar Color Settings\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'footer_bar_bg_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Background color for your Footer Bar Area.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#222222',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'footer_bar_font_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Font Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Font color for your Footer Bar Area.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#7a7a7a',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'footer_bar_link_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Link Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Link color for your Footer Bar Area.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#7a7a7a',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'footer_bar_hover_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Hover Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Hover color for your Footer Bar Area.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'title' => __( 'Colors - Post Title', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'header' => '',\n\t\t\t\t'desc' => __( 'Set the background color for the single post title area and the color of the post title.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'icon' => 'el-icon-brush',\n\t\t\t\t'submenu' => false,\n\t\t\t\t'panel' => false,\n\t\t\t\t'subsection' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'post_title_background_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Background color for your post title.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'default' => '#303030',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'post_title_color',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __( 'Title Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Color for your post title.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_color_selection,\n\t\t\t\t\t\t'default' => 'light',\n\t\t\t\t\t\t'validate' => 'not_empty',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'title' => __( 'Colors - Post Fields Bar', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'header' => '',\n\t\t\t\t'desc' => __( 'Set the background color for the single post fields bar (post meta, socials and navigation).', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'icon' => 'el-icon-brush',\n\t\t\t\t'submenu' => false,\n\t\t\t\t'panel' => false,\n\t\t\t\t'subsection' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'post_fields_bar_background_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Background color for your Post Fields Bar.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#252525',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'post_fields_bar_text_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Font Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Font color for your Post Fields Bar.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#B2B2B2',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'post_fields_bar_text_hover_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Hover Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Hover color for your Post Fields Bar.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ffffff',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'post_fields_bar_background_hover_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Background Hover Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Background hover color for your Post Fields Bar.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'post_fields_bar_border_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Border Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Border color for your Post Fields Bar.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#303030',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'title' => __( 'Colors - Page Title', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'header' => '',\n\t\t\t\t'desc' => __( 'Set the background color for the predefined page title area and the color of the page title. Notice that you can disable it and create custom page title (via feature section).', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'icon' => 'el-icon-brush',\n\t\t\t\t'submenu' => false,\n\t\t\t\t'panel' => false,\n\t\t\t\t'subsection' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'page_title_background_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Background', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Background color for your page title.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'default' => '#303030',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'page_title_color',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __( 'Title Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Color for your page title.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_color_selection,\n\t\t\t\t\t\t'default' => 'light',\n\t\t\t\t\t\t'validate' => 'not_empty',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'page_description_color',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __( 'Description Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Color for your page description.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_color_selection,\n\t\t\t\t\t\t'default' => 'light',\n\t\t\t\t\t\t'validate' => 'not_empty',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'title' => __( 'Colors - Page Anchor Menu', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'header' => '',\n\t\t\t\t'desc' => __( 'Set your color preferences for the Page Anchor Menu in case you use one in any of your pages.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'icon' => 'el-icon-brush',\n\t\t\t\t'submenu' => false,\n\t\t\t\t'panel' => false,\n\t\t\t\t'subsection' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'page_anchor_menu_background_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Background color for your Page Anchor Menu.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#252525',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'page_anchor_menu_text_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Font Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Font color for your Page Anchor Menu.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#B2B2B2',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'page_anchor_menu_text_hover_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Hover Text Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Hover color for your Page Anchor Menu.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ffffff',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'page_anchor_menu_background_hover_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Hover Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Hover background color for your Page Anchor Menu.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'page_anchor_menu_border_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Border Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Border color for your Page Anchor Menu.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#303030',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'title' => __( 'Colors - Portfolio Title', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'header' => '',\n\t\t\t\t'desc' => __( 'Set the background color for the single portfolio title area and the color of the portfolio title and description. Notice that you can disable it and create custom portfolio title (via feature section).', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'icon' => 'el-icon-brush',\n\t\t\t\t'submenu' => false,\n\t\t\t\t'panel' => false,\n\t\t\t\t'subsection' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'portfolio_title_background_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Background color for your portfolio title.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#303030',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'portfolio_title_color',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __( 'Title Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Color for your portfolio title.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_color_selection,\n\t\t\t\t\t\t'default' => 'light',\n\t\t\t\t\t\t'validate' => 'not_empty',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'portfolio_description_color',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __( 'Description Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Color for your portfolio description.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'options' => $grve_color_selection,\n\t\t\t\t\t\t'default' => 'light',\n\t\t\t\t\t\t'validate' => 'not_empty',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'title' => __( 'Colors - Portfolio Fields Bar', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'header' => '',\n\t\t\t\t'desc' => __( 'Set your color preferences for the Portfolio Fields Bar (socials and navigation).', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'icon' => 'el-icon-brush',\n\t\t\t\t'submenu' => false,\n\t\t\t\t'panel' => false,\n\t\t\t\t'subsection' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'portfolio_fields_bar_background_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Background Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Background color for your Portfolio Fields Bar.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#252525',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'portfolio_fields_bar_text_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Font Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Font color for your Portfolio Fields Bar.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#B2B2B2',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'portfolio_fields_bar_text_hover_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Hover Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Hover color for your Portfolio Fields Bar.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ffffff',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'portfolio_fields_bar_background_hover_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Background Hover Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Background hover color for your Portfolio Fields Bar.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ff6863',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'portfolio_fields_bar_border_color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Border Color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Border color for your Portfolio Fields Bar.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#303030',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'icon' => 'el-icon-cloud',\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'title' => __( 'Social Media', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'submenu' => true,\n\t\t\t\t'customizer' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'social_options',\n\t\t\t\t\t\t'type' => 'sortable',\n\t\t\t\t\t\t'title' => __( 'Social Icons', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Define and reorder your social icons. Clear the input field for any social icon you do not wish to display.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'desc' => '',\n\t\t\t\t\t\t'label' => true,\n\t\t\t\t\t\t'options' => $grve_social_options,\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'icon' => 'el-icon-map-marker',\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'title' => __( 'Map Options', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'submenu' => true,\n\t\t\t\t'customizer' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'gmap_hue_enabled',\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'title' => __( 'Enable Hue', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Select if hue is used.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => 0,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'gmap_hue',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __( 'Hue color', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Pick a color as Hue', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '#ffffff',\n\t\t\t\t\t\t'transparent' => false,\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t\t'required' => array( 'gmap_hue_enabled', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'gmap_saturation',\n\t\t\t\t\t\t'type' => 'slider',\n\t\t\t\t\t\t'title' => __('Saturation', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __('Saturation of map.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'desc' => __('Min: -100, max: 100, default value: 0', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => 0,\n\t\t\t\t\t\t\"min\" => -100,\n\t\t\t\t\t\t\"step\" => 1,\n\t\t\t\t\t\t\"max\" => 100,\n\t\t\t\t\t\t'resolution' => 1,\n\t\t\t\t\t\t'display_value' => 'text'\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'gmap_lightness',\n\t\t\t\t\t\t'type' => 'slider',\n\t\t\t\t\t\t'title' => __('Lightness', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __('Lightness of map.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'desc' => __('Min: -100, max: 100, default value: 0', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => 0,\n\t\t\t\t\t\t\"min\" => -100,\n\t\t\t\t\t\t\"step\" => 1,\n\t\t\t\t\t\t\"max\" => 100,\n\t\t\t\t\t\t'resolution' => 1,\n\t\t\t\t\t\t'display_value' => 'text'\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'gmap_gamma',\n\t\t\t\t\t\t'type' => 'slider',\n\t\t\t\t\t\t'title' => __('Gamma', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __('Gamma of map.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'desc' => __('Min: -100, max: 100, default value: 1.0', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => 1.0,\n\t\t\t\t\t\t\"min\" => 0.01,\n\t\t\t\t\t\t\"step\" => 0.01,\n\t\t\t\t\t\t\"max\" => 10.0,\n\t\t\t\t\t\t'resolution' => 0.01,\n\t\t\t\t\t\t'display_value' => 'text'\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'icon' => 'el-icon-error',\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'title' => __( '404 Page', GRVE_THEME_TRANSLATE),\n\t\t\t\t'subtitle' => __( 'You can find the settings for the 404 page here.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'submenu' => true,\n\t\t\t\t'customizer' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'page_404_content',\n\t\t\t\t\t\t'type' => 'editor',\n\t\t\t\t\t\t'title' => __( 'Page 404 Content', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Type the content of your 404 page, you can use also shortcodes.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => \"<small>404 ERROR</small><h2>Hey there mate!<br/>Your lost treasure is not found here...</h2><p class='grve-subtitle'>Sorry! The page you are looking for wasn't found!</p>\",\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'page_404_search',\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'title' => __( 'Show Search Box', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Select if you want to show a search box.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => 0,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'page_404_home_button',\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'title' => __( 'Show Back to home Button', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Select if you want to show a back to home button.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => 1,\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'icon' => 'el-icon-repeat',\n\t\t\t\t'icon_class' => 'el-icon-large',\n\t\t\t\t'title' => __( 'Theme Update', GRVE_THEME_TRANSLATE ),\n\t\t\t\t'submenu' => true,\n\t\t\t\t'customizer' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id'=>'update_enabled',\n\t\t\t\t\t\t'type' => 'switch',\n\t\t\t\t\t\t'title' => __( 'Enable Theme Update', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle'=> __( 'Toggle Theme update on or off.', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t\"default\" => '0',\n\t\t\t\t\t\t'on' => __( 'On', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'off' => __( 'Off', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'update_user_name',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'title' => __( 'Themeforest username', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Enter your Themeforest username here', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t'required' => array( 'update_enabled', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'update_api_key',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'title' => __( 'Secret API Key', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'subtitle' => __( 'Enter your API Key here', GRVE_THEME_TRANSLATE ),\n\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t'required' => array( 'update_enabled', 'equals', '1' ),\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t//Show Sections available only in customizer\n\t\t\tif ( defined( 'GRVE_REDUX_CUSTOM_PANEL' ) && true === GRVE_REDUX_CUSTOM_PANEL) {\n\t\t\t\tforeach ( $this->sections as $k => $section ) {\n\t\t\t\t\tif ( isset( $section['panel'] ) ) {\n\t\t\t\t\t\tunset($this->sections[$k]['panel']);\n\t\t\t\t\t\t$this->sections[$k]['subsection'] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "646798c260de6e9f41323c808445f82e", "score": "0.4451278", "text": "function setDataCollections($arrKeys,$arrValues){\r\n\t\t$pathSet=\"/\".$this->REPOSITORY.\"/CollectionTree/\".$this->FILEID;\t\r\n\t\t$this->client->setAttr($pathSet,$arrKeys,$arrValues);\t\r\n\t\t\r\n\t\t\r\n\t}", "title": "" }, { "docid": "3d3c0b9db44fcf7d710a7a20c5f5bfc0", "score": "0.4450506", "text": "function setup() {\n parent::setup();\n\n // get all the scales for the outcomes\n $this->scales = array();\n $this->headeronclick = 'set_col(this.cellIndex,0)';\n foreach($this->outcomes as $outcome) {\n if(empty($this->scales[$outcome->scaleid])) {\n $this->scales[$outcome->scaleid] = $this->dbc->get_scale($outcome->scaleid, $outcome->gradepass);\n }\n }\n }", "title": "" }, { "docid": "2b7512a9158f4c8c1d8d8af443ca5bc4", "score": "0.44487548", "text": "function _set_advanced_setting_fields( &$arr_fields ){\n // for example -\n /*\n $arr_fields['k_publish_date']['group'] = '_advanced_settings_';\n */\n }", "title": "" }, { "docid": "9c50e9f0b11bdfab6a63c96f7ad4e90e", "score": "0.44442478", "text": "public function set_vals()\n {\n return $this;\n }", "title": "" }, { "docid": "7879bee32a7f4821f7f64ddf439985a6", "score": "0.44410965", "text": "public function value() {\n\t\t$id_base = $this->id_data['base'];\n\t\t$is_core_type = ( 'option' === $this->type || 'theme_mod' === $this->type );\n\n\t\tif ( ! $is_core_type && ! $this->is_multidimensional_aggregated ) {\n\n\t\t\t// Use post value if previewed and a post value is present.\n\t\t\tif ( $this->is_previewed ) {\n\t\t\t\t$value = $this->post_value( null );\n\t\t\t\tif ( null !== $value ) {\n\t\t\t\t\treturn $value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$value = $this->get_root_value( $this->default );\n\n\t\t\t/**\n\t\t\t * Filters a Customize setting value not handled as a theme_mod or option.\n\t\t\t *\n\t\t\t * The dynamic portion of the hook name, `$id_base`, refers to\n\t\t\t * the base slug of the setting name, initialized from `$this->id_data['base']`.\n\t\t\t *\n\t\t\t * For settings handled as theme_mods or options, see those corresponding\n\t\t\t * functions for available hooks.\n\t\t\t *\n\t\t\t * @since 3.4.0\n\t\t\t * @since 4.6.0 Added the `$this` setting instance as the second parameter.\n\t\t\t *\n\t\t\t * @param mixed $default The setting default value. Default empty.\n\t\t\t * @param WP_Customize_Setting $this The setting instance.\n\t\t\t */\n\t\t\t$value = apply_filters( \"customize_value_{$id_base}\", $value, $this );\n\t\t} elseif ( $this->is_multidimensional_aggregated ) {\n\t\t\t$root_value = self::$aggregated_multidimensionals[ $this->type ][ $id_base ]['root_value'];\n\t\t\t$value = $this->multidimensional_get( $root_value, $this->id_data['keys'], $this->default );\n\n\t\t\t// Ensure that the post value is used if the setting is previewed, since preview filters aren't applying on cached $root_value.\n\t\t\tif ( $this->is_previewed ) {\n\t\t\t\t$value = $this->post_value( $value );\n\t\t\t}\n\t\t} else {\n\t\t\t$value = $this->get_root_value( $this->default );\n\t\t}\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "f1ea8bb8ed62f0d728eb5e0263e0a0ae", "score": "0.44408736", "text": "abstract public function setDimensions(array $dimensions);", "title": "" }, { "docid": "5e00fe96f6bf98d7ca34cfc281b9f13c", "score": "0.44385806", "text": "public function run() {\n\t\n\t\tSettings::truncate();\n\n\t\t$data = array(\n\t\t\t\t\tarray(\n\t\t\t\t\t \t'brand' => 'family-mart',\n\t\t\t\t\t 'brand_name' => 'Family Mart',\n\t\t\t\t\t 'product_identifier' => 'upc',\n\t\t\t\t\t 'product_action' => 'upc-detail-page'\n\t\t\t\t\t ),\n\t\t\t\t\tarray(\n\t\t\t\t\t \t\"brand\" => 'gap',\n\t\t\t\t\t \"brand_name\" => 'Gap',\n\t\t\t\t\t \"product_identifier\" => 'sku',\n\t\t\t\t\t 'product_action' => 'increment-quantity'\n\t\t\t\t\t )\n\t\t\t);\n\n\t\tforeach ($data as $d) {\n Settings::create($d);\n }\n\t\t \n\t\t \n\n\t}", "title": "" }, { "docid": "9477fd3788e5157590f075fc0e1b5bab", "score": "0.44354668", "text": "public function prepareGeneralProperties() {\n parent::prepareGeneralProperties();\n // Set simple subscription product meta data.\n foreach ($this->meta as $meta) {\n if ($this->isNewProduct() || $this->getImportService()->isUpdateCustomField($this->getPropertyMetaKey($meta))) {\n $value = $this->getValue('product_' . $meta);\n if ($meta == 'subscription_length' && strpos($value, '-') !== FALSE) {\n list($period, $value) = explode('-', $value);\n }\n if ($meta == 'subscription_trial_period' && strpos($value, '-') !== FALSE) {\n list($period, $value) = explode('-', $value);\n update_post_meta($this->getPid(), $this->getPropertyMetaKey('subscription_trial_length'), $period);\n }\n update_post_meta($this->getPid(), $this->getPropertyMetaKey($meta), $value);\n }\n }\n }", "title": "" }, { "docid": "2cff4eeb3de542ca8eca57af5b441c03", "score": "0.44288793", "text": "private function aggregateData()\n {\n $result = array();\n foreach (func_get_args() as $array) {\n $result = array_merge($array, $result);\n }\n return $result;\n }", "title": "" }, { "docid": "b01949e483103034f7b5ab350c8f8817", "score": "0.44228354", "text": "public function setValues($areValues = [],$level = 0) {\n $values = [\n 'person' => [\n [\n 'id' => '',\n 'att' => [\n 'gender_id' => [1],\n 'forename' => ['Thomas'],\n 'surname' => ['Klawecki'],\n 'address_id' => [\n [\n 'id' => '',\n 'att' => [\n 'country_id' => [2],\n 'city' => ['Piotrkow Trybunalski'],\n 'postal_code' => ['97300'],\n 'street' => ['Slowackiego 154']\n ]\n ],\n [\n 'id' => '',\n 'att' => [\n 'country_id' => [1,2,3],\n 'city' => ['Bad Homburg'],\n 'postal_code' => ['61352'],\n 'street' => ['In den Brühlwiesen 29']\n ]\n ],\n [\n 'id' => '',\n 'att' => [\n 'country_id' => [1,5],\n 'city' => ['Maslowice'],\n 'postal_code' => ['97515'],\n 'street' => ['Przerab']\n ]\n ]\n ],\n ]\n ]\n ]\n ];\n $values = true;\n try {\n if (empty($areValues) && !empty($this->id)) {\n $db = Env::clientSQL();\n $select = [];\n $from = [];\n $count = count($this->attributes);\n $keys = range(1, $count);\n foreach ($this->attributes as $attribute) {\n $className = get_class($attribute);\n $parts = explode('\\\\', $className);\n $lastIndex = count($parts) - 1;\n $conversion = (new ConversionSqlProperty())\n ->setValue($parts[$lastIndex - 1])\n ->setResult();\n $entityName = $conversion->getResult();\n $attributeName = $attribute->getName();\n $idValueType = $attribute->getIdValueType();\n if ($attribute instanceof AttributeNumericType) {\n if (strpos($idValueType, 'serial') !== false) {\n $select[0] = \"SELECT DISTINCT ON(t0.id) t0.id, t0.$attributeName\";\n $from[0] = \"FROM $entityName.$attributeName AS t0\";\n } else {\n $key = array_shift($keys);\n $foreignKey = $attribute->getForeignKey();\n if ($foreignKey instanceof ForeignKey) {\n $select[$key] = \"array_to_json(ARRAY(SELECT $attributeName FROM $entityName.$attributeName WHERE id=t0.id)) AS $attributeName\";\n $from[$key] = \"\";\n } else {\n $select[$key] = \"t$key.$attributeName\";\n $from[$key] = \"LEFT JOIN $entityName.$attributeName AS t$key USING(id)\";\n }\n }\n } else {\n if (strpos($idValueType, 'serial') !== false) {\n $select[0] = \"SELECT DISTINCT ON(t0.id) t0.id, t0.$attributeName\";\n $from[0] = \"FROM $entityName.$attributeName AS t0\";\n } else {\n $key = array_shift($keys);\n $select[$key] = \"t$key.$attributeName\";\n $from[$key] = \"LEFT JOIN $entityName.$attributeName AS t$key USING(id)\";\n }\n }\n }\n ksort($select);\n ksort($from);\n $sql = implode(', ', $select).' ';\n $sql .= implode(' ', $from).' ';\n $sql .= 'WHERE t0.id=' . $this->id;\n $db->setQuery($sql)->setResult();\n $row = $db->getResult(0);\n foreach ($this->attributes as $attribute) {\n $attributeName = $attribute->getName();\n $value = $row[$attributeName];\n if ($attribute instanceof AttributeNumericType) {\n $foreignKey = $attribute->getForeignKey();\n if ($foreignKey instanceof ForeignKey) {\n if(substr($value,0,1) === '['){\n $values = json_decode($value);\n } else {\n $values = [$value];\n }\n $children = $attribute->getChildren();\n if (empty($children)) {\n $attribute->setValues($values)\n ->setResult();\n } else {\n $emptyChild = $children[0];\n foreach ($values as $key => $childId) {\n if($key === 0){\n $attribute->unsetChildren();\n }\n $nEntity = clone $emptyChild;\n $nEntity->setId($childId)\n ->setValues();\n $attribute->addChild($nEntity);\n }\n }\n } else {\n $conversion = $attribute->getConversionFromSql();\n if ($conversion instanceof Conversion) {\n $conversion->setValue($value)\n ->setResult();\n $value = $conversion->getResult();\n }\n $attribute->addValue($value)\n ->setResult();\n }\n } else {\n $conversion = $attribute->getConversionFromSql();\n if ($conversion instanceof Conversion) {\n $conversion->setValue($value)\n ->setResult();\n $value = $conversion->getResult();\n }\n $attribute->addValue($value)\n ->setResult();\n }\n }\n } else {\n if($level === 0){\n $areValues = $areValues[$this->name][0]['att'];\n }\n foreach ($this->attributes as $attribute) {\n $attributeName = $attribute->getName();\n if ($attribute instanceof AttributeNumericType) {\n $foreignKey = $attribute->getForeignKey();\n if ($foreignKey instanceof ForeignKey) {\n $children = $attribute->getChildren();\n if (empty($children)) {\n $subValues = $areValues[$attributeName];\n $attribute->setValues($subValues)\n ->setResult();\n } else {\n $count = isset($areValues[$attributeName]) ? count($areValues[$attributeName])-1 : 0;\n $emptyChild = clone $children[0];\n $range = range(0, $count);\n foreach ($range as $key) {\n if($key === 0){\n $attribute->unsetChildren();\n }\n $nEntity = clone $emptyChild;\n $subId = $areValues[$attributeName][$key]['id'];\n $subValues = $areValues[$attributeName][$key]['att'];\n $nEntity->setId($subId)\n ->setValues($subValues,++$level);\n $attribute->addChild($nEntity);\n }\n }\n } else {\n $attribute->setValues($areValues[$attributeName])\n ->setResult();\n }\n } else {\n $subValues = $areValues[$attributeName];\n $attribute->setValues($subValues)\n ->setResult();\n }\n }\n }\n } catch (\\Exception $e) {\n $values = false;\n }\n $this->values = $values;\n return $this;\n }", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "ff2a026015f52ab7f908638a8c7b6fc1", "score": "0.0", "text": "public function run()\n {\n $user = $this->createAdministrator();\n\n factory(Category::class, 4)->create();\n\n factory(Post::class, 20)->create([\n 'author' => $user->id,\n 'category_id' => $this->getRandomCategoryID()\n ]);\n\n factory(Subscriber::class, 20)->create();\n }", "title": "" } ]
[ { "docid": "f74cb2c339072d43cd3b96858a89c600", "score": "0.8112695", "text": "public function run()\n {\n $this->seeds();\n }", "title": "" }, { "docid": "33aedeaa083b959fa5f66e27a7da3265", "score": "0.8026505", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t//Genre\n \\DB::table('genres')->insert(\n \t['name' => 'Comedia seed', 'ranking' => 354784395, 'active' => 1]\n );\n\n \\DB::table('actors')->insert([\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5]\n ]);\n }", "title": "" }, { "docid": "8d9ddbc23166c0cafca145e7a525c10a", "score": "0.80032176", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n /* $faker = Faker::create();\n foreach (range(1,100) as $index) {\n DB::table('product')->insert([\n 'productName' => $faker->company,\n 'description' => $faker->text,\n 'productId' => $faker->randomNumber(),\n 'images' => $faker->image(),\n ]);\n }*/\n $faker = Faker::create();\n foreach (range(1,10) as $index) {\n DB::table('recital')->insert([\n 'pagesRecital' => $faker->text,\n 'pageId' => $faker->randomNumber(),\n ]);\n }\n }", "title": "" }, { "docid": "8113ba9f29863f44dc33dbd7c0f98245", "score": "0.796029", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n DB::table('users')->insert([\n // [\n // 'name' => 'Alan',\n // 'email' => '[email protected]',\n // 'password' => '1234'\n // ],\n // [\n // 'name' => 'Alice',\n // 'email' => '[email protected]',\n // 'password' => '1234'\n // ],\n [\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => Hash::make( 'admin' )\n ],\n ]);\n \n // Création de 10 authors en utilisant la factory\n // la fonction factory de Laravel permet d'utiliser le facker définit\n factory(App\\Author::class, 10)->create();\n $this->call(BookTableSeeder::class);\n }", "title": "" }, { "docid": "424a278b0bd7df7af33c6c946314dcb5", "score": "0.7928953", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(UserTableSeeder::class);\n factory(App\\User::class, 100)->create();\n\n factory(App\\Category::class, 10)->create()->each(function ($c) {\n $c->audiobook()->saveMany(factory(App\\AudioBook::class, 10)->create()->each(function ($d) {\n $d->audiobookChapter()->saveMany(factory(App\\AudioBookChapter::class, 10)->create()->each(function ($chapter) use ($d) {\n $chapter->purchase()->saveMany(factory(App\\Purchase::class, 10)->create()->each(function ($purchase) use ($d, $chapter) {\n $purchase->user_id = User::all()->random(1)->id;\n $purchase->audiobookChapter_id = $chapter->id;\n $purchase->audiobook_id = $d->id;\n }));\n\n }));\n $d->review()->save(factory(App\\Review::class)->make());\n $d->wishlist()->save(User::all()->random(1));\n }));\n });\n\n\n factory(App\\Collection::class, 10)->create()->each(function ($c) {\n $c->audiobook()->saveMany(factory(App\\AudioBook::class, 5)->create()->each(function ($d) {\n $d->category_id = Category::all()->random(1)->id;\n }));\n });\n\n Model::reguard();\n }", "title": "" }, { "docid": "2fca9bf0725abd081819588688399860", "score": "0.7926935", "text": "public function run()\n {\n $this->call(VideogameSeeder::class);\n $this->call(CategorySeeder::class);\n User::factory(15)->create();\n DB::table('users')->insert([\n 'name' => 'Santiago',\n 'email' => '[email protected]',\n 'password' => bcrypt('12345678'),\n 'address' => 'C/ Ultra',\n 'rol' => 'admin'\n ]);\n //Ratin::factory(50)->create();\n Purchase::factory(20)->create();\n //UserList::factory(1)->create();\n }", "title": "" }, { "docid": "29a4267326dbe1e561d79877123a4ef8", "score": "0.79262906", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory('App\\User', 10)->create();\n factory('App\\School', 10)->create();\n factory('App\\Department', 20)->create();\n factory('App\\Course', 40)->create();\n factory('App\\CourseContent', 40)->create();\n factory('App\\CourseMaterial', 120)->create();\n factory('App\\Library', 200)->create();\n factory('App\\Download', 200)->create();\n factory('App\\Preview', 200)->create();\n factory('App\\Image', 5)->create();\n factory('App\\Role', 2)->create();\n }", "title": "" }, { "docid": "23ad0adf7c7d172d03ff87f186b2b80d", "score": "0.7900386", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n ['nome' => 'Wiiliam',\n 'usuario' => 'will',\n 'cpf' => '033781783958',\n 'tipo' => 'ADM',\n 'ativo' => 1,\n 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm'//secret\n ] \n ]);\n DB::table('dentes')->insert([\n ['nome' => 'canino', 'numero' => 39],\n ['nome' => 'molar', 'numero' => 2],\n ['nome' => 'presa', 'numero' => 21]\n ]);\n\n DB::table('servicos')->insert([\n ['nome' => 'Restauração', 'ativo' => 1],\n ['nome' => 'Canal', 'ativo' => 1],\n ['nome' => 'Limpeza', 'ativo' => 1]\n ]);\n }", "title": "" }, { "docid": "c5b1891e5f39d3e2551b908d083d5516", "score": "0.78698856", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Poll::create([\n 'user_id' => 1,\n 'poll_name' => 'How much do you like me?',\n 'is_public' => 1,\n 'nr_choice' => 0\n ]);\n \n Votes::create([\n 'user_id' => 1,\n 'vote_to_poll' => 2\n ]);\n\n Choices::create([\n 'choice_id'=> 1,\n 'choice_text'=>'A lot.',\n 'choice_to_poll'=>1,\n 'nr_votes'=>260\n ]);\n\n Choices::create([\n 'choice_id'=> 2,\n 'choice_text'=>'A little.',\n 'choice_to_poll'=>1,\n 'nr_votes'=>178\n ]);\n }", "title": "" }, { "docid": "5b3dd72a68cd7caf5cb41622cf1f17f8", "score": "0.78664595", "text": "public function run()\n {\n // Truncate existing record in book table\n Book::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // Create dummy records in our table books:\n for ($i = 0; $i < 50; $i++) {\n Book::create([\n 'title' => $faker->title,\n 'author' => $faker->name,\n ]);\n }\n }", "title": "" }, { "docid": "0edef3cdac4be0882cf354181e1a63fd", "score": "0.7847239", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('users')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $faker = \\Faker\\Factory::create();\n\n $ranks = Rank::all();\n $roles = Role::all();\n\n // And now, let's create a few users in our database:\n for ($i = 0; $i < 5; $i++) {\n User::create([\n 'username' => \"user_$i\",\n 'pilot_callsign' => $faker->numerify('SCI###'),\n 'rank_id' => $ranks[rand ( 0 , $ranks->count()-1 )]->id,\n 'role_id' => $roles[0]->id\n ]);\n }\n }", "title": "" }, { "docid": "1696cae69b4e0dea414a1cad524c579c", "score": "0.78417265", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class, 10)->create();\n factory(Product::class, 20)->create();\n factory(Category::class, 8)->create();\n factory(Portfolio::class, 8)->create();\n factory(Article::class, 30)->create();\n }", "title": "" }, { "docid": "124d9b3ae818d6f7c553836f83b3f26d", "score": "0.7836289", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n\n // $this->call(UserSeeder::class);\n DB::table('teams')->truncate();\n DB::table('users')->truncate();\n DB::table('campaigns')->truncate();\n DB::table('memberships')->truncate();\n\n Schema::enableForeignKeyConstraints();\n\n // add users \n $usersfile = 'database/csvs/users.csv';\n $users = HelpersCsvHelper::csvToArray($usersfile);\n for ($i = 0; $i < count($users); $i++) {\n User::firstOrCreate($users[$i]);\n }\n\n // add teams\n $teamsfile = 'database/csvs/teams.csv';\n $teams = HelpersCsvHelper::csvToArray($teamsfile);\n for ($i = 0; $i < count($teams); $i++) {\n Teams::firstOrCreate($teams[$i]);\n }\n\n // add campaigns\n $Campaignsfile = 'database/csvs/campaigns.csv';\n $campaigns = HelpersCsvHelper::csvToArray($Campaignsfile);\n for ($i = 0; $i < count($campaigns); $i++) {\n Campaigns::firstOrCreate($campaigns[$i]);\n }\n\n // add memberships\n $Membershipsfile = 'database/csvs/memberships.csv';\n $memberships = HelpersCsvHelper::csvToArray($Membershipsfile);\n for ($i = 0; $i < count($memberships); $i++) {\n Memberships::firstOrCreate($memberships[$i]);\n }\n }", "title": "" }, { "docid": "7e308ea06065b02bb3be211e8748bf5f", "score": "0.7835999", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 1,\n ]);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 2,\n ]);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 3,\n ]);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 4,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 1,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 2,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 3,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 4,\n ]);\n }", "title": "" }, { "docid": "9d2abe13b05f99177e4f0e0cdd336b85", "score": "0.78325504", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(Category::class, 10)->create();\n factory(Blog::class, 10)->create();\n }", "title": "" }, { "docid": "29381516f53bafb0bf8797720ed6de7b", "score": "0.78240335", "text": "public function run()\n {\n\n $datas = [\n ['text' => 'Migracion'],\n ['text' => 'Familia'],\n ];\n\n\n foreach($datas as $data){\n \n $this->createSeeder($data);\n\n }\n }", "title": "" }, { "docid": "51daed999a883c3842fb92fb9bf4889b", "score": "0.78238165", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory('App\\User'::class, 20)->create();\n factory('App\\Post'::class, 1000)->create();\n factory('App\\Comment'::class, 2000)->create();\n }", "title": "" }, { "docid": "778b6afd89da9f29737c3c12e565289e", "score": "0.78130686", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Sid',\n 'email' => '[email protected]',\n 'role' => 'admin',\n 'password' => bcrypt(env('SEED_PWD')),\n ]);\n\n // 10 categorie\n $categories = factory(Category::class, 10)->create();\n\n // 20 tags\n $tags = factory(Tag::class, 20)->create();\n\n // 9 utenti\n factory(User::class, 9)->create();\n $users = User::all();\n // x ogni utente 15 posts\n foreach ($users as $user) {\n $posts = factory(Post::class, 15)->create([\n 'user_id' => $user->id,\n 'category_id' => $categories->random()->id,\n ]);\n\n foreach ($posts as $post) {\n $post->tags()->sync($tags->random(3)->pluck('id')->toArray());\n }\n }\n }", "title": "" }, { "docid": "770b2d73679fa00839175bb0616cbdea", "score": "0.78115416", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class,10)->create();\n factory(Product::class,100)->create();\n factory(Review::class,500)->create();\n }", "title": "" }, { "docid": "85cccae108d4de7f16063966a5657344", "score": "0.7810694", "text": "public function run()\n {\n\n $faker = \\Faker\\Factory::create();\n\n \\DB::table('news_categories')->delete();\n\n for ($i = 0; $i <= 10; $i++) {\n \\App\\Models\\NewsCategory::create([\n 'name' => $faker->text(40)\n ]);\n }\n\n \\DB::table('news')->delete();\n\n for ($i = 0; $i <= 40; $i++) {\n \\App\\Models\\News::create([\n 'title' => $faker->text(100),\n 'author_id' => 1,\n 'publish_date' => \\Carbon\\Carbon::now()->addDays(rand(1, 10)),\n 'content' => $faker->text(),\n 'source' => $faker->text(50),\n 'status' => rand(0, 1)\n ]);\n }\n }", "title": "" }, { "docid": "8ad50814f16b74d56ba096d0d57f2685", "score": "0.7809736", "text": "public function run()\n {\n $this->call(LaratrustSeeder::class);\n // $this->call(UsersTableSeeder::class);\n $discount = factory(\\App\\Discount::class, 1)->create();\n\n $categories = factory(\\App\\Category::class, 8)->create();\n $products = factory(\\App\\Product::class, 10)->create();\n $address=factory(\\App\\Users_address::class, 24)->create();\n $this->call(DiscountTableSeeder::class);\n $this->call(m_imagesTableSeeder::class);\n\n $images = factory(\\App\\m_image::class, 2)->create();\n\n }", "title": "" }, { "docid": "b762d028067463470324860cc9a29e0e", "score": "0.7805969", "text": "public function run(): void\n {\n $this->seedUsers();\n $this->seedCategories();\n $this->seedMedia();\n $this->seedProducts();\n $this->seedOrders();\n }", "title": "" }, { "docid": "4f83d3fdd97b667f526563987d1e2e6b", "score": "0.7802494", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Student::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now let's generate a few students for our app:\n $students = App\\User::where('role', 'Student')->get();\n foreach ($students as $student) {\n \tStudent::create([\n 'address' => $faker->city, \n 'user_id' => $student->id,\n ]);\t\t \n\t\t}\n }", "title": "" }, { "docid": "36b206fe3f9e5582fff99bdd44c268e2", "score": "0.77952313", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Edson Chivambo',\n 'email' => '[email protected]',\n 'password' => bcrypt('002523'),\n 'provincia_id' => '1',\n 'distrito_id' => '101',\n 'grupo' => '2'\n ]);\n\n\n DB::table('users')->insert([\n 'name' => 'Emidio Nhacudima',\n 'email' => '[email protected]',\n 'password' => bcrypt('Psi12345'),\n 'provincia_id' => '1',\n 'distrito_id' => '101',\n 'grupo' => '2'\n ]);\n/*\n // Let's truncate our existing records to start from scratch.\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'title' => $faker->sentence,\n 'body' => $faker->paragraph,\n ]);\n }\n*/\n }", "title": "" }, { "docid": "914dd54501738d8f24f08d44c10d6a1f", "score": "0.77949405", "text": "public function run()\n {\n // default seeder to create fake users by using users factory\n // \\App\\Models\\User::factory(10)->create();\n\n // truncate deletes data or row from db. so when seed is run firsly it will delete the existing fiels\n // Product::truncate();\n // Category::truncate();\n // * first way for database seeding\n // creating a category and then passing it to create a product in seeder\n // $category = Category::create([\n // \"name\" => \"Headphones\",\n // \"description\" => \"This Category contains Headphones\"\n // ]);\n\n // Product::create([\n // \"product_name\" => \"Iphone\",\n // \"product_desc\" => \"An Iphone uses IOS and is developed by Apple\",\n // \"price\" => \"100000\",\n // \"category_id\" => $category->id\n // ]);\n // * using second method for creating/seeding fake data using factory \n // Category::factory(5)->create();\n //* overriding the default category_id of the factory in seeder\n Product::factory(3)->create([\n 'category_id' => 5\n ]);\n }", "title": "" }, { "docid": "73bbd2eb8a462a3994465397aabc387c", "score": "0.7793759", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $users = factory(App\\User::class, 5)->create();\n $product = factory(App\\Product::class, 50)->create();\n $reviews = factory(App\\Review::class, 100)->create()\n ->each(function ($review) {\n $review->reviews()->save(factory(App\\Product::class)->make());\n });\n }", "title": "" }, { "docid": "c3d306bf3f72eced986330e8fcc2293f", "score": "0.77799016", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n $this->call(ProductsTableSeeder::class);\n $this->call(PostsTableSeeder::class);\n $this->call(PagesTableSeeder::class);\n\n $id = DB::table('seos')->insertGetId([\n 'link' => url('/'),\n 'priority' => 0,\n 'status' => 'publish',\n ]);\n foreach (['vi','en'] as $lang) {\n DB::table('seo_languages')->insert([\n 'title' => 'Trang chủ',\n 'slug' => 'trang-chu',\n 'language' => $lang,\n 'seo_id' => $id,\n ]);\n }\n }", "title": "" }, { "docid": "89ccfc64e34980c1c88e0ac32bd95ed7", "score": "0.7779508", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n \tforeach (range(1,10) as $index) {\n\t DB::table('tags')->insert([\n\t 'title' => $faker->title,\n\t 'slug' => $faker->slug,\n\t \n\t ]);\n\t}\n }", "title": "" }, { "docid": "17ed7bd7f1c8118ed9c57701c65a3308", "score": "0.7774864", "text": "public function run()\n {\n require_once 'vendor/fzaninotto/faker/src/autoload.php';\n $faker = \\Faker\\Factory::create();\n\n// \\DB::table('articles')->delete();\n\n foreach (range(1, 50) as $index) {\n dump($faker->name);\n DB::table('articles')->insert([\n 'name' => $faker->name,\n 'description' => $faker->text($maxNbChars = 400),\n 'slug' => $index,\n 'autor_id' => 2\n ]);\n };\n \n }", "title": "" }, { "docid": "bd7aa608e63a171552e3b4da3b24f5ac", "score": "0.77732813", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Product::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Product::create([\n 'product_name' => \"Product-\".$i,\n 'description' => \"Product-\".$i.\" Good Product\",\n 'price' => 1000,\n 'offer' => 10,\n 'category_id' => 1,\n 'p_status' => 'A',\n ]);\n }\n }", "title": "" }, { "docid": "c0702e537f33df7826aad62896f41818", "score": "0.77731556", "text": "public function run()\n {\n\n \tif(env('DB_DRIVER')=='mysql')\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');\t\n\n\t\t\tDB::table('pages')->truncate();\n\n $faker = Faker::create();\n \t$cours = Db::table('cours')->lists('id') ;\n\n \tforeach (range(1,25) as $key => $value ) {\n\n \t\tPage::create([\n \t\t'title'=>$faker->sentence(3),\n \t\t'body'=>$faker->paragraph(4),\n \t\t'cour_id'=>$faker->randomElement($cours) \n\t ]);\n \t}\n\n \tif(env('DB_DRIVER')=='mysql')\n\t\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;') ;\n }", "title": "" }, { "docid": "a00d7625c3ac246fb4c8d0c5f542c844", "score": "0.7772737", "text": "public function run()\n {\n \n /*inserting dummy data, if we want to insert a 1000 of data,every seeder foreach table, it insert 1 data*/\n // DB::table('users')->insert([\n // 'name'=>str_Random(10), \n // 'email'=>str_random(10).'@gmail.com',\n // 'password'=>bcrypt('secret')\n // ]);\n //ro run : php artisan db:seed\n\n\n /**ANOTHER WAY */\n\n //User::factory()->count(10)->hasPosts(1)->create(); //if the user has a relation with post\n User::factory()->count(10)->create();\n\n \n \n }", "title": "" }, { "docid": "7610e7d2e2f861ae0a32e114a63a583f", "score": "0.77626514", "text": "public function run()\n {\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>100,\n 'item_case_name' => 'الضريبه',\n 'notes' => 'from seeder '\n ]);\n\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>101,\n 'item_case_name' => 'المشتريات',\n 'notes' => 'from seeder '\n ]);\n\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>102,\n 'item_case_name' => 'المبيعات',\n 'notes' => 'from seeder '\n ]);\n\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>103,\n 'item_case_name' => 'السيوله النقديه',\n 'notes' => 'from seeder '\n ]);\n }", "title": "" }, { "docid": "52b78ebee14aac0ddb50ea401a6a927b", "score": "0.776243", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Models\\admin::class, 50)->create();\n factory(App\\Models\\category::class, 20)->create();\n factory(App\\Models\\clinic::class, 20)->create();\n factory(App\\Models\\nurse::class, 50)->create();\n factory(App\\Models\\Patient::class, 200)->create();\n factory(App\\Models\\comment::class, 500)->create();\n factory(App\\Models\\material::class, 500)->create();\n factory(App\\Models\\prescription::class, 500)->create();\n factory(App\\Models\\receipt::class, 400)->create();\n factory(App\\Models\\reservation::class, 600)->create();\n factory(App\\Models\\worker::class, 200)->create();\n // factory(App\\Models\\image::class, 500)->create();\n }", "title": "" }, { "docid": "b373718e9c234dc4bb756553db264c76", "score": "0.7762365", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call([\n RolesTableSeeder::class,\n UsersTableSeeder::class,\n PagesTableSeeder::class\n ]);\n\n \n \\Illuminate\\Support\\Facades\\DB::table('tbl_introductions')->insert([ \n 'fullname' => 'Ben Wilson',\n 'dob' => '26 September 1999',\n 'email' => '[email protected]',\n 'intro' => 'Hello, I am Ben.',\n 'image' => '1606288979.jpg', \n 'website' => 'www.company.co',\n 'created_at' => '2020-11-24 06:03:28' \n ]);\n }", "title": "" }, { "docid": "6d6a917428726975dd96f2e4e353f871", "score": "0.77620876", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Personas::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Personas::create([\n 'nombre' => $faker->sentence,\n 'nit' => $faker->paragraph,\n ]);\n }\n }", "title": "" }, { "docid": "0b05db86e70b2e211fbf0469301f7d9a", "score": "0.7761681", "text": "public function run()\n {\n //\n DB::table('employees')->delete();\n $faker = Faker\\Factory::create();\n foreach(range(1,50) as $index)\n {\n Employee::create([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'avatar' => '',\n 'address' => $faker->address,\n 'phone'=> rand(0,9999).'-'.rand(0,9999).'-'.rand(0,9999),\n ]);\n }\n }", "title": "" }, { "docid": "df7b256adbff916fcdd12b520b0dc208", "score": "0.7760763", "text": "public function run() {\n\n\t\t// $this->call('ArticlesTableSeeder::class');\n\t\t// $this->call('CategoriesTableSeeder::class');\n\t\t// factory(App\\Article::class, 50)->create()->each(function ($u) {\n\t\t// \t$u->posts()->save(factory(App\\Article::class)->make());\n\t\t// });\n\n\t}", "title": "" }, { "docid": "e7527a5bc8529a2c2aad4c53046ea43d", "score": "0.7758918", "text": "public function run()\n {\n //\\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Section::factory(10)->create();\n // \\App\\Models\\Classe::factory(20)->create();\n // \\App\\Models\\Eleve::factory(120)->create();\n // \\App\\Models\\Stock::factory(2)->create();\n // \\App\\Models\\Category::factory(5)->create();\n // \\App\\Models\\Product::factory(120)->create();\n\n $this->call([\n AnneScolaireSeeder::class\n ]);\n }", "title": "" }, { "docid": "8efc8b6977291a12f6f3aba05752eca3", "score": "0.7758882", "text": "public function run()\n {\n $this->runSeeder();\n }", "title": "" }, { "docid": "7b81b233cbf3938d421802fdd7f8d35b", "score": "0.77587956", "text": "public function run()\n {\n $categories = [\n [\n 'name' => 'Groenten',\n 'description' => '',\n ],\n [\n 'name' => 'Fruit',\n 'description' => '',\n ],\n [\n 'name' => 'Zuivel',\n 'description' => '',\n ],\n [\n 'name' => 'Vlees',\n 'description' => '',\n ],\n ];\n\n foreach($categories as $category){\n Category::create($category);\n }\n\n //factory(Category::class, DatabaseSeeder::AMOUNT['DEFAULT'])->create();\n }", "title": "" }, { "docid": "3d3644d7189413baa46373e1ac7cdc8f", "score": "0.7754973", "text": "public function run()\n\t{\n\t\tDB::table('posts')->truncate();\n\n $faker = Faker\\Factory::create();\n\n\t\t$posts = [\n [\n 'title' => $faker->sentence(6),\n 'content' => $faker->paragraph(8),\n 'slug' => Str::slug('Hello World'),\n 'user_id' => User::first()->id,\n 'category_id' => Category::whereName('Php')->first()->id,\n 'created_at' => new DateTime,\n 'updated_at' => new DateTime\n ]\n ];\n\n\t\t// Uncomment the below to run the seeder\n\t\tfor ($i=0; $i < 10; $i++) {\n $tag = DB::table('tags')->orderBy('RAND()')->first();\n\n $post_title = $faker->sentence(6);\n\n $post = [\n 'title' => $post_title,\n 'content' => $faker->paragraph(8),\n 'slug' => Str::slug($post_title),\n 'user_id' => $faker->randomElement(User::all()->lists('id')),\n 'category_id' => $faker->randomElement(Category::all()->lists('id')),\n 'created_at' => $faker->dateTime,\n 'updated_at' => new DateTime\n ];\n\n $id = DB::table('posts')->insert($post);\n Post::find($id)->tags()->sync(Tag::all()->lists('id'));\n }\n\n // $this->command->info('Posts table seeded !');\n\t}", "title": "" }, { "docid": "ab9c424e435c82e381ba211c2fe79243", "score": "0.7753077", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n // User::factory()->count(200)\n // ->has(Order::factory()->count(random_int(1, 20)))\n // ->has(Assigned_order::factory()->count(random_int(1,5)))\n // ->has(Blocked_writer::factory()->count(random_int(0, 2)))\n // ->has(Favourite_writer::factory()->count(random_int(0, 5)))\n // ->has(Payed_order::factory()->count(random_int(2, 6)))\n // ->has(Notification::factory()->count(random_int(5, 20)))\n // ->has(Review::factory()->count(random_int(1, 2)))\n // ->has(Assigned_order::factory()->count(random_int(1, 3)))\n // ->create();\n }", "title": "" }, { "docid": "34546962185839c8810e561de7b0508a", "score": "0.77510494", "text": "public function run()\n {\n //$this->call(RestaurantTableSeeder::class);\n factory(App\\User::class,5)->create();\n factory(App\\Model\\Restaurant::class, 10)->create()->each(function ($restaurant) {\n $restaurant->contacts()->save(factory(App\\Model\\Contact::class)->make());\n });\n factory(App\\Model\\Menu::class,30)->create();\n factory(App\\Model\\Item::class,100)->create();\n factory(App\\Model\\Option::class,200)->create();\n factory(App\\Model\\MultiCheckOption::class, 500)->create();\n factory(App\\Model\\Customer::class, 100)->create();\n factory(App\\Model\\Order::class, 300)->create();\n }", "title": "" }, { "docid": "e92b39c751271622081fe6a63248f0d3", "score": "0.7745997", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n Seo::create([\n 'url' => '/',\n 'title' => 'title default',\n 'keywords' => 'keywords default',\n 'description' => 'description default',\n ]);\n\n User::create([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('1234567'),\n ]);\n }", "title": "" }, { "docid": "e5d1626abf07334bad40def153b6ebf5", "score": "0.7744136", "text": "public function run()\n {\n $this->call(UserSeeder::class);\n $this->call(CategorySeeder::class);\n $this->call(MediaSeeder::class);\n //$this->call(GuestSeeder::class);\n $faker = Faker::create();\n \tforeach (range(1,10) as $index) {\n\t DB::table('guests')->insert([\n 'roomnumber' => Category::all()->random()->id,\n 'name' => $faker->firstName,\n 'surname' => $faker->name,\n 'email' => $faker->email,\n 'phonenumber' => $faker->phoneNumber\n\t ]);\n\t }\n\n }", "title": "" }, { "docid": "8da9a1776904f6cc6a5ccc3953a8e40f", "score": "0.7742624", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('products')->insert([\n 'name' => 'Basil',\n 'price' => 0.99,\n 'description' => 'Perhaps the most popular and widely used culinary herb.',\n ]);\n DB::table('products')->insert([\n 'name' => 'Bay Laurel',\n 'price' => 1.99,\n 'description' => 'Bay laurel is an evergreen shrub or tree in warmer growing zones ( 8 and above).',\n ]);\n DB::table('products')->insert([\n 'name' => 'Borage',\n 'price' => 2.99,\n 'description' => 'Borage is a coarse textured plant growing to about 2-3 feet.',\n ]);\n DB::table('products')->insert([\n 'name' => 'Caraway',\n 'price' => 3.99,\n 'description' => 'Caraway is most often grown for its seeds, but the root and leaves are also edible.',\n ]);\n DB::table('products')->insert([\n 'name' => 'Catnip',\n 'price' => 4.99,\n 'description' => 'Catnip is a hardy perennial with an open mound shaped habit growing to about 2-3 feet tall.',\n ]);\n\n }", "title": "" }, { "docid": "cac69861fb7a00c50daa5b54ee724177", "score": "0.7740592", "text": "public function run()\n {\n //\n DB::table('Proveedores')->insert([\n \t[\n \t'nombre'=> 'juan perez',\n \t'marca'=> 'matel',\n \t'correo_electronico'=> '[email protected]',\n \t'direccion'=>'av. peru 321,santiago',\n \t'fono'=> 993842739\n \t]\n ]);\n\n $faker=Faker::create();\n for ($i=0; $i <20 ; $i++) { \n DB::table('Proveedores')->insert([\t\n \t'nombre'=> $faker->name,\n \t'marca'=>$faker->company,\n \t'correo_electronico'=> $faker->email,\n \t'direccion'=>$faker->address,\n \t'fono'=> $faker->isbn10 ,\n ]);\n }\n }", "title": "" }, { "docid": "9a3fc5f60166a9785c73750188e6596d", "score": "0.7737875", "text": "public function run()\n {\n // $this->call(UserTableSeeder::class);\n /*\n DB::table('product')->insert([\n 'title' => 'Ceci est un titre de produit',\n 'description' => 'lorem ipsum',\n 'price' => 12,\n 'brand' => 'nouvelle marque',\n ]);\n */\n factory(App\\Product::class, 2)->create();\n factory(App\\Categorie::class, 2)->create();\n }", "title": "" }, { "docid": "b6066308d0ac655bb5d5825a458ef8b1", "score": "0.77361476", "text": "public function run()\n {\n $this->call(RolesTableSeeder::class);\n $this->call(LangauageTableSeeder::class);\n $this->call(CountryTableSeeder::class);\n\n \n\n Country::create([\n 'name' => 'India'\n ]);\n\n Country::create([\n 'name' => 'USA'\n ]);\n\n Country::create([\n 'name' => 'UK'\n ]);\n\n CompanyCateogry::updateOrCreate([\n 'name' => 'category1'\n ]);\n\n factory(App\\Models\\Customer::class, 50)->create();\n factory(App\\Models\\Supplier::class, 50)->create();\n // $this->call(CompanySeeder::class);\n $this->call(InvoiceSeeder::class);\n $this->call(CashFlowSeeder::class);\n }", "title": "" }, { "docid": "8de228115e4192b5098d2a339ff99bf2", "score": "0.7735688", "text": "public function run()\n {\n //delete the users table when the seeder is called\n DB::table('users')->delete();\n\n Eloquent::unguard();\n\n\t\t//disable foreign key before we run the seeder\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n factory(App\\User::class, 50)->create();\n\n //Also create these accounts - used for easy testing purposes\n DB::table('users')->insert([\n [\n 'name' => 'Test',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'email_verified_at' => now(),\n 'bio' => 'Sed ut perspiciatis unde omnis iste natus',\n ],\n [\n 'name' => 'Test2',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'email_verified_at' => now(),\n 'bio' => 'Sed ut perspiciatis unde omnis iste natus',\n\n ],\n ]);\n }", "title": "" }, { "docid": "e0d9bd8b4c025867e30c1a5579c4da9c", "score": "0.7734883", "text": "public function run()\n {\n\n $this->call([\n EstadosSeeder::class,\n MunicipiosSeeder::class,\n RelacionEstadosMunicipiosSeeder::class,\n StatusSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Categories::factory()->count(20)->create();\n \\App\\Models\\Products::factory()->count(100)->create();\n \\App\\Models\\Galery::factory()->count(1000)->create();\n \\App\\Models\\Providers::factory()->count(20)->create();\n \\App\\Models\\Valorations::factory()->count(1000)->create();\n \\App\\Models\\Sales::factory()->count(999)->create();\n \\App\\Models\\Directions::factory()->count(999)->create();\n \\App\\Models\\LastView::factory()->count(999)->create();\n \\App\\Models\\Offers::factory()->count(20)->create();\n // \\App\\Models\\Favorites::factory()->count(50)->create();\n \\App\\Models\\Notifications::factory()->count(999)->create();\n /**\n * $this->call([\n * CategoriesSeeder::class,\n * ]);\n */\n\n $this->call([\n FavoritesSeeder::class,\n ]);\n\n }", "title": "" }, { "docid": "79751b67da244a7913b06f140364d6c0", "score": "0.7732834", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n PartCategory::truncate();\n Brand::truncate();\n Manufacturer::truncate();\n PartSubcategory::truncate();\n Part::truncate();\n Admin::truncate();\n\n $usersQuantity = 500;\n $categoriesQuantity = 30;\n $subCategoriesQuantity = 200;\n $partQuantity = 1000;\n $brandQuantity = 20;\n $manufacturerQuantity = 50;\n $adminQuantity = 10;\n\n factory(User::class, $usersQuantity)->create();\n factory(PartCategory::class, $categoriesQuantity)->create();\n factory(Brand::class, $brandQuantity)->create();\n factory(Manufacturer::class, $manufacturerQuantity)->create();\n\n factory(PartSubcategory::class, $subCategoriesQuantity)->create();\n factory(Part::class, $partQuantity)->create();\n\n factory(Admin::class, $adminQuantity)->create();\n\n }", "title": "" }, { "docid": "fb7d5bba21289ca1ca2041a5e18bd077", "score": "0.77297103", "text": "public function run()\n {\n// factory(Category::class, 20)->create();\n// factory(Post::class, 50)->create();\n// factory(Tag::class, 10)->create();\n\n $this->call(UserTableSeed::class);\n $this->call(PostTableSeed::class);\n }", "title": "" }, { "docid": "77fb1d45e59d982eac35251a4446cfa5", "score": "0.7728479", "text": "public function run()\n {\n //Cmd: php artisan db:seed --class=\"recommendTableSeeder\"\n \n $faker = Faker\\Factory::create(\"ja_JP\");\n \n for( $i=0; $i<10; $i++ ){\n\n App\\Recommend::create([\n\t\t\t\t\t\"from_user\" => $faker->randomDigit(),\n\t\t\t\t\t\"to_man\" => $faker->randomDigit(),\n\t\t\t\t\t\"to_woman\" => $faker->randomDigit(),\n\t\t\t\t\t\"to_man_message\" => $faker->word(),\n\t\t\t\t\t\"to_woman_message\" => $faker->word(),\n\t\t\t\t\t\"man_qa_1\" => $faker->randomDigit(),\n\t\t\t\t\t\"man_qa_2\" => $faker->randomDigit(),\n\t\t\t\t\t\"man_qa_3\" => $faker->randomDigit(),\n\t\t\t\t\t\"woman_qa_1\" => $faker->randomDigit(),\n\t\t\t\t\t\"woman_qa_2\" => $faker->randomDigit(),\n\t\t\t\t\t\"woman_qa_3\" => $faker->randomDigit(),\n\t\t\t\t\t\"created_at\" => $faker->dateTime(\"now\"),\n\t\t\t\t\t\"updated_at\" => $faker->dateTime(\"now\")\n ]);\n }\n }", "title": "" }, { "docid": "95f6236854296207546d9b1517fa175a", "score": "0.77278304", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\n // Create 10 records of posts\n factory(App\\Post::class, 10)->create()->each(function ($post) {\n // Seed the relation with 5 comments\n $commments = factory(App\\Comment::class, 5)->make();\n $post->comments()->saveMany($commments);\n });\n }", "title": "" }, { "docid": "1667303ce0032ddd973fad5eb00529bd", "score": "0.7726387", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('user_roles')->insert(['name' => 'System Admin', 'description' => 'Description',]);\n DB::table('user_roles')->insert(['name' => 'Owner', 'description' => 'System Owner',]);\n DB::table('user_roles')->insert(['name' => 'Admin', 'description' => 'Admin',]);\n DB::table('user_roles')->insert(['name' => 'Editor', 'description' => 'Editor',]);\n DB::table('user_roles')->insert(['name' => 'Viewer', 'description' => 'Viewer',]);\n }", "title": "" }, { "docid": "f198ce46b8e947563c34aa166ca6fd70", "score": "0.772602", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(\\App\\TourCategory::class, 4)->create()->each(function (\\App\\TourCategory $category) {\n $category->tours()->saveMany(\n factory(\\App\\Tour::class,10)->make()\n );\n });\n }", "title": "" }, { "docid": "377c3a872d4a300cceb5049caf48d66a", "score": "0.7725185", "text": "public function run()\n {\n $this->call([\n UsersTabeleSeeder::class,\n PostsTabeleSeeder::class,\n CategoriesTabeleSeeder::class,\n ]);\n\n //Get array of ids\n $postIds = DB::table('posts')->pluck('id')->all();\n $categoryIds = DB::table('categories')->pluck('id')->all();\n\n //Seed category_post table with max 40 entries\n foreach ((range(1, 70)) as $index) \n {\n DB::table('category_post')->updateOrInsert(\n [\n 'post_id' => $postIds[array_rand($postIds)],\n 'category_id' => $categoryIds[array_rand($categoryIds)]\n ]\n );\n }\n }", "title": "" }, { "docid": "e44b2f3d77d7329f6b2d733b04c6ab80", "score": "0.7718937", "text": "public function run()\n {\n // we can seed specific data directory\n /**\n Let's try \"Faker\" to prepopulate with lots of imaginery data very quickly!\n\n */\n\n $faker = Faker\\Factory::create();\n\n foreach(range(1, 25 ) as $index){\n \tDB::table( 'tweets')->insert(array(\n \t\t'user_id' => rand(1,25),\n \t\t'message' => $faker->catchphrase\n \t));\n }\n }", "title": "" }, { "docid": "064da3a1fd5b172768671dc5b6f1169d", "score": "0.7718056", "text": "public function run()\n {\n\n\n\n Storage::deleteDirectory('eventos');\n\n Storage::makeDirectory('eventos');\n\n $this->call(RoleSeeder::class);\n\n $this->call(UserSeeder::class);\n \n Categoria::factory(4)->create();\n \n $this->call(EventoSeeder::class);\n\n $this->call(AporteSeeder::class);\n\n $this->call(ObjetoSeeder::class);\n\n }", "title": "" }, { "docid": "f6e951e99c926a5aa070324982a80a85", "score": "0.7717371", "text": "public function run()\n {\n Model::unguard();\n\n $seedData = [\n 'Taiwan' => [\n 'Taipei City',\n 'New Taipei City',\n 'Taoyuan City',\n 'Taichung City',\n 'Kaohsiung City',\n 'Tainan City',\n 'Hsinchu City',\n 'Chiayi City',\n 'Keelung City',\n 'Hsinchu County',\n 'Miaoli County',\n 'Changhua County',\n 'Nantou County',\n 'Yunlin County',\n 'Chiayi County',\n 'Pingtung County',\n 'Yilan County',\n 'Hualien County',\n 'Taitung County',\n 'Kinmen County',\n 'Lienchiang County',\n 'Penghu County',\n ]\n ];\n\n foreach ($seedData as $countryName => $cityList) {\n $country = Country::create(['name' => $countryName]);\n\n foreach ($cityList as $cityName) {\n $country->cities()->create(['name' => $cityName]);\n }\n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "4fc1f9ee76a037b3655d6f4e73603494", "score": "0.7714682", "text": "public function run()\n {\n //\n //factory(App\\User::class)->create();\n\n DB::table('users')->insert(\n [\n 'name' => 'Seyi', \n 'email' => '[email protected]',\n 'password' => 'somerandompassword'\n ]\n );\n DB::table('posts')->insert([\n [\n 'title' => 'My First Post', \n 'content' => 'lorem ipsum dolor sit ammet',\n 'user_id' => 1\n ], [\n 'title' => 'My second Post', \n 'content' => 'lorem ipsum dolor sit ammet',\n 'user_id' => 1\n ], [\n 'title' => 'My third Post', \n 'content' => 'lorem ipsum dolor sit ammet',\n 'user_id' => 1\n ]\n ]);\n \n \n }", "title": "" }, { "docid": "80b4dcada74bc12860abdaff1c2aa1bb", "score": "0.7712008", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1, 50) as $index) {\n DB::table('books')->insert([\n 'name' => $faker->firstName(),\n 'yearOfPublishing' => $faker->year(),\n 'content' => $faker->paragraph(1, true),\n 'author_id' => $faker->numberBetween(1, 50),\n ]);\n }\n }", "title": "" }, { "docid": "af51801570c9648f237f5a51624f4182", "score": "0.77119786", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(function($user){\n $user->question()->saveMany(factory(App\\Question::class,rand(1,5))->make())\n ->each(function($question){\n $question->answer()->saveMany(factory(App\\Answer::class,rand(1,5))->make());\n });\n });\n }", "title": "" }, { "docid": "bd6458274ff09172851640f92c233c59", "score": "0.77101403", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n \n User::truncate();\n TipoUsuario::truncate();\n Reserva::truncate();\n PuntuacionEstablecimiento::truncate();\n PuntuacionProducto::truncate();\n Producto::truncate();\n Imagen::truncate();\n Establecimiento::truncate();\n Carta::truncate();\n\n $this->call(TipoUsuarioSeeder::class);\n\n foreach (range(1, 10) as $i){\n $u = factory(User::class)->create();\n $u->usuarios_tipo()->attach(TipoUsuario::all()->random());\n }\n\n\n //factory(Establecimiento::class,4)->create();\n //factory(Reserva::class,20)->create();\n //factory(Carta::class, 4)->create(); //Crear tantas como restaurantes\n //factory(Producto::class,100)->create();\n //factory(PuntuacionEstablecimiento::class,50)->create();\n //factory(PuntuacionProducto::class,50)->create();\n //factory(Imagen::class,200)->create();\n\n Schema::enableForeignKeyConstraints(); \n }", "title": "" }, { "docid": "7d3aed410918c722790ec5e822681b71", "score": "0.7708702", "text": "public function run() {\n \n //seed should only be run once\n $faker = Faker::create();\n\n $cat = [\n 1 => \"Home Appliances\",\n 2 => \"Fashion\",\n 3 => \"Home & Living\",\n 4 => \"TV, Gaming, Audio, WT\",\n 5 => \"Watches, Eyewear, Jewellery\",\n 6 => \"Mobiles & Tablets\",\n 7 => \"Cameras\",\n 8 => \"Computers & Laptop\",\n 9 => \"Travel & Luggage\",\n 10 => \"Health & Beauty\",\n 11 => \"Sports, Automotive\",\n 12 => \"Baby, Toys\",\n ];\n\n for ($i = 1; $i <= 12; $i++) {\n DB::table('categories')->insert([\n 'name' => $cat[$i],\n 'image' => $faker->imageUrl($width = 640, $height = 480),\n \n 'created_at' => $faker->dateTimeThisYear($max = 'now'),\n 'updated_at' => \\Carbon\\Carbon::now(),\n ]);\n }\n }", "title": "" }, { "docid": "75f8fae397ad6cf1e3077c2a32e423ad", "score": "0.77076155", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n User::truncate();\n Category::truncate();\n Product::truncate();\n WarrantyProduct::truncate();\n\n factory(User::class, 200)->create();\n\n factory(Category::class, 10)->create()->each(\n function ($category){\n factory(Product::class, mt_rand(8,15))->create(['category_id' => $category->id])->each(\n function ($product){\n factory(WarrantyProduct::class, mt_rand(2, 3))->create(['product_id' => $product->id]);\n }\n );\n }\n );\n\n }", "title": "" }, { "docid": "8b07e67f8045192de7c1b932e58f1d17", "score": "0.77057153", "text": "public function run()\n {\n /*$faker = Faker\\Factory::create();\n foreach(range(1,10) as $index){\n App\\Post::create([\n 'title'=> $faker->name,\n 'description'=> $faker->name,\n 'content'=> $faker->name\n ]);\n }*/\n\n Post::create([\n 'title'->title,\n 'description'->description,\n 'content'->content\n ]);\n }", "title": "" }, { "docid": "ddf328298d79f78f3d971cd04aba1d68", "score": "0.7705306", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(RoleTableSeeder::class);\n $this->call(PermissionTableSeeder::class);\n\n\n factory(\\App\\Entities\\Category::class, 3)->create()->each(function ($c){\n $c->products()\n ->saveMany(\n factory(\\App\\Entities\\Product::class, 3)->make()\n );\n });\n }", "title": "" }, { "docid": "5f9901567b2bd8ddbdf263c78ddac102", "score": "0.7703055", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n \n // User Table Data\n /*for($i = 0; $i < 1000; $i++) {\n \tApp\\User::create([\n\t 'email' => $faker->email,\n\t 'password' => $faker->password,\n\t 'full_name' => $faker->name,\n\t 'phone_number' => $faker->name,\n\t ]);\n\t }*/\n\n // User Event Data\n\t /*for($i = 0; $i < 50; $i++) {\n \tApp\\Events::create([\n\t 'event_name' => $faker->name,\n\t 'event_date' => $faker->date,\n\t 'event_startTime' => '2019-01-01',\n\t 'event_duration' => '2',\n\t 'event_venue' => $faker->address,\n\t 'event_speaker' => '1',\n\t 'event_sponsor' => '3',\n\t 'event_topic' => $faker->text,\n\t 'event_details' => $faker->text,\n\t 'event_avatar' => $faker->imageUrl,\n\t 'created_at' => $faker->date(),\n\t ]);\n\t }*/\n }", "title": "" }, { "docid": "6fbcd5e15b63b9dabff8dbaff5d2ea82", "score": "0.77023256", "text": "public function run()\n {\n $faker = Factory::create();\n\n Persona::truncate();\n Pago::truncate();\n Detalle::truncate();\n\n // Schema::disableForeignKeyConstraints();\n User::truncate();\n // HaberDescuento::truncate();\n // Schema::enableForeignKeyConstraints();\n\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'dni' => '12345678',\n 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret\n 'remember_token' => Str::random(10),\n ]);\n\n // foreach (range(1, 25) as $i) {\n // $dni = mt_rand(10000000, 99999999);\n // Persona::create([\n // 'nombre' => $faker->firstname,\n // 'apellidoPaterno' => $faker->lastname,\n // 'apellidoMaterno' => $faker->lastname,\n // 'dni' => $dni,\n // 'codmodular' => '10' . $dni,\n // 'user_id' => 1,\n // 'estado' => $faker->randomElement(['activo', 'inactivo']),\n // ]);\n // }\n\n }", "title": "" }, { "docid": "2db117b1d28054b0f08a58115645189d", "score": "0.7701633", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n // ?for seeding categories\n // Category::factory(5)->create();\n //? for seeding posts \n Post::factory(3)->create([\n 'category_id' => 5\n ]);\n }", "title": "" }, { "docid": "4e84e995d3e716ac7ab157ddfcc67a39", "score": "0.7700629", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Tag::class, 10)->create();\n\n // Get all the roles attaching up to 3 random roles to each user\n $tags = App\\Tag::all();\n\n\n factory(App\\User::class, 10)->create()->each(function($user) use ($tags){\n $user->save();\n factory(App\\Question::class, 5)->create(['user_id'=>$user->id])->each(function($question) use ($user, $tags){\n \n $question->tags()->attach(\n $tags->random(rand(1, 10))->pluck('id')->toArray()\n ); \n factory(App\\Comment::class, 5)->create(['user_id'=>$user->id, 'question_id'=>$question->id])->each(function($comment){\n $comment->save(); \n });\n });\n });\n }", "title": "" }, { "docid": "44607c99534f6f67a920e806653b05d8", "score": "0.76990753", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n \\App\\Models\\Rol::factory(10)->create();\n \\App\\Models\\Persona::factory(10)->create();\n \\App\\Models\\Configuracion::factory(10)->create();\n }", "title": "" }, { "docid": "5e28bc59cffaacbd443ac1937265c50b", "score": "0.76987165", "text": "public function run()\n {\n $this->call(PostsTableSeeder::class);\n $this->call(SiswaSeeder::class);\n $this->call(MusicsTableSeeder::class);\n $this->call(FilmSeeder::class);\n // $this->call(UsersTableSeeder::class);\n factory(App\\Tabungan::class, 100)->create();\n factory(App\\Costumer::class, 1000)->create();\n }", "title": "" }, { "docid": "55df2400596f6d82130eb26db7635b8b", "score": "0.7695885", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contact::truncate();\n \n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n Contact::create([\n 'first_name' => $faker->name,\n 'last_name' => $faker->name,\n 'email' => $faker->email,\n 'telephone' => $faker->phoneNumber,\n 'contact_type' => $faker->name,\n ]);\n }\n }", "title": "" }, { "docid": "d250f232a40eb13d0fa688dd5dc63e8c", "score": "0.7693821", "text": "public function run()\n {\n factory(App\\User::class,5)->create();\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'type' => 1,\n 'confirmed' =>1,\n ]);\n\n factory(App\\Category::class,5)->create();\n\n $categories_array = App\\Category::all('id')->pluck('id')->toArray();\n\n $post = factory(App\\Post::class,20)->create()->each(function($post) use ($categories_array){\n $this->attachRandomCategoriesToPost($post->id, $categories_array);\n $this->addCommentsToPost($post->id);\n });\n }", "title": "" }, { "docid": "f440a18e1170b8250c14144757b8cc81", "score": "0.76937693", "text": "public function run()\n\t{\n\t\t//\n\t\tApp\\Book::truncate();\n\t\tApp\\Genre::truncate();\n\t\tApp\\Author::truncate();\n\n\t\tfactory(App\\Book::class, 50)->create()->each(function($books) {\n\t\t$books->authors()->save(factory(App\\Author::class)->make());\n\t\t$books->genres()->save(factory(App\\Genre::class)->make());\n\t\t});\n\t}", "title": "" }, { "docid": "14bcfcdf178e55585d48d15b958ccfc6", "score": "0.7693058", "text": "public function run()\n {\n $data = json_decode(file_get_contents(database_path('seeds/data/voyager.json')), true);\n foreach ($data as $table => $tableData) {\n $this->command->info(\"Seeding ${table}.\");\n \\Illuminate\\Support\\Facades\\DB::table($table)->delete();\n \\Illuminate\\Support\\Facades\\DB::table($table)->insert($tableData);\n }\n\n// $this->seed('DataTypesTableSeeder');\n// $this->seed('DataRowsTableSeeder');\n $this->seed('MenusTableSeeder');\n// $this->seed('MenuItemsTableSeeder');\n $this->seed('RolesTableSeeder');\n $this->seed('PermissionsTableSeeder');\n $this->seed('PermissionRoleTableSeeder');\n $this->seed('SettingsTableSeeder');\n }", "title": "" }, { "docid": "dbd59b913d32cfed4a7fd5cda3083940", "score": "0.7692271", "text": "public function run()\n {\n //\n DB::table('oa')->delete();\n\n DB::table('oa')->insert([\n /*'id' => 1,*/\n /*'id_educativo' => 1,\n 'id_general' => 1,\n 'id_clasificacion' => 1,\n 'id_tecnica' => 1,*/\n ]);\n\n $this->call(Lom_generalSeeder::class);\n $this->call(Lom_clasificacionSeeder::class);\n $this->call(Lom_educativoSeeder::class);\n $this->call(Lom_tecnicaSeeder::class);\n }", "title": "" }, { "docid": "654191b89a3f7b4f8f809dd4ca1e2f6d", "score": "0.76909655", "text": "public function run()\n {\n /**\n * Create default user for admin, lecturer and student\n */\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('admin'),\n 'role' => 'admin'\n ]);\n\n User::create([\n 'name' => 'Sample Lecturer',\n 'email' => '[email protected]',\n 'password' => Hash::make('lecturer'),\n 'role' => 'admin'\n ]);\n\n User::create([\n 'name' => 'Student',\n 'email' => '[email protected]',\n 'password' => Hash::make('student'),\n 'role' => 'student'\n ]);\n\n /**\n * Create random 300 users with faker and role/password equal \"student\"\n */\n factory(App\\User::class, 300)->create();\n\n // run with php artisan migrate --seed\n }", "title": "" }, { "docid": "82fbb499231e85aef13b133c2fd7bebb", "score": "0.76907074", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Tomas Landa',\n 'email' => '[email protected]',\n 'password' => Hash::make('123456789'),\n ]);\n\n\n $this->call(AuthorSeeder::class);\n $this->call(BookSeeder::class);\n\n\n }", "title": "" }, { "docid": "7d5e2b097fa405f728e42815bc2fa95f", "score": "0.76902896", "text": "public function run()\n {\n Category::create(['name' => 'remeras']);\n Category::create(['name' => 'camperas']);\n Category::create(['name' => 'pantalones']);\n Category::create(['name' => 'gorras']);\n Category::create(['name' => 'mochilas']);\n Category::create(['name' => 'Sombreros']);\n Category::create(['name' => 'Muñequeras']);\n Category::create(['name' => 'Medias']);\n\n $discounts = Discount::factory(40)->create();\n\n $products = Product::factory(50)\n ->make()\n ->each(function ($product){\n $categories = Category::all();\n $product->category_id = $categories->random()->id;\n $product->save();\n });\n\n }", "title": "" }, { "docid": "acbc8ce8381dd5242a3f70eb7db2f7b0", "score": "0.76889795", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'name' => 'mohamed magdy',\n 'email' => '[email protected]'\n ]);\n factory(User::class)->create([\n 'name' => 'ahmed magdy',\n 'email' => '[email protected]'\n ]);\n factory(User::class)->create([\n 'name' => 'abdelhameed',\n 'email' => '[email protected]'\n ]);\n }", "title": "" }, { "docid": "1bfaef844c455e578ca42264d7b5fd55", "score": "0.76846653", "text": "public function run()\n {\n factory(User::class, 10)->create();\n factory(Category::class, 6)->create();\n factory(Question::class, 60)->create();\n factory(Reply::class, 160)->create();\n factory(Like::class, 200)->create();\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "b9641bc88f5f5c670d56d18a040a9927", "score": "0.7675924", "text": "public function run()\n {\n //création de seeder grace a faker\n // $faker = Faker::create();\n // for ($user = 0; $user < 10; $user++){\n // \\App\\User::create([\n // 'name' => $faker->name,\n // 'email' => $faker->unique()->safeEmail,\n // 'password' =>bcrypt('secret')\n // ]);\n // }\n \\App\\User::create([\n 'name' =>'Admin',\n 'email' => '[email protected]',\n 'password' =>bcrypt('adminadmin'),\n 'admin' =>1\n ]);\n\n\n //permet de créer des utilisateurs sans les relations\n factory(\\App\\User::class, 20)->create();\n\n //permet de créer 10 articles chacun écrit par un seul utilisateur\n // factory(\\App\\User::class, 10)->create()->each(function ($u) {\n // $u->articles()->save(factory(\\App\\Article::class)->make());\n // });\n\n //Permet de creer 20 articles par utilisateur -> 15x 20\n // $user = factory(\\App\\User::class, 15)->create();\n // $user->each(function ($user) {\n // factory(\\App\\Article::class, 20)->create([\n // 'user_id' => $user->id\n // ]);\n // });\n }", "title": "" }, { "docid": "0a79213fd15a52faa35b5d39bdf72ab9", "score": "0.7673569", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Categoria::class, 2)->create();\n\n //Se crearan 40 post\n factory(App\\Curso::class, 40)->create();\n }", "title": "" }, { "docid": "3114ddd54d20a2718dff9452d5974cde", "score": "0.76679426", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1, 20) as $index) {\n \\DB::table('employees')->insert([\n 'name' => $faker->name,\n 'age' => rand(22, 40),\n 'email' => $faker->email,\n 'gender' => $faker->randomElement(array('male', 'female')),\n 'country' => $faker->country\n ]);\n }\n }", "title": "" }, { "docid": "032e6df09c32ce0c18c6e5a3dcfd03cd", "score": "0.76679265", "text": "public function run()\n {\n\t DB::table('roles')->insert([\n\t\t 'name' => 'admin'\n\t ]);\n\n\t DB::table('users')->insert([\n\t\t 'name' => 'David Trushkov',\n\t\t 'email' => '[email protected]',\n\t\t 'password' => bcrypt('d16331633'),\n\t\t 'remember_token' => str_random(10),\n\t\t 'verified' => 1,\n\t\t 'token' => '',\n\t\t 'avatar' => '',\n\t\t 'created_at' => \\Carbon\\Carbon::now()->format('Y-m-d H:i:s'),\n\t\t 'updated_at' => \\Carbon\\Carbon::now()->format('Y-m-d H:i:s'),\n\t ]);\n\n\t DB::table('user_role')->insert([\n\t\t 'user_id' => 1,\n\t\t 'role_id' => 1\n\t ]);\n\n\t $this->call(UserTableSeeder::class);\n\t $this->call(FilesTableSeeder::class);\n\t $this->call(FileUploadsTableSeeder::class);\n\t $this->call(SalesTableSeeder::class);\n\t $this->call(FileCategoryTableSeeder::class);\n }", "title": "" }, { "docid": "fec3323e6f3a81f6348e08d8097828b8", "score": "0.76672584", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n Listing::truncate();\n\n $userQuantity=5;\n $listingQnt=100;\n\n factory(App\\User::class,$userQuantity)->create();\n factory(App\\Listing::class,$listingQnt)->create();\n }", "title": "" }, { "docid": "fd3e02773eac9af1278393c90e1ec5e3", "score": "0.7666974", "text": "public function run()\n {\n User::truncate();\n\n User::create([\n 'name' => 'admin',\n 'password' => bcrypt('secret'),\n 'role' => 'admin',\n ]);\n\n User::create([\n 'name' => 'operator',\n 'password' => bcrypt('secret'),\n 'role' => 'operator',\n ]);\n\n User::create([\n 'name' => 'employee',\n 'password' => bcrypt('secret'),\n 'role' => 'employee',\n ]);\n\n $faker = Factory::create('id_ID');\n\n for ($i = 0; $i < 12; $i++) {\n User::create([\n 'name' => $faker->name,\n 'password' => bcrypt('secret'),\n 'role' => 'employee',\n ]);\n }\n\n }", "title": "" }, { "docid": "2344b2d3d5ee3f98e7bbbe7784cad8c9", "score": "0.7663209", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n $counry = Country::inRandomOrder()->first()->country;\n $city = City::inRandomOrder()->where('country', $counry)->first()->city;\n\n Agencies::create([\n 'name' => $faker->company,\n 'address' => $faker->address,\n\t\t\t\t'city' => $city,\n\t\t\t\t'countri' => $counry,\n\t\t\t\t'phone' => $faker->phoneNumber,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'web' => \"www.addadadadad.com\",\n ]);\n }\n }", "title": "" }, { "docid": "acc4a55ca590e54c9d9cae8f6b80d13b", "score": "0.7662981", "text": "public function run()\n {\n User::factory(100)->create();\n $this->call([\n UserSeeder::class,\n ]);\n Article::factory()->count(100)->create();\n Rate::factory()->count(1000)->create();\n\n }", "title": "" }, { "docid": "47d7ad0594d6fea4c95ece125a11f12f", "score": "0.76622707", "text": "public function run()\n {\n\n foreach (range(1, 10) as $_) {\n $faker = Factory::create();\n DB::table('menus')->insert([\n 'title' => $faker->firstName(),\n 'price' => $faker->randomNumber(2),\n 'weight' => $faker->randomNumber(2),\n 'meat' => $faker->randomNumber(2),\n 'about' => $faker->realText(rand(10, 20))\n ]);\n }\n\n //\n foreach (range(1, 10) as $_) {\n $faker = Factory::create();\n DB::table('restaurants')->insert([\n 'title' => $faker->company(),\n 'customer' => $faker->randomNumber(2),\n 'employee' => $faker->randomNumber(2),\n // 'menu_id' => $faker->randomNumber(1),\n\n ]);\n }\n }", "title": "" }, { "docid": "317d47304eb6df80c5511ceb3b9b995f", "score": "0.76618236", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(UserTableSeeder::class);\n $faker = Faker\\Factory::create();\n for ($i=0; $i < 10; $i++) { \n BeTagModel::create([\n 'name' => $faker->sentence,\n 'name_alias' => implode('',$faker->sentences(4)),\n 'status' => $faker->randomDigit(),\n 'created_by' => $faker->unixTime(),\n 'updated_by' => $faker->unixTime(),\n 'created_at' => $faker->unixTime(),\n 'updated_at' => $faker->unixTime(),\n ]);\n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "0de657d649c6926b71b8f5e0b4af5374", "score": "0.76618147", "text": "public function run() {\n // Example list, this seed will only create admin role, if you wanna create user account, please use normal register.\n // The pattern for each list value will be array[0] for username, array[1] for password (it will be hashed later, calma) and array[2] for email.\n // Add as many as you like.\n $list = array(\n array('pulselab', 'nopassword', '[email protected]'),\n );\n\n DB::collection('users')->delete();\n DB::collection('users')->insert(array_map(function($o) {\n return array(\n 'username' => $o[0],\n 'password' => app('hash')->make(sha1($o[1])),\n 'email' => $o[2],\n 'facebook_id' => '',\n 'twitter_id' => '',\n 'point' => 0,\n 'role' => 'admin',\n 'word_translated' => 0,\n 'word_categorized'=> 0,\n 'languages'\t\t => '',\n 'isconfirmed'\t => true,\n 'resetcode'\t\t => '',\n 'isVirgin' => 0,\n );\n }, $list));\n }", "title": "" }, { "docid": "591cc779df1a315a5bb877f8e1fe4600", "score": "0.7660859", "text": "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('indicadores')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('indicadores')->insert([\n 'rels' => json_encode([$faker->words(3)]),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->sentence,\n 'ano_inicial' => $faker->numberBetween(2019,2025),\n 'ano_final' => $faker->numberBetween(2025,2030),\n 'status_atual' => $faker->randomNumber(3),\n 'status_final' => $faker->boolean(),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n 'status' => true,\n ]);\n }\n\n\n }", "title": "" }, { "docid": "9bf3fa05d4ae071adbab0386bc123da6", "score": "0.7660738", "text": "public function run()\n {\n $data = [];\n $faker = Factory::create();\n\n for ($i = 0; $i < 100; $i++) {\n $data[] = [\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n 'email' => $faker->email(),\n 'created_at' => date('Y-m-d H:i:s'),\n ];\n }\n\n $users = $this->table(DbConfig::DB_USER_TABLE);\n $users->insert($data)\n ->saveData();\n }", "title": "" }, { "docid": "4928806405a07b1df0cb55aaf31cc6fd", "score": "0.76591706", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Section::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few Section in our database:\n for ($i = 0; $i < 10; $i++) {\n Section::create([\n 'name' => $faker->name,\n ]);\n }\n }", "title": "" }, { "docid": "ac091d03c70afaa39edeb6588c3c3993", "score": "0.7657682", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //semillero cuando se ejecute el comando migrate se crearan en automatico los datos\n factory(User::class)->create(['email'=>'[email protected]']);\n factory(User::class, 50)->create();\n factory(Forum::class, 20)->create();\n factory(Post::class, 50)->create();\n factory(Reply::class, 100)->create();\n }", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "8d1d75373c3bc0c5981fff245eabe911", "score": "0.0", "text": "public function update(Request $request, $id)\n {\n //\n $pengalaman = \\App\\Pengalaman::findOrFail($id);\n $pengalaman-> nm_pekerjaan = $request ->nm_pekerjaan;\n $pengalaman-> d_pekerjaan = $request ->d_pekerjaan;\n $pengalaman-> pegawai_id = $request ->pegawai_id;\n $pengalaman-> save();\n\n return redirect ('/pegawai/'.$pengalaman->pegawai_id.'/pengalaman');\n }", "title": "" } ]
[ { "docid": "1e58026b8952df10026ace5fc59fe274", "score": "0.7425105", "text": "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "title": "" }, { "docid": "08694713de71165eda639b86061c2dd3", "score": "0.70612276", "text": "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "title": "" }, { "docid": "b66d45ed275220a344f3f222ce4980b5", "score": "0.70558053", "text": "public function update(Request $request, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "64141ab468cf691ac341537b76914234", "score": "0.6896673", "text": "public function updateStream($resource);", "title": "" }, { "docid": "896d8cce99ddf179cc210c3eea9dbc85", "score": "0.6582159", "text": "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "title": "" }, { "docid": "3a9725a518af00151301cd75bfacc9b9", "score": "0.64491373", "text": "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "title": "" }, { "docid": "a240b851b94ee0b2528d8320a97277d9", "score": "0.6346954", "text": "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "title": "" }, { "docid": "1833fc434e2b6d8845470c7071f16b05", "score": "0.62114537", "text": "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "title": "" }, { "docid": "e894dc3cd202ec4ba70765b750e0aef8", "score": "0.6145042", "text": "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "title": "" }, { "docid": "0926078283b626a7cbcf1c37921b4293", "score": "0.6119944", "text": "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "title": "" }, { "docid": "d897a40d307670c0a2b7bba76cbe8e66", "score": "0.61128503", "text": "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "title": "" }, { "docid": "7b0c66c5755e566e561fc492c4c6cef4", "score": "0.6099993", "text": "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "title": "" }, { "docid": "78d3c773d3a549209d09486c7233c7b5", "score": "0.6087866", "text": "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "title": "" }, { "docid": "f6f8def0ac709abf6dd95f0dfa35d868", "score": "0.6052593", "text": "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "title": "" }, { "docid": "5334ba4a6880a32048930c6aab0c2e72", "score": "0.6018941", "text": "public function update($path);", "title": "" }, { "docid": "b63b74da9b6109b98718289434f6d2cf", "score": "0.60060275", "text": "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "title": "" }, { "docid": "9f880585b8f772551748224960e1114a", "score": "0.59715486", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "title": "" }, { "docid": "5fcb6827bd712d2ceee63009eacfae99", "score": "0.5946516", "text": "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "title": "" }, { "docid": "8bf08d6952a759b61a0c0f2a1c1e4e68", "score": "0.59400934", "text": "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "title": "" }, { "docid": "eaee54943a52f02e9d836bade5ff0c75", "score": "0.59377414", "text": "public function updateStream($path, $resource, Config $config)\n {\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5890722", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "3ec460d4bbd98e23f7e38b492a7d650e", "score": "0.5860816", "text": "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "title": "" }, { "docid": "5dd04ceb203f7d30ce1633bff3acba55", "score": "0.5855127", "text": "public function update($data) {}", "title": "" }, { "docid": "5dd04ceb203f7d30ce1633bff3acba55", "score": "0.5855127", "text": "public function update($data) {}", "title": "" }, { "docid": "c8cfc09f393219dca339ad89d530539a", "score": "0.58513457", "text": "public function putStream($resource);", "title": "" }, { "docid": "52b1b7a30044d88d43eaebbf3d0a34c5", "score": "0.5815068", "text": "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "title": "" }, { "docid": "0c03c39e441c2fe392d76d6370ae3ce2", "score": "0.5806887", "text": "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.57525045", "text": "public function update($entity);", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.57525045", "text": "public function update($entity);", "title": "" }, { "docid": "7fa7323735ca22c15cfa4866e023dcb7", "score": "0.57337505", "text": "public function setResource($resource);", "title": "" }, { "docid": "68611877d8742448025a8506ebac8d13", "score": "0.5723295", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "title": "" }, { "docid": "cbf8435986892ace3d4dbcfbf62f6804", "score": "0.5714311", "text": "public function isUpdateResource();", "title": "" }, { "docid": "c5002bf927543520ff53e2b1ecdcf2a1", "score": "0.5694472", "text": "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "title": "" }, { "docid": "8cfd45d18cf017442f2ebe0b78d0ddc0", "score": "0.5691319", "text": "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "title": "" }, { "docid": "7e42fedef6bb33a605a9a912390eb1f7", "score": "0.56879413", "text": "public function store($data, Resource $resource);", "title": "" }, { "docid": "8a46c9ac29aec2f0c66f61cd6abd3e2a", "score": "0.5669989", "text": "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "title": "" }, { "docid": "b247170cc6ffc22ce838d918ca6c8698", "score": "0.56565005", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "title": "" }, { "docid": "c59db4eff4b7b3a830f6e52a576536c0", "score": "0.56505877", "text": "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "title": "" }, { "docid": "9d8e7ab90193c578a62deba30a0b7c06", "score": "0.5646085", "text": "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "title": "" }, { "docid": "56c2b493ee3f6a8e2fe0dddef47259ba", "score": "0.5636683", "text": "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "title": "" }, { "docid": "0e9e693dffd49cdb7c6c20a03ff5efd8", "score": "0.5633498", "text": "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "title": "" }, { "docid": "f4e8f9eee2210f80fc3b28674c2ddfe5", "score": "0.5633378", "text": "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "title": "" }, { "docid": "509df81c3a0f4ec1c8e5ccbf89e5931d", "score": "0.5632906", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "title": "" }, { "docid": "bbd99fadb318f4a784afaa2bfa18ce90", "score": "0.5628826", "text": "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "title": "" }, { "docid": "8eb8ff4a40a42fb82a98ac5091c3a8b4", "score": "0.56196684", "text": "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "title": "" }, { "docid": "df5d4e0cf5f9405287ea81aaef9d998b", "score": "0.5609126", "text": "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "title": "" }, { "docid": "f646252110cf32a5b2f73f7d1462f12e", "score": "0.5601397", "text": "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "title": "" }, { "docid": "4c98bff950158ea59ef3f361bcba0f67", "score": "0.55944353", "text": "public function update(Qstore $request, $id)\n {\n //\n }", "title": "" }, { "docid": "87604b965f2923e2345b489944eb16ab", "score": "0.5582592", "text": "public function update(IEntity $entity);", "title": "" }, { "docid": "4a6724648abb94db5f42559e4cb12724", "score": "0.5581908", "text": "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.55813426", "text": "public function update($request, $id);", "title": "" }, { "docid": "b1223c0e87edc0874663308fb5757224", "score": "0.5575312", "text": "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "07a38b06bdddb569c910315d5b73bb88", "score": "0.55717176", "text": "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "title": "" }, { "docid": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.55661047", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "c596fddf408b359acc12fe17624de997", "score": "0.55624634", "text": "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "title": "" }, { "docid": "2f2babfe63e8f2a416fc581447274425", "score": "0.55614686", "text": "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "title": "" }, { "docid": "b3d8abec86ebbd8bf61bddeb5110ba38", "score": "0.55608666", "text": "abstract public function put($data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "90cec2e0050ecd5971be612c49157c4a", "score": "0.55573726", "text": "public function testUpdateSupplierUsingPUT()\n {\n }", "title": "" }, { "docid": "9c243572303715ea37744cfc162e1a3c", "score": "0.5556878", "text": "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "title": "" }, { "docid": "45212faae39cc84fb7d386bd5ccbacd2", "score": "0.5554201", "text": "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "title": "" }, { "docid": "137b494fd7c0c6a148f3726e66f7b425", "score": "0.5553069", "text": "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "title": "" }, { "docid": "012d802cdd39ad4f48a5d0ab5db49368", "score": "0.55530256", "text": "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "title": "" }, { "docid": "6e27acd0248f696913d7581142ab1983", "score": "0.5543788", "text": "public abstract function update($object);", "title": "" }, { "docid": "9bd927a2b7c7b6455cfb1d5512fcad31", "score": "0.55435944", "text": "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "title": "" }, { "docid": "1756a9bc04ac536de80753840f877cda", "score": "0.55412996", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "title": "" }, { "docid": "efa4460a1f0a94dc49a588c86ce1c95e", "score": "0.55393505", "text": "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "title": "" }, { "docid": "dbf9ef4add161249e917da82a07a52d8", "score": "0.55368495", "text": "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "title": "" }, { "docid": "c4d2a2fa9101020663f7a49d7cc6ddac", "score": "0.5535236", "text": "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "title": "" }, { "docid": "6e9e95959e33006f578a3965f633d7d6", "score": "0.5534954", "text": "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "title": "" }, { "docid": "294674761e7a90c0f3c7b7cbb244ad5a", "score": "0.55237365", "text": "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "title": "" }, { "docid": "f30d20b4690f862c2d69a1ff92501896", "score": "0.5520468", "text": "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "title": "" }, { "docid": "7f3bb76e340f6d3efbef92bcbabfbbfa", "score": "0.55163723", "text": "public function update($entity)\n {\n \n }", "title": "" }, { "docid": "2f7ad5c7cf9222645876124364520b78", "score": "0.55125296", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "title": "" }, { "docid": "f83dd36256d02e1f966e7e748f03289a", "score": "0.5511168", "text": "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "title": "" }, { "docid": "0dc3227cc620ff2bfcf02b42a09128f6", "score": "0.5508345", "text": "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "title": "" }, { "docid": "265c7e4e1d9ccb8f2d919846c5c6d0e1", "score": "0.55072427", "text": "public function update($id, $input);", "title": "" }, { "docid": "7cc9fd709d5dbe533ccc58575aee12e8", "score": "0.5502385", "text": "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "title": "" }, { "docid": "561edf3b1e08c4105ca00f8114894949", "score": "0.5502337", "text": "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "title": "" }, { "docid": "95f824afd6b94282d27a0d4cc2cee7bf", "score": "0.5501029", "text": "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "title": "" }, { "docid": "98955a07074c5f9d7b65cb4edac55bd6", "score": "0.54995877", "text": "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "title": "" }, { "docid": "b6c9eceaee979e0c01a261caf5a48b14", "score": "0.54979175", "text": "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "9ecc82591ba06b6a36749ed98ac6605d", "score": "0.54946727", "text": "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "title": "" }, { "docid": "48fef9aa4b1db49fbd41de594ae52cd6", "score": "0.5494196", "text": "public function put($path, $data = null);", "title": "" }, { "docid": "a3080528f24f5a6310506fe05f776170", "score": "0.54941916", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "title": "" }, { "docid": "04652c1da37c7a438475c8d281a1b9fb", "score": "0.54925025", "text": "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "title": "" }, { "docid": "d93eb8ea18e437ad56170f6f49f20674", "score": "0.5491807", "text": "public function update(Entity $entity);", "title": "" }, { "docid": "2a7096bf2a727a86ecc99d0ede5d263f", "score": "0.5483321", "text": "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "title": "" }, { "docid": "61329b7ef8ead3531f1a05acebdc3cd5", "score": "0.5479606", "text": "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "title": "" }, { "docid": "b03a96e7dd0db2b1c6ad43b7c2cb89da", "score": "0.5479408", "text": "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "title": "" }, { "docid": "2c0c433441de9cacab9878463a13e7bc", "score": "0.5478678", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "title": "" }, { "docid": "2ba9e2fb1c6450012bb0ef54decacbcc", "score": "0.54667485", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "title": "" }, { "docid": "dc09c6048588c09b320af9c0d862323d", "score": "0.5463411", "text": "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "title": "" }, { "docid": "3898cbff513b04923b83b4748c2c7fa8", "score": "0.5460588", "text": "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "title": "" }, { "docid": "5b72ae8e940480dd3b49bab90e39b090", "score": "0.5458525", "text": "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }", "title": "" } ]
d8d53f1c6aa05c2bbc3596cc643629fa
/ method for getting user total money calculation Auth: Dipanjan
[ { "docid": "3e5448eae2a953634843bec4f22ce85f", "score": "0.8004267", "text": "function getUserTotalMoney()\n\t\t{\n\t\t\t//get user total money\n\t\t\t$grand_total = $this->_DAL_Obj->getLastValue('user_money_info', '*', 'user_id', $_SESSION['user_id'], 'id');\n\t\t\t//user withdraw money\n\t\t\t$money = $this->_DAL_Obj->getValue_where('user_profile_info', '*', 'user_id', $_SESSION['user_id']);\n\t\t\tif(!empty($money[0]['withdraw_amount']))\n\t\t\t{\n\t\t\t\t$withdraw_money = $money[0]['withdraw_amount'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$withdraw_money = 0;\n\t\t\t}\n\t\t\t//withdraw processing amount\n\t\t\tif(!empty($money[0]['processing_withdraw_amount']))\n\t\t\t{\n\t\t\t\t$with_pro_amount = $money[0]['processing_withdraw_amount'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$with_pro_amount = 0;\n\t\t\t}\n\t\t\t\n\t\t\t//get system currency\n\t\t\t$system_currency = $this->getSystemCurrency('product');\n\t\t\techo '<tr>\n <td class=\"amt-color\" colspan=\"6\" style=\"text-align: right;\">'.gross_amount.'</td>\n <td>'.$system_currency.$money[0]['gross_amount'].'</td>\n </tr>\n <tr>\n <td class=\"amt-color\" colspan=\"6\" style=\"text-align: right;\">'.withdraw_amount.'</td>\n <td>'.$system_currency.$withdraw_money.'</td>\n </tr>';\n\t\t\tif(!empty($money[0]['processing_withdraw_amount']))\n\t\t\t{\n\t\t\t\techo '<tr>\n\t <td class=\"amt-color\" colspan=\"6\" style=\"text-align: right;\">'.processing_withdraw_amount.'</td>\n\t <td>'.$system_currency.$with_pro_amount.'</td>\n\t </tr>';\n\t\t\t}\n\t\t\t\n echo '<tr>\n <td class=\"amt-color\" colspan=\"6\" style=\"text-align: right;\">'.net_amount.'</td>\n <td>'.$system_currency.$money[0]['net_amount'].'</td>\n </tr>';\n\t\t}", "title": "" } ]
[ { "docid": "21c103c9e579028cbf60159341743fd9", "score": "0.72849107", "text": "function getTotalAmount();", "title": "" }, { "docid": "9184a078c81abd4c61c3713f93b7e5bf", "score": "0.70436823", "text": "function getUserNetAmount($user_id)\n\t\t{\n\t\t\t//user withdraw money\n\t\t\t$money = $this->_DAL_Obj->getValue_where('user_profile_info', '*', 'user_id', $user_id);\n\t\t\t//net amount\n\t\t\t$net_total = $money[0]['net_amount'];\n\t\t\t\n\t\t\treturn $net_total;\n\t\t}", "title": "" }, { "docid": "af9d9eca0a81819cdb5d89d5971d4326", "score": "0.7008784", "text": "public function getTotalAmount($userid, $day){\n\t\tglobal $mysqli;\n\t\tif ($this->Authenticated){\n\t\t\tif ($result = $mysqli->query(\"select GetTotalAmount($userid,$day) AS total\")){\n\t\t\t\t$obj=$result->fetch_object();\t\t\n\t\t\t\treturn $obj->total;\t\n\t\t\t\t\t\t}\n\t\t}else\n\t\t\t$this->Error =\"User is NOT authorized to execute this function/getStatus. Please contact Administator<br>\";\t\t\n\t\n\t}", "title": "" }, { "docid": "eafecdbba08dd559c9f288a0cf60637b", "score": "0.6988381", "text": "public function totalCreditors()\n {\n $users = User::dateRangeTo($this->to)->with('sales', 'payments')->get();\n\n $total = 0;\n\n foreach($users as $user)\n {\n $initialBalance = $user->initial_balance;\n\n $payments = $user->payments()->dateRangeTo($this->to)->sum('amount');\n\n $sales = $user->sales()->dateRangeTo($this->to)\n ->sum(DB::raw('`price` * `amount`'));\n\n $totalUser = $initialBalance + $payments - $sales;\n\n if($totalUser > 0)\n $total += $totalUser;\n }\n\n return $total;\n }", "title": "" }, { "docid": "79699b14ffbacc9a2330958205261bc6", "score": "0.6976424", "text": "public function getTotalPaid();", "title": "" }, { "docid": "b06d0ce1cb2522031cabae987d6f218e", "score": "0.68696713", "text": "public function getAmount();", "title": "" }, { "docid": "b06d0ce1cb2522031cabae987d6f218e", "score": "0.68696713", "text": "public function getAmount();", "title": "" }, { "docid": "cb1798148bff9a7e8d9ff8130e58902b", "score": "0.6861512", "text": "function getUserTotalPointValue()\n\t\t{\n\t\t\t//get user total money\n\t\t\t$total_pv = $this->_DAL_Obj->getLastValue('user_point_info', '*', 'user_id', $_SESSION['user_id'], 'id');\n\t\t\t\n\t\t\techo '<tr>\n <td class=\"amt-color\" colspan=\"5\" style=\"text-align: right;\">'.total_point_value.'</td>\n <td>'; if(!empty($total_pv[0]['total_pv'])) { echo $total_pv[0]['total_pv'] ; } else { echo 0;} echo '</td>\n </tr>';\n\t\t}", "title": "" }, { "docid": "f5ed65cdb31452407f01bb41bf0971a4", "score": "0.6856367", "text": "public function amount();", "title": "" }, { "docid": "f5ed65cdb31452407f01bb41bf0971a4", "score": "0.6856367", "text": "public function amount();", "title": "" }, { "docid": "86237cf423b7d3fa4b4a8aaac7e445d6", "score": "0.68370545", "text": "function doctor_paid_amount($param = array()){global $wpdb, $current_user;\n\t\n\t$query = \"SELECT amount, type FROM `payment_detail` where user_id = '\".$current_user->ID.\"' \";\n\t$query_exe = $wpdb->get_row($query);\n\t$amount = $query_exe->amount > 0 ? $query_exe->amount : 0;\n\t\n\t$query = \"SELECT entmt.meta_value FROM `\".$wpdb->prefix.\"gf_entry` ent\n\t\t\t\t\t inner join \".$wpdb->prefix.\"gf_entry_meta entmt\n\t\t\t\t\t on (ent.form_id = entmt.form_id \n\t\t\t\t\t\t AND ent.id = entmt.entry_id \n\t\t\t\t\t\t AND entmt.meta_key = 'gform_product_info__')\n\t\t\t\t\t where ent.form_id = 7\n\t\t\t\t\t and created_by = '\".$param['user_id'].\"'\n\t\t\t\t\t group by ent.id\";\n\t$sql_data = $wpdb->get_col($query);\n\t$sum = 0;\n\tif(!empty($sql_data)){\n\t\tforeach($sql_data as $col){\n\t\t\t$return = unserialize($col);\n\t\t\tforeach($return as $product => $value ){\n\t\t\t\tforeach($value as $val => $key){\n\t\t\t\t\t$sum = $sum + str_replace('$', '', $key['price']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\n\tif($query_exe->type == 'discount'){\n\t\t$tota = $sum + $amount ; \n\t\t}\n\telseif($query_exe->type == 'affiliate'){\n\t\t$signup_fee = get_user_meta($current_user->ID, 'signup_fee', true);\n\t\t$signup_fee = $signup_fee != '' ? $signup_fee : signup_fee;\n\t\t$tota = $sum + $amount - $signup_fee; \n\t\t}\n\telse{\n\t\t $signup_fee = get_user_meta($current_user->ID, 'signup_fee', true);\n\t\t $signup_fee = $signup_fee != '' ? $signup_fee : signup_fee;\n\t\t $tota = $sum + $amount - $signup_fee; \n\t\t }\n\t\n\treturn\t$tota;\n\t}", "title": "" }, { "docid": "f2e62b33092af1b78716e147b2719a10", "score": "0.67680615", "text": "function adminFundBalance($user_id)\n{\n\t$CI = & get_instance();\n\t$topup_fund = $CI->user_model->selectSumData( $table=\"ta_admin_topup\",$sel = 'topup_amount', $con = array('topup_status' => 1 , 'admin_id' => $user_id ));\n\t$transaction_fund = $CI->user_model->selectSumData( $table=\"ta_admin_to_client_transaction\",$sel = 'trans_amount', $con = array('trans_approved' => 1 , 'trans_admin_id' => $user_id , 'trans_active' => 1 ));\n\t$total_fund=$topup_fund-$transaction_fund;\n\techo $total_fund;\n\t\n}", "title": "" }, { "docid": "18e5ea686b8dcfa7db7e7daea758893f", "score": "0.6765711", "text": "public function getTotalContractAmount();", "title": "" }, { "docid": "6b4dce9d784e3fe4a3f24936cfc07b57", "score": "0.6756886", "text": "function pay_basket_total(){\n\t\n $user_guid = elgg_get_logged_in_user_guid();\n\t$items = elgg_get_entities(array(\n\t\t\t\t\t\t\t\t\t'type' => 'object',\n\t\t\t\t\t\t\t\t\t'subtype' => 'pay_basket',\n\t\t\t\t\t\t\t\t\t'owner_guid' => $user_guid,\n\t\t\t\t\t\t\t\t\t));\n\t$total = 0;\t\t\t\t\t\t\t\t\n\tforeach($items as $item){\n\t\t$total += $item->price;\n\t}\n\t\n\treturn $total;\n}", "title": "" }, { "docid": "30b3366f7b554dbcd087e750523d5e84", "score": "0.670812", "text": "public function getTotalMoney() {\n return $this->get(self::TOTALMONEY);\n }", "title": "" }, { "docid": "784f2d264a06f5791b4a21657c9a6fd2", "score": "0.6701013", "text": "public function total();", "title": "" }, { "docid": "784f2d264a06f5791b4a21657c9a6fd2", "score": "0.6701013", "text": "public function total();", "title": "" }, { "docid": "784f2d264a06f5791b4a21657c9a6fd2", "score": "0.6701013", "text": "public function total();", "title": "" }, { "docid": "784f2d264a06f5791b4a21657c9a6fd2", "score": "0.6701013", "text": "public function total();", "title": "" }, { "docid": "ef12e15faa0a675427cf1dbe7f6087d7", "score": "0.6698415", "text": "public function getAmount(): float;", "title": "" }, { "docid": "360b8ee82f434cf1122f4cbddd0db5e0", "score": "0.6679507", "text": "abstract public function getAmount();", "title": "" }, { "docid": "0ed503fa543d02069bfc36947f5ec131", "score": "0.66588974", "text": "function income_balance_total($userId) {\n global $conn;\n\n $statement = $conn->prepare(\"SELECT SUM(balance) AS total FROM account_incomes WHERE user_id = ?\");\n $statement->bind_param(\"i\", $userId);\n $statement->execute();\n\n $result = $statement->get_result();\n $row = $result->fetch_assoc();\n\n return $row['total'];\n}", "title": "" }, { "docid": "362791b0749c0347cc08411954b163c2", "score": "0.6652121", "text": "public function getSumOfTodaysPaidAmount(){\n $userId = $_SESSION[\"user_auth_id\"];\n $date = date(\"d-m-Y\");\n $sql=\"SELECT sum(PAY_AMOUNT) as totalPaidAmount FROM transaction WHERE USER_ID='$userId' AND TRANSACTION_DATE='$date' AND TRANSACTION_STATUS='1'\";\n $result = $this->conn->query($sql);\n if($row= $result->fetch_assoc()){\n return $row[\"totalPaidAmount\"];\n }else{\n return 0;\n }\n }", "title": "" }, { "docid": "daa4dd3ca159fec0a4e7d10cdc7a6201", "score": "0.66311616", "text": "function getTotalCredit($id_user)\n\t{\n\t\t$total = 0;\n\t\t\n\t\t$favor = $this->getCreditWallet($id_user);\n\t\tif($favor > 0)\n\t\t{\n\t\t\t$contra = $this->getDeductWallet($id_user);\n\t\t\t$total = $favor - $contra;\n\t\t}\n\t\t\t\n\t\treturn $total;\n\t}", "title": "" }, { "docid": "e36e2019a8296af9e463de98b1a0e0cd", "score": "0.66278046", "text": "public function getAmount() \n\t{\n\t\t\n\t}", "title": "" }, { "docid": "e3d16c2b531606799205272eea886ad9", "score": "0.6604633", "text": "function getUserTotalPointValueByHimself($user_id)\n\t\t{\n\t\t\t//define an variable\n\t\t\t$pv = 0;\n\t\t\t//get user money details\n\t\t\t$userPv = $this->_DAL_Obj->getValueMultipleCondtn('user_point_info', '*', array('user_id'), array($user_id));\n\t\t\tif(!empty($userPv[0]))\n\t\t\t{\n\t\t\t\tforeach($userPv as $point)\n\t\t\t\t{\n\t\t\t\t\t//getting transaction details\n\t\t\t\t\t$trans_details = $this->_DAL_Obj->getValue_where('fee_transaction_info', '*', 'transaction_id', $point['specification']);\n\t\t\t\t\tif(substr($trans_details[0]['order_id'], 0, 5) == 'order')\n\t\t\t\t\t{\n\t\t\t\t\t\t//getting order details\n\t\t\t\t\t\t$order_details = $this->_DAL_Obj->getValue_where('order_info', '*', 'order_id', $trans_details[0]['order_id']);\n\t\t\t\t\t\tif($order_details[0]['user_id'] == $user_id)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$pv = $pv + $point['earn_pv'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\techo '<tr>\n <td class=\"amt-color\" colspan=\"5\" style=\"text-align: right;\">'.point_value_earned_by_himself.'</td>\n <td>'.$pv.'</td>\n </tr>';\n\t\t\t\n\t\t}", "title": "" }, { "docid": "0d5d58ea141df3085607ce031dd7e7ea", "score": "0.6593773", "text": "public function totalAmount()\n {\n return $this->amount_paid + $this->service_fee;\n }", "title": "" }, { "docid": "7e681aae0bccb4c9179b8c66573026e7", "score": "0.6569151", "text": "public function total(): float;", "title": "" }, { "docid": "917ee9fb98e441b67e013f0a74bfcfe6", "score": "0.65475017", "text": "function adminPaidBalance($user_id)\n{\n\t$CI = & get_instance();\n\t$transaction_fund = $CI->user_model->selectSumData( $table=\"ta_admin_to_client_transaction\",$sel = 'trans_amount', $con = array('trans_approved' => 1 , 'trans_admin_id' => $user_id , 'trans_active' => 1 ));\n\techo $transaction_fund;\n}", "title": "" }, { "docid": "bde7c3c9b8a26a111b67486dda544be8", "score": "0.6536823", "text": "function reffer_amount(){\n\t$user_id=$_REQUEST['user_id'];\n\tif(!empty($user_id)){\n\t $reffer_records = $this -> conn -> get_all_records('reffer_amount');\n\t\t$refferal_amount = $reffer_records[0]['reffer_amount'];\n\t\n\t\t\t$records = $this -> conn -> get_table_row_byidvalue_sum('refferal_records', 'refferal_frnd_id', $user_id,'refferal_amount');\n\t\t$user_reffer_amount = $records[0]['total'];\n\t\tif(!empty($user_reffer_amount)){\n\t\t\t$user_reffer_amount=$user_reffer_amount;\n\t\t}else{\n\t\t\t$user_reffer_amount='0';\n\t\t}\n\t\t\t$post = array(\"status\" => \"true\",'reffer_amount'=>$refferal_amount,'user_total_reffer_amount'=>$user_reffer_amount,'user_id'=>$user_id);\n\t\t\n\t\t}else{\n\t\t\t$post = array(\"status\" => \"false\",'message'=>'missing parameter','user_id'=>$user_id);\n\t\t}\n\t\t\techo $this -> json($post);\n}", "title": "" }, { "docid": "b5375f871a277eea7c021913e119cb2d", "score": "0.65230274", "text": "public function getuser_total_balance($user_id){\n\n $balance= 0; \n $db = UserWallet::where('user_id', $user_id);\n $db->select(DB::raw('sum(credit_amount) as total_credit,sum(debit_amount) as total_debit'));\n $res = $db->first();\n\n if(!empty($res)){\n $balance = $res->total_credit-$res->total_debit;\n }\n return $balance; \n\n }", "title": "" }, { "docid": "d3e86a4ec41012e2f05b425548ebf968", "score": "0.64944124", "text": "function outcome_budget_total($userId) {\n global $conn;\n\n $statement = $conn->prepare(\"SELECT SUM(budget) AS total FROM account_outcomes WHERE user_id = ?\");\n $statement->bind_param(\"i\", $userId);\n $statement->execute();\n\n $result = $statement->get_result();\n $row = $result->fetch_assoc();\n\n return $row['total'];\n}", "title": "" }, { "docid": "0e0ebb0aa53e0c84d5ef41202b18106b", "score": "0.64899313", "text": "function getAmount($id)\n{\n // ->get('amount');\n return App\\Models\\WithdrawModel::where('user_id', $id)->sum('amount');\n}", "title": "" }, { "docid": "c453c01d039978e1267113ecb9b72c94", "score": "0.64873034", "text": "function calculateTotal(): int;", "title": "" }, { "docid": "b523cc80101097ba17a1a3e7cdebfa52", "score": "0.64738166", "text": "function outcome_balance_total($userId) {\n global $conn;\n\n $statement = $conn->prepare(\"SELECT SUM(balance) AS total FROM account_outcomes WHERE user_id = ?\");\n $statement->bind_param(\"i\", $userId);\n $statement->execute();\n\n $result = $statement->get_result();\n $row = $result->fetch_assoc();\n\n return $row['total'];\n}", "title": "" }, { "docid": "0c1abf4e0f40fbfe13547c08e42dde7e", "score": "0.6427461", "text": "public function getMontoActual()\n {\n $total=ProyectoUsuarioAsignar::find()->select(['sum((enero+febrero+marzo+abril+mayo+junio+julio+agosto+septiembre+octubre+noviembre+diciembre)*precio) as total'])->innerJoin('proyecto_pedido', 'proyecto_usuario_asignar.id = proyecto_pedido.asignado')->where(['proyecto_usuario_asignar.proyecto_id' => $this->id])->asArray()->One();\n\n if($total!=null)\n {\n return $total['total'];\n }\n else\n {\n return null;\n }\n }", "title": "" }, { "docid": "87da27602dffa62b2ab7b5b42fe88193", "score": "0.64251834", "text": "public function totalDebtors()\n {\n $users = User::dateRangeTo($this->to)->with('sales', 'payments')->get();\n\n $total = 0;\n\n foreach($users as $user)\n {\n $initialBalance = $user->initial_balance;\n\n $payments = $user->payments()->dateRangeTo($this->to)->sum('amount');\n\n $sales = $user->sales()->dateRangeTo($this->to)\n ->sum(DB::raw('`price` * `amount`'));\n\n $totalUser = $initialBalance + $payments - $sales;\n\n if($totalUser < 0)\n $total += $totalUser;\n }\n\n return $total;\n }", "title": "" }, { "docid": "4c5cfaa865ec4b9d52e8557b8b9130ce", "score": "0.6422651", "text": "function checkMoney($uId){\r\n $money=100;\r\n return $money;\r\n // $numAcc=$queryAcc->num_rows;\r\n}", "title": "" }, { "docid": "1d8e664d580c7cfbfa413f278b952700", "score": "0.6417447", "text": "public function getDisplayAmount();", "title": "" }, { "docid": "81e32afbcb83cb505648f4b216e72660", "score": "0.64127445", "text": "function getTotal();", "title": "" }, { "docid": "0e8c4b2f3940df14b2bd8bb4c230f183", "score": "0.64085114", "text": "public function getTotalPrice();", "title": "" }, { "docid": "0c16d582314a3725cf4aef5f5728445f", "score": "0.6388328", "text": "public function getTotalsForUser()\r\n {\r\n $salesOrder = Mage::getModel('sales/order')->getCollection()\r\n ->addAttributeToSelect('total_invoiced')\r\n ->addAttributeToSelect('total_refunded')\r\n ->addAttributeToSelect('customer_id')\r\n ->addAttributeToFilter('state', array('neq' => Mage_Sales_Model_Order::STATE_CLOSED))\r\n ->addAttributeToFilter('customer_id', $this->_customer);\r\n foreach ($salesOrder as $order)\r\n {\r\n $this->totalInvoiced += $order->getTotalInvoiced();\r\n $this->totalReturned += $order->getTotalRefunded();\r\n }\r\n $this->totalValue = $this->totalInvoiced + $this->_currentBaseGrandTotal - $this->totalReturned;\r\n }", "title": "" }, { "docid": "496bc0c28c1ae84e89700058cc363d67", "score": "0.63783777", "text": "public function getTotal();", "title": "" }, { "docid": "496bc0c28c1ae84e89700058cc363d67", "score": "0.63783777", "text": "public function getTotal();", "title": "" }, { "docid": "496bc0c28c1ae84e89700058cc363d67", "score": "0.63783777", "text": "public function getTotal();", "title": "" }, { "docid": "0daf4d154268d0b91bdb9baedc36c60c", "score": "0.63709307", "text": "public function amount() : float;", "title": "" }, { "docid": "4bf02db0013217288b6c5279165bc5f8", "score": "0.63512444", "text": "function retrieve_film_total_payment($user_id){\n\t\t\n\t\t\t$this->openConn();\n\t\t\t$stmt=$this->dbh->prepare(\" SELECT sum(film_price) from film , user,user_to_film where film.film_id=user_to_film.film_id and user.user_id = user_to_film.user_id and user.user_id=? and user_to_film.status='HINDI PA NA DIDELIVER';\");\n\t\t\t$stmt->bindParam(1,$user_id);\n\t\t\t$stmt->execute();\n\t\t\t$record = $stmt->fetch();\n\t\t\t\t\t\n\t\t\techo $record[0];\t\t\t \n\t\t\t$this->closeConn();\n\t\t\n\t\t}", "title": "" }, { "docid": "fdcc333e303d0534e291507a51fcde5e", "score": "0.63490295", "text": "function getRAmount($uEmail) //public\n{\n\treturn getAmountHelper($uEmail,\"u_ramount\");\n}", "title": "" }, { "docid": "9d6a4bfd64450dfa47bdd84cd038f2ba", "score": "0.63462585", "text": "function total_withdrawn($investor_id){\n $investor_id = $this->secure_database($investor_id);\n $sql = \"SELECT SUM(amount_withdrawn) as `amount` FROM `debit_wallet_tbl` WHERE `user_id`='$investor_id' AND (`purpose` = 4) \";\n $query = mysqli_query($this->connection, $sql);\n $row = mysqli_fetch_array($query);\n $sum = $row['amount'];\n $num = mysqli_num_rows($query);\n return json_encode([\"status\"=>\"1\", \"msg\"=>intval($sum)]); \n}", "title": "" }, { "docid": "7ddf1b32dd9170296533d22cc5f29499", "score": "0.63331443", "text": "public function precio_total()\n\t{\n\t\t$total = 0;\n\t\tforeach ($this->ci->session->userdata('carrito') as $id_producto => $cantidad)\n\t\t{\n\t\t\t$total += $this->precio_linea($id_producto);\n\t\t}\n\t\treturn $total;\n\t}", "title": "" }, { "docid": "f416957f174a1ead648acf38a7dce46c", "score": "0.6330598", "text": "public function getTotalUsers(){\n $data = $this->totalUsers();\n return $data;\n }", "title": "" }, { "docid": "7db8fd2e77986d9f6a37dd9277e34e15", "score": "0.63243157", "text": "private function total()\n {\n $carrito = \\Session::get('carrito');\n $total = 0;\n\n foreach ($carrito as $item) {\n $subtotal = $item->precio_prod * $item->Cantidad;\n $iva = $subtotal * .16;\n $total += $subtotal + $iva;\n }\n return $total;\n }", "title": "" }, { "docid": "e05b4b2441bc19d607ad7146b58ab49d", "score": "0.6322727", "text": "public function getInvoiceSum(): float;", "title": "" }, { "docid": "564de7283be5a655e358ec888cb89127", "score": "0.63204855", "text": "function get_total() {\r\n\r\n if ( $param = func_get_arg(0) ) {\r\n\r\n $this->proposal_hash = $param['proposal_hash'];\r\n $this->invoice_hash = $param['invoice_hash'];\r\n $this->customer_hash = $param['customer_hash'];\r\n $sql = $param['sql'];\r\n }\r\n\r\n $result = $this->db->query(\"SELECT COUNT(*) AS Total\r\n FROM customer_credit\r\n WHERE \" .\r\n ( $this->customer_hash ? \"\r\n customer_hash = '{$this->customer_hash}' AND \" : NULL\r\n ) .\r\n ( $this->proposal_hash ? \"\r\n proposal_hash = '{$this->proposal_hash}' AND \" : NULL\r\n ) .\r\n ( $this->invoice_hash ? \"\r\n invoice_hash = '{$this->invoice_hash}' AND \" : NULL\r\n ) .\r\n ( $sql ?\r\n \"$sql AND \" : NULL\r\n ) . \"customer_credit.deleted = 0\");\r\n\r\n $this->total = $this->db->result($result, 0, 'Total');\r\n }", "title": "" }, { "docid": "faf1e5b47e5ae84024fba722cb06bc46", "score": "0.6318514", "text": "public function getBalance()\r\n\t{\r\n\t\t$user = Bengine::getModel(\"user\");\r\n\t\t$user->load($this->userid);\r\n\r\n\t\treturn $user->getCredits();\r\n\t}", "title": "" }, { "docid": "c23254ca2153fb049316802fea4c184b", "score": "0.63092667", "text": "function getUserPrice()\n\t\t{\n\t\t\tif(substr($_SESSION['user_id'],0,4) == 'user')\n\t\t\t{\n\t\t\t\t$price = 'member_price';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$price = 'guest_price';\n\t\t\t}\n\t\t\treturn $price;\n\t\t}", "title": "" }, { "docid": "d466e743bf5e04aceb8009d15f26a1c8", "score": "0.63015115", "text": "function getTotalPaymentReceived(){\n $this->db->select_sum('price');\n $this->db->where('transaction_id is NOT NULL',NULL, FALSE );\n $this->db->where('bonus','NO' );\n $query = $this->db->get(USER_PAYMENTS);\n \n if( $query->num_rows() > 0 ){\n $queryData = $query->row_array();\n $totalUsdReveived = $queryData['price'];\n return $totalUsdReveived;\n }else{\n return 0;\n }\n }", "title": "" }, { "docid": "0eef59a62f71324608b0af4225f68879", "score": "0.6290065", "text": "public function totalPrice()\n {\n $totalPrice = 0;\n foreach($this->byUser()->get() as $product)\n {\n $totalPrice += $product->getProduct->price * $product->quantity;\n }\n \n return $totalPrice;\n }", "title": "" }, { "docid": "b3370f0d566f20a556c01f72b29210f9", "score": "0.62793803", "text": "function kiraTotalTracc() {\n\t\t$total = 0;\n\t\t$total = $this->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'Mt4User.GROUP LIKE' => '%IK%',\n\t\t\t\t'Mt4User.ENABLE' => '1'\n\t\t\t),\n\t\t\t'fields' => array('sum(BALANCE) AS total')\n\t\t));\n\t\treturn $total;\n\t}", "title": "" }, { "docid": "65d0797e911bd9c90a4a2acbebadb032", "score": "0.62710035", "text": "function getTotal() {\n\t\t$sql = \"select sum(item_unit_price*item_qty)*100 total from hy_order_cart where addedby = '\".$_SESSION['usercode'].\"'\";\n\t\t$query = $this->_custom_query($sql);\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "5ec776ede41809a358c1794212622614", "score": "0.626665", "text": "public function get_money_page() {\n $returnArr['status'] = '0';\n $returnArr['response'] = '';\n try {\n $user_id = (string) $this->input->post('user_id');\n\n if ($user_id != '') {\n $userVal = $this->app_model->get_selected_fields(USERS, array('_id' => MongoID($user_id)), array('city', 'unique_code', 'stripe_customer_id'));\n if ($userVal->num_rows() > 0) {\n $current_balance = 0;\n $walletAmt = $this->app_model->get_selected_fields(WALLET, array('user_id' => MongoID($user_id)), array('total'));\n if ($walletAmt->num_rows() > 0) {\n if (isset($walletAmt->row()->total)) {\n $current_balance = $walletAmt->row()->total;\n }\n }\n $wallet_min_amount = floatval($this->config->item('wal_recharge_min_amount'));\n $wallet_max_amount = floatval($this->config->item('wal_recharge_max_amount'));\n $wallet_middle_amount = floatval(($this->config->item('wal_recharge_max_amount') + $this->config->item('wal_recharge_min_amount')) / 2);\n\n\n if ($wallet_max_amount != '' && $wallet_max_amount != '') {\n $wallet_money = array('min_amount' => (string)number_format($wallet_min_amount,2),\n 'middle_amount' => (string)number_format(round($wallet_middle_amount),2),\n 'max_amount' => (string) number_format($wallet_max_amount,2)\n );\n } else {\n $wallet_money = array();\n }\n\n $stripe_customer_id = '';\n if (isset($userVal->row()->stripe_customer_id)) {\n $stripe_customer_id = $userVal->row()->stripe_customer_id;\n }\n\n $auto_charge_status = '0';\n if ($this->data['auto_charge'] == 'Yes' && $stripe_customer_id != '') {\n $auto_charge_status = '1';\n }\n\n $returnArr['auto_charge_status'] = $auto_charge_status;\n $current_balance = round($current_balance,2);\n $returnArr['status'] = '1';\n $returnArr['response'] = array('currency' => $this->data['dcurrencyCode'],\n 'current_balance' => number_format($current_balance,2),\n 'recharge_boundary' => $wallet_money\n );\n } else {\n $returnArr['response'] = $this->format_string(\"Invalid User\", \"invalid_user\");\n }\n } else {\n $returnArr['response'] = $this->format_string(\"Some Parameters Missing\", \"some_parameters_missing\");\n }\n #echo '<pre>'; print_r($returnArr); die;\n } catch (MongoException $ex) {\n $returnArr['response'] = $this->format_string(\"Error in connection\", \"error_in_connection\");\n }\n $json_encode = json_encode($returnArr, JSON_PRETTY_PRINT);\n echo $this->cleanString($json_encode);\n }", "title": "" }, { "docid": "fa91cfd3dadd4e7639179c15478ab340", "score": "0.6253103", "text": "public function getCheckTotalAttribute()\n\t{\n\t\t$host_id = $this->attributes['host_id'];\n\n\t\tif (request()->segment(1) == 'api') {\n\t\t\t$user = JWTAuth::parseToken()->authenticate();\n\t\t\t$user_id = $user->id;\n\t\t}\n\t\telse {\n\t\t\t$user_id = @auth()->user()->id;\n\t\t}\n\n\t\tif ($host_id == $user_id) {\n\t\t\treturn $this->total + $this->coupon_amount - $this->service - $this->host_fee-@$this->hostPayouts->total_penalty_amount;\n\t\t}\n\t\telse {\n\t\t\treturn $this->total;\n\t\t}\n\t}", "title": "" }, { "docid": "67cbddca5a65019ad1ea729fda026032", "score": "0.6243802", "text": "public function computeTotalPaid(){\n $paid = 0;\n $payments = $this->payments;\n foreach($payments as $payment){\n $paid+= $payment->amount;\n }\n return $paid;\n }", "title": "" }, { "docid": "10441cf0970b59b1a7c98ff9ecf28505", "score": "0.62430847", "text": "public function getTotalcash()\n {\n return $this->totalcash;\n }", "title": "" }, { "docid": "a3d536699588f8e95f29848068957224", "score": "0.62370646", "text": "public static function get_sum_usd(){\n $Stage = Stage::get(Option::get('stage'));\n $additions = Journal::where(\"(type='usd_to_tok' OR type='usd_to_2tok') AND date >='{$Stage['start']}'\");\n //echo \"(type='usd_to_tok' OR type='usd_to_2tok') AND date >='{$Stage['start']}'\";exit;\n $usd_sum = 0.0;\n foreach ($additions as $key => $value) {\n $usd_sum += $value['sum']*$value['rate'];\n }\n return $usd_sum;\n }", "title": "" }, { "docid": "8bfe3ad80a65c35737c9cd9349ec67bf", "score": "0.6234851", "text": "function getOAmount(/*string*/ $uEmail) //public\n{\n\treturn getAmountHelper($uEmail,\"u_oamount\");\n}", "title": "" }, { "docid": "02a7bceff2f5227ec7371bd30a4950fd", "score": "0.6231667", "text": "function getPAmount($uEmail) //public\n{\n\treturn getAmountHelper($uEmail,\"u_pamount\");\n}", "title": "" }, { "docid": "6c6c53f887af7b17831fceaabc63401a", "score": "0.6224195", "text": "public function getInvoiceDeliveryUahSum(): float;", "title": "" }, { "docid": "4ec5f87d1a47fff04e9d2311faab8740", "score": "0.6222416", "text": "public function getExternalTotalGross();", "title": "" }, { "docid": "56fa12dcab75dcaa6ea68df2fbe88382", "score": "0.6221617", "text": "function calculateTotalPrice()\n{\n $cartTotal = getCartTotal();\n $shippingFees = calculateShippingFees();\n return $cartTotal + $shippingFees;\n}", "title": "" }, { "docid": "a69713683c92789b2adb8d0c130ed8de", "score": "0.62124026", "text": "function computeAmount( $basket) \n\t{\n\n\t\t$current_edition = getOneAssocArray( 'select * from global_editions where edition_id = \"'.$GLOBALS['appshore_data']['my_company']['edition_id'].'\"' );\n\t\t$new_edition = getOneAssocArray( 'select * from global_editions where edition_id = \"'.$basket['edition_id'].'\"' );\n\n\t\t$amount = $prorataAmount = 0;\n\t\t// if the current period is set\n\t\tif( $GLOBALS['appshore_data']['my_company']['due_date'] != '0000-00-00' )\n\t\t{\n\t\t\t$now = strtotime(\"now\");\n\t\t\t$due = strtotime($GLOBALS['appshore_data']['my_company']['due_date']);\n\t\t\t$delta = ($due-$now) / (3600*24) / 30;\n\n\t\t\t// TRIAL users do not have to pay for past period\n\t\t\tif( strpos($current_edition['edition_id'], 'TRIAL') === false )\n\t\t\t{\n\t\t\t\t$prorataCurrent = $current_edition['price']*$GLOBALS['appshore_data']['my_company']['users_quota'];\n\t\t\t\t$prorataNew = $new_edition['price']*$basket['users_quota'];\n\t\t\t\t$prorataAmount = $delta * ( $prorataNew - $prorataCurrent );\n\t\t\t}\n\t\t}\n\n\t\t// add the amount for the new period\n\t\tif( $basket['period'] != 0 )\n\t\t\t$amount += ($new_edition['price']*$basket['users_quota']*$basket['period']);\t\n\t\t\t\n\t\tif( ($prorataAmount+$amount) < 1 )\n\t\t\t$amount = 0;\n\t\telse\n\t\t\t$amount += $prorataAmount;\n\t\t\n\t\treturn round($amount);\n\t}", "title": "" }, { "docid": "95c908731930172beea4ade0949bf72e", "score": "0.6211274", "text": "public function accountsOverviewTotal() {\n\t\t\treturn DB::select('\n\t\t\t\tSELECT SUM(monthly_balance) AS total_balance, SUM(monthly_cashback) AS total_cashback, user_id, partner_id, \n\t\t\t\tMIN(start_date) AS start_date, MAX(END_DATE) AS end_date, partners.image, partners.name, partners.login_link\n\t\t\t\tFROM users_result\n\t\t\t\tJOIN\n\t\t\t\t(\n\t\t\t\tSELECT partners.id, partners.image, partners.name, partners.login_link\n\t\t\t\tFROM partners\n\t\t\t\t) AS partners\n\t\t\t\tON users_result.partner_id = partners.id\n\t\t\t\tWHERE user_id = :authUserID\n\t\t\t\tGROUP BY partner_id;',\n\t\t['authUserID' => Auth::id()]);\n\t}", "title": "" }, { "docid": "b8e02ace9eff2cd184e996f6fce5f638", "score": "0.62068486", "text": "public function getCheckingBalance($user){\r\n\t\t $stmt = $this->DB->prepare(\"select money from checking where user_name=:user_name\");\r\n\t\t $stmt->bindParam(\"user_name\", $user);\r\n\t\t $stmt->execute();\r\n\t\t return $stmt->fetchAll ( PDO::FETCH_ASSOC );\r\n\t\t}", "title": "" }, { "docid": "e780f0490008788934550797423b5b4e", "score": "0.62040186", "text": "public function subtotal(){\n $subtotal = $this->user->cart->sum(function($product){\n return $product->price->amount() * $product->pivot->quantity;\n });\n return new Money($subtotal);\n }", "title": "" }, { "docid": "85935ca87712315395f2fad505ac21eb", "score": "0.620375", "text": "public function calcTotalAmount(){\n if(is_null($this->_stats))\n $this->getOpinionStats();\n if(is_null($this->_total_amount))\n $this->_total_amount = array_sum($this->_stats);\n return $this->_total_amount;\n }", "title": "" }, { "docid": "34a0383ce6b3d39379ff007a6c2337b8", "score": "0.61988443", "text": "public function total()\n {\n return $this->totalRaw();\n // return formatPriceWithCurrency($total*100); // must be as int eg 2999 = 29.99\n }", "title": "" }, { "docid": "507002242cb0348b4db68195bfa3ff2c", "score": "0.6191109", "text": "public function getAmount(): int;", "title": "" }, { "docid": "507002242cb0348b4db68195bfa3ff2c", "score": "0.6191109", "text": "public function getAmount(): int;", "title": "" }, { "docid": "210f345a36fd55c32d57158120b10da7", "score": "0.61898816", "text": "public function getTotalMoney()\n {\n $totalMoney = new Money(0, $this->primairyCurrency);\n foreach ($this->getMoneyCollection() as $money)\n {\n $totalMoney->add($money);\n }\n return $totalMoney;\n }", "title": "" }, { "docid": "2c9ea164265f4373d9cb8c0289d620e9", "score": "0.6188246", "text": "public function getSumOfTodaysReceivedAmount(){\n $userId = $_SESSION[\"user_auth_id\"];\n $date = date(\"d-m-Y\");\n $sql=\"SELECT sum(RECEIVED_AMOUNT) as totalReceivedAmount FROM transaction WHERE USER_ID='$userId' AND TRANSACTION_DATE='$date' AND TRANSACTION_STATUS='1'\";\n $result = $this->conn->query($sql);\n if($row= $result->fetch_assoc()){\n return $row[\"totalReceivedAmount\"];\n }else{\n return 0;\n }\n }", "title": "" }, { "docid": "7cc88ab1e459080938347fecb64d194b", "score": "0.61753166", "text": "public function api_get_total_user(){\n\n \t\t$data=\"\";\n $q= $this->Authentication_model->model_total_user();\n\n if($q==null){\n\n $data['message']=\"Data user tidak ada\";\n $data['response']=\"404\";\n }\n\n else {\n\n $data['response'] =\"200\";\n $data['post'] = $q;\n }\n\n \t\techo json_encode($data);\n \t}", "title": "" }, { "docid": "4af4117d790897c219ea6a40741ed777", "score": "0.61739385", "text": "public function totalLoanAmount(){\n $borrowers = $this->loanBorrowers();\n $amount = new Money(0);\n\n $borrowers->each(function($borrower) use ($amount){\n $amount->add($borrower->loanAmount());\n });\n\n return $amount;\n }", "title": "" }, { "docid": "0755086fa13688c09c1966afc8c685f3", "score": "0.6173499", "text": "function getTotalBtc(){\n $this->db->select_sum('amount');\n $this->db->where('status','confirmed' ); \n $query = $this->db->get(SYN_BTC);\n \n if( $query->num_rows() > 0 ){\n $queryData = $query->row_array();\n $erc_token_allotted = $queryData['amount'];\n return $erc_token_allotted;\n }else{\n return 0;\n }\n }", "title": "" }, { "docid": "912f7784ef62d2607b2e54aa9d6acaf0", "score": "0.61702883", "text": "public function saldo()\n {\n $price = 0;\n foreach ($this->invoices as $invoice)\n {\n if($invoice->status() == 2)\n {\n $price = $price + $invoice->price;\n }\n }\n\n return $price;\n }", "title": "" }, { "docid": "c7e13b67a1dba4303846d723ce8501aa", "score": "0.61656743", "text": "public function GetAmount() {\n\t\t\t$fltDeposit = $this->objSignupEntry->CalculateMinimumDeposit();\n\t\t\t$fltAmountOwed = -1 * $this->objSignupEntry->AmountBalance;\n\t\t\tif ($fltAmountOwed <= $fltDeposit) $fltDeposit = null;\n\n\t\t\tif ($this->rblDeposit->Visible && !is_null($fltDeposit) &&\n\t\t\t\t($this->rblDeposit->SelectedValue == 2)) {\n\t\t\t\treturn $fltDeposit;\n\t\t\t} else {\n\t\t\t\treturn $fltAmountOwed;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b5add3cf636cf10dd7488abf1288447a", "score": "0.61640835", "text": "private function updateAmount()\n\t{\n\t\t$amount = 0;\n\t\n\t\tforeach($this->getRewards() as $reward)\n\t\t\t$amount += $reward->getCost();\n\t\n\t\tforeach($this->getOptions() as $option)\n\t\t\t$amount += $option->getCost();\n\t\t\t\n\t\tforeach($this->getCancelledUserRewards() as $cancelledUserReward)\n\t\t\t$amount -= $cancelledUserReward->getReward()->getCost();\n\t\n\t\tforeach($this->getCancelledUserRewardOptions() as $cancelledUserRewardOption)\n\t\t\t$amount -= $cancelledUserRewardOption->getRewardOption()->getCost();\n\n\t\tif($this->user)\n\t\t{\n\t\t\t$this->creditUsed = min($this->user->getCredit(), $amount);\t\n\t\t\t$amount -= $this->creditUsed;\n\t\t}\n\n\t\t$this->amount = $amount;\n\t\t$this->fees = ceil($amount * $this->feesPercentage * 100) / 100;\n\t\t$this->totalAmount = $this->amount + $this->fees;\n\t}", "title": "" }, { "docid": "a251a2d4aacfa08416864a779a0dba97", "score": "0.61634696", "text": "function getTotalLtc(){\n $this->db->select_sum('amount');\n $this->db->where('status','confirmed' ); \n $query = $this->db->get(SYN_LTC);\n \n if( $query->num_rows() > 0 ){\n $queryData = $query->row_array();\n $erc_token_allotted = $queryData['amount'];\n return $erc_token_allotted;\n }else{\n return 0;\n }\n }", "title": "" }, { "docid": "6b855e6f3fec175fc7fc1e27915cb7cf", "score": "0.61620796", "text": "function total($mes, $anio) {\n\trequire_once('conexion.php');\n\t$conexion = new Conexion();\n\t$conexion->conectarBD();\n\t$query = $conexion -> getConexion() -> prepare(\"SELECT SUM(ganancia) as ganancia FROM cajadiaria WHERE mes = ? and anio =?\");\n\t$query->execute(array($mes, $anio));\n\t$res = $query -> fetchObject();\n\t$conexion->desconectarBD();\n\t$elTotal= number_format($res->ganancia,2, \",\", \"\"); \n\treturn $elTotal;\n}", "title": "" }, { "docid": "51be2099ac51b9043643b2b6df60c982", "score": "0.6161704", "text": "public function totalPoliceAction( ){\n\t\t$sql = \"SELECT SUM(c.quantidade ) AS total FROM crime c, natureza n \n\t\t\t\tWHERE c.natureza_id_natureza = n.id_natureza AND n.id_natureza \n\t\t\t\tBETWEEN 26 AND 29\";\n\t\t$result = $this->connection->base->Execute( $sql );\n\t\t$register = $result->FetchNextObject( );\n\t\treturn $register->TOTAL;\n\t}", "title": "" }, { "docid": "2b6fed3741b43ca03a87afda7fdd0a0a", "score": "0.6160649", "text": "public function retrieve_cart_total($user_id) {\n $this->db->select(\"SUM(Total) as subTot\");\n\t $this->db->from('Cart');\n\t $this->db->where('Cart.Reg_ID',$user_id); \n\t $this->db->group_by('Cart.Reg_ID');\n\t $query = $this->db->get();\n\t return $query->row('subTot');\n }", "title": "" }, { "docid": "a3a3b27220227fd2b7ed4dd7a570b87d", "score": "0.61565554", "text": "public function getTotalUsers()\n\t{\n\t\tif (!Cache::has('totalOwlooUsers'))\n\t\t{\n\t\t\t// $data = OwlooUser::count();\n\t\t\t$data = '4.100';\n\t\t\tCache::put('totalOwlooUsers', $data, 1440);\n\t\t}\n\t\treturn Cache::get('totalOwlooUsers');\n\t}", "title": "" }, { "docid": "5a897c703132d43fc73c54c9835b5e85", "score": "0.6155799", "text": "function calculateamountmaterils($id){\n $query = $this->db->query(\"select SUM(plainprice+printprice) as price from flexible_dies_mat where OID = $id\")->row_array();\n return $query['price'];\n }", "title": "" }, { "docid": "1f57532c4685a9f335371ab11bf0694e", "score": "0.61487466", "text": "public function totalDiscountAmount()\n {\n return $this->convertToUserCurrency(\n collect($this->discounts)->reduce(fn($current, $next) => $current + $next->amount, 0)\n );\n }", "title": "" }, { "docid": "3f49d9cd82e3fe5a856d7cf843e72ccd", "score": "0.612327", "text": "public function stats() \n {\n // store userId data\n $userId = $_POST['UserId'];\n\n // check for all data related to specified user\n $existingQuery = \"SELECT * FROM transactions WHERE userId = \" . $userId;\n $result = $this->dbLink()->query($existingQuery);\n\n // if the user has transactions\n if ($result->num_rows != 0) \n {\n $transactionCount = 0;\n $currencySum = 0;\n while($row = $result->fetch_assoc())\n {\n $transactionCount++;\n $currencySum += $row['currencyAmount'];\n }\n\n // combine data\n $userDetails = [\"UserId\"=> (int) $userId,\n \"TransactionCount\"=> (int) $transactionCount,\n \"CurrencySum\"=> (int) $currencySum];\n \n echo json_encode($userDetails);\n }\n else\n {\n echo json_encode([\"Message\"=> 'User does not have transactions']);\n }\n }", "title": "" }, { "docid": "84517a0ad341fb27626bfe686a761feb", "score": "0.61197156", "text": "public function getTotal() {\n }", "title": "" }, { "docid": "37e053b5cc72e9116ad3d1cd21734a0b", "score": "0.61006635", "text": "public function getCashAmount() {\n $cash = 0;\n if ($this->getKind() == \"priv\") {\n if ($this->getPayment() == \"bar\") {\n return $this->getAbsTotal(false);\n }\n }\n\n if ($this->getKind() == \"comp\") {\n $cash = 0;\n foreach ($this->getCompanyGroupMembers() as $member) {\n $customer = $member[0];\n $payment = $member[2];\n $priv = intval($member[3]);\n if ($payment == \"bar\") {\n $cash += $priv;\n }\n }\n return $cash;\n }\n }", "title": "" }, { "docid": "560bf048d34c9fee9bf1abff6f509dba", "score": "0.60962164", "text": "public function getTotalAmount()\n {\n return $this->totalAmount;\n }", "title": "" }, { "docid": "560bf048d34c9fee9bf1abff6f509dba", "score": "0.60962164", "text": "public function getTotalAmount()\n {\n return $this->totalAmount;\n }", "title": "" }, { "docid": "f70c28e0d08b4028ee5cf0c0216d1cda", "score": "0.60933936", "text": "function countTotalUsers($user_id, $connection) {\r\n\r\n global $connection;\r\n\r\n $amount = '';\r\n $query = \"SELECT COUNT(sw_user.user_id) AS amount\r\n FROM sw_user\r\n INNER JOIN sw_single_chat\r\n ON sw_user.user_id=sw_single_chat.user_two_id\r\n ORDER BY COUNT(sw_user.user_id);\";\r\n\r\n $result = databaseQuery($query, $connection);\r\n while($row = databaseFetchRow($result)) {\r\n\r\n\r\n $amount = $row['amount'];\r\n return $amount;\r\n}\r\n}", "title": "" }, { "docid": "d464f36e6bc4fb3698971173414093db", "score": "0.60909027", "text": "public function get_collected():float {\n $total = 0;\n foreach ($this->actual_payments as $cobranza) {\n $r[]=$cobranza->id;\n if ($cobranza->currency===\"BOB\") {\n $total=$total+ ($cobranza->amount/$cobranza->change_rate);\n } else {\n $total=$total+ $cobranza->amount;\n }\n }\n return $total;\n }", "title": "" } ]
1e90ada7aa4360f5e82bb83f49b000ae
Adds a section to the buffer.
[ { "docid": "fb25ebcd82e27599f68819d23e455f3d", "score": "0.5239284", "text": "function addSection(& $section, & $siteElement) {\n\t\t$sectionElement =& $this->_document->createElement('section');\n\t\t$siteElement->appendChild($sectionElement);\n\t\t\n\t\t$this->addCommonProporties($section, $sectionElement);\n\t\t\t\n\t\tforeach ($section->pages as $key => $val) {\n \t\t\tif ($section->pages[$key]->getField('type') == 'link')\n \t\t\t\t$this->addPageNavLink($section->pages[$key], $sectionElement);\n \t\t\telse if ($section->pages[$key]->getField('type') == 'heading')\n \t\t\t\t$this->addHeading($section->pages[$key], $sectionElement);\n \t\t\telse if ($section->pages[$key]->getField('type') == 'divider')\n \t\t\t\t$this->addDivider($section->pages[$key], $sectionElement);\n \t\t\telse if ($section->pages[$key]->getField('type') == 'content')\n \t\t\t\t$this->addPageContent($section->pages[$key], $sectionElement);\n \t\t\telse if ($section->pages[$key]->getField('type') == 'rss')\n \t\t\t\t$this->addPageRSS($section->pages[$key], $sectionElement);\n \t\t\telse if ($section->pages[$key]->getField('type') == 'participants')\n \t\t\t\t$this->addParticipantList($section->pages[$key], $sectionElement);\n \t\t\telse if ($section->pages[$key]->getField('type') == 'tags')\n \t\t\t\t$this->addCategoryList($section->pages[$key], $sectionElement);\n \t\t\telse\n \t\t\t\t$this->addPage($section->pages[$key], $sectionElement);\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "3f350b1de58a02ddc4d3b8282fb3cc25", "score": "0.78547406", "text": "public function addSection($section);", "title": "" }, { "docid": "3ccecf464b56ed0ba08a2dc0e6780a2b", "score": "0.68467534", "text": "public function addSection(FW_Html_Section $section){\n\t\t$this->sections->add($section);\n\t}", "title": "" }, { "docid": "9e361c0abbe5b227aaa89ee57e190700", "score": "0.68457544", "text": "public function add(Section $section)\n {\n $this->sections[$section->getKey()] = $section;\n }", "title": "" }, { "docid": "ee041d2a34d51a7e629f24bcbeb36af2", "score": "0.66921675", "text": "public function addSection($sectionId);", "title": "" }, { "docid": "c5b40109ede6c55a21de15f0ed5a1250", "score": "0.6555348", "text": "function add_section($section)\n\t{\n\t\t$heading = new ldap_entry_viewer_section();\n\n\t\t$heading->text = isset($section[\"section_name\"]) ? $section[\"section_name\"] : \"\";\n\t\t$heading->colspan = isset($section[\"colspan\"]) ? $section[\"colspan\"] : 1;\n\t\t$heading->new_row = $section[\"new_row\"];\n\t\t$heading->width = isset($section[\"width\"]) ? $section[\"width\"] : null;\n\t\t$heading->viewer = $this;\n\n\t\t$this->section[$heading->text] = $heading;\n\n\t\tforeach($section[\"attributes\"] as $attribute)\n\t\t\t$this->section[$heading->text]->add_data($attribute);\n\t}", "title": "" }, { "docid": "d1b3985fbed0843cfab3309d6a865a10", "score": "0.64504606", "text": "public function append($section, $str) {\n\t\t\treturn \\uri\\actions::modify($this->object, 'append', $section, $str);\n\t\t}", "title": "" }, { "docid": "a4ab0e2f941ae16cd636124f891161d2", "score": "0.62090665", "text": "public function addSection( $section )\n {\n return $this->sections()->create([\n 'name' => $section['name'],\n ]);\n }", "title": "" }, { "docid": "8703d0b6f1e246087e1438e6949e7fbd", "score": "0.62085444", "text": "function &addSection() {\t \r\n\t $section = new Section($this);\r\n\t\r\n\t\tif (count($this->sections) == 0) {\t\t \r\n\t\t \t$section->first = true;\r\n\t\t}\r\n\t\r\n\t $this->sections[] = &$section;\t\t\r\n\t\t\t \r\n\t return $section;\r\n\t}", "title": "" }, { "docid": "d97217ba707abcc7480e2b9f4ed58d92", "score": "0.61879313", "text": "public function append($section, $str) {\n\t\t\tif (\\uri\\actions::modify($this->object, 'append', $section, $str) === FALSE) {\n\t\t\t\t$this->error_count++;\n\t\t\t}\n\t\t\treturn $this;\n\t\t}", "title": "" }, { "docid": "59a9da0b7c337954c0686396db12b1c7", "score": "0.60403734", "text": "public function startSection(string $section, string $content = '')\n {\n if ($content === '') {\n if (ob_start()) {\n $this->sectionStack[] = $section;\n }\n } else {\n $this->extendSection($section, $content);\n }\n }", "title": "" }, { "docid": "bd6956c7dd5f63a64d38972116aa363c", "score": "0.60359377", "text": "function appendContent($section, $content) {\n $this->loadContent();\n if(!isset($this->content[$section]))\n $this->content[$section] = @$this->saved_content[$section];\n\n $this->content[$section] .= $content;\n }", "title": "" }, { "docid": "1dc795fde6b3005f8f6ff60d4757f13a", "score": "0.6029881", "text": "public function addSection(GroupSection $section)\n {\n //If section is empty or not set, meaning schedule is empty, do this.\n if(!$this->sections)\n {\n array_push($this->sections, $section);\n return TRUE;\n }\n\n foreach($this->sections as $current)\n {\n if($section->overlaps($current)) //If the section overlaps one of the current sections, return false.\n return FALSE;\n }\n\n array_push($this->sections, $section);\n\n return TRUE;\n }", "title": "" }, { "docid": "a3fc6e8b51ed7012d3d164f546cfb0c3", "score": "0.5867165", "text": "public function startSection ( $section, $content = '' )\n {\n if ( $content === '' ) {\n if ( ob_start () ) {\n $this->sectionStack[ ] = $section;\n }\n } else {\n $this->extendSection ( $section, $content );\n }\n }", "title": "" }, { "docid": "d2aa69ccd6b9a5277946317334a5ea6f", "score": "0.584942", "text": "public function add_sections()\n {\n }", "title": "" }, { "docid": "bc01502528324caf009449dbe4f1a6a8", "score": "0.5834807", "text": "protected function extendSection ( $section, $content )\n {\n if ( isset( $this->sections[ $section ] ) ) {\n $content = str_replace ( '@parent', $content, $this->sections[ $section ] );\n }\n\n $this->sections[ $section ] = $content;\n }", "title": "" }, { "docid": "a0421fbfc4a96c6d0e51ab33593f2d17", "score": "0.5817215", "text": "public function addSection()\n\t{\n\t\t// Create the setting section with the WordPress Settings Api\n\t\tadd_settings_section(\n\t\t\t$this->section_id,\n\t\t\t$this->section_options['title'],\n\t\t\tarray($this->section_callback, 'callback'),\n\t\t\t$this->section_options['parent_id']\n\t\t);\n\t}", "title": "" }, { "docid": "9028cc86e5c635f3b4ab773664c88129", "score": "0.58143556", "text": "public function add_section( $section ) {\n $this->settings_sections[] = $section;\n\n return $this;\n }", "title": "" }, { "docid": "7fc68704a218ff8524172eb6794e48d1", "score": "0.5758446", "text": "public function appendSection ()\n {\n $last = array_pop ( $this->sectionStack );\n\n if ( isset( $this->sections[ $last ] ) ) {\n $this->sections[ $last ] .= ob_get_clean ();\n } else {\n $this->sections[ $last ] = ob_get_clean ();\n }\n\n return $last;\n }", "title": "" }, { "docid": "454a735b3ecb29a151c3410d9abe1c7c", "score": "0.5723364", "text": "protected function extendSection(string $section, string $content)\n {\n if (isset($this->sections[$section])) {\n $content = str_replace('@parent', $content, $this->sections[$section]);\n }\n\n $this->sections[$section] = $content;\n }", "title": "" }, { "docid": "a4b4719123bae4c79287410acac33042", "score": "0.5707262", "text": "public function section($section): Card\n {\n $sections = Arr::wrap($section);\n\n $this->guardOnlyInstancesOf(Section::class, $sections);\n\n $this->payload['sections'] = array_merge($this->payload['sections'] ?? [], $sections);\n\n return $this;\n }", "title": "" }, { "docid": "ed6deb49cfc5aa8aa6c0ef1bbb042efd", "score": "0.5689493", "text": "function AddSection($str_Section, $str,$file){\n\t\t$file = preg_replace(\"/(?<=Begin \".$str_Section.\" section)(.*)(?=\\/\\* End \".$str_Section.\" section)/s\",\"$1$2\".$str.\"$3\",$file);\n\t\treturn $file;\n\t}", "title": "" }, { "docid": "7893e8739b392ae1b4bc552a53115c4a", "score": "0.56523615", "text": "public function appendSection(): string\n {\n if (empty($this->sectionStack)) {\n throw new InvalidArgumentException('Cannot end a section without first starting one.');\n }\n\n $last = array_pop($this->sectionStack);\n\n if (isset($this->sections[$last])) {\n $this->sections[$last] .= ob_get_clean();\n } else {\n $this->sections[$last] = ob_get_clean();\n }\n\n return $last;\n }", "title": "" }, { "docid": "7cb4461152d27c99df7947a6b6fdffbf", "score": "0.5565104", "text": "public function addSection($type, $content)\n {\n $this->sectionContent[$type] = $content;\n }", "title": "" }, { "docid": "bf2efbe5d4cc91456b562fa603a0431d", "score": "0.5537037", "text": "public function section($section)\n\t{\n\t\tif ($this->present_rendering_section) {\n\t\t\tthrow new \\Exception(\"A Section is already in rendering progress. Section can not be nested.\");\n\t\t}\n\n\t\t$this->present_rendering_section = $section;\n\t\tob_start();\n\t}", "title": "" }, { "docid": "779855472b27c3cbc2493020931269cd", "score": "0.5535849", "text": "public function add_section( $sections = array() ) {\n\n\t\t$sections[ $this->id ] = $this->label;\n\n\t\treturn $sections;\n\t}", "title": "" }, { "docid": "8f28d05acd38302bf03b37963b32d198", "score": "0.5530464", "text": "public function addPart(string $location, string $content, ?int $seek = null): void;", "title": "" }, { "docid": "305b50a1cdcd839198a4ad4fdc3adeef", "score": "0.5525208", "text": "function addm($section = 'main', $data = array()) {\n if (is_array($section)) {\n $section = 'main';\n $data = $section;\n }\n foreach ($data as $row) {\n $this->add(array_merge(array('section' => $section), $row));\n }\n }", "title": "" }, { "docid": "855dde3d37b2703e33f5fdadcc6191d8", "score": "0.55240226", "text": "protected function appendSection(&$contents, $name, $indent = 0, $lines = 2, $prefix = '+ ')\n {\n $contents .= $this->line($lines);\n $contents .= $this->tab($indent);\n $contents .= $prefix.$name;\n }", "title": "" }, { "docid": "f83afb134dcc621068b7ee0f77d59e9f", "score": "0.5519529", "text": "public function add_section( $section ) {\r\n\t\tif( ! is_a( $section, 'WPcpt_Config_Section' ) ) {\r\n\t\t\tthrow new Exception( 'Invalid Section' );\r\n\t\t}\n\t\t\n\t\t$this->sections[$this->cpt_slug . '_' . $section->get_id()] = $section;\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "7ba9ad5fceb942134cb267dc367764e3", "score": "0.5442127", "text": "public function inject ( $section, $content )\n {\n return $this->startSection ( $section, $content );\n }", "title": "" }, { "docid": "e8fcb5af07cbddab81a2e57aa5b170cb", "score": "0.54287046", "text": "public function addSegment($segment) {\n\t\t\tarray_push($this->push_segment, $segment);\n\t\t}", "title": "" }, { "docid": "0e436e4937158b75e8656b42f4294057", "score": "0.54011077", "text": "public function setSection(string $section) : void\n {\n $this->section = $section;\n }", "title": "" }, { "docid": "88986739bcb59e2d6182de4b49f3b525", "score": "0.54003245", "text": "function addField($field, $section_name=null) {\n\n\t\tif (isset($section_name)) { \n\t\t\t$section_id = $section_name.'_'.$this->id;\n\t\t} else {\n\t\t\t$section_id = 'section_'.$this->id;\n\t\t}\n\n\t\tif (isset($this->sections_ar[$section_name])) {\n\t\t\t$this->sections_ar[$section_name]->addField($field);\n\t\t} else {\n\t\t\t$this->sections_ar[$section_name] = new section($section_name, $section_id, $this->id);\n\t\t\t$this->sections_ar[$section_name]->addField($field);\n\t\t}\n\t}", "title": "" }, { "docid": "2ef32246e7fd3fd4c442b4a2086be0aa", "score": "0.5384017", "text": "public function register_section_type($section)\n {\n }", "title": "" }, { "docid": "de315d5f5d19702280e045fdf8ced979", "score": "0.5366618", "text": "public function add($chunk, FileInfo $fileInfo = null, $index = 0, $mapLines = null);", "title": "" }, { "docid": "4c3b4b465d15a72ed3f4f3018f111d35", "score": "0.5364487", "text": "public function prepend($section, $str) {\n\t\t\treturn \\uri\\actions::modify($this->object, 'prepend', $section, $str);\n\t\t}", "title": "" }, { "docid": "2e9ff9d89032d512351ace9830b40e60", "score": "0.53528976", "text": "public function setSection($section)\n {\n $this->sections = $section;\n }", "title": "" }, { "docid": "221b26f522827aff0cb43f1d90efe621", "score": "0.53369576", "text": "public function add_new_section()\n {\n $input = array($this->input->post());\n $this->admin_model->addSection($input);\n\n redirect('admin/addSection');\n }", "title": "" }, { "docid": "5b23232293dd922f49b28b01e26782b8", "score": "0.53234595", "text": "public function sectionBegin() {}", "title": "" }, { "docid": "5b23232293dd922f49b28b01e26782b8", "score": "0.53234595", "text": "public function sectionBegin() {}", "title": "" }, { "docid": "38b6cab419bebca6e9fb6600f642bd54", "score": "0.5296682", "text": "protected function addSection($section, array $columns)\n {\n foreach($columns as $column)\n $this->addColumnInSection(\n $section,\n !empty($column['text']) ? $column['text'] : '',\n !empty($column['attr']) ? $column['attr'] : []\n );\n return $this;\n }", "title": "" }, { "docid": "9456859d67236cfc6591cd12155e0f37", "score": "0.5271695", "text": "public function inject(string $section, string $content)\n {\n return $this->startSection($section, $content);\n }", "title": "" }, { "docid": "1c0fb65a1662e7986f3976aa10b7116b", "score": "0.5236956", "text": "function add_to_composer_autoload($section, $value, $key = null)\n {\n // File path to composer file\n $composerFilePath = base_path('composer.json');\n\n // Load and JSON decode composer file\n $composerFile = json_decode(file_get_contents($composerFilePath));\n\n // Make sure value doesn't already exists\n if ((!is_null($key) && array_key_exists($key, $composerFile->autoload->{$section})) ||\n in_array($value, $composerFile->autoload->{$section})) {\n return;\n }\n\n // Add to composer's {section}\n if (!is_null($key)) {\n $composerFile->autoload->{$section}[$key] = $value;\n } else {\n $composerFile->autoload->{$section}[] = $value;\n }\n\n // Save changes to composer file\n file_put_contents($composerFilePath, json_encode($composerFile, JSON_PRETTY_PRINT));\n }", "title": "" }, { "docid": "ba73c01122b49a5fb191dab8c4381b2c", "score": "0.5219383", "text": "protected function addAttrToSection($section, array $attr)\n {\n $this->{\"{$section}RowAttr\"} = $attr;\n return $this;\n }", "title": "" }, { "docid": "b6f45398e72357ff1a82f6de66819f97", "score": "0.521599", "text": "private function AddSection($section_id, $section_name, $callback) {\n $section_id = $this->text_domain.'-'.$section_id;\n $ref = $this;\n\n add_settings_section(\n $section_id, \n $section_name,\n function() use($ref, $section_id, $callback) {\n call_user_func(array($ref, $callback), $section_id);\n },\n $this->menu_slug\n );\n }", "title": "" }, { "docid": "0458e5216df5e74215b3218e4caf5dab", "score": "0.5194771", "text": "public static function add_sections( $args )\n {\n $args = array_merge(self::$sections,$args);\n self::$sections = $args;\n }", "title": "" }, { "docid": "1604c9585d96bc105c3a5daf77b9eb61", "score": "0.5194434", "text": "public function add(string $content): void\n {\n $this->buffer .= $content;\n }", "title": "" }, { "docid": "81e3f568d87b44170c1264de45a70915", "score": "0.51495224", "text": "public function prepend($section, $str) {\n\t\t\tif (\\uri\\actions::modify($this->object, 'prepend', $section, $str) === FALSE) {\n\t\t\t\t$this->error_count++;\n\t\t\t}\n\t\t\treturn $this;\n\t\t}", "title": "" }, { "docid": "c82da7a663840917e6052915ff850df3", "score": "0.5124497", "text": "protected function logSection($section, $message, $size = null)\n {\n if (!$this->dispatcher)\n {\n return;\n }\n\n $message = $this->formatter ? $this->formatter->formatSection($section, $message, $size) : $section.' '.$message.\"\\n\";\n\n $this->dispatcher->notify(new sfEvent($this, 'command.log', array($message)));\n }", "title": "" }, { "docid": "269fe106dc162a3f66f7767a9cdf6a15", "score": "0.5121925", "text": "function AddListSectionByName($str_Section, $str_Name, $str_Add, $str,$file){\n\t\t$file = preg_replace(\"/(Begin \".$str_Section.\" section.*\\/\\* \".$str_Name.\" \\*\\/ = \\{[^\\{]*\".$str_Add.\" \\= \\()(.*)(\\t\\t\\t\\);[^\\{]*End \".$str_Section.\" section)/sm\",\"$1\\n\".$str.\"$2$3\",$file);\n\t\treturn $file;\n\t}", "title": "" }, { "docid": "79a3d8b23b128a4125cc6f3a71b974a6", "score": "0.51203436", "text": "function setContent($section, $content) {\n if(!is_array($this->content)) $this->content = array();\n $this->content[$section] = $content;\n }", "title": "" }, { "docid": "d3722ca2c36cdce2e68e82b7f89a1edc", "score": "0.5093887", "text": "public function addSection()\n {\n $categories = $this->problem_model->get_category();\n $data['cat'] =$categories;\n\n $this->load->view('addSection', $data);\n }", "title": "" }, { "docid": "dc25008381a8504e01d08678e68f88ae", "score": "0.50700754", "text": "static function appendSegment($file) {\n self::$segbuf .= self::SEGMENT_TERMINATOR;\n //self::trimSeparators(self::$segbuf);\n if (file_put_contents($file, self::$segbuf, FILE_APPEND) === FALSE) {\n $errmsg = \"File $file: Error writing segment \" . self::$segbuf\n . \".\\n\";\n fwrite(STDERR, $errmsg);\n exit(1);\n }\n }", "title": "" }, { "docid": "4701decf6fc284f55ddc42da03f0b6ad", "score": "0.5059308", "text": "public static function addSegment($segment)\n {\n if (trim($segment) != '') {\n self::$segments[] = $segment;\n\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "c2a6b86277bb5f7a87b23673280a009d", "score": "0.50503844", "text": "public function addInstructionsSection($name = '') {\n $index = count($this->instructions);\n if ($index > 0\n && empty($this->instructions[$index - 1]['name'])\n && !count($this->instructions[$index - 1]['list'])\n ) {\n $index--;\n }\n $name = trim($name);\n $this->instructions[$index] = array('name' => $name, 'list' => array());\n }", "title": "" }, { "docid": "ff1e0a0ca62c2ea0db8f24fc8c4b5683", "score": "0.5041143", "text": "public function wooga_add_section( $sections ) {\n\n\t\t\t$sections['wooga'] = __( 'Gift Aid', 'wooga' );\n\t\t\treturn $sections;\n\n\t\t}", "title": "" }, { "docid": "15847461a6be33c3593527d627e73d9a", "score": "0.5026881", "text": "protected function addColumnInSection($section, $text, array $attr = [])\n {\n $this->{\"{$section}Columns\"}[] = [\n 'attr' => $attr,\n 'text' => $text,\n ];\n return $this;\n }", "title": "" }, { "docid": "a8f75f6f6cec01acaa4c457536974b72", "score": "0.5026222", "text": "public function addKey($key, $secret, $semester, $section) {\n\t\t$this->keys[$key] = ['secret'=>$secret, 'semester'=>$semester, 'section'=>$section];\n\t}", "title": "" }, { "docid": "f9b76a3aed462dab286b10c365a93108", "score": "0.50211316", "text": "public function saveNewSection(TrCourseSection $section){\n\n $repository = $this->entityManager->getRepository('AppBundle:TrCourseSection');\n\n //busca todas las secciones del curso\n $sections = $repository->findBy([\n 'courseId' => $section->getCourseId()\n ]);\n\n $numSections = count($sections);\n\n $sectionNumber = $numSections + 1;\n\n $this->logger->debug('Section number: ' . $sectionNumber );\n\n $section->setSectionnumber($sectionNumber);\n $section->setNumberclasses(0);\n\n //save the information\n $this->entityManager->persist($section);\n $this->entityManager->flush();\n $this->entityManager->clear();\n\n return $response = array(\n \"code\" => 0,\n \"message\" => \"Se agrego la unidad de manera exitosa\"\n );\n\n\n }", "title": "" }, { "docid": "05bebc83e01c3b0689db3f82690f8c45", "score": "0.50133497", "text": "private function parseSection(){\n\n $pattern = '/@section\\([\\'\\\"](.*?)[\\'\\\"]\\)(.*?)@endsection/s';\n $this->view = preg_replace_callback($pattern, function($params){\n $this->sections[$params[1]] = $params[2];\n return '';\n }, $this->view);\n\n }", "title": "" }, { "docid": "583a3e6fc7ff86cdecb9ab2f25c9d7dd", "score": "0.49911493", "text": "public function addHeader($header) {}", "title": "" }, { "docid": "dc61b03e4e767dfe2e5d8c1017ebba65", "score": "0.4941776", "text": "public function AddSection(Request $request)\n {\n $section = new Sections();\n\n $form = $this->createForm(AddSection::class, $section);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n\n $em->persist($section);\n $em->flush();\n\n return $this->redirectToRoute('home');\n }\n\n return $this->render('admin/addSection.html.twig', ['form'=>$form->createView()]);\n }", "title": "" }, { "docid": "aa64fe12352c4421535dfb9587bafbac", "score": "0.49106836", "text": "public function putSection($id, $section, $if_match = null)\n {\n list($response, $statusCode, $httpHeader) = $this->putSectionWithHttpInfo ($id, $section, $if_match);\n return $response; \n }", "title": "" }, { "docid": "3669d403dbb77fed867166c5e8e41227", "score": "0.49018466", "text": "public function section();", "title": "" }, { "docid": "025fb2a2bf51058765374f0f119a6749", "score": "0.4901022", "text": "private function _flush_section() {\r\n\t\t$this->_flush_field();\r\n\t\t$cache =& $this->getCache();\r\n\t\tif ( $cache['section'] ) {\r\n\t\t\tif ( ! isset( $cache['page']['sections'] ) ) {\r\n\t\t\t\t$cache['page']['sections'] = [];\r\n\t\t\t}\r\n\t\t\t$cache['page']['sections'][] = $cache['section'];\r\n\t\t}\r\n\t\t$cache['section'] = [];\r\n\t}", "title": "" }, { "docid": "59ad1f109e22af31fb930ee06e8ab250", "score": "0.48883498", "text": "function AddSection($name, $lines) {\r\n // determine if we need a page break\r\n if ($this->SectionBreaksPage($lines)) {\r\n $this->AddPage();\r\n }\r\n\r\n // render each line element and the section title\r\n $this->RenderSectionTitle($name);\r\n foreach ($lines as $line) {\r\n // after the first line (the section title), pad the cells\r\n if ($linenr++ > 0) { $this->Cell($this->sectionTitleWidth); }\r\n\r\n if ($line[\"lyrics\"] == NULL) {\r\n $this->RenderChordOnlyLine($line[\"chords\"]);\r\n } elseif ($line[\"chords\"] == NULL) {\r\n $this->RenderLyricsOnlyLine($line);\r\n } else {\r\n $this->RenderChordLine($line);\r\n }\r\n\r\n $this->Ln(7); // a little padding between lines\r\n }\r\n }", "title": "" }, { "docid": "5ef9b7e12e45c1b9853ea536b0224013", "score": "0.48865592", "text": "public function appendSegment(\\Segment $value)\n {\n return $this->append(self::SEGMENT, $value);\n }", "title": "" }, { "docid": "e666a60804315a537d9ddf0023ae61c8", "score": "0.4876909", "text": "public function setSection(string $section): self\n {\n $this->section = $section;\n\n return $this;\n }", "title": "" }, { "docid": "3917cf003e295d61b59b7cd024a2f89e", "score": "0.4873667", "text": "public function add_section()\n\t{\n\t\tif ($this->input->is_ajax_request())\n\t\t{\n\t\t\t$this->load->frlibrary('blocks');\n\t\t\t$block_name = $this->input->post('block');\n\t\t\t$theme = $this->input->post('theme');\n\t\t\t$template = $this->input->post('template');\n\n\t\t\t$block = $this->settings->get_block($block_name, $theme, $template);\n\t\t\tif (!is_array($block))\n\t\t\t{\n\t\t\t\t$block = array();\n\t\t\t\t$pos = 0;\n\t\t\t} else {\n\t\t\t\t$pos = count($block);\n\t\t\t}\n\n\t\t\t$response = '';\n\t\t\tswitch ($this->input->post('section_type'))\n\t\t\t{\n\t\t\t\tcase 'html':\n\t\t\t\t\t$html = $this->input->post('html');\n\t\t\t\t\tif (strlen($html))\n\t\t\t\t\t{\n\t\t\t\t\t\t$block[$pos] = array(\n\t\t\t\t\t\t\t'type'\t=> 'html',\n\t\t\t\t\t\t\t'data'\t=> $html,\n\t\t\t\t\t\t\t'block'\t=> $block_name\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$response = $this->blocks->get_section_preview($block[$pos], $pos);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'code':\n\t\t\t\t\t$code = $this->input->post('code');\n\t\t\t\t\tif (strlen($code))\n\t\t\t\t\t{\n\t\t\t\t\t\t$block[$pos] = array(\n\t\t\t\t\t\t\t'type'\t=> 'code',\n\t\t\t\t\t\t\t'data'\t=> $code,\n\t\t\t\t\t\t\t'block'\t=> $block_name\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$response = $this->blocks->get_section_preview($block[$pos], $pos);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$done = $this->settings->set_block($block_name, $block, $theme, $template);\n\t\t\t$this->settings->clear_cache();\n\t\t\tif ($done) echo $response;\n\t\t\treturn;\n\t\t}\n\t}", "title": "" }, { "docid": "0b4a315c38fde5ccfb2920f54a6cc552", "score": "0.48556355", "text": "function addSharedConfigData($key, $value, $access, $section = \"Config\")\n {\n $query = \"insert into $section values('$key', '$value', $access)\";\n $result = $this->configDB->query($query);\n $result->freeResult();\n }", "title": "" }, { "docid": "f9ead44e427fc53cdfe3f01dc7705feb", "score": "0.4849715", "text": "public function section($Str_SectionName=false)\n\t{\n\t\t//If opening a section start a new buffer.\n\t\tif ($Str_SectionName)\n\t\t{\n\t\t\t//Set the section name.\n\t\t\tif ($this->Str_BuildSection)\n\t\t\t{\n\t\t\t\tglobal $CMD;\n\t\t\t\t$CMD->handle_exception('Section is already being built' ,'MW:101');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//need to check that there is not already a section already on the cmd\n\t\t\t\t$this->Str_BuildSection = $Str_SectionName;\n\n\t\t\t\t//Decouple build stack.\n\t\t\t\t$Arr_NewBuildStack = $this->Arr_BuildStack;\n\n\t\t\t\t//Capture the output of current buffer and add to stack.\n\t\t\t\t$Arr_NewBuildStack[] = ob_get_contents();\n\t\t\t\tob_end_clean();\n\n\t\t\t\t//Recouple build stack.\n\t\t\t\t$this->Arr_BuildStack = $Arr_NewBuildStack;\n\n\t\t\t\tob_start();\n\t\t\t}\n\t\t}\n\t\t//Otherwise close the section and save the stack block.\n\t\telse\n\t\t{\n\t\t\tglobal $CMD;\n\n\t\t\t//Set the section name.\n\t\t\tif (!$this->Str_BuildSection)\n\t\t\t{\n\t\t\t\t$CMD->handle_exception('No section is currently being built on close' ,'MW:101');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//Decouple build stack.\n\t\t\t\t$Arr_NewBuildStack = $this->Arr_BuildStack;\n\n\t\t\t\t//Set section to command object.\n\t\t\t\t$Arr_NewBuildStack[] = $CMD->section($this->Str_BuildSection, ob_get_contents());\n\t\t\t\tob_end_clean();\n\n\t\t\t\t//Recouple build stack.\n\t\t\t\t$this->Arr_BuildStack = $Arr_NewBuildStack;\n\n\t\t\t\t//Clear the section name.\n\t\t\t\t$this->Str_BuildSection = false;\n\n\t\t\t\tob_start();\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "127218a6dcf855ac8675e1b5ec6d4396", "score": "0.48427343", "text": "public function insert_section($data){\n if ($this->db->insert('section', $data)){\n return array(\"success\" => true, \"id\" => $this->db->insert_id());\n } else {\n return array(\"success\" => false, \"message\" => \"Failed to insert in db\");\n }\n }", "title": "" }, { "docid": "99fbf21dd893197796488c2144f2fcd2", "score": "0.4838356", "text": "protected function register_advanced_section() {}", "title": "" }, { "docid": "eac263a8b3ad2db04e365cadc9951e47", "score": "0.48375654", "text": "public function add($name, $content, $alternateViews = array()) {\n $this->sections[] = compact('name', 'content', 'alternateViews');\n }", "title": "" }, { "docid": "d3b1a3ed8203e34a8777e867b0f1b8e0", "score": "0.48361617", "text": "public function addTab(Event $event)\n {\n $sectionNav = $event->getParam('section_nav');\n $sectionNav['teams'] = 'Teams'; // @translate\n $event->setParam('section_nav', $sectionNav);\n }", "title": "" }, { "docid": "5ecc75776a95c1ee73238509651444c7", "score": "0.4835249", "text": "public function addHeader ($header) {\n\t\t$this->headers[] = $header;\n\t}", "title": "" }, { "docid": "8639de5cb15ff2e06111c8a67f9771a4", "score": "0.4834678", "text": "public function setSection($section)\n {\n $this->section = $section;\n return $this;\n }", "title": "" }, { "docid": "0eab0348be04c46cc94f2afaec7f1ae3", "score": "0.4828122", "text": "public function addLockInformation();", "title": "" }, { "docid": "3bba3a121fee5b6469c7b0ad3baa148b", "score": "0.48138297", "text": "public function addAt($key, $value);", "title": "" }, { "docid": "9dbd5f2433889499d8a940de954c9705", "score": "0.47707814", "text": "public static function add_course_section($courseid, $minsection = null, $add = true) {\n global $DB, $CFG;\n require_once($CFG->dirroot .'/course/lib.php'); // For course_create_sections_if_missing().\n\n // Extra condition if the oucontent module (which has similar but simpler,\n // behaviour) is installed, so they don't tread on each others' toes.\n $oucontentjoin = '';\n $oucontentwhere = '';\n if (file_exists($CFG->dirroot . '/mod/oucontent')) {\n $oucontentjoin = \"LEFT JOIN {oucontent} o ON o.course = cs.course AND o.coursesectionid = cs2.id\";\n $oucontentwhere = \"AND o.id IS NULL\";\n }\n\n // Pick a section number. This query finds the first section,\n // on the course that is at least the minimum number, and does not have,\n // a used section in the following number, and returns that following,\n // section number. (This means it can fill up gaps if sections are deleted.)\n $sql = \"\n SELECT cs.section+1 AS num\n FROM {course_sections} cs\n LEFT JOIN {course_sections} cs2 ON cs2.course = cs.course AND cs2.section = cs.section+1\n LEFT JOIN {subpage_sections} ss2 ON ss2.sectionid = cs2.id\n $oucontentjoin\n WHERE cs.course = ?\n AND cs.section >= ?\n AND ss2.id IS NULL\n $oucontentwhere\n ORDER BY cs.section\";\n if (is_null($minsection)) {\n $minsection = self::get_min_section_number($courseid);\n }\n $result = $DB->get_records_sql($sql, array($courseid, $minsection), 0, 1);\n if (count($result) == 0) {\n // If no existing sections, use the min number.\n $sectionnum = $minsection;\n } else {\n $sectionnum = reset($result)->num;\n }\n\n // Create a section entry with this section number then get it.\n if ($add) {\n course_create_sections_if_missing($courseid, $sectionnum);\n }\n return $sectionnum;\n }", "title": "" }, { "docid": "be609ec9338418b6f9c417e424826d79", "score": "0.47683465", "text": "public static function set(&$config_data, $section, $key, $value) {\n $config_data[$section][$key] = $value;\n }", "title": "" }, { "docid": "b7ca30bc127c37194e2d57ec2f6b6b87", "score": "0.47452024", "text": "public function add_sections( $sections ) {\n\t\t$page = $this->page;\n\t\tforeach ( $sections as $section ) {\n\t\t\t$register = $section['id'];\n\t\t\tif ( class_exists( 'SixTenPress' ) ) {\n\t\t\t\t$register = $this->page . '_' . $section['id'];\n\t\t\t\t$page = $this->page . '_' . $section['tab'];\n\t\t\t}\n\t\t\tadd_settings_section(\n\t\t\t\t$register,\n\t\t\t\t$section['title'],\n\t\t\t\tarray( $this, $section['id'] . '_section_description' ),\n\t\t\t\t$page\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "4503473bfa8bc0d33c4c1f8b1663097a", "score": "0.47166187", "text": "function setSection($section){\n\t\t$this->section=$section;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "428e15f7fc4fd068bc93fcaeddfae633", "score": "0.4712234", "text": "public function append($name, $content);", "title": "" }, { "docid": "3b00fad5dfd37a94267649bcd3a0fb2a", "score": "0.47094738", "text": "public function postSections($section)\n {\n list($response, $statusCode, $httpHeader) = $this->postSectionsWithHttpInfo ($section);\n return $response; \n }", "title": "" }, { "docid": "3a5d860a2e9f69ec005b36a556e83490", "score": "0.47063053", "text": "public function addHeader($header)\n {\n $this->_headers[] = $header;\n }", "title": "" }, { "docid": "237826062e10df7510c2f18bcf697216", "score": "0.4705372", "text": "public function formatSection($section, $text)\n {\n $section = $style = array_key_exists($section, $this->styles) ? $section : 'INFO';\n $section = \" $section \".str_repeat(' ', max(0, 5 - strlen($section)));\n $style .= '_SECTION';\n\n return sprintf(\" %s %s\\n\", $this->format($section, $style), $text);\n }", "title": "" }, { "docid": "5a3f1a15f3ac12678a5849e0776f24ad", "score": "0.47022974", "text": "protected function _addTableOfContentsPage($section)\n {\n $section->addText(self::HL_TOC, self::FS_TOC_TITLE, self::PS_TOC_TITLE);\n $section->addTOC();\n }", "title": "" }, { "docid": "00b07c2c053426a36150541ff52302d0", "score": "0.47013894", "text": "public function appendPart( ezcMailRfc822Digest $part )\n {\n $this->parts[] = $part;\n }", "title": "" }, { "docid": "e459356e73ea3748c8de75983ec7ddae", "score": "0.4674999", "text": "public function add_sections() {\n\t\tif ( ! empty( Kirki::$sections ) ) {\n\t\t\tforeach ( Kirki::$sections as $section_args ) {\n\t\t\t\t// Extra checks for nested sections.\n\t\t\t\tif ( isset( $section_args['section'] ) ) {\n\t\t\t\t\tif ( isset( Kirki::$sections[ $section_args['section'] ] ) ) {\n\t\t\t\t\t\t// Set the type to nested.\n\t\t\t\t\t\t$section_args['type'] = 'kirki-nested';\n\t\t\t\t\t\t// We need to check if the parent section is nested inside a panel.\n\t\t\t\t\t\t$parent_section = Kirki::$sections[ $section_args['section'] ];\n\t\t\t\t\t\tif ( isset( $parent_section['panel'] ) ) {\n\t\t\t\t\t\t\t$section_args['panel'] = $parent_section['panel'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tnew Kirki_Section( $section_args );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "474812d9592b8176cdfd4f89b2d4769a", "score": "0.46691185", "text": "public function do_section() {\n\t\tdo_action( 'hestia_do_contact_section', false );\n\t}", "title": "" }, { "docid": "20de2ad9933b8c35f031536f73cc3eaf", "score": "0.46679386", "text": "public function addAction( Request $request )\n {\n $em = $this->getDoctrine()->getEntityManager();\n $section = $em->getRepository( 'CiscoSystemsAuditBundle:Section' )\n ->find( $request->get( 'section_id' ));\n if ( NULL !== $section )\n {\n $field = $em->getRepository( 'CiscoSystemsAuditBundle:Field' )\n ->find( $request->get( 'field_id' ));\n if ( NULL !== $field )\n {\n $section->addField( $field );\n $em->persist( $section );\n $em->flush();\n if ( $request->isXmlHttpRequest() )\n {\n return $this->render( 'CiscoSystemsAuditBundle:Field:_load.html.twig', array(\n 'field' => $field,\n 'section' => $section,\n 'counter' => count( $section->getFields( FALSE ) ),\n ));\n }\n else\n {\n return $this->redirect( $this->generateUrl( 'audit_section_edit', array (\n 'section_id' => $section->getId() )\n ));\n }\n }\n throw $this->createNotFoundException( 'Field does not exist' );\n }\n throw $this->createNotFoundException( 'Section does not exist' );\n }", "title": "" }, { "docid": "8fd07b7d223196965c61797716e29fb9", "score": "0.46668923", "text": "public function append($key, $value) {}", "title": "" }, { "docid": "121dee94ae7133e3f412b619e28faa62", "score": "0.46605462", "text": "public function add_section($name= '', $summary = '') {\n global $DB, $CFG;\n\n $transaction = $DB->start_delegated_transaction();\n\n $sectionnum = self::add_course_section($this->get_course()->id);\n $section = $DB->get_record('course_sections', array(\n 'course' => $this->course->id, 'section' => $sectionnum), 'id', MUST_EXIST);\n // Now update summary/name if set above.\n if (!empty($name) or !empty($summary)) {\n $section->name = format_string($name);\n $section->summary = format_text($summary);\n $DB->update_record('course_sections', $section);\n }\n\n $sql = \"SELECT MAX(pageorder) FROM {subpage_sections} WHERE subpageid = ?\";\n // Get highest pageorder and add 1.\n $pageorder = $DB->get_field_sql($sql, array($this->subpage->id)) + 1;\n\n $subpagesection = new stdClass();\n $subpagesection->subpageid = $this->subpage->id;\n $subpagesection->sectionid = $section->id;\n $subpagesection->pageorder = $pageorder;\n $subpagesection->stealth = 0;\n\n $ss = $DB->insert_record('subpage_sections', $subpagesection);\n\n $transaction->allow_commit();\n\n return array('subpagesectionid' => $ss, 'sectionid' => $section->id);\n }", "title": "" }, { "docid": "801466c50b029773e5e2760bd0f971cc", "score": "0.4658617", "text": "public function sectionEnd() {}", "title": "" }, { "docid": "801466c50b029773e5e2760bd0f971cc", "score": "0.4658617", "text": "public function sectionEnd() {}", "title": "" }, { "docid": "d5a40a3d2d8d6c013abc9352dfaf366b", "score": "0.46484706", "text": "private function addSection() {\n // courseid, secNo, daysMet, startTime, endTime, totalReleasedSeats, building, room\n\n $courseID = $_POST['courseID'];\n $secNo = $_POST['secNo'];\n $daysMet = $_POST['daysMet'];\n $startTime = $_POST['startTime'];\n $endTime = $_POST['endTime'];\n $totalReleasedSeats = $_POST['totalReleasedSeats'];\n $building = $_POST['building'];\n $room = $_POST['room'];\n\n $this->openConn();\n\n $sql = \"SELECT DISTINCT term, secStartDate, secEndDate, sessionYear, sessionCode FROM Section WHERE courseID = :courseID\";\n $stmt = $this->conn->prepare($sql);\n $stmt->execute(array(':courseID'=> $courseID));\n\n while($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n $term = $row['term'];\n $secStartDate = $row['secStartDate'];\n $secEndDate = $row['secEndDate'];\n $sessionYear = $row['sessionYear'];\n $sessionCode = $row['sessionCode'];\n }\n\n $totalEnrolment = 0;\n $isOptimized = 0;\n $secType = \"LAB\";\n\n // if($row){\n //\n // }\n\n $sql2 = \"INSERT INTO Section (courseID, secNo, daysMet, startTime, endTime, totalReleasedSeats, totalEnrolment, building, room,\n term, isOptimized, secStartDate, secEndDate, sessionYear, sessionCode, secType)\n VALUES (:courseID, :secNo, :daysMet, :startTime, :endTime, :totalReleasedSeats, :totalEnrolment, :building, :room,\n :term, :isOptimized, :secStartDate, :secEndDate, :sessionYear, :sessionCode, :secType)\";\n $stmt2 = $this->conn->prepare($sql2);\n $stmt2->execute(array(':courseID'=> $courseID, ':secNo'=> $secNo, ':daysMet'=> $daysMet, ':startTime'=> $startTime, ':endTime'=> $endTime, ':totalReleasedSeats'=> $totalReleasedSeats, ':totalEnrolment'=> $totalEnrolment, ':building'=> $building, ':room'=> $room,\n ':term'=> $term, ':isOptimized'=> $isOptimized, ':secStartDate'=> $secStartDate, ':secEndDate'=> $secEndDate, ':sessionYear'=> $sessionYear, ':sessionCode'=> $sessionCode, ':secType'=> $secType));\n\n $this->closeConn();\n\n }", "title": "" }, { "docid": "3cde97e097fdb326951a41a3a5deb646", "score": "0.4644313", "text": "public function store(Request $request, Section $section)\n {\n $this->validate($request, [\n 'name' => 'required|string|max:255',\n 'timecode' => 'required|array'\n ]);\n\n $event = new Event;\n $event->section_id = $section->id;\n $event->timecode = Timecode::makeTimecode($request->get('timecode'));\n $event->name = $request->get('name');\n $event->notes = $request->get('notes');\n $event->active = true;\n $event->save();\n\n Cache::forget('kyntime-events');\n $request->session()->flash('success', 'The event was created.');\n return redirect()->route('sections.events.index', $section->id);\n }", "title": "" }, { "docid": "5f61f0c6a80e4a05956b7b85323d42bd", "score": "0.46338674", "text": "public function add($region, $renderer, $params, $optionalTemplate) {\n\n if (!isset(corelib_boot::$request['params']['noregion'])) {\n if (!is_object($renderer)) {\n $Content = $renderer;\n } else {\n $Content = $renderer->render($params, $optionalTemplate);\n }\n\n $this->region[$region] .= $Content;\n } else {\n $this->region[$region] = true;\n }\n }", "title": "" }, { "docid": "294ff5badd658750ecc68865230fc105", "score": "0.46181712", "text": "protected function addHeader(){}", "title": "" } ]
c56a18bdea8ccdcb5ca1cfc490106c3b
Outputs the data from database
[ { "docid": "75ad50df6e068dabf1612954587b43a1", "score": "0.0", "text": "public function row($sql, $params = []){\r\n\r\n\t\t\t$result = $this->query($sql, $params);\r\n\t\t\t$result = $result->fetchAll(PDO::FETCH_ASSOC);\r\n\t\t\t//$this->validationDateFromDB($result);\r\n\t\t\treturn $result;\r\n\r\n\t\t}", "title": "" } ]
[ { "docid": "3c550756cbdd32312b9a894480c5356e", "score": "0.71348053", "text": "function PrintDB()\n\t{\n\t\t$rowInfo=array();\n\t\tif ($this->Get($rowInfo)==ERR_NONE) {\n\t\t\techo \"<h3>\".$this->mTbName.\"</h3>\\n\";\n\t\t\t$this->Find($this->mTbName, 'id', $this->mId, $rowInfo);\n\t\t\tforeach ($rowInfo as $key => $value) {\n\t\t\t\techo ($key.\"=\".$value.\"<br>\\n\");\t\n\t\t\t}\n\t\t} else {\n\t\t\techo $this->GetErrorMsg();\n\t\t}\n\t}", "title": "" }, { "docid": "b3f54691d4861ee13a1c8ff8ae5c25b9", "score": "0.66989404", "text": "public function crud_data()\n\t{\n\t\t$d = Load::model(ModelCrud::class)->get_data();\n\n\t\t// show result\n\t\techo $d;\n\t}", "title": "" }, { "docid": "5f61a7dde1f078a10089f878183ad898", "score": "0.66976833", "text": "function getData() {\n\ttry {\n\t\t$conn = connect_db();\n\t\t$stmt = $conn->prepare(\"SELECT * FROM users2\");\n\t\t$stmt->execute();\n\t\tforeach ($stmt as $users) {\n\t\t\techo '<li>'.$users->id.' | '.$users->name.' | '.$users->description.' | '.$users->phone.' | '.$users->email.'</li>';\n\t\t}\n\t} catch(Exception $e) {\n\t\treturn '<br><p>'.$e->getMessage().'</p>';\n\t}\n}", "title": "" }, { "docid": "2b3470d830795a9a4a90f728aa0da586", "score": "0.6681891", "text": "function showDatabase(){\n echo \"<div class='grabberSquare' style='padding: 10px; background-color: #EEE;'><table>\";\n echo \"\";\n foreach ($this->data as $line){\n if ($line[0]==\"#ID\") $line[0]=\"ID\";\n if ($line[0][0]==\"#\"){\n echo \"<tr style='color: #CCC;'>\";\n } else {\n echo \"<tr>\";\n }\n \n foreach ($line as $item){\n if ($line[0]==\"ID\") $item=\"<span style='font-weight: bold; font-size: 150%; text-decoration: underline;'>$item</span>\";\n if (strpos($item,\"://\")!==FALSE) $item = \"<a target='_blank' style='font-size: 70%;' href='$item'>$item</a>\";\n echo \"<td>$item</td>\"; \n }\n echo \"</tr>\";\n }\n echo \"</table></div>\";\n }", "title": "" }, { "docid": "792a46ca8b8ad3faf5c3140e320f6c8e", "score": "0.6656676", "text": "private function writePageData()\n\t{\n\n\t\twhile ($row = mysql_fetch_assoc($this->resultSet))\n\t\t{\n\t\t\t// Write individual row of data\n\t\t\techo \"\\t<tr>\\n\";\n\n\t\t\t// Adjust the cursor position\n\t \tif (!isset($_GET['cursorpos']) || (int)$_GET['cursorpos'] < 0)\n\t\t\t{\n\t \t$this->cursorpos = 0;\n\t \t}\n\t \telse\n\t\t\t{\n\t $this->cursorpos = (int)$_GET['cursorpos'];\n\t \t}\n\n\t\t\t// one column for each column name in $this->columnTitles\n\t\t\tforeach ($this->columnTitles as $key => $value) {\n\t\t\t\techo \"\\t\\t<td \" . (isset($this->tdClass) ? \" class=\\\"$this->tdClass\\\" \": \"\") . \">\" .\n stripslashes($row[$key]) . \"</td>\\n\";\n\t\t\t}\n\t\t\t// Stash the primary key value for use when building the edit and delete links\n\t\t\tforeach ($this->primaryKeyFields as $key => $value) {\n\t\t\t\t$this->primaryKeyFields[$key] = $row[$key];\n\t\t\t}\n\n\n\t\t\t// Add any column links\n\t\t\t$i = 1;\n\t\t\tforeach($this->colLinks as $col) {\n\t\t\t\t$args = http_build_query($this->primaryKeyFields + array('cursorpos' => $this->cursorpos) );\n\n\t\t\t\t$tmpStr = \"\\t\\t<td \" .\n\t\t\t\t (isset($this->tdClass) ? \" class=\\\"$this->tdClass\\\" \": \"\") .\n\t \t\t\t\t \">\" .\n\t\t\t\t\t\t\t\t\t\"<a href=\\\"\" . $col['url'] . \"&\" . $args . \"\\\"\" .\n\t\t\t\t\t\t\t\t\t \"title=\\\"\" . $col['url'] . $i++ . \"\\\">\" .\n\t\t\t\t\t\t\t\t\t\t $col['linktext'] .\n\t\t\t\t\t\t\t\t\t\"</a>\" .\n\t\t\t\t\t\t\t\t\t\"</td>\\n\";\n\n\t\t\t\techo $tmpStr;\n\t\t\t}\n\n\n\t\t\t$this->writeEditLink();\n\t\t\t$this->writeDeleteLink();\n\n\t\t\techo \"\\t</tr>\\n\";\n\t\t}\n\t}", "title": "" }, { "docid": "72afc2598512bf19f455d0681bf304de", "score": "0.65820307", "text": "function display_sql($sql){\n //\n //Get theh query statement\n $statement = $this->dbase->query($sql);\n //\n //Get the number of fields in the query\n $nfields = $statement->columnCount();\n //\n echo \"<table>\"; \n //\n //Output the header\n echo \"<tr>\";\n //\n for($i=0; $i<$nfields; $i++){\n //\n $column = $statement->getColumnMeta($i);\n //\n echo \"<th>\".$column['name'].\"</th>\";\n }\n echo \"</tr>\";\n //\n //Output the body\n while($result = $statement->fetch()){\n //\n echo \"<tr>\";\n //\n for($i=0; $i<$nfields; $i++){\n echo \"<td>\".$result[$i].\"</td>\";\n }\n echo \"</tr>\";\n \n }\n echo \"</table>\"; \n }", "title": "" }, { "docid": "755e8a652f51a692410496b59bdc21ee", "score": "0.6579406", "text": "public function displayJobData(){\r\n $sql = \"SELECT * From job_data ORDER BY id DESC\";\r\n $statement = $this->db->prepare($sql);\r\n try{\r\n $statement->execute();\r\n }catch(Exception $e){\r\n $exceptionMessage = \"<p>You tried to run this sql: $sql</p><p>Exception: $e</p>\";\r\n trigger_error($exceptionMessage);\r\n }\r\n return $statement;\r\n }", "title": "" }, { "docid": "564b98f4e63e89a8d35e4031fff77a0c", "score": "0.6570546", "text": "public function dump_db()\n\t{\n\t\t$foo = $this->db->query('SELECT * FROM floofs WHERE 1;');\n\t\t//echo $foo->fetch_assoc()['Create View'];\n\t\t//var_dump($foo->fetch_assoc()['Create View']);\n\t}", "title": "" }, { "docid": "4d1cd0d8aff8821329f70e0a5a545cc4", "score": "0.6564641", "text": "public function displaydosen()\r\n {\r\n $query = \"select * from data_dosen\";\r\n return $this->db->query($query);\r\n }", "title": "" }, { "docid": "97f82bfb456b4a407e6c59c37655588e", "score": "0.6548029", "text": "public function outPut(){\n $html = '<p>' . $this->model->getData() . '</p>' .\n '</br><a href=\"index.php?uinput=This is new data\">Update</a>';\n return $html;\n }", "title": "" }, { "docid": "056a370e596956376a2bb97dfcf97ab4", "score": "0.6546985", "text": "protected function _showResult() {\n\t\tob_start();\n\t\t$reports = DbReport::getPDO()->prepare('SELECT * FROM DbReport ORDER BY datanodeid');\n\t\t$reports->execute();\n\t\t$reports->setFetchMode(PDO::FETCH_CLASS, 'DbReport');\n\t\trequire_once ROOTDIR . '/views/resulttable.phtml';\n\t\tViewController::setView(ob_get_clean());\t\t\n\t}", "title": "" }, { "docid": "1761934214669ad178988a3c8ef21368", "score": "0.65252644", "text": "public function displayDb()\n {\n /* @var $Dbh \\Rdb\\System\\Libraries\\Db */\n /* @var $Profiler \\Rdb\\System\\Libraries\\Profiler */\n list($Profiler, $Dbh, $dataValues) = func_get_args();\n\n if ($Dbh == null) {\n return ;\n }\n\n if (is_array($dataValues)) {\n if (array_key_exists('time_start', $dataValues) && array_key_exists('time_end', $dataValues)) {\n echo '<div class=\"rdprofiler-log-db-timetake\">' . PHP_EOL;\n echo $Profiler->getReadableTime(($dataValues['time_end']-$dataValues['time_start'])*1000);\n echo '</div>' . PHP_EOL;\n }\n\n if (array_key_exists('memory_end', $dataValues) && array_key_exists('memory_start', $dataValues) && is_int($dataValues['memory_end']) && is_int($dataValues['memory_start'])) {\n echo '<div class=\"rdprofiler-log-memory\">';\n echo $Profiler->getReadableFileSize($dataValues['memory_end']-$dataValues['memory_start']);\n echo '</div>' . PHP_EOL;\n }\n }\n\n if (is_scalar($dataValues['data']) && strpos($dataValues['data'], ';') !== false) {\n // prevent sql injection! example: SELECT * FROM table where username = 'john'; DROP TABLE table;' this can execute 2 queries. explode them and just get the first!\n $expData = explode(';', str_replace('; ', ';', $dataValues['data']));\n $dataValues['data'] = $expData[0];\n }\n\n // use try ... catch to prevent any error by EXPLAIN. Example: EXPLAIN SHOW CHARACTER SET; <-- this will throw errors!\n // make sure that PDO options in config file is using exception mode.\n try {\n $Stmt = $Dbh->PDO($Dbh->currentConnectionKey())->prepare('EXPLAIN '.$dataValues['data']);\n $Stmt->execute();\n if ($Stmt) {\n echo '<div class=\"rdprofiler-log-newrow\">' . PHP_EOL;\n echo '<div class=\"rdprofiler-log-db-explain\">' . PHP_EOL;\n if (isset($expData) && is_array($expData)) {\n foreach ($expData as $key => $sqldata) {\n if ($key != 0 && !empty($sqldata)) {\n echo htmlspecialchars($sqldata, ENT_QUOTES).' cannot be explain due to it might be SQL injection!<br>' . PHP_EOL;\n }\n }// endforeach;\n unset($key, $sqldata);\n }\n $result = $Stmt->fetchAll();\n $Stmt->closeCursor();\n if ($result) {\n foreach ($result as $row) {\n if (is_array($row) || is_object($row)) {\n foreach ($row as $key => $val) {\n echo $key . ' = ' . $val;\n if (end($result) != $val) {\n echo ', ';\n }\n }// endforeach;\n }\n echo '<br>' . PHP_EOL;\n }// endforeach;\n }\n unset($key, $result, $row, $val);\n echo '</div>' . PHP_EOL;\n echo '</div>' . PHP_EOL;\n }\n unset($Stmt);\n } catch (\\Exception $e) {\n echo '<div class=\"rdprofiler-log-newrow\">' . PHP_EOL;\n echo '<div class=\"rdprofiler-log-db-explain\">' . PHP_EOL;\n echo '<!-- ' . $e->getMessage() . ' -->' . PHP_EOL;\n echo '</div>' . PHP_EOL;\n echo '</div>' . PHP_EOL;\n }\n unset($expData);\n\n if (is_array($dataValues) && array_key_exists('call_trace', $dataValues)) {\n echo '<div class=\"rdprofiler-log-newrow\">' . PHP_EOL;\n echo '<div class=\"rdprofiler-log-db-trace\">' . PHP_EOL;\n echo '<strong>Call trace:</strong><br>' . PHP_EOL;\n foreach ($dataValues['call_trace'] as $traceItem) {\n echo $traceItem['file'].', line '.$traceItem['line'].'<br>' . PHP_EOL;\n }\n unset($traceItem);\n echo '</div>' . PHP_EOL;\n echo '</div>' . PHP_EOL;\n }\n\n unset($dataValues, $Dbh, $Profiler);\n }", "title": "" }, { "docid": "9d7e4eed40d467db0a509efa39109b91", "score": "0.6484288", "text": "public function viewCatData($dbname){\n\t\t$countTHead = $this->getFieldsCount();\n\t\t$tHeadName = $this->getFieldsName();\n\t\t$tableHead = \"\\t<thead><tr>\\n\";\n\n\t\tfor($i=0; $i<$countTHead; ++$i){\n\t\t\t$tableHead .= \"\\t\\t<th>\".$tHeadName[$i].\"</th>\\n\";\n\t\t}\n\t\t$tableHead .= \"</tr></thead>\\n\";\n\t\techo($tableHead);\n\t\t$tableBody=$this->getTableRecords($this->tableName);\n\t\techo ($tableBody);\n\t}", "title": "" }, { "docid": "6759dfd0ffc50e90cb5b5b69ab7a655a", "score": "0.64550143", "text": "abstract function display_record();", "title": "" }, { "docid": "b9dd081a13dffc9dba55ad228ba8610b", "score": "0.644693", "text": "abstract function showdata();", "title": "" }, { "docid": "db3bc8a9b741e28f6ab5bc5145d6255a", "score": "0.64463544", "text": "public function viewall()\r\n {\r\n $sql =\"SELECT * FROM 'student' WHERE 1\";\r\n $db = db::getinstance();\r\n $result =$db->prepare($sql);\r\n $pdoresult = $result->execute();\r\n $result =$result->fetchAll(PDO::FETCH_ASSOC);\r\n \r\n return $result;\r\n }", "title": "" }, { "docid": "9ef5d78770536052f5dc3565f55bc2d2", "score": "0.6429192", "text": "public function displayCardData(){\r\n $sql = \"SELECT * From data_keep ORDER BY id DESC\";\r\n $statement = $this->db->prepare($sql);\r\n try{\r\n $statement->execute();\r\n }catch(Exception $e){\r\n $exceptionMessage = \"<p>You tried to run this sql: $sql</p><p>Exception: $e</p>\";\r\n trigger_error($exceptionMessage);\r\n }\r\n return $statement;\r\n }", "title": "" }, { "docid": "55fa6a8280942431748433eb7e3c66bb", "score": "0.64041424", "text": "private function _display_data_table(){\n\t\t\t$fields = array();\n\t\t\t$query = \"DESCRIBE `\".$this->class_settings['database_name'].\"`.`\".$this->table_name.\"`\";\n\t\t\t$query_settings = array(\n\t\t\t\t'database'=>$this->class_settings['database_name'],\n\t\t\t\t'connect' => $this->class_settings['database_connection'] ,\n\t\t\t\t'query' => $query,\n\t\t\t\t'query_type' => 'DESCRIBE',\n\t\t\t\t'set_memcache' => 1,\n\t\t\t\t'tables' => array( $this->table_name ),\n\t\t\t);\n\t\t\t$sql_result = execute_sql_query($query_settings);\n\t\t\t\n\t\t\tif($sql_result && is_array($sql_result)){\n\t\t\t\tforeach($sql_result as $sval)\n\t\t\t\t\t$fields[] = $sval;\n\t\t\t}else{\n\t\t\t\t//REPORT INVALID TABLE ERROR\n\t\t\t\t$err = new cError(000001);\n\t\t\t\t$err->action_to_perform = 'notify';\n\t\t\t\t\n\t\t\t\t$err->class_that_triggered_error = 'csales_items.php';\n\t\t\t\t$err->method_in_class_that_triggered_error = '_display_data_table';\n\t\t\t\t$err->additional_details_of_error = 'executed query '.str_replace(\"'\",\"\",$query).' on line 208';\n\t\t\t\treturn $err->error();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//INHERIT FORM CLASS TO GENERATE TABLE\n\t\t\t$form = new cForms();\n\t\t\t$form->setDatabase( $this->class_settings['database_connection'] , $this->table_name , $this->class_settings['database_name'] );\n\t\t\t$form->uid = $this->class_settings['user_id']; //Currently logged in user id\n\t\t\t$form->pid = $this->class_settings['priv_id']; //Currently logged in user privilege\n\t\t\t\n\t\t\t$this->datatable_settings['current_module_id'] = $this->class_settings['current_module'];\n\t\t\t\n\t\t\t$form->datatables_settings = $this->datatable_settings;\n\t\t\t\n\t\t\t$returning_html_data = $form->myphp_dttables($fields);\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t'html' => $returning_html_data,\n\t\t\t\t'method_executed' => $this->class_settings['action_to_perform'],\n\t\t\t\t'status' => 'display-datatable',\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "7560be359b2b95c81025e2f6f1a790d6", "score": "0.6356155", "text": "function printTable() {\r\n \t$connection = mysqli_connect('localhost', 'elmclean', '604577', 'elmclean');\r\n \t$sql = 'SELECT * FROM visits ORDER BY park_id DESC'; // select statement\r\n \t\r\n \t$dataArray = []; // initialize empty array\r\n \tforeach (mysqli_query($connection, $sql) as $row) { // loop through each record\r\n \tarray_push($dataArray, $row); // push record into array\r\n \t} \r\n \techo json_encode($dataArray); // convert array into JSON object and print to screen\r\n }", "title": "" }, { "docid": "0aa479106a982cd5c310eeaabac9f27b", "score": "0.63529015", "text": "public function getDisplay(){\n $return = '<div style=\"margin: 10px;\"><strong>'.$this->tableName.' table</strong>';\n\tforeach( $this->dataDict as $data ){\n\t if( $data['column'] == $this->primColumn ){\n\t $keyProp = 'PRIMARY KEY';\n\t\t$keyProp = ( !empty($this->isAuto) ) ? 'AUTO_INCREMENT '.$keyProp : $keyProp;\n\t }else{\n\t\t$keyProp = '';\n\t }\n\t $type = ( $data['type'] == 'BOOL' ) ? 'INT' : $data['type'];\n\t $properties = ( empty($data['prop']) ) ? '' : '('.$data['prop'].')';\n\t $return .= '<div style=\"margin-left:10px;margin-top:6px;\"><strong>'.$data['column'].'</strong><br><div style=\"margin-left: 20px;\">'.$type.' '.$properties.' '.$keyProp.'</div></div>';\n\t}\n\t$return .= '</div>';\n\treturn $return;\n }", "title": "" }, { "docid": "db07bcd26f8d2078403a739fc46cb427", "score": "0.6328921", "text": "protected function getViewData()\n\n {\n // to do: fetch data for this view from the database\n //sql query to database\n $sql = \"SELECT * FROM angebot\";\n $Recordset = $this->connect ->query($sql);\n return $Recordset;\n\n }", "title": "" }, { "docid": "980bcb66eeebd7d57bbbb17b50a5168b", "score": "0.6300308", "text": "public function displayData()\r\n {\r\n $query = \"SELECT * FROM tasks\";\r\n $result = $this->con->query($query);\r\n if ($result->num_rows > 0) {\r\n $data = array();\r\n while ($row = $result->fetch_assoc()) {\r\n $data[] = $row;\r\n }\r\n return $data;\r\n } \r\n }", "title": "" }, { "docid": "aa4656a68ceb8390a07087354e7e598b", "score": "0.6280162", "text": "private function _display_data_table(){\n\t\t\t$fields = array();\n\t\t\t$query = \"DESCRIBE `\".$this->class_settings['database_name'].\"`.`\".$this->table_name.\"`\";\n\t\t\t$query_settings = array(\n\t\t\t\t'database'=>$this->class_settings['database_name'],\n\t\t\t\t'connect' => $this->class_settings['database_connection'] ,\n\t\t\t\t'query' => $query,\n\t\t\t\t'query_type' => 'DESCRIBE',\n\t\t\t\t'set_memcache' => 1,\n\t\t\t\t'tables' => array( $this->table_name ),\n\t\t\t);\n\t\t\t$sql_result = execute_sql_query($query_settings);\n\t\t\t\n\t\t\tif($sql_result && is_array($sql_result)){\n\t\t\t\tforeach($sql_result as $sval)\n\t\t\t\t\t$fields[] = $sval;\n\t\t\t}else{\n\t\t\t\t//REPORT INVALID TABLE ERROR\n\t\t\t\t$err = new cError(000001);\n\t\t\t\t$err->action_to_perform = 'notify';\n\t\t\t\t\n\t\t\t\t$err->class_that_triggered_error = 'cState_list.php';\n\t\t\t\t$err->method_in_class_that_triggered_error = '_display_data_table';\n\t\t\t\t$err->additional_details_of_error = 'executed query '.str_replace(\"'\",\"\",$query).' on line 208';\n\t\t\t\treturn $err->error();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//INHERIT FORM CLASS TO GENERATE TABLE\n\t\t\t$form = new cForms();\n\t\t\t$form->setDatabase( $this->class_settings['database_connection'] , $this->table_name , $this->class_settings['database_name'] );\n\t\t\t$form->uid = $this->class_settings['user_id']; //Currently logged in user id\n\t\t\t$form->pid = $this->class_settings['priv_id']; //Currently logged in user privilege\n\t\t\t\n\t\t\t$this->datatable_settings['current_module_id'] = $this->class_settings['current_module'];\n\t\t\t\n\t\t\t$form->datatables_settings = $this->datatable_settings;\n\t\t\t\n\t\t\t$returning_html_data = $form->myphp_dttables($fields);\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t'html' => $returning_html_data,\n\t\t\t\t'method_executed' => $this->class_settings['action_to_perform'],\n\t\t\t\t'status' => 'display-datatable',\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "ef79b127eaeb96af0fd6555c17075af4", "score": "0.62277555", "text": "public function getData() {\n\t\t\t$db = new Database();\n\t\t\t$dbConnect = $db->connect();\n\t\t\t$sql = \"SELECT * FROM barang\";\n\t\t\t$data = $dbConnect->query($sql);\n\t\t\t\n\t\t\t$dbConnect = $db->close();\n\t\t\treturn $data;\n\t\t}", "title": "" }, { "docid": "bf33ee744c211908ad10c03432578c45", "score": "0.62190515", "text": "public function show_list()\n {\n try\n {\n ////Put the select statement here\n }\n catch(Exception $err_obj)\n {\n\t\t\tshow_error($err_obj->getMessage());\n } \n }", "title": "" }, { "docid": "4af068b135700a2748d620e1031a8a70", "score": "0.6215907", "text": "function output() {\n\t\t\t// Create an HTML-ready string of attributes\n\t\t\t// for the table tag\n\t\t\t$attr_string = \"\";\n\t\t\tforeach($this->attrs as $key => $value) {\n\t\t\t\t$attr_string .= \"$key='$value'\";\n\t\t\t}\n\t\t\t//Print the table itself\n\t\t\t$html = \"<table $attr_string>\";\n\t\t\tfor($i = 0; $i < $this->nrow; $i++) {\n\t\t\t\t$row_html = \"<tr>\";\n\t\t\t\t// Calculate how wide each cell should be in the current column\n\t\t\t\t$cell_width = $this->ncol / count($this->content[$i]);\n\t\t\t\t// Print each \"column\"\n\t\t\t\tfor ($j = 0; $j < count($this->content[$i]); $j++) {\n\t\t\t\t\t$cell_html = \"<td colspan='$cell_width'>\";\n\t\t\t\t\t$cell_html .= $this->content[$i][$j];\n\t\t\t\t\t$cell_html .= \"</td>\";\n\t\t\t\t\t$row_html .= $cell_html;\n\t\t\t\t}\n\t\t\t\t$row_html .= \"</tr>\";\n\t\t\t\t$html .= $row_html;\n\t\t\t}\n\t\t\t$html .= \"</table>\";\n\t\t\treturn $html;\n\t\t}", "title": "" }, { "docid": "a8a74ea8006bd52b3b1ab51fda8d15a5", "score": "0.62158173", "text": "public function displayData()\n\t\t{\n\t\t $query = \"SELECT * FROM perusahaan\";\n\t\t $result = $this->con->query($query);\n\t\tif ($result->num_rows > 0) {\n\t\t $data = array();\n\t\t while ($row = $result->fetch_assoc()) {\n\t\t $data[] = $row;\n\t\t }\n\t\t\t return $data;\n\t\t }else{\n\t\t\t echo \"tidak ada data perusahaan\";\n\t\t }\n\t\t}", "title": "" }, { "docid": "a5ebfafacbf05b85b2df300769063daa", "score": "0.62124413", "text": "public function show_records()\n {\n $sql = \"SELECT * FROM $this->table_name\";\n return $this->conn->query($sql);\n }", "title": "" }, { "docid": "357d3e67e598e4fd89a733bdb26c52ba", "score": "0.620862", "text": "public function displayRecords () {\n \n $pdo = Database::connect();\n $sql = 'SELECT * FROM customers ORDER BY id DESC';\n echo '<table class = \"table table-striped table-bordered\">\n\t <thead>\n <tr>\n <th>Name</th>\n <th>Email Address</th>\n <th>Mobile Number</th>\n <th>Action</th>\n </tr> </thead>\n <tbody>';\n\t \n // populate table with database contents\n foreach ($pdo->query($sql) as $row) {\n echo '<tr>';\n echo '<td>'. $row['name'] . '</td>';\n echo '<td>'. $row['email'] . '</td>';\n echo '<td>'. $row['mobile'] . '</td>';\n echo '<td width=250>';\n\t\t$this -> displayReadButton($row);\n echo '&nbsp;';\n $this -> displayUpdateButton($row);\n echo '&nbsp;';\n $this -> displayDeleteButton($row);\n echo '</td>';\n echo '</tr>';\n }\n echo '</tbody></table>';\n Database::disconnect();\n }", "title": "" }, { "docid": "c1e6f2b81592d7b26ed01ce9da12e3d7", "score": "0.61989635", "text": "public function dump()\n\t{\n\t\t$name = $this->name;\n\n\t\t/* Table header (from members)*/\n\t\t$ret = '\n\t\t<table class=\"table table-striped table-bordered\">\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t';\n\n\t\tforeach (array_values($this->fields) as $field)\n\t\t{\n\t\t\t\n\t\t\t$ret = $ret . \"<th>$field</th>\\n\";\n\t\t}\n\t\t$ret = $ret . \"<th></th>\";\n\n\t\t$ret = $ret . '\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>';\n\n\t\t\t/* Table rows (from database) */\n\t\t\t$pdo = $this->db->connect();\n\n\t\t\t/*\n\t\t\t * SQL INJECTION if you idiotically\n\t\t\t * passed a user-supplied string for\n\t\t\t * name.\n\t\t\t */\n\t\t\t$sql = \"SELECT * FROM $name ORDER BY id DESC\";\n\t\t\tforeach ($pdo->query($sql) as $row)\n\t\t\t{\n\t\t\t\t$ret = $ret . '<tr>\n\t\t\t\t';\n\t\t\t\tforeach (array_keys($this->fields) as $field)\n\t\t\t\t{\n\t\t\t\t\tif (!empty($field))\n\t\t\t\t\t{\n\t\t\t\t\t\t$ret = $ret . '<td>' . $row[$field] . '</td> ';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$ret = $ret . '\n\t\t\t\t\t<td width=\"250\">\n\t\t\t\t\t\t<a class=\"btn\" href=\"read.php?id=' . $row['id'] . '\">Read</a>\n\t\t\t\t\t\t<a class=\"btn\" href=\"update.php?id=' . $row['id'] . '\">Update</a>\n\t\t\t\t\t\t<a class=\"btn\" href=\"delete.php?id=' . $row['id'] . '\">Delete</a>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>';\n\t\t\t}\n\t\t\t$ret = $ret . '\n\t\t\t</tbody>\n\t\t</table>\n\t\t';\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "22db298172e087f09a14a970880485dd", "score": "0.6195517", "text": "public function displayData()\n {\n $sql = \"SELECT * FROM user_register\";\n $result = $this->conn->query($sql);\n if ($result->num_rows > 0) {\n $data = array();\n while ($row = $result->fetch_assoc()) {\n $data[] = $row;\n }\n return $data;\n }else{\n echo \"No found records\";\n }\n $this->conn->close();\n }", "title": "" }, { "docid": "c070301b84ca386b13e277a51cc69a15", "score": "0.6185547", "text": "public function show() { \n\t\techo \"<table>\";\n\t\t\t\techo \"<tr><td>did</td><td>$this->did</td></tr>\";\n\t\t\t\techo \"<tr><td>uid</td><td>$this->uid</td></tr>\";\n\t\t\t\techo \"<tr><td>name</td><td>$this->name</td></tr>\";\n\t\t\t\techo \"<tr><td>photo</td><td>$this->photo</td></tr>\";\n\t\t\t\techo \"<tr><td>address</td><td>$this->address</td></tr>\";\n\t\t\t\techo \"<tr><td>email</td><td>$this->email</td></tr>\";\n\t\t\t\techo \"<tr><td>phone</td><td>$this->phone</td></tr>\";\n\t\t\t\techo \"<tr><td>license_num</td><td>$this->license_num</td></tr>\";\n\t\t\t\techo \"<tr><td>expiry_date</td><td>$this->expiry_date</td></tr>\";\n\t\t\t\techo \"<tr><td>social_security_no</td><td>$this->social_security_no</td></tr>\";\n\t\techo \"</table>\";\n\t}", "title": "" }, { "docid": "5edd7fbb18b1a48a4086040dcbb69e5d", "score": "0.6170317", "text": "public function outputTable(){\n\t\t\t$table = '<table>';\n\t\t\t$table .= $this->rows;\n\t\t\t$table .= '</table>';\n\t\t\t\n\t\t\treturn $table;\n\t\t}", "title": "" }, { "docid": "392c44e6edc59a2852e4e9c71fc67cc0", "score": "0.6165538", "text": "private function outputData() {\n // Get Table Info If Informed\n if ($this->getTable() != \"\") {\n // Check Table Exists in Sheet Informed\n if(!isset($this->getSheet()->{$this->getTable()})) {\n $this->sendError(\"There is no table called \" . $this->getTable() . \" in the Sheet informed.\");\n } else {\n // Check Row Informed\n if ($this->getRow() != \"\") {\n if(isset($this->getSheet()->{$this->getTable()}[$this->getRow()])) {\n $this->returnOK($this->getSheet()->{$this->getTable()}[$this->getRow()]);\n } else {\n $this->sendError(\"There is no index \" . $this->getRow() . \" in the table called \" . $this->getTable() . \" in the Sheet informed.\");\n }\n } else {\n // OUTPUT: Return Table Info\n $this->returnOK($this->getSheet()->{$this->getTable()});\n }\n }\n } else {\n // OUTPUT: Return All Sheet\n $this->returnOK($this->getSheet());\n }\n }", "title": "" }, { "docid": "53dc1acd7269604db792c4ee48377364", "score": "0.61539483", "text": "public function display_data() {\n return $this->allData;\n }", "title": "" }, { "docid": "3c23eda6323fa2664b791ccb8030d427", "score": "0.61454505", "text": "public function export($res){\n\t\tif(mysqli_num_rows($res) > 0)\n\t\t{\n\t\t//$no = 1;\n\t\t\twhile($data = mysqli_fetch_assoc($res))\n\t\t\t{echo '\n\t\t<tr>\n\t\t\t<<td>'.$no.'</td>\n\t\t\t<td>'.$data['program_name'].'</td>\n\t\t\t<td>'.$data['program_objective'].'</td>\n\n\t\t</tr>\n\t\t';\n\t\t//$no++;\n\t\t}\n\t}\n\t}", "title": "" }, { "docid": "ac70b604ba7de3cdacd2b5e147fa572e", "score": "0.61446834", "text": "public function display_book_data(){\n\n\t\t//get the data and decode it into json format\n\t\t$data = json_encode($this->md->model_get_data(\"book\"));\n\n\t\t//echo the result\n\t\techo $data;\n\t}", "title": "" }, { "docid": "d638745a7927403f13db9b4b906568c0", "score": "0.61343604", "text": "public function data()\n {\n $cfg = array(\n 'columns' => array(),\n 'order' => array(),\n 'start' => 0, // Start\n 'length' => -1, // Length\n 'draw' => 0, // Identifier, just return\n 'search' => '', // Search query\n 'where' => '', // Optional where clause\n 'mrColNotEmpty' => '', // Munkireport non empty column name\n 'mrColNotEmptyBlank' => '' // Munkireport non empty column name\n );\n //echo '<pre>';print_r($_GET);return;\n\n $searchcols = array();\n\n // Process $_POST array\n foreach ($_POST as $k => $v) {\n if ($k == 'search') {\n $cfg['search'] = $v['value'];\n } elseif (isset($cfg[$k])) {\n $cfg[$k] = $v;\n }\n }// endforeach\n\n // Add columns to config\n $cfg['search_cols'] = $searchcols;\n\n //echo '<pre>';print_r($cfg);\n\n try {\n // Get model\n $obj = new Tablequery($cfg);\n //echo '<pre>';print_r($obj->fetch($cfg));\n echo json_encode($obj->fetch($cfg));\n \n // Check for older php versions\n if (function_exists('json_last_error')) {\n // If there is an encoding error, show it\n if (json_last_error() != JSON_ERROR_NONE) {\n echo json_last_error_msg();\n print_r($obj->fetch($cfg));\n }\n }\n } catch (Exception $e) {\n echo json_encode(array(\n 'error' => $e->getMessage(),\n 'draw' => intval($cfg['draw'])\n ));\n }\n }", "title": "" }, { "docid": "6702dee30750da136c73273df8b10bf6", "score": "0.6130255", "text": "public function databaserecordsAction(){\r\n //Magic in view\r\n }", "title": "" }, { "docid": "b76993840d4f7202f8f222be44e301c6", "score": "0.6102888", "text": "function display_statement(statement $statement){\n //\n //Get the statement's fields to be displayed. Not all fields need \n //to b displayed, e.g., primary and foreign keys.\n $fields = $statement->get_show_fields();\n //\n //Loop through all the pre-fetched result rows of the statement being \n //displayed. \n foreach($statement->results as $row){\n //\n //Indicate that this is the first row, as it needs to be output \n //specially\n $first_row = true;\n //\n //Loop through all the fields. We need to know when we are \n //outputing the first field, so that we can row-wise span the item \n //as needed\n foreach($fields as $field){\n //\n //Ouput the item name on conditon that it is the first row\n if ($first_row){\n //\n //The first field in an item can occuppy as musch space as\n //it wants. Prefix it with a new line spacing. Note the \n //double slash\n $this->page .= \"\\\\n\".$statement->item->name.\"\\\\n\";\n }else{\n //All othere subsequent foeld o a sttaement must be fitted\n //to teh desired space\n //\n //With space to the desired with\n $this->page .= $this->fit(\" \", self::ITEM_WIDTH, \" \");\n }\n //\n //Fit the field name to the desired width\n $this->page .= $this->fit($field->name, self::FIELD_WIDTH, \".\");\n //\n //The data width must be truncated to $data_with characatrrs\n $data_width = self::TOTAL_WIDTH - (self::ITEM_WIDTH + self::FIELD_WIDTH);\n //\n //Output the value, truncating as necssary\n $this->page .= substr($row[$field->name], 0, $data_width);\n //\n //Close the output row\n $this->page .= \"\\\\n\"; \n //\n //Reset the first row, as subsequent rows cannot be the first\n //row\n $first_row = false;\n }\n }\n}", "title": "" }, { "docid": "5c540029a9cf53c9f594d75d27389edd", "score": "0.6095568", "text": "function show_data($mdb)\n{\n\t$display = 1;\n\n\t/* show data */\n\t$sql = \"SELECT * FROM `fota`\";\n\t// $sql = \"SELECT * FROM `fota_machine`\";\n\t$result = mysql_query($sql);\n\n\tif($display === 1)\n\t{\n\t\tlogs( \"<table border='1'>\");\n\t}\n\t$ret = \"NULL\";\n\twhile($row = mysql_fetch_array($result))\n\t{\n\t\tif($display === 1)\n\t\t{\n\t\t\tlogs(\"<tr><td>\". $row['timestamp'] . \" </td><td>\" . $row['sn'] . \" </td><td>\" . $row['fp'] . \" </td><td>\" . $row['remoteip'] . \" </td><td>\" . $row['version'] . '</td><td>' .$row['sn'] . \"<td></tr>\");\n\t\t}\n\t}\n\n\t// mysql_close($mdb);\n\treturn $ret;\n}", "title": "" }, { "docid": "001acf9d0ecd2a5e25cf8e13691d0e65", "score": "0.60840005", "text": "public function print(){\r\n\r\n echo \"<table>\";\r\n\r\n for ($i=0; $i < $this->rows; $i++) {\r\n echo \"<tr>\";\r\n for ($j=0; $j < $this->cols; $j++) {\r\n echo \"<td>\".$this->data[$i][$j].\"</td>\";\r\n }\r\n echo \"</tr>\";\r\n }\r\n\r\n echo \"</table>\";\r\n }", "title": "" }, { "docid": "50e40d6dd9974f103635580c68715ce3", "score": "0.60812014", "text": "public function getData() {\n\t\t\t$db = new Database();\n\t\t\t$dbConnect = $db->connect();\n\t\t\t$sql = \"SELECT * FROM pegawai\";\n\t\t\t$data = $dbConnect->query($sql);\n\t\t\t$dbConnect = $db->close();\n\t\t\treturn $data;\n\t\t}", "title": "" }, { "docid": "bd9cb074da89fa7475f356d5260836d2", "score": "0.60754156", "text": "function printdatapre(){\n echo \"<table border=\\\"2\\\">\\n\";\n echo \"<tr>\\n \"\n .\"<th scope=\\\"col\\\">CanId</th>\\n \"\n .\"<th scope=\\\"col\\\">Name</th>\\n \"\n .\"<th scope=\\\"col\\\">SensorTypeId</th>\\n \"\n .\"</tr>\\n \";\n }", "title": "" }, { "docid": "58dd9630d2d970d97dd521edbd68492e", "score": "0.6074415", "text": "private function dbuserlist(){\n $results = $this->dt->user_list();\n echo $results;\n }", "title": "" }, { "docid": "4b36b94d37edb69d396dce88c1365976", "score": "0.6070739", "text": "public function getAllInfo(){\n $conn = new dbClass();\n $conn->connect();\n\n $sql = \"SELECT `shoes`.`id`, `shoes`.`model`, `shoes`.`price` ,\n `store`.`store_name` \n FROM `shoes` INNER JOIN `store` ON `shoes`.`id`=`store`.`id`\";\n $result = $conn->getConnection()->query($sql);\n \n while($row = $result->fetchObject(__CLASS__)){\n echo \"<b>\".$row->getId().\", &#160;&#160;&#160;&#160;&#160; \".$row->model.\", &#160;&#160;&#160;&#160;&#160;\".\n $row->getStoreName().\", &#160;&#160;&#160;&#160;&#160; \".$row->price.\"</b><br>\";\n }\n $conn->disconnect();\n }", "title": "" }, { "docid": "84386bba061be7701ddd95fed3120019", "score": "0.60590047", "text": "public function print_data()\n\t{\n\t\tprint_r($this->data);\n\t}", "title": "" }, { "docid": "bcda24d9b180dee8c6d76a6198d6393b", "score": "0.60513747", "text": "function displayData( ) {\n\t\tglobal $sql;\n\t\tglobal $tableFormat;\n $db = new mysqli(SERVER_NAME, DBF_USER, DBF_PASSWORD, DATABASE_NAME);\n\t\tif($db->connect_errno > 0){\n\t\t die('Unable to connect to database [' . $db->connect_error . ']');\n\t\t}\n\n\t\t// Get the data from the database using SQL\n\t\tif(!$result = $db->query($sql)){\n\t\t die('There was an error running the query [' . $db->error . ']');\n\t\t}\n\n // Display the records in a table\n switch($tableFormat) {\n case AVAILABLE_RACE:\n {\n echo (\"<div class='row'>\");\n echo (\"<div class='center-block col-xs-8'>\"); \n echo (\"<div class='bs-example'>\");\n echo (\"<div class='table-responsive'>\");\n echo '<h2>List of Races </h2>';\n echo(\"<table class= 'table table-bordered table-striped table-hover>'\");\n echo '<tr>';\n echo '<th>Race Name</th>';\n echo '<th>Race Course</th>';\n echo '</tr>';\n while($row = $result->fetch_assoc( ))\n {\n echo '<tr>';\n echo '<td>' . $row['raceName'] . '</td>';\n echo '<td>' . $row['raceCourse'] . '</td>';\n echo '</tr>';\n }\n echo '</table>';\n break;\n }\n break;\n\n case CLOSED_RACE:\n {\n echo (\"<div class='row'>\");\n echo (\"<div class='center-block col-xs-8'>\"); \n echo (\"<div class='bs-example'>\");\n echo (\"<div class='table-responsive'>\");\n echo '<h2>List of Races </h2>';\n echo(\"<table class= 'table table-bordered table-striped table-hover>'\");\n echo '<tr>';\n echo '<th>Race Name</th>';\n echo '<th>Race Course</th>';\n echo '</tr>';\n while($row = $result->fetch_assoc( ))\n {\n echo '<tr>';\n echo '<td>' . $row['raceName'] . '</td>';\n echo '<td>' . $row['raceCourse'] . '</td>';\n echo '</tr>';\n }\n echo '</table>';\n break;\n }\n break;\n case FEATURE_RACE:\n {\n echo (\"<div class='row'>\");\n echo (\"<div class='center-block col-xs-8'>\"); \n echo (\"<div class='bs-example'>\");\n echo (\"<div class='table-responsive'>\");\n echo '<h2>List of Races </h2>';\n echo(\"<table class= 'table table-bordered table-striped table-hover>'\");\n echo '<tr>';\n echo '<th>Race Name</th>';\n echo '<th>Race Course</th>';\n echo '</tr>';\n while($row = $result->fetch_assoc( ))\n {\n echo '<tr>';\n echo '<td>' . $row['raceName'] . '</td>';\n echo '<td>' . $row['raceCourse'] . '</td>';\n echo '</tr>';\n }\n echo '</table>';\n break;\n }\n break;\n\tdefault:\n\techo $tableFormat . ' is not a valid table format.<br />';\n} // end of switch( )\n\n\t\t// Close the database object\n\t\t$db->close;\n\t}", "title": "" }, { "docid": "5d8c3a56fe26a8b028bd5150d8af00ad", "score": "0.6049752", "text": "private function getData(){\r\n\t\t\t$sql='SELECT vac_titel,vac_tekst,vac_id FROM `tb_vacature` ORDER BY vac_id';\r\n $result = $this->createTable(Database::getData($sql));\r\n\r\n\t\t\t//TODO: generate JSON output like this for webservices in future\r\n\t\t\t/*\r\n\t\t\t\t$data = Database::getData($sql);\r\n\t\t\t\t$json = Database::jsonParse($data);\r\n\t\t\t\t$array = Database::jsonParse($json);\r\n\r\n\t\t\t\techo \"<br />result: \"; print_r(Database::getData($sql));\r\n\t echo \"<br /><br />json :\" . $json;\r\n\t echo \"<br /><br />array :\"; print_r($array);\r\n\t\t\t*/\r\n\r\n\t\t\treturn $result;\r\n\t\t}", "title": "" }, { "docid": "0e51febcfba37f9d1e3048286f9268e6", "score": "0.6038731", "text": "static function outputData($sql)\n {\n $data = array();\n $con = Database::con();\n $result = mysqli_query($con, $sql);\n while($row = mysqli_fetch_assoc($result)){\n $data[] = $row;\n }\n return $data;\n }", "title": "" }, { "docid": "16309d132e0f35a3a6d27f0c7c578942", "score": "0.6026526", "text": "function show_data(){\n\t\treturn $this->col_data;\n\t}", "title": "" }, { "docid": "721cd3444cf140367ae0a3ea93c98a33", "score": "0.60221416", "text": "private function display()\n {\n\n // $queryAmmo = $this->db->query(\"SELECT * FROM Ammo;\");\n\n // $queryAccessories = $this->db->query(\"SELECT * FROM Accessories;\");\n \n // $this->TPL['listing'] = $query->result_array();\n\n // $this->TPL['listingAmmo'] = $queryAmmo->result_array();\n\n // $this->TPL['listingAccessories'] = $queryAccessories->result_array();\n\n $this->template->show('About', $this->TPL);\n\n }", "title": "" }, { "docid": "6f4045c14a5959467ca2376a3efa49a9", "score": "0.60205615", "text": "function retrieveAllData(){\r\n $db = ConnDatabase::getInstance();\r\n $mysqli = $db->getConnection(); \r\n $sql_query = \"SELECT * FROM data ORDER BY id\";\r\n $result = $mysqli->query($sql_query);\r\n \r\n if ($result) {\r\n /* fetch object array */\r\n echo \"<table>\";\r\n while ($row = $result->fetch_row()) {\r\n echo \"<tr>\";\r\n echo \"<td>\".$row[0] .\" - \" . $row[1] .\" </td><td> \" . \"<img src='\".$row[2].\"' height=100 width=100></td>\";\r\n echo \"</tr>\";\r\n }\r\n echo \"</table>\";\r\n /* free result set */\r\n $result->close();\r\n }\r\n \r\n /* close connection */\r\n $mysqli->close();\r\n}", "title": "" }, { "docid": "9299ea048f1e5a7133463d36ac15ae73", "score": "0.6016879", "text": "public function display_query(){\n\t\techo '<p>'.$this->query.'</p>';\n\t}", "title": "" }, { "docid": "66f2b7b4cd1d8e707c79d8edd3e5acad", "score": "0.60125995", "text": "public function output() {\n header(\"content-type: text/csv\");\n echo $this->build();\n }", "title": "" }, { "docid": "fe7d08b287482b92f606b779296302b3", "score": "0.6002617", "text": "public function display_exam_data(){\n\t\t$data = json_encode($this->md->model_get_data_from_2_table_w_selection_and_condition(\"exam\", \"book\", \"exam.BookId = book.BookId\", \"exam.BookId = book.BookId\", \"RIGHT\", \"Book.BookName, Book.BookCategoryId, Book.BookDescription, Book.BookId, Book.BookVideoFileName, Exam.CorrectAnswer, Exam.ExamFileName, Exam.ExamId, Exam.IsDeleted, Exam.IsFileExam, Exam.Option1, Exam.Option2, Exam.Option3, Exam.Option4, Exam.Question\"));\n\n\t\t//echo the result\n\t\techo $data;\n\t}", "title": "" }, { "docid": "7339675beed065621c212a8c36a96428", "score": "0.5999604", "text": "public function lista()\n {\n global $app;\n $sth = $this->PDO->prepare(\"SELECT c.*, t.name as tech_name, t.email as tech_email, t.cpf as tech_cpf, t.cro as tech_cro, t.fixed_phone as tech_fixed_phone, t.whats_phone as tech_whats_phone FROM\n `$this->table_name` as c, `$this->tech_table_name` as t\n WHERE\n t.clinic_cnpj = c.cnpj\");\n $sth->execute();\n $result = $sth->fetchAll(\\PDO::FETCH_ASSOC);\n $app->render('default.php', [\"data\" => $result], 200);\n }", "title": "" }, { "docid": "17a1134197f042e8f1139573682afd64", "score": "0.59948474", "text": "public function execute()\n {\n /*\n * Render tables for each available information provider.\n */\n foreach ($this->getInformationList() as $info) {\n $table = new Table($this->getOutput());\n $table->setHeaders([$info->getName()]);\n foreach ($info->getData() as $key => $value) {\n $table->addRow([$key, $value]);\n }\n $table->render();\n }\n }", "title": "" }, { "docid": "a898e1a29acfe60f7730fad014eca087", "score": "0.59872836", "text": "function printDinosaurResult($result) {\n\techo \"<br>Got data from table Dinosaur:<br>\";\n\techo \"<table class='table table-hover table-responsive'>\";\n\techo \"<thead class='thead-dark'><tr><th>ID</th><th>Name</th><th>Food</th><th>Health</th><th>Happiness</th><th>Type</th></tr></thead>\";\n\n\twhile ($row = OCI_Fetch_Array($result, OCI_BOTH)) {\n\t\techo \n\t\t\"<tr><td>\" . $row[\"ID\"] . \n\t\t\"</td><td>\" . $row[\"NAME\"] . \n\t\t\"</td><td>\" . $row[\"FOOD\"] . \n\t\t\"</td><td>\" . $row[\"HEALTH\"] .\n\t\t\"</td><td>\" . $row[\"HAPPINESS\"] . \n\t\t\"</td><td>\" . $row[\"TYPE\"] . \"</td></tr>\";\n\t}\n\techo \"</table>\";\n\n}", "title": "" }, { "docid": "2524ffff38bae19aee40a7dfe8847c89", "score": "0.59659225", "text": "function printManagerResult($result) {\n\techo \"<br>Got data from table Manager:<br>\";\n\techo \"<table class='table table-hover table-responsive'>\";\n\techo \"<thead class='thead-dark'> <tr><th>ID</th><th>Name</th><th>MoneyMade</th><th>Satisfaction</th></tr> </thead>\";\n\n\twhile ($row = OCI_Fetch_Array($result, OCI_BOTH)) {\n\t\techo \n\t\t\"<tr><td>\" . $row[\"ID\"] . \n\t\t\"</td><td>\" . $row[\"NAME\"] . \n\t\t\"</td><td>\" . $row[\"MONEYMADE\"] .\n\t\t\"</td><td>\" . $row[\"SATISFACTION\"] . \"</td></tr>\";\n\t}\n\techo \"</table>\";\n\n}", "title": "" }, { "docid": "d4d27fa1a5a202f73d1dbbbaa204d56e", "score": "0.5962582", "text": "function show(){\n \n global $db;\n \n $results = [];\n $query = $db->prepare(\"SELECT * FROM test\");\n \n if($query->execute() && $query->rowCount() > 0){\n \n $results = $query->fetchAll(PDO::FETCH_ASSOC);\n \n }\n \n return ($results);\n \n }", "title": "" }, { "docid": "99e545e6dd887fa346a925b560fa49a1", "score": "0.59598744", "text": "public function __toString() {\n $bind = $this->type; $this->type = null;\n $this->rewind();\n $ret = '<div class=\"sqlResult\"><div class=\"sqlStatement\">'.$this->ptr->queryString.'</div>';\n if ($this->valid()) {\n $ret .= '<table border=\"1\"><thead><tr>';\n foreach($this->current() as $key => $value) {\n $ret .= '<th>'.$key.'</th>';\n }\n $ret .= '</tr></thead><tbody>';\n $this->rewind();\n foreach($this as $key => $vals) {\n $ret .= '<tr>';\n foreach($vals as $v) $ret .= '<td>'.$v.'</td>';\n $ret .= '</tr>';\n }\n $ret .= '</tbody></table></div>';\n } else {\n $ret .= 'Empty dataset ...';\n }\n $this->type = $bind;\n return $ret;\n }", "title": "" }, { "docid": "844850007afae69effecfbc7ed6ae9c3", "score": "0.5956079", "text": "public function showTableAdmin(){\n $db = $this->getPDO();\n $sql = \"SELECT * FROM administration\";\n $datas = $db->query($sql);\n return $datas;\n }", "title": "" }, { "docid": "2c4daad213fb08199dedcc11d90c9ee7", "score": "0.59547174", "text": "function printResult($result) {\n echo \"<br>Retrieved data:<br>\";\n echo \"<table>\";\n echo \"<tr><th>name</th></tr>\";\n\n while ($row = OCI_Fetch_Array($result, OCI_BOTH)) {\n echo \"<tr><td>\" . $row[\"EMAIL\"] . \"</td><td>\" . $row[\"PASSWORD\"] . \"</td><td>\" . $row[\"NAME\"] . \"</td><td>\" . $row[\"AGE\"] . \"</td><td>\" . $row[\"B_DATE\"] . \"</td><td>\" . $row[\"GENDER\"] . \"</td><td>\" . $row[\"WEIGHT\"] . \"</td><td>\" . $row[\"G_NAME\"] . \"</td></tr>\"; //or just use \"echo $row[0]\" \n }\n\n echo \"</table>\";\n }", "title": "" }, { "docid": "87ef5ddec2bd728188c30c3cec6b6a70", "score": "0.59424937", "text": "public function output() {}", "title": "" }, { "docid": "87ef5ddec2bd728188c30c3cec6b6a70", "score": "0.59424937", "text": "public function output() {}", "title": "" }, { "docid": "d94b4b7e0b9e3ab3c19ff1a20f35da19", "score": "0.5940592", "text": "public function output();", "title": "" }, { "docid": "d94b4b7e0b9e3ab3c19ff1a20f35da19", "score": "0.5940592", "text": "public function output();", "title": "" }, { "docid": "d94b4b7e0b9e3ab3c19ff1a20f35da19", "score": "0.5940592", "text": "public function output();", "title": "" }, { "docid": "d94b4b7e0b9e3ab3c19ff1a20f35da19", "score": "0.5940592", "text": "public function output();", "title": "" }, { "docid": "d94b4b7e0b9e3ab3c19ff1a20f35da19", "score": "0.5940592", "text": "public function output();", "title": "" }, { "docid": "d94b4b7e0b9e3ab3c19ff1a20f35da19", "score": "0.5940592", "text": "public function output();", "title": "" }, { "docid": "5f8480c6e51d606fa30fc3e09f91903e", "score": "0.59376293", "text": "function printResult($result) {\n echo \"<br>Retrieved data from table demoTable:<br>\";\n echo \"<table>\";\n echo \"<tr><th>ID</th><th>Name</th></tr>\";\n\n while ($row = OCI_Fetch_Array($result, OCI_BOTH)) {\n echo \"<tr><td>\" . $row[\"ID\"] . \"</td><td>\" . $row[\"NAME\"] . \"</td></tr>\"; //or just use \"echo $row[0]\" \n }\n\n echo \"</table>\";\n }", "title": "" }, { "docid": "13cca74f981e051d51aa507d4a701851", "score": "0.5937089", "text": "function display_record(){\n //\n //The data to be displayed will come from the invoice level, assuming\n //that the record property has been set using the open tag.\n $level = $this->record->invoice->level;\n //\n //Visit all the items of the record and display each one of them\n foreach($this->record->items as $item){\n \n //\n //Use the requested statement to drive this dislay\n $statement = $item->statements[$level];\n //\n //Display the statement\n $this->display_statement($statement);\n }\n \n }", "title": "" }, { "docid": "e5104c83cbe6d9a4bc4387f000befdb9", "score": "0.59347963", "text": "function GetAllMedicalrecords($UserID)\r\n{\r\n //Connnect to data base\r\n $conn = connect();\r\n //Create Medical Records data access object\r\n $dao = new MedicalRecordDao($conn, \"MedicalRecords\");\r\n $records = $dao->findAllMedicalRecordByUserID($UserID);\r\n foreach($records as $record)\r\n {\r\n echo \"<div class='row'>\";\r\n echo \"<div class ='col'>\";\r\n echo \"<p> Name : \" . $record->getRecordType() . \"<br>\";\r\n echo \"Description : <br>\";\r\n echo \" -\" . $record->getRecordReport() . \"<br>\";\r\n echo \"Treatment : <br>\";\r\n echo \" -\". $record->getTreatment() .\"<br>\";\r\n echo \"Submitted : \" . $record->getDate() . \"</p>\";\r\n //sumbitted by\r\n echo \"</div>\";\r\n echo \"</div>\";\r\n }\r\n}", "title": "" }, { "docid": "3510f0711a238aff265e947e5268e046", "score": "0.59335923", "text": "function display()\r\n\t{\r\n\t\t\r\n\t\tif((!is_array($this->HEADER_array) || count($this->HEADER_array) == 0 ) || !is_array($this->DATA_array) )\r\n\t\t{\r\n\t\t\techo \"\\n\\n\\n <h1>!!!! Error in Table data set {HEADER} !!!!!!!</h1>\\n\\n\\n\\n\";\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$h_count=count($this->HEADER_array); /// echo \"<br> header cnt: $h_count\";\r\n\t\t\t\tforeach($this->DATA_array as $datad)\r\n\t\t\t\t\tif($h_count!=count($datad))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\techo \"\\n\\n\\n <h1>!!!! Error in Table data set {DATA col count} !!!!!!!</h1>\\n\\n\\n\\n\";\r\n\t\t\t\t\t\techo\"<pre>\";\r\n\t\t\t\t\t\tvar_dump($datad);\r\n\t\t\t\t\t\techo\"</pre>\";\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\r\n\t\t\r\n\t\techo\"\\n\t<div class=\\\"fw-body\\\"> \";\r\n\t\techo\"\\n\t<div class=\\\"content\\\"> \";\r\n\t\techo\"\\n\t\t<table id=\\\"Rtable\\\" class=\\\"display\\\" style=\\\"width:100%\\\"> \";\r\n\t\techo\"\\n\t\t\t<thead> \";\r\n\t\techo\"\\n\t\t\t\t<tr> \";\r\n\t\tforeach($this->HEADER_array as $headd)\r\n\t\t\techo\"\\n\t\t\t\t\t<th>$headd</th> \";\r\n\t\techo\"\\n\t\t\t\t</tr>\";\r\n\t\techo\"\\n\t\t\t</thead>\"; \r\n\t\techo\"\\n\t\t\t\t\t<tbody> \";\r\n\t\tforeach($this->DATA_array as $datad)\r\n\t\t{\r\n\t\t\techo\"\\n\t\t\t\t<tr> \";\r\n\t\t\t\r\n\t\t\t\tforeach($datad as $datat)\r\n\t\t\techo\"\\n\t\t\t\t\t<td>$datat</td> \";\r\n\t\t\techo\"\\n\t\t\t\t</tr> \";\r\n\t\t}\r\n\r\n\t\techo\"\\n\t\t\t</tbody>\";\r\n\t\tif($this->footer!=0)\r\n\t\t{\r\n\t\t\techo\"\\n\t\t\t\t<tfoot> \";\r\n\t\t\techo\"\\n\t\t\t\t<tr> \";\r\n\t\t\tforeach($this->HEADER_array as $headd)\r\n\t\t\t\techo\"\\n\t\t\t\t\t<th>$headd</th> \";\r\n\t\t\techo\"\\n\t\t\t\t</tr> \";\r\n\t\t\techo\"\\n\t\t\t</tfoot> \";\r\n\t\t}\r\n\r\n\t\techo\"\\n\t\t</table>\";\r\n\t\techo\"\\n\t</div>\";\r\n\t\techo\"\\n</div>\";\r\n\r\n\t}", "title": "" }, { "docid": "39c808ab90833e6111a856276954f6f1", "score": "0.5926258", "text": "public function show()\n {\n $id=Auth::guard('student')->user()->id;\n $opsubjectlist=DB::select(\"select subjects.subjectName from classes, sections, students, subjects\n where students.sectionId=sections.id and sections.classId=classes.id and classes.id=subjects.classId and subjects.group in (student.group, 'General') and subjects.optionalstatus=1 and students.id='$id'\");\n\n // $data_table_render = DataTables::of($subjectlist)\n // ->addColumn('hash',function ($row){\n // $i=0;\n\n // return '#';\n\n // })\n\n // ->rawColumns(['hash'])\n // ->make(true);\n\n // return $data_table_render;\n }", "title": "" }, { "docid": "14edd782d565a9aecce6d90e5903d963", "score": "0.59260225", "text": "function writeTableShell()\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\techo \n\t\t\t\t\t\t\t\t'\n\t\t\t\t\t\t\t\t\t<table summary=\"Table pulled from database\">\n\t\t\t\t\t\t\t\t\t<caption>Available Stories</caption>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t<th scope=\"col\">Story ID</th>\n\t\t\t\t\t\t\t\t\t\t\t<th scope=\"col\">Author Name</th>\n\t\t\t\t\t\t\t\t\t\t\t<th scope=\"col\">Story Name</th>\n\t\t\t\t\t\t\t\t\t\t</tr><!-- End column headers -->\n\t\t\t\t\t\t\t\t\t</thead><!-- end header -->\n\n\t\t\t\t\t\t\t\t\t<tfoot>\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t<!--<th scope=\"row\">Footer</th>-->\n\t\t\t\t\t\t\t\t\t\t\t<!--<td colspan=\"2\">Footer Data</td>-->\n\t\t\t\t\t\t\t\t\t\t\t<td colspan=\"3\"></td>\n\t\t\t\t\t\t\t\t\t\t</tr><!-- end column footers -->\n\t\t\t\t\t\t\t\t\t</tfoot><!-- end footer -->\n\n\t\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t';\n\t\t\t\t\t\t\t}", "title": "" }, { "docid": "95b7273cb518e9b0e03b22a7d0649aa6", "score": "0.592384", "text": "public function printQuestion() {\n\t\t\n\t\t\t$result = mysql_query(\"SELECT * FROM $this->tableQuestion\");\n\t\t\t\n\t\t\tfor ($i = 0; $i < mysql_num_rows($result); $i++) {\n\t\t\t\t\n\t\t\t\t$id = mysql_result($result, $i, \"id\");\n\t\t\t\t$title = mysql_result($result, $i, \"title\");\n\t\t\t\t$author = mysql_result($result, $i, \"author\");\n\t\t\t\t$theme = mysql_result($result, $i, \"theme\");\n\t\t\t\t$statement = mysql_result($result, $i, \"statement\");\n\n\t\t\t?>\n\t\t\t\n\t\t\t<li value=\"<?php echo $id ?>\">\n\t\t\t\t<div class=\"inquiryDatabaseListMetaWrapperLeft\">\n\t\t\t\t\t<p class=\"inquiryDatabaseListTitle\"><?php echo $title ?></p>\n\t\t\t\t\t<p class=\"inquiryDatabaseListAuthor\"><?php echo $author ?></p>\n\t\t\t\t\t<p class=\"inquiryDatabaseListTheme\"><?php echo $theme ?></p>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"inquiryDatabaseListMetaWrapperRight\">\n\t\t\t\t\t<p class=\"inquiryDatabaseListDescription\"><?php echo $statement ?></p>\n\t\t\t\t</div>\n\t\t\t</li>\n\t\t\t\n\t\t\t\n\t\t\t<?php\n\t\t\t\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "04ee7e9935f740218f68d8b330050085", "score": "0.5922456", "text": "public function output()\n {\n }", "title": "" }, { "docid": "7c392449f527f53ecba62283c4e53b04", "score": "0.5917819", "text": "public function output_structured_data()\n {\n }", "title": "" }, { "docid": "ccb51ed9b3a5d7cf46a972ae3c1bba22", "score": "0.591751", "text": "function showSrv(){\n $db = new SrvList($this->db);\n $db->all();\n $contbd = 0;\n for ($db->load(); !$db->dry(); $db->next()){\n $data[] = $db->cast();\n // var_dump($data[$contbd]); \n $data[$contbd]['password'] = $this->decrypt($data[$contbd]['password']);\n $contbd ++;\n }\n $this->f3->set('dataFromDb',$data);\n if(!$db->dry()) {\n $valid=[];\n $valid[]= \"No data exist!\"; \n }\n $template=new Template;\n $this->f3->set('header','header.html');\n $this->f3->set('content','admin.html');\n $this->f3->set('admin_tool','adminSrvBase.html');\n echo $template->render('base.html');\n //DEBUG\n if ($this->f3->get('DEBUG')>0) {\n // var_dump($db); \n }\n }", "title": "" }, { "docid": "3273ef839574eedeefb7d4bf838fe157", "score": "0.5917128", "text": "public function get() {\n\t$this->execute();\n }", "title": "" }, { "docid": "5d33fbab6a557f599cc632aee530738d", "score": "0.59131527", "text": "public function display_studentlist_data(){\n\t\t$data = json_encode($this->md->model_get_data_from_3_table_w_condition(\"studentlist\",\"useraccount\", \"userdetail\", \"studentlist.UserAccountId = useraccount.UserAccountId\", \"useraccount.UserDetailId = userdetail.UserDetailId\", \"studentlist.IsDeleted = '0'\", \"INNER\"));\n\n\t\t//echo the result\n\t\techo $data;\n\t}", "title": "" }, { "docid": "ff6dddf438c6d2ba267542b2b751b9c4", "score": "0.59111995", "text": "public function indexAction()\n {\n //lazem tt7at hena??\n /*$db=Zend_Registry::get('db');\n $sql = 'SELECT name FROM vitals';\n $result = $db->fetchAll($sql);\n $dojoData= new Zend_Dojo_Data('name',$result,'id');\n echo $dojoData->toJson();\n exit;*/\n\n }", "title": "" }, { "docid": "efda4f5e9cbbb41a19c35e5d904dd462", "score": "0.59081244", "text": "public function printlist() {\r\n\t\t$parishID = Convert::raw2sql($this->request->getVar('ParishID'));\t\t\r\n\t\tif(!$this->canAccess($parishID)){\r\n\t\t\treturn $this->renderWith(array('Unathorised_access', 'App'));\r\n\t\t}\r\n\t\t\n\t\t$this->title = \"House list\";\n return $this->renderWith(array('House_printresults', 'Print'));\n }", "title": "" }, { "docid": "1c18a83f6a6722be17d2e8128889289b", "score": "0.59011036", "text": "public function view()\n {\n return $this->db->get('jadwal')->result();\n }", "title": "" }, { "docid": "8126dd9b2815f714fa6214d320bd8ad8", "score": "0.5900377", "text": "function stamGenere(){\n\t\t\t$query = \"SELECT GENERENOME FROM GENERE\";\n\t\t\tif ($result = connetti()->query($query)) {\n\n\t\t\t\twhile ($row = $result->fetch_assoc()) {\n\t\t\t\t\t$GENERENOME = $row[\"GENERENOME\"];\n\t\t\t\t\techo \n\t\t\t\t\t'\n\t\t\t\t\t<table class=\"tabellagen\">\n\t\t\t\t\t\t<tr> \n\t\t\t\t\t\t\t<td>'.$GENERENOME.'</td>\n\t\t\t\t\t\t</tr>';\n\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "c4678b3e41b2b27b82afb01a9ef2d253", "score": "0.5896012", "text": "private static function output_tables_info()\n {\n }", "title": "" }, { "docid": "315f54dca2b7e6f35aeb54a1555e1865", "score": "0.58928204", "text": "public function display_game_data(){\n\t\t$data = json_encode($this->md->model_get_data(\"game\"));\n\n\t\t//echo the result\n\t\techo $data;\n\t}", "title": "" }, { "docid": "1fdb8d0d4ee2380b71108981310ca199", "score": "0.5885549", "text": "function showUser(){\n $db = new User($this->db);\n $db->all();\n for ($db->load(); !$db->dry(); $db->next()){\n $data[] = $db->cast();\n }\n $this->f3->set('dataFromDb',$data);\n if(!$db->dry()) {\n $valid=[];\n $valid[]= \"No data exist!\"; \n }\n $template=new Template;\n $this->f3->set('header','header.html');\n $this->f3->set('content','admin.html');\n $this->f3->set('admin_tool','adminUserBase.html');\n echo $template->render('base.html');\n }", "title": "" }, { "docid": "6c4a7513f094b544598f978a2943fbb9", "score": "0.58798033", "text": "function dump_rs($rs=null,$html=0){\r\n\twhile($row = $rs->fetch(PDO::FETCH_ASSOC)){\r\n\t\tforeach($row as $cName => $cValue){\r\n\t\t\techo \"$cName => $cValue\".($html ? \"&emsp;\" : \"\\t\");\r\n\t\t}\r\n\t\techo ($html ? \"<br>\" : \"\\r\\n\");\r\n\t}\r\n}", "title": "" }, { "docid": "c052ce8b2f2db977a1e60d6ebfe435ae", "score": "0.58794373", "text": "private function querydata()\n\t{\n\t\t$this->export = '';\n\n\t\t/***database connect***/\n\t\t$db = DB::getInstance();\n\n\t\t//who to query?\n\t\t$this->members = Input::clean_single('p','members','NOHTML');\n\t\t//all, active, inactive, or chargeback\n\t\tif(!$this->members) $this->members = 'all';\n\n\n\t\t//output to screen?\n\t\t$this->onscreen = Input::clean_single('p','onscreen','UINT');\n\n\t\t//separator\n\t\t$this->separator = Input::clean_single('p','separator','NOHTML');\n\t\tif(empty($this->separator)) $this->separator = \",\".PHP_EOL;\n\n\n\t\t/*sanitize all the checkboxes and build queries*/\n\t\t$sql = array();\n\t\tforeach($_POST['data'] as $table => $value)\n\t\t{\n\t\t\t//bx_KEY\n\t\t\t$sql[$table] = '';\n\t\t\tif(!empty($_POST['data'][$table]))\n\t\t\tforeach($_POST['data'][$table] as $key => $value)\n\t\t\t{\n\t\t\t\t$key = Input::clean($key, 'NOHTML');\n\t\t\t\t$value = Input::clean($value, 'UINT');\n\n\t\t\t\t//for prefill\n\t\t\t\t$input[$key] = $this->data[$table][$key] = $value;\n\n\t\t\t\tif($input[$key] == 1)\n\t\t\t\t\t$sql[$table] .= \"`\".$table.\"`.\".$db->Prepare('#', array($key)).', ';\n\t\t\t}\n\t\t\t$sql[$table] = trim($sql[$table], ', ');\n\t\t}\n\n\n\t\t//build query\n\t\t$the_sql = 'SELECT '.implode(\",\", $sql). \" FROM\n\t\t\t`bx_join` as `join`\n\t\t\tLEFT JOIN `bx_member` as `member` ON (join.member_id = member.id)\n\t\t\tLEFT JOIN `bx_member_session` as `member_session` ON (member_session.member_id = member.id)\n\t\t\tLEFT JOIN `bx_member_email` as `member_email` ON (join.member_id = member_email.id)\n\t\t\tLEFT JOIN `bx_member_activitylog` as `member_activitylog` ON (member_activitylog.member_id = member.id)\n\t\t\";\n\t\t$the_sql .= ($this->members == 'all' ? '' : $db->Prepare(\" WHERE join.status = ?\", array($this->members)) );\n\n\n\t\t//query the data\n\t\tif(!empty($the_sql))\n\t\t\t$this->export = $db->FetchAll($the_sql);\n\t\telse\n\t\t{\n\t\t\t$this->error = \"No fields selected.\";\n\t\t}\n\t\tunset($sql, $the_sql);\n\n\n\n\t\t//output formatting\n\t\tswitch($_POST['outputformat'])\n\t\t{\n\t\t\tcase 'JSON':\n\t\t\t\trequire_once \"Zend/Json.php\";\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$json = Zend_Json::encode($this->export);\n\t\t\t\t\t$this->export = Zend_Json::prettyPrint($json, array(\"indent\" => \" \"));\n\t\t\t\t}\n\t\t\t\tcatch(Exception $e)\n\t\t\t\t{\n\t\t\t\t\t$this->export = \"Error creating Json data: \".$e->getMessage();\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 'XML':\n\t\t\t\t$this->export = String::toXml($this->export, 'members', 'member_');\n\t\t\tbreak;\n\t\t\tcase 'CSV':\n\t\t\tdefault:\n\t\t\t\t$this->CSVformat();\n\t\t\tbreak;\n\t\t}\n\n\t\t//nothing to show?\n\t\tif(empty($this->export))\n\t\t\t$this->error = \"No results found.\";\n\n\t\t//output to the screen or force download?\n\t\tif('yes' != $this->onscreen && !empty($this->export))\n\t\t{\n\t\t\t//force download instead of onscreen display\n\n\t\t\t// Set headers\n\t\t\theader(\"Content-Description: File Transfer\");\n\n\t\t\tswitch($_POST['outputformat'])\n\t\t\t{\n\t\t\t\tcase 'XML':\n\t\t\t\t\theader(\"Content-Type: text/xml\");\n\t\t\t\t\t$ending = 'xml';\n\t\t\t\tbreak;\n\t\t\t\tcase 'JSON':\n\t\t\t\t\theader(\"Content-Type: text/json\");\n\t\t\t\t\t$ending = 'json';\n\t\t\t\tbreak;\n\t\t\t\tcase 'CSV':\n\t\t\t\tdefault:\n\t\t\t\t\theader(\"Content-Type: text/csv\");\n\t\t\t\t\t$ending = 'csv';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\theader('Content-Disposition: attachment; filename=export.'.$ending);\n\t\t\theader(\"Content-Transfer-Encoding: binary\");\n\n\n\t\t\theader('Expires: 0');\n\t\t\theader('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n\t\t\theader('Pragma: public');\n\n\t\t\theader('Content-Length: ' . strlen($this->export));\n\n\t\t\t@ob_clean();\n\t\t\t@flush();\n\n\t\t\techo $this->export;\n\n\t\t\t//no output\n\t\t\t$this->export = null;\n\n\t\t\texit;\n\t\t}\n\t\telseif(empty($this->export))\n\t\t{\n\t\t\t$this->error = \"No results found.\";\n\t\t}\n\n\t}", "title": "" }, { "docid": "041c0623beea736be225cc4a60aa11df", "score": "0.5877959", "text": "public function showData(){\n $result=$this->viewData();\n return $result;\n \n }", "title": "" }, { "docid": "6cc8a445d0c85422ca70ffdea322a1a7", "score": "0.58761597", "text": "public function output()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "3632dfb98c1c6e20609deb377b193353", "score": "0.58755875", "text": "function showOutput() { \n\t\n\tforeach($this->viewsLineUp as $view) { \n\t include INCLUDE_PATH . \"core/design/views/\".$view.\".view.php\";\n\t} //end foreach\n \n $this->closeDBHandle(); //free database resources\n }", "title": "" }, { "docid": "1fba86e649f962407aa01a8db220d88c", "score": "0.58719784", "text": "public static function getData()\n {\n return DB::select(\"SELECT * FROM vw_data_opa\");\n }", "title": "" }, { "docid": "cfc6c428a866dbee53cb00ec86c4ae59", "score": "0.58716124", "text": "public function saveString(){\n $content = '<table>';\n foreach ($this->tabl_data as $row) {\n $content .= '<tr>';\n foreach ($row as $cell) {\n $content .= '<td>'.$cell.'</td>';\n }\n $content .= '</tr>';\n }\n return $content.'</table>';\n }", "title": "" }, { "docid": "a7b02cf81c2f7c88c4387deae41e6374", "score": "0.5868989", "text": "public function out()\n\t\t{\n\t\t\tif ($this->type == \"json\")\n\t\t\t{\n\t\t\t\techo \"{ \\\"data\\\":\" .json_encode($this->data) . \"}\";\n\t\t\t}\n\t\t\telse\n\t\t\t\techo $this->data;\n\t\t}", "title": "" }, { "docid": "f2269d3474f0ddc93c571e9f7cbd839a", "score": "0.5862037", "text": "function controller_get_database(){\n\t\t\t$databaseObj=new Database;\n\t\t\t$tableObj=new Table;\n\t\t\t$columnObj=new Column;\n\t\t\t$tabObj=new Tab;\n\t\t\t$layoutObj=new Layout;\n\t\t\t\n\t\t\t$databaseObj->table_arr=$this->DB->db_table_get_all();\n\t\t\t$databaseObj->layout_arr=$this->DB->db_layout_get_all();\n\t\t\t\n\t\t\t/*for($i=0; $i<count($databaseObj->table_arr); $i++){\n\t\t\t\t$tableObj=$databaseObj->table_arr[$i];\n\t\t\t\t$columnObj=$this->DB->db_column_get_by_table($tableObj);\n\t\t\t\t$tableObj->column_arr[]=$columnObj;\n\t\t\t\t$databaseObj->table_arr[$i]=$tableObj;\n\t\t\t}*/\n\t\t\t\n\t\t\t/*for($i=0; $i<count($databaseObj->layout_arr); $i++){\n\t\t\t\t$layoutObj=$databaseObj->layout_arr[$i];\n\t\t\t\t$tabObj=$this->DB->db_tab_get_by_layout($layoutObj);\n\t\t\t\t$layoutObj->layout_tab_arr[]=$tabObj;\n\t\t\t\t$databaseObj->layout_arr[$i]=$layoutObj;\n\t\t\t}*/\n\t\t\t\n\t\t\techo json_encode($databaseObj);\n\t\t\t\n\t}", "title": "" }, { "docid": "4e4e969f8536fbfdf8b9daea176ebeba", "score": "0.5858142", "text": "public function viewBlock() {\n $this->applyEntityTokens();\n $this->applySettings();\n $prop = NULL;\n $rows = array();\n if (!(count($this->data) > 0)) {\n return '';\n }\n $out = '';\n return $out;\n }", "title": "" } ]
7d10446dc8927f81968f577db272cafc
Return a raw items response matching given endpoint and parameters.
[ { "docid": "cb5eb9b81af886dc543470710b24003e", "score": "0.6117522", "text": "protected function query(string $endpoint, array $parameters): ResponseInterface\n {\n $token = ! empty($this->config['use_preview']) ? 'preview' : 'live';\n\n $url = isset($parameters['id']) ? $this->url($endpoint) . '/' . $parameters['id'] : $this->url($endpoint);\n unset($parameters['id']);\n\n return $this->client->request('GET', $url, [\n RequestOptions::QUERY => array_merge($parameters, [\n 'access_token' => $this->config['tokens']['delivery'][$token],\n ]),\n ]);\n }", "title": "" } ]
[ { "docid": "5be87fbaa2ef94d7cbd8119589854006", "score": "0.6321347", "text": "public function get($parameters = array())\n {\n return $this->callItemEndpoint(__METHOD__);\n }", "title": "" }, { "docid": "611cea46754a516fc03a1287cfd29d2e", "score": "0.6307165", "text": "public function getItems()\n {\n $items = Item::all();\n return response($items, 200);\n }", "title": "" }, { "docid": "45cdcb006befd902068d2820d7e02fb7", "score": "0.61525387", "text": "public function get_item_response($request = null)\n {\n }", "title": "" }, { "docid": "27690b0be3cd9476ae65d149f8df7797", "score": "0.5997697", "text": "public function get(string $endpoint, array $params = []): array;", "title": "" }, { "docid": "27d199cc44527d793ce18927aad39ab5", "score": "0.5860721", "text": "public function get($endpoint);", "title": "" }, { "docid": "71aeea845236b7bd199217c4754b7541", "score": "0.58140355", "text": "public function get(array $queryParams, $endpoint);", "title": "" }, { "docid": "9cfdc74dcef0879d557193da78bbe4fc", "score": "0.57818186", "text": "public function get_item_response($item)\n {\n }", "title": "" }, { "docid": "2e561dd3a141b35ab1b11badb0e1be27", "score": "0.575859", "text": "public function get($endpoint = '', $query=[], $body='');", "title": "" }, { "docid": "8802ae751f692de6ab6338a2854e01f7", "score": "0.5711092", "text": "public function list(array $parameters): ListResponse;", "title": "" }, { "docid": "43a92d8b4a21d84198a37febbe0f6321", "score": "0.57044154", "text": "public function processAPI()\n {\n if (method_exists($this, $this->endpoint))\n {\n return $this->_response($this->{$this->endpoint}($this->args, $this->query));\n }\n return $this->_response(\"No Endpoint: $this->endpoint\", 404);\n }", "title": "" }, { "docid": "e0317bd0187397bd48d157eca7574389", "score": "0.5653534", "text": "function getProducts(){\r\n $res = file_get_contents(\"https://fakestoreapi.com/products?limit=5\");\r\n $res = json_decode($res, true);\r\n return $res;\r\n }", "title": "" }, { "docid": "2ba710d5732262444074bbb9da96add2", "score": "0.5595326", "text": "public function fetchItems($params = array()){\n $fetchedItems = array();\n $aparams = array_merge($params, ['target'=>'items']);\n $response = $this->request($aparams);\n $respArray = $response->parseResponseBody();\n $fetchedItems = $this->items->addItemsFromJson($respArray);\n \n return $fetchedItems;\n }", "title": "" }, { "docid": "7da374a0bb0936039166673cb1d6ab91", "score": "0.5587195", "text": "public function item($params = [])\n {\n $this->setMethod('travel.item');\n $this->checkParams($params, 'travel.item');\n\n $default = 'num_iid,title,pict_url,reserve_price,zk_final_price,from_city,dest_city,travel_type,sold_quantity,item_url,click_url';\n $this->fillFields($params, $default);\n\n return $this->getResponse($params);\n }", "title": "" }, { "docid": "4524939a1a0e53908e8e52e2abc403b1", "score": "0.5577395", "text": "public function get_item($endpoint, $id, $options = array()) {\n $path = 'v' . $this->version . '/' . $this->platform . '/' . $endpoint . '/' . $id;\n return $this->request($path, $options);\n }", "title": "" }, { "docid": "9fb22649c1688b58818c8890d402dded", "score": "0.555771", "text": "public function processAPI() \n {\n // if endpoint as method name exists, invoke with arguments, return with\n // processed response\n if (method_exists($this, $this->endpoint)) \n {\n return $this->_response($this->{$this->endpoint}($this->args));\n }\n return $this->_response(\"No Endpoint: $this->endpoint\", 404);\n }", "title": "" }, { "docid": "31b6fa8ac14fed1a17e182f26c68987b", "score": "0.5530817", "text": "public function get_item_response($package)\n {\n }", "title": "" }, { "docid": "7e01673b3461122cc669ee6dc28b0f01", "score": "0.54982865", "text": "public function respondWithCollection(array $items)\n {\n if (!!$this->resourceCount) {\n $data[self::RESOURCE]['total_count'] = $this->resourceCount;\n }\n if (!!$this->resourceType) {\n $data[self::RESOURCE][$this->resourceType] = $items;\n } else {\n $data[self::RESOURCE] = $items;\n }\n if (!!$this->paginatedData) {\n if (!!$this->resourceType) {\n $data[self::RESOURCE]['paginate'] = $this->paginatedData;\n } else {\n $data['paginate'] = $this->paginatedData;\n }\n }\n $data['status'] = (!!$this->customStatusCode) ? $this->customStatusCode : 2000;\n return $this->respond($data);\n }", "title": "" }, { "docid": "a02cef029e068b9badc3fb3df4352d1e", "score": "0.54676735", "text": "public function getRawResponse();", "title": "" }, { "docid": "bef41aaf1708aac7331b0ad67fa4e0f2", "score": "0.54672605", "text": "public function index(){\n return Response::json(Item::get());\n }", "title": "" }, { "docid": "0b2da3805dee8815558ff67af71d3a3e", "score": "0.54649264", "text": "public function index()\r\n {\r\n $filters = request([\"sort_by\", \"description\", \"num_items\"]);\r\n $items = InventoryItem::filter($filters)\r\n ->with(\"user\")\r\n ->with(\"transactionSummary\")\r\n ->get();\r\n\r\n return array(\"items\" => $items);\r\n }", "title": "" }, { "docid": "ebfaf76c834f6796d7f8f4838e41c46a", "score": "0.545425", "text": "public function _get(string $uri, array $query = []): ApiResponse;", "title": "" }, { "docid": "6e98ba2b31bd915d75e6696a60833b6f", "score": "0.54268086", "text": "public function index()\n {\n $items=Item::all();\n return response()->json([\n\n 'status'=>'ok',\n 'totalResults'=>count($items),\n 'items'=> ItemResource::collection($items),\n ]);\n }", "title": "" }, { "docid": "4905f5c28a3808addc97197cc1eee297", "score": "0.53905135", "text": "public function get($request) {\n\n\t\t// Build search query\n\t\t$query = $this->adapter->getQuery(array('start', 'rows', 'group'));\n\n\t\t// Get field to group on\n\t\t$group = (empty($_GET['group'])) ? null : $_GET['group'];\n\n\t\t// Ignore pagination parameters if we're grouping\n\t\tif (!is_null($group)) {\n\n\t\t\t$start = 0;\n\t\t\t$rows = $this->config['max_rows'];\n\n\t\t// Get pagination parameters\n\t\t} else {\n\n\t\t\t$start = $this->getUnsignedParam('start', 0);\n\t\t\t$rows = $this->getUnsignedParam('rows', $this->config['default_rows']);\n\n\t\t\t// Limit number of rows that can be requested\n\t\t\tif ($rows > $this->config['max_rows']) {\n\t\t\t\t$rows = $this->config['default_rows'];\n\t\t\t}\n\n\t\t}\n\n\t\t// Run search\n\t\t$this->adapter->search($query, $start, $rows);\n\n\t\t/**\n\t\t * Process search results\n\t\t */\n\t\t$total = $this->adapter->getNumResults();\n\n\t\tif ($total == 1) {\n\n\t\t\t// Return single results as a single resource\n\t\t\t$data = $this->adapter->getSingleResult();\n\n\t\t} elseif (!is_null($group) && $total > 0) {\n\n\t\t\t// Return an aggregate resource if we're grouping\n\t\t\t$data = $this->adapter->getAggregateResult($group);\n\t\t\t$data['total'] = $total;\n\n\t\t} else {\n\n\t\t\t// Return multiple resources as a list\n\t\t\t$data = $this->adapter->getResults();\n\t\t\t$data['total']\t= $total;\n\t\t\t$data['start']\t= $start;\n\t\t\t$data['end']\t= min($rows, $total);\n\n\t\t}\n\n\t\t// Build response\n\t\t$response = new Response($request);\n\t\t$response->code = Response::OK;\n\t\t$response->addHeader('Content-type', 'application/json');\n\t\t$response->body = json_encode($data);\n\n\t\treturn $response;\n\n }", "title": "" }, { "docid": "8c210b5b78b4ca294a190252bb6ce9c2", "score": "0.5378928", "text": "function getBasesList(){\r\n \t$resourceUrl = \"/bases?Take=All\";\r\n\t\t$this->get($resourceUrl);\r\n\t\t// Check reponse status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for Bases Failed.\r\n\t\t\t\t\tStatus: %d\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n }", "title": "" }, { "docid": "dd40b59a209cdda58bb2f5fa34386c3b", "score": "0.5368098", "text": "public function getPublicData(string $endpoint, array $params = []): mixed\n {\n return $this->getResponse($endpoint, 'GET', $params, false);\n }", "title": "" }, { "docid": "146777633557521260d0b424c2a28ca9", "score": "0.5365279", "text": "public function get_item_response($product)\n {\n }", "title": "" }, { "docid": "ad1fd6be4e81ef3a6d994da2dd44c405", "score": "0.53616774", "text": "public function getProducts($perPage = 100, $page = 1)\n {\n// if (!is_int($perPage) || $perPage > 100 || $perPage < 1) $perPage = 1;\n// if (!is_int($page) || $page < 1) $page = 1; // $page must be an integer greater than 0\n\n\n $BrandsgatewayURL = \"$this->requestUrl?per_page=$perPage&page=$page&store_id=$this->storeId\";\n\n // Create request\n $client = new Client($this->headers);\n $res = $client->get($BrandsgatewayURL, ['auth' => [$this->user, $this->password]]);\n\n // Return results\n return $res->getStatusCode() === 200 ? json_decode($res->getBody())\n : $res->getStatusCode().': '.$res->getReasonPhrase();\n }", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.5361398", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.5361398", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.5361398", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.5361398", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.5361398", "text": "public function getItems();", "title": "" }, { "docid": "77694419e1f065a5f320ac742048c9d8", "score": "0.5349078", "text": "public abstract function search_items(\\WP_REST_Request $request);", "title": "" }, { "docid": "517c8ae23f501799eb05c26bcfbb2ed8", "score": "0.5320786", "text": "public function get_items($request)\n {\n }", "title": "" }, { "docid": "517c8ae23f501799eb05c26bcfbb2ed8", "score": "0.5320786", "text": "public function get_items($request)\n {\n }", "title": "" }, { "docid": "b71dc848a544a381df86bb5b9f2b2319", "score": "0.5306912", "text": "public static function find($params)\n {\n $myName = explode('\\\\', __CLASS__);\n $params['provider'] = strtolower(array_pop($myName));\n\n try {\n if ($params['credentials'] && count($params['credentials']) > 0) {\n foreach ($params['credentials'] as $credential => $value) {\n $params['params'][$credential] = $value;\n }\n }\n\n $apiRequest = self::connectApiXml($params);\n if ($apiRequest['resolution'] !== 'success') {\n throw new Exception($apiRequest['data']);\n }\n\n $dataCollection = [];\n if ($apiRequest['data']['paginationOutput']['totalEntries'] > 0) {\n $model = ModelFactory::create('Ebay');\n $model->loadAttributes($model->attributes);\n\n $dataCollection['paginationOutput'] = $apiRequest['data']['paginationOutput'];\n foreach ($apiRequest['data']['searchResult']['item'] as $item) {\n $model->provider = $params['provider'];\n $model->merchant_id = $item['sellerInfo']['sellerUserName'];\n $model->merchant_logo_url = ($item['sellerInfo']['sellerUserName']) ?\n '/usr/' . $item['sellerInfo']['sellerUserName'] : '';\n $model->item_id = $item['itemId'];\n $model->click_out_link = $item['viewItemURL'];\n $model->main_photo_url = $item['galleryURL'];\n $model->price = $item['sellingStatus']['currentPrice'];\n $model->price_currency = $item['currency'];\n $model->shipping_price = $item['shippingInfo']['shippingServiceCost'];\n $model->title = $item['title'];\n $model->valid_until = $item['listingInfo']['endTime'];\n $model->brand = $item['brand'];\n $dataCollection['data'][] = $model->data;\n }\n }\n\n return [\n 'resolution' => 'success',\n 'data' => $dataCollection\n ];\n } catch (Exception $exception) {\n return [\n 'resolution' => 'error',\n 'data' => ['exception' => $exception->getMessage()]\n ];\n }\n }", "title": "" }, { "docid": "862c4e68f7fc5bd8a139d8459fcf77bf", "score": "0.5287964", "text": "public function getGetItems()\n\t{\n\t\tif (!$this->request->ajax()) { return $this->ajaxErrorResponse(); }\n\n\t\treturn $this->item_model\n\t\t\t->with('type')\n\t\t\t->with('type.group')\n\t\t\t->with('type.group.category')\n\t\t\t->get()\n\t\t\t->toJson();\n\t}", "title": "" }, { "docid": "c9ef64419cba0bb19ab005316470dd31", "score": "0.528326", "text": "public function getList(): RestResponse\n {\n try {\n $flats = $this->flatService->getFlats();\n\n return new RestResponse($flats, 200);\n } catch (RestException $e) {\n return new RestResponse(null, $e->getCode());\n } catch (Exception $e) {\n return new RestResponse(null, 500);\n }\n }", "title": "" }, { "docid": "d0db98b2ae78b256792b5e416abab68c", "score": "0.5272856", "text": "function get_items( $url, $args=array() ) {\n $response = wp_remote_get( $url, $args );\n //$this->debug($response);\n if ( is_array( $response ) ) {\n $header = $response['headers']; // array of http header lines\n $data = $response['body']; // use the content\n if ( $header[\"content-type\"] === \"application/json\" ) {\n return json_decode($data);\n } else {\n return $data;\n }\n } else {\n $error = new WP_Error( 'epfl-ws', 'get_items() error', 'Fetching remote content with get_items() and ' . $url . ' returned an error' );\n $this->log( $error );\n }\n }", "title": "" }, { "docid": "382c9467db073ffaa2333977b3784e69", "score": "0.52719164", "text": "function api_call($endpoint, $method, array $parameters = null, array $call_details = null)\n\t{\n\t\tif (!$endpoint) return false;\n\t\tif (!$method) return false;\n\t\t\n\t\t// Set defaults\n\t\tif (!is_array($call_details))\n\t\t\t$call_details = array();\n\t\t\n\t\tif (!$call_details['method']) $call_details['method'] = 'GET';\n\t\tif (!$call_details['headers']) $call_details['headers'] = array();\n\t\t\n\t\t// Construct parameters\n\t\tif (!$parameters) $parameters = array();\n\t\t$parameters['method'] = $method;\n\t\t$parameters['view'] = 'php';\n\t\t\n\t\t$params = array();\n\t\t\n\t\tforeach ($parameters as $k => $v) {\n\t\t if (is_array($v))\n\t\t\tforeach ($v as $v_k => $v_v)\n\t\t\t $params[] = urlencode($k).\"[$v_k]=\".urlencode($v_v);\n\t\t else\n\t\t\t$params[] = urlencode($k).'='.urlencode($v);\n\t\t}\n\t\t\t\n\t\t$endpoint .= '?' . implode('&', $params);\n\t\t\n\t\t\n\t\t// Now construct stream\n\t\t$http = array (\n\t\t\t'method' => strtoupper($call_details['method']),\n\t\t\t'header' => implode(\"\\r\\n\", $call_details['headers']) . \"\\r\\n\"\n\t\t);\n\t\tif (strtoupper($call_details['method'])=='POST') $http['content'] = $call_details['postdata'];\n\t\t\n\t\t// Execute query\n\t\t$ctx = stream_context_create(array(\n\t\t\t'http' => $http \n\t\t));\n\t\t\n\t\t$fp = @fopen($endpoint, 'rb', false, $ctx);\n\t\tif (!$fp) return false;\n\t\t$response = @stream_get_contents($fp);\n\t\tfclose($fp);\n\t\t\n\t\tif (!$response) return false;\n\t\t$response = unserialize($response);\n\t\tif ((!$response) || (!($response instanceof APIResult))) return false;\n\t\t\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "9c1b2d1d9dcf15c729d47e246d42f8bc", "score": "0.5264178", "text": "public function items()\n {\n\n // Get the requested language\n $language = $this->requestedLanguage();\n\n // Grab the collection of requested items\n $collection = Redis::get(CacheItem::$cache_prefix . AllTradeableItemList::$key);\n $collection = unserialize($collection);\n\n // Go through the collection and clean up the attributes\n foreach ($collection as &$item) {\n\n // Rename \"name\" attribute\n $item['name'] = $item['name_' . $language];\n unset($item['name_en']);\n unset($item['name_de']);\n unset($item['name_fr']);\n unset($item['name_es']);\n\n }\n\n return $this->apiResponse($collection, 86400);\n\n }", "title": "" }, { "docid": "a7ada7099e229ec6e0a2f20723d909b4", "score": "0.526284", "text": "public static function get_items_returns() {\n return new external_single_structure(\n array(\n 'items' => new external_multiple_structure(\n feedback_item_exporter::get_read_structure()\n ),\n 'warnings' => new external_warnings(),\n )\n );\n }", "title": "" }, { "docid": "fc368e3023ef1588b24c1ee937587dea", "score": "0.52568454", "text": "public function getItems($item)\r\n {\r\n }", "title": "" }, { "docid": "2d19cc8b1e497c09f975697d32743cec", "score": "0.52493405", "text": "function get($request) {\n \n $response = new Response($request);\n $collection = str_replace('/', DIRECTORY_SEPARATOR, $this->collection);\n \n $resourceUris = '';\n $files = glob($collection.DIRECTORY_SEPARATOR.'*');\n if ($files) {\n foreach ($files as $filepath) {\n \t$filepath = str_replace(DIRECTORY_SEPARATOR, '/', $filepath);\n $resourceUris .= '<li><a href=\"'.$this->turnFilePathIntoUri($filepath, $request).'\">'.basename($filepath).'</a></li>';\n }\n } else {\n $resourceUris .= '<li>Empty collection</li>';\n }\n \n $response->body = '<ul>'.$resourceUris.'</ul>';\n \n return $response;\n \n }", "title": "" }, { "docid": "862440ebdd514daf26f8196f4ffdee82", "score": "0.52461326", "text": "protected function query($endpoint, $params)\n {\n $params = $this->params($params);\n $cachekey = str_replace('/', '.', \"$this->name.$endpoint\");\n\n // return cached if it exists.\n $content = $this->cache($cachekey);\n if ($content) {\n return $content;\n }\n\n // create a path string from params array\n $path = implode('/', $params['path']);\n if ($path) {\n $path = \"/$path\";\n }\n\n try {\n $http = new Guzzle(['base_uri' => $this->host()]);\n $response = $http->get($endpoint.$path, ['query' => $params['query']]);\n } catch( ClientException $e) {\n return $e->getMessage();\n }\n\n $content = (string) $response->getBody();\n $this->cache($cachekey, $content);\n\n return $content;\n }", "title": "" }, { "docid": "789c475d54aefaaed244e17724f86136", "score": "0.5241196", "text": "public function index()\n {\n return response()->json(Item::paginate(10000), 200);\n }", "title": "" }, { "docid": "dbdc5a0457199fe2ebaa464ec5be2a61", "score": "0.523193", "text": "public function getStarredItems()\n {\n $items = Item::where('starred', true)->get();\n return response($items, 200);\n }", "title": "" }, { "docid": "ec9a09d7533dc3bdb9af59045ecf4953", "score": "0.5228949", "text": "public function products()\n {\n // api call to shopify\n// try {\n// $request = $this->client->get($this->url);\n// $response = $request->getBody();\n\n $response = array(\n 0 =>\n array(\n 'id' => 799,\n 'name' => 'Ship Your Idea',\n 'slug' => 'ship-your-idea-22',\n 'permalink' => 'https://example.com/product/ship-your-idea-22/',\n 'date_created' => '2017-03-23T17:03:12',\n 'date_created_gmt' => '2017-03-23T20:03:12',\n 'date_modified' => '2017-03-23T17:03:12',\n 'date_modified_gmt' => '2017-03-23T20:03:12',\n 'type' => 'variable',\n 'status' => 'publish',\n 'featured' => false,\n 'catalog_visibility' => 'visible',\n 'description' => '<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>\n',\n 'short_description' => '<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p>\n',\n 'sku' => '',\n 'price' => '',\n 'regular_price' => '',\n 'sale_price' => '',\n 'date_on_sale_from' => NULL,\n 'date_on_sale_from_gmt' => NULL,\n 'date_on_sale_to' => NULL,\n 'date_on_sale_to_gmt' => NULL,\n 'price_html' => '',\n 'on_sale' => false,\n 'purchasable' => false,\n 'total_sales' => 0,\n 'virtual' => false,\n 'downloadable' => false,\n 'downloads' =>\n array(),\n 'download_limit' => -1,\n 'download_expiry' => -1,\n 'external_url' => '',\n 'button_text' => '',\n 'tax_status' => 'taxable',\n 'tax_class' => '',\n 'manage_stock' => false,\n 'stock_quantity' => NULL,\n 'stock_status' => 'instock',\n 'backorders' => 'no',\n 'backorders_allowed' => false,\n 'backordered' => false,\n 'sold_individually' => false,\n 'weight' => '',\n 'dimensions' =>\n array(\n 'length' => '',\n 'width' => '',\n 'height' => '',\n ),\n 'shipping_required' => true,\n 'shipping_taxable' => true,\n 'shipping_class' => '',\n 'shipping_class_id' => 0,\n 'reviews_allowed' => true,\n 'average_rating' => '0.00',\n 'rating_count' => 0,\n 'related_ids' =>\n array(\n 0 => 31,\n 1 => 22,\n 2 => 369,\n 3 => 414,\n 4 => 56,\n ),\n 'upsell_ids' =>\n array(),\n 'cross_sell_ids' =>\n array(),\n 'parent_id' => 0,\n 'purchase_note' => '',\n 'categories' =>\n array(\n 0 =>\n array(\n 'id' => 9,\n 'name' => 'Clothing',\n 'slug' => 'clothing',\n ),\n 1 =>\n array(\n 'id' => 14,\n 'name' => 'T-shirts',\n 'slug' => 't-shirts',\n ),\n ),\n 'tags' =>\n array(),\n 'images' =>\n array(\n 0 =>\n array(\n 'id' => 795,\n 'date_created' => '2017-03-23T14:03:08',\n 'date_created_gmt' => '2017-03-23T20:03:08',\n 'date_modified' => '2017-03-23T14:03:08',\n 'date_modified_gmt' => '2017-03-23T20:03:08',\n 'src' => 'https://example.com/wp-content/uploads/2017/03/T_4_front-11.jpg',\n 'name' => '',\n 'alt' => '',\n ),\n 1 =>\n array(\n 'id' => 796,\n 'date_created' => '2017-03-23T14:03:09',\n 'date_created_gmt' => '2017-03-23T20:03:09',\n 'date_modified' => '2017-03-23T14:03:09',\n 'date_modified_gmt' => '2017-03-23T20:03:09',\n 'src' => 'https://example.com/wp-content/uploads/2017/03/T_4_back-10.jpg',\n 'name' => '',\n 'alt' => '',\n ),\n 2 =>\n array(\n 'id' => 797,\n 'date_created' => '2017-03-23T14:03:10',\n 'date_created_gmt' => '2017-03-23T20:03:10',\n 'date_modified' => '2017-03-23T14:03:10',\n 'date_modified_gmt' => '2017-03-23T20:03:10',\n 'src' => 'https://example.com/wp-content/uploads/2017/03/T_3_front-10.jpg',\n 'name' => '',\n 'alt' => '',\n ),\n 3 =>\n array(\n 'id' => 798,\n 'date_created' => '2017-03-23T14:03:11',\n 'date_created_gmt' => '2017-03-23T20:03:11',\n 'date_modified' => '2017-03-23T14:03:11',\n 'date_modified_gmt' => '2017-03-23T20:03:11',\n 'src' => 'https://example.com/wp-content/uploads/2017/03/T_3_back-10.jpg',\n 'name' => '',\n 'alt' => '',\n ),\n ),\n 'attributes' =>\n array(\n 0 =>\n array(\n 'id' => 6,\n 'name' => 'Color',\n 'position' => 0,\n 'visible' => false,\n 'variation' => true,\n 'options' =>\n array(\n 0 => 'Black',\n 1 => 'Green',\n ),\n ),\n 1 =>\n array(\n 'id' => 0,\n 'name' => 'Size',\n 'position' => 0,\n 'visible' => true,\n 'variation' => true,\n 'options' =>\n array(\n 0 => 'S',\n 1 => 'M',\n ),\n ),\n ),\n 'default_attributes' =>\n array(),\n 'variations' =>\n array(),\n 'grouped_products' =>\n array(),\n 'menu_order' => 0,\n 'meta_data' =>\n array(),\n '_links' =>\n array(\n 'self' =>\n array(\n 0 =>\n array(\n 'href' => 'https://example.com/wp-json/wc/v3/products/799',\n ),\n ),\n 'collection' =>\n array(\n 0 =>\n array(\n 'href' => 'https://example.com/wp-json/wc/v3/products',\n ),\n ),\n ),\n ),\n 1 =>\n array(\n 'id' => 794,\n 'name' => 'Premium Quality',\n 'slug' => 'premium-quality-19',\n 'permalink' => 'https://example.com/product/premium-quality-19/',\n 'date_created' => '2017-03-23T17:01:14',\n 'date_created_gmt' => '2017-03-23T20:01:14',\n 'date_modified' => '2017-03-23T17:01:14',\n 'date_modified_gmt' => '2017-03-23T20:01:14',\n 'type' => 'simple',\n 'status' => 'publish',\n 'featured' => false,\n 'catalog_visibility' => 'visible',\n 'description' => '<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>\n',\n 'short_description' => '<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p>\n',\n 'sku' => '',\n 'price' => '21.99',\n 'regular_price' => '21.99',\n 'sale_price' => '',\n 'date_on_sale_from' => NULL,\n 'date_on_sale_from_gmt' => NULL,\n 'date_on_sale_to' => NULL,\n 'date_on_sale_to_gmt' => NULL,\n 'price_html' => '<span class=\"woocommerce-Price-amount amount\"><span class=\"woocommerce-Price-currencySymbol\">&#36;</span>21.99</span>',\n 'on_sale' => false,\n 'purchasable' => true,\n 'total_sales' => 0,\n 'virtual' => false,\n 'downloadable' => false,\n 'downloads' =>\n array(),\n 'download_limit' => -1,\n 'download_expiry' => -1,\n 'external_url' => '',\n 'button_text' => '',\n 'tax_status' => 'taxable',\n 'tax_class' => '',\n 'manage_stock' => false,\n 'stock_quantity' => NULL,\n 'stock_status' => 'instock',\n 'backorders' => 'no',\n 'backorders_allowed' => false,\n 'backordered' => false,\n 'sold_individually' => false,\n 'weight' => '',\n 'dimensions' =>\n array(\n 'length' => '',\n 'width' => '',\n 'height' => '',\n ),\n 'shipping_required' => true,\n 'shipping_taxable' => true,\n 'shipping_class' => '',\n 'shipping_class_id' => 0,\n 'reviews_allowed' => true,\n 'average_rating' => '0.00',\n 'rating_count' => 0,\n 'related_ids' =>\n array(\n 0 => 463,\n 1 => 47,\n 2 => 31,\n 3 => 387,\n 4 => 458,\n ),\n 'upsell_ids' =>\n array(),\n 'cross_sell_ids' =>\n array(),\n 'parent_id' => 0,\n 'purchase_note' => '',\n 'categories' =>\n array(\n 0 =>\n array(\n 'id' => 9,\n 'name' => 'Clothing',\n 'slug' => 'clothing',\n ),\n 1 =>\n array(\n 'id' => 14,\n 'name' => 'T-shirts',\n 'slug' => 't-shirts',\n ),\n ),\n 'tags' =>\n array(),\n 'images' =>\n array(\n 0 =>\n array(\n 'id' => 792,\n 'date_created' => '2017-03-23T14:01:13',\n 'date_created_gmt' => '2017-03-23T20:01:13',\n 'date_modified' => '2017-03-23T14:01:13',\n 'date_modified_gmt' => '2017-03-23T20:01:13',\n 'src' => 'https://example.com/wp-content/uploads/2017/03/T_2_front-4.jpg',\n 'name' => '',\n 'alt' => '',\n ),\n 1 =>\n array(\n 'id' => 793,\n 'date_created' => '2017-03-23T14:01:14',\n 'date_created_gmt' => '2017-03-23T20:01:14',\n 'date_modified' => '2017-03-23T14:01:14',\n 'date_modified_gmt' => '2017-03-23T20:01:14',\n 'src' => 'https://example.com/wp-content/uploads/2017/03/T_2_back-2.jpg',\n 'name' => '',\n 'alt' => '',\n ),\n ),\n 'attributes' =>\n array(),\n 'default_attributes' =>\n array(\n 0 =>\n array(\n 'id' => 6,\n 'name' => 'Color',\n 'option' => 'black',\n ),\n 1 =>\n array(\n 'id' => 0,\n 'name' => 'Size',\n 'option' => 'S',\n ),\n ),\n 'variations' =>\n array(),\n 'grouped_products' =>\n array(),\n 'menu_order' => 0,\n 'meta_data' =>\n array(),\n '_links' =>\n array(\n 'self' =>\n array(\n 0 =>\n array(\n 'href' => 'https://example.com/wp-json/wc/v3/products/794',\n ),\n ),\n 'collection' =>\n array(\n 0 =>\n array(\n 'href' => 'https://example.com/wp-json/wc/v3/products',\n ),\n ),\n ),\n ),\n );\n\n $products = $this->transformData($response);\n\n return response()->json($products);\n// }catch (\\Exception $exception){\n// Log::error($exception->getMessage(), ['_trace' => $exception->getTraceAsString()]);\n//\n// throw new \\Exception('Whoops! something went wrong with WooCommerce product listings.', 500);\n// }\n }", "title": "" }, { "docid": "a465fcaf0650ef5bb16aebb574426990", "score": "0.52263063", "text": "public function index()\n {\n return response()->json([\n 'items' => [\n 'bodyitems' => BodyItem::all(),\n 'headitems' => HeadItem::all(),\n 'upperbodyitems' => UpperBodyItem::all(),\n 'lowerbodyitems' => LowerBodyItem::all(),\n 'extraitems' => ExtraItem::all(),\n ],\n 'status' => 'success'\n ], 200);\n }", "title": "" }, { "docid": "e614f2810ba377950c284c93233bbac8", "score": "0.5221238", "text": "public function actionGetElements(): Response\n {\n $includeActions = ($this->context === 'index');\n $responseData = $this->elementResponseData(true, $includeActions);\n\n return $this->asJson($responseData);\n }", "title": "" }, { "docid": "99f84bf2ad4503ff3fcfb5f6a2951d43", "score": "0.5216722", "text": "public function get($endpoint, $params = []) {\n return $this->request($endpoint, $params)->getData();\n }", "title": "" }, { "docid": "21ecd6e0b3f3dd54bbe10173acaec185", "score": "0.5214926", "text": "public function raw(): ?ResponseInterface\n {\n return $this->doRequest($this->type, $this->endpoint, $this->params, true);\n }", "title": "" }, { "docid": "be5d49bf2766c308002e842a384eed0f", "score": "0.52084327", "text": "function productSearch()\r\n{\r\n $json_str = file_get_contents(HC_PATH.\"getItemsForAccount\".get_credentials());\r\n $products = json_decode($json_str, true);\r\n if(isset($products['errors'])) death(\"Service call returned an error.\"); //If the service call is bad, call death.\r\n printItems($products['items']);\r\n}", "title": "" }, { "docid": "fc18906fa935ae26ef97f1d7292132bc", "score": "0.519818", "text": "public function getItems(...$types);", "title": "" }, { "docid": "43d04cc5d95bc95b1e4209ca8c1eec78", "score": "0.51910627", "text": "public function get_list($endpoint, $options = array()) {\n $path = 'v' . $this->version . '/' . $this->platform . '/' . $endpoint;\n return $this->request($path, $options);\n }", "title": "" }, { "docid": "7c9f9d2402b69627398031a9b6d911d3", "score": "0.51896805", "text": "public function getResponse(Request $request);", "title": "" }, { "docid": "77a8a4f0526871c766ac9c3f8ed73e2c", "score": "0.5181565", "text": "public function get($params = []);", "title": "" }, { "docid": "4921ba7978806e0c5ee7da6e6aae9682", "score": "0.517046", "text": "public function prepare_item_for_response( $item, $request ) {\n\t\t\treturn rest_ensure_response( $item );\n\t}", "title": "" }, { "docid": "14a7c2aed604f21caab399e883f82fa7", "score": "0.5168609", "text": "public function prepare_item_for_response( $item, $request ) {\n\t\t$data = $this->add_additional_fields_to_object( $item, $request );\n\t\t$data = $this->filter_response_by_context( $data, 'view' );\n\t\t$response = rest_ensure_response( $data );\n\n\t\t$response->add_links( $this->prepare_links( $item ) );\n\n\t\t/**\n\t\t * Filter the list returned from the API.\n\t\t *\n\t\t * @param WP_REST_Response $response The response object.\n\t\t * @param array $item The original item.\n\t\t * @param WP_REST_Request $request Request used to generate the response.\n\t\t */\n\t\treturn apply_filters( 'woocommerce_rest_prepare_data_download_ip', $response, $item, $request );\n\t}", "title": "" }, { "docid": "9ccf6e2da50517b42c282deb1dedab4c", "score": "0.5167665", "text": "public function list(Request $request): Response\n {\n $filters = $request->input('filters') ?? [];\n $query = Advert::on();\n\n // Filter per advertiser\n if (array_key_exists('advertiser', $filters)) {\n $query = $query->where('poster', '=', $filters['advertiser']);\n }\n\n // Filter by search terms\n if (array_key_exists('search_terms', $filters)) {\n foreach ($filters['search_terms'] as $term) {\n $term = '%' . $term . '%';\n $query = $query->where('heading', 'like', $term)->orWhere('body', 'like', $term);\n }\n }\n\n // Paginate by number of items per page\n if (array_key_exists('page_number', $filters)) {\n $query = $query->forPage($filters['page_number'], $filters['per_page']);\n }\n\n return new Response($query->get()->toArray(), 200);\n }", "title": "" }, { "docid": "c1c86cb596691a40a10027b581e58bb5", "score": "0.5167165", "text": "abstract public function getResponse();", "title": "" }, { "docid": "8e301bcc427c466b9272b767645856bc", "score": "0.5165771", "text": "public function get(string $uri, array $params = [], array $headers = [], $sink = null): ResponseInterface;", "title": "" }, { "docid": "f88626e54cffba304f2cc272079a8f4d", "score": "0.5157943", "text": "public function index()\n {\n $items = Item::orderBy('id_item', 'DESC')->get();\n\n $response = [\n 'message' => 'List items order by id_item',\n 'data' => $items\n ];\n\n return response()->json($response, Response::HTTP_OK);\n }", "title": "" }, { "docid": "9e4aa3765a088d74ea20e0e8231d81d1", "score": "0.51531655", "text": "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "title": "" }, { "docid": "79d87d4a21331d1556a3580ab0cf5a1d", "score": "0.51417226", "text": "public function getRawResponse() {\n\t}", "title": "" }, { "docid": "a17474c8a532b68275193e685e9a3fc9", "score": "0.5139934", "text": "public function getAllItems()\n { \n return $this->getQuote()->getAllRequestItems();\n }", "title": "" }, { "docid": "1ca71a82b52685d584b306022e9ed855", "score": "0.51381904", "text": "public function getProducts($params, $request);", "title": "" }, { "docid": "739cc44ea92869d9dc130ffd1ba4eb1e", "score": "0.51301694", "text": "public function index()\n {\n $items = Item::orderBy('id','DESC')->get();\n\n return response()->json([\n 'items' => $items\n ]);\n }", "title": "" }, { "docid": "668188f716948c0afcf013a1677e4edd", "score": "0.5123834", "text": "public function index()\n {\n //\n return $this->apiResponse(200, \"Products found\", [\n 'products' => Product::with('images')->orderBy('updated_at', 'desc')->get()\n ]);\n }", "title": "" }, { "docid": "a497e0139ece0182161720e9cf294b95", "score": "0.51092446", "text": "public function raw($data): PsrResponseInterface;", "title": "" }, { "docid": "7806db4bc2a182b164d5a70349100cd0", "score": "0.50937957", "text": "public function callAPIGetListProducts()\n {\n $session = $this->currentSession->testStaffLogin();\n $serviceInfo = [\n 'rest' => [\n 'resourcePath' => self::PRODUCT_LIST_RESOURCE_PATH.self::GET_LIST_RESOURCE_PATH1.$session,\n 'httpMethod' => RestRequest::HTTP_METHOD_GET,\n ],\n ];\n $results = $this->_webApiCall($serviceInfo);\n //\\Zend_Debug::dump($results);\n return $results;\n }", "title": "" }, { "docid": "1408b3d6871def5f5a33f6d5b9df6808", "score": "0.508564", "text": "public function getResponse()\n\t{\n\t\t$query = '';\n\t\tif (sizeof($this->parameters) > 0)\n\t\t{\n\t\t\t$query = substr($this->uri, -1) !== '?' ? '?' : '&';\n\t\t\tforeach ($this->parameters as $var => $value)\n\t\t\t\tif ($value == null || $value == '') $query .= $var.'&';\n\t\t\t\telse $query .= $var.'='.rawurlencode($value).'&';\n\t\t\t$query = substr($query, 0, -1);\n\t\t\t$this->uri .= $query;\n\n\t\t\tif (array_key_exists('acl', $this->parameters) ||\n\t\t\tarray_key_exists('location', $this->parameters) ||\n\t\t\tarray_key_exists('torrent', $this->parameters) ||\n\t\t\tarray_key_exists('website', $this->parameters) ||\n\t\t\tarray_key_exists('logging', $this->parameters))\n\t\t\t\t$this->resource .= $query;\n\t\t}\n\t\t$url = (S3Compatible::$useSSL ? 'https://' : 'http://') . ($this->headers['Host'] !== '' ? $this->headers['Host'] : $this->endpoint) . $this->uri;\n\n\t\t//var_dump('bucket: ' . $this->bucket, 'uri: ' . $this->uri, 'resource: ' . $this->resource, 'url: ' . $url);\n\n\t\t// Basic setup\n\t\t$curl = curl_init();\n\t\tcurl_setopt($curl, CURLOPT_USERAGENT, 'S3/php');\n\n\t\tif (S3Compatible::$useSSL)\n\t\t{\n\t\t\t// Set protocol version\n\t\t\tcurl_setopt($curl, CURLOPT_SSLVERSION, S3Compatible::$useSSLVersion);\n\n\t\t\t// SSL Validation can now be optional for those with broken OpenSSL installations\n\t\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYHOST, S3Compatible::$useSSLValidation ? 2 : 0);\n\t\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, S3Compatible::$useSSLValidation ? 1 : 0);\n\n\t\t\tif (S3Compatible::$sslKey !== null) curl_setopt($curl, CURLOPT_SSLKEY, S3Compatible::$sslKey);\n\t\t\tif (S3Compatible::$sslCert !== null) curl_setopt($curl, CURLOPT_SSLCERT, S3Compatible::$sslCert);\n\t\t\tif (S3Compatible::$sslCACert !== null) curl_setopt($curl, CURLOPT_CAINFO, S3Compatible::$sslCACert);\n\t\t}\n\n\t\tcurl_setopt($curl, CURLOPT_URL, $url);\n\n\t\tif (S3Compatible::$proxy != null && isset(S3Compatible::$proxy['host']))\n\t\t{\n\t\t\tcurl_setopt($curl, CURLOPT_PROXY, S3Compatible::$proxy['host']);\n\t\t\tcurl_setopt($curl, CURLOPT_PROXYTYPE, S3Compatible::$proxy['type']);\n\t\t\tif (isset(S3Compatible::$proxy['user'], S3Compatible::$proxy['pass']) && S3Compatible::$proxy['user'] != null && S3Compatible::$proxy['pass'] != null)\n\t\t\t\tcurl_setopt($curl, CURLOPT_PROXYUSERPWD, sprintf('%s:%s', S3Compatible::$proxy['user'], S3Compatible::$proxy['pass']));\n\t\t}\n\n\t\t// Headers\n\t\t$headers = array(); $amz = array();\n\t\tforeach ($this->amzHeaders as $header => $value)\n\t\t\tif (strlen($value) > 0) $headers[] = $header.': '.$value;\n\t\tforeach ($this->headers as $header => $value)\n\t\t\tif (strlen($value) > 0) $headers[] = $header.': '.$value;\n\n\t\t// Collect AMZ headers for signature\n\t\tforeach ($this->amzHeaders as $header => $value)\n\t\t\tif (strlen($value) > 0) $amz[] = strtolower($header).':'.$value;\n\n\t\t// AMZ headers must be sorted\n\t\tif (sizeof($amz) > 0)\n\t\t{\n\t\t\t//sort($amz);\n\t\t\tusort($amz, array(&$this, 'sortMetaHeadersCmp'));\n\t\t\t$amz = \"\\n\".implode(\"\\n\", $amz);\n\t\t} else $amz = '';\n\n\t\tif (S3Compatible::hasAuth())\n\t\t{\n\t\t\t// Authorization string (CloudFront stringToSign should only contain a date)\n\t\t\tif ($this->headers['Host'] == 'cloudfront.amazonaws.com')\n\t\t\t\t$headers[] = 'Authorization: ' . S3Compatible::getSignature($this->headers['Date']);\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (S3Compatible::$signVer == 'v2')\n\t\t\t\t{\n\t\t\t\t\t$headers[] = 'Authorization: ' . S3Compatible::getSignature(\n\t\t\t\t\t\t$this->verb.\"\\n\".\n\t\t\t\t\t\t$this->headers['Content-MD5'].\"\\n\".\n\t\t\t\t\t\t$this->headers['Content-Type'].\"\\n\".\n\t\t\t\t\t\t$this->headers['Date'].$amz.\"\\n\".\n\t\t\t\t\t\t$this->resource\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\t$amzHeaders = S3Compatible::getSignatureV4(\n\t\t\t\t\t\t$this->amzHeaders,\n\t\t\t\t\t\t$this->headers,\n\t\t\t\t\t\t$this->verb,\n\t\t\t\t\t\t$this->uri,\n\t\t\t\t\t\t$this->data,\n\t\t\t\t\t\t$this->parameters\n\t\t\t\t\t);\n\t\t\t\t\tforeach ($amzHeaders as $k => $v) {\n\t\t\t\t\t\t$headers[] = $k .': '. $v;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tcurl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\n\t\tcurl_setopt($curl, CURLOPT_HEADER, false);\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, false);\n\t\tcurl_setopt($curl, CURLOPT_WRITEFUNCTION, array(&$this, 'responseWriteCallback'));\n\t\tcurl_setopt($curl, CURLOPT_HEADERFUNCTION, array(&$this, 'responseHeaderCallback'));\n\t\tcurl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);\n\n\t\t// Request types\n\t\tswitch ($this->verb)\n\t\t{\n\t\t\tcase 'GET': break;\n\t\t\tcase 'PUT': case 'POST': // POST only used for CloudFront\n\t\t\t\tif ($this->fp !== false)\n\t\t\t\t{\n\t\t\t\t\tcurl_setopt($curl, CURLOPT_PUT, true);\n\t\t\t\t\tcurl_setopt($curl, CURLOPT_INFILE, $this->fp);\n\t\t\t\t\tif ($this->size >= 0)\n\t\t\t\t\t\tcurl_setopt($curl, CURLOPT_INFILESIZE, $this->size);\n\t\t\t\t}\n\t\t\t\telseif ($this->data !== false)\n\t\t\t\t{\n\t\t\t\t\tcurl_setopt($curl, CURLOPT_CUSTOMREQUEST, $this->verb);\n\t\t\t\t\tcurl_setopt($curl, CURLOPT_POSTFIELDS, $this->data);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tcurl_setopt($curl, CURLOPT_CUSTOMREQUEST, $this->verb);\n\t\t\tbreak;\n\t\t\tcase 'HEAD':\n\t\t\t\tcurl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'HEAD');\n\t\t\t\tcurl_setopt($curl, CURLOPT_NOBODY, true);\n\t\t\tbreak;\n\t\t\tcase 'DELETE':\n\t\t\t\tcurl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE');\n\t\t\tbreak;\n\t\t\tdefault: break;\n\t\t}\n\n\t\t// Execute, grab errors\n\t\tif (curl_exec($curl))\n\t\t\t$this->response->code = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n\t\telse\n\t\t\t$this->response->error = array(\n\t\t\t\t'code' => curl_errno($curl),\n\t\t\t\t'message' => curl_error($curl),\n\t\t\t\t'resource' => $this->resource\n\t\t\t);\n\n\t\t@curl_close($curl);\n\n\t\t// Parse body into XML\n\t\tif ($this->response->error === false && isset($this->response->headers['type']) &&\n\t\t$this->response->headers['type'] == 'application/xml' && isset($this->response->body))\n\t\t{\n\t\t\t$this->response->body = simplexml_load_string($this->response->body);\n\n\t\t\t// Grab S3 errors\n\t\t\tif (!in_array($this->response->code, array(200, 204, 206)) &&\n\t\t\tisset($this->response->body->Code, $this->response->body->Message))\n\t\t\t{\n\t\t\t\t$this->response->error = array(\n\t\t\t\t\t'code' => (string)$this->response->body->Code,\n\t\t\t\t\t'message' => (string)$this->response->body->Message\n\t\t\t\t);\n\t\t\t\tif (isset($this->response->body->Resource))\n\t\t\t\t\t$this->response->error['resource'] = (string)$this->response->body->Resource;\n\t\t\t\tunset($this->response->body);\n\t\t\t}\n\t\t}\n\n\t\t// Clean up file resources\n\t\tif ($this->fp !== false && is_resource($this->fp)) fclose($this->fp);\n\n\t\treturn $this->response;\n\t}", "title": "" }, { "docid": "843da67022615129c36411702cbb2d21", "score": "0.5084623", "text": "public function index()\n {\n $config = Config::get('api');\n\n /**\n * We use Spatie's Query Builder package to handle\n * filtering, sorting, and includes\n */\n\n $orders = QueryBuilder::for(OrderItems::class)\n ->allowedFilters([\n 'order_id',\n 'inventory_id',\n 'product_type',\n ])\n ->allowedIncludes([\n 'order', \n 'inventory', \n ])\n ->paginate($config['query']['pagination']);\n\n return (new OrderItemsCollection($orders))\n ->response()\n ->setStatusCode(201);\n }", "title": "" }, { "docid": "8b3cf7276bd63d2b695dd3e857be53c7", "score": "0.5081496", "text": "public function getGuzzleResponse();", "title": "" }, { "docid": "0ab2cdc6e4df45924257be5633698f0a", "score": "0.50779504", "text": "protected function getData($endpoint, $query = null) {\n\n\t\t$request = new Request( $this->getAuthorization(), [] );\n\t\t$headers = new \\SunriseIntegration\\CampaignMonitor\\Http\\Headers();\n\t\t$headers->add( 'Accept', 'application/json' );\n\t\t$headers->add( 'Content-Type', 'application/json' );\n\t\t$headers->add( 'Cache-Control', 'no-cache' );\n\t\t$headers->add( 'Authorization', 'Bearer ' . $this->getAuthorization()->getAccessToken() );\n\t\t$headers->add('X-Forwarded-For', $this->getRemoteUserIp() );\n\t\t$request->setHeaders( $headers );\n\t\t$request->setMethod( IRequest::METHOD_GET );\n\n\t\t$extension = '';\n\n\t\tswitch ( $this->getReturnType() ) {\n\t\t\tcase self::RETURN_JSON:\n\t\t\t\t$extension = 'json';\n\t\t\t\tbreak;\n\t\t\tcase self::RETURN_XML;\n\t\t\t\t$extension = 'xml';\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$endpoint = \"/$endpoint.$extension\";\n\n\t\tif ( $query !== null ) {\n\t\t\t$endpoint .= '?' . http_build_query( $query );\n\t\t}\n\n\t\t$request->setUri( self::API_URL . $endpoint );\n\n\t\treturn $this->getRequest()->send($request);\n\t}", "title": "" }, { "docid": "445fd9f55ebf6c954d40875cb7c3373a", "score": "0.5071458", "text": "public function index()\n {\n return response()->json(new ReturnResourceCollection(BusRoute::paginate(5)),200);\n }", "title": "" }, { "docid": "743065d96177fb99de4bd4a72bcc6d80", "score": "0.5066988", "text": "public function getItems()\n {\n $items = lugar_servir::where('estado', true)->orderBy('created_at', 'desc')->get();\n return response()->json($items);\n error_log(\"lugar\");\n }", "title": "" }, { "docid": "2bb539b58be3aa5ed33c667dfd166318", "score": "0.5062343", "text": "function prepareCall($itemNumber) {\r\n\t$endpoint = 'http://open.api.ebay.com/shopping?'; // URL to call\r\n\t$version = '1.0.0'; // API version supported by your application\r\n\t$globalid = 'EBAY-US'; // Global ID of the eBay site you want to search (e.g., EBAY-DE)\r\n\t// \t$appid = 'PedroHen-1160-44c9-883c-003d4bb788cb'; // Replace with your own AppID\r\n\t$responseEncoding='XML';\r\n\t\r\n\t$apicallb = \"$endpoint\";\r\n\t$apicallb .= \"callname=GetSingleItem\";\r\n\t$apicallb .= \"&version=563\";\r\n\t$apicallb .= \"&appid=\".APP_ID;\r\n\t$apicallb .= \"&itemid=$itemNumber\";\r\n\t\r\n\t$j = 0;\r\n\t\r\n\t//add the variation to filter using the VariationSpecifics from Ebay Api\r\n\t//allowing to return the specific variation when the user click on the link\r\n\tforeach ($_GET as $key=>$value) {\r\n\t\tif ($key == \"name$j\")\r\n\t\t{\r\n\t\t\t$apicallb .= \"&VariationSpecifics.NameValueList($j).Name=\".rawurlencode($value);\r\n\t\t}\r\n\t\telse if($key == \"value$j\")\r\n\t\t{\r\n\t\t\t$apicallb .= \"&VariationSpecifics.NameValueList($j).Value=\".rawurlencode($value);\r\n\t\t\t$j++;\r\n\t\t}\r\n\t}\r\n\t//end variations filter\r\n\t\r\n\t\r\n\t$apicallb .= \"&responseencoding=$responseEncoding\";\r\n\t$apicallb .= \"&includeselector=Details,ShippingCosts,Variations\";\r\n\t\r\n\treturn $apicallb;\r\n}", "title": "" }, { "docid": "b9af88ba6c206cc1e1fee54aa1a004bb", "score": "0.5059779", "text": "public function getItems()\r\n {\r\n return $this->client->get('cart/item',[]);\r\n }", "title": "" }, { "docid": "dcf127d665558e9e4454143d299851d9", "score": "0.505492", "text": "public function get() : Response\n {\n return $this->request('GET', \"/resource\", array(\n 'headers' => array(\n 'x-override' => 'test',\n 'Authorization' => 'Basic b3ZlcnJpZGU6b3ZlcnJpZGU=',\n ),\n ));\n }", "title": "" }, { "docid": "2cc17bf2759369d45ac3fdf3b85cdb01", "score": "0.5050515", "text": "protected function _getItemsData()\n {\n $algorithm = $this->algorithmFactory->create();\n\n return $algorithm->getItemsData(\n (array)$this->dataProvider->getInterval(),\n $this->dataProvider->getAdditionalRequestData()\n );\n }", "title": "" }, { "docid": "0eca83e14a6b1782e71e24ad7ace2032", "score": "0.5046081", "text": "public function getSocietiesRaw(){\n\n //If it has cache, use cache instead\n if(Cache::has('rawlist') && $this->cache_on)\n return response()->json(Cache::get('rawlist'));\n\n $urls = self::getUrls();\n \n $results = $this->thread->multiple($urls);\n\n $societies = [];\n\n foreach($results as $r){\n $json = (object) json_decode($r, true);\n \n //Ignore null objects\n if(is_null($json)) continue;\n\n $societies[] = $json;\n }\n\n // Cache expires after 60 mins\n if($this->cache_on){\n Cache::put('rawlist', $societies, 1);\n }\n\n return response()->json($societies);\n }", "title": "" }, { "docid": "53c028c9a744a378be90910dd7ce40da", "score": "0.504339", "text": "function getResource($resource, $id = null, $take = null, $filters = null, $orders = null){\r\n \t$resourceUrl = \"/$resource\";\r\n \t// check if its a single resource, or collection call\r\n \tif($id){\r\n \t\t$resourceUrl .= \"/$id\";\r\n \t} else {\r\n \t\tif($take){\r\n\t \t\t$resourceUrl .= \"?Take=$take\";\r\n \t\t}\r\n \t\t// Check to see if filters are present\r\n\t \tif($filters){\r\n \t\t\t$resourceUrl .= \"&Filter=\";\r\n\t \t\tforeach ($filters as $filter) {\r\n\t \t\t\t$resourceUrl .= ($filter['condition']) ? \".\" . $filter['condition'] . \".\" : \"\";\r\n\t \t\t\t$resourceUrl .= $filter['field'] .\".\" . $filter['filter'] . \"(\";\r\n\t \t\t\t\tif(is_array($filter['value'])){\r\n\t\t\t \t\t\tforeach ($filter['value'] as $key => $value) {\r\n\t\t\t \t\t\t\t//if its the first value, do not preface with a comma....\r\n\t\t\t \t\t\t\t$resourceUrl .= ($key == 0) ? urlencode($value) : ',' . urlencode($value) ;// maybe check array position instead?\r\n\t\t\t \t\t\t}\r\n\t \t\t\t\t} else {\r\n\t \t\t\t\t\t$resourceUrl .= urlencode($filter['value']);\r\n\t \t\t\t\t}\r\n\r\n\t \t\t\t$resourceUrl .= \")\";\t \t\t\r\n\t \t\t}\r\n\t \t}\r\n\t \t// check to see if ordering has been specified\r\n\t \tif($orders){\r\n \t\t\t$resourceUrl .= \"&Order=\";\r\n\t \t\tforeach ($orders as $order) {\r\n\t \t\t\t$resourceUrl .= ($order['condition']) ? \".\" . $order['condition'] . \".\" : \"\";\r\n\t \t\t\t$resourceUrl .= $order['field'] . \"(\" . $order['value'] . \")\";\t \t\t\t\r\n\t \t\t}\r\n\t \t}\r\n \t}\r\n\r\n \t//Call external API\r\n\t\t$this->get($resourceUrl);\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code == 0){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s,\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resourceUrl,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t'The Service Did Not Respond'\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception('The Service Failed to Respond.');\r\n\t\t } elseif ($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s,\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resourceUrl,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n }", "title": "" }, { "docid": "e5fdf069de3fd57a46a7cca47e13c9e1", "score": "0.5043136", "text": "public function itemNotFound()\n {\n return JsonResponse::create(array('error' => 'Endpoint Not Found'), 404)->send();\n }", "title": "" }, { "docid": "f38069649844662f2f2a4bac14d77ab9", "score": "0.5034171", "text": "public function list(): JsonResponse\n {\n $item = Item::select(['name', 'value'])\n ->get()\n ;\n return response()\n ->json($item)\n ;\n }", "title": "" }, { "docid": "d4a025ada60b2972320a070e8daa4043", "score": "0.5033205", "text": "public function index(Request $request)\n {\n if($request->has('aip_id') ) {\n $itemData = $this->generateItemDataFromAipUuid( $request->aip_id );\n return response()->json( ['items' => [ $itemData ] ] );\n } else if ($request->has('original_id') ) {\n $itemData = $this->generateItemDataFromSipUuid( $request->original_id );\n return response()->json( ['items' => [ $itemData ] ] );\n }\n $items = [];\n for($i = 1; $i < 20; $i++) {\n array_push( $items, $this->generateItemDataFromId( \"{$i}\" ) );\n }\n return response()->json( [\"items\" => $items ] );\n }", "title": "" }, { "docid": "40536963e5ad0642b92673d5daf78dbc", "score": "0.503253", "text": "public function get_item_response($term)\n {\n }", "title": "" }, { "docid": "40536963e5ad0642b92673d5daf78dbc", "score": "0.503253", "text": "public function get_item_response($term)\n {\n }", "title": "" }, { "docid": "10663af8309bbfd59c6d678665e837d9", "score": "0.5025351", "text": "protected function getResourcesRequest()\n {\n\n $resourcePath = '/v1/resources';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/links+json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/links+json'],\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 // \\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 Bearer token\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\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 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "2014e92f4cb666b783b23b72d5d63a60", "score": "0.5018638", "text": "public function index()\n {\n return response($this->service->all(), 200);\n }", "title": "" }, { "docid": "ac888e7e45a7786572b62fddb422291b", "score": "0.5015228", "text": "protected function getInstitutionalHoldings($params){\n\t\tif(empty($params['symbol'])){\n\t\t\t//get all tickers\n\t\t\tmakeJSONerrorAndExit('Ownership - required params: symbol is missing');\n\t\t\treturn false;\t\n\t\t}\n\t\t\n\t\t//Get single ticker\n\t\tif(!is_array($params['symbol'])){\n\t\t\t$symbols[] = $params['symbol'];\n\t\t}else{\n\t\t\t$symbols = $params['symbol'];\n\t\t}\n\t\t\n\t\tif(in_array(strtoupper($params['type']),['NEW', 'TOTAL', 'INCREASED', 'DECREASED', 'SOLDOUT', 'ACTIVITY'])){\n\t\t\t$type = strtoupper($params['type']);\n\t\t}else{\n\t\t\t$type = 'TOTAL';\n\t\t}\n\t\t\n\t\tif($params['limit'] > 0 && $params['limit'] < 50000){\n\t\t\t$limit = $params['limit'];\n\t\t}else{\n\t\t\t$params['limit'] = '1000';\n\t\t}\n\t\t\n\t\tif($params['offset'] > 0){\n\t\t\t$append = '&offset='.$params['offset'];\n\t\t\t$offset = $params['offset'];\n\t\t}\n\t\t\n\t\tforeach($symbols as $symbol){\n\t\t\t$endpoint = 'https://api.nasdaq.com/api/company/'.$symbol.'/institutional-holdings?limit='.$limit.'&type='.$type.'&sortColumn=marketValue&sortOrder=DESC'.$append;\n\t\t\ttry{\n\t\t\t\t$response[$symbol] = $this->guzzle->getAsync($endpoint);\n\t\t\t}catch(\\Exception $e){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\t$response = \\GuzzleHttp\\Promise\\Utils::settle($response)->wait();\n\t\t\n\t\t$mappedresponse['status'] = 'ok';\n\t\t$mappedresponse['meta']['companyId'] = $symbols;\n\t\t$mappedresponse['meta']['params']['limit'] = $limit;\n\t\t$mappedresponse['meta']['params']['type'] = $type;\n\t\t$mappedresponse['meta']['params']['offset'] = $offset ?: 0;\n\t\tforeach($response as $symbolrsp => $apirsp){\n\t\t\tif(!is_object($apirsp['value'])){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$apirsp = json_decode($apirsp['value']->getBody(),true);\n\t\t\t\n\t\t\tif(empty($apirsp['data']['title'])){\n\t\t\t\tmakeJSONerrorAndExit('Not found. Please check that the nasdaq.com company ID is valid and try again.',['requestedId' => $params['symbol']]);\n\t\t\t}\n\t\t\t\n\t\t\t$mappedresponse['results'][$symbolrsp] = [\n\t\t\t\t'meta' => ['sym' => $symbolrsp],\n\t\t\t\t'reportDate' => preg_replace('#^Report last updated #','',$apirsp['data']['reportDate']),\n\t\t\t\t'companyDetails' => [\n\t\t\t\t\t'name' => $apirsp['data']['title'],\n\t\t\t\t\t'address' => $apirsp['data']['address']],\n\t\t\t\t'holdingValueTotal' => preg_replace(\"/[^0-9\\(\\)\\.-]/\",\"\", $apirsp['data']['positionStatistics']['TotalMktValue']['value'])*1000000,\n\t\t\t];\n\t\t\t\n\t\t\t$mappedresponse['results'][$symbolrsp]['positionsOverview']['total'] = $apirsp['data']['positionStatistics']['TotalPositions']['value'];\n\t\t\t$mappedresponse['results'][$symbolrsp]['positionsOverview']['new'] = $apirsp['data']['positionStatistics']['NewPositions']['value'];\n\t\t\t$mappedresponse['results'][$symbolrsp]['positionsOverview']['increased'] = $apirsp['data']['positionStatistics']['IncreasedPositions']['value'];\n\t\t\t$mappedresponse['results'][$symbolrsp]['positionsOverview']['decreased'] = $apirsp['data']['positionStatistics']['DecreasedPositions']['value'];\n\t\t\t$mappedresponse['results'][$symbolrsp]['positionsOverview']['active'] = $apirsp['data']['positionStatistics']['PositionswithActivity']['value'];\n\t\t\t$mappedresponse['results'][$symbolrsp]['positionsOverview']['soldOut'] = $apirsp['data']['positionStatistics']['SoldOutPositions']['value'];\n\t\t\tforeach($apirsp['data']['sectorWeighting'] as $sectors){\n\t\t\t\t$mappedresponse['results'][$symbolrsp]['sectorsPct'][$sectors['label']] = preg_replace(\"/[^0-9\\(\\)\\.-]/\",\"\", $sectors['value']);\n\t\t\t}\n\t\t\tunset($actpos);\n\t\t\tforeach($apirsp['data']['institutionPositions']['table']['rows'] as $rspinner){\n\t\t\t\t$cmpid = explode('/',$rspinner['url']);\n\t\t\t\t$cmpid = $cmpid[count($cmpid) - 2];\n\t\t\t\t$value = preg_replace(\"/[^0-9\\(\\)\\.-]/\",\"\",$rspinner['value'])*1000;\n\t\t\t\t$held = preg_replace(\"/[^0-9\\(\\)\\.-]/\",\"\",$rspinner['sharesHeld']);\n\t\t\t\t$chg = preg_replace(\"/[^0-9\\(\\)\\.-]/\",\"\",$rspinner['change'])*1000;\n\t\t\t\t$scp = preg_replace(\"/[^0-9\\(\\)\\.-]/\",\"\",$rspinner['pctChange']);\n\t\t\t\t$mappedresponse['results'][$symbolrsp]['holdings'][] = [\n\t\t\t\t\t'name' => ucwords(strtolower($rspinner['company'])),\n\t\t\t\t\t'formType' => '13-F',\n\t\t\t\t\t'url' => 'https://www.nasdaq.com/'.$rspinner['url'],\n\t\t\t\t\t'symbol' => $cmpid,\n\t\t\t\t\t'class' => $rspinner['class'],\n\t\t\t\t\t'ownedChg' => '',\n\t\t\t\t\t'ownedPctChg' => '',\n\t\t\t\t\t'shares' => $held,\n\t\t\t\t\t'sharesChg' => '',\n\t\t\t\t\t'sharesChgPct' => '',\n\t\t\t\t\t'val' => $value,\n\t\t\t\t\t'valChg' => $chg,\n\t\t\t\t\t'valChgPct' => $scp\n\t\t\t\t];\n\t\t\t}\n\t\t}\n\t\treturn $mappedresponse;\n\t}", "title": "" }, { "docid": "2e3ae53e04aa2cb9349f8c63a2d224bb", "score": "0.50151485", "text": "public function request($endpoint, $params = [], $method = 'GET') {\n return $this->doRequest($endpoint, $params, $method);\n }", "title": "" }, { "docid": "4c9b7ca9b6e9acb3e05c41763c0fabe5", "score": "0.501154", "text": "public function prepare_item_for_response($item, $request)\n {\n return array();\n }", "title": "" }, { "docid": "4a58415c4e210bf080efe44201c5e2c7", "score": "0.5009524", "text": "function item_get()\n {\n $key = $this->get('id');\n $result = $this->supplies->get($key);\n if ($result != null)\n $this->response($result, 200);\n else\n $this->response(array('error' => 'Supplies item not found!'), 404);\n }", "title": "" }, { "docid": "68006ec2e13c8cdec612efe81dee9571", "score": "0.50032973", "text": "public function prepare_item_for_response( $item, $request ) {\n return array();\n }", "title": "" }, { "docid": "4cb46dfcc4f8e11b97ff83a0972210b3", "score": "0.5001791", "text": "public function getItems(): array;", "title": "" }, { "docid": "4cb46dfcc4f8e11b97ff83a0972210b3", "score": "0.5001791", "text": "public function getItems(): array;", "title": "" }, { "docid": "b763a4b5a4218a7354549dcf9d2143dd", "score": "0.50012237", "text": "public function getItems()\n {\n $command = $this->client->getCommand('GetAllItemIDs');\n\n return $this->client->execute($command)->json();\n }", "title": "" }, { "docid": "73cffe2ee3281e30ac963f1653dff7d2", "score": "0.4999478", "text": "protected function getMockResponse() {\n return (object) [\n 'copyright' => 'foo.com',\n 'date' => '2017-11-12',\n 'explanation' => 'Foo FTW.',\n 'hdurl' => 'https://foo.com/hd/foo.jpg',\n 'media_type' => 'image',\n 'service_version' => 'v1',\n 'title' => 'Foo!',\n 'url' => 'https://foo.com/foo.jpg',\n ];\n }", "title": "" }, { "docid": "45782ef5ee36deb991e05487640f7cd7", "score": "0.49925664", "text": "public function get($endpoint, $params)\n {\n $url = $this->serviceURL . '/' . ltrim($endpoint, '/');\n $headers = array(\n \"Connection: close\",\n \"Accept: application/json\",\n );\n\n return $this->request($url, 'GET', $headers, $params);\n }", "title": "" } ]
2d2c5269128688637dbbda669fbb526d
permet de creer liste
[ { "docid": "aec6c1fc90aaaa4d2ba25af3242d303e", "score": "0.0", "text": "public function creerUneListe($titrep,$descrip,$expir,$privee){\n $liste = new \\mywishlist\\models\\Liste();\n\n $token = uniqid();\n\n $liste->user_id = $_SESSION['profile']['userId'];\n $liste->titre = $titrep;\n $liste->description = $descrip;\n $liste->expiration = $expir;\n $liste->token = $token;\n $liste->privee = $privee;\n $liste->save();\n\n\n $listecookie = serialize($liste);\n setcookie($token,$listecookie,60*60*24*30,'/');\n\n\n\n return $token;\n }", "title": "" } ]
[ { "docid": "25ab1f8030827b02e68d22a82152ea8a", "score": "0.7690831", "text": "public static function liste(){\n\t\t\t\n\t\t}", "title": "" }, { "docid": "20fb5378dc2e9ba8095beb838186f070", "score": "0.73402894", "text": "public function createList(){\n global $vues;\n require_once($vues['newList']);\n }", "title": "" }, { "docid": "ba1828f5a135c6a75c508ca0af6ff3f2", "score": "0.7119101", "text": "public function createList(){\n\t\tforeach($this->entidades as $table=>$entidade){\n\t\t\t$list = array();\n\t\t\t\n\t\t\t$list['tipo'] = \"form\";\n\t\t\t$list['formseq'] = $entidade[\"formseq\"];\n\t\t\t$list['filtropai'] = \"seq\";\n\t\t\t$list['pesquisa'] = \"0\";\n\t\t\t$list['lista'] = substr(\"list_form_\".$table,0,40);\n\t\t\t$list['label'] = substr(\"Lista \".$table,0,40);\n\t\t\t$list['tabseq'] = $entidade['tabseq'];\n\t\t\t$list['obapendice'] = \"-\";\n\t\t\t$list['acfiltro'] = '1';\n\t\t\t$list['acincluir'] = '1';\n\t\t\t$list['nivel'] = '1';\n\t\t\t$list['acdeletar'] = '1';\n\t\t\t$list['aceditar'] = '1';\n\t\t\t$list['acviews'] = '1';\n\t\t\t$list['acenviar'] = '0';\n\t\t\t$list['formainclude'] = 'one';\n\t\t\t$list['acreplicar'] = '1';\n\t\t\t$list['acselecao'] = '0';\n\t\t\t$list['ordem'] = 'seq/desc';\n\t\t\t$list['aclimite'] = '1';\n\t\t\t\t\n\t\t\t$retInsert = $this->insertKrs(\"lista\", $list);\n\t\t\t$this->entidades[$table]['listseq'] = $retInsert['seq'];\n\t\t\t\n\t\t\t$this->updateKrs(\"forms\",$entidade[\"formseq\"],array('listseq'=>$retInsert['seq']));\n\n\t\t\t$this->updateKrs(\"lista\",$retInsert['seq'],array('listseq'=>$retInsert['seq']));\n\t\t\t\n\t\t\t// Gerar colunas (Gerar Privilegio)\n\t\t\t\n\t\t\tforeach($this->tableEstructures[$table] as $col => $dataCol){\n\t\t\t\t$count = 0;\n\t\t\t\t$column = array();\n\t\t\t\t$column['listseq'] = $retInsert['seq'];\n\t\t\t\t$column['coluna'] = $col;\n\t\t\t\t$column['label'] = $col;\n\t\t\t\t$column['alinhalabel'] = 'left';\n\t\t\t\t$column['alinhadados'] = 'left';\n\t\t\t\t$column['largura'] = $dataCol->length > 0 ? $dataCol->length*15 : 100;\n\t\t\t\t$column['colfunction'] = '-';\n\t\t\t\t$column['valorpadrao'] = '0';\n\t\t\t\t$column['tipocoluna'] = '1';\n\t\t\t\t$column['tabseq'] = $this->entidades[$table]['tabseq'];\n\t\t\t\t$column['colunaaux'] = '-';\n\t\t\t\t$column['link'] = '0';\n\t\t\t\t$column['ordem'] = ++$count;\n\t\t\t\t\n\t\t\t\t$this->insertKrs('coluna', $column);\n\t\t\t}\n\t\t\t\n\t\t\t$this->setPrivilegio(2, $entidade[\"formseq\"], 1);\n\t\t\t$this->setPrivilegio(2, $entidade[\"formseq\"], 2);\n\t\t\t$this->setPrivilegio(2, $entidade[\"formseq\"], 3);\n\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "1ad218b37000705f13503d05f42e31f8", "score": "0.6708285", "text": "public function listing(){\n //appelle constructeur produit\n }", "title": "" }, { "docid": "b5b0cef78470ae76aef51dba31716fe8", "score": "0.66601384", "text": "public function createList($nom_liste){\n\t\tglobal $wpdb;\n\t\trequire_once ABSPATH .'/wp-config.php';\n\t\t$sql = $wpdb->prepare('INSERT INTO ch_liste (nom_liste) VALUES (%s)', $nom_liste);\n\t\t$wpdb->query($sql);\n\t\t$data[\"id\"]= $wpdb->insert_id;\n\n\t\t$data[\"users\"] = $wpdb->get_results(\"SELECT id, user_nicename FROM ch_users\",ARRAY_N);\n\t\tprint json_encode($data);\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "264933970e5bd70a322fa4f592a61e76", "score": "0.66351444", "text": "public function liste()\n {\n $this->load->model('ProduitsModel');\n $aListe = $this->ProduitsModel->ListeProduit();\n\n\n // Ajoute des résultats de la requête au tableau des variables à transmettre à la vue\n $aView[\"liste_produits\"] = $aListe;\n\n // Appel de la vue avec transmission du tableau\n $this->load->view('haed');\n $this->load->view('Liste', $aView);\n $this->load->view('footer');\n }", "title": "" }, { "docid": "d0c2eed7b07215a181f628767c435b33", "score": "0.6609446", "text": "public function createList()\n {\n return view('list.createList');\n }", "title": "" }, { "docid": "42c6b8f644059e1f1044a7efc07d97a7", "score": "0.6563865", "text": "private function generarlistahijopadre(){\n $lista= $this->Categoria->find('list',array('fields'=>array('id','subcategoria_id')));\n return $lista;\n }", "title": "" }, { "docid": "77633e54a662445fa123d2dc59ed3edf", "score": "0.6550027", "text": "function liste() {\n $laVue = new VueListeTypesChambres();\n $this->vue = $laVue;\n // On récupère un tableau composé d'objets de type TypeChambre lus dans la BDD\n Bdd::connecter();\n $laVue->setLesTypesChambresAvecNbAttributions(TypeChambreDAO::getAllWithNbAttributions());\n parent::controlerVueAutorisee();\n $this->vue->setTitre(\"Festival - types de chambres\");\n $this->vue->afficher();\n }", "title": "" }, { "docid": "11f2a54ca6c50f2cf8deec5300e98751", "score": "0.6534344", "text": "public function action_Liste_Livres(){\n\n //On commence par créer un objet de la classe Model\n // <!-- Pour rappel, la classe model va répertorier toutes les méthodes servant à accéder et récupérer des éléments de la base de données --!>\n // En créant un objet de la classe model, \"créons\" un accès aux fonctions de récupération de données dans la base\n $model = Model::get_model();\n\n // Ici nous allons créer un tableau qui va récupérer tout les livres de la base de donnée. Chaque ligne représentera un élément avec la clé \"Livres\"\n // La méthode Get_Liste_Livres() est définie dans la classe Model, allez voir dans Model.php pour voir ce qu'elle fait\n $liste_Livre = [ \"livres\" => $model -> Get_Liste_Livres() ];\n $liste_auteur = [ \"auteurs\" => $model -> Get_Auteurs() ];\n\n \n\n\n // Une fois les données récupérées sont envoyées afficher grâce à la méthode render. On lui donne le nom de la vue, ainsi que les datas du tableau $livres\n $this -> render(\"Liste_Livres\", array_merge($liste_Livre,$liste_auteur));\n }", "title": "" }, { "docid": "13bfb9f563c554d684de7ee353861a57", "score": "0.6472272", "text": "public function actionCreate()\n {\n $model = new Listas();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->response->format = Response::FORMAT_JSON;\n\n return $this->renderAjax('/tableros/listas_tablero', [\n 'model' => $model->tablero,\n 'tarjeta' => new Tarjetas(),\n 'adjunto' => new Adjuntos([\n 'scenario'=>Adjuntos::ESCENARIO_FILE\n ])\n ]);\n }\n\n }", "title": "" }, { "docid": "278634627104a0d08b4aa290360daba3", "score": "0.6425222", "text": "public function listdemandefraisAction() \n {\n\n\t$sessionutilisateur = new Zend_Session_Namespace('utilisateur');\n\t\t//$this->_helper->layout->disableLayout();\n \t\t$this->_helper->layout()->setLayout('layoutpublic');\n\n\tif (!isset($sessionutilisateur->login)) {$this->_redirect('/administration/login');}\nif($sessionutilisateur->confirmation != \"\"){$this->_redirect('/administration/confirmation');}\n\n $frais = new Application_Model_EuFraisMapper();\n $this->view->entries = $frais->fetchAll4($sessionutilisateur->code_source_create, $sessionutilisateur->code_monde_create, $sessionutilisateur->code_zone_create, $sessionutilisateur->id_pays, $sessionutilisateur->id_region, $sessionutilisateur->code_secteur_create, $sessionutilisateur->code_agence_create);\n\n $this->view->tabletri = 1;\n }", "title": "" }, { "docid": "c5bbdbac95cec1c2abdfd059ef6077d8", "score": "0.64069176", "text": "public function create()\n {\n return view('flexcms::admin.list.create', ['list'=> new Liist, 'lists'=>Liist::whereNull('parent_id')->get()]);\n }", "title": "" }, { "docid": "6da96e35fad3db959cf294e4a99a01f4", "score": "0.6358676", "text": "public function list();", "title": "" }, { "docid": "6da96e35fad3db959cf294e4a99a01f4", "score": "0.6358676", "text": "public function list();", "title": "" }, { "docid": "6da96e35fad3db959cf294e4a99a01f4", "score": "0.6358676", "text": "public function list();", "title": "" }, { "docid": "f8db85609e3a329a78682b1943275471", "score": "0.6349841", "text": "abstract public function get_list();", "title": "" }, { "docid": "6a596903569ef15e61c380aa36221b86", "score": "0.6328286", "text": "public function listeAction()\n {\n // des éléments de contrôle de la pagination pour plus d'informations\n Zend_View_Helper_PaginationControl::setDefaultViewPartial('controls.phtml');\n\n $mapper = new Application_Model_GenreMapper();\n $genre = new Application_Model_Genre();\n $genre = $mapper->fetchAll();\n // Créons un paginateur pour cette requête\n $paginator = Zend_Paginator::factory($genre);\n\n // Nous lisons le numéro de page depuis la requête. Si le paramètre n'est pas précisé\n // la valeur 1 sera utilisée par défaut\n $paginator->setCurrentPageNumber($this->_getParam('page', 1));\n\n // Assignons enfin l'objet Paginator à notre vue\n $this->view->paginator = $paginator;\n }", "title": "" }, { "docid": "56680cd1ce9bdf19322b9dbb1810fbf4", "score": "0.630589", "text": "public static function control(){\n if (isset($_POST['creer'])){\n $l = new Liste();\n /*\n * Génération des token de modification de liste et de partage de liste\n */\n $tokenGenerated = \"\";\n $token = openssl_random_pseudo_bytes(32);\n $token = bin2hex($token);\n $tokenGenerated = $token;\n \n $tokenModifGenerated = \"\";\n $tokenModif = openssl_random_pseudo_bytes(32);\n $tokenModif = bin2hex($tokenModif);\n $tokenModifGenerated = $tokenModif;\n $titre = $_POST['titre'];\n $description = $_POST['description'];\n $date = $_POST['expiration'];\n $dateCourante = date(\"Y\") . \"-\" . date(\"m\") .\"-\" . date(\"d\");\n /*\n * Si la date est incorrecte soit inférieur à la date actuelle il est impossible de créer la liste\n * ce qui affiche une erreur à la page de création de liste\n */\n if ($date < $dateCourante) {\n $vue = new VueCreerListeGest(\"erreurDate\");\n $vue->render();\n } else {\n $titre = filter_var($titre, FILTER_SANITIZE_SPECIAL_CHARS);\n $titre = filter_var($titre, FILTER_SANITIZE_STRING);\n $description = filter_var($description, FILTER_SANITIZE_SPECIAL_CHARS);\n $description = filter_var($description, FILTER_SANITIZE_STRING);\n $date = filter_var($date, FILTER_SANITIZE_SPECIAL_CHARS);\n $date = filter_var($date, FILTER_SANITIZE_STRING);\n /*\n * Si la check box est validée on rentre dans le if pour rendre la liste publique\n * sinon elle rend la liste privée\n */\n if (isset($_POST['liste_publique'])) {\n $l->public = 1;\n } else \n $l->public = null;\n /*\n * On associe les données filtrées à la liste null pour ensuite l'ajouter dans la base de données\n */\n $l->titre = $titre;\n $l->description = $description;\n $l->expiration = $date;\n $l->user_id = null;\n $l->token = $tokenGenerated;\n $l->tokenModif = $tokenModifGenerated;\n $res = $l->save();\n $vue = new VueListeCreeGest($l);\n $vue->render();\n }\n }\n \n }", "title": "" }, { "docid": "f5a4d26ae1124a5231067fb552a40236", "score": "0.6297123", "text": "public function newList() : void\n {\n $name = $this->security->xss_clean($this->input->post('list-name'));\n $res = $this->StockLists_model->createEmptyList($this->user_id, $name);\n if ($res) {\n $data['notice'] = \"success\";\n $data['message'] = Msg::LIST_CREATE_SUCCESS;\n $data['id'] = $res;\n\n } else {\n $data['notice'] = \"error\";\n $data['message'] = Msg::LIST_CREATE_ERROR;\n }\n echo json_encode($data);\n }", "title": "" }, { "docid": "17be48a56e609ecdbda46cfe12ab62e3", "score": "0.6285039", "text": "public function listacteurcreneauAction()\n {\n\n $sessionutilisateur = new Zend_Session_Namespace('utilisateur');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcadmin');\n \n if (!isset($sessionutilisateur->login)) {$this->_redirect('/administration/login');}\nif($sessionutilisateur->confirmation != \"\"){$this->_redirect('/administration/confirmation');}\n\n $id = (int) $this->_request->getParam('id');\n if (isset($id) && $id != 0) {\n $acteurcreneau = new Application_Model_EuActeurCreneauMapper();\n $this->view->entries = $acteurcreneau->fetchAllByFiliere($id);\n }else{\n $this->_redirect('/tdr/listtdradmin');\n }\n\n $this->view->tabletri = 1;\n\n }", "title": "" }, { "docid": "2237d9e5aa49a1a44f47132f8e8b3f66", "score": "0.6259352", "text": "private function creerListe() : string {\n $token = $this->elem;\n $server = $_SERVER['SERVER_NAME'];\n $url = $server . $this->path;\n $html = <<<END\n<form action=\"creerListe\" method=\"post\">\n<h2>Création d'une liste de souhaits</h2>\n <div class=\"formulaire\">\n <input style=\"text-align:center\" type=\"text\" name=\"titre\" placeholder=\"Titre\" required>\n </div>\n <div class=\"formulaire\">\n <input style=\"text-align:center\" type=\"text\" name=\"desc\" placeholder=\"Description\" required>\n </div>\n <p>Date d'expiration :</p>\n <div class=\"formulaire\">\n <input style=\"text-align:center\" type=\"date\" name=\"expiration\" required>\n </div>\n <div class=\"formulaire\">\n <input type=\"submit\" value=\"Creer\">\n </div>\n</form>\nEND;\n return $html;\n }", "title": "" }, { "docid": "526fdee9d2b0f6d8e5ac0338653f5681", "score": "0.6254632", "text": "public function new_list() {\n $this->CI->form_validation->set_rules('list', 'List', 'trim|required');\n $this->CI->form_validation->set_rules('description', 'Description', 'trim');\n if ($this->CI->form_validation->run()) {\n $l = $this->CI->input->post('list');\n $d = $this->CI->input->post('description');\n $this->CI->ecl('Clist')->create($l,$d);\n }\n else{\n display_mess(18);\n }\n }", "title": "" }, { "docid": "ad42ee857fa4586a5563da64b4357032", "score": "0.6247154", "text": "public function listdemandeAction() \n {\n\n\t\t$sessionutilisateur = new Zend_Session_Namespace('utilisateur');\n\t\t//$this->_helper->layout->disableLayout();\n \t\t$this->_helper->layout()->setLayout('layoutpublic');\n\t\t\n\tif (!isset($sessionutilisateur->login)) {$this->_redirect('/administration/login');}\nif($sessionutilisateur->confirmation != \"\"){$this->_redirect('/administration/confirmation');}\n\n $demande = new Application_Model_EuDemandeMapper();\n $this->view->entries = $demande->fetchAll4($sessionutilisateur->code_source_create, $sessionutilisateur->code_monde_create, $sessionutilisateur->code_zone_create, $sessionutilisateur->id_pays, $sessionutilisateur->id_region, $sessionutilisateur->code_secteur_create, $sessionutilisateur->code_agence_create);\n\n $this->view->tabletri = 1;\n }", "title": "" }, { "docid": "2d11f00bdc12a7e8b754ed0fd5ed5e45", "score": "0.62463474", "text": "function f_crear_lista($cursor, $cod_select=NULL) \t \n\t{\n\t\tglobal $db;\n\t\t$cadena1\t\t=\t\"--\";\n\t\t$num_registros \t= \t$db->num_registros($cursor);\n\t\n\t\tfor($i=0; $i<$num_registros; $i++){\n\t\t\t$row =$db->sacar_registro($cursor,$i);\n\t\t\tif($row[0] == $cod_select) $selected = 'selected';\n\t\t\telse $selected = '';\n\t\t\t$row[1]\t\t= ucfirst(strtolower($row[1]));\n\t\t\t$cadena = $cadena.\"<option value='$row[0]' $selected>$row[1]</option>\";\n\t\t}\n\t\treturn $cadena;\n\t }", "title": "" }, { "docid": "14f48e68a12a14aaf31ff3c1300800c3", "score": "0.6241541", "text": "function addList(/*$new_lname*/) {\r\n\t\t\r\n\t\tif(empty(self::database)){\r\n\t\t\tself::connectDatabase();\r\n\t\t}\r\n\t\t\r\n\t\r\n\t\tself::query = \"CREATE TABLE rfztd_{$_GET['list']} (\r\nid INT UNSIGNED NOT NULL AUTO_INCREMENT,\r\ndone TINYINT(1) NOT NULL DEFAULT 0,\r\nelement VARCHAR(10000) NOT NULL,\r\npriority VARCHAR(30) NOT NULL DEFAULT 'B',\r\ndate_modified TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id)\r\n) CHARACTER SET utf8\";\r\n\t\t\r\n\t\tif (mysqli_query(self::dbc, self::query)) {\r\n\t\t\tprint '<p>The table has been created!</p>';\r\n\t\t\t\r\n\t\t\t//insert new list name into the list of lists\r\n\t\t\t\tself::query = \"INSERT INTO rfztd_lists (list, \"\r\n\t\t\t\tif(isset($_POST['order']) {return ($_POST['order'] != NULL) ? \"order, \" : \"\"}.\r\n\t\t\t\t\"date_modified) VALUES ('{$_POST['name']}', \"\r\n\t\t\t\tif(isset($_POST['order']) {return ($_POST['order'] != NULL) ? \"'{$_POST['order']}', \" : \"\"}.\r\n\t\t\t\t\"NOW())\";\r\n\t\t\t\t\r\n\t\t\tif (mysqli_query(self::dbc, self::query)) {\r\n\t\t\t\tprint '<p>The entry has successfully been inserted into the list of lists!</p>';\r\n\t\t\t} else {\r\n\t\t\t\tprint '<p style=\"color: red;\">Could not insert the entry because:<br>' . mysqli_error(self::dbc) .\r\n\t\t\t\t'.</p><p>The query being run was: ' . self::query . '</p>';\t\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tprint '<p style=\"color: red;\">Could not create the table because:<br>' . mysqli_error(self::dbc) .\r\n\t\t\t'.</p><p>The query being run was: ' . self::query . '</p>';\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}\r\n\t\r\n\t\r\n\t\r\n\t/**\r\n\t* outputs every list element in custom order from a respective MySql Table and provides edit and delete link\r\n\t*\r\n\t* outputs edit and delete link created with NONCE functions\r\n\t*/\r\n\tfunction retrieveElements() {\r\n\t\tif(empty(self::database)){\r\n\t\t\tself::connectDatabase();\r\n\t\t}\r\n\t\r\n\t\t//save statically in which order to output the list elements by checking list of lists\r\n\t\tself::query = \"SELECT order FROM rfztd_lists WHERE list=rfztd_{$_GET['page']}\";\r\n\t\t\r\n\t\tif (self::r = mysqli_query(self::dbc, self::query)) {\r\n\t\t\tself::order(self::row = mysqli_fetch_array(self:r)) ? self::row['order'] : NULL;\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\tprint '<p style=\"color: red;\">Could not create the table because:<br>' . mysqli_error(self::dbc) .\r\n\t\t\t'.</p><p>The query being run was: ' . self::query . '</p>';\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//retrieve + output actual list elements in previously retrieved order\r\n\t\tself::query = \"SELECT id, done, element, priority, date_modified FROM rfztd_{$_GET['page']}\" .\r\n\t\t(return(self::order != NULL) ? \"ORDER BY self::order\" : \"\");\r\n\t\t\r\n\t\tif (self::r = mysqli_query(self::dbc, self::query)) {\r\n\t\t\twhile(self::row = mysqli_fetch_array(self::r)) {\r\n\t\t\t\t//creates edit link to revise elements content AND MAKES IT SECURE BY NONCE in URL\r\n\t\t\t\tself::q_array =[\r\n\t\t\t\t\t'action' => 'rfz_edit',\r\n\t\t\t\t\t'element_id' => NULL,\r\n\t\t\t\t\t'nonce' => wp_create_nonce('rfz_edit')\r\n\t\t\t\t];\r\n\t\t\t\tself::q_array['element_id'] = self::row['id'];\r\n\t\t\t\tself::url = add_query_arg(self::q_array, admin_url('admin.php?page=' . $_GET['page']));\r\n\t\t\t\t\r\n\t\t\t\t// POST is sending done, priority, element and id from row of the clicked submit button\r\n\t\t\t\tprint '<form action=\"' . esc_url(self::url) . '\" method=\"POST\" enctype=\"multipart/form-data\">\r\n\t\t\t\t<p><input type=\"checkbox\" name=\"done\" '.\r\n\t\t\t\t(return(self::row['done']==1) ?\r\n\t\t\t\t'\"checked\"' : '') . \r\n\t\t\t\t' onChange=\"this.form.submit()\"><select name=\"priority\">\r\n\t\t\t\t\t<option value=\"'. self::row['priority'] . '\">' . self::row['priority'] . '</option>\r\n\t\t\t\t\t<option value=\"A\">A</option>\r\n\t\t\t\t\t<option value=\"B\">B</option>\r\n\t\t\t\t\t<option value=\"C\">C</option>\r\n\t\t\t\t\t<option value=\"D\">D</option>\r\n\t\t\t\t\t<option value=\"E\">E</option>\r\n\t\t\t\t</select> <textarea name=\"element\" rows=\"2\" cols=\"35\">' . esc_html(self::row['element']) . '</textarea>\r\n\t\t\t\t<select name=\"order\">\r\n\t\t\t\t\t<option value=\"date modified\">date_modified DESC</option>\r\n\t\t\t\t\t<option value=\"alphabetical\">element ASC</option>\r\n\t\t\t\t\t<option value=\"priority\">priority ASC</option>\r\n\t\t\t\t</select>\r\n<!--<input type=\"hidden\" name=\"id\" value=\"' . self::row['id'] . '\">-->\r\n<!--<input type=\"hidden\" name=\"list\" value=\"' . $_GET['page'] . '\">-->\r\n\t\t\t\t<input type=\"submit\" name=\"edit\" value=\"save element\">';\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//create delete link to delete element\r\n\t\t\t\tself::content = 'delete';\r\n\r\n\t\t\t\tself::q_array =[\r\n\t\t\t\t\t'action' => 'rfz_delete',\r\n\t\t\t\t\t'element_id' => NULL,\r\n\t\t\t\t\t'nonce' => wp_create_nonce('rfz_delete')\r\n\t\t\t\t];\r\n\t\t\t\tself::q_array['element_id'] = self::row['id'];\r\n\t\t\t\tself::url = add_query_arg(self::q_array, admin_url('admin.php?page='. $_GET['page']));\r\n\t\t\t\techo ' <a href=\"' . esc_url(self::url) . '\">' . esc_html__(self::content) . '</a></p><hr></form>';\r\n\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tprint '<hr>';\r\n\t\t} else {\r\n\t\t\tprint '<p style=\"color: red;\">Could not retrieve the entry because:<br>' . mysqli_error(self::dbc) .\r\n\t\t\t'.</p><p>The query being run was: ' . self::query . '</p>';\t\r\n\t\t}\r\n\t\t\r\n\t\t// add a new element\r\n\t\t\t\tself::q_array =[\r\n\t\t\t\t\t'action' => 'rfz_add',\r\n\t\t\t\t\t'nonce' => wp_create_nonce('rfz_add')\r\n\t\t\t\t];\r\n\t\t\t\tself::url = add_query_arg(self::q_array, admin_url('admin.php?page=' . $_GET['page']));\r\n\t\t\r\n\t\tprint '<p><h3><b>Add a new element: </b><h3></p>\r\n\t\t\t<form action=\"' . esc_url(self::url) . '\" method=\"POST\" enctype=\"multipart/form-data\">\r\n\t\t\t\t<p><input type=\"checkbox\" name=\"done\"><select name=\"priority\">\r\n\t\t\t\t\t<option value=\"B\">B</option>\r\n\t\t\t\t\t<option value=\"A\">A</option>\r\n\t\t\t\t\t<option value=\"B\">B</option>\r\n\t\t\t\t\t<option value=\"C\">C</option>\r\n\t\t\t\t\t<option value=\"D\">D</option>\r\n\t\t\t\t\t<option value=\"E\">E</option>\r\n\t\t\t\t</select> <textarea name=\"element\" rows=\"2\" cols=\"35\"></textarea>\r\n\t\t\t\t<select name=\"order\">\r\n\t\t\t\t\t<option value=\"date modified\">date_modified DESC</option>\r\n\t\t\t\t\t<option value=\"alphabetical\">element ASC</option>\r\n\t\t\t\t\t<option value=\"priority\">priority ASC</option>\r\n\t\t\t\t</select>\r\n<!--<input type=\"hidden\" name=\"id\" value=\"' . self::row['id'] . '\">-->\r\n<!--<input type=\"hidden\" name=\"list\" value=\"' . $_GET['page'] . '\">-->\r\n\t\t\t\t<input type=\"submit\" name=\"submit\" value=\"save element\"></form>';\r\n\t}\r\n\t\r\n\t/**\r\n\t* adds new element (row) to specific list\r\n\t*/\r\n\tfunction addElement() {\r\n\t\tif(empty(self::database)){\r\n\t\t\tself::connectDatabase();\r\n\t\t}\r\n\t\t\r\n\t\tself::query = \"INSERT INTO rfztd_{$_GET['page']} (\" .\r\n\t\t\tif(isset($_POST['done'])) {($_POST['done']) ? return \"done, \" : return \"\"} .\r\n\t\t\t\"element, \" .\r\n\t\t\tif(isset($_POST['priority'])) {($_POST['priority']) ? return \"priority, \" : return \"\"} .\r\n\"date_modified\r\n) VALUES (\" .\r\n\t\t\tif(isset($_POST['done'])) {($_POST['done']) ? return \"1, \" : return \"\"} .\r\n\t\t\t\"'{$_POST['element']}', \" .\r\n\t\t\tif(isset($_POST['priority'])) {($_POST['priority']) ? return \"'{$_POST['priority']}', \" : return \"\"} .\r\n\t\t\t\"NOW())\";\r\n\t\t\r\n\t\tif (mysqli_query(self::dbc, self::query)) {\r\n\t\t\tprint '<p>The entry (element) has been successfully inserted!</p>';\r\n\t\t} else {\r\n\t\t\tprint '<p style=\"color: red;\">Could not create the table because:<br>' . mysqli_error(self::dbc) .\r\n\t\t\t'.</p><p>The query being run was: ' . self::query . '</p>';\t\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\t/**\r\n\t* change existing List elements(entries)\r\n\t*/\r\n\tfunction updateList() {\r\n\t\tif(empty(self::database)){\r\n\t\t\tself::connectDatabase();\r\n\t\t}\r\n\t\t\r\n\t\t\tself::query = \"UPDATE rfztd_{$_GET['page']} SET \" .\r\n\t\t\tif(isset($_POST['done'])) {($_POST['done']) ? return \"done=1,\" : return \"\"} .\r\n\t\t\t\"priority='{$_POST['priority']},\r\nelement='{$_POST['element']}',\r\ndate_modified=NOW()\r\nWHERE id={$_GET['element_id']}\";\r\n\t\t\t\r\n\t\tself::r=mysqli_query(self::dbc, self::query);\r\n\t\tif(mysqli_affected_rows(self::dbc) == 1){\r\n\t\t\techo '<p style=\"color: green; font-weight: bold;\">You successfully updated the element: ' . $_POST['element'] . '</p>';\r\n\t\t}else {\r\n\t\t\tprint '<p style=\"color: red;\">Could not update the entry because:<br>' . mysqli_error(self::dbc) .\r\n\t\t\t'.</p><p>The query being run was: ' . self::query . '</p>';\t\r\n\t\t}\r\n\t}\r\n\t\r\n\t/**\r\n\t* rename List itself\r\n\t*/\r\n\tfunction renameList(){\r\n\t\tif(empty(self::database)){\r\n\t\t\tself::connectDatabase();\r\n\t\t}\r\n\t\t\r\n\t\tself::query = \"UPDATE rfztd_lists SET \" . if(isset($_GET['list'])) {($_GET['list']) ? return \"list=1,\" : return \"\"} .\r\n\t}", "title": "" }, { "docid": "4496c01c6f3cbff7924b051274c8aa9a", "score": "0.621374", "text": "private function afficherListesSouhaits() : string {\n $res = \"\";\n foreach ($this->elem as $liste){\n if(isset($liste['token_modif'])&&isset($liste['titre'])){\n $token = $liste['token_modif'];\n $res = $res . \"<div class='liste'><p><a class='lienListe' href=\\\"\".$this->path.\"/creation/liste/\".$token.\"\\\">\".$liste['titre'].'</a></p></div>';\n }\n\n }\n $res = $res /*. var_dump($this->elem)*/.\"\";\n $html = <<<END\n<form class=\"formNouvelleListe\" action=\"creerListe\">\n <input class=\"bouton\" type=\"submit\" name=\"creerListe\" value=\"Créer une nouvelle Liste\">\n</form>\n<div class=\"souhaits\">\n $res\n</div>\nEND;\n return $html;\n }", "title": "" }, { "docid": "8f389d25d07760e9f173a106fbb9de5f", "score": "0.62062544", "text": "function createList(){\n\t\tgetJSON();\n\t\tglobal $data;\n\n\t\tforeach($data as $obj){\n\t\t\techo \"<li><a href='profile.php?user=\".$obj->name.\"'>\".$obj->name.\"</a></li>\";\n\t\t}\n\t}", "title": "" }, { "docid": "4c0911ef74c125e2745f36761c3fd959", "score": "0.6189368", "text": "public function listar()\n {\n }", "title": "" }, { "docid": "fc587691898429843aee3d4f788f6819", "score": "0.61511767", "text": "public function lists();", "title": "" }, { "docid": "42a7a82d5e01a3db53e9cb5d09e9d56a", "score": "0.61225015", "text": "abstract public function getList();", "title": "" }, { "docid": "42a7a82d5e01a3db53e9cb5d09e9d56a", "score": "0.61225015", "text": "abstract public function getList();", "title": "" }, { "docid": "42a7a82d5e01a3db53e9cb5d09e9d56a", "score": "0.61225015", "text": "abstract public function getList();", "title": "" }, { "docid": "0d1f6c3a557d33cea4ad99ef3a2dd4df", "score": "0.61213267", "text": "public function insertList(){\n global $vues;\n $list_name=Validation::nettoyer_string($_POST['list_name']);\n $l_manager=new ListManager();\n if(isset($_POST[checkPrivate]) && isset($_SESSION['user'])){\n $username=Validation::nettoyer_string($_SESSION['user']);\n $l_manager->insert($list_name,$username);\n }else{\n $l_manager->insert($list_name,null);\n }\n require_once($vues['homepage']);\n }", "title": "" }, { "docid": "b23c27265a44197b427876f317d42195", "score": "0.6117935", "text": "protected function setupListOperation()\n {\n //$this->crud->setFromDb();\n // Categoria\n $this->crud->addColumn([\n 'name' => 'categoria.nombre',\n 'label' => 'Categoria',\n ]);\n // Nombre\n $this->crud->addColumn([\n 'name' => 'nombre',\n 'label' => 'Nombre',\n ]);\n // Area\n $this->crud->addColumn([\n 'name' => 'area.nombre',\n 'label' => 'Area',\n ]);\n // NPC\n $this->crud->addColumn([\n 'name' => 'npc.nombre',\n 'label' => 'NPC',\n ]); \n // Item\n $this->crud->addColumn([\n 'name' => 'item.nombre',\n 'label' => 'Item',\n ]);\n // Experiencia\n $this->crud->addColumn([\n 'name' => 'xp',\n 'label' => 'XP',\n ]); \n // Monedas\n $this->crud->addColumn([\n 'name' => 'oro',\n 'label' => 'Oro',\n ]); \n \n }", "title": "" }, { "docid": "779e68a2fdbdff69f69e358b1ca9084f", "score": "0.6112355", "text": "public function tinyListAction()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "16887d8c9a9cfd6e0c9e660960c636b6", "score": "0.61105126", "text": "public function listcaracteristiqueAction()\n {\n\n\t\t$sessionutilisateur = new Zend_Session_Namespace('utilisateur');\n\t\t//$this->_helper->layout->disableLayout();\n \t\t$this->_helper->layout()->setLayout('layoutpublic');\n\t\t\n\tif (!isset($sessionutilisateur->login)) {$this->_redirect('/administration/login');}\nif($sessionutilisateur->confirmation != \"\"){$this->_redirect('/administration/confirmation');}\n\n $caracteristique = new Application_Model_EuCaracteristiqueMapper();\n $this->view->entries = $caracteristique->fetchAll();\n\n $this->view->tabletri = 1;\n\n }", "title": "" }, { "docid": "1fdd73a9a167d5878bb6e4ebcf8e9c5e", "score": "0.6102436", "text": "function InsererEleves()\n{\n $Donnee = LireEtudiant();\n foreach($Donnee as $Row)\n {\n GenererLi_V2('UlEtudiants',$Row['nom'] . ' ' . $Row['prenom'], $Row['idUsager'],$Row['idUsager'],\"divDansLi\");\n }\n}", "title": "" }, { "docid": "f4a4c15f2970b50a781e3b4b9187f830", "score": "0.6101066", "text": "public function postListar()\n\t{\n\t}", "title": "" }, { "docid": "834afdef2285cdd59a640b979cd0d84f", "score": "0.6089565", "text": "function booklist($list){\n\t\t$this->tab=array();\n\t\t$this->curTabUID=-1;\n\t\t$id=0;\n\t\tforeach($list as $t){\n\t\t\t$this->tab[]=new tab($this->_fullname.$id++);\n\t\t\tend($this->tab)->title=$t['name'];\n\t\t\tend($this->tab)->UID=$t['UID'];\n\t\t}\n\t\t$this->_bookframe(\"frm\");\n\t}", "title": "" }, { "docid": "58c3d504b63fbd88344c94c750638ec1", "score": "0.60824245", "text": "public function listdemandeAction() {\n $sessionmembreasso = new Zend_Session_Namespace('membreasso');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcint');\n\n if (!isset($sessionmembreasso->login)) {$this->_redirect('/integrateur/login');}\n\n \nif(!isset($sessionmembreasso->code_membre) || $sessionmembreasso->code_membre == \"\" || $sessionmembreasso->code_membre == NULL) {\n $sessionmembreasso->error = \"Vous n'etes pas un integrateur... Veuillez mettre à jour votre <strong>Code Membre Personne Physique</strong>. Il n'est pas renseigné ou n'est pas correct.\";\n $this->_redirect('/integrateur/editmembreassomembre');\n return;\n}\n $demande = new Application_Model_EuDemandePaiementMapper();\n $this->view->entries = $demande->fetchAllByEmploye($sessionmembreasso->code_membre);\n\n $this->view->tabletri = 1;\n }", "title": "" }, { "docid": "ccdce0de65cd30d3b82d793cea711c77", "score": "0.6077377", "text": "public function llista() {\n //Models que necessito\n $usuaris = new usuaris_model();\n $llibres = new llibres_model();\n\n $compres = new compres_model();\n $llibres_comprats = new llibres_comprats_model();\n\n //Obtenir totes les compres del client\n $compres_del_client = $compres->getCompres_de_client( $usuaris->getUserId( $_SESSION['myusername'] ) );\n\n $productes = array();\n foreach ($compres_del_client as $c) {\n //echo \"<h1>{$c['data_compra']}, {$c['id']}</h1>\";\n\n //Obté els llibres d'aquesta compra\n $llibres_comps = $llibres_comprats->getLlibres_compra( $c['id'] );\n foreach ($llibres_comps as $ll) {\n //Afegeix al llistat a mostrar\n $fila = $ll;\n //Afegeix el id i la data de la compra\n $fila['id_compra'] = $c['id'];\n $fila['data_compra'] = $c['data_compra'];\n //Obtengo dades del llibre\n $llibre = $llibres->getById( $ll['id_llibre'] );\n $fila['titol'] = $llibre['titol'];\n $fila['autor'] = $llibre['autor'];\n\n $productes[] = $fila;\n }\n }\n\n //Cargamos la vista\n $this->view(\"pantalla_compres-usuari.php\", array(\n \"productes\" => $productes\n ));\n}", "title": "" }, { "docid": "7b40f91ad2afea2cc4af0de6eda9b793", "score": "0.60711414", "text": "private function afficherListe() : string {\n $titre = $this->elem['liste']->titre;\n $token = $this->elem['liste']->token_modif;\n $tokenmodif = $this->elem['liste']->token_participation;\n $server = $_SERVER['SERVER_NAME'];\n $url = $server . $this->path;\n $items = '';\n foreach ($this->elem['items'] as $item)\n $items = $items . '<p><a class=\"lienItem\" href=\"'. $token. \"/\" . $item->id.'\">'.$item->id.' - '.$item->nom.'</a></p>';\n$html = <<<END\n<p>Le lien de partage est le suivant : $url/participation/$tokenmodif</p>\n<div class=\"liste\">\n <h1>$titre</h1>\n <div>$items</div>\n</div>\n<form class=\"formSuppListe\" action=\"$token/modifier\">\n <input class=\"bouton\" type=\"submit\" value=\"Modifier\">\n</form>\n<form class=\"formSuppListe\" action=\"$token/ajouterItem\">\n <input class=\"bouton\" type=\"submit\" value=\"Ajouter un Item\">\n</form>\nEND;\n return $html;\n }", "title": "" }, { "docid": "7e687eeef8b00a57ebb9cc97426e1481", "score": "0.6065919", "text": "public function InterwikiList() {\n\t\tparent::__construct(\"InterwikiList\");\n\t\t\n\t}", "title": "" }, { "docid": "8e0a26e9950370c0d7b0bbad874e7865", "score": "0.606185", "text": "public function listaAction(){\n // $lista->getLista();\n\n // $this->view->lista;\n $this->view->lista = Listas::find(\"realizado = 0\");\n\n }", "title": "" }, { "docid": "fc9fe3bb997a8abcde723e6adc454786", "score": "0.6059775", "text": "function listar_suplementos(){\n\t\t$sql=\"SELECT * FROM suplemento ORDER BY id_sup ASC\";\n\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\twhile ($resultado = mysql_fetch_array($consulta)){\n\t\t\t$this->mensaje=\"si\";\n\t\t\t$this->listado[] = $resultado;\n\t\t}\n\t}", "title": "" }, { "docid": "f78f0f70bb2aafe11965eb9f7f8f16b3", "score": "0.60506135", "text": "protected function setupListOperation()\n {\n $this->crud->addColumn([\n 'name' => 'projet',\n 'type' => 'select',\n 'label' => \"Projet\",\n 'entity' => 'projet',\n 'attribute' => 'nom',\n 'model' => \"App\\Models\\Projet\", // foreign key model\n 'pivot' => false,\n ]);\n $this->crud->addColumn([\n 'name' => 'nom', // The db column name\n 'label' => \"nom\", // Table column heading\n 'type' => 'text'\n ]);\n }", "title": "" }, { "docid": "1bdcb154c87e26cd2f4b88cb51b6d07d", "score": "0.60470057", "text": "public function createSearchList($campo,$table,$fk){\n\t\t\t\t$list = array();\n\t\t\t\t\n\t\t\t\t$entidade = $this->entidades[$this->tableReferences[$fk->tabela]];\n\t\t\t\t\t\n\t\t\t\t$list['tipo'] = \"pesq\";\n\t\t\t\t$list['formseq'] = $this->entidades[$table][\"formseq\"];\n\t\t\t\t$list['filtropai'] = \"seq\";\n\t\t\t\t$list['pesquisa'] = $campo.\"=\".$fk->colunapai.','.$campo.\"Label=\".$fk->colunapai;\n\t\t\t\t$list['lista'] = substr(\"list_pesq_\".$table,0,40);\n\t\t\t\t$list['label'] = substr(\"Lista \".$table,0,40);\n\t\t\t\t$list['tabseq'] = $entidade['tabseq'];\n\t\t\t\t$list['obapendice'] = \"-\";\n\t\t\t\t$list['acfiltro'] = '1';\n\t\t\t\t$list['acincluir'] = '0';\n\t\t\t\t$list['nivel'] = '1';\n\t\t\t\t$list['acdeletar'] = '0';\n\t\t\t\t$list['aceditar'] = '0';\n\t\t\t\t$list['acviews'] = '0';\n\t\t\t\t$list['acenviar'] = '1';\n\t\t\t\t$list['formainclude'] = 'one';\n\t\t\t\t$list['acreplicar'] = '1';\n\t\t\t\t$list['acselecao'] = '0';\n\t\t\t\t$list['ordem'] = 'seq/desc';\n\t\t\t\t$list['aclimite'] = '1';\n\t\t\n\t\t\t\t$retInsert = $this->insertKrs(\"lista\", $list);\n\t\t\t\t$this->entidades[$table]['listseq'] = $codigoLista = $retInsert['seq'];\n\t\t\t\t\t\n\t\t\t\t$this->updateKrs(\"forms\",$entidade[\"formseq\"],array('listseq'=>$retInsert['seq']));\n\t\t\n\t\t\t\t$this->updateKrs(\"lista\",$retInsert['seq'],array('listseq'=>$retInsert['seq']));\n\t\t\t\t\t\n\t\t\t\t// Gerar colunas (Gerar Privilegio)\n\t\t\t\t\t\n\t\t\t\tforeach($this->tableEstructures[$this->tableReferences[$fk->tabela]] as $col => $dataCol){\n\t\t\t\t\t$count = 0;\n\t\t\t\t\t$width = 1000/count($this->tableEstructures[$this->tableReferences[$fk->tabela]]);\n\t\t\t\t\t$column = array();\n\t\t\t\t\t$column['listseq'] = $retInsert['seq'];\n\t\t\t\t\t$column['coluna'] = $col;\n\t\t\t\t\t$column['label'] = $col;\n\t\t\t\t\t$column['alinhalabel'] = 'left';\n\t\t\t\t\t$column['alinhadados'] = 'left';\n\t\t\t\t\t$column['largura'] = $dataCol->length > 0 ? $dataCol->length*15 : $width;\n\t\t\t\t\t$column['colfunction'] = '-';\n\t\t\t\t\t$column['valorpadrao'] = '0';\n\t\t\t\t\t$column['tipocoluna'] = '1';\n\t\t\t\t\t$column['tabseq'] = $this->entidades[$this->tableReferences[$fk->tabela]]['tabseq'];\n\t\t\t\t\t$column['colunaaux'] = '-';\n\t\t\t\t\t$column['link'] = '0';\n\t\t\t\t\t$column['ordem'] = ++$count;\n\t\t\n\t\t\t\t\t$this->insertKrs('coluna', $column);\n\t\t\t\t}\n\n\t\t\n\t\t\treturn $codigoLista;\n\t}", "title": "" }, { "docid": "f852b02ada9624be17ccc6c0b233bca4", "score": "0.6039818", "text": "public function list()\n {\n }", "title": "" }, { "docid": "8921ac4b4a527a8686102c5568961260", "score": "0.60349464", "text": "function buildList() {\n\t\t$this->getEngine()->assign('oModel', utilityOutputWrapper::wrap($this->getModel()));\n\t\t$this->getEngine()->assign('pagingOptions', utilityOutputWrapper::wrap($this->getController()->getPagingOptions()));\n\t\t$this->getEngine()->assign('pagingOffset', mvcDaoController::PAGING_VAR_OFFSET);\n\t\t$this->getEngine()->assign('pagingLimit', mvcDaoController::PAGING_VAR_LIMIT);\n\t}", "title": "" }, { "docid": "2df9ce7b758e0c7a5fc4dda6b1a89afe", "score": "0.6027154", "text": "public function optionList(){\n\t\t$this->layout = null;\n\t\t//$this->autoRender = false;\n\n\t\t//$this->Demanda->recursive = -1;\n\t\tif(($this->params['url']['tipo'] == 'Contrato') || ($this->params['url']['id'] == '0')){\n\t\t\t$this->set('items',\n\t\t\t\t\t\t\t\t\t$this->Item->find('list', array(\n\t\t\t\t\t\t\t\t\t\t'fields' => array('Item.id', 'Item.nome'),\n\t\t\t\t\t\t\t\t\t\t'conditions' => array('Item.contrato_id' => $this->params['url']['id']))));\n\t\t}\n\t\telse{\n\t\t\t$this->set('items',\n\t\t\t\t\t\t\t\t\t$this->Item->find('list', array(\n\t\t\t\t\t\t\t\t\t\t'fields' => array('Item.id', 'Item.nome'),\n\t\t\t\t\t\t\t\t\t\t'conditions' => array('Item.aditivo_id' => $this->params['url']['id']))));\n\t\t}\n\t}", "title": "" }, { "docid": "48c6bc4fa9f59dad397c45bbe318ad13", "score": "0.6023817", "text": "public function list(): void\n {\n }", "title": "" }, { "docid": "676709ed2edcfb349403964f8f698341", "score": "0.60231215", "text": "public function lista(){\r\n $view = USingleton::getInstance('VRicerca');\r\n $FLibro=new FLibro();\r\n $parametri=array();\r\n $categoria=$view->getCategoria();\r\n $parola=$view->getParola();\r\n if ($categoria!=false){\r\n $parametri[]=array('categoria','=',$categoria);\r\n }\r\n if ($parola!=false){\r\n $parametri[]=array('descrizione','LIKE','%'.$parola.'%');\r\n }\r\n $limit=$view->getPage()*$this->_libri_per_pagina.','.$this->_libri_per_pagina;\r\n $num_risultati=count($FLibro->search($parametri));\r\n $pagine = ceil($num_risultati/$this->_libri_per_pagina);\r\n $risultato=$FLibro->search($parametri, '', $limit);\r\n if ($risultato!=false) {\r\n $array_risultato=array();\r\n foreach ($risultato as $item) {\r\n $tmpLibro=$FLibro->load($item->ISBN);\r\n $array_risultato[]=array_merge(get_object_vars($tmpLibro),array('media_voti'=>$tmpLibro->getMediaVoti()));\r\n }\r\n }\r\n $view->impostaDati('pagine',$pagine);\r\n $view->impostaDati('task','lista');\r\n $view->impostaDati('parametri','categoria='.$categoria.'&stringa='.$parola);\r\n $view->impostaDati('dati',$array_risultato);\r\n return $view->processaTemplate();\r\n }", "title": "" }, { "docid": "435c3262b0a68e1903128675f71959a6", "score": "0.60194707", "text": "private function initList()\n {\n /**\n * Those are needed if you want to add more data to select then table of object of this controller\n */\n $this->_select = ' pl.`name` as product_name, pl.`name` as product_button_name';\n $this->_join = 'LEFT JOIN `'._DB_PREFIX_.'product_lang` `pl` ON pl.`id_product` = a.`id_training_article` AND pl.`id_lang` = ' . (int)$this->context->language->id;\n $this->fields_list = array(\n 'id_training_article' => array(\n 'title' => $this->module->l('Id'),\n 'width' => 100,\n 'class' => 'my-custom-class'\n ),\n 'name' => array(\n 'title' => $this->module->l('Name'),\n 'width' => 80,\n ),\n 'description' => array(\n 'title' => $this->module->l('Description'),\n 'width' => 80,\n 'filter_key' => 'b!description'\n ),\n 'type' => array(\n 'title' => $this->module->l('Type'),\n 'width' => 80,\n ),\n 'product_name' => array(\n 'title' => $this->module->l('Product Name'),\n 'width' => 80,\n 'filter_key' => 'pl!name'\n ),\n 'product_button_name' => array(\n 'title' => $this->module->l('Product Name'),\n 'width' => 80,\n 'callback' => 'getProductName',\n ),\n );\n\n }", "title": "" }, { "docid": "5d2c6f8f489e5b6e60534d7d7f75fa02", "score": "0.60152394", "text": "public function it_can_display_the_create_page_and_store_the_list()\n\t{\n\t}", "title": "" }, { "docid": "8f360484cbc697ebfca7a0ebbefef2d3", "score": "0.6013167", "text": "function createList($name){\n\t$conn = getDatabaseConnection();\n\n\t$query = $conn->prepare(\"INSERT INTO lists (name) VALUES (:name)\");\n\t$query->bindParam(\":name\", $name);\n\t$query->execute();\n}", "title": "" }, { "docid": "b9b883f3e4de82215518643c52c4b78f", "score": "0.5994645", "text": "function getElementListTemplate();", "title": "" }, { "docid": "e4a0d12ede1642140b2b2864bea7bde8", "score": "0.59891003", "text": "public function show_list();", "title": "" }, { "docid": "ecb0bb0829e8e156954965bcfa412832", "score": "0.5985193", "text": "public function listoffreurprojetAction() {\n\t\t$sessionmembreasso = new Zend_Session_Namespace('membreasso');\n\t\t//$this->_helper->layout->disableLayout();\n \t\t$this->_helper->layout()->setLayout('layoutpublicesmcint');\n\n\t if (!isset($sessionmembreasso->login)) {$this->_redirect('/integrateur/login');}\n\n $offreurprojet = new Application_Model_EuOffreurProjetMapper();\n $this->view->entries = $offreurprojet->fetchAllByMembreasso($sessionmembreasso->membreasso_id);\n\n }", "title": "" }, { "docid": "76e1279643a2dd347e961e8478e8cca8", "score": "0.59851265", "text": "public function ArrayList()\r\n {\r\n }", "title": "" }, { "docid": "e6e6889d743c6f0ea1bb6851c4c6241a", "score": "0.5984634", "text": "public function __construct(){\n $this->list = [];\n }", "title": "" }, { "docid": "deb41cee61092fcc0a46eae26f3bb6b2", "score": "0.59741676", "text": "public function listaAction() \n { \n $form = new Formulario(\"form\");\n // valores iniciales formulario (C)\n $id = (int) $this->params()->fromRoute('id', 0);\n $form->get(\"id\")->setAttribute(\"value\",$id); \n // Sedes\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n // Empleados\n $d = New AlbumTable($this->dbAdapter); \n $datos = $d->getEmp('');\n $arreglo='';\n foreach ($datos as $dat)\n {\n $idc=$dat['id'];$nom = $dat['CedEmp'].' - '.$dat['nombre'].' '.$dat['apellido'];\n $arreglo[$idc]= $nom;\n } \n $form->get(\"idEmp\")->setValueOptions($arreglo); \n\n $datos = $d->getMotivoAntCesantias('');// Listado de motivos para pedir las cesantias\n $arreglo='';\n foreach ($datos as $dat){\n $idc=$dat['id'];$nom = $dat['nombre'];\n $arreglo[$idc]= $nom;\n } \n $form->get(\"tipo\")->setValueOptions($arreglo); \n\n $datos = $d->getTerceros('');// Listado de terceros \n $arreglo='';\n foreach ($datos as $dat){\n $idc=$dat['id'];$nom = $dat['codigo'].' - '.$dat['nombre'];\n $arreglo[$idc]= $nom;\n } \n $form->get(\"tipo1\")->setValueOptions($arreglo); \n $form->get(\"tipo2\")->setValueOptions($arreglo); \n\n $val=array\n (\n \"0\" => 'Revisión',\n \"1\" => 'Aprobado'\n ); \n $form->get(\"estado\")->setValueOptions($val); \n \n $valores=array\n (\n \"titulo\" => $this->tfor,\n \"form\" => $form,\n 'url' => $this->getRequest()->getBaseUrl(),\n 'id' => $id,\n \"lin\" => $this->lin\n ); \n // ------------------------ Fin valores del formulario \n \n if($this->getRequest()->isPost()) // Actulizar datos\n {\n $request = $this->getRequest();\n if ($request->isPost()) {\n // Zona de validacion del fomrulario --------------------\n $album = new ValFormulario();\n $form->setInputFilter($album->getInputFilter()); \n $form->setData($request->getPost()); \n $form->setValidationGroup('id','idEmp'); // ------------------------------------- 2 CAMPOS A VALDIAR DEL FORMULARIO (C) \n // Fin validacion de formulario ---------------------------\n if ($form->isValid()) {\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $u = new Anticipocesantias($this->dbAdapter);// ------------------------------------------------- 3 FUNCION DENTRO DEL MODELO (C) \n $data = $this->request->getPost();\n $datG = $d->getConfiguraG(\"\");\n\n // INICIO DE TRANSACCIONES\n $connection = null;\n try \n { \n $connection = $this->dbAdapter->getDriver()->getConnection();\n $connection->beginTransaction(); \n $u->actRegistro($data, $datG['idAntCes']);\n if ($data->estado==2) \n {\n $datEmp = $d->getGeneral1(\"select idGrup , idCcos from a_empleados where id=\".$data->idEmp); \n\n $d->modGeneral(\"insert into n_nomina (fechaI,fechaF,idTnom,idGrupo, idCal,idIcal,estado,idUsu,numEmp)\n values('\".$data->fecDoc.\"','\".$data->fecDoc.\"' ,3 ,\".$datEmp['idGrup'].\" ,5 ,217 , 1 , 1, 1)\");\n\n $datNom = $d->getGeneral1(\"select @@identity AS id\"); \n $d->modGeneral(\"insert into n_nomina_e (idNom,idEmp)\n values(\".$datNom['id'].\",\".$data->idEmp.\")\"); \n\n $datInom = $d->getGeneral1(\"select @@identity AS id\"); \n // Cesantias \n $d->modGeneral(\"insert into n_nomina_e_d (idNom,idInom,idConc,idCcos,devengado, pagoCes)\n values(\".$datNom['id'].\",\".$datInom['id'].\",213, \".$datEmp['idCcos'].\" ,\".$data->numero.\", 1)\"); \n\n // Intereses\n $d->modGeneral(\"insert into n_nomina_e_d (idNom,idInom,idConc,idCcos,devengado)\n values(\".$datNom['id'].\",\".$datInom['id'].\",195, \".$datEmp['idCcos'].\" ,\".$data->numero1.\")\"); \n }\n $connection->commit();\n $this->flashMessenger()->addMessage(''); \n return $this->redirect()->toUrl($this->getRequest()->getBaseUrl().$this->lin);\n\n }// Fin try casth \n catch (\\Exception $e) \n {\n if ($connection instanceof \\Zend\\Db\\Adapter\\Driver\\ConnectionInterface) {\n $connection->rollback();\n echo $e;\n } \n /* Other error handling */\n }// FIN TRANSACCION \n\n\n }\n }\n return new ViewModel($valores);\n \n }else{ \n if ($id > 0) // Cuando ya hay un registro asociado\n {\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $u=new Anticipocesantias($this->dbAdapter); // ---------------------------------------------------------- 4 FUNCION DENTRO DEL MODELO (C) \n $datos = $u->getRegistroId($id);\n // Valores guardados\n $form->get(\"comen\")->setAttribute(\"value\",$datos['comen']); \n $form->get(\"idEmp\")->setAttribute(\"value\",$datos['idEmp']); \n $form->get(\"tipo\")->setAttribute(\"value\",$datos['idMot']); \n $form->get(\"tipo1\")->setAttribute(\"value\",$datos['idTerC']); \n $form->get(\"tipo2\")->setAttribute(\"value\",$datos['idTerI']); \n $form->get(\"estado\")->setAttribute(\"value\",$datos['estado']); \n $form->get(\"numero\")->setAttribute(\"value\",$datos['valor']); \n $form->get(\"numero1\")->setAttribute(\"value\",$datos['interes']); \n $form->get(\"fecDoc\")->setAttribute(\"value\",$datos['fechaCorte']); \n } \n return new ViewModel($valores);\n }\n }", "title": "" }, { "docid": "d11406151d57ba88767a6d7c152416fb", "score": "0.596557", "text": "function displayList(){\n $this->setMenu('b2b_tecneco_survey');\n $success = _var('success');\n if( $success ){\n $this->displayMessage('Dati salvati con successo','success');\n }\n \n\t\t$list = Survey::prepareQuery()\n\t\t->get();\n\t\t$this->setVar('list',$list);\n\t\t$this->output('surveys/list.htm');\n\t\t\n\t\t\n }", "title": "" }, { "docid": "474428a56aa4b5ef7ef7cdf814370911", "score": "0.5964603", "text": "function list_add ( $data, $actions )\n{\n global $i18n, $scrollList, $factory, $global_tag_prefix;\n\n $entries = array ();\n \n for ($i = 0; $i < count($data); $i++) {\n array_push( $entries, \n// this is now broken: $factory->getTextField(\"\", $data[$i], \"r\") );\n// this still works, at least: (silly, no?)\n $factory->getFullName(\"\", $data[$i], \"r\") );\n }\n\n $buttons = array ();\n \n if ($actions[\"edit\"]) {\n array_push ($buttons, \n $factory->getModifyButton( $actions[\"edit\"] ));\n }\n \n if ($actions[\"remove\"]) {\n array_push($buttons,\n $factory->getRemoveButton( $actions[\"remove\"] ));\n }\n \n array_push ($entries, $factory->getCompositeFormField($buttons));\n\n $scrollList->addEntry($entries); \n}", "title": "" }, { "docid": "e35c0820b222b6b10c2444fb25d95f66", "score": "0.5961492", "text": "public function createListsFilter();", "title": "" }, { "docid": "e135d2603f35446b061437b448f6aa81", "score": "0.5960035", "text": "protected function actionList() {\n\n }", "title": "" }, { "docid": "cff22e356c8d779bcbf752fd0828437f", "score": "0.5957067", "text": "public function action_list(){\n\t}", "title": "" }, { "docid": "e47c77a0a3ae3c96a2352ea57e7089de", "score": "0.5951713", "text": "protected function setupListOperation()\n {\n \n $this->crud->addColumn([\n 'name' => 'nom', // The db column name\n 'label' => \"Nom\", // Table column heading\n 'type' => 'text'\n ]);\n $this->crud->addColumn([\n 'name' => 'logo',\n 'label' => 'logo',\n 'type' => 'image',\n 'prefix' => 'storage/',\n ]);\n $this->crud->addColumn([\n 'name' => 'categories',\n 'type' => 'select',\n 'label' => \"Categorie\",\n 'entity' => 'categories',\n 'attribute' => 'nom',\n 'model' => \"App\\Models\\Category\", // foreign key model\n 'pivot' => true,\n ]);\n \n }", "title": "" }, { "docid": "05e8152058fbbfe473f7da508d85876f", "score": "0.59498215", "text": "function biblio_rechercher_liste_des_champs($liste){\n\t$liste['tbl_bibliographie'] = array('titre'=>2,'auteurs'=>2,'citation'=>2,'autre_media'=>1,'abstract'=>1);\n\treturn $liste;\n}", "title": "" }, { "docid": "3fdbe80bca603d6d684db198ec7764dd", "score": "0.5945101", "text": "public function listJoueurs(){\n $tabJoueur = $this->manager->findById(\"joueur\");\n extract($this->data_view);\n $this->data_view['tabJoueur']= $tabJoueur;\n $this->view=\"listJoueurs\";\n $this->render();\n }", "title": "" }, { "docid": "94bb00e485d70704d9f197fe4ab5be11", "score": "0.59371644", "text": "public function listgAction() \n { \n if($this->getRequest()->isPost()) // Actulizar datos\n {\n $request = $this->getRequest();\n if ($request->isPost()) {\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $u = new Dotaciones($this->dbAdapter);// ------------------------------------------------- 3 FUNCION DENTRO DEL MODELO (C) \n $data = $this->request->getPost();\n $u->actRegistro($data);\n // Marcar dotacion entregada a empleado\n $d = new AlbumTable($this->dbAdapter);\n } \n } \n }", "title": "" }, { "docid": "e1f100b0ab7eedbff717c7bd9abc33fe", "score": "0.59331936", "text": "function _get_list_add_info($list = array())\n {\n\n // Tai cac file thanh phan\n //$this->load->helper('file');\n\n // Xu ly danh sach\n foreach ($list as $row) {\n $row = mod('message')->add_info($row);\n }\n\n return $list;\n }", "title": "" }, { "docid": "9ba1df1b0b7c129a7d4401d394b57638", "score": "0.59293747", "text": "public function listdAction() \n {\n $id = (int) $this->params()->fromRoute('id', 0);\n if ($id > 0)\n {\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $d=new AlbumTable($this->dbAdapter); // ---------------------------------------------------------- 5 FUNCION DENTRO DEL MODELO (C) \n $data = $this->request->getPost(); \n $datos = $d->getGeneral1(\"select idEmp from n_incapacidades where id=\".$id); \n $idEmp = $datos['idEmp']; \n $u=new Incapacidad($this->dbAdapter); // ---------------------------------------------------------- 5 FUNCION DENTRO DEL MODELO (C) \n $u->delRegistro($id);\n $d->modGeneral(\"update a_empleados set idInc=0 where id=\".$idEmp); \n return $this->redirect()->toUrl($this->getRequest()->getBaseUrl().$this->lin);\n } \n }", "title": "" }, { "docid": "78f349678f380adcf5ccf7f7f6c401fb", "score": "0.5924414", "text": "public function getList()\n {\n\n $sql = \"SELECT cod_distribuidor, nom_distribuidor, correo_distribuidor, nom_categoria,cod_estado\n FROM distribuidor, categoria_distribuidor\n WHERE distribuidor.cod_categoria_distribuidor = categoria_distribuidor.cod_categoria_distribuidor\n ORDER BY nom_distribuidor\";\n $list = array();\n if (!$resultado = pg_query($this->conexion, $sql)) die();\n while ($row = pg_fetch_array($resultado)) {\n $item = new Distribuidor();\n $item->setCod_distribuidor($row[0]);\n $item->setNom_distribuidor($row[1]);\n $item->setCorreo_distribuidor($row[2]);\n $item->setNom_categoria_distribuidor($row[3]);\n $item->setEstado_distribuidor($row[4]);\n array_push($list, $item);\n\n }\n return $list;\n/*\n $sql = \"SELECT * FROM TICKET\";\n $tickets = array();\n if (!$resultado = pg_query($this->conexion, $sql)) die();\n while ($row = pg_fetch_array($resultado)) {\n $ticket = new Ticket();\n $ticket->setCod_ticket($row[0]);\n $ticket->setNom_ticket($row[1]);\n $ticket->setDescripción_ticket($row[2]);\n $ticket->setEstado_del_ticket($row[3]);\n $ticket->setFecha_creacion($row[4]);\n $ticket->setCod_cliente($row[5]);\n $ticket->setCod_empleado($row[6]);\n\n array_push($tickets, $ticket);\n }\n return $tickets;\n */\n }", "title": "" }, { "docid": "7b44f9cd5ac3d67e4fb67b5e767e6bcb", "score": "0.59182745", "text": "function liste_projet(){\n\t\t$requete = \"SELECT * FROM projets ORDER BY date_creation ASC\";\n\t\t$donnees = connexion($requete);\n\t\t\n\t\tif(mysql_num_rows($donnees) == 0){\n\t\t\treturn \"<div>Aucuns projets trouvés</div>\";\n\t\t}\n\t\t\n\t\t$r = \"\";\n\t\twhile($ligne = mysql_fetch_assoc($donnees)){\n\t\t\t$r .=\"<li id='projet_{$ligne['id']}'>\n\t\t\t\t\t<header>{$ligne['titre']}</header>\n\t\t\t\t\t<div class='projet_date'>Crée le \".conversion_date($ligne['date_creation']).\"</div>\n\t\t\t\t\t<div class='projet_avancement'>Avancement: \".etat_projet($ligne['etat']).\"</div>\n\t\t\t\t\t<p>{$ligne['description']}</p>\n\t\t\t\t\t<div class='participants'>\n\t\t\t\t\t\t<header>Y participent :</header>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\".affichage_participants($ligne['participants']).\"\n\t\t\t\t\t\t</div>\";\n\t\tif(!deja_inscrit_projet($ligne['participants'])){\n\t\t\t\t$r .= \t\"<div>\n\t\t\t\t\t\t\t<form method='post' action='projet_inscription.php'>\n\t\t\t\t\t\t\t\t<input type='hidden' name='id_projet' value='{$ligne['id']}'>\n\t\t\t\t\t\t\t\t<input type='submit' value=\\\"Participer au projet\\\">\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\";\n\t\t\t}else{\n\t\t\t\t$r .= \t\"<div>\n\t\t\t\t\t\t\t<form method='post' action='projet_desincription.php'>\n\t\t\t\t\t\t\t\t<input type='hidden' name='id_projet' value='{$ligne['id']}'>\n\t\t\t\t\t\t\t\t<input type='submit' value=\\\"Quitter le projet\\\">\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\";\n\t\t\t}\n\t\t\t$r .= bouton_edition_projet($ligne['id']);\n\t\t\t$r .= \"</li>\";\n\t\t}\n\t\treturn \"<ul>\".$r.\"</ul>\";\n\t}", "title": "" }, { "docid": "1551b11ff804e3a3934a7b7a35eeb715", "score": "0.5916316", "text": "protected function setupListOperation()\n {\n $this->crud->setColumns([\n [ \n 'name' => 'id',\n 'label' => 'ID',\n 'type' => 'number',\n\n ],\n [\n 'name' => 'name',\n 'type' => 'text',\n 'label' => 'Name',\n 'orderable' => false,\n ],\n [\n 'name' => 'balance',\n 'type' => 'text',\n 'label' => 'Balance',\n ]\n ]);\n $this->crud->addButtonFromModelFunction('line', 'open_recive', 'openReceive', 'beginning');\n $this->crud->addButtonFromModelFunction('line', 'open_pay', 'openPay', 'beginning');\n\n\n }", "title": "" }, { "docid": "a3013b5a902f87f671b4c552e2c6f5ce", "score": "0.5915144", "text": "protected function setupListOperation()\n {\n $this->crud->setColumns([\n ['name'=>'title_tk', 'type'=>'text', 'label' => 'Title Turkmen'],\n ['name'=>'title_ru', 'type'=>'text', 'label' => 'Title Russian']\n ]);\n }", "title": "" }, { "docid": "df4f761534084530d22fecf3670288af", "score": "0.5908171", "text": "public function listtraiteAction()\n {\n\n\t\t$sessionutilisateur = new Zend_Session_Namespace('utilisateur');\n\t\t//$this->_helper->layout->disableLayout();\n \t\t$this->_helper->layout()->setLayout('layoutpublic');\n\t\t\n\tif (!isset($sessionutilisateur->login)) {$this->_redirect('/administration/login');}\nif($sessionutilisateur->confirmation != \"\"){$this->_redirect('/administration/confirmation');}\n\n\n $tabela = new Application_Model_DbTable_EuTpagcp();\n $select = $tabela->select(Zend_Db_Table::SELECT_WITH_FROM_PART);\n\t\t\t\t$select->setIntegrityCheck(false);\n //$select->joinRight('eu_traite', 'eu_traite.traite_tegcp = eu_tpagcp.id_tpagcp');\n $select->where('eu_tpagcp.escomptable = 3');\n //$select->where('eu_traite.traiter != 8');\n $select->order('eu_tpagcp.date_deb ASC');\n $achats = $tabela->fetchAll($select);\n\t\t\n\t\t$this->view->achats = $achats;\n\n\n\n $this->view->tabletri = 1;\n\n }", "title": "" }, { "docid": "973a06dc775a8da986bc932cc606160d", "score": "0.59021485", "text": "public function listfichierAction()\n {\n\n\t\t$sessionutilisateur = new Zend_Session_Namespace('utilisateur');\n\t\t//$this->_helper->layout->disableLayout();\n \t\t$this->_helper->layout()->setLayout('layoutpublic');\n\t\t\n\tif (!isset($sessionutilisateur->login)) {$this->_redirect('/administration/login');}\nif($sessionutilisateur->confirmation != \"\"){$this->_redirect('/administration/confirmation');}\n\n $fichier = new Application_Model_EuFichierMapper();\n $this->view->entries = $fichier->fetchAll();\n\n $this->view->tabletri = 1;\n\n }", "title": "" }, { "docid": "6a1483127b6c8ece0f762ee9aff4d297", "score": "0.5896753", "text": "function createListFieldsFrontend()\n {\n $insertValues = \"\";\n $table = Doctrine_Core::getTable($this->tableName)->getColumns();\n \n $head = '';\n $td = '';\n $filters = '';\n foreach ($table as $fielnameKey => $info)\n {\n \t$fielname = ucwords(str_replace('_', ' ', $fielnameKey));\n if (strtolower($fielnameKey) != 'created_at' && strtolower($fielnameKey) != 'updated_at') {\n $head .= \"<th class=\\\"list\\\">\".ucwords(str_replace('_',' ', $fielname)).\"</th>\\r\\n\";\n $td .= \"<td><a href=\\\"<?php echo \\$this->url(array('module'=>'\".$this->moduleName.\"', 'action'=>'show', 'id'=>\\$\".strtolower($this->moduleName).\"->id));?>\\\"><?php echo \\$\".strtolower($this->moduleName).\"->\".$fielnameKey.\";?></a></td>\\r\\n\";\n $filters .= \"\n \".ucwords(str_replace('_', ' ', $fielnameKey)).\":\n <input type='text' id='filter-\".$fielnameKey.\"' name='filter[\".$fielnameKey.\"]' value='<?php echo \\$this->filter['\".$fielnameKey.\"'];?>'><br/>\n \";\n }\n }\n \n $this->list_th = $head;\n $this->list_td = $td;\n $this->filters = $filters;\n }", "title": "" }, { "docid": "21bcde25ec8718e255c8ede6f8791359", "score": "0.58949924", "text": "public function itemcode_create_list(){\n\t\n\t$this->load->helper('url');\n\t$this->load->view('itemcode/qcs_list_itemcode_gen');\n\t}", "title": "" }, { "docid": "20ac3174e8716176f0c116013c1d4a63", "score": "0.5892178", "text": "abstract function buildListLayout(): void;", "title": "" }, { "docid": "dad745b1b96d62847985169ce631e903", "score": "0.58848506", "text": "public function Listar() //Función para listar los productos\r\n\t {\r\n\t\t\t\t \r\n\t\t\t\t $this->Productos=array(); //Hay que vaciar el array de objetos productos\r\n\r\n $consulta = \"select * FROM producto\"; \r\n\r\n $param=array(); //Creo un array para pasarle parámetros\r\n\r\n $this->Consulta($consulta,$param); //Ejecuto la consulta\r\n \t\t\t\r\n\t\t\t\t foreach ($this->datos as $fila) //Recorro el array de la consulta\r\n\t\t\t\t {\r\n\t\t\t\t\t \r\n\t\t\t\t\t $producto = new Producto(); //Creo un nuevo objeto\r\n //Le seteo las variables, y así me ahorro el constructor \r\n $producto->cod = $fila[\"cod\"]; //Accedo a la propiedad directamente\r\n\t\t\t\t\t $producto->__SET(\"nombre\",$fila[\"nombre\"]);\r\n\t\t\t\t\t $producto->__SET(\"nombre_corto\",$fila[\"nombre_corto\"]);\r\n $producto->__SET(\"descripcion\",$fila[\"descripcion\"]);\r\n $producto->__SET(\"PVP\",$fila[\"PVP\"]);\r\n $producto->__SET(\"familia\",$fila[\"familia\"]);\r\n // $producto->__SET(\"stock\",$fila[\"stock\"]);\r\n \r\n $this->Productos[]=$producto; //Meto el producto en el array productos\r\n \r\n\t\t\t\t\t \r\n\t\t\t\t }\r\n }", "title": "" }, { "docid": "b5683e52e61ea0be472c0afd96f53f5d", "score": "0.5884028", "text": "public function listoffreurprojetAction()\n {\n\n\t\t$sessionutilisateur = new Zend_Session_Namespace('utilisateur');\n\t\t//$this->_helper->layout->disableLayout();\n \t\t$this->_helper->layout()->setLayout('layoutpublic');\n\t\t\n\t if (!isset($sessionutilisateur->login)) {$this->_redirect('/administration/login');}\n if($sessionutilisateur->confirmation != \"\"){$this->_redirect('/administration/confirmation');}\n\n $offreur_projet = new Application_Model_EuOffreurProjetMapper();\n if($sessionutilisateur->code_agence != \"001001001001\"){\n //$this->view->entries = $offreur_projet->fetchAllByPublier(0, $sessionutilisateur->code_agence);\n $agence = new Application_Model_EuAgenceMapper();\n $this->view->entries = $agence->fetchAllByAgence($sessionutilisateur->code_agence);\n\t\t\t}else{\n //$this->view->entries = $offreur_projet->fetchAllByPublier(0, \"\");\n $agence = new Application_Model_EuAgenceMapper();\n $this->view->entries = $agence->fetchAllByAssociation();\n\t\t\t\t}\n\n $this->view->tabletri = 1;\n\n }", "title": "" }, { "docid": "0b5bd77049f993c5aae600b1b00014d1", "score": "0.5876418", "text": "public function listmenuAction()\n {\n\n\t\t$sessionutilisateur = new Zend_Session_Namespace('utilisateur');\n\t\t//$this->_helper->layout->disableLayout();\n \t\t$this->_helper->layout()->setLayout('layoutpublic');\n\t\t\n\tif (!isset($sessionutilisateur->login)) {$this->_redirect('/administration/login');}\nif($sessionutilisateur->confirmation != \"\"){$this->_redirect('/administration/confirmation');}\n\n $menu = new Application_Model_EuMenuMapper();\n $this->view->entries = $menu->fetchAll();\n\n $this->view->tabletri = 1;\n\n }", "title": "" }, { "docid": "f0c386575eb4a2fdf9bb679be74e3192", "score": "0.5869455", "text": "public function create()\n {\n return View::make('backend.lists.list_einheit.create');\n }", "title": "" }, { "docid": "9bd5d12db6b072eb4aa894fc710204a9", "score": "0.5868677", "text": "public function listacheteurAction()\n {\n\n\t\t$sessionutilisateur = new Zend_Session_Namespace('utilisateur');\n\t\t//$this->_helper->layout->disableLayout();\n \t\t$this->_helper->layout()->setLayout('layoutpublic');\n\t\t\n\tif (!isset($sessionutilisateur->login)) {$this->_redirect('/administration/login');}\nif($sessionutilisateur->confirmation != \"\"){$this->_redirect('/administration/confirmation');}\n\n $acheteur = new Application_Model_EuAcheteurMapper();\nif($sessionutilisateur->code_groupe == \"espace_kacm\"){\n $this->view->entries = $acheteur->fetchAllByTypeTransfert0(\"PP\", \"AERL\", $sessionutilisateur->code_agence);\n}else if($sessionutilisateur->code_groupe == \"espace_capa\"){\n $this->view->entries = $acheteur->fetchAllByTypeTransfert0(\"PP\", \"CAPA\", $sessionutilisateur->code_agence);\n}else{\n $this->view->entries = $acheteur->fetchAll30(\"PP\", $sessionutilisateur->code_agence);\n}\n\n $this->view->tabletri = 1;\n\n }", "title": "" }, { "docid": "b6f7fe1f11aa1f158a4e10e4ece0f7a9", "score": "0.5864359", "text": "public function renommerUneListe(){\n $liste_id = filter_var($_POST['liste_id'], FILTER_SANITIZE_NUMBER_INT);\n //On recupere la liste assosiciee\n $liste = m\\Liste::where('no', '=', $liste_id)->first();\n\n //SI L'UTILISATEUR EST CONNECTÉ AU SITE\n if($liste->estProprietaireSession($_SESSION)){\n //On recupere le nouveau titre\n $liste->titre = filter_var($_POST['titre'], FILTER_SANITIZE_STRING);\n $liste->description = filter_var($_POST['description'], FILTER_SANITIZE_STRING);\n $liste->save();\n }\n\n $app = \\Slim\\Slim::getInstance();\n $app->redirect($app->urlFor('afficherListe', ['lid' => $liste_id]));\n }", "title": "" }, { "docid": "a02d9d3300febce3b182f1693a23b9fe", "score": "0.586391", "text": "public function actionCreateListing()\n\t{\n\t\t// (so other plug-ins can make use of this, I'll need to look into this)\n\t\t\n\t\t$options = XenForo_Application::get('options');\n\n\t\t\n\t\t\n\t\t$forumId = $this->_input->filterSingle('node_id', XenForo_Input::UINT);\n\t\t\n\t\t\n\t\t$forumName = $this->_input->filterSingle('node_name', XenForo_Input::STRING);\n\t\t$dirModel = $this->getModelFromCache('KomuKuJVC_Model_Dir');\n\t\t$directoryModel = $this->getModelFromCache('KomuKuJVC_Model_DirectoryNode');\n\t\t$allDirs = $dirModel->getDirs(array(), array(\n\t\t\t'readUserId' => 1, // we're getting all the dirs, so just use admin\n\t\t\t'permissionCombinationId' => 1\n\t\t));\n\t\t$category_list = $dirModel->getCategoryList($allDirs);\n\t\n\t\t$ftpHelper = $this->getHelper('ForumThreadPost');\n\t\t\t\n\t\t$forum = $directoryModel->getNodeById($forumId);\n\t\t//this variable should really have been called something like directoryForumCategory, but it makes it very confusing with the internal categories \n\t\t// of the directory, will try to clean up at some point in the future /*To Do*/\n\t\t\n\t\t$forumId = $forum['node_id'];\n\t\tif (!$forum){$forum = array();} // work around, when there is no node_id or forum, but we still want to let user create listing from anywhere\n\t\tif (!$forumId ){$forumId = 0;$forum['node_id'] = $forumId;}\n\t\t\n\n\t\t$attachmentParams = $this->getModelFromCache('XenForo_Model_Forum')->getAttachmentParams($forum, array(\n\t\t\t'node_id' => $forumId \n\t\t));\n\n\t\t\n\t\t$directoryForums = $options->directoryForum;\n\t\t$directoryForum = $directoryForums[0];\n\t\t$prefixes = $this->_getPrefixModel()->getUsablePrefixesInForums($directoryForum); // get prefixes avaiable to the directory forum\n\t\t\n\t\t$viewParams = array(\t\n\t\t\n\t\t 'prefixes' => $prefixes,\n\t\t\t'displayPrefixPrompt' => $options->displayPrefixPrompt,\n\t\t\t'allowGoogleMap' => $options->allowGoogleMap, \n\t\t\t'allowDeepLinks' => $options->allowDeepLinks, \n\t\t\t'allowLogo' => $options->allowLogo, \n\t\t\t'allowYoutube' => $options->allowYoutube, \n\t\t\t'allowContactLink' => $options->allowContactLink,\n\t\t\t'allowTelephone' => $options->allowTelephone,\n\t\t\t'allowSiteURL' => $options->allowSiteURL,\n\t\t\t'allowLocation' => $options->allowLocation,\n\t\t\t'thread' => array('discussion_open' => 1),\n\t\t\t'forum' => $forum,\n\t\t\t'category_list' => $category_list,\n\t\t\t'attachmentParams' => $attachmentParams,\n\t\t\t'captcha' => XenForo_Captcha_Abstract::createDefault(),\n\t\t\t'displayCustomA' => $options->displayCustomA,\n\t\t\t'customCategoryTitleA' => $options->customCategoryTitleA,\n\t\t\t'customFieldA1' => $options->customFieldA1,\n\t\t\t'customFieldA2' => $options->customFieldA2,\n\t\t\t'customFieldA3' => $options->customFieldA3,\n\t\t\t'customFieldA4' => $options->customFieldA4,\n\t\t\t'displayCustomB' => $options->displayCustomB,\n\t\t\t'customCategoryTitleB' => $options->customCategoryTitleB,\n\t\t\t'customFieldB1' => $options->customFieldB1,\n\t\t\t'customFieldB2' => $options->customFieldB2,\n\t\t\t'customFieldB3' => $options->customFieldB3,\n\t\t\t'customFieldB4' => $options->customFieldB4,\n\t\t);\n\t\treturn $this->responseView('XenForo_ViewPublic_Thread_Create', 'sfcreate_listing', $viewParams);\n\t}", "title": "" }, { "docid": "aa26d799667ba161721c9cd57c3c0c86", "score": "0.5863136", "text": "public function listoffreurprojet1Action()\n {\n\n\t\t$sessionmembreasso = new Zend_Session_Namespace('membreasso');\n\t\t//$this->_helper->layout->disableLayout();\n \t\t$this->_helper->layout()->setLayout('layoutpublicesmcint');\n\n\t if (!isset($sessionmembreasso->login)) {$this->_redirect('/integrateur/login');}\n\n $offreurprojet = new Application_Model_EuOffreurProjetMapper();\n $this->view->entries = $offreurprojet->fetchAllByAssociation($sessionmembreasso->membreasso_association);\n\n }", "title": "" }, { "docid": "6cfb5cbe141ea91ecdd44fc51f0d6e92", "score": "0.5857926", "text": "public function getList();", "title": "" }, { "docid": "6cfb5cbe141ea91ecdd44fc51f0d6e92", "score": "0.5857926", "text": "public function getList();", "title": "" }, { "docid": "6cfb5cbe141ea91ecdd44fc51f0d6e92", "score": "0.5857926", "text": "public function getList();", "title": "" }, { "docid": "6cfb5cbe141ea91ecdd44fc51f0d6e92", "score": "0.5857926", "text": "public function getList();", "title": "" }, { "docid": "6cfb5cbe141ea91ecdd44fc51f0d6e92", "score": "0.5857926", "text": "public function getList();", "title": "" }, { "docid": "6cfb5cbe141ea91ecdd44fc51f0d6e92", "score": "0.5857926", "text": "public function getList();", "title": "" }, { "docid": "4da270bf71a64d8b9540124e6c83a3a5", "score": "0.5857804", "text": "public function listcandidatAction()\n {\n\n\t\t$sessionutilisateur = new Zend_Session_Namespace('utilisateur');\n\t\t//$this->_helper->layout->disableLayout();\n \t\t$this->_helper->layout()->setLayout('layoutpublic');\n\t\t\n\tif (!isset($sessionutilisateur->login)) {$this->_redirect('/administration/login');}\nif($sessionutilisateur->confirmation != \"\"){$this->_redirect('/administration/confirmation');}\n\n $candidat = new Application_Model_EuCandidatMapper();\n $this->view->entries = $candidat->fetchAll();\n\n $this->view->tabletri = 1;\n\n }", "title": "" }, { "docid": "b41aaa47178a6f697dbcb8e872bd4f24", "score": "0.58577716", "text": "public function afficherToutesLesListes(){\n $listesAffichables = array();\n $listes = m\\Liste::get();\n foreach($listes as $l) {\n if ($l->peutAccederSession($_SESSION)) {\n $listesAffichables[] = $l;\n }\n }\n (new v\\MultiplesListesView($listesAffichables, \"Toutes les listes\"))->renderFinal();\n }", "title": "" }, { "docid": "f8933787c3a7e96a7197aad25ec48d34", "score": "0.5856917", "text": "public function listmenusousAction()\n {\n\n\t\t$sessionutilisateur = new Zend_Session_Namespace('utilisateur');\n\t\t//$this->_helper->layout->disableLayout();\n \t\t$this->_helper->layout()->setLayout('layoutpublic');\n\t\t\n\tif (!isset($sessionutilisateur->login)) {$this->_redirect('/administration/login');}\nif($sessionutilisateur->confirmation != \"\"){$this->_redirect('/administration/confirmation');}\n\n $menusous = new Application_Model_EuMenuSousMapper();\n $this->view->entries = $menusous->fetchAll();\n\n $this->view->tabletri = 1;\n\n }", "title": "" }, { "docid": "6c806a64e2a7eb1d1882509f4f0780d0", "score": "0.5854868", "text": "public function create()\n {\n $data = array();\n $data[0] = TDList::ALL();\n $data[1] = array();\n \n foreach ($data[0] as $list) {\n if ($list->orderstate == 1) {\n array_push($data[1], Card::where(['list_id' => $list->id])->orderBy('state_id', 'desc')->get());\n }\n else {\n array_push($data[1], Card::where(['list_id' => $list->id])->get());\n }\n }\n\n return view('actions.addList')->with('lists', $data);\n }", "title": "" }, { "docid": "f043ca92bc45e0666b3538f9cd960683", "score": "0.58497936", "text": "public function listPages(){\n $list = new ItemList(array(\n 'id' => 'h-page-editor-pages-list',\n 'action' => App::router()->getUri('h-page-editor-list-pages'),\n 'model' => 'Page',\n 'lineClass' => function($line){\n return $line->active ? '' : 'bg-warning';\n },\n 'controls' => array(\n array(\n 'icon' => 'plus',\n 'class' => 'btn-success',\n 'label' => Lang::get($this->_plugin . '.new-page-button'),\n 'href' => App::router()->getUri('h-page-editor-edit-page', array('pageId' => 0))\n )\n ),\n\n 'fields' => array(\n 'name' => array(\n 'label' => Lang::get($this->_plugin . '.pages-list-name-label'),\n 'href' => function($value, $field, $line){\n return App::router()->getUri('h-page-editor-edit-page', array('pageId' => $line->id));\n }\n ),\n\n 'uri' => array(\n 'label' => Lang::get($this->_plugin . '.pages-list-uri-label'),\n 'display' => function($value, $field, $line){\n return $line->active ?\n '<a href=\"' . $line->getUri() . '\" target=\"newtab\" >' . $line->getUri() . '</a>' :\n $line->getUri();\n }\n ),\n\n 'author' => array(\n 'label' => Lang::get($this->_plugin . '.pages-list-author-label'),\n 'display' => function($value){\n return User::getById($value)->getDisplayName();\n },\n 'search' => false,\n ),\n\n 'createTime' => array(\n 'label' => Lang::get($this->_plugin . '.pages-list-create-time-label'),\n 'display' => function($value){\n return date(Lang::get('main.time-format'), $value);\n },\n 'search' => false,\n ),\n\n 'updateTime' => array(\n 'label' => Lang::get($this->_plugin . '.pages-list-update-time-label'),\n 'display' => function($value){\n return date(Lang::get('main.time-format'), $value);\n },\n 'search' => false,\n ),\n\n 'active' => array(\n 'hidden' => true,\n )\n )\n ));\n\n return $list->display();\n }", "title": "" } ]
43535b26742cfeaf065cc9829ae9e8bf
Gets migration state information from .migrate_drupal.yml.
[ { "docid": "2104a8ac6cdb3548157921d3506b86e5", "score": "0.75292844", "text": "protected function getMigrationStates() {\n // Always instantiate a new YamlDiscovery object so that we always search on\n // the up-to-date list of modules.\n $discovery = new YamlDiscovery('migrate_drupal', array_map(function ($value) {\n return $value . '/migrations/state';\n }, $this->moduleHandler->getModuleDirectories()));\n return $discovery->findAll();\n }", "title": "" } ]
[ { "docid": "c00a54cb95c0d5fd97d7dfd57cbb312e", "score": "0.5814801", "text": "public static function getMigrationData()\n {\n $migration = array();\n foreach (BModuleRegistry::i()->getAllModules() as $modName=>$mod) {\n if (empty($mod->migrate) && class_exists($mod->name.'_Migrate')) {\n $mod->migrate = $mod->name.'_Migrate';\n }\n if ($mod->version && $mod->migrate) {\n $connName = $mod->db_connection_name ? $mod->db_connection_name : 'DEFAULT';\n $migration[$connName][$modName] = array(\n 'code_version' => $mod->version,\n 'script' => $mod->migrate,\n 'run_status' => $mod->run_status,\n 'module_name' => $modName,\n 'connection_name' => $connName,\n );\n }\n }\n return $migration;\n }", "title": "" }, { "docid": "5fc603b1a6af15e6468ee97f927944fb", "score": "0.5762543", "text": "private function state() {\n return \\Drupal::state();\n }", "title": "" }, { "docid": "c17fbdf504ff558909c95784b9bfa5bb", "score": "0.5608128", "text": "public function getMigratingInfo()\n {\n return $this->get(self::MIGRATINGINFO);\n }", "title": "" }, { "docid": "76a9baf844b379de966e3012e79efdfc", "score": "0.5474697", "text": "public function testMigration() {\n $this->assertSame('Publishing status', BaseFieldOverride::load('node.article.status')->label());\n }", "title": "" }, { "docid": "3e5ec10e3bcaa1588f0d52670a012cd4", "score": "0.5397892", "text": "function parse_Migration($modulenode) {\n\t\tif(!$this->_migrations) {\n\t\t\t$this->_migrations = Array();\n\t\t\tif(!empty($modulenode->migrations) && !empty($modulenode->migrations->migration)) {\n\t\t\t\tforeach($modulenode->migrations->migration as $migrationnode) {\n\t\t\t\t\t$migrationattrs = $migrationnode->attributes();\n\t\t\t\t\t$migrationversion = $migrationattrs['version'];\n\t\t\t\t\t$this->_migrations[\"$migrationversion\"] = $migrationnode;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Sort the migration details based on version\n\t\t\tif(count($this->_migrations) > 1) {\n\t\t\t\tuksort($this->_migrations, 'version_compare');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b4d70f8a14b890676b319892c0eb8554", "score": "0.5366043", "text": "private function getMigrationStatus()\n {\n $file = ROOT . DS . self::DIRECTORY . DS . '.migration';\n\n if (! file_exists($file)) {\n return 0;\n }\n\n $migration = file_get_contents($file);\n\n return intval($migration);\n }", "title": "" }, { "docid": "bf14b00bb33cefb2f796b4996e31a396", "score": "0.53051585", "text": "function getAllMigrations();", "title": "" }, { "docid": "b8e4465e2366b72b920106d89fe20fdd", "score": "0.5274362", "text": "protected function getAllMigrations()\n {\n $configuration = $this->getConfiguration();\n $migrations = array();\n\n if (array_key_exists('migrations_directory', $configuration)) {\n foreach ($configuration['migrations_directory'] as $migrationsDirectory) {\n foreach (array_diff(scandir(PATH_site . $migrationsDirectory), array('..', '.')) as $timestamp) {\n $migrations[] = new MigrationState(substr($timestamp, 7, 10));\n }\n }\n }\n return $migrations;\n }", "title": "" }, { "docid": "669c512a0bdcb46dd83197fd6f08a694", "score": "0.5147497", "text": "public function getMigrations(): array;", "title": "" }, { "docid": "71d03ced4ac524afc7629e25c6f9ea6c", "score": "0.5102658", "text": "function hook_updater_info() {\n return [\n 'module' => [\n 'class' => 'Drupal\\Core\\Updater\\Module',\n 'name' => t('Update modules'),\n 'weight' => 0,\n ],\n 'theme' => [\n 'class' => 'Drupal\\Core\\Updater\\Theme',\n 'name' => t('Update themes'),\n 'weight' => 0,\n ],\n ];\n}", "title": "" }, { "docid": "1120c4194fecb41b959475fdab95dac4", "score": "0.5051376", "text": "public function getMigrationWorkflow()\n {\n return $this->migration_workflow;\n }", "title": "" }, { "docid": "158a2d6517b43aa7f9623e26db8eaa88", "score": "0.4953198", "text": "protected function migrateFields() {\n $this->executeMigration('d7_field');\n $this->migrateContentTypes();\n $this->migrateCommentTypes();\n $this->executeMigrations(['d7_taxonomy_vocabulary', 'd7_field_instance']);\n }", "title": "" }, { "docid": "d2212901e3e6ed77023af83c09b23998", "score": "0.49471822", "text": "public function providerDetermineDrupalCoreVersionFromDrupalPhp()\n {\n return [\n [\"const VERSION = '8.0.0';\", \"8.0.0\"],\n [\"const VERSION = '8.0.0-beta1';\", \"8.0.0-beta1\"],\n [\"const VERSION = '8.0.0-rc2';\", \"8.0.0-rc2\"],\n [\"const VERSION = '8.5.11';\", \"8.5.11\"],\n [\"const VERSION = '8.5.x-dev';\", \"8.5.x-dev\"],\n [\"const VERSION = '8.6.11-dev';\", \"8.6.x-dev\"],\n ];\n }", "title": "" }, { "docid": "af9e3777ff348e334bd88c798acd2748", "score": "0.49450314", "text": "public function testExecutionNoMigrateDrupal() {\n $this->drupalGet('/migrate_no_migrate_drupal_test/execute');\n $this->assertSession()->pageTextContains('Migration was successful.');\n $node_1 = Node::load(1);\n $node_2 = Node::load(2);\n $this->assertEquals('Node 1', $node_1->label());\n $this->assertEquals('Node 2', $node_2->label());\n }", "title": "" }, { "docid": "3f7e47c817da0364aadfc4efcb5d3e33", "score": "0.49222633", "text": "public function getMigration()\n {\n return $this->migration;\n }", "title": "" }, { "docid": "67687d2d912cf26964cc230c140599f0", "score": "0.48892084", "text": "function update0723to078() {\n global $DB, $migration;\n\n $updateresult = true;\n\n //TRANS: %s is the number of new version\n $migration->displayTitle(sprintf(__('Update to %s'), '0.78'));\n $migration->setVersion('0.78');\n\n //TRANS: %s is 'Clean DB : rename tables'\n $migration->displayMessage(sprintf(__('Change of the database layout - %s'),\n 'Clean DB : rename tables'));\n\n $changes = [];\n $glpi_tables = ['glpi_alerts' => 'glpi_alerts',\n 'glpi_auth_ldap' => 'glpi_authldaps',\n 'glpi_auth_ldap_replicate' => 'glpi_authldapreplicates',\n 'glpi_auth_mail' => 'glpi_authmails',\n 'glpi_dropdown_auto_update' => 'glpi_autoupdatesystems',\n 'glpi_bookmark' => 'glpi_bookmarks',\n 'glpi_display_default' => 'glpi_bookmarks_users',\n 'glpi_dropdown_budget' => 'glpi_budgets',\n 'glpi_cartridges' => 'glpi_cartridges',\n 'glpi_cartridges_type' => 'glpi_cartridgeitems',\n 'glpi_cartridges_assoc' => 'glpi_cartridges_printermodels',\n 'glpi_dropdown_cartridge_type' => 'glpi_cartridgeitemtypes',\n 'glpi_computers' => 'glpi_computers',\n 'glpi_computerdisks' => 'glpi_computerdisks',\n 'glpi_dropdown_model' => 'glpi_computermodels',\n 'glpi_type_computers' => 'glpi_computertypes',\n 'glpi_connect_wire' => 'glpi_computers_items',\n 'glpi_inst_software' => 'glpi_computers_softwareversions',\n 'glpi_config' => 'glpi_configs',\n 'glpi_consumables' => 'glpi_consumables',\n 'glpi_consumables_type' => 'glpi_consumableitems',\n 'glpi_dropdown_consumable_type' => 'glpi_consumableitemtypes',\n 'glpi_contact_enterprise' => 'glpi_contacts_suppliers',\n 'glpi_contacts' => 'glpi_contacts',\n 'glpi_dropdown_contact_type' => 'glpi_contacttypes',\n 'glpi_contracts' => 'glpi_contracts',\n 'glpi_dropdown_contract_type' => 'glpi_contracttypes',\n 'glpi_contract_device' => 'glpi_contracts_items',\n 'glpi_contract_enterprise' => 'glpi_contracts_suppliers',\n 'glpi_device_case' => 'glpi_devicecases',\n 'glpi_dropdown_case_type' => 'glpi_devicecasetypes',\n 'glpi_device_control' => 'glpi_devicecontrols',\n 'glpi_device_drive' => 'glpi_devicedrives',\n 'glpi_device_gfxcard' => 'glpi_devicegraphiccards',\n 'glpi_device_hdd' => 'glpi_deviceharddrives',\n 'glpi_device_iface' => 'glpi_devicenetworkcards',\n 'glpi_device_moboard' => 'glpi_devicemotherboards',\n 'glpi_device_pci' => 'glpi_devicepcis',\n 'glpi_device_power' => 'glpi_devicepowersupplies',\n 'glpi_device_processor' => 'glpi_deviceprocessors',\n 'glpi_device_ram' => 'glpi_devicememories',\n 'glpi_dropdown_ram_type' => 'glpi_devicememorytypes',\n 'glpi_device_sndcard' => 'glpi_devicesoundcards',\n 'glpi_display' => 'glpi_displaypreferences',\n 'glpi_docs' => 'glpi_documents',\n 'glpi_dropdown_rubdocs' => 'glpi_documentcategories',\n 'glpi_type_docs' => 'glpi_documenttypes',\n 'glpi_doc_device' => 'glpi_documents_items',\n 'glpi_dropdown_domain' => 'glpi_domains',\n 'glpi_entities' => 'glpi_entities',\n 'glpi_entities_data' => 'glpi_entitydatas',\n 'glpi_event_log' => 'glpi_events',\n 'glpi_dropdown_filesystems' => 'glpi_filesystems',\n 'glpi_groups' => 'glpi_groups',\n 'glpi_users_groups' => 'glpi_groups_users',\n 'glpi_infocoms' => 'glpi_infocoms',\n 'glpi_dropdown_interface' => 'glpi_interfacetypes',\n 'glpi_kbitems' => 'glpi_knowbaseitems',\n 'glpi_dropdown_kbcategories' => 'glpi_knowbaseitemcategories',\n 'glpi_links' => 'glpi_links',\n 'glpi_links_device' => 'glpi_links_itemtypes',\n 'glpi_dropdown_locations' => 'glpi_locations',\n 'glpi_history' => 'glpi_logs',\n 'glpi_mailgate' => 'glpi_mailcollectors',\n 'glpi_mailing' => 'glpi_mailingsettings',\n 'glpi_dropdown_manufacturer' => 'glpi_manufacturers',\n 'glpi_monitors' => 'glpi_monitors',\n 'glpi_dropdown_model_monitors' => 'glpi_monitormodels',\n 'glpi_type_monitors' => 'glpi_monitortypes',\n 'glpi_dropdown_netpoint' => 'glpi_netpoints',\n 'glpi_networking' => 'glpi_networkequipments',\n 'glpi_dropdown_firmware' => 'glpi_networkequipmentfirmwares',\n 'glpi_dropdown_model_networking' => 'glpi_networkequipmentmodels',\n 'glpi_type_networking' => 'glpi_networkequipmenttypes',\n 'glpi_dropdown_iface' => 'glpi_networkinterfaces',\n 'glpi_networking_ports' => 'glpi_networkports',\n 'glpi_networking_vlan' => 'glpi_networkports_vlans',\n 'glpi_networking_wire' => 'glpi_networkports_networkports',\n 'glpi_dropdown_network' => 'glpi_networks',\n 'glpi_ocs_admin_link' => 'glpi_ocsadmininfoslinks',\n 'glpi_ocs_link' => 'glpi_ocslinks',\n 'glpi_ocs_config' => 'glpi_ocsservers',\n 'glpi_dropdown_os' => 'glpi_operatingsystems',\n 'glpi_dropdown_os_sp' => 'glpi_operatingsystemservicepacks',\n 'glpi_dropdown_os_version' => 'glpi_operatingsystemversions',\n 'glpi_peripherals' => 'glpi_peripherals',\n 'glpi_dropdown_model_peripherals' => 'glpi_peripheralmodels',\n 'glpi_type_peripherals' => 'glpi_peripheraltypes',\n 'glpi_phones' => 'glpi_phones',\n 'glpi_dropdown_model_phones' => 'glpi_phonemodels',\n 'glpi_dropdown_phone_power' => 'glpi_phonepowersupplies',\n 'glpi_type_phones' => 'glpi_phonetypes',\n 'glpi_plugins' => 'glpi_plugins',\n 'glpi_printers' => 'glpi_printers',\n 'glpi_dropdown_model_printers' => 'glpi_printermodels',\n 'glpi_type_printers' => 'glpi_printertypes',\n 'glpi_profiles' => 'glpi_profiles',\n 'glpi_users_profiles' => 'glpi_profiles_users',\n 'glpi_registry' => 'glpi_registrykeys',\n 'glpi_reminder' => 'glpi_reminders',\n 'glpi_reservation_resa' => 'glpi_reservations',\n 'glpi_reservation_item' => 'glpi_reservationitems',\n 'glpi_rules_descriptions' => 'glpi_rules',\n 'glpi_rules_actions' => 'glpi_ruleactions',\n 'glpi_rule_cache_model_computer' => 'glpi_rulecachecomputermodels',\n 'glpi_rule_cache_type_computer' => 'glpi_rulecachecomputertypes',\n 'glpi_rule_cache_manufacturer' => 'glpi_rulecachemanufacturers',\n 'glpi_rule_cache_model_monitor' => 'glpi_rulecachemonitormodels',\n 'glpi_rule_cache_type_monitor' => 'glpi_rulecachemonitortypes',\n 'glpi_rule_cache_model_networking' => 'glpi_rulecachenetworkequipmentmodels',\n 'glpi_rule_cache_type_networking' => 'glpi_rulecachenetworkequipmenttypes',\n 'glpi_rule_cache_os' => 'glpi_rulecacheoperatingsystems',\n 'glpi_rule_cache_os_sp' => 'glpi_rulecacheoperatingsystemservicepacks',\n 'glpi_rule_cache_os_version' => 'glpi_rulecacheoperatingsystemversions',\n 'glpi_rule_cache_model_peripheral' => 'glpi_rulecacheperipheralmodels',\n 'glpi_rule_cache_type_peripheral' => 'glpi_rulecacheperipheraltypes',\n 'glpi_rule_cache_model_phone' => 'glpi_rulecachephonemodels',\n 'glpi_rule_cache_type_phone' => 'glpi_rulecachephonetypes',\n 'glpi_rule_cache_model_printer' => 'glpi_rulecacheprintermodels',\n 'glpi_rule_cache_type_printer' => 'glpi_rulecacheprintertypes',\n 'glpi_rule_cache_software' => 'glpi_rulecachesoftwares',\n 'glpi_rules_criterias' => 'glpi_rulecriterias',\n 'glpi_rules_ldap_parameters' => 'glpi_rulerightparameters',\n 'glpi_software' => 'glpi_softwares',\n 'glpi_dropdown_software_category' => 'glpi_softwarecategories',\n 'glpi_softwarelicenses' => 'glpi_softwarelicenses',\n 'glpi_dropdown_licensetypes' => 'glpi_softwarelicensetypes',\n 'glpi_softwareversions' => 'glpi_softwareversions',\n 'glpi_dropdown_state' => 'glpi_states',\n 'glpi_enterprises' => 'glpi_suppliers',\n 'glpi_dropdown_enttype' => 'glpi_suppliertypes',\n 'glpi_tracking' => 'glpi_tickets',\n 'glpi_dropdown_tracking_category' => 'glpi_ticketcategories',\n 'glpi_followups' => 'glpi_ticketfollowups',\n 'glpi_tracking_planning' => 'glpi_ticketplannings',\n 'glpi_transfers' => 'glpi_transfers',\n 'glpi_users' => 'glpi_users',\n 'glpi_dropdown_user_titles' => 'glpi_usertitles',\n 'glpi_dropdown_user_types' => 'glpi_usercategories',\n 'glpi_dropdown_vlan' => 'glpi_vlans'];\n\n $backup_tables = false;\n foreach ($glpi_tables as $original_table => $new_table) {\n if (strcmp($original_table, $new_table)!=0) {\n // Original table exists ?\n if ($DB->tableExists($original_table)) {\n // rename new tables if exists ?\n if ($DB->tableExists($new_table)) {\n if ($DB->tableExists(\"backup_$new_table\")) {\n $query = \"DROP TABLE `backup_\".$new_table.\"`\";\n $DB->queryOrDie($query, \"0.78 drop backup table backup_$new_table\");\n }\n $migration->displayWarning(\"$new_table table already exists. \".\n \"A backup have been done to backup_$new_table.\");\n $backup_tables=true;\n $query = \"RENAME TABLE `$new_table`\n TO `backup_$new_table`\";\n $DB->queryOrDie($query, \"0.78 backup table $new_table\");\n\n }\n // rename original table\n $migration->renameTable($original_table, $new_table);\n }\n }\n if ($DB->fieldExists($new_table, 'ID', false)) {\n // ALTER ID -> id\n $changes[$new_table][] = \"CHANGE `ID` `id` INT( 11 ) NOT NULL AUTO_INCREMENT\";\n }\n }\n\n if ($backup_tables) {\n $migration->displayWarning(\"You can delete backup tables if you have no need of them.\", true);\n }\n\n $migration->displayMessage(sprintf(__('Change of the database layout - %s'),\n 'Clean DB: rename foreign keys'));\n\n $foreignkeys\n = ['assign' => [['to' => 'users_id_assign',\n 'tables' => ['glpi_tickets']]],\n\n 'assign_group'\n => [['to' => 'groups_id_assign',\n 'tables' => ['glpi_tickets']]],\n\n 'assign_ent'\n => [['to' => 'suppliers_id_assign',\n 'tables' => ['glpi_tickets']]],\n\n 'auth_method'\n => [['to' => 'authtype',\n 'noindex' => ['glpi_users'],\n 'tables' => ['glpi_users']]],\n\n 'author' => [['to' => 'users_id',\n 'tables' => ['glpi_ticketfollowups',\n 'glpi_knowbaseitems', 'glpi_tickets']]],\n\n 'auto_update'\n => [['to' => 'autoupdatesystems_id',\n 'tables' => ['glpi_computers']]],\n\n 'budget' => [['to' => 'budgets_id',\n 'tables' => ['glpi_infocoms']]],\n\n 'buy_version'\n => [['to' => 'softwareversions_id_buy',\n 'tables' => ['glpi_softwarelicenses']]],\n\n 'category'\n => [['to' => 'ticketcategories_id',\n 'tables' => ['glpi_tickets']],\n ['to' => 'softwarecategories_id',\n 'tables' => ['glpi_softwares']]],\n\n 'categoryID'\n => [['to' => 'knowbaseitemcategories_id',\n 'tables' => ['glpi_knowbaseitems']]],\n\n 'category_on_software_delete'\n => [['to' => 'softwarecategories_id_ondelete',\n 'noindex' => ['glpi_configs'],\n 'tables' => ['glpi_configs'],\n 'comments' => ['glpi_configs'\n =>'category applyed when a software is deleted']]],\n\n 'cID' => [['to' => 'computers_id',\n 'tables' => ['glpi_computers_softwareversions']]],\n\n 'computer'\n => [['to' => 'items_id',\n 'noindex' => ['glpi_tickets'],\n 'tables' => ['glpi_tickets']]],\n\n 'computer_id'\n => [['to' => 'computers_id',\n 'tables' => ['glpi_registrykeys']]],\n\n 'contract_type'\n => [['to' => 'contracttypes_id',\n 'tables' => ['glpi_contracts']]],\n\n 'default_rubdoc_tracking'\n => [['to' => 'documentcategories_id_forticket',\n 'noindex' => ['glpi_configs'],\n 'tables' => ['glpi_configs'],\n 'comments' => ['glpi_configs'\n =>'default category for documents added with a ticket']]],\n\n 'default_state'\n => [['to' => 'states_id_default',\n 'noindex' => ['glpi_ocsservers'],\n 'tables' => ['glpi_ocsservers']]],\n\n 'device_type'\n => [['to' => 'itemtype',\n 'noindex' => ['glpi_alerts', 'glpi_contracts_items',\n 'glpi_bookmarks_users',\n 'glpi_documents_items', 'glpi_infocoms',\n 'glpi_links_itemtypes', 'glpi_networkports',\n 'glpi_reservationitems', 'glpi_tickets'],\n 'tables' => ['glpi_alerts', 'glpi_contracts_items',\n 'glpi_documents_items', 'glpi_infocoms',\n 'glpi_bookmarks', 'glpi_bookmarks_users',\n 'glpi_links_itemtypes', 'glpi_networkports',\n 'glpi_reservationitems', 'glpi_tickets']]],\n\n 'domain' => [['to' => 'domains_id',\n 'tables' => ['glpi_computers', 'glpi_networkequipments',\n 'glpi_printers']]],\n\n 'end1' => [['to' => 'items_id',\n 'noindex' => ['glpi_computers_items'],\n 'tables' => ['glpi_computers_items'],\n 'comments' => ['glpi_computers_items'\n =>'RELATION to various table, according to itemtype (ID)']],\n ['to' => 'networkports_id_1',\n 'noindex' => ['glpi_networkports_networkports'],\n 'tables' => ['glpi_networkports_networkports']]],\n\n 'end2' => [['to' => 'computers_id',\n 'tables' => ['glpi_computers_items']],\n ['to' => 'networkports_id_2',\n 'tables' => ['glpi_networkports_networkports']]],\n\n 'extra_ldap_server'\n => [['to' => 'authldaps_id_extra',\n 'noindex' => ['glpi_configs'],\n 'tables' => ['glpi_configs'],\n 'comments' => ['glpi_configs'=>'extra server']]],\n\n 'firmware'\n => [['to' => 'networkequipmentfirmwares_id',\n 'tables' => ['glpi_networkequipments']]],\n\n 'FK_bookmark'\n => [['to' => 'bookmarks_id',\n 'tables' => ['glpi_bookmarks_users']]],\n\n 'FK_computers'\n => [['to' => 'computers_id',\n 'tables' => ['glpi_computerdisks',\n 'glpi_softwarelicenses']]],\n\n 'FK_contact'\n => [['to' => 'contacts_id',\n 'tables' => ['glpi_contacts_suppliers']]],\n\n 'FK_contract'\n => [['to' => 'contracts_id',\n 'noindex' => ['glpi_contracts_items'],\n 'tables' => ['glpi_contracts_suppliers',\n 'glpi_contracts_items']]],\n\n 'FK_device'\n => [['to' => 'items_id',\n 'noindex' => ['glpi_alerts', 'glpi_contracts_items',\n 'glpi_documents_items', 'glpi_infocoms'],\n 'tables' => ['glpi_alerts', 'glpi_contracts_items',\n 'glpi_documents_items', 'glpi_infocoms']]],\n\n 'FK_doc' => [['to' => 'documents_id',\n 'noindex' => ['glpi_documents_items'],\n 'tables' => ['glpi_documents_items']]],\n\n 'FK_enterprise'\n => [['to' => 'suppliers_id',\n 'noindex' => ['glpi_contacts_suppliers',\n 'glpi_contracts_suppliers'],\n 'tables' => ['glpi_contacts_suppliers',\n 'glpi_contracts_suppliers',\n 'glpi_infocoms']]],\n\n 'FK_entities'\n => [['to' => 'entities_id',\n 'noindex' => ['glpi_locations', 'glpi_netpoints',\n 'glpi_entitydatas',],\n 'tables' => ['glpi_bookmarks', 'glpi_cartridgeitems',\n 'glpi_computers', 'glpi_consumableitems',\n 'glpi_contacts', 'glpi_contracts',\n 'glpi_documents', 'glpi_locations',\n 'glpi_netpoints', 'glpi_suppliers',\n 'glpi_entitydatas', 'glpi_groups',\n 'glpi_knowbaseitems', 'glpi_links',\n 'glpi_mailcollectors', 'glpi_monitors',\n 'glpi_networkequipments', 'glpi_peripherals',\n 'glpi_phones' ,'glpi_printers',\n 'glpi_reminders', 'glpi_rules',\n 'glpi_softwares', 'glpi_softwarelicenses',\n 'glpi_tickets', 'glpi_users',\n 'glpi_profiles_users'],\n 'default' => ['glpi_bookmarks' => \"-1\"]]],\n\n 'FK_filesystems'\n => [['to' => 'filesystems_id',\n 'tables' => ['glpi_computerdisks']]],\n\n 'FK_glpi_cartridges_type'\n => [['to' => 'cartridgeitems_id',\n 'tables' => ['glpi_cartridges',\n 'glpi_cartridges_printermodels']]],\n\n 'FK_glpi_consumables_type'\n => [['to' => 'consumableitems_id',\n 'noindex' => [''],\n 'tables' => ['glpi_consumables']]],\n\n 'FK_glpi_dropdown_model_printers'\n => [['to' => 'printermodels_id',\n 'noindex' => ['glpi_cartridges_printermodels'],\n 'tables' => ['glpi_cartridges_printermodels']]],\n\n 'FK_glpi_enterprise'\n => [['to' => 'manufacturers_id',\n 'tables' => ['glpi_cartridgeitems', 'glpi_computers',\n 'glpi_consumableitems', 'glpi_devicecases',\n 'glpi_devicecontrols', 'glpi_devicedrives',\n 'glpi_devicegraphiccards',\n 'glpi_deviceharddrives',\n 'glpi_devicenetworkcards',\n 'glpi_devicemotherboards', 'glpi_devicepcis',\n 'glpi_devicepowersupplies',\n 'glpi_deviceprocessors',\n 'glpi_devicememories',\n 'glpi_devicesoundcards', 'glpi_monitors',\n 'glpi_networkequipments',\n 'glpi_peripherals', 'glpi_phones',\n 'glpi_printers', 'glpi_softwares']]],\n\n 'FK_glpi_printers'\n => [['to' => 'printers_id',\n 'tables' => ['glpi_cartridges']]],\n\n 'FK_group'\n => [['to' => 'groups_id',\n 'tables' => ['glpi_tickets']]],\n\n 'FK_groups'\n => [['to' => 'groups_id',\n 'tables' => ['glpi_computers', 'glpi_monitors',\n 'glpi_networkequipments', 'glpi_peripherals',\n 'glpi_phones', 'glpi_printers',\n 'glpi_softwares', 'glpi_groups_users']]],\n\n 'FK_interface'\n => [['to' => 'interfacetypes_id',\n 'tables' => ['glpi_devicegraphiccards']]],\n\n 'FK_item' => [['to' => 'items_id',\n 'noindex' => ['glpi_mailingsettings'],\n 'tables' => ['glpi_mailingsettings']]],\n\n 'FK_links'\n => [['to' => 'links_id',\n 'tables' => ['glpi_links_itemtypes']]],\n\n 'FK_port' => [['to' => 'networkports_id',\n 'noindex' => ['glpi_networkports_vlans'],\n 'tables' => ['glpi_networkports_vlans']]],\n\n 'FK_profiles'\n => [['to' => 'profiles_id',\n 'tables' => ['glpi_profiles_users', 'glpi_users']]],\n\n 'FK_rules'\n => [['to' => 'rules_id',\n 'tables' => ['glpi_rulecriterias', 'glpi_ruleactions']]],\n\n 'FK_tracking'\n => [['to' => 'tickets_id',\n 'tables' => ['glpi_documents']]],\n\n 'FK_users'\n => [['to' => 'users_id',\n 'noindex' => ['glpi_displaypreferences',\n 'glpi_bookmarks_users', 'glpi_groups_users'],\n 'tables' => ['glpi_bookmarks', 'glpi_displaypreferences',\n 'glpi_documents', 'glpi_groups',\n 'glpi_reminders', 'glpi_bookmarks_users',\n 'glpi_groups_users', 'glpi_profiles_users',\n 'glpi_computers', 'glpi_monitors',\n 'glpi_networkequipments', 'glpi_peripherals',\n 'glpi_phones', 'glpi_printers',\n 'glpi_softwares']]],\n\n 'FK_vlan' => [['to' => 'vlans_id',\n 'tables' => ['glpi_networkports_vlans']]],\n\n 'glpi_id' => [['to' => 'computers_id',\n 'tables' => ['glpi_ocslinks']]],\n\n 'id_assign'\n => [['to' => 'users_id',\n 'tables' => ['glpi_ticketplannings']]],\n\n 'id_auth' => [['to' => 'auths_id',\n 'noindex' => ['glpi_users'],\n 'tables' => ['glpi_users']]],\n\n 'id_device'\n => [['to' => 'items_id',\n 'noindex' => ['glpi_reservationitems'],\n 'tables' => ['glpi_reservationitems']]],\n\n 'id_followup'\n => [['to' => 'ticketfollowups_id',\n 'tables' => ['glpi_ticketplannings']]],\n\n 'id_item' => [['to' => 'reservationitems_id',\n 'tables' => ['glpi_reservations']]],\n\n 'id_user' => [['to' => 'users_id',\n 'tables' => ['glpi_consumables', 'glpi_reservations']]],\n\n 'iface' => [['to' => 'networkinterfaces_id',\n 'tables' => ['glpi_networkports']]],\n\n 'interface'\n => [['to' => 'interfacetypes_id',\n 'tables' => ['glpi_devicecontrols',\n 'glpi_deviceharddrives', 'glpi_devicedrives']]],\n\n 'item' => [['to' => 'items_id',\n 'noindex' => ['glpi_events'],\n 'tables' => ['glpi_events']]],\n\n 'link_if_status'\n => [['to' => 'states_id_linkif',\n 'noindex' => ['glpi_ocsservers'],\n 'tables' => ['glpi_ocsservers']]],\n\n 'location'\n => [['to' => 'locations_id',\n 'noindex' => ['glpi_netpoints'],\n 'tables' => ['glpi_cartridgeitems', 'glpi_computers',\n 'glpi_consumableitems', 'glpi_netpoints',\n 'glpi_monitors', 'glpi_networkequipments',\n 'glpi_peripherals', 'glpi_phones',\n 'glpi_printers', 'glpi_users',\n 'glpi_softwares']]],\n\n 'model' => [['to' => 'computermodels_id',\n 'tables' => ['glpi_computers']],\n ['to' => 'monitormodels_id',\n 'tables' => ['glpi_monitors']],\n ['to' => 'networkequipmentmodels_id',\n 'tables' => ['glpi_networkequipments']],\n ['to' => 'peripheralmodels_id',\n 'tables' => ['glpi_peripherals']],\n ['to' => 'phonemodels_id',\n 'tables' => ['glpi_phones']],\n ['to' => 'printermodels_id',\n 'tables' => ['glpi_printers']]],\n\n 'netpoint'\n => [['to' => 'netpoints_id',\n 'tables' => ['glpi_networkports']]],\n\n 'network' => [['to' => 'networks_id',\n 'tables' => ['glpi_computers', 'glpi_networkequipments',\n 'glpi_printers']]],\n\n 'ocs_id' => [['to' => 'ocsid',\n 'noindex' => ['glpi_ocslinks'],\n 'tables' => ['glpi_ocslinks']]],\n\n 'ocs_server_id'\n => [['to' => 'ocsservers_id',\n 'noindex' => ['glpi_ocslinks'],\n 'tables' => ['glpi_ocsadmininfoslinks', 'glpi_ocslinks']]],\n\n 'on_device'\n => [['to' => 'items_id',\n 'noindex' => ['glpi_networkports'],\n 'tables' => ['glpi_networkports']]],\n\n 'os' => [['to' => 'operatingsystems_id',\n 'tables' => ['glpi_computers']]],\n\n 'os_sp' => [['to' => 'operatingsystemservicepacks_id',\n 'tables' => ['glpi_computers']]],\n\n 'os_version'\n => [['to' => 'operatingsystemversions_id',\n 'tables' => ['glpi_computers']]],\n\n 'parentID' => [['to' => 'knowbaseitemcategories_id',\n 'noindex' => ['glpi_knowbaseitemcategories'],\n 'tables' => ['glpi_knowbaseitemcategories']],\n ['to' => 'locations_id',\n 'tables' => ['glpi_locations']],\n ['to' => 'ticketcategories_id',\n 'tables' => ['glpi_ticketcategories']],\n ['to' => 'entities_id',\n 'tables' => ['glpi_entities']]],\n\n 'platform' => [['to' => 'operatingsystems_id',\n 'tables' => ['glpi_softwares']]],\n\n 'power' => [['to' => 'phonepowersupplies_id',\n 'tables' => ['glpi_phones']]],\n\n 'recipient'\n => [['to' => 'users_id_recipient',\n 'tables' => ['glpi_tickets']]],\n\n 'rubrique' => [['to' => 'documentcategories_id',\n 'tables' => ['glpi_documents']]],\n\n 'rule_id' => [['to' => 'rules_id',\n 'tables' => ['glpi_rulecachemanufacturers',\n 'glpi_rulecachecomputermodels',\n 'glpi_rulecachemonitormodels',\n 'glpi_rulecachenetworkequipmentmodels',\n 'glpi_rulecacheperipheralmodels',\n 'glpi_rulecachephonemodels',\n 'glpi_rulecacheprintermodels',\n 'glpi_rulecacheoperatingsystems',\n 'glpi_rulecacheoperatingsystemservicepacks',\n 'glpi_rulecacheoperatingsystemversions',\n 'glpi_rulecachesoftwares',\n 'glpi_rulecachecomputertypes',\n 'glpi_rulecachemonitortypes',\n 'glpi_rulecachenetworkequipmenttypes',\n 'glpi_rulecacheperipheraltypes',\n 'glpi_rulecachephonetypes',\n 'glpi_rulecacheprintertypes']]],\n\n 'server_id'\n => [['to' => 'authldaps_id',\n 'tables' => ['glpi_authldapreplicates']]],\n\n 'sID' => [['to' => 'softwares_id',\n 'tables' => ['glpi_softwarelicenses',\n 'glpi_softwareversions']]],\n\n 'state' => [['to' => 'states_id',\n 'tables' => ['glpi_computers', 'glpi_monitors',\n 'glpi_networkequipments', 'glpi_peripherals',\n 'glpi_phones', 'glpi_printers',\n 'glpi_softwareversions']]],\n\n 'tech_num' => [['to' => 'users_id_tech',\n 'tables' => ['glpi_cartridgeitems', 'glpi_computers',\n 'glpi_consumableitems', 'glpi_monitors',\n 'glpi_networkequipments', 'glpi_peripherals',\n 'glpi_phones', 'glpi_printers',\n 'glpi_softwares']]],\n\n 'title' => [['to' => 'usertitles_id',\n 'tables' => ['glpi_users']]],\n\n 'tracking' => [['to' => 'tickets_id',\n 'tables' => ['glpi_ticketfollowups']]],\n\n 'type' => [['to' => 'cartridgeitemtypes_id',\n 'tables' => ['glpi_cartridgeitems']],\n ['to' => 'computertypes_id',\n 'tables' => ['glpi_computers']],\n ['to' => 'consumableitemtypes_id',\n 'tables' => ['glpi_consumableitems']],\n ['to' => 'contacttypes_id',\n 'tables' => ['glpi_contacts']],\n ['to' => 'devicecasetypes_id',\n 'tables' => ['glpi_devicecases']],\n ['to' => 'devicememorytypes_id',\n 'tables' => ['glpi_devicememories']],\n ['to' => 'suppliertypes_id',\n 'tables' => ['glpi_suppliers']],\n ['to' => 'monitortypes_id',\n 'tables' => ['glpi_monitors']],\n ['to' => 'networkequipmenttypes_id',\n 'tables' => ['glpi_networkequipments']],\n ['to' => 'peripheraltypes_id',\n 'tables' => ['glpi_peripherals']],\n ['to' => 'phonetypes_id',\n 'tables' => ['glpi_phones']],\n ['to' => 'printertypes_id',\n 'tables' => ['glpi_printers']],\n ['to' => 'softwarelicensetypes_id',\n 'tables' => ['glpi_softwarelicenses']],\n ['to' => 'usercategories_id',\n 'tables' => ['glpi_users']],\n ['to' => 'itemtype',\n 'noindex' => ['glpi_computers_items'],\n 'tables' => ['glpi_computers_items',\n 'glpi_displaypreferences']]],\n\n 'update_software'\n => [['to' => 'softwares_id',\n 'tables' => ['glpi_softwares']]],\n\n 'use_version'\n => [['to' => 'softwareversions_id_use',\n 'tables' => ['glpi_softwarelicenses']]],\n\n 'vID' => [['to' => 'softwareversions_id',\n 'tables' => ['glpi_computers_softwareversions']]]];\n\n foreach ($foreignkeys as $oldname => $newnames) {\n foreach ($newnames as $tab) {\n $newname = $tab['to'];\n foreach ($tab['tables'] as $table) {\n $doindex = true;\n if (isset($tab['noindex']) && in_array($table, $tab['noindex'])) {\n $doindex = false;\n }\n // Rename field\n if ($DB->fieldExists($table, $oldname, false)) {\n $addcomment = '';\n if (isset($tab['comments']) && isset($tab['comments'][$table])) {\n $addcomment = \" COMMENT '\".$tab['comments'][$table].\"' \";\n }\n $default_value = 0;\n if (isset($tab['default']) && isset($tab['default'][$table])) {\n $default_value = $tab['default'][$table];\n }\n // Manage NULL fields\n $query = \"UPDATE `$table`\n SET `$oldname` = '$default_value'\n WHERE `$oldname` IS NULL \";\n $DB->queryOrDie($query, \"0.78 prepare datas for update $oldname to $newname in $table\");\n\n $changes[$table][] = \"CHANGE COLUMN `$oldname` `$newname` INT( 11 ) NOT NULL\n DEFAULT '$default_value' $addcomment\";\n } else {\n $updateresult = false;\n $migration->displayWarning(\"Error: $table.$oldname does not exist.\", true);\n }\n // If do index : delete old one / create new one\n if ($doindex) {\n if (!isIndex($table, $newname)) {\n $changes[$table][] = \"ADD INDEX `$newname` (`$newname`)\";\n }\n if ($oldname!=$newname && isIndex($table, $oldname)) {\n $changes[$table][]=\"DROP INDEX `$oldname`\";\n }\n }\n }\n }\n }\n\n $migration->displayMessage(sprintf(__('Change of the database layout - %s'),\n 'Clean DB: rename bool values'));\n\n $boolfields\n = ['glpi_authldaps'\n => [['from' => 'ldap_use_tls',\n 'to' => 'use_tls',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'use_dn',\n 'to' => 'use_dn',\n 'default' => 1,\n 'noindex' => true]],\n\n 'glpi_bookmarks'\n => [['from' => 'private',\n 'to' => 'is_private',\n 'default' => 1 ],\n ['from' => 'recursive',\n 'to' => 'is_recursive',\n 'default' => 0]],\n\n 'glpi_cartridgeitems'\n => [['from' => 'deleted',\n 'to' => 'is_deleted',\n 'default' => 0]],\n\n 'glpi_computers'\n => [['from' => 'is_template',\n 'to' => 'is_template',\n 'default' => 0],\n ['from' => 'deleted',\n 'to' => 'is_deleted',\n 'default' => 0],\n ['from' => 'ocs_import',\n 'to' => 'is_ocs_import',\n 'default' => 0]],\n\n 'glpi_configs' => [['from' => 'jobs_at_login',\n 'to' => 'show_jobs_at_login',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'mailing',\n 'to' => 'use_mailing',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'permit_helpdesk',\n 'to' => 'use_anonymous_helpdesk',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'existing_auth_server_field_clean_domain',\n 'to' => 'existing_auth_server_field_clean_domain',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'auto_assign',\n 'to' => 'use_auto_assign_to_tech',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'public_faq',\n 'to' => 'use_public_faq',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'url_in_mail',\n 'to' => 'show_link_in_mail',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'use_ajax',\n 'to' => 'use_ajax',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'ajax_autocompletion',\n 'to' => 'use_ajax_autocompletion',\n 'default' => 1,\n 'noindex' => true],\n ['from' => 'auto_add_users',\n 'to' => 'is_users_auto_add',\n 'default' => 1,\n 'noindex' => true],\n ['from' => 'view_ID',\n 'to' => 'is_ids_visible',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'ocs_mode',\n 'to' => 'use_ocs_mode',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'followup_on_update_ticket',\n 'to' => 'add_followup_on_update_ticket',\n 'default' => 1,\n 'noindex' => true],\n ['from' => 'licenses_alert',\n 'to' => 'use_licenses_alert',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'keep_tracking_on_delete',\n 'to' => 'keep_tickets_on_delete',\n 'default' => 1,\n 'noindex' => true],\n ['from' => 'use_errorlog',\n 'to' => 'use_log_in_files',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'autoupdate_link_contact',\n 'to' => 'is_contact_autoupdate',\n 'default' => 1,\n 'noindex' => true],\n ['from' => 'autoupdate_link_user',\n 'to' => 'is_user_autoupdate',\n 'default' => 1,\n 'noindex' => true],\n ['from' => 'autoupdate_link_group',\n 'to' => 'is_group_autoupdate',\n 'default' => 1,\n 'noindex' => true],//\n ['from' => 'autoupdate_link_location',\n 'to' => 'is_location_autoupdate',\n 'default' => 1,\n 'noindex' => true],\n ['from' => 'autoclean_link_contact',\n 'to' => 'is_contact_autoclean',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'autoclean_link_user',\n 'to' => 'is_user_autoclean',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'autoclean_link_group',\n 'to' => 'is_group_autoclean',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'autoclean_link_location',\n 'to' => 'is_location_autoclean',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'flat_dropdowntree',\n 'to' => 'use_flat_dropdowntree',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'autoname_entity',\n 'to' => 'use_autoname_by_entity',\n 'default' => 1,\n 'noindex' => true],\n ['from' => 'expand_soft_categorized',\n 'to' => 'is_categorized_soft_expanded',\n 'default' => 1,\n 'noindex' => true],\n ['from' => 'expand_soft_not_categorized',\n 'to' => 'is_not_categorized_soft_expanded',\n 'default' => 1,\n 'noindex' => true],\n ['from' => 'ticket_title_mandatory',\n 'to' => 'is_ticket_title_mandatory',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'ticket_content_mandatory',\n 'to' => 'is_ticket_content_mandatory',\n 'default' => 1,\n 'noindex' => true],\n ['from' => 'ticket_category_mandatory',\n 'to' => 'is_ticket_category_mandatory',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'followup_private',\n 'to' => 'followup_private',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'software_helpdesk_visible',\n 'to' => 'default_software_helpdesk_visible',\n 'default' => 1,\n 'noindex' => true]],\n\n 'glpi_consumableitems'\n => [['from' => 'deleted',\n 'to' => 'is_deleted',\n 'default' => 0]],\n\n 'glpi_contacts' => [['from' => 'recursive',\n 'to' => 'is_recursive',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'deleted',\n 'to' => 'is_deleted',\n 'default' => 0]],\n\n 'glpi_contracts'\n => [['from' => 'recursive',\n 'to' => 'is_recursive',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'deleted',\n 'to' => 'is_deleted',\n 'default' => 0],\n ['from' => 'monday',\n 'to' => 'use_monday',\n 'default' => 0],\n ['from' => 'saturday',\n 'to' => 'use_saturday',\n 'default' => 0]],\n\n 'glpi_devicecontrols'\n => [['from' => 'raid',\n 'to' => 'is_raid',\n 'default' => 0,\n 'noindex' => true]],\n\n 'glpi_devicedrives'\n => [['from' => 'is_writer',\n 'to' => 'is_writer',\n 'default' => 1,\n 'noindex' => true]],\n\n 'glpi_devicepowersupplies'\n => [['from' => 'atx',\n 'to' => 'is_atx',\n 'default' => 1,\n 'noindex' => true]],\n\n 'glpi_documents' => [['from' => 'recursive',\n 'to' => 'is_recursive',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'deleted',\n 'to' => 'is_deleted',\n 'default' => 0]],\n\n 'glpi_documenttypes'\n => [['from' => 'upload',\n 'to' => 'is_uploadable',\n 'default' => 1]],\n\n 'glpi_groups' => [['from' => 'recursive',\n 'to' => 'is_recursive',\n 'default' => 0,\n 'noindex' => true]],\n\n 'glpi_knowbaseitems'\n => [['from' => 'recursive',\n 'to' => 'is_recursive',\n 'default' => 1,\n 'noindex' => true],\n ['from' => 'faq',\n 'to' => 'is_faq',\n 'default' => 0] ],\n\n 'glpi_links' => [['from' => 'recursive',\n 'to' => 'is_recursive',\n 'default' => 1,\n 'noindex' => true]],\n\n 'glpi_monitors' => [['from' => 'deleted',\n 'to' => 'is_deleted',\n 'default' => 0],\n ['from' => 'is_template',\n 'to' => 'is_template',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'is_global',\n 'to' => 'is_global',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'flags_micro',\n 'to' => 'have_micro',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'flags_speaker',\n 'to' => 'have_speaker',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'flags_subd',\n 'to' => 'have_subd',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'flags_bnc',\n 'to' => 'have_bnc',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'flags_dvi',\n 'to' => 'have_dvi',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'flags_pivot',\n 'to' => 'have_pivot',\n 'default' => 0,\n 'noindex' => true]],\n\n 'glpi_networkequipments'\n => [['from' => 'recursive',\n 'to' => 'is_recursive',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'deleted',\n 'to' => 'is_deleted',\n 'default' => 0],\n ['from' => 'is_template',\n 'to' => 'is_template',\n 'default' => 0,\n 'noindex' => true]],\n\n 'glpi_ocslinks' => [['from' => 'auto_update',\n 'to' => 'use_auto_update',\n 'default' => 1]],\n\n 'glpi_ocsservers'\n => [['from' => 'import_periph',\n 'to' => 'import_periph',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'import_monitor',\n 'to' => 'import_monitor',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'import_software',\n 'to' => 'import_software',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'import_printer',\n 'to' => 'import_printer',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'import_general_name',\n 'to' => 'import_general_name',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'import_general_os',\n 'to' => 'import_general_os',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'import_general_serial',\n 'to' => 'import_general_serial',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'import_general_model',\n 'to' => 'import_general_model',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'import_general_enterprise',\n 'to' => 'import_general_manufacturer',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'import_general_type',\n 'to' => 'import_general_type',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'import_general_domain',\n 'to' => 'import_general_domain',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'import_general_contact',\n 'to' => 'import_general_contact',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'import_general_comments',\n 'to' => 'import_general_comment',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'import_device_processor',\n 'to' => 'import_device_processor',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'import_device_memory',\n 'to' => 'import_device_memory',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'import_device_hdd',\n 'to' => 'import_device_hdd',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'import_device_iface',\n 'to' => 'import_device_iface',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'import_device_gfxcard',\n 'to' => 'import_device_gfxcard',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'import_device_sound',\n 'to' => 'import_device_sound',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'import_device_drives',\n 'to' => 'import_device_drive',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'import_device_ports',\n 'to' => 'import_device_port',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'import_device_modems',\n 'to' => 'import_device_modem',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'import_registry',\n 'to' => 'import_registry',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'import_os_serial',\n 'to' => 'import_os_serial',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'import_ip',\n 'to' => 'import_ip',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'import_disk',\n 'to' => 'import_disk',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'import_monitor_comments',\n 'to' => 'import_monitor_comment',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'glpi_link_enabled',\n 'to' => 'is_glpi_link_enabled',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'link_ip',\n 'to' => 'use_ip_to_link',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'link_name',\n 'to' => 'use_name_to_link',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'link_mac_address',\n 'to' => 'use_mac_to_link',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'link_serial',\n 'to' => 'use_serial_to_link',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'use_soft_dict',\n 'to' => 'use_soft_dict',\n 'default' => 0,\n 'noindex' => true]],\n\n 'glpi_peripherals'\n => [['from' => 'deleted',\n 'to' => 'is_deleted',\n 'default' => 0],\n ['from' => 'is_template',\n 'to' => 'is_template',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'is_global',\n 'to' => 'is_global',\n 'default' => 0,\n 'noindex' => true]],\n\n 'glpi_phones' => [['from' => 'deleted',\n 'to' => 'is_deleted',\n 'default' => 0],\n ['from' => 'is_template',\n 'to' => 'is_template',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'is_global',\n 'to' => 'is_global',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'flags_hp',\n 'to' => 'have_hp',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'flags_casque',\n 'to' => 'have_headset',\n 'default' => 0,\n 'noindex' => true]],\n\n 'glpi_printers'\n => [['from' => 'recursive',\n 'to' => 'is_recursive',\n 'default' => 0, 'noindex' => true],\n ['from' => 'deleted',\n 'to' => 'is_deleted',\n 'default' => 0],\n ['from' => 'is_template',\n 'to' => 'is_template',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'is_global',\n 'to' => 'is_global',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'flags_usb',\n 'to' => 'have_usb',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'flags_par',\n 'to' => 'have_parallel',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'flags_serial',\n 'to' => 'have_serial',\n 'default' => 0,\n 'noindex' => true]],\n\n 'glpi_profiles_users'\n => [['from' => 'recursive',\n 'to' => 'is_recursive',\n 'default' => 1],\n ['from' => 'dynamic',\n 'to' => 'is_dynamic',\n 'default' => 0]],\n\n 'glpi_profiles' => [['from' => 'is_default',\n 'to' => 'is_default',\n 'default' => 0]],\n\n 'glpi_reminders' => [['from' => 'private',\n 'to' => 'is_private',\n 'default' => 1],\n ['from' => 'recursive',\n 'to' => 'is_recursive',\n 'default' => 0],\n ['from' => 'rv',\n 'to' => 'is_planned',\n 'default' => 0]],\n\n 'glpi_reservationitems'\n => [['from' => 'active',\n 'to' => 'is_active',\n 'default' => 1]],\n\n 'glpi_rules' => [['from' => 'active',\n 'to' => 'is_active',\n 'default' => 1]],\n\n 'glpi_suppliers' => [['from' => 'recursive',\n 'to' => 'is_recursive',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'deleted',\n 'to' => 'is_deleted',\n 'default' => 0]],\n\n 'glpi_softwares' => [['from' => 'recursive',\n 'to' => 'is_recursive',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'deleted',\n 'to' => 'is_deleted',\n 'default' => 0],\n ['from' => 'helpdesk_visible',\n 'to' => 'is_helpdesk_visible',\n 'default' => 1],\n ['from' => 'is_template',\n 'to' => 'is_template',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'is_update',\n 'to' => 'is_update',\n 'default' => 0,\n 'noindex' => true]],\n\n 'glpi_softwarelicenses'\n => [['from' => 'recursive',\n 'to' => 'is_recursive',\n 'default' => 0,\n 'noindex' => true]],\n\n 'glpi_tickets' => [['from' => 'emailupdates',\n 'to' => 'use_email_notification',\n 'default' => 0,\n 'noindex' => true]],\n\n 'glpi_ticketfollowups'\n => [['from' => 'private',\n 'to' => 'is_private',\n 'default' => 0]],\n\n 'glpi_users' => [['from' => 'deleted',\n 'to' => 'is_deleted',\n 'default' => 0],\n ['from' => 'active',\n 'to' => 'is_active',\n 'default' => 1],\n ['from' => 'jobs_at_login',\n 'to' => 'show_jobs_at_login',\n 'default' => null,\n 'maybenull' => true,\n 'noindex' => true],\n ['from' => 'followup_private',\n 'to' => 'followup_private',\n 'default' => null,\n 'maybenull' => true,\n 'noindex' => true],\n ['from' => 'expand_soft_categorized',\n 'to' => 'is_categorized_soft_expanded',\n 'default' => null,\n 'maybenull' => true,\n 'noindex' => true],\n ['from' => 'expand_soft_not_categorized',\n 'to' => 'is_not_categorized_soft_expanded',\n 'default' => null,\n 'maybenull' => true,\n 'noindex' => true],\n ['from' => 'flat_dropdowntree',\n 'to' => 'use_flat_dropdowntree',\n 'default' => null,\n 'maybenull' => true,\n 'noindex' => true],\n ['from' => 'view_ID',\n 'to' => 'is_ids_visible',\n 'default' => null,\n 'maybenull' => true,\n 'noindex' => true]]];\n\n foreach ($boolfields as $table => $tab) {\n foreach ($tab as $update) {\n $newname = $update['to'];\n $oldname = $update['from'];\n $doindex = true;\n if (isset($update['noindex']) && $update['noindex']) {\n $doindex = false;\n }\n // Rename field\n if ($DB->fieldExists($table, $oldname, false)) {\n $NULL = \"NOT NULL\";\n if (isset($update['maybenull']) && $update['maybenull']) {\n $NULL = \"NULL\";\n\n // Manage not zero values\n $query = \"UPDATE `$table`\n SET `$oldname` = 1\n WHERE `$oldname` <> 0\n AND `$oldname` IS NOT NULL\";\n $DB->queryOrDie($query, \"0.78 prepare data for update $oldname to $newname in $table\");\n } else {\n // Manage NULL fields\n $query = \"UPDATE `$table`\n SET `$oldname` = 0\n WHERE `$oldname` IS NULL\";\n $DB->queryOrDie($query, \"0.78 prepare data for update $oldname to $newname in $table\");\n\n // Manage not zero values\n $query = \"UPDATE `$table`\n SET `$oldname` = 1\n WHERE `$oldname` <> 0\";\n $DB->queryOrDie($query, \"0.78 prepare data for update $oldname to $newname in $table\");\n }\n\n $default = \"DEFAULT NULL\";\n if (isset($update['default']) && !is_null($update['default'])) {\n $default = \"DEFAULT \".$update['default'];\n }\n\n $changes[$table][] = \"CHANGE `$oldname` `$newname` TINYINT( 1 ) $NULL $default\";\n\n } else {\n $updateresult = false;\n $migration->displayWarning(\"Error: $table.$oldname does not exist.\", true);\n }\n // If do index : delete old one / create new one\n if ($doindex) {\n if (!isIndex($table, $newname)) {\n $changes[$table][] = \"ADD INDEX `$newname` (`$newname`)\";\n }\n if ($newname!=$oldname && isIndex($table, $oldname)) {\n $changes[$table][] = \"DROP INDEX `$oldname`\";\n\n }\n }\n }\n }\n $migration->displayMessage(sprintf(__('Change of the database layout - %s'),\n 'Clean DB: update text fields'));\n\n $textfields\n = ['comments'\n => ['to' => 'comment',\n 'tables' => ['glpi_cartridgeitems', 'glpi_computers',\n 'glpi_consumableitems', 'glpi_contacts',\n 'glpi_contracts', 'glpi_documents',\n 'glpi_autoupdatesystems', 'glpi_budgets',\n 'glpi_cartridgeitemtypes', 'glpi_devicecasetypes',\n 'glpi_consumableitemtypes', 'glpi_contacttypes',\n 'glpi_contracttypes', 'glpi_domains',\n 'glpi_suppliertypes', 'glpi_filesystems',\n 'glpi_networkequipmentfirmwares',\n 'glpi_networkinterfaces', 'glpi_interfacetypes',\n 'glpi_knowbaseitemcategories',\n 'glpi_softwarelicensetypes', 'glpi_locations',\n 'glpi_manufacturers', 'glpi_computermodels',\n 'glpi_monitormodels', 'glpi_networkequipmentmodels',\n 'glpi_peripheralmodels', 'glpi_phonemodels',\n 'glpi_printermodels', 'glpi_netpoints',\n 'glpi_networks', 'glpi_operatingsystems',\n 'glpi_operatingsystemservicepacks',\n 'glpi_operatingsystemversions',\n 'glpi_phonepowersupplies', 'glpi_devicememorytypes',\n 'glpi_documentcategories', 'glpi_softwarecategories',\n 'glpi_states', 'glpi_ticketcategories',\n 'glpi_usertitles', 'glpi_usercategories',\n 'glpi_vlans', 'glpi_suppliers', 'glpi_entities',\n 'glpi_groups', 'glpi_infocoms', 'glpi_monitors',\n 'glpi_phones', 'glpi_printers', 'glpi_peripherals',\n 'glpi_networkequipments', 'glpi_reservationitems',\n 'glpi_rules','glpi_softwares',\n 'glpi_softwarelicenses', 'glpi_softwareversions',\n 'glpi_computertypes', 'glpi_monitortypes',\n 'glpi_networkequipmenttypes', 'glpi_peripheraltypes',\n 'glpi_phonetypes', 'glpi_printertypes', 'glpi_users']],\n\n 'notes' => ['to' => 'notepad',\n 'long' => true,\n 'tables' => ['glpi_cartridgeitems', 'glpi_computers',\n 'glpi_consumableitems', 'glpi_contacts',\n 'glpi_contracts', 'glpi_documents', 'glpi_suppliers',\n 'glpi_entitydatas', 'glpi_printers', 'glpi_monitors',\n 'glpi_phones', 'glpi_peripherals',\n 'glpi_networkequipments', 'glpi_softwares']],\n\n 'ldap_condition'\n => ['to' => 'condition',\n 'tables' => ['glpi_authldaps']],\n\n 'import_printers'\n => ['to' => 'import_printer','long'=>true,\n 'tables' => ['glpi_ocslinks']],\n\n 'contents' => ['to' => 'content','long'=>true,\n 'tables' => ['glpi_tickets','glpi_ticketfollowups']]];\n\n foreach ($textfields as $oldname => $tab) {\n $newname = $tab['to'];\n $type = \"TEXT\";\n if (isset($tab['long']) && $tab['long']) {\n $type = \"LONGTEXT\";\n }\n foreach ($tab['tables'] as $table) {\n // Rename field\n if ($DB->fieldExists($table, $oldname, false)) {\n $query = \"ALTER TABLE `$table`\n CHANGE `$oldname` `$newname` $type NULL DEFAULT NULL \";\n $DB->queryOrDie($query, \"0.78 rename $oldname to $newname in $table\");\n } else {\n $updateresult = false;\n $migration->displayWarning(\"Error: $table.$oldname does not exist.\", true);\n }\n }\n }\n\n $varcharfields\n = ['glpi_authldaps'\n => [['from' => 'ldap_host',\n 'to' => 'host',\n 'noindex' => true],\n ['from' => 'ldap_basedn',\n 'to' => 'basedn',\n 'noindex' => true],\n ['from' => 'ldap_rootdn',\n 'to' => 'rootdn',\n 'noindex' => true],\n ['from' => 'ldap_pass',\n 'to' => 'rootdn_password',\n 'noindex' => true],\n ['from' => 'ldap_login',\n 'to' => 'login_field',\n 'default' => 'uid',\n 'noindex' => true],\n ['from' => 'ldap_field_group',\n 'to' => 'group_field',\n 'noindex' => true],\n ['from' => 'ldap_group_condition',\n 'to' => 'group_condition',\n 'noindex' => true],\n ['from' => 'ldap_field_group_member',\n 'to' => 'group_member_field',\n 'noindex' => true],\n ['from' => 'ldap_field_email',\n 'to' => 'email_field',\n 'noindex' => true],\n ['from' => 'ldap_field_realname',\n 'to' => 'realname_field',\n 'noindex' => true],\n ['from' => 'ldap_field_firstname',\n 'to' => 'firstname_field',\n 'noindex' => true],\n ['from' => 'ldap_field_phone',\n 'to' => 'phone_field',\n 'noindex' => true],\n ['from' => 'ldap_field_phone2',\n 'to' => 'phone2_field',\n 'noindex' => true],\n ['from' => 'ldap_field_mobile',\n 'to' => 'mobile_field',\n 'noindex' => true],\n ['from' => 'ldap_field_comments',\n 'to' => 'comment_field',\n 'noindex' => true],\n ['from' => 'ldap_field_title',\n 'to' => 'title_field',\n 'noindex' => true],\n ['from' => 'ldap_field_type',\n 'to' => 'category_field',\n 'noindex' => true],\n ['from' => 'ldap_field_language',\n 'to' => 'language_field',\n 'noindex' => true]],\n\n 'glpi_authldapreplicates'\n => [['from' => 'ldap_host',\n 'to' => 'host',\n 'noindex' => true]],\n\n 'glpi_authmails'\n => [['from' => 'imap_auth_server',\n 'to' => 'connect_string',\n 'noindex' => true],\n ['from' => 'imap_host',\n 'to' => 'host',\n 'noindex' => true]],\n\n 'glpi_computers'\n => [['from' => 'os_license_id',\n 'to' => 'os_licenseid',\n 'noindex' => true],\n ['from' => 'tplname',\n 'to' => 'template_name',\n 'noindex' => true]],\n\n 'glpi_configs' => [['from' => 'helpdeskhelp_url',\n 'to' => 'helpdesk_doc_url',\n 'noindex' => true],\n ['from' => 'centralhelp_url',\n 'to' => 'central_doc_url',\n 'noindex' => true]],\n\n 'glpi_contracts'\n => [['from' => 'compta_num',\n 'to' => 'accounting_number',\n 'noindex' => true]],\n\n 'glpi_events' => [['from' => 'itemtype',\n 'to' => 'type',\n 'noindex' => true]],\n\n 'glpi_infocoms' => [['from' => 'num_commande',\n 'to' => 'order_number',\n 'noindex' => true],\n ['from' => 'bon_livraison',\n 'to' => 'delivery_number',\n 'noindex' => true],\n ['from' => 'num_immo',\n 'to' => 'immo_number',\n 'noindex' => true],\n ['from' => 'facture',\n 'to' => 'bill',\n 'noindex' => true]],\n\n 'glpi_monitors' => [['from' => 'tplname',\n 'to' => 'template_name',\n 'noindex' => true]],\n\n 'glpi_networkequipments'\n => [['from' => 'tplname',\n 'to' => 'template_name',\n 'noindex' => true],\n ['from' => 'ifmac',\n 'to' => 'mac',\n 'noindex' => true],\n ['from' => 'ifaddr',\n 'to' => 'ip',\n 'noindex' => true]],\n\n 'glpi_networkports'\n => [['from' => 'ifmac',\n 'to' => 'mac',\n 'noindex' => true],\n ['from' => 'ifaddr',\n 'to' => 'ip',\n 'noindex' => true]],\n\n 'glpi_peripherals'\n => [['from' => 'tplname',\n 'to' => 'template_name',\n 'noindex' => true]],\n\n 'glpi_phones' => [['from' => 'tplname',\n 'to' => 'template_name',\n 'noindex' => true]],\n\n 'glpi_printers' => [['from' => 'tplname',\n 'to' => 'template_name',\n 'noindex' => true],\n ['from' => 'ramSize',\n 'to' => 'memory_size',\n 'noindex' => true]],\n\n 'glpi_registrykeys'\n => [['from' => 'registry_hive',\n 'to' => 'hive',\n 'noindex' => true],\n ['from' => 'registry_path',\n 'to' => 'path',\n 'noindex' => true],\n ['from' => 'registry_value',\n 'to' => 'value',\n 'noindex' => true],\n ['from' => 'registry_ocs_name',\n 'to' => 'ocs_name',\n 'noindex' => true]],\n\n 'glpi_softwares'\n => [['from' => 'tplname',\n 'to' => 'template_name',\n 'noindex' => true]],\n\n 'glpi_tickets' => [['from' => 'uemail',\n 'to' => 'user_email',\n 'noindex' => true]]];\n\n foreach ($varcharfields as $table => $tab) {\n foreach ($tab as $update) {\n $newname = $update['to'];\n $oldname = $update['from'];\n $doindex = true;\n if (isset($update['noindex']) && $update['noindex']) {\n $doindex = false;\n }\n $default = \"DEFAULT NULL\";\n if (isset($update['default']) && !is_null($update['default'])) {\n $default = \"DEFAULT '\".$update['default'].\"'\";\n }\n\n // Rename field\n if ($DB->fieldExists($table, $oldname, false)) {\n $query = \"ALTER TABLE `$table`\n CHANGE `$oldname` `$newname` VARCHAR( 255 ) NULL $default \";\n $DB->queryOrDie($query, \"0.78 rename $oldname to $newname in $table\");\n } else {\n $updateresult = false;\n $migration->displayWarning(\"Error: $table.$oldname does not exist.\");\n }\n // If do index : delete old one / create new one\n if ($doindex) {\n if (!isIndex($table, $newname)) {\n $changes[$table][] = \"ADD INDEX `$newname` (`$newname`)\";\n }\n if ($newname!=$oldname && isIndex($table, $oldname)) {\n $changes[$table][] = \"DROP INDEX `$oldname`\";\n }\n }\n }\n }\n\n $charfields\n = ['glpi_profiles' => [['from' => 'user_auth_method',\n 'to' => 'user_authtype',\n 'length' => 1,\n 'default' => null,\n 'noindex' => true],\n ['from' => 'rule_tracking',\n 'to' => 'rule_ticket',\n 'length' => 1,\n 'default' => null,\n 'noindex' => true],\n ['from' => 'rule_softwarecategories',\n 'to' => 'rule_softwarecategories',\n 'length' => 1,\n 'default' => null,\n 'noindex' => true],\n ['from' => 'rule_dictionnary_software',\n 'to' => 'rule_dictionnary_software',\n 'length' => 1,\n 'default' => null,\n 'noindex' => true],\n ['from' => 'rule_dictionnary_dropdown',\n 'to' => 'rule_dictionnary_dropdown',\n 'length' => 1,\n 'default' => null,\n 'noindex' => true]],\n\n 'glpi_configs' => [['from' => 'version',\n 'to' => 'version',\n 'length' => 10,\n 'default' => null,\n 'noindex' => true],\n ['from' => 'version',\n 'to' => 'version',\n 'length' => 10,\n 'default' => null,\n 'noindex' => true],\n ['from' => 'language',\n 'to' => 'language',\n 'length' => 10,\n 'default' => 'en_GB',\n 'noindex' => true,\n 'comments' =>'see define.php CFG_GLPI[language] array'],\n ['from' => 'priority_1',\n 'to' => 'priority_1',\n 'length' => 20,\n 'default' => '#fff2f2',\n 'noindex' => true],\n ['from' => 'priority_2',\n 'to' => 'priority_2',\n 'length' => 20,\n 'default' => '#ffe0e0',\n 'noindex' => true],\n ['from' => 'priority_3',\n 'to' => 'priority_3',\n 'length' => 20,\n 'default' => '#ffcece',\n 'noindex' => true],\n ['from' => 'priority_4',\n 'to' => 'priority_4',\n 'length' => 20,\n 'default' => '#ffbfbf',\n 'noindex' => true],\n ['from' => 'priority_5',\n 'to' => 'priority_5',\n 'length' => 20,\n 'default' => '#ffadad',\n 'noindex' => true],\n ['from' => 'founded_new_version',\n 'to' => 'founded_new_version',\n 'length' => 10,\n 'default' => null,\n 'noindex' => true]],\n\n 'glpi_rules' => [['from' => 'match',\n 'to' => 'match',\n 'length' => 10,\n 'default' => null,\n 'noindex' => true,\n 'comments' => 'see define.php *_MATCHING constant']],\n\n 'glpi_users' => [['from' => 'language',\n 'to' => 'language',\n 'length' => 10,\n 'default' => null,\n 'noindex' => true,\n 'comments' => 'see define.php CFG_GLPI[language] array'],\n ['from' => 'priority_1',\n 'to' => 'priority_1',\n 'length' => 20,\n 'default' => null,\n 'noindex' => true],\n ['from' => 'priority_2',\n 'to' => 'priority_2',\n 'length' => 20,\n 'default' => null,\n 'noindex' => true],\n ['from' => 'priority_3',\n 'to' => 'priority_3',\n 'length' => 20,\n 'default' => null,\n 'noindex' => true],\n ['from' => 'priority_4',\n 'to' => 'priority_4',\n 'length' => 20,\n 'default' => null,\n 'noindex' => true],\n ['from' => 'priority_5',\n 'to' => 'priority_5',\n 'length' => 20,\n 'default' => null,\n 'noindex' => true]]];\n\n foreach ($charfields as $table => $tab) {\n foreach ($tab as $update) {\n $newname = $update['to'];\n $oldname = $update['from'];\n $length = $update['length'];\n $doindex = true;\n if (isset($update['noindex']) && $update['noindex']) {\n $doindex = false;\n }\n $default = \"DEFAULT NULL\";\n if (isset($update['default']) && !is_null($update['default'])) {\n $default = \"DEFAULT '\".$update['default'].\"'\";\n }\n $addcomment = \"\";\n if (isset($update['comments'])) {\n $addcomment = \"COMMENT '\".$update['comments'].\"'\";\n }\n\n // Rename field\n if ($DB->fieldExists($table, $oldname, false)) {\n $query = \"ALTER TABLE `$table`\n CHANGE `$oldname` `$newname` CHAR( $length ) NULL $default $addcomment \";\n $DB->queryOrDie($query, \"0.78 rename $oldname to $newname in $table\");\n } else {\n $updateresult = false;\n $migration->displayWarning(\"Error: $table.$oldname does not exist.\", true);\n }\n // If do index : delete old one / create new one\n if ($doindex) {\n if (!isIndex($table, $newname)) {\n $changes[$table][] = \"ADD INDEX `$newname` (`$newname`)\";\n }\n if ($oldname!=$newname && isIndex($table, $oldname)) {\n $changes[$table][] = \"DROP INDEX `$oldname`\";\n }\n }\n }\n }\n $intfields\n = ['glpi_authldaps' => [['from' => 'ldap_port',\n 'to' => 'port',\n 'default' => 389,\n 'noindex' => true,\n 'checkdatas' => true],\n ['from' => 'ldap_search_for_groups',\n 'to' => 'group_search_type',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'ldap_opt_deref',\n 'to' => 'deref_option',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'timezone',\n 'to' => 'time_offset',\n 'default' => 0,\n 'noindex' => true,\n 'comments' => 'in seconds']],\n\n 'glpi_authldapreplicates'\n => [['from' => 'ldap_port',\n 'to' => 'port',\n 'default' => 389,\n 'noindex' => true,\n 'checkdatas' => true]],\n\n 'glpi_bookmarks' => [['from' => 'type',\n 'to' => 'type',\n 'default' => 0,\n 'noindex' => true,\n 'comments' => 'see define.php BOOKMARK_* constant']],\n\n 'glpi_cartridgeitems'\n => [['from' => 'alarm',\n 'to' => 'alarm_threshold',\n 'default' => 10]],\n\n 'glpi_configs' => [['from' => 'glpi_timezone',\n 'to' => 'time_offset',\n 'default' => 0,\n 'noindex' => true,\n 'comments' => 'in seconds'],\n ['from' => 'cartridges_alarm',\n 'to' => 'default_alarm_threshold',\n 'default' => 10,\n 'noindex' => true],\n ['from' => 'event_loglevel',\n 'to' => 'event_loglevel',\n 'default' => 5,\n 'noindex' => true],\n ['from' => 'cas_port',\n 'to' => 'cas_port',\n 'default' => 443,\n 'noindex' => true,\n 'checkdatas' => true],\n ['from' => 'auto_update_check',\n 'to' => 'auto_update_check',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'dateformat',\n 'to' => 'date_format',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'numberformat',\n 'to' => 'number_format',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'proxy_port',\n 'to' => 'proxy_port',\n 'default' => 8080,\n 'noindex' => true,\n 'checkdatas' => true],\n ['from' => 'contract_alerts',\n 'to' => 'default_contract_alert',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'infocom_alerts',\n 'to' => 'default_infocom_alert',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'cartridges_alert',\n 'to' => 'cartridges_alert_repeat',\n 'default' => 0,\n 'noindex' => true,\n 'comments' => 'in seconds'],\n ['from' => 'consumables_alert',\n 'to' => 'consumables_alert_repeat',\n 'default' => 0,\n 'noindex' => true,\n 'comments' => 'in seconds'],\n ['from' => 'monitors_management_restrict',\n 'to' => 'monitors_management_restrict',\n 'default' => 2,\n 'noindex' => true],\n ['from' => 'phones_management_restrict',\n 'to' => 'phones_management_restrict',\n 'default' => 2,\n 'noindex' => true],\n ['from' => 'peripherals_management_restrict',\n 'to' => 'peripherals_management_restrict',\n 'default' => 2,\n 'noindex' => true],\n ['from' => 'printers_management_restrict',\n 'to' => 'printers_management_restrict',\n 'default' => 2,\n 'noindex' => true],\n ['from' => 'autoupdate_link_state',\n 'to' => 'state_autoupdate_mode',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'autoclean_link_state',\n 'to' => 'state_autoclean_mode',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'name_display_order',\n 'to' => 'names_format',\n 'default' => 0,\n 'noindex' => true,\n 'comments' => 'see *NAME_BEFORE constant in define.php'],\n ['from' => 'dropdown_limit',\n 'to' => 'dropdown_chars_limit',\n 'default' => 50,\n 'noindex' => true],\n ['from' => 'smtp_mode',\n 'to' => 'smtp_mode',\n 'default' => 0,\n 'noindex' => true,\n 'comments' => 'see define.php MAIL_* constant'],\n ['from' => 'mailgate_filesize_max',\n 'to' => 'default_mailcollector_filesize_max',\n 'default' => 2097152,\n 'noindex' => true]],\n\n 'glpi_consumableitems'\n => [['from' => 'alarm',\n 'to' => 'alarm_threshold',\n 'default' => 10]],\n\n 'glpi_contracts' => [['from' => 'duration',\n 'to' => 'duration',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'notice',\n 'to' => 'notice',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'periodicity',\n 'to' => 'periodicity',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'facturation',\n 'to' => 'billing',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'device_countmax',\n 'to' => 'max_links_allowed',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'alert',\n 'to' => 'alert',\n 'default' => 0],\n ['from' => 'renewal',\n 'to' => 'renewal',\n 'default' => 0,\n 'noindex' => true]],\n\n 'glpi_displaypreferences'\n => [['from' => 'num',\n 'to' => 'num',\n 'default' => 0],\n ['from' => 'rank',\n 'to' => 'rank',\n 'default' => 0]],\n\n 'glpi_events' => [['from' => 'level',\n 'to' => 'level',\n 'default' => 0]],\n\n 'glpi_infocoms' => [['from' => 'warranty_duration',\n 'to' => 'warranty_duration',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'amort_time',\n 'to' => 'sink_time',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'amort_type',\n 'to' => 'sink_type',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'alert',\n 'to' => 'alert',\n 'default' => 0]],\n\n 'glpi_mailingsettings'\n => [['from' => 'item_type',\n 'to' => 'mailingtype',\n 'default' => 0,\n 'noindex' => true,\n 'comments' => 'see define.php *_MAILING_TYPE constant']],//\n\n 'glpi_monitors' => [['from' => 'size',\n 'to' => 'size',\n 'default' => 0,\n 'noindex' => true]],\n\n 'glpi_printers' => [['from' => 'initial_pages',\n 'to' => 'init_pages_counter',\n 'default' => 0,\n 'noindex' => true,\n 'checkdatas' => true]],\n\n 'glpi_profiles' => [['from' => 'helpdesk_hardware',\n 'to' => 'helpdesk_hardware',\n 'default' => 0,\n 'noindex' => true]],\n\n 'glpi_plugins' => [['from' => 'state',\n 'to' => 'state',\n 'default' => 0,\n 'comments' => 'see define.php PLUGIN_* constant']],//\n\n 'glpi_reminders' => [['from' => 'state',\n 'to' => 'state',\n 'default' => 0]],\n\n 'glpi_ticketplannings'\n => [['from' => 'state',\n 'to' => 'state',\n 'default' => 1]],\n\n 'glpi_rulecriterias'\n => [['from' => 'condition',\n 'to' => 'condition',\n 'default' => 0,\n 'comments' => 'see define.php PATTERN_* and REGEX_* constant']],//\n\n 'glpi_rules' => [['from' => 'sub_type',\n 'to' => 'sub_type',\n 'default' => 0,\n 'comments' => 'see define.php RULE_* constant']],//\n\n 'glpi_tickets' => [['from' => 'request_type',\n 'to' => 'request_type',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'priority',\n 'to' => 'priority',\n 'default' => 1,\n 'noindex' => true]],\n\n 'glpi_transfers' => [['from' => 'keep_tickets',\n 'to' => 'keep_ticket',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'keep_networklinks',\n 'to' => 'keep_networklink',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'keep_reservations',\n 'to' => 'keep_reservation',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'keep_history',\n 'to' => 'keep_history',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'keep_devices',\n 'to' => 'keep_device',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'keep_infocoms',\n 'to' => 'keep_infocom',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'keep_dc_monitor',\n 'to' => 'keep_dc_monitor',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'clean_dc_monitor',\n 'to' => 'clean_dc_monitor',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'keep_dc_phone',\n 'to' => 'keep_dc_phone',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'clean_dc_phone',\n 'to' => 'clean_dc_phone',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'keep_dc_peripheral',\n 'to' => 'keep_dc_peripheral',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'clean_dc_peripheral',\n 'to' => 'clean_dc_peripheral',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'keep_dc_printer',\n 'to' => 'keep_dc_printer',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'clean_dc_printer',\n 'to' => 'clean_dc_printer',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'keep_enterprises',\n 'to' => 'keep_supplier',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'clean_enterprises',\n 'to' => 'clean_supplier',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'keep_contacts',\n 'to' => 'keep_contact',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'clean_contacts',\n 'to' => 'clean_contact',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'keep_contracts',\n 'to' => 'keep_contract',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'clean_contracts',\n 'to' => 'clean_contract',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'keep_softwares',\n 'to' => 'keep_software',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'clean_softwares',\n 'to' => 'clean_software',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'keep_documents',\n 'to' => 'keep_document',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'clean_documents',\n 'to' => 'clean_document',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'keep_cartridges_type',\n 'to' => 'keep_cartridgeitem',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'clean_cartridges_type',\n 'to' => 'clean_cartridgeitem',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'keep_cartridges',\n 'to' => 'keep_cartridge',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'keep_consumables',\n 'to' => 'keep_consumable',\n 'default' => 0,\n 'noindex' => true]],\n\n 'glpi_users' => [['from' => 'dateformat',\n 'to' => 'date_format',\n 'default' => null,\n 'noindex' => true,\n 'maybenull' => true],\n ['from' => 'numberformat',\n 'to' => 'number_format',\n 'default' => null,\n 'noindex' => true,\n 'maybenull' => true],\n ['from' => 'use_mode',\n 'to' => 'use_mode',\n 'default' => 0,\n 'noindex' => true],\n ['from' => 'dropdown_limit',\n 'to' => 'dropdown_chars_limit',\n 'default' => null,\n 'maybenull' => true,\n 'noindex' => true]]];\n\n foreach ($intfields as $table => $tab) {\n foreach ($tab as $update) {\n $newname = $update['to'];\n $oldname = $update['from'];\n $doindex = true;\n if (isset($update['noindex']) && $update['noindex']) {\n $doindex = false;\n }\n\n $default = \"DEFAULT NULL\";\n if (isset($update['default']) && !is_null($update['default'])) {\n $default = \"DEFAULT \".$update['default'].\"\";\n }\n\n $NULL = \"NOT NULL\";\n if (isset($update['maybenull']) && $update['maybenull']) {\n $NULL = \"NULL\";\n }\n $check_datas=false;\n if (isset($update['checkdatas'])) {\n $check_datas=$update['checkdatas'];\n }\n $addcomment = \"\";\n if (isset($update['comments'])) {\n $addcomment = \"COMMENT '\".$update['comments'].\"'\";\n }\n\n // Rename field\n if ($DB->fieldExists($table, $oldname, false)) {\n if ($check_datas) {\n $query = \"SELECT `id`, `$oldname`\n FROM `$table`\";\n if ($result=$DB->query($query)) {\n if ($DB->numrows($result)>0) {\n while ($data = $DB->fetchAssoc($result)) {\n if (empty($data[$oldname]) && isset($update['default'])) {\n $data[$oldname] = $update['default'];\n }\n $query = \"UPDATE `$table`\n SET `$oldname` = '\".intval($data[$oldname]).\"'\n WHERE `id` = \".$data['id'].\"\";\n $DB->query($query);\n }\n }\n }\n }\n $changes[$table][] = \"CHANGE `$oldname` `$newname` INT( 11 ) $NULL $default $addcomment\";\n\n } else {\n $updateresult = false;\n $migration->displayWarning(\"Error: $table.$oldname does not exist.\", true);\n }\n // If do index : delete old one / create new one\n if ($doindex) {\n if (!isIndex($table, $newname)) {\n $changes[$table][] = \"ADD INDEX `$newname` (`$newname`)\";\n }\n if ($newname!=$oldname && isIndex($table, $oldname)) {\n $changes[$table][] = \"DROP INDEX `$oldname`\";\n }\n }\n }\n }\n\n $migration->displayMessage(sprintf(__('Change of the database layout - %s'),\n 'Clean DB: others field changes'));\n\n if ($DB->fieldExists('glpi_alerts', 'date', false)) {\n $changes['glpi_alerts'][] = \"CHANGE `date` `date` DATETIME NOT NULL\";\n }\n if ($DB->fieldExists('glpi_configs', 'date_fiscale', false)) {\n $changes['glpi_configs'][] = \"CHANGE `date_fiscale` `date_tax` DATE NOT NULL\n DEFAULT '2005-12-31'\";\n }\n\n if ($DB->fieldExists('glpi_configs', 'sendexpire', false)) {\n $changes['glpi_configs'][] = \"DROP `sendexpire`\";\n }\n if ($DB->fieldExists('glpi_configs', 'show_admin_doc', false)) {\n $changes['glpi_configs'][] = \"DROP `show_admin_doc`\";\n }\n if ($DB->fieldExists('glpi_configs', 'licenses_management_restrict', false)) {\n $changes['glpi_configs'][] = \"DROP `licenses_management_restrict`\";\n }\n if ($DB->fieldExists('glpi_configs', 'nextprev_item', false)) {\n $changes['glpi_configs'][] = \"DROP `nextprev_item`\";\n }\n\n if ($DB->fieldExists('glpi_configs', 'logotxt', false)) {\n $changes['glpi_configs'][] = \"DROP `logotxt`\";\n }\n\n if ($DB->fieldExists('glpi_configs', 'num_of_events', false)) {\n $changes['glpi_configs'][] = \"DROP `num_of_events`\";\n }\n\n if ($DB->fieldExists('glpi_configs', 'tracking_order', false)) {\n $changes['glpi_configs'][] = \"DROP `tracking_order`\";\n }\n\n if ($DB->fieldExists('glpi_contracts', 'bill_type', false)) {\n $changes['glpi_contracts'][] = \"DROP `bill_type`\";\n }\n\n if ($DB->fieldExists('glpi_infocoms', 'amort_coeff', false)) {\n $changes['glpi_infocoms'][] = \"CHANGE `amort_coeff` `sink_coeff` FLOAT NOT NULL DEFAULT '0'\";\n }\n\n if ($DB->fieldExists('glpi_ocsservers', 'import_software_comments', false)) {\n $changes['glpi_ocsservers'][] = \"DROP `import_software_comments`\";\n }\n\n if ($DB->fieldExists('glpi_users', 'nextprev_item', false)) {\n $changes['glpi_users'][] = \"DROP `nextprev_item`\";\n }\n\n if ($DB->fieldExists('glpi_users', 'num_of_events', false)) {\n $changes['glpi_users'][] = \"DROP `num_of_events`\";\n }\n\n if ($DB->fieldExists('glpi_users', 'tracking_order', false)) {\n $changes['glpi_users'][] = \"DROP `tracking_order`\";\n }\n\n if ($DB->fieldExists('glpi_rulerightparameters', 'sub_type', false)) {\n $changes['glpi_rulerightparameters'][] = \"DROP `sub_type`\";\n }\n\n if ($DB->fieldExists('glpi_softwares', 'oldstate', false)) {\n $changes['glpi_softwares'][] = \"DROP `oldstate`\";\n }\n\n if ($DB->fieldExists('glpi_users', 'password', false)) {\n $changes['glpi_users'][] = \"DROP `password`\";\n }\n\n if ($DB->fieldExists('glpi_users', 'password_md5', false)) {\n $changes['glpi_users'][] = \"CHANGE `password_md5` `password` CHAR( 40 ) NULL DEFAULT NULL\";\n }\n\n if (!$DB->fieldExists('glpi_mailcollectors', 'filesize_max', false)) {\n $changes['glpi_mailcollectors'][] = \"ADD `filesize_max` INT(11) NOT NULL DEFAULT 2097152\";\n }\n\n $migration->displayMessage(sprintf(__('Change of the database layout - %s'),\n 'Clean DB: index management'));\n\n if (!isIndex('glpi_alerts', 'unicity')) {\n $changes['glpi_alerts'][] = \"ADD UNIQUE `unicity` (`itemtype`, `items_id`, `type`)\";\n }\n\n if (!isIndex('glpi_cartridges_printermodels', 'unicity')) {\n $changes['glpi_cartridges_printermodels'][] = \"ADD UNIQUE `unicity` (`printermodels_id`,\n `cartridgeitems_id`)\";\n }\n\n if (!isIndex('glpi_computers_items', 'unicity')) {\n $changes['glpi_computers_items'][] = \"ADD UNIQUE `unicity` (`itemtype`, `items_id`,\n `computers_id`)\";\n }\n\n if (!isIndex('glpi_contacts_suppliers', 'unicity')) {\n $changes['glpi_contacts_suppliers'][] = \"ADD UNIQUE `unicity` (`suppliers_id`, `contacts_id`)\";\n }\n\n if (!isIndex('glpi_contracts_items', 'unicity')) {\n $changes['glpi_contracts_items'][] = \"ADD UNIQUE `unicity` (`contracts_id`, `itemtype`,\n `items_id`)\";\n }\n\n if (!isIndex('glpi_contracts_items', 'item')) {\n $changes['glpi_contracts_items'][] = \"ADD INDEX `item` (`itemtype`, `items_id`)\";\n }\n\n if (!isIndex('glpi_contracts_suppliers', 'unicity')) {\n $changes['glpi_contracts_suppliers'][] = \"ADD UNIQUE `unicity` (`suppliers_id`, `contracts_id`)\";\n }\n\n if (!isIndex('glpi_displaypreferences', 'unicity')) {\n $changes['glpi_displaypreferences'][] = \"ADD UNIQUE `unicity` (`users_id`, `itemtype`, `num`)\";\n }\n\n if (!isIndex('glpi_bookmarks_users', 'unicity')) {\n $changes['glpi_bookmarks_users'][] = \"ADD UNIQUE `unicity` (`users_id`, `itemtype`)\";\n }\n\n if (!isIndex('glpi_documents_items', 'unicity')) {\n $changes['glpi_documents_items'][] = \"ADD UNIQUE `unicity` (`documents_id`, `itemtype`,\n `items_id`)\";\n }\n\n if (!isIndex('glpi_documents_items', 'item')) {\n $changes['glpi_documents_items'][] = \"ADD INDEX `item` (`itemtype`, `items_id`)\";\n }\n\n if (!isIndex('glpi_knowbaseitemcategories', 'unicity')) {\n $changes['glpi_knowbaseitemcategories'][] = \"ADD UNIQUE `unicity` (`knowbaseitemcategories_id`,\n `name`)\";\n }\n\n if (!isIndex('glpi_locations', 'unicity')) {\n $changes['glpi_locations'][] = \"ADD UNIQUE `unicity` (`entities_id`, `locations_id`, `name`)\";\n }\n\n if (isIndex('glpi_locations', 'name')) {\n $changes['glpi_locations'][] = \"DROP INDEX `name` \";\n }\n\n if (!isIndex('glpi_netpoints', 'complete')) {\n $changes['glpi_netpoints'][] = \"ADD INDEX `complete` (`entities_id`, `locations_id`, `name`)\";\n }\n\n if (!isIndex('glpi_netpoints', 'location_name')) {\n $changes['glpi_netpoints'][] = \"ADD INDEX `location_name` (`locations_id`, `name`)\";\n }\n\n if (!isIndex('glpi_entities', 'unicity')) {\n $changes['glpi_entities'][] = \"ADD UNIQUE `unicity` (`entities_id`, `name`)\";\n }\n\n if (!isIndex('glpi_entitydatas', 'unicity')) {\n $changes['glpi_entitydatas'][] = \"ADD UNIQUE `unicity` (`entities_id`)\";\n }\n\n if (!isIndex('glpi_events', 'item')) {\n $changes['glpi_events'][] = \"ADD INDEX `item` (`type`, `items_id`)\";\n }\n\n if (!isIndex('glpi_infocoms', 'unicity')) {\n $changes['glpi_infocoms'][] = \"ADD UNIQUE `unicity` (`itemtype`, `items_id`)\";\n }\n if (!isIndex('glpi_knowbaseitems', 'date_mod')) {\n $changes['glpi_knowbaseitems'][] = \"ADD INDEX `date_mod` (`date_mod`)\";\n }\n\n if (!isIndex('glpi_networkequipments', 'date_mod')) {\n $changes['glpi_networkequipments'][] = \"ADD INDEX `date_mod` (`date_mod`)\";\n }\n\n if (!isIndex('glpi_links_itemtypes', 'unicity')) {\n $changes['glpi_links_itemtypes'][] = \"ADD UNIQUE `unicity` (`itemtype`, `links_id`)\";\n }\n\n if (!isIndex('glpi_mailingsettings', 'unicity')) {\n $changes['glpi_mailingsettings'][] = \"ADD UNIQUE `unicity` (`type`, `items_id`, `mailingtype`)\";\n }\n\n if (!isIndex('glpi_networkports', 'item')) {\n $changes['glpi_networkports'][] = \"ADD INDEX `item` (`itemtype`, `items_id`)\";\n }\n\n if (!isIndex('glpi_networkports_vlans', 'unicity')) {\n $changes['glpi_networkports_vlans'][] = \"ADD UNIQUE `unicity` (`networkports_id`, `vlans_id`)\";\n }\n\n if (!isIndex('glpi_networkports_networkports', 'unicity')) {\n $changes['glpi_networkports_networkports'][] = \"ADD UNIQUE `unicity` (`networkports_id_1`,\n `networkports_id_2`)\";\n }\n\n if (!isIndex('glpi_ocslinks', 'unicity')) {\n $changes['glpi_ocslinks'][] = \"ADD UNIQUE `unicity` (`ocsservers_id`, `ocsid`)\";\n }\n\n if (!isIndex('glpi_peripherals', 'date_mod')) {\n $changes['glpi_peripherals'][] = \"ADD INDEX `date_mod` (`date_mod`)\";\n }\n\n if (!isIndex('glpi_phones', 'date_mod')) {\n $changes['glpi_phones'][] = \"ADD INDEX `date_mod` (`date_mod`)\";\n }\n\n if (!isIndex('glpi_plugins', 'unicity')) {\n $changes['glpi_plugins'][] = \"ADD UNIQUE `unicity` (`directory`)\";\n }\n\n if (!isIndex('glpi_printers', 'date_mod')) {\n $changes['glpi_printers'][] = \"ADD INDEX `date_mod` (`date_mod`)\";\n }\n\n if (!isIndex('glpi_reminders', 'date_mod')) {\n $changes['glpi_reminders'][] = \"ADD INDEX `date_mod` (`date_mod`)\";\n }\n\n if (!isIndex('glpi_reservationitems', 'item')) {\n $changes['glpi_reservationitems'][] = \"ADD INDEX `item` (`itemtype`, `items_id`)\";\n }\n\n if (!isIndex('glpi_tickets', 'item')) {\n $changes['glpi_tickets'][] = \"ADD INDEX `item` (`itemtype`, `items_id`)\";\n }\n\n if (!isIndex('glpi_documenttypes', 'date_mod')) {\n $changes['glpi_documenttypes'][] = \"ADD INDEX `date_mod` (`date_mod`)\";\n }\n\n if (!isIndex('glpi_documenttypes', 'unicity')) {\n $changes['glpi_documenttypes'][] = \"ADD UNIQUE `unicity` (`ext`)\";\n }\n if (!isIndex('glpi_users', 'unicity')) {\n $changes['glpi_users'][] = \"ADD UNIQUE `unicity` (`name`)\";\n }\n if (!isIndex('glpi_users', 'date_mod')) {\n $changes['glpi_users'][] = \"ADD INDEX `date_mod` (`date_mod`)\";\n }\n if (!isIndex('glpi_users', 'authitem')) {\n $changes['glpi_users'][] = \"ADD INDEX `authitem` (`authtype`, `auths_id`)\";\n }\n if (!isIndex('glpi_groups_users', 'unicity')) {\n $changes['glpi_groups_users'][] = \"ADD UNIQUE `unicity` (`users_id`, `groups_id`)\";\n }\n\n $indextodrop = ['glpi_alerts' => ['alert', 'FK_device'],\n 'glpi_cartridges_printermodels' => ['FK_glpi_type_printer'],\n 'glpi_computers_items' => ['connect', 'type', 'end1',\n 'end1_2'],\n 'glpi_consumables' => ['FK_glpi_cartridges_type'],\n 'glpi_contacts_suppliers' => ['FK_enterprise'],\n 'glpi_contracts_items' => ['FK_contract_device',\n 'device_type'],\n 'glpi_contracts_suppliers' => ['FK_enterprise'],\n 'glpi_displaypreferences' => ['display', 'FK_users'],\n 'glpi_bookmarks_users' => ['FK_users'],\n 'glpi_documents_items' => ['FK_doc_device', 'device_type',\n 'FK_device'],\n 'glpi_knowbaseitemcategories' => ['parentID_2', 'parentID'],\n 'glpi_locations' => ['FK_entities'],\n 'glpi_netpoints' => ['FK_entities', 'location'],\n 'glpi_entities' => ['name'/*,'parentID'*/],\n 'glpi_entitydatas' => ['FK_entities'],\n 'glpi_events' => ['comp', 'itemtype'],\n 'glpi_infocoms' => ['FK_device'],\n 'glpi_computers_softwareversions' => ['sID'],\n 'glpi_links_itemtypes' => ['link'],\n 'glpi_mailingsettings' => ['mailings', 'FK_item'],\n 'glpi_networkports' => ['device_type'],\n 'glpi_networkports_vlans' => ['portvlan'],\n 'glpi_networkports_networkports' => ['netwire', 'end1', 'end1_2'],\n 'glpi_ocslinks' => ['ocs_server_id'],\n 'glpi_plugins' => ['name'],\n 'glpi_reservationitems' => ['reservationitem'],\n 'glpi_tickets' => ['computer', 'device_type'],\n 'glpi_documenttypes' => ['extension'],\n 'glpi_users' => ['name'],\n 'glpi_groups_users' => ['usergroup']];\n\n foreach ($indextodrop as $table => $tab) {\n foreach ($tab as $indexname) {\n if (isIndex($table, $indexname)) {\n $changes[$table][] = \"DROP INDEX `$indexname`\";\n }\n }\n }\n\n foreach ($changes as $table => $tab) {\n $migration->displayMessage(sprintf(__('Change of the database layout - %s'), $table));\n $query = \"ALTER TABLE `$table`\n \".implode(\" ,\\n\", $tab).\";\";\n $DB->queryOrDie($query, \"0.78 multiple alter in $table\");\n }\n\n $migration->displayMessage(sprintf(__('Change of the database layout - %s'),\n 'Update itemtype fields'));\n\n // Convert itemtype to Class names\n $typetoname = [GENERAL_TYPE => \"\",// For tickets\n COMPUTER_TYPE => \"Computer\",\n NETWORKING_TYPE => \"NetworkEquipment\",\n PRINTER_TYPE => \"Printer\",\n MONITOR_TYPE => \"Monitor\",\n PERIPHERAL_TYPE => \"Peripheral\",\n SOFTWARE_TYPE => \"Software\",\n CONTACT_TYPE => \"Contact\",\n ENTERPRISE_TYPE => \"Supplier\",\n INFOCOM_TYPE => \"Infocom\",\n CONTRACT_TYPE => \"Contract\",\n CARTRIDGEITEM_TYPE => \"CartridgeItem\",\n TYPEDOC_TYPE => \"DocumentType\",\n DOCUMENT_TYPE => \"Document\",\n KNOWBASE_TYPE => \"KnowbaseItem\",\n USER_TYPE => \"User\",\n TRACKING_TYPE => \"Ticket\",\n CONSUMABLEITEM_TYPE => \"ConsumableItem\",\n CONSUMABLE_TYPE => \"Consumable\",\n CARTRIDGE_TYPE => \"Cartridge\",\n SOFTWARELICENSE_TYPE => \"SoftwareLicense\",\n LINK_TYPE => \"Link\",\n STATE_TYPE => \"States\",\n PHONE_TYPE => \"Phone\",\n DEVICE_TYPE => \"Device\",\n REMINDER_TYPE => \"Reminder\",\n STAT_TYPE => \"Stat\",\n GROUP_TYPE => \"Group\",\n ENTITY_TYPE => \"Entity\",\n RESERVATION_TYPE => \"ReservationItem\",\n AUTHMAIL_TYPE => \"AuthMail\",\n AUTHLDAP_TYPE => \"AuthLDAP\",\n OCSNG_TYPE => \"OcsServer\",\n REGISTRY_TYPE => \"RegistryKey\",\n PROFILE_TYPE => \"Profile\",\n MAILGATE_TYPE => \"MailCollector\",\n RULE_TYPE => \"Rule\",\n TRANSFER_TYPE => \"Transfer\",\n BOOKMARK_TYPE => \"Bookmark\",\n SOFTWAREVERSION_TYPE => \"SoftwareVersion\",\n PLUGIN_TYPE => \"Plugin\",\n COMPUTERDISK_TYPE => \"ComputerDisk\",\n NETWORKING_PORT_TYPE => \"NetworkPort\",\n FOLLOWUP_TYPE => \"TicketFollowup\",\n BUDGET_TYPE => \"Budget\"];\n // End is not used in 0.72.x\n\n $devtypetoname = [MOBOARD_DEVICE => 'DeviceMotherboard',\n PROCESSOR_DEVICE => 'DeviceProcessor',\n RAM_DEVICE => 'DeviceMemory',\n HDD_DEVICE => 'DeviceHardDrive',\n NETWORK_DEVICE => 'DeviceNetworkCard',\n DRIVE_DEVICE => 'DeviceDrive',\n CONTROL_DEVICE => 'DeviceControl',\n GFX_DEVICE => 'DeviceGraphicCard',\n SND_DEVICE => 'DeviceSoundCard',\n PCI_DEVICE => 'DevicePci',\n CASE_DEVICE => 'DeviceCase',\n POWER_DEVICE => 'DevicePowerSupply'];\n\n $itemtype_tables = [\"glpi_alerts\", \"glpi_bookmarks\", \"glpi_bookmarks_users\",\n \"glpi_computers_items\", \"glpi_contracts_items\", \"glpi_displaypreferences\",\n \"glpi_documents_items\", \"glpi_infocoms\", \"glpi_links_itemtypes\",\n \"glpi_networkports\", \"glpi_reservationitems\", \"glpi_tickets\"];\n\n foreach ($itemtype_tables as $table) {\n $migration->displayMessage(sprintf(__('Data migration - %s'), \"$table\")); // Updating data\n // Alter itemtype field\n $query = \"ALTER TABLE `$table`\n CHANGE `itemtype` `itemtype` VARCHAR( 100 ) NOT NULL\";\n $DB->queryOrDie($query, \"0.78 alter itemtype of table $table\");\n\n // Update values\n foreach ($typetoname as $key => $val) {\n $query = \"UPDATE `$table`\n SET `itemtype` = '$val'\n WHERE `itemtype` = '$key'\";\n $DB->queryOrDie($query, \"0.78 update itemtype of table $table for $val\");\n }\n }\n\n if ($DB->fieldExists('glpi_logs', 'device_type', false)) {\n\n // History migration, handled separatly for optimization\n $migration->displayMessage(sprintf(__('Change of the database layout - %s'), 'glpi_logs - 1'));\n $query = \"ALTER TABLE `glpi_logs`\n CHANGE `ID` `id` INT( 11 ) NOT NULL AUTO_INCREMENT,\n ADD `itemtype` VARCHAR(100) NOT NULL DEFAULT '' AFTER `device_type`,\n ADD `items_id` INT( 11 ) NOT NULL DEFAULT '0' AFTER `itemtype`,\n ADD `itemtype_link` VARCHAR(100) NOT NULL DEFAULT '' AFTER `device_internal_type`,\n CHANGE `linked_action` `linked_action` INT( 11 ) NOT NULL DEFAULT '0'\n COMMENT 'see define.php HISTORY_* constant'\";\n $DB->queryOrDie($query, \"0.78 add item* fields to table glpi_logs\");\n\n // Update values\n $migration->displayMessage(sprintf(__('Data migration - %s'), 'glpi_logs'));\n\n // Copy data\n $query = \"UPDATE `glpi_logs`\n SET `itemtype` = `device_type`,\n `items_id` = `FK_glpi_device`,\n `itemtype_link` = `device_internal_type`\";\n $DB->queryOrDie($query, \"0.78 update glpi_logs default values\");\n\n foreach ($typetoname as $key => $val) {\n $query = \"UPDATE `glpi_logs`\n SET `itemtype` = '$val'\n WHERE `device_type` = '$key'\";\n $DB->queryOrDie($query, \"0.78 update itemtype of table glpi_logs for $val\");\n\n $query = \"UPDATE `glpi_logs`\n SET `itemtype_link` = '$val'\n WHERE `device_internal_type` = '$key'\n AND `linked_action` IN (\".Log::HISTORY_ADD_RELATION.\",\n \".Log::HISTORY_DEL_RELATION.\",\n \".Log::HISTORY_DISCONNECT_DEVICE.\",\n \".Log::HISTORY_CONNECT_DEVICE.\")\";\n $DB->queryOrDie($query, \"0.78 update itemtype of table glpi_logs for $val\");\n }\n\n foreach ($devtypetoname as $key => $val) {\n $query = \"UPDATE `glpi_logs`\n SET `itemtype_link` = '$val'\n WHERE `device_internal_type` = '$key'\n AND `linked_action` IN (\".Log::HISTORY_ADD_DEVICE.\",\n \".Log::HISTORY_UPDATE_DEVICE.\",\n \".Log::HISTORY_DELETE_DEVICE.\")\";\n $DB->queryOrDie($query, \"0.78 update itemtype of table glpi_logs for $val\");\n }\n\n // Clean link\n $query = \"UPDATE `glpi_logs`\n SET `itemtype_link` = ''\n WHERE `itemtype_link` = '0'\";\n $DB->queryOrDie($query, \"0.78 update itemtype of table glpi_logs\");\n\n $migration->displayMessage(sprintf(__('Change of the database layout - %s'), 'glpi_logs - 2'));\n $query = \"ALTER TABLE `glpi_logs`\n DROP `device_type`,\n DROP `FK_glpi_device`,\n DROP `device_internal_type`,\n ADD INDEX `itemtype_link` (`itemtype_link`),\n ADD INDEX `item` (`itemtype`,`items_id`)\";\n $DB->queryOrDie($query, \"0.78 drop device* fields to table glpi_logs\");\n }\n\n // Update glpi_profiles item_type\n\n $migration->displayMessage(sprintf(__('Change of the database layout - %s'),\n 'Clean DB: post actions after renaming'));\n\n if (!isIndex('glpi_locations', 'name')) {\n $query = \" ALTER TABLE `glpi_locations`\n ADD INDEX `name` (`name`)\";\n $DB->queryOrDie($query, \"0.78 add name index in glpi_locations\");\n }\n\n // Update values of mailcollectors\n $query = \"SELECT `default_mailcollector_filesize_max`\n FROM `glpi_configs`\n WHERE `id` = 1\";\n if ($result=$DB->query($query)) {\n if ($DB->numrows($result)>0) {\n $query = \"UPDATE `glpi_mailcollectors`\n SET `filesize_max` = '\".$DB->result($result, 0, 0).\"';\";\n $DB->query($query);\n }\n }\n\n // For compatibility with updates from past versions\n regenerateTreeCompleteName(\"glpi_locations\");\n regenerateTreeCompleteName(\"glpi_knowbaseitemcategories\");\n regenerateTreeCompleteName(\"glpi_ticketcategories\");\n\n // Update timezone values\n if ($DB->fieldExists('glpi_configs', 'time_offset', false)) {\n $query = \"UPDATE `glpi_configs`\n SET `time_offset` = `time_offset`*3600\";\n $DB->queryOrDie($query, \"0.78 update time_offset value in glpi_configs\");\n }\n\n if ($DB->fieldExists('glpi_authldaps', 'time_offset', false)) {\n $query = \"UPDATE `glpi_authldaps`\n SET `time_offset` = `time_offset`*3600\";\n $DB->queryOrDie($query, \"0.78 update time_offset value in glpi_authldaps\");\n }\n\n // Change defaults store values :\n if ($DB->fieldExists('glpi_softwares', 'sofwtares_id', false)) {\n $query = \"UPDATE `glpi_softwares`\n SET `sofwtares_id` = 0\n WHERE `sofwtares_id` < 0\";\n $DB->queryOrDie($query, \"0.78 update default value of sofwtares_id in glpi_softwares\");\n }\n\n if ($DB->fieldExists('glpi_users', 'authtype', false)) {\n $query = \"UPDATE `glpi_users`\n SET `authtype` = 0\n WHERE `authtype` < 0\";\n $DB->queryOrDie($query, \"0.78 update default value of authtype in glpi_users\");\n }\n\n if ($DB->fieldExists('glpi_users', 'auths_id', false)) {\n $query = \"UPDATE `glpi_users`\n SET `auths_id` = 0\n WHERE `auths_id` < 0\";\n $DB->queryOrDie($query, \"0.78 update default value of auths_id in glpi_users\");\n }\n\n // Update glpi_ocsadmininfoslinks table for new field name\n if ($DB->fieldExists('glpi_ocsadmininfoslinks', 'glpi_column', false)) {\n $query = \"UPDATE `glpi_ocsadmininfoslinks`\n SET `glpi_column` = 'locations_id'\n WHERE `glpi_column` = 'location'\";\n $DB->queryOrDie($query, \"0.78 update value of glpi_column in glpi_ocsadmininfoslinks\");\n\n $query = \"UPDATE `glpi_ocsadmininfoslinks`\n SET `glpi_column` = 'networks_id'\n WHERE `glpi_column` = 'network'\";\n $DB->queryOrDie($query, \"0.78 update value of glpi_column in glpi_ocsadmininfoslinks\");\n\n $query = \"UPDATE `glpi_ocsadmininfoslinks`\n SET `glpi_column` = 'groups_id'\n WHERE `glpi_column` = 'FK_groups'\";\n $DB->queryOrDie($query, \"0.78 update value of glpi_column in glpi_ocsadmininfoslinks\");\n }\n\n // Update bookmarks for new columns fields\n if ($DB->fieldExists('glpi_bookmarks', 'is_private', false)) {\n $query = \"UPDATE `glpi_bookmarks`\n SET `entities_id` = -1\n WHERE `is_private` = 1\";\n $DB->queryOrDie($query, \"0.78 update value of entities_id in glpi_bookmarks\");\n }\n if ($DB->fieldExists('glpi_reminders', 'is_private', false)) {\n $query = \"UPDATE `glpi_reminders`\n SET `entities_id` = -1\n WHERE `is_private` = 1\";\n $DB->queryOrDie($query, \"0.78 update value of entities_id in glpi_reminders\");\n }\n\n // Update bookmarks for new columns fields\n if ($DB->fieldExists('glpi_bookmarks', 'query', false)) {\n // All search\n $olds = [\"deleted\"];\n\n $news = [\"is_deleted\"];\n foreach ($olds as $key => $val) {\n $olds[$key] = \"/&$val=/\";\n }\n foreach ($news as $key => $val) {\n $news[$key] = \"/&$val=/\";\n }\n\n // Manage meta search\n foreach ($typetoname as $key => $val) {\n $olds[$key] = \"/&type2\\[(\\d+)\\]=$key/\";\n $news[$key] = \"&itemtype2[\\\\1]=$val\";\n }\n\n $query = \"SELECT `id`, `query`\n FROM `glpi_bookmarks`\n WHERE `type` = \".Bookmark::SEARCH.\" \";\n if ($result = $DB->query($query)) {\n if ($DB->numrows($result)>0) {\n while ($data = $DB->fetchAssoc($result)) {\n $query2 = \"UPDATE `glpi_bookmarks`\n SET `query` = '\".addslashes(preg_replace($olds, $news,\n $data['query'])).\"'\n WHERE `id` = \".$data['id'].\"\";\n $DB->queryOrDie($query2, \"0.78 update all bookmarks\");\n }\n }\n }\n\n // Update bookmarks due to FHS change\n $query2 = \"UPDATE `glpi_bookmarks`\n SET `path` = 'front/documenttype.php'\n WHERE `path` = 'front/typedoc.php'\";\n $DB->queryOrDie($query2, \"0.78 update typedoc bookmarks\");\n\n $query2 = \"UPDATE `glpi_bookmarks`\n SET `path` = 'front/consumableitem.php'\n WHERE `path` = 'front/consumable.php'\";\n $DB->queryOrDie($query2, \"0.78 update consumable bookmarks\");\n\n $query2 = \"UPDATE `glpi_bookmarks`\n SET `path` = 'front/cartridgeitem.php'\n WHERE `path` = 'front/cartridge.php'\";\n $DB->queryOrDie($query2, \"0.78 update cartridge bookmarks\");\n\n $query2 = \"UPDATE `glpi_bookmarks`\n SET `path` = 'front/ticket.php'\n WHERE `path` = 'front/tracking.php'\";\n $DB->queryOrDie($query2, \"0.78 update ticket bookmarks\");\n\n $query2 = \"UPDATE `glpi_bookmarks`\n SET `path` = 'front/mailcollector.php'\n WHERE `path` = 'front/mailgate.php'\";\n $DB->queryOrDie($query2, \"0.78 update mailcollector bookmarks\");\n\n $query2 = \"UPDATE `glpi_bookmarks`\n SET `path` = 'front/ocsserver.php'\n WHERE `path` = 'front/setup.ocsng.php'\";\n $DB->queryOrDie($query2, \"0.78 update ocsserver bookmarks\");\n\n $query2 = \"UPDATE `glpi_bookmarks`\n SET `path` = 'front/supplier.php'\n WHERE `path` = 'front/enterprise.php'\";\n $DB->queryOrDie($query2, \"0.78 update supplier bookmarks\");\n\n $query2 = \"UPDATE `glpi_bookmarks`\n SET `path` = 'front/networkequipment.php'\n WHERE `path` = 'front/networking.php'\";\n $DB->queryOrDie($query2, \"0.78 update networkequipment bookmarks\");\n\n $query2 = \"UPDATE `glpi_bookmarks`\n SET `path` = 'front/states.php'\n WHERE `path` = 'front/state.php'\";\n $DB->queryOrDie($query2, \"0.78 update states bookmarks\");\n }\n\n //// Upgrade rules datas\n $changes = [];\n // For Rule::RULE_AFFECT_RIGHTS\n $changes[1] = ['FK_entities' => 'entities_id',\n 'FK_profiles' => 'profiles_id',\n 'recursive' => 'is_recursive',\n 'active' => 'is_active'];\n // For Rule::RULE_DICTIONNARY_SOFTWARE\n $changes[4] = ['helpdesk_visible '=> 'is_helpdesk_visible'];\n // For Rule::RULE_OCS_AFFECT_COMPUTER\n $changes[0] = ['FK_entities' => 'entities_id'];\n // For Rule::RULE_SOFTWARE_CATEGORY\n $changes[3] = ['category' => 'softwarecategories_id',\n 'comment' => 'comment'];\n // For Rule::RULE_TRACKING_AUTO_ACTION\n $changes[2] = ['category' => 'ticketcategories_id',\n 'author' => 'users_id',\n 'author_location' => 'users_locations',\n 'FK_group' => 'groups_id',\n 'assign' => 'users_id_assign',\n 'assign_group' => 'groups_id_assign',\n 'device_type' => 'itemtype',\n 'FK_entities' => 'entities_id',\n 'contents' => 'content',\n 'request_type' => 'requesttypes_id'];\n\n $DB->query(\"SET SESSION group_concat_max_len = 9999999;\");\n foreach ($changes as $ruletype => $tab) {\n // Get rules\n $query = \"SELECT GROUP_CONCAT(`id`)\n FROM `glpi_rules`\n WHERE `sub_type` = \".$ruletype.\"\n GROUP BY `sub_type`\";\n if ($result = $DB->query($query)) {\n if ($DB->numrows($result)>0) {\n // Get rule string\n $rules=$DB->result($result, 0, 0);\n // Update actions\n foreach ($tab as $old => $new) {\n $query = \"UPDATE `glpi_ruleactions`\n SET `field` = '$new'\n WHERE `field` = '$old'\n AND `rules_id` IN ($rules);\";\n $DB->queryOrDie($query, \"0.78 update datas for rules actions\");\n }\n // Update criteria\n foreach ($tab as $old => $new) {\n $query = \"UPDATE `glpi_rulecriterias`\n SET `criteria` = '$new'\n WHERE `criteria` = '$old'\n AND `rules_id` IN ($rules);\";\n $DB->queryOrDie($query, \"0.78 update datas for rules criteria\");\n }\n }\n }\n }\n\n $migration->displayMessage(sprintf(__('Change of the database layout - %s'),\n 'glpi_rulecachesoftwares'));\n\n $query = \"ALTER TABLE `glpi_rules`\n CHANGE `sub_type` `sub_type` VARCHAR( 255 ) NOT NULL DEFAULT ''\";\n $DB->queryOrDie($query, \"0.78 change subtype from INT(11) to VARCHAR(255) in glpi_rules\");\n\n $subtypes = [0 => 'RuleOcs',\n 1 => 'RuleRight',\n 2 => 'RuleTicket',\n 3 => 'RuleSoftwareCategory',\n 4 => 'RuleDictionnarySoftware',\n 5 => 'RuleDictionnaryManufacturer',\n 6 => 'RuleDictionnaryComputerModel',\n 7 => 'RuleDictionnaryComputerType',\n 8 => 'RuleDictionnaryMonitorModel',\n 9 => 'RuleDictionnaryMonitorType',\n 10 => 'RuleDictionnaryPrinterModel',\n 11 => 'RuleDictionnaryPrinterType',\n 12 => 'RuleDictionnaryPhoneModel',\n 13 => 'RuleDictionnaryPhoneType',\n 14 => 'RuleDictionnaryPeripheralModel',\n 15 => 'RuleDictionnaryPeripheralType',\n 16 => 'RuleDictionnaryNetworkEquipmentModel',\n 17 => 'RuleDictionnaryNetworkEquipmentType',\n 18 => 'RuleDictionnaryOperatingSystem',\n 19 => 'RuleDictionnaryOperatingSystemServicePack',\n 20 => 'RuleDictionnaryOperatingSystemVersion',\n 21 => 'RuleMailCollector'];\n\n foreach ($subtypes as $old_subtype => $new_subtype) {\n $query = \"UPDATE `glpi_rules`\n SET `sub_type` = '$new_subtype'\n WHERE `sub_type` = '$old_subtype'\";\n $DB->queryOrDie($query, \"0.78 change sub_type $old_subtype in $new_subtype in glpi_rules\");\n }\n\n $DB->queryOrDie($query, \"0.78 update itemtypes in business rules\");\n //Update business rules itemtypes\n foreach ($typetoname as $key => $val) {\n if ($key != GENERAL_TYPE) {\n $query = \"UPDATE `glpi_rulecriterias`\n SET `pattern` = '$val'\n WHERE `pattern` = '$key'\n AND `criteria` = 'itemtype'\";\n $DB->queryOrDie($query, \"0.78 update itemtype for business rules for $val\");\n }\n }\n\n if ($DB->fieldExists(\"glpi_rulecachesoftwares\", \"ignore_ocs_import\", false)) {\n $query = \"ALTER TABLE `glpi_rulecachesoftwares`\n CHANGE `ignore_ocs_import` `ignore_ocs_import` CHAR( 1 ) NULL DEFAULT NULL \";\n $DB->queryOrDie($query, \"0.78 alter table glpi_rulecachesoftwares\");\n }\n\n if (!$DB->fieldExists(\"glpi_rulecachesoftwares\", \"is_helpdesk_visible\", false)) {\n $query = \"ALTER TABLE `glpi_rulecachesoftwares`\n ADD `is_helpdesk_visible` CHAR( 1 ) NULL \";\n $DB->queryOrDie($query, \"0.78 add is_helpdesk_visible in glpi_rulecachesoftwares\");\n }\n\n $migration->displayMessage(sprintf(__('Change of the database layout - %s'), 'glpi_entities'));\n\n if (!$DB->fieldExists(\"glpi_entities\", \"sons_cache\", false)) {\n $query = \"ALTER TABLE `glpi_entities`\n ADD `sons_cache` LONGTEXT NULL ; \";\n $DB->queryOrDie($query, \"0.78 add sons_cache field in glpi_entities\");\n }\n\n if (!$DB->fieldExists(\"glpi_entities\", \"ancestors_cache\", false)) {\n $query = \"ALTER TABLE `glpi_entities`\n ADD `ancestors_cache` LONGTEXT NULL ; \";\n $DB->queryOrDie($query, \"0.78 add ancestors_cache field in glpi_entities\");\n }\n\n $migration->displayMessage(sprintf(__('Change of the database layout - %s'), 'glpi_configs'));\n\n if (!$DB->fieldExists(\"glpi_configs\", \"default_graphtype\", false)) {\n $query = \"ALTER TABLE `glpi_configs`\n ADD `default_graphtype` char( 3 ) NOT NULL DEFAULT 'svg'\";\n $DB->queryOrDie($query, \"0.78 add default_graphtype in glpi_configs\");\n }\n\n if ($DB->fieldExists('glpi_configs', 'license_deglobalisation', false)) {\n $query = \"ALTER TABLE `glpi_configs`\n DROP `license_deglobalisation`;\";\n $DB->queryOrDie($query, \"0.78 alter clean glpi_configs table\");\n }\n\n if ($DB->fieldExists(\"glpi_configs\", \"use_cache\", false)) {\n $query = \"ALTER TABLE `glpi_configs`\n DROP `use_cache`;\";\n $DB->queryOrDie($query, \"0.78 drop use_cache in glpi_configs\");\n }\n\n if ($DB->fieldExists(\"glpi_configs\", \"cache_max_size\", false)) {\n $query = \"ALTER TABLE `glpi_configs`\n DROP `cache_max_size`;\";\n $DB->queryOrDie($query, \"0.78 drop cache_max_size in glpi_configs\");\n }\n\n if (!$DB->fieldExists(\"glpi_configs\", \"default_request_type\", false)) {\n $query = \"ALTER TABLE `glpi_configs`\n ADD `default_request_type` INT( 11 ) NOT NULL DEFAULT 1\";\n $DB->queryOrDie($query, \"0.78 add default_request_type in glpi_configs\");\n }\n\n if (!$DB->fieldExists(\"glpi_users\", \"default_request_type\", false)) {\n $query = \"ALTER TABLE `glpi_users`\n ADD `default_request_type` INT( 11 ) NULL\";\n $DB->queryOrDie($query, \"0.78 add default_request_type in glpi_users\");\n }\n\n if (!$DB->fieldExists(\"glpi_configs\", \"use_noright_users_add\", false)) {\n $query = \"ALTER TABLE `glpi_configs`\n ADD `use_noright_users_add` tinyint( 1 ) NOT NULL DEFAULT '1'\";\n $DB->queryOrDie($query, \"0.78 add use_noright_users_add in glpi_configs\");\n }\n\n $migration->displayMessage(sprintf(__('Change of the database layout - %s'), 'glpi_budgets'));\n\n if (!$DB->fieldExists(\"glpi_profiles\", \"budget\", false)) {\n $query = \"ALTER TABLE `glpi_profiles`\n ADD `budget` CHAR( 1 ) NULL \";\n $DB->queryOrDie($query, \"0.78 add budget in glpi_profiles\");\n\n $query = \"UPDATE `glpi_profiles`\n SET `budget` = `infocom`\";\n $DB->queryOrDie($query, \"0.78 update default budget rights\");\n\n }\n\n if (!$DB->fieldExists(\"glpi_budgets\", \"is_recursive\", false)) {\n $query = \"ALTER TABLE `glpi_budgets`\n ADD `is_recursive` tinyint(1) NOT NULL DEFAULT '0' AFTER `name`,\n ADD INDEX `is_recursive` (`is_recursive`)\";\n $DB->queryOrDie($query, \"0.78 add is_recursive field in glpi_budgets\");\n\n // budgets in 0.72 were global\n $query = \"UPDATE `glpi_budgets`\n SET `is_recursive` = '1';\";\n $DB->queryOrDie($query, \"0.78 set is_recursive to true in glpi_budgets\");\n }\n\n if (!$DB->fieldExists(\"glpi_budgets\", \"entities_id\", false)) {\n $query = \"ALTER TABLE `glpi_budgets`\n ADD `entities_id` int(11) NOT NULL default '0' AFTER `name`,\n ADD INDEX `entities_id` (`entities_id`);\";\n $DB->queryOrDie($query, \"0.78 add entities_id field in glpi_budgets\");\n }\n\n if (!$DB->fieldExists(\"glpi_budgets\", \"is_deleted\", false)) {\n $query = \"ALTER TABLE `glpi_budgets`\n ADD `is_deleted` tinyint(1) NOT NULL DEFAULT '0',\n ADD INDEX `is_deleted` (`is_deleted`)\";\n $DB->queryOrDie($query, \"0.78 add is_deleted field in glpi_budgets\");\n }\n\n if (!$DB->fieldExists(\"glpi_budgets\", \"begin_date\", false)) {\n $query = \"ALTER TABLE `glpi_budgets`\n ADD `begin_date` DATE NULL,\n ADD INDEX `begin_date` (`begin_date`)\";\n $DB->queryOrDie($query, \"0.78 add begin_date field in glpi_budgets\");\n }\n if (!$DB->fieldExists(\"glpi_budgets\", \"end_date\", false)) {\n $query = \"ALTER TABLE `glpi_budgets`\n ADD `end_date` DATE NULL,\n ADD INDEX `end_date` (`begin_date`)\";\n $DB->queryOrDie($query, \"0.78 add end_date field in glpi_budgets\");\n }\n if (!$DB->fieldExists(\"glpi_budgets\", \"value\", false)) {\n $query = \"ALTER TABLE `glpi_budgets`\n ADD `value` DECIMAL( 20, 4 ) NOT NULL default '0.0000'\";\n $DB->queryOrDie($query, \"0.78 add value field in glpi_budgets\");\n }\n if (!$DB->fieldExists(\"glpi_budgets\", \"is_template\", false)) {\n $query = \"ALTER TABLE `glpi_budgets`\n ADD `is_template` tinyint(1) NOT NULL default '0',\n ADD INDEX `is_template` (`is_template`);\";\n $DB->queryOrDie($query, \"0.78 add is_template field in glpi_budgets\");\n }\n\n if (!$DB->fieldExists(\"glpi_budgets\", \"template_name\", false)) {\n $query = \"ALTER TABLE `glpi_budgets`\n ADD `template_name` varchar(255) default NULL\";\n $DB->queryOrDie($query, \"0.78 add template_name field in glpi_budgets\");\n }\n\n if (!$DB->fieldExists(\"glpi_budgets\", \"date_mod\", false)) {\n $query = \"ALTER TABLE `glpi_budgets`\n ADD `date_mod` DATETIME NULL, ADD INDEX `date_mod` (`date_mod`)\";\n $DB->queryOrDie($query, \"0.78 add date_mod field in glpi_budgets\");\n }\n\n if (!$DB->fieldExists(\"glpi_budgets\", \"notepad\", false)) {\n $query = \"ALTER TABLE `glpi_budgets`\n ADD `notepad` LONGTEXT NULL collate utf8_unicode_ci\";\n $DB->queryOrDie($query, \"0.78 add notepad field in glpi_budgets\");\n }\n\n // Change budget search pref : date_mod\n $ADDTODISPLAYPREF['Budget']=[2,3,4,19];\n\n $migration->displayMessage(sprintf(__('Change of the database layout - %s'),\n __('Automatic action')));\n if (!$DB->tableExists('glpi_crontasks')) {\n $query = \"CREATE TABLE `glpi_crontasks` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `itemtype` varchar(100) COLLATE utf8_unicode_ci NOT NULL,\n `name` varchar(150) COLLATE utf8_unicode_ci NOT NULL COMMENT 'task name',\n `frequency` int(11) NOT NULL COMMENT 'second between launch',\n `param` int(11) DEFAULT NULL COMMENT 'task specify parameter',\n `state` int(11) NOT NULL DEFAULT '1' COMMENT '0:disabled, 1:waiting, 2:running',\n `mode` int(11) NOT NULL DEFAULT '1' COMMENT '1:internal, 2:external',\n `allowmode` int(11) NOT NULL DEFAULT '3' COMMENT '1:internal, 2:external, 3:both',\n `hourmin` int(11) NOT NULL DEFAULT '0',\n `hourmax` int(11) NOT NULL DEFAULT '24',\n `logs_lifetime` int(11) NOT NULL DEFAULT '30' COMMENT 'number of days',\n `lastrun` datetime DEFAULT NULL COMMENT 'last run date',\n `lastcode` int(11) DEFAULT NULL COMMENT 'last run return code',\n `comment` text COLLATE utf8_unicode_ci,\n PRIMARY KEY (`id`),\n UNIQUE KEY `unicity` (`itemtype`,`name`),\n KEY `mode` (`mode`)\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci\n COMMENT='Task run by internal / external cron.';\";\n $DB->queryOrDie($query, \"0.78 create glpi_crontasks\");\n\n $query = \"INSERT INTO `glpi_crontasks`\n (`itemtype`, `name`, `frequency`, `param`, `state`, `mode`, `allowmode`,\n `hourmin`, `hourmax`, `logs_lifetime`, `lastrun`, `lastcode`, `comment`)\n VALUES ('OcsServer', 'ocsng', 300, NULL, 1, 1, 3, 0, 24, 30, NULL, NULL, NULL),\n ('CartridgeItem', 'cartridge', 86400, 10, 0, 1, 3, 0, 24, 30, NULL, NULL,\n NULL),\n ('ConsumableItem', 'consumable', 86400, 10, 0, 1, 3, 0, 24, 30, NULL, NULL,\n NULL),\n ('SoftwareLicense', 'software', 86400, NULL, 0, 1, 3, 0, 24, 30, NULL, NULL,\n NULL),\n ('Contract', 'contract', 86400, NULL, 1, 1, 3, 0, 24, 30, NULL, NULL, NULL),\n ('InfoCom', 'infocom', 86400, NULL, 1, 1, 3, 0, 24, 30, NULL, NULL, NULL),\n ('CronTask', 'logs', 86400, 10, 1, 1, 3, 0, 24, 30, NULL, NULL, NULL),\n ('CronTask', 'optimize', 604800, NULL, 1, 1, 3, 0, 24, 30, NULL, NULL, NULL),\n ('MailCollector', 'mailgate', 600, 10, 1, 1, 3, 0, 24, 30, NULL, NULL, NULL),\n ('DBconnection', 'checkdbreplicate', 300, NULL, 0, 1, 3, 0, 24, 30, NULL, NULL, NULL),\n ('CronTask', 'checkupdate', 604800, NULL, 0, 1, 3, 0, 24, 30, NULL, NULL, NULL),\n ('CronTask', 'session', 86400, NULL, 1, 1, 3, 0, 24, 30, NULL, NULL, NULL),\n ('CronTask', 'graph', 3600, NULL, 1, 1, 3, 0, 24, 30, NULL, NULL, NULL),\n ('ReservationItem', 'reservation', 3600, NULL, 1, 1, 3, 0, 24, 30, NULL,\n NULL, NULL),\n ('Ticket', 'closeticket', '43200', NULL, '1', '1', '3', '0', '24', '30',\n NULL, NULL, NULL),\n ('Ticket', 'alertnotclosed', '43200', NULL, '1', '1', '3', '0', '24', '30',\n NULL, NULL, NULL)\";\n $DB->queryOrDie($query, \"0.78 populate glpi_crontasks\");\n\n }\n $ADDTODISPLAYPREF['Crontask'] = [8, 3, 4, 7];\n\n if (!$DB->tableExists('glpi_crontasklogs')) {\n $query = \"CREATE TABLE `glpi_crontasklogs` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `crontasks_id` int(11) NOT NULL,\n `crontasklogs_id` int(11) NOT NULL COMMENT 'id of ''start'' event',\n `date` datetime NOT NULL,\n `state` int(11) NOT NULL COMMENT '0:start, 1:run, 2:stop',\n `elapsed` float NOT NULL COMMENT 'time elapsed since start',\n `volume` int(11) NOT NULL COMMENT 'for statistics',\n `content` varchar(255) COLLATE utf8_unicode_ci NULL COMMENT 'message',\n PRIMARY KEY (`id`),\n KEY `date` (`date`),\n KEY `crontasks_id` (`crontasks_id`),\n KEY `crontasklogs_id_state` (`crontasklogs_id`,`state`)\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;\";\n $DB->queryOrDie($query, \"0.78 create glpi_crontasklogs\");\n }\n // Retrieve core task lastrun date\n $tasks = ['ocsng', 'cartridge', 'consumable', 'software', 'contract', 'infocom', 'logs',\n 'optimize', 'mailgate', 'DBConnection', 'check_update', 'session'];\n foreach ($tasks as $task) {\n $lock=GLPI_CRON_DIR. '/' . $task . '.lock';\n if (is_readable($lock) && $stat=stat($lock)) {\n $DB->query(\"UPDATE `glpi_crontasks`\n SET `lastrun` = '\".date('Y-m-d H:i:s', $stat['mtime']).\"'\n WHERE `name` = '$task'\");\n unlink($lock);\n }\n }\n // Clean plugin lock\n foreach (glob(GLPI_CRON_DIR. '/*.lock') as $lock) {\n unlink($lock);\n }\n\n // disable ocsng cron if not activate\n if ($DB->fieldExists('glpi_configs', 'use_ocs_mode', false)) {\n $query = \"SELECT `use_ocs_mode`\n FROM `glpi_configs`\n WHERE `id` = 1\";\n if ($result=$DB->query($query)) {\n if ($DB->numrows($result)>0) {\n $value = $DB->result($result, 0, 0);\n if ($value==0) {\n $query = \"UPDATE `glpi_crontasks`\n SET `state`='0'\n WHERE `name` = 'ocsng'\";\n $DB->query($query);\n }\n }\n }\n }\n\n // Move glpi_config.expire_events to glpi_crontasks.param\n if ($DB->fieldExists('glpi_configs', 'expire_events', false)) {\n $query = \"SELECT `expire_events`\n FROM `glpi_configs`\n WHERE `id` = 1\";\n if ($result=$DB->query($query)) {\n if ($DB->numrows($result)>0) {\n $value = $DB->result($result, 0, 0);\n if ($value>0) {\n $query = \"UPDATE `glpi_crontasks`\n SET `state` = '1',\n `param` = '$value'\n WHERE `name` = 'logs'\";\n } else {\n $query = \"UPDATE `glpi_crontasks`\n SET `state` = '0'\n WHERE `name` = 'logs'\";\n }\n $DB->query($query);\n }\n }\n $query = \"ALTER TABLE `glpi_configs`\n DROP `expire_events`\";\n $DB->queryOrDie($query, \"0.78 drop expire_events in glpi_configs\");\n }\n\n // Move glpi_config.auto_update_check to glpi_crontasks.state\n if ($DB->fieldExists('glpi_configs', 'auto_update_check', false)) {\n $query = \"SELECT `auto_update_check`\n FROM `glpi_configs`\n WHERE `id` = 1\";\n if ($result=$DB->query($query)) {\n if ($DB->numrows($result)>0) {\n $value = $DB->result($result, 0, 0);\n if ($value>0) {\n $value *= DAY_TIMESTAMP;\n $query = \"UPDATE `glpi_crontasks`\n SET `state` = '1',\n `frequency` = '$value'\n WHERE `name` = 'check_update'\";\n } else {\n $query = \"UPDATE `glpi_crontasks`\n SET `state` = '0'\n WHERE `name` = 'logs'\";\n }\n $DB->query($query);\n }\n }\n $query = \"ALTER TABLE `glpi_configs`\n DROP `auto_update_check`\";\n $DB->queryOrDie($query, \"0.78 drop auto_update_check in check_update\");\n }\n\n if ($DB->fieldExists('glpi_configs', 'dbreplicate_maxdelay', false)) {\n $query = \"SELECT `dbreplicate_maxdelay`\n FROM `glpi_configs`\n WHERE `id` = 1\";\n if ($result=$DB->query($query)) {\n if ($DB->numrows($result)>0) {\n $value = $DB->result($result, 0, 0);\n $value = intval($value/60);\n $query = \"UPDATE `glpi_crontasks`\n SET `state` = '1',\n `frequency` = '$value'\n WHERE `name` = 'check_dbreplicate'\";\n $DB->query($query);\n }\n }\n $query = \"ALTER TABLE `glpi_configs`\n DROP `dbreplicate_maxdelay`\";\n $DB->queryOrDie($query, \"0.78 drop dbreplicate_maxdelay in check_update\");\n }\n\n if ($DB->fieldExists('glpi_configs', 'dbreplicate_notify_desynchronization', false)) {\n $query = \"ALTER TABLE `glpi_configs`\n DROP `dbreplicate_notify_desynchronization`\";\n $DB->queryOrDie($query, \"0.78 drop dbreplicate_notify_desynchronization in check_update\");\n }\n\n if (!$DB->fieldExists('glpi_configs', 'cron_limit', false)) {\n $query = \"ALTER TABLE `glpi_configs`\n ADD `cron_limit` TINYINT NOT NULL DEFAULT '1'\n COMMENT 'Number of tasks execute by external cron'\";\n $DB->queryOrDie($query, \"0.78 add cron_limit in glpi_configs\");\n }\n\n if (!$DB->fieldExists('glpi_documents', 'sha1sum', false)) {\n $query = \"ALTER TABLE `glpi_documents`\n ADD `sha1sum` CHAR(40) NULL DEFAULT NULL ,\n ADD INDEX `sha1sum` (`sha1sum`)\";\n $DB->queryOrDie($query, \"0.78 add sha1sum in glpi_documents\");\n }\n\n if ($DB->fieldExists('glpi_documents', 'filename', false)) {\n $query = \"ALTER TABLE `glpi_documents`\n CHANGE `filename` `filename` VARCHAR( 255 ) NULL DEFAULT NULL\n COMMENT 'for display and transfert'\";\n $DB->queryOrDie($query, \"0.78 alter filename in glpi_documents\");\n }\n\n if (!$DB->fieldExists('glpi_documents', 'filepath', false)) {\n $query = \"ALTER TABLE `glpi_documents`\n ADD `filepath` VARCHAR( 255 ) NULL\n COMMENT 'file storage path' AFTER `filename`\";\n $DB->queryOrDie($query, \"0.78 add filepath in glpi_documents\");\n\n $query = \"UPDATE `glpi_documents`\n SET `filepath` = `filename`\";\n $DB->queryOrDie($query, \"0.78 set value of filepath in glpi_documents\");\n }\n\n $migration->displayMessage(sprintf(__('Change of the database layout - %s'), 'Category of tickets'));\n\n if (!$DB->fieldExists('glpi_tickets', 'solvedate', false)) {\n $query = \"ALTER TABLE `glpi_tickets`\n ADD `solvedate` datetime default NULL AFTER `closedate`,\n ADD INDEX `solvedate` (`solvedate`)\";\n $DB->queryOrDie($query, \"0.78 add solvedate to glpi_tickets\");\n\n $query = \"UPDATE `glpi_tickets`\n SET `solvedate` = `closedate`\";\n $DB->queryOrDie($query, \"0.78 update solvedate values in glpi_tickets\");\n }\n\n if (!$DB->fieldExists('glpi_ticketcategories', 'entities_id', false)) {\n $query = \"ALTER TABLE `glpi_ticketcategories`\n ADD `entities_id` INT NOT NULL DEFAULT '0' AFTER `id`,\n ADD `is_recursive` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `entities_id`,\n ADD INDEX `entities_id` (`entities_id`),\n ADD INDEX `is_recursive` (`is_recursive`)\";\n $DB->queryOrDie($query, \"0.78 add entities_id,is_recursive in glpi_ticketcategories \");\n\n // Set existing categories recursive global\n $query = \"UPDATE `glpi_ticketcategories`\n SET `is_recursive` = '1'\";\n $DB->queryOrDie($query, \"0.78 set value of is_recursive in glpi_ticketcategories\");\n }\n\n if (!$DB->fieldExists('glpi_ticketcategories', 'knowbaseitemcategories_id', false)) {\n $query = \"ALTER TABLE `glpi_ticketcategories`\n ADD `knowbaseitemcategories_id` INT NOT NULL DEFAULT '0',\n ADD INDEX `knowbaseitemcategories_id` ( `knowbaseitemcategories_id` )\";\n\n $DB->queryOrDie($query, \"0.78 add knowbaseitemcategories_id in glpi_ticketcategories\");\n }\n\n if (!$DB->fieldExists('glpi_ticketcategories', 'users_id', false)) {\n $query = \"ALTER TABLE `glpi_ticketcategories`\n ADD `users_id` INT NOT NULL DEFAULT '0',\n ADD INDEX `users_id` ( `users_id` ) \";\n\n $DB->queryOrDie($query, \"0.78 add users_id in glpi_ticketcategories\");\n }\n\n if (!$DB->fieldExists('glpi_ticketcategories', 'groups_id', false)) {\n $query = \"ALTER TABLE `glpi_ticketcategories`\n ADD `groups_id` INT NOT NULL DEFAULT '0',\n ADD INDEX `groups_id` ( `groups_id` ) \";\n\n $DB->queryOrDie($query, \"0.78 add groups_id in glpi_ticketcategories\");\n }\n\n if (!$DB->fieldExists('glpi_ticketcategories', 'ancestors_cache', false)) {\n $query = \"ALTER TABLE `glpi_ticketcategories`\n ADD `ancestors_cache` LONGTEXT NULL,\n ADD `sons_cache` LONGTEXT NULL\";\n\n $DB->queryOrDie($query, \"0.78 add cache in glpi_ticketcategories\");\n }\n\n if (!$DB->fieldExists('glpi_ticketcategories', 'is_helpdeskvisible', false)) {\n $query = \"ALTER TABLE `glpi_ticketcategories`\n ADD `is_helpdeskvisible` TINYINT( 1 ) NOT NULL DEFAULT '1',\n ADD INDEX `is_helpdeskvisible` (`is_helpdeskvisible`)\";\n\n $DB->queryOrDie($query, \"0.78 add cache in glpi_ticketcategories\");\n }\n\n // change item type management for helpdesk\n if ($DB->fieldExists('glpi_profiles', 'helpdesk_hardware_type', false)) {\n $query = \"ALTER TABLE `glpi_profiles`\n ADD `helpdesk_item_type` TEXT NULL DEFAULT NULL AFTER `helpdesk_hardware_type`\";\n $DB->queryOrDie($query, \"0.78 add helpdesk_item_type in glpi_profiles\");\n\n $query = \"SELECT `id`, `helpdesk_hardware_type`\n FROM `glpi_profiles`\";\n if ($result=$DB->query($query)) {\n if ($DB->numrows($result)>0) {\n while ($data=$DB->fetchAssoc($result)) {\n $types = $data['helpdesk_hardware_type'];\n $CFG_GLPI[\"ticket_types\"] = [COMPUTER_TYPE, NETWORKING_TYPE, PRINTER_TYPE,\n MONITOR_TYPE, PERIPHERAL_TYPE, SOFTWARE_TYPE,\n PHONE_TYPE];\n $tostore = [];\n\n foreach ($CFG_GLPI[\"ticket_types\"] as $itemtype) {\n if (pow(2, $itemtype)&$types) {\n $tostore[] = $typetoname[$itemtype];\n }\n }\n $query = \"UPDATE `glpi_profiles`\n SET `helpdesk_item_type` = '\".exportArrayToDB($tostore).\"'\n WHERE `id` = '\".$data['id'].\"'\";\n\n $DB->queryOrDie($query, \"0.78 populate helpdesk_item_type\");\n }\n }\n }\n $query = \"ALTER TABLE `glpi_profiles`\n DROP `helpdesk_hardware_type`;\";\n $DB->queryOrDie($query, \"0.78 drop helpdesk_hardware_type in glpi_profiles\");\n\n }\n\n if (!$DB->fieldExists('glpi_profiles', 'helpdesk_status', false)) {\n $query = \"ALTER TABLE `glpi_profiles`\n ADD `helpdesk_status` TEXT NULL\n COMMENT 'json encoded array of from/dest allowed status change'\n AFTER `helpdesk_item_type`\";\n $DB->queryOrDie($query, \"0.78 add helpdesk_status in glpi_profiles\");\n }\n\n if (!$DB->fieldExists('glpi_profiles', 'update_priority', false)) {\n $query = \"ALTER TABLE `glpi_profiles`\n ADD `update_priority` CHAR( 1 ) NULL DEFAULT NULL AFTER `update_ticket`\";\n $DB->queryOrDie($query, \"0.78 add update_priority in glpi_profiles\");\n\n $query = \"UPDATE `glpi_profiles`\n SET `update_priority` = `update_ticket`\";\n\n $DB->queryOrDie($query, \"0.78 set update_priority in glpi_profiles\");\n }\n\n if ($DB->fieldExists('glpi_profiles', 'comment_ticket', false)) {\n $query = \"ALTER TABLE `glpi_profiles`\n CHANGE `comment_ticket` `add_followups` CHAR(1) NULL DEFAULT NULL\";\n\n $DB->queryOrDie($query, \"0.78 add add_followups in glpi_profiles\");\n }\n\n if ($DB->fieldExists('glpi_profiles', 'comment_all_ticket', false)) {\n $query = \"ALTER TABLE `glpi_profiles`\n CHANGE `comment_all_ticket` `global_add_followups` CHAR(1) NULL DEFAULT NULL\";\n\n $DB->queryOrDie($query, \"0.78 add add_followups in glpi_profiles\");\n }\n\n if (!$DB->fieldExists('glpi_profiles', 'update_tasks', false)) {\n $query = \"ALTER TABLE `glpi_profiles`\n ADD `global_add_tasks` CHAR( 1 ) NULL AFTER `global_add_followups`,\n ADD `update_tasks` CHAR( 1 ) NULL AFTER `update_followups`\";\n\n $DB->queryOrDie($query, \"0.78 add global_add_tasks, update_tasks in glpi_profiles\");\n\n $query = \"UPDATE `glpi_profiles`\n SET `update_tasks` = `update_followups`,\n `global_add_tasks` = `global_add_followups`\";\n\n $DB->queryOrDie($query, \"0.78 set update_tasks, global_add_tasks in glpi_profiles\");\n }\n\n if (!$DB->tableExists('glpi_taskcategories')) {\n $query = \"CREATE TABLE `glpi_taskcategories` (\n `id` int(11) NOT NULL auto_increment,\n `entities_id` int(11) NOT NULL default '0',\n `is_recursive` tinyint(1) NOT NULL default '0',\n `taskcategories_id` int(11) NOT NULL default '0',\n `name` varchar(255) default NULL,\n `completename` text,\n `comment` text,\n `level` int(11) NOT NULL default '0',\n `ancestors_cache` longtext,\n `sons_cache` longtext,\n `is_helpdeskvisible` tinyint(1) NOT NULL default '1',\n PRIMARY KEY (`id`),\n KEY `name` (`name`),\n KEY `taskcategories_id` (`taskcategories_id`),\n KEY `entities_id` (`entities_id`),\n KEY `is_recursive` (`is_recursive`),\n KEY `is_helpdeskvisible` (`is_helpdeskvisible`)\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci\";\n $DB->queryOrDie($query, \"0.78 create glpi_taskcategories\");\n }\n\n if (!$DB->tableExists('glpi_ticketsolutiontypes')) {\n $query = \"CREATE TABLE `glpi_ticketsolutiontypes` (\n `id` int(11) NOT NULL auto_increment,\n `name` varchar(255) default NULL,\n `comment` text,\n PRIMARY KEY (`id`),\n KEY `name` (`name`)\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci\";\n $DB->queryOrDie($query, \"0.78 create glpi_ticketsolutiontypes\");\n\n // Populate only required for migration of ticket status\n $query = \"INSERT INTO `glpi_ticketsolutiontypes`\n (`id` ,`name` ,`comment`)\n VALUES ('1', 'Closed (solved)', NULL),\n ('2', 'Closed (not solved)', NULL)\";\n $DB->queryOrDie($query, \"0.78 populate glpi_ticketsolutiontypes\");\n }\n\n if (!$DB->fieldExists('glpi_tickets', 'solution', false)) {\n $query = \"ALTER TABLE `glpi_tickets`\n ADD `ticketsolutiontypes_id` INT( 11 ) NOT NULL DEFAULT '0',\n ADD `solution` TEXT NULL\";\n $DB->queryOrDie($query, \"0.78 create glpi_ticketsolutions\");\n\n $query = \"ALTER TABLE `glpi_tickets`\n ADD INDEX `ticketsolutiontypes_id` ( `ticketsolutiontypes_id` ) \";\n $DB->queryOrDie($query, \"0.78 add key for glpi_ticketsolutions\");\n\n // Move old status \"old_done\"\", \"old_notdone\" as solution\n // and change to new \"solved\" / \"closed\" status\n $query = \"UPDATE `glpi_tickets`\n SET `ticketsolutiontypes_id` = '2',\n `status` = 'closed'\n WHERE `status` = 'old_done'\";\n $DB->queryOrDie($query, \"0.78 migration of glpi_tickets status\");\n\n $query = \"UPDATE `glpi_tickets`\n SET `ticketsolutiontypes_id` = '1',\n `status` = 'closed'\n WHERE `status` = 'old_notdone'\";\n $DB->queryOrDie($query, \"0.78 migration of glpi_tickets status\");\n }\n\n if (!$DB->fieldExists('glpi_documenttypes', 'comment', false)) {\n $query = \"ALTER TABLE `glpi_documenttypes`\n ADD `comment` TEXT NULL \";\n\n $DB->queryOrDie($query, \"0.78 add comment in glpi_documenttypes\");\n }\n\n if (!$DB->fieldExists('glpi_locations', 'is_recursive', false)) {\n $query = \"ALTER TABLE `glpi_locations`\n ADD `is_recursive` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `entities_id`,\n ADD `ancestors_cache` LONGTEXT NULL,\n ADD `sons_cache` LONGTEXT NULL,\n ADD INDEX `is_recursive` (`is_recursive`)\";\n\n $DB->queryOrDie($query, \"0.78 add recursive, cache in glpi_locations\");\n }\n if (!$DB->fieldExists('glpi_locations', 'building', false)) {\n $query = \"ALTER TABLE `glpi_locations`\n ADD `building` VARCHAR( 255 ) NULL ,\n ADD `room` VARCHAR( 255 ) NULL \";\n\n $DB->queryOrDie($query, \"0.78 add building, room in glpi_locations\");\n }\n\n if (!$DB->tableExists('glpi_requesttypes')) {\n $query=\"CREATE TABLE `glpi_requesttypes` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,\n `is_helpdesk_default` tinyint(1) NOT NULL DEFAULT '0',\n `is_mail_default` tinyint(1) NOT NULL DEFAULT '0',\n `comment` text COLLATE utf8_unicode_ci,\n PRIMARY KEY (`id`),\n KEY `name` (`name`),\n KEY `is_helpdesk_default` (`is_helpdesk_default`),\n KEY `is_mail_default` (`is_mail_default`)\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci\";\n $DB->queryOrDie($query, \"0.78 create glpi_requesttypes\");\n\n $DB->query(\"INSERT INTO `glpi_requesttypes`\n VALUES(1, '\".addslashes(__('Simplified interface')).\"', 1, 0, NULL)\");\n $DB->query(\"INSERT INTO `glpi_requesttypes`\n VALUES(2, '\".addslashes(__('Email')).\"', 0, 1, NULL)\");\n $DB->query(\"INSERT INTO `glpi_requesttypes`\n VALUES(3, '\".addslashes(__('Phone')).\"', 0, 0, NULL)\");\n $DB->query(\"INSERT INTO `glpi_requesttypes`\n VALUES(4, '\".addslashes(__('Direct')).\"', 0, 0, NULL)\");\n $DB->query(\"INSERT INTO `glpi_requesttypes`\n VALUES(5, '\".addslashes(__('Written')).\"', 0, 0, NULL)\");\n $DB->query(\"INSERT INTO `glpi_requesttypes`\n VALUES(6, '\".addslashes(__('Other')).\"', 0, 0, NULL)\");\n }\n // Add default display\n $ADDTODISPLAYPREF['RequestType'] = [14, 15];\n\n if ($DB->fieldExists('glpi_tickets', 'request_type', false)) {\n $query = \"ALTER TABLE `glpi_tickets`\n CHANGE `request_type` `requesttypes_id` INT( 11 ) NOT NULL DEFAULT '0'\";\n\n $DB->queryOrDie($query, \"0.78 change requesttypes_id in glpi_tickets\");\n }\n if ($DB->fieldExists('glpi_configs', 'default_request_type', false)) {\n $query = \"ALTER TABLE `glpi_configs`\n CHANGE `default_request_type` `default_requesttypes_id` INT( 11 ) NOT NULL\n DEFAULT '1'\";\n\n $DB->queryOrDie($query, \"0.78 change requesttypes_id in glpi_configs\");\n }\n if ($DB->fieldExists('glpi_users', 'default_request_type', false)) {\n $query = \"ALTER TABLE `glpi_users`\n CHANGE `default_request_type` `default_requesttypes_id` INT( 11 ) NULL DEFAULT NULL\";\n\n $DB->queryOrDie($query, \"0.78 change requesttypes_id in glpi_users\");\n }\n\n if (!$DB->fieldExists('glpi_groups', 'date_mod', false)) {\n $query = \"ALTER TABLE `glpi_groups`\n ADD `date_mod` DATETIME NULL, ADD INDEX `date_mod` (`date_mod`)\";\n\n $DB->queryOrDie($query, \"0.78 add date_mod to glpi_groups\");\n }\n\n if (!$DB->fieldExists(\"glpi_configs\", \"priority_matrix\", false)) {\n $query = \"ALTER TABLE `glpi_configs`\n ADD `priority_matrix` VARCHAR( 255 ) NULL\n COMMENT 'json encoded array for Urgence / Impact to Protority'\";\n $DB->queryOrDie($query, \"0.78 add priority_matrix in glpi_configs\");\n\n $matrix = [1 => [1 => 1,\n 2 => 1,\n 3 => 2,\n 4 => 2,\n 4 => 2,\n 5 => 2],\n 2 => [1 => 1,\n 2 => 2,\n 3 => 2,\n 4 => 3,\n 4 => 3,\n 5 => 3],\n 3 => [1 => 2,\n 2 => 2,\n 3 => 3,\n 4 => 4,\n 4 => 4,\n 5 => 4],\n 4 => [1 => 2,\n 2 => 3,\n 3 => 4,\n 4 => 4,\n 4 => 4,\n 5 => 5],\n 5 => [1 => 2,\n 2 => 3,\n 3 => 4,\n 4 => 5,\n 4 => 5,\n 5 => 5]];\n $matrix = exportArrayToDB($matrix);\n $query = \"UPDATE `glpi_configs`\n SET `priority_matrix` = '$matrix'\n WHERE `id` = '1'\";\n $DB->queryOrDie($query, \"0.78 set default priority_matrix in glpi_configs\");\n }\n\n if (!$DB->fieldExists(\"glpi_configs\", \"urgency_mask\", false)) {\n $query = \"ALTER TABLE `glpi_configs`\n ADD `urgency_mask` INT( 11 ) NOT NULL DEFAULT '62',\n ADD `impact_mask` INT( 11 ) NOT NULL DEFAULT '62'\";\n $DB->queryOrDie($query, \"0.78 add urgency/impact_mask in glpi_configs\");\n }\n\n if (!$DB->fieldExists(\"glpi_users\", \"priority_6\", false)) {\n $query = \"ALTER TABLE `glpi_users`\n ADD `priority_6` CHAR( 20 ) NULL DEFAULT NULL AFTER `priority_5`\";\n $DB->queryOrDie($query, \"0.78 add priority_6 in glpi_users\");\n }\n\n if (!$DB->fieldExists(\"glpi_configs\", \"priority_6\", false)) {\n $query = \"ALTER TABLE `glpi_configs`\n ADD `priority_6` CHAR( 20 ) NOT NULL DEFAULT '#ff5555' AFTER `priority_5`\";\n $DB->queryOrDie($query, \"0.78 add priority_6 in glpi_configs\");\n }\n\n if (!$DB->fieldExists('glpi_tickets', 'urgency', false)) {\n $query = \"ALTER TABLE `glpi_tickets`\n ADD `urgency` INT NOT NULL DEFAULT '1' AFTER `content`,\n ADD `impact` INT NOT NULL DEFAULT '1' AFTER `urgency`,\n ADD INDEX `urgency` (`urgency`),\n ADD INDEX `impact` (`impact`)\";\n $DB->queryOrDie($query, \"0.78 add urgency, impact to glpi_tickets\");\n\n // set default trivial values for Impact and Urgence\n $query = \"UPDATE `glpi_tickets`\n SET `urgency` = `priority`,\n `impact` = `priority`\";\n $DB->queryOrDie($query, \"0.78 set urgency, impact in glpi_tickets\");\n\n // Replace 'priority' (user choice un 0.72) by 'urgency' as criteria\n // Don't change \"action\" which is the result of user+tech evaluation.\n $query = \"UPDATE `glpi_rulecriterias`\n SET `criteria`='urgency'\n WHERE `criteria`='priority'\n AND `rules_id` IN (SELECT `id`\n FROM `glpi_rules`\n WHERE `sub_type` = 'RuleTicket')\";\n $DB->queryOrDie($query, \"0.78 fix priority/urgency in business rules\");\n }\n\n if (!$DB->tableExists('glpi_tickettasks')) {\n $query = \"CREATE TABLE `glpi_tickettasks` (\n `id` int(11) NOT NULL auto_increment,\n `tickets_id` int(11) NOT NULL default '0',\n `taskcategories_id` int(11) NOT NULL default '0',\n `date` datetime default NULL,\n `users_id` int(11) NOT NULL default '0',\n `content` longtext collate utf8_unicode_ci,\n `is_private` tinyint(1) NOT NULL default '0',\n `realtime` float NOT NULL default '0',\n PRIMARY KEY (`id`),\n KEY `date` (`date`),\n KEY `users_id` (`users_id`),\n KEY `tickets_id` (`tickets_id`),\n KEY `is_private` (`is_private`),\n KEY `taskcategories_id` (`taskcategories_id`)\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci\";\n $DB->queryOrDie($query, \"0.78 create glpi_tickettasks\");\n\n // Required for migration from ticketfollowups to tickettasks - planned followups\n $query = \"INSERT INTO `glpi_tickettasks`\n (`id`, `tickets_id`, `date`, `users_id`, `content`, `is_private`, `realtime`)\n SELECT `glpi_ticketfollowups`.`id`,\n `glpi_ticketfollowups`.`tickets_id`,\n `glpi_ticketfollowups`.`date`,\n `glpi_ticketfollowups`.`users_id`,\n `glpi_ticketfollowups`.`content`,\n `glpi_ticketfollowups`.`is_private`,\n `glpi_ticketfollowups`.`realtime`\n FROM `glpi_ticketfollowups`\n INNER JOIN `glpi_ticketplannings`\n ON (`glpi_ticketplannings`.`ticketfollowups_id` = `glpi_ticketfollowups`.`id`)\";\n $DB->queryOrDie($query, \"0.78 populate glpi_tickettasks\");\n\n // delete from ticketfollowups - planned followups, previously copied\n $query = \"DELETE FROM `glpi_ticketfollowups`\n WHERE `glpi_ticketfollowups`.`id`\n IN (SELECT `glpi_ticketplannings`.`ticketfollowups_id`\n FROM `glpi_ticketplannings`)\";\n $DB->queryOrDie($query, \"0.78 delete from glpi_ticketfollowups\");\n\n // Required for migration from ticketfollowups to tickettasks - followups with a duration\n $query = \"INSERT INTO `glpi_tickettasks`\n (`id`, `tickets_id`, `date`, `users_id`, `content`, `is_private`, `realtime`)\n SELECT `glpi_ticketfollowups`.`id`,\n `glpi_ticketfollowups`.`tickets_id`,\n `glpi_ticketfollowups`.`date`,\n `glpi_ticketfollowups`.`users_id`,\n `glpi_ticketfollowups`.`content`,\n `glpi_ticketfollowups`.`is_private`,\n `glpi_ticketfollowups`.`realtime`\n FROM `glpi_ticketfollowups`\n WHERE `realtime`>0\";\n $DB->queryOrDie($query, \"0.78 populate glpi_tickettasks\");\n\n // delete from ticketfollowups - followups with duration, previously copied\n $query = \"DELETE FROM `glpi_ticketfollowups`\n WHERE `realtime` > 0\";\n $DB->queryOrDie($query, \"0.78 delete from glpi_ticketfollowups\");\n\n // ticketplannings is for tickettasks\n $query = \"ALTER TABLE `glpi_ticketplannings`\n CHANGE `ticketfollowups_id` `tickettasks_id` int(11) NOT NULL default '0'\";\n $DB->queryOrDie($query, \"0.78 alter glpi_ticketplannings\");\n\n // add requesttype for glpi_ticketfollowups\n $query = \"ALTER TABLE `glpi_ticketfollowups`\n DROP `realtime`,\n ADD `requesttypes_id` int(11) NOT NULL default '0',\n ADD INDEX `requesttypes_id` (`requesttypes_id`)\";\n $DB->queryOrDie($query, \"0.78 alter glpi_ticketplannings\");\n }\n\n // Migrate devices\n if ($DB->tableExists('glpi_computer_device')) {\n $migration->displayMessage(sprintf(__('Change of the database layout - %s'),\n _n('Component', 'Components', 2)));\n\n foreach ($devtypetoname as $key => $itemtype) {\n $migration->displayMessage(sprintf(__('Change of the database layout - %s'),\n $itemtype));\n $linktype = \"Computer_$itemtype\";\n $linktable = getTableForItemType($linktype);\n $itemtable = getTableForItemType($itemtype);\n $fkname = getForeignKeyFieldForTable($itemtable);\n $withspecifity = [MOBOARD_DEVICE => false,\n PROCESSOR_DEVICE => 'int',\n RAM_DEVICE => 'int',\n HDD_DEVICE => 'int',\n NETWORK_DEVICE => 'varchar',\n DRIVE_DEVICE => false,\n CONTROL_DEVICE => false,\n GFX_DEVICE => 'int',\n SND_DEVICE => false,\n PCI_DEVICE => false,\n CASE_DEVICE => false,\n POWER_DEVICE => false];\n\n if ($DB->fieldExists($itemtable, 'specif_default', false)) {\n // Convert default specifity\n if ($withspecifity[$key]) {\n // Convert data to int\n if ($withspecifity[$key] == 'int') {\n // clean non integer values\n $query = \"UPDATE `$itemtable`\n SET `specif_default` = 0\n WHERE `specif_default` NOT REGEXP '^[0-9]*$'\n OR `specif_default` = ''\n OR `specif_default` IS NULL\";\n $DB->queryOrDie($query, \"0.78 update specif_default in $itemtable\");\n\n $query = \"ALTER TABLE `$itemtable`\n CHANGE `specif_default` `specif_default` INT(11) NOT NULL\";\n $DB->queryOrDie($query, \"0.78 alter specif_default in $itemtable\");\n }\n } else { // Drop default specificity\n $query = \"ALTER TABLE `$itemtable`\n DROP `specif_default`\";\n $DB->queryOrDie($query, \"0.78 drop specif_default in $itemtable\");\n }\n }\n\n if (!$DB->tableExists($linktable)) {\n // create table\n $query = \"CREATE TABLE `$linktable` (\n `id` int(11) NOT NULL auto_increment,\n `computers_id` int(11) NOT NULL default '0',\n `$fkname` int(11) NOT NULL default '0',\";\n if ($withspecifity[$key]) {\n if ($withspecifity[$key] == 'int') {\n $query .= \"`specificity` int(11) NOT NULL,\";\n\n } else {\n $query .= \"`specificity` varchar(255) collate utf8_unicode_ci default NULL,\";\n }\n }\n $query .= \"PRIMARY KEY (`id`),\n KEY `computers_id` (`computers_id`),\n KEY `$fkname` (`$fkname`)\";\n if ($withspecifity[$key]) {\n $query .= \",KEY `specificity` (`specificity`)\";\n }\n $query .= \") ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;\";\n $DB->queryOrDie($query, \"0.78 create $linktable\");\n\n // Update data before copy\n if ($withspecifity[$key]) {\n // Convert data to int\n if ($withspecifity[$key] == 'int') {\n // clean non integer values\n $query = \"UPDATE `glpi_computer_device`\n SET `specificity` = 0\n WHERE device_type = $key\n AND `specificity` NOT REGEXP '^[0-9]*$'\n OR `specificity` = ''\";\n $DB->queryOrDie($query, \"0.78 update specificity in glpi_computer_device for $itemtype\");\n }\n }\n // copy datas to new table : keep id for ocs sync\n $query = \"INSERT INTO `$linktable` (`id`, `computers_id`, `$fkname`\n \".($withspecifity[$key]?\", `specificity`\":'').\")\n SELECT `ID`, `FK_computers`, `FK_device`\n \".($withspecifity[$key]?\", specificity\":'').\"\n FROM `glpi_computer_device`\n WHERE `device_type` = $key\";\n $DB->queryOrDie($query, \"0.78 populate $linktable\");\n }\n }\n // Drop computer_device_table\n $query = \"DROP TABLE `glpi_computer_device`\";\n $DB->queryOrDie($query, \"0.78 drop glpi_computer_device\");\n }\n\n if (!$DB->fieldExists('glpi_users', 'task_private', false)) {\n $query = \"ALTER TABLE `glpi_users`\n ADD `task_private` TINYINT(1) DEFAULT NULL AFTER `followup_private`\";\n\n $DB->queryOrDie($query, \"0.78 add task_private to glpi_users\");\n }\n\n if (!$DB->fieldExists('glpi_configs', 'task_private', false)) {\n $query = \"ALTER TABLE `glpi_configs`\n ADD `task_private` TINYINT(1) NOT NULL DEFAULT '0' AFTER `followup_private`\";\n\n $DB->queryOrDie($query, \"0.78 add task_private to glpi_users\");\n }\n\n if (!$DB->fieldExists('glpi_rules', 'date_mod', false)) {\n $query = \"ALTER TABLE `glpi_rules`\n ADD `date_mod` DATETIME NULL,\n ADD INDEX `date_mod` (`date_mod`)\";\n\n $DB->queryOrDie($query, \"0.78 add date_mod to glpi_rules\");\n }\n\n if (!$DB->fieldExists('glpi_authldaps', 'entity_field', false)) {\n $query = \"ALTER TABLE `glpi_authldaps`\n ADD `entity_field` VARCHAR( 255 ) DEFAULT NULL\";\n\n $DB->queryOrDie($query, \"0.78 add entity_field to glpi_authldaps\");\n }\n\n if (!$DB->fieldExists('glpi_authldaps', 'entity_condition', false)) {\n $query = \"ALTER TABLE `glpi_authldaps`\n ADD `entity_condition` TEXT NULL collate utf8_unicode_ci\";\n\n $DB->queryOrDie($query, \"0.78 add entity_condition to glpi_authldaps\");\n }\n\n if (!$DB->fieldExists('glpi_entitydatas', 'ldapservers_id', false)) {\n $query = \"ALTER TABLE `glpi_entitydatas`\n ADD `ldapservers_id` INT( 11 ) NOT NULL DEFAULT '0'\";\n\n $DB->queryOrDie($query, \"0.78 add ldapservers_id to glpi_entitydatas\");\n }\n\n if (!$DB->fieldExists('glpi_entitydatas', 'mail_domain', false)) {\n $query = \"ALTER TABLE `glpi_entitydatas`\n ADD `mail_domain` VARCHAR( 255 ) DEFAULT NULL\";\n\n $DB->queryOrDie($query, \"0.78 add mail_domain to glpi_entitydatas\");\n }\n\n if (!$DB->fieldExists('glpi_entitydatas', 'entity_ldapfilter', false)) {\n $query = \"ALTER TABLE `glpi_entitydatas`\n ADD `entity_ldapfilter` TEXT NULL collate utf8_unicode_ci\";\n\n $DB->queryOrDie($query, \"0.78 add entity_ldapfilter to glpi_entitydatas\");\n }\n\n if (!$DB->fieldExists('glpi_profiles', 'import_externalauth_users', false)) {\n $query = \"ALTER TABLE `glpi_profiles`\n ADD `import_externalauth_users` CHAR( 1 ) NULL\";\n\n $DB->queryOrDie($query, \"0.78 add import_externalauth_users in glpi_profiles\");\n\n $query = \"UPDATE `glpi_profiles`\n SET `import_externalauth_users` = 'w'\n WHERE `user` ='w'\";\n\n $DB->queryOrDie($query, \"0.78 add import_externalauth_users right users which are able to write users\");\n }\n\n $migration->displayMessage(sprintf(__('Change of the database layout - %s'), 'Notifications'));\n $templates = [];\n if (!$DB->tableExists('glpi_notificationtemplates')) {\n $query = \"CREATE TABLE `glpi_notificationtemplates` (\n `id` INT( 11 ) NOT NULL AUTO_INCREMENT ,\n `name` VARCHAR( 255 ) default NULL ,\n `itemtype` VARCHAR( 100 ) NOT NULL,\n `date_mod` DATETIME DEFAULT NULL ,\n `comment` text collate utf8_unicode_ci,\n PRIMARY KEY ( `ID` ),\n KEY `itemtype` (`itemtype`),\n KEY `date_mod` (`date_mod`),\n KEY `name` (`name`)\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci\";\n $DB->queryOrDie($query, \"0.78 create glpi_notificationtemplates\");\n\n $queries['DBConnection'] = \"INSERT INTO `glpi_notificationtemplates`\n VALUES(NULL, 'MySQL Synchronization', 'DBConnection', NOW(),'');\";\n $queries['Reservation'] = \"INSERT INTO `glpi_notificationtemplates`\n VALUES(NULL, 'Reservations', 'Reservation', NOW(),'');\";\n $queries['Reservation2'] = \"INSERT INTO `glpi_notificationtemplates`\n VALUES(NULL, 'Alert Reservation', 'Reservation', NOW(),'');\";\n $queries['Ticket'] = \"INSERT INTO `glpi_notificationtemplates`\n VALUES(NULL, 'Tickets', 'Ticket', NOW(),'');\";\n $queries['Ticket2'] = \"INSERT INTO `glpi_notificationtemplates`\n VALUES(NULL, 'Tickets (Simple)', 'Ticket', NOW(),'');\";\n $queries['Ticket3'] = \"INSERT INTO `glpi_notificationtemplates`\n VALUES(NULL, 'Alert Tickets not closed', 'Ticket', NOW(),'');\";\n $queries['TicketValidation']\n = \"INSERT INTO `glpi_notificationtemplates`\n VALUES(NULL, 'Tickets Validation', 'Ticket', NOW(),'');\";\n $queries['Cartridge'] = \"INSERT INTO `glpi_notificationtemplates`\n VALUES(NULL, 'Cartridges', 'Cartridge', NOW(),'');\";\n $queries['Consumable'] = \"INSERT INTO `glpi_notificationtemplates`\n VALUES(NULL, 'Consumables', 'Consumable', NOW(),'');\";\n $queries['Infocom'] = \"INSERT INTO `glpi_notificationtemplates`\n VALUES(NULL, 'Infocoms', 'Infocom', NOW(),'');\";\n $queries['SoftwareLicense'] = \"INSERT INTO `glpi_notificationtemplates`\n VALUES(NULL, 'Licenses', 'SoftwareLicense', NOW(),'');\";\n $queries['Contract'] = \"INSERT INTO `glpi_notificationtemplates`\n VALUES(NULL, 'Contracts', 'Contract', NOW(),'');\";\n\n foreach ($queries as $itemtype => $query) {\n $DB->queryOrDie($query, \"0.78 insert notification template for $itemtype\");\n $templates[$itemtype] = $DB->insertId();\n }\n\n $ADDTODISPLAYPREF['NotificationTemplate']=[4,16];\n\n //There was a problem with GLPI < 0.78 : smtp_port field wans'nt used : migrate it\n $query = \"SELECT `smtp_host`\n FROM `glpi_configs`\n WHERE `id` = '1'\";\n $result = $DB->query($query);\n $host = $DB->result($result, 0, 'smtp_host');\n $results = [];\n preg_match(\"/(.*):([0-9]*)/\", $host, $results);\n if (!empty($results)) {\n $query = \"UPDATE `glpi_configs`\n SET `smtp_host` = '\".$results[1].\"' ,\n `smtp_port` = '\".$results[2].\"'\n WHERE `id` = '1'\";\n $DB->query($query);\n }\n }\n\n if (!$DB->tableExists('glpi_notificationtemplatetranslations')) {\n $query = \"CREATE TABLE `glpi_notificationtemplatetranslations` (\n `id` INT( 11 ) NOT NULL AUTO_INCREMENT ,\n `notificationtemplates_id` INT( 11 ) NOT NULL DEFAULT '0',\n `language` CHAR ( 5 ) NOT NULL DEFAULT '',\n `subject` VARCHAR( 255 ) NOT NULL ,\n `content_text` TEXT NULL ,\n `content_html` TEXT NULL ,\n PRIMARY KEY ( `id` ),\n KEY `notificationtemplates_id` (`notificationtemplates_id`)\n )ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci\";\n $DB->queryOrDie($query, \"0.78 create glpi_notificationtemplatetranslations\");\n\n $queries = [];\n $queries['DBConnection'] = \"INSERT INTO `glpi_notificationtemplatetranslations`\n VALUES(NULL, \".$templates['DBConnection'].\", '','##lang.dbconnection.title##',\n '##lang.dbconnection.delay## : ##dbconnection.delay##\\r\\n',\n '&lt;p&gt;##lang.dbconnection.delay## : ##dbconnection.delay##&lt;/p&gt;');\";\n\n $content_text_reservation=\"======================================================================\\r\\n\".\n \"##lang.reservation.user##: ##reservation.user##\\r\\n\".\n \"##lang.reservation.item.name##: ##reservation.itemtype## - ##reservation.item.name##\\r\\n\".\n \"##IFreservation.tech## ##lang.reservation.tech## ##reservation.tech## ##ENDIFreservation.tech##\\r\\n\".\n \"##lang.reservation.begin##: ##reservation.begin##\\r\\n\".\n \"##lang.reservation.end##: ##reservation.end##\\r\\n\".\n \"##lang.reservation.comment##: ##reservation.comment##\\r\\n\".\n \"======================================================================\\r\\n\";\n $content_html_reservation = \"&lt;!-- description{ color: inherit; background: #ebebeb;\".\n \"border-style: solid;border-color: #8d8d8d; border-width: 0px 1px 1px 0px; }\".\n \" --&gt;\\r\\n&lt;p&gt;&lt;span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"&gt;\".\n \"##lang.reservation.user##:&lt;/span&gt;##reservation.user##\".\n \"&lt;br /&gt; &lt;span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"&gt;\".\n \"##lang.reservation.item.name##:&lt;/span&gt;\".\n \"##reservation.itemtype## - ##reservation.item.name##&lt;br /&gt;\".\n \"##IFreservation.tech## ##lang.reservation.tech## ##reservation.tech##\".\n \"##ENDIFreservation.tech##&lt;br /&gt; &lt;span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"&gt;\".\n \"##lang.reservation.begin##:&lt;/span&gt; ##reservation.begin##\".\n \"&lt;br /&gt; &lt;span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"&gt;\".\n \"##lang.reservation.end##:&lt;/span&gt;\".\n \"##reservation.end##&lt;br /&gt; &lt;span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"&gt;\".\n \"##lang.reservation.comment##:&lt;/span&gt; ##reservation.comment##\".\n \"&lt;/p&gt;\";\n\n $queries['Reservation'] = \"INSERT INTO `glpi_notificationtemplatetranslations`\n VALUES(NULL, \".$templates['Reservation'].\", '',\n '##reservation.action##', '$content_text_reservation',\n '$content_html_reservation')\";\n\n $queries['Reservation2'] = \"INSERT INTO `glpi_notificationtemplatetranslations`\n VALUES(NULL, \".$templates['Reservation2'].\", '',\n '##reservation.action## ##reservation.entity##',\n '##lang.reservation.entity## : ##reservation.entity## \\r\\n\n \\r\\n##FOREACHreservations## \\r\\n##lang.reservation.itemtype## : ##reservation.itemtype##\\r\\n\n ##lang.reservation.item## : ##reservation.item##\\r\\n \\r\\n ##reservation.url## \\r\\n\n ##ENDFOREACHreservations##',\n '&lt;p&gt;##lang.reservation.entity## : ##reservation.entity## &lt;br /&gt; &lt;br /&gt;\n##FOREACHreservations## &lt;br /&gt;##lang.reservation.itemtype## : ##reservation.itemtype##&lt;br /&gt;\n ##lang.reservation.item## : ##reservation.item##&lt;br /&gt; &lt;br /&gt;\n &lt;a href=\\\"##reservation.url##\\\"&gt; ##reservation.url##&lt;/a&gt;&lt;br /&gt;\n ##ENDFOREACHreservations##&lt;/p&gt;');\";\n $queries['Ticket'] = \"INSERT INTO `glpi_notificationtemplatetranslations`\n VALUES(NULL, '\".$templates['Ticket'].\"', '',\n '##ticket.action## ##ticket.title##',\n' ##IFticket.storestatus=solved##\n ##lang.ticket.url## : ##ticket.urlapprove##\n ##lang.ticket.autoclosewarning##\n ##lang.ticket.solvedate## : ##ticket.solvedate##\n ##lang.ticket.solution.type## : ##ticket.solution.type##\n ##lang.ticket.solution.description## : ##ticket.solution.description## ##ENDIFticket.storestatus##\n ##ELSEticket.storestatus## ##lang.ticket.url## : ##ticket.url## ##ENDELSEticket.storestatus##\n\n ##lang.ticket.description##\n\n ##lang.ticket.title## : ##ticket.title##\n ##lang.ticket.author.name## : ##IFticket.author.name## ##ticket.author.name## ##ENDIFticket.author.name## ##ELSEticket.author.name##--##ENDELSEticket.author.name##\n ##lang.ticket.creationdate## : ##ticket.creationdate##\n ##lang.ticket.closedate## : ##ticket.closedate##\n ##lang.ticket.requesttype## : ##ticket.requesttype##\n ##IFticket.itemtype## ##lang.ticket.item.name## : ##ticket.itemtype## - ##ticket.item.name## ##IFticket.item.model## - ##ticket.item.model## ##ENDIFticket.item.model## ##IFticket.item.serial## - ##ticket.item.serial## ##ENDIFticket.item.serial## ##IFticket.item.otherserial## -##ticket.item.otherserial## ##ENDIFticket.item.otherserial## ##ENDIFticket.itemtype##\n##IFticket.assigntouser## ##lang.ticket.assigntouser## : ##ticket.assigntouser## ##ENDIFticket.assigntouser##\n ##lang.ticket.status## : ##ticket.status##\n##IFticket.assigntogroup## ##lang.ticket.assigntogroup## : ##ticket.assigntogroup## ##ENDIFticket.assigntogroup##\n ##lang.ticket.urgency## : ##ticket.urgency##\n ##lang.ticket.impact## : ##ticket.impact##\n ##lang.ticket.priority## : ##ticket.priority##\n##IFticket.user.email## ##lang.ticket.user.email## : ##ticket.user.email ##ENDIFticket.user.email##\n##IFticket.category## ##lang.ticket.category## : ##ticket.category## ##ENDIFticket.category## ##ELSEticket.category## ##lang.ticket.nocategoryassigned## ##ENDELSEticket.category##\n ##lang.ticket.content## : ##ticket.content##\n\n ##IFticket.storestatus=closed##\n\n ##lang.ticket.solvedate## : ##ticket.solvedate##\n ##lang.ticket.solution.type## : ##ticket.solution.type##\n ##lang.ticket.solution.description## : ##ticket.solution.description##\n ##ENDIFticket.storestatus##\n ##lang.ticket.numberoffollowups## : ##ticket.numberoffollowups##\n\n##FOREACHfollowups##\n\n [##followup.date##] ##lang.followup.isprivate## : ##followup.isprivate##\n ##lang.followup.author## ##followup.author##\n ##lang.followup.description## ##followup.description##\n ##lang.followup.date## ##followup.date##\n ##lang.followup.requesttype## ##followup.requesttype##\n\n##ENDFOREACHfollowups##\n ##lang.ticket.numberoftasks## : ##ticket.numberoftasks##\n\n##FOREACHtasks##\n\n [##task.date##] ##lang.task.isprivate## : ##task.isprivate##\n ##lang.task.author## ##task.author##\n ##lang.task.description## ##task.description##\n ##lang.task.time## ##task.time##\n ##lang.task.category## ##task.category##\n\n##ENDFOREACHtasks##',\n'<!-- description{ color: inherit; background: #ebebeb; border-style: solid;border-color: #8d8d8d; border-width: 0px 1px 1px 0px; } -->\n<div>##IFticket.storestatus=solved##</div>\n<div>##lang.ticket.url## : <a href=\\\"##ticket.urlapprove##\\\">##ticket.urlapprove##</a> <span class=\\\"b\\\">&#160;</span></div>\n<div><span class=\\\"b\\\">##lang.ticket.autoclosewarning##</span> </div>\n<div><span style=\\\"color: #888888;\\\"><span class=\\\"b\\\"><span style=\\\"text-decoration: underline;\\\">##lang.ticket.solvedate##</span></span></span> : ##ticket.solvedate##<br /><span style=\\\"text-decoration: underline; color: #888888;\\\"><span class=\\\"b\\\">##lang.ticket.solution.type##</span></span> : ##ticket.solution.type##<br /><span style=\\\"text-decoration: underline; color: #888888;\\\"><span class=\\\"b\\\">##lang.ticket.solution.description##</span></span> : ##ticket.solution.description## ##ENDIFticket.storestatus##</div>\n<div>##ELSEticket.storestatus## ##lang.ticket.url## : <a href=\\\"##ticket.url##\\\">##ticket.url##</a> ##ENDELSEticket.storestatus##</div>\n<div class=\\\"description b\\\"><span class=\\\"b\\\">##lang.ticket.description##</span></div>\n<p><span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"> ##lang.ticket.title##</span>&#160;:##ticket.title## <br /> <span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"> ##lang.ticket.author.name##</span>&#160;:##IFticket.author.name## ##ticket.author.name## ##ENDIFticket.author.name## ##ELSEticket.author.name##--##ENDELSEticket.author.name## <br /> <span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"> ##lang.ticket.creationdate##</span>&#160;:##ticket.creationdate## <br /> <span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"> ##lang.ticket.closedate##</span>&#160;:##ticket.closedate## <br /> <span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"> ##lang.ticket.requesttype##</span>&#160;:##ticket.requesttype##<br /> ##IFticket.itemtype## <span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"> ##lang.ticket.item.name##</span>&#160;: ##ticket.itemtype## - ##ticket.item.name## ##IFticket.item.model## - ##ticket.item.model## ##ENDIFticket.item.model## ##IFticket.item.serial## -##ticket.item.serial## ##ENDIFticket.item.serial##&#160; ##IFticket.item.otherserial## -##ticket.item.otherserial## ##ENDIFticket.item.otherserial## ##ENDIFticket.itemtype## <br /> ##IFticket.assigntouser## <span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"> ##lang.ticket.assigntouser##</span>&#160;: ##ticket.assigntouser## ##ENDIFticket.assigntouser##<br /> <span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\">##lang.ticket.status## </span>&#160;: ##ticket.status##<br /> ##IFticket.assigntogroup## <span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"> ##lang.ticket.assigntogroup##</span>&#160;: ##ticket.assigntogroup## ##ENDIFticket.assigntogroup##<br /> <span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"> ##lang.ticket.urgency##</span>&#160;: ##ticket.urgency##<br /> <span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"> ##lang.ticket.impact##</span>&#160;: ##ticket.impact##<br /> <span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"> ##lang.ticket.priority##</span>&#160;: ##ticket.priority## <br /> ##IFticket.user.email##<span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"> ##lang.ticket.user.email##</span>&#160;: ##ticket.user.email ##ENDIFticket.user.email## <br /> ##IFticket.category##<span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\">##lang.ticket.category## </span>&#160;:##ticket.category## ##ENDIFticket.category## ##ELSEticket.category## ##lang.ticket.nocategoryassigned## ##ENDELSEticket.category## <br /> <span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"> ##lang.ticket.content##</span>&#160;: ##ticket.content##</p>\n<br />##IFticket.storestatus=closed##<br /><span style=\\\"text-decoration: underline;\\\"><span class=\\\"b\\\"><span style=\\\"color: #888888;\\\">##lang.ticket.solvedate##</span></span></span> : ##ticket.solvedate##<br /><span style=\\\"color: #888888;\\\"><span class=\\\"b\\\"><span style=\\\"text-decoration: underline;\\\">##lang.ticket.solution.type##</span></span></span> : ##ticket.solution.type##<br /><span style=\\\"text-decoration: underline; color: #888888;\\\"><span class=\\\"b\\\">##lang.ticket.solution.description##</span></span> : ##ticket.solution.description##<br />##ENDIFticket.storestatus##</p>\n<div class=\\\"description b\\\">##lang.ticket.numberoffollowups##&#160;: ##ticket.numberoffollowups##</div>\n<p>##FOREACHfollowups##</p>\n<div class=\\\"description b\\\"><br /> <span class=\\\"b\\\"> [##followup.date##] <em>##lang.followup.isprivate## : ##followup.isprivate## </em></span><br /> <span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"> ##lang.followup.author## </span> ##followup.author##<br /> <span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"> ##lang.followup.description## </span> ##followup.description##<br /> <span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"> ##lang.followup.date## </span> ##followup.date##<br /> <span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"> ##lang.followup.requesttype## </span> ##followup.requesttype##</div>\n<p>##ENDFOREACHfollowups##</p>\n<div class=\\\"description b\\\">##lang.ticket.numberoftasks##&#160;: ##ticket.numberoftasks##</div>\n<p>##FOREACHtasks##</p>\n<div class=\\\"description b\\\"><br /> <span class=\\\"b\\\"> [##task.date##] <em>##lang.task.isprivate## : ##task.isprivate## </em></span><br /> <span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"> ##lang.task.author##</span> ##task.author##<br /> <span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"> ##lang.task.description##</span> ##task.description##<br /> <span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"> ##lang.task.time##</span> ##task.time##<br /> <span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"> ##lang.task.category##</span> ##task.category##</div>\n<p>##ENDFOREACHtasks##</p>');\";\n\n $queries['Contract'] = \"INSERT INTO `glpi_notificationtemplatetranslations`\n VALUES(NULL, \".$templates['Contract'].\", '',\n '##contract.action## ##contract.entity##',\n '##lang.contract.entity## : ##contract.entity##\\r\\n\".\n \"\\r\\n##FOREACHcontracts##\\r\\n\".\n \"##lang.contract.name## : ##contract.name##\\r\\n\".\n \"##lang.contract.number## : ##contract.number##\\r\\n\".\n \"##lang.contract.time## : ##contract.time##\\r\\n\".\n \"##IFcontract.type####lang.contract.type## : ##contract.type##\".\n \"##ENDIFcontract.type##\\r\\n\".\n \"##contract.url##\\r\\n\".\n \"##ENDFOREACHcontracts##',\n'&lt;p&gt;##lang.contract.entity## : ##contract.entity##&lt;br /&gt;\n&lt;br /&gt;##FOREACHcontracts##&lt;br /&gt;##lang.contract.name## :\n##contract.name##&lt;br /&gt;\n##lang.contract.number## : ##contract.number##&lt;br /&gt;\n##lang.contract.time## : ##contract.time##&lt;br /&gt;\n##IFcontract.type####lang.contract.type## : ##contract.type##\n##ENDIFcontract.type##&lt;br /&gt;\n&lt;a href=\\\"##contract.url##\\\"&gt;\n##contract.url##&lt;/a&gt;&lt;br /&gt;\n##ENDFOREACHcontracts##&lt;/p&gt;');\";\n\n $queries['Ticket2'] = \"INSERT INTO `glpi_notificationtemplatetranslations`\n VALUES(NULL, \".$templates['Ticket2'].\", '',\n '##ticket.action## ##ticket.title##',\n'##lang.ticket.url## : ##ticket.url## \\r\\n\n##lang.ticket.description## \\r\\n\\n\n##lang.ticket.title## &#160;:##ticket.title## \\n\n##lang.ticket.author.name## &#160;:##IFticket.author.name##\n##ticket.author.name## ##ENDIFticket.author.name##\n##ELSEticket.author.name##--##ENDELSEticket.author.name## &#160; \\n\n##IFticket.category## ##lang.ticket.category## &#160;:##ticket.category##\n##ENDIFticket.category## ##ELSEticket.category##\n##lang.ticket.nocategoryassigned## ##ENDELSEticket.category##\\n\n##lang.ticket.content## &#160;: ##ticket.content##\\n##IFticket.itemtype##\n##lang.ticket.item.name## &#160;: ##ticket.itemtype## - ##ticket.item.name##\n##ENDIFticket.itemtype##',\n'&lt;div&gt;##lang.ticket.url## : &lt;a href=\\\"##ticket.url##\\\"&gt;\n##ticket.url##&lt;/a&gt;&lt;/div&gt;\\r\\n&lt;div class=\\\"description b\\\"&gt;\n##lang.ticket.description##&lt;/div&gt;\\r\\n&lt;p&gt;&lt;span\nstyle=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"&gt;\n##lang.ticket.title##&lt;/span&gt;&#160;:##ticket.title##\n&lt;br /&gt; &lt;span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"&gt;\n##lang.ticket.author.name##&lt;/span&gt;\n##IFticket.author.name## ##ticket.author.name##\n##ENDIFticket.author.name##\n##ELSEticket.author.name##--##ENDELSEticket.author.name##\n&lt;span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"&gt;&#160\n;&lt;/span&gt;&lt;br /&gt; &lt;span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"&gt; &lt;/span&gt;\n##IFticket.category##&lt;span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"&gt;\n##lang.ticket.category## &lt;/span&gt;&#160;:##ticket.category##\n##ENDIFticket.category## ##ELSEticket.category##\n##lang.ticket.nocategoryassigned## ##ENDELSEticket.category##\n&lt;br /&gt; &lt;span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"&gt;\n##lang.ticket.content##&lt;/span&gt;&#160;:\n##ticket.content##&lt;br /&gt;##IFticket.itemtype##\n&lt;span style=\\\"color: #8b8c8f; font-weight: bold; text-decoration: underline;\\\"&gt;\n##lang.ticket.item.name##&lt;/span&gt;&#160;:\n##ticket.itemtype## - ##ticket.item.name##\n##ENDIFticket.itemtype##&lt;/p&gt;');\";\n\n $queries['TicketValidation'] = \"INSERT INTO `glpi_notificationtemplatetranslations`\n VALUES(NULL, \".$templates['TicketValidation'].\", '',\n '##ticket.action## ##ticket.title##',\n'##FOREACHvalidations##\n\n##IFvalidation.storestatus=waiting##\n##validation.submission.title##\n##lang.validation.commentsubmission## : ##validation.commentsubmission##\n##ENDIFvalidation.storestatus##\n##ELSEvalidation.storestatus## ##validation.answer.title## ##ENDELSEvalidation.storestatus##\n\n##lang.ticket.url## : ##ticket.urlvalidation##\n\n##IFvalidation.status## ##lang.validation.validationstatus## ##ENDIFvalidation.status##\n##IFvalidation.commentvalidation##\n##lang.validation.commentvalidation## : ##validation.commentvalidation##\n##ENDIFvalidation.commentvalidation##\n##ENDFOREACHvalidations##',\n'&lt;div&gt;##FOREACHvalidations##&lt;/div&gt;\n&lt;p&gt;##IFvalidation.storestatus=waiting##&lt;/p&gt;\n&lt;div&gt;##validation.submission.title##&lt;/div&gt;\n&lt;div&gt;##lang.validation.commentsubmission## : ##validation.commentsubmission##&lt;/div&gt;\n&lt;div&gt;##ENDIFvalidation.storestatus##&lt;/div&gt;\n&lt;div&gt;##ELSEvalidation.storestatus## ##validation.answer.title## ##ENDELSEvalidation.storestatus##&lt;/div&gt;\n&lt;div&gt;&lt;/div&gt;\n&lt;div&gt;\n&lt;div&gt;##lang.ticket.url## : &lt;a href=\\\"##ticket.urlvalidation##\\\"&gt; ##ticket.urlvalidation## &lt;/a&gt;&lt;/div&gt;\n&lt;/div&gt;\n&lt;p&gt;##IFvalidation.status## ##lang.validation.validationstatus## ##ENDIFvalidation.status##\n&lt;br /&gt; ##IFvalidation.commentvalidation##&lt;br /&gt; ##lang.validation.commentvalidation## :\n&#160; ##validation.commentvalidation##&lt;br /&gt; ##ENDIFvalidation.commentvalidation##\n&lt;br /&gt;##ENDFOREACHvalidations##&lt;/p&gt;');\";\n\n $queries['Ticket3'] = \"INSERT INTO `glpi_notificationtemplatetranslations`\n VALUES(NULL, \".$templates['Ticket3'].\", '',\n '##ticket.action## ##ticket.entity##',\n'##lang.ticket.entity## : ##ticket.entity##\\n \\n##FOREACHtickets##\\n\n##lang.ticket.title## : ##ticket.title##\\n ##lang.ticket.status## : ##ticket.status##\\n\n ##ticket.url## \\n ##ENDFOREACHtickets##',\n'&lt;table class=\\\"tab_cadre\\\" border=\\\"1\\\" cellspacing=\\\"2\\\" cellpadding=\\\"3\\\"&gt;\n&lt;tbody&gt;\n&lt;tr&gt;\n&lt;td style=\\\"text-align: left;\\\" width=\\\"auto\\\" bgcolor=\\\"#cccccc\\\"&gt;&lt;span style=\\\"font-size: 11px; text-align: left;\\\"&gt;##lang.ticket.author.name##&lt;/span&gt;&lt;/td&gt;\n&lt;td style=\\\"text-align: left;\\\" width=\\\"auto\\\" bgcolor=\\\"#cccccc\\\"&gt;&lt;span style=\\\"font-size: 11px; text-align: left;\\\"&gt;##lang.ticket.title##&lt;/span&gt;&lt;/td&gt;\n&lt;td style=\\\"text-align: left;\\\" width=\\\"auto\\\" bgcolor=\\\"#cccccc\\\"&gt;&lt;span style=\\\"font-size: 11px; text-align: left;\\\"&gt;##lang.ticket.priority##&lt;/span&gt;&lt;/td&gt;\n&lt;td style=\\\"text-align: left;\\\" width=\\\"auto\\\" bgcolor=\\\"#cccccc\\\"&gt;&lt;span style=\\\"font-size: 11px; text-align: left;\\\"&gt;##lang.ticket.status##&lt;/span&gt;&lt;/td&gt;\n&lt;td style=\\\"text-align: left;\\\" width=\\\"auto\\\" bgcolor=\\\"#cccccc\\\"&gt;&lt;span style=\\\"font-size: 11px; text-align: left;\\\"&gt;##lang.ticket.attribution##&lt;/span&gt;&lt;/td&gt;\n&lt;td style=\\\"text-align: left;\\\" width=\\\"auto\\\" bgcolor=\\\"#cccccc\\\"&gt;&lt;span style=\\\"font-size: 11px; text-align: left;\\\"&gt;##lang.ticket.creationdate##&lt;/span&gt;&lt;/td&gt;\n&lt;td style=\\\"text-align: left;\\\" width=\\\"auto\\\" bgcolor=\\\"#cccccc\\\"&gt;&lt;span style=\\\"font-size: 11px; text-align: left;\\\"&gt;##lang.ticket.content##&lt;/span&gt;&lt;/td&gt;\n&lt;/tr&gt;\n##FOREACHtickets##\n&lt;tr&gt;\n&lt;td width=\\\"auto\\\"&gt;&lt;span style=\\\"font-size: 11px; text-align: left;\\\"&gt;##ticket.author.name##&lt;/span&gt;&lt;/td&gt;\n&lt;td width=\\\"auto\\\"&gt;&lt;span style=\\\"font-size: 11px; text-align: left;\\\"&gt;&lt;a href=\\\"##ticket.url##\\\"&gt;##ticket.title##&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;\n&lt;td width=\\\"auto\\\"&gt;&lt;span style=\\\"font-size: 11px; text-align: left;\\\"&gt;##ticket.priority##&lt;/span&gt;&lt;/td&gt;\n&lt;td width=\\\"auto\\\"&gt;&lt;span style=\\\"font-size: 11px; text-align: left;\\\"&gt;##ticket.status##&lt;/span&gt;&lt;/td&gt;\n&lt;td width=\\\"auto\\\"&gt;&lt;span style=\\\"font-size: 11px; text-align: left;\\\"&gt;##IFticket.assigntouser####ticket.assigntouser##&lt;br /&gt;##ENDIFticket.assigntouser####IFticket.assigntogroup##&lt;br /&gt;##ticket.assigntogroup## ##ENDIFticket.assigntogroup####IFticket.assigntosupplier##&lt;br /&gt;##ticket.assigntosupplier## ##ENDIFticket.assigntosupplier##&lt;/span&gt;&lt;/td&gt;\n&lt;td width=\\\"auto\\\"&gt;&lt;span style=\\\"font-size: 11px; text-align: left;\\\"&gt;##ticket.creationdate##&lt;/span&gt;&lt;/td&gt;\n&lt;td width=\\\"auto\\\"&gt;&lt;span style=\\\"font-size: 11px; text-align: left;\\\"&gt;##ticket.content##&lt;/span&gt;&lt;/td&gt;\n&lt;/tr&gt;\n##ENDFOREACHtickets##\n&lt;/tbody&gt;\n&lt;/table&gt;');\";\n\n $queries['Consumable'] = \"INSERT INTO `glpi_notificationtemplatetranslations`\n VALUES(NULL, \".$templates['Consumable'].\", '',\n '##consumable.action## ##consumable.entity##',\n'##lang.consumable.entity## : ##consumable.entity##\\n \\n\n##FOREACHconsumables##\\n##lang.consumable.item## : ##consumable.item##\\n \\n\n##lang.consumable.reference## : ##consumable.reference##\\n\n##lang.consumable.remaining## : ##consumable.remaining##\\n\n##consumable.url## \\n\n##ENDFOREACHconsumables##', '&lt;p&gt;\n##lang.consumable.entity## : ##consumable.entity##\n&lt;br /&gt; &lt;br /&gt;##FOREACHconsumables##\n&lt;br /&gt;##lang.consumable.item## : ##consumable.item##&lt;br /&gt;\n&lt;br /&gt;##lang.consumable.reference## : ##consumable.reference##&lt;br /&gt;\n##lang.consumable.remaining## : ##consumable.remaining##&lt;br /&gt;\n&lt;a href=\\\"##consumable.url##\\\"&gt; ##consumable.url##&lt;/a&gt;&lt;br /&gt;\n ##ENDFOREACHconsumables##&lt;/p&gt;');\";\n\n $queries['Cartridge'] = \"INSERT INTO `glpi_notificationtemplatetranslations`\n VALUES(NULL, \".$templates['Cartridge'].\", '',\n '##cartridge.action## ##cartridge.entity##',\n'##lang.cartridge.entity## : ##cartridge.entity##\\n \\n\n##FOREACHcartridges##\\n##lang.cartridge.item## : ##cartridge.item##\\n \\n\n##lang.cartridge.reference## : ##cartridge.reference##\\n\n##lang.cartridge.remaining## : ##cartridge.remaining##\\n\n##cartridge.url## \\n ##ENDFOREACHcartridges##',\n'&lt;p&gt;##lang.cartridge.entity## :##cartridge.entity##\n&lt;br /&gt; &lt;br /&gt;##FOREACHcartridges##\n&lt;br /&gt;##lang.cartridge.item## :\n##cartridge.item##&lt;br /&gt; &lt;br /&gt;\n##lang.cartridge.reference## :\n##cartridge.reference##&lt;br /&gt;\n##lang.cartridge.remaining## :\n##cartridge.remaining##&lt;br /&gt;\n&lt;a href=\\\"##cartridge.url##\\\"&gt;\n##cartridge.url##&lt;/a&gt;&lt;br /&gt;\n##ENDFOREACHcartridges##&lt;/p&gt;');\";\n $queries['Infocom'] = \"INSERT INTO `glpi_notificationtemplatetranslations`\n VALUES(NULL, \".$templates['Infocom'].\", '',\n '##infocom.action## ##infocom.entity##',\n'##lang.infocom.entity## : ##infocom.entity## \\n \\n\n##FOREACHinfocoms## \\n\n##lang.infocom.itemtype## : ##infocom.itemtype##\\n\n##lang.infocom.item## : ##infocom.item##\\n \\n\n##lang.infocom.expirationdate## : ##infocom.expirationdate##\\n\n##infocom.url## \\n ##ENDFOREACHinfocoms##',\n'&lt;p&gt;##lang.infocom.entity## : ##infocom.entity##\n&lt;br /&gt; &lt;br /&gt;##FOREACHinfocoms##\n&lt;br /&gt;##lang.infocom.itemtype## : ##infocom.itemtype##&lt;br /&gt;\n##lang.infocom.item## : ##infocom.item##&lt;br /&gt; &lt;br /&gt;\n##lang.infocom.expirationdate## : ##infocom.expirationdate##\n&lt;br /&gt; &lt;a href=\\\"##infocom.url##\\\"&gt;\n##infocom.url##&lt;/a&gt;&lt;br /&gt;\n##ENDFOREACHinfocoms##&lt;/p&gt;');\";\n $queries['SoftwareLicense'] = \"INSERT INTO `glpi_notificationtemplatetranslations`\n VALUES(NULL, \".$templates['SoftwareLicense'].\", '',\n '##license.action## ##license.entity##',\n'##lang.license.entity## : ##license.entity##\\r\\n\n##FOREACHlicenses## \\r\\n\n##lang.license.item## : ##license.item##\\r\\n\n##lang.license.serial## : ##license.serial##\\r\\n\n##lang.license.expirationdate## : ##license.expirationdate##\\r\\n\n##license.url## \\r\\n ##ENDFOREACHlicenses##', '&lt;p&gt;\n##lang.license.entity## : ##license.entity##&lt;br /&gt;\n##FOREACHlicenses##\n&lt;br /&gt;##lang.license.item## : ##license.item##&lt;br /&gt;\n##lang.license.serial## : ##license.serial##&lt;br /&gt;\n##lang.license.expirationdate## : ##license.expirationdate##\n&lt;br /&gt; &lt;a href=\\\"##license.url##\\\"&gt; ##license.url##\n&lt;/a&gt;&lt;br /&gt; ##ENDFOREACHlicenses##&lt;/p&gt;');\";\n foreach ($queries as $itemtype => $query) {\n $DB->queryOrDie($query, \"0.78 insert notification template default translation for $itemtype\");\n }\n unset($queries);\n }\n\n $notifications = [];\n if (!$DB->tableExists('glpi_notifications')) {\n $query = \"CREATE TABLE `glpi_notifications` (\n `id` INT( 11 ) NOT NULL AUTO_INCREMENT ,\n `name` VARCHAR( 255 ) DEFAULT NULL ,\n `entities_id` INT( 11 ) NOT NULL DEFAULT '0',\n `itemtype` VARCHAR( 100 ) NOT NULL ,\n `event` VARCHAR( 255 ) NOT NULL ,\n `mode` VARCHAR( 255 ) NOT NULL ,\n `notificationtemplates_id` INT( 11 ) NOT NULL DEFAULT '0',\n `comment` TEXT DEFAULT NULL ,\n `is_recursive` TINYINT( 1 ) NOT NULL DEFAULT '0',\n `is_active` TINYINT( 1 ) NOT NULL DEFAULT '0',\n `date_mod` DATETIME DEFAULT NULL ,\n PRIMARY KEY ( `id` ),\n KEY `name` (`name`),\n KEY `itemtype` (`itemtype`),\n KEY `entities_id` (`entities_id`),\n KEY `is_active` (`is_active`),\n KEY `date_mod` (`date_mod`),\n KEY `is_recursive` (`is_recursive`),\n KEY `notificationtemplates_id` (`notificationtemplates_id`)\n ) ENGINE = MYISAM CHARSET utf8 COLLATE utf8_unicode_ci;\";\n $DB->queryOrDie($query, \"0.78 create glpi_notifications\");\n\n $queries = [];\n $queries[] = \"INSERT INTO `glpi_notifications`\n VALUES (NULL, 'Alert Tickets not closed', 0, 'Ticket', 'alertnotclosed',\n 'mail',\".$templates['Ticket3'].\", '', 1, 1, NOW())\";\n\n $queries[] = \"INSERT INTO `glpi_notifications`\n VALUES (NULL, 'New Ticket', 0, 'Ticket', 'new', 'mail',\n \".$templates['Ticket'].\", '', 1, 1, NOW())\";\n\n $queries[] = \"INSERT INTO `glpi_notifications`\n VALUES (NULL, 'Update Ticket', 0, 'Ticket', 'update', 'mail',\n \".$templates['Ticket'].\", '', 1, 1, NOW())\";\n\n $queries[] = \"INSERT INTO `glpi_notifications`\n VALUES (NULL, 'Close Ticket', 0, 'Ticket', 'closed', 'mail',\n \".$templates['Ticket'].\", '', 1, 1, NOW())\";\n\n $queries[] = \"INSERT INTO `glpi_notifications`\n VALUES (NULL, 'Add Followup', 0, 'Ticket', 'add_followup', 'mail',\n \".$templates['Ticket'].\", '', 1, 1, NOW())\";\n\n $queries[] = \"INSERT INTO `glpi_notifications`\n VALUES (NULL, 'Add Task', 0, 'Ticket', 'add_task', 'mail',\n \".$templates['Ticket'].\", '', 1, 1, NOW())\";\n\n $queries[] = \"INSERT INTO `glpi_notifications`\n VALUES (NULL, 'Update Followup', 0, 'Ticket', 'update_followup', 'mail',\n \".$templates['Ticket'].\", '', 1, 1, NOW())\";\n\n $queries[] = \"INSERT INTO `glpi_notifications`\n VALUES (NULL, 'Update Task', 0, 'Ticket', 'update_task', 'mail',\n \".$templates['Ticket'].\", '', 1, 1, NOW())\";\n\n $queries[] = \"INSERT INTO `glpi_notifications`\n VALUES (NULL, 'Delete Followup', 0, 'Ticket', 'delete_followup', 'mail',\n \".$templates['Ticket'].\", '', 1, 1, NOW())\";\n\n $queries[] = \"INSERT INTO `glpi_notifications`\n VALUES (NULL, 'Delete Task', 0, 'Ticket', 'delete_task', 'mail',\n \".$templates['Ticket'].\", '', 1, 1, NOW())\";\n\n $queries[] = \"INSERT INTO `glpi_notifications`\n VALUES (NULL, 'Resolve ticket', 0, 'Ticket', 'solved', 'mail',\n \".$templates['Ticket'].\", '', 1, 1, NOW())\";\n\n $queries[] = \"INSERT INTO `glpi_notifications`\n VALUES (NULL, 'Ticket Validation', 0, 'Ticket', 'validation', 'mail',\n \".$templates['TicketValidation'].\", '', 1, 1, NOW())\";\n\n $queries[] = \"INSERT INTO `glpi_notifications`\n VALUES (NULL, 'New Reservation', 0, 'Reservation', 'new', 'mail',\n \".$templates['Reservation'].\", '', 1, 1, NOW())\";\n\n $queries[] = \"INSERT INTO `glpi_notifications`\n VALUES (NULL, 'Update Reservation', 0, 'Reservation', 'update', 'mail',\n \".$templates['Reservation'].\", '', 1, 1, NOW())\";\n\n $queries[] = \"INSERT INTO `glpi_notifications`\n VALUES (NULL, 'Delete Reservation', 0, 'Reservation', 'delete', 'mail',\n \".$templates['Reservation'].\", '', 1, 1, NOW())\";\n\n $queries[] = \"INSERT INTO `glpi_notifications`\n VALUES (NULL, 'Alert Reservation', 0, 'Reservation', 'alert', 'mail',\n \".$templates['Reservation2'].\", '', 1, 1, NOW())\";\n\n $queries[] = \"INSERT INTO `glpi_notifications`\n VALUES (NULL, 'Contract Notice', 0, 'Contract', 'notice', 'mail',\n \".$templates['Contract'].\", '', 1, 1, NOW())\";\n\n $queries[] = \"INSERT INTO `glpi_notifications`\n VALUES (NULL, 'Contract End', 0, 'Contract', 'end', 'mail',\n \".$templates['Contract'].\", '', 1, 1, NOW())\";\n\n $queries[] = \"INSERT INTO `glpi_notifications`\n VALUES (NULL, 'MySQL Synchronization', 0, 'DBConnection', 'desynchronization',\n 'mail',\".$templates['DBConnection'].\", '', 1, 1, NOW())\";\n\n $queries[] = \"INSERT INTO `glpi_notifications`\n VALUES (NULL, 'Cartridges', 0, 'Cartridge', 'alert', 'mail',\n \".$templates['Cartridge'].\", '', 1, 1, NOW())\";\n\n $queries[] = \"INSERT INTO `glpi_notifications`\n VALUES (NULL, 'Consumables', 0, 'Consumable', 'alert', 'mail',\n \".$templates['Consumable'].\", '', 1, 1, NOW())\";\n\n $queries[] = \"INSERT INTO `glpi_notifications`\n VALUES (NULL, 'Infocoms', 0, 'Infocom', 'alert', 'mail',\n \".$templates['Infocom'].\", '', 1, 1, NOW())\";\n\n $queries[] = \"INSERT INTO `glpi_notifications`\n VALUES (NULL, 'Software Licenses', 0, 'SoftwareLicense', 'alert', 'mail',\n \".$templates['SoftwareLicense'].\", '', 1, 1, NOW())\";\n\n foreach ($queries as $query) {\n $DB->queryOrDie($query, \"0.78 insert notification\");\n }\n\n $ADDTODISPLAYPREF['Notification'] = [5, 6, 2, 4, 80, 86];\n unset($queries);\n }\n\n if (!$DB->tableExists('glpi_notificationtargets') && $DB->tableExists('glpi_mailingsettings')) {\n $query = \"RENAME TABLE `glpi_mailingsettings` TO `glpi_notificationtargets`;\";\n $DB->queryOrDie($query, \"0.78 rename table glpi_mailingsettings in glpi_notificationtargets\");\n\n $query = \"ALTER TABLE `glpi_notificationtargets`\n ADD `notifications_id` INT( 11 ) NOT NULL DEFAULT '0',\n ADD INDEX `notifications_id` (`notifications_id`)\";\n $DB->queryOrDie($query, \"0.78 add field notifications_id to glpi_notificationtargets\");\n\n $query = \"ALTER TABLE `glpi_notificationtargets`\n CHANGE `type` `oldtype` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci\n NULL DEFAULT NULL\";\n $DB->queryOrDie($query, \"0.78 change field type in oldtype\");\n\n $query = \"ALTER TABLE `glpi_notificationtargets`\n CHANGE `mailingtype` `type` INT( 11 ) NOT NULL DEFAULT '0'\";\n $DB->queryOrDie($query, \"0.78 change field mailingtype in type\");\n\n $fields = ['new' => ['itemtype' => 'Ticket',\n 'newaction' => 'new'],\n 'update' => ['itemtype' => 'Ticket',\n 'newaction' => 'update'],\n 'finish' => ['itemtype' => 'Ticket',\n 'newaction' => 'closed'],\n 'resa' => ['itemtype' => 'Reservation',\n 'newaction' => 'new'],\n 'followup' => ['itemtype' => 'Ticket',\n 'newaction' => 'add_followup'],\n 'alertconsumable' => ['itemtype' => 'Consumable',\n 'newaction' => 'alert'],\n 'alertcartridge' => ['itemtype' => 'Cartridge',\n 'newaction' => 'alert'],\n 'alertlicense' => ['itemtype' => 'SoftwareLicense',\n 'newaction' => 'alert'],\n 'alertinfocom' => ['itemtype' => 'Infocom',\n 'newaction' => 'alert'],\n 'alertcontract' => ['itemtype' => 'Contract',\n 'newaction' => 'end']];\n\n $query = \"SELECT `oldtype`\n FROM `glpi_notificationtargets`\n GROUP BY `oldtype`\";\n foreach ($DB->request($query) as $data) {\n\n $infos = $fields[$data['oldtype']];\n $query_type = \"SELECT `id`\n FROM `glpi_notifications`\n WHERE `itemtype`='\".$infos['itemtype'].\"'\n AND `event`='\".$infos['newaction'].\"'\";\n $result = $DB->queryOrDie($query_type, \"0.78 get notificationtargets_id\");\n\n if ($DB->numrows($result)) {\n $id = $DB->result($result, 0, 'id');\n $query_update = \"UPDATE `glpi_notificationtargets`\n SET `notifications_id` = '$id'\n WHERE `oldtype` = '\".$data['oldtype'].\"'\";\n $DB->queryOrDie($query_update, \"0.78 set notificationtargets_id\");\n }\n }\n $query =\"ALTER TABLE `glpi_notificationtargets`\n DROP INDEX `unicity` \";\n $DB->queryOrDie($query, \"0.78 drop index unicity from glpi_notificationtargets\");\n\n $query = \"ALTER TABLE `glpi_notificationtargets`\n DROP `oldtype`\";\n $DB->queryOrDie($query, \"0.78 drop field oldtype in glpi_notificationtargets\");\n\n //Add administrator as target for MySQL Synchronization notification\n $query_type = \"SELECT `id`\n FROM `glpi_notifications`\n WHERE `itemtype` = 'DBConnection'\";\n $result = $DB->queryOrDie($query_type, \"0.78 get notificationtargets_id\");\n\n if ($DB->numrows($result)) {\n $id = $DB->result($result, 0, 'id');\n $query = \"INSERT INTO `glpi_notificationtargets`\n (`id`, `notifications_id`, `type`, `items_id`)\n VALUES (NULL, \".$id.\", 1, 1)\";\n $DB->queryOrDie($query, \"0.78 add target for dbsynchronization\");\n }\n\n //Add validator as target for Ticket Validation\n $query_type = \"SELECT `id`\n FROM `glpi_notifications`\n WHERE `itemtype` = 'Ticket'\n AND `event` = 'validation'\";\n $result = $DB->queryOrDie($query_type, \"0.78 get notificationtargets_id\");\n\n if ($DB->numrows($result)) {\n $id = $DB->result($result, 0, 'id');\n $query = \"INSERT INTO `glpi_notificationtargets`\n (`id`, `notifications_id`, `type`, `items_id`)\n VALUES (NULL, \".$id.\", 1, 14);\";\n $DB->queryOrDie($query, \"0.78 add target for Ticket Validation\");\n }\n\n //Manage Reservation update & delete\n $query_type = \"SELECT `id`\n FROM `glpi_notifications`\n WHERE `itemtype` = 'Reservation'\n AND `event` IN ('update', 'delete')\";\n foreach ($DB->request($query_type) as $data_resa) {\n\n $query_targets = \"SELECT `glpi_notificationtargets` . *\n FROM `glpi_notifications` ,\n `glpi_notificationtargets`\n WHERE `glpi_notifications`.`itemtype` = 'Reservation'\n AND `glpi_notifications`.`event` = 'new'\n AND `glpi_notificationtargets`.notifications_id\n = `glpi_notifications`.id\";\n\n foreach ($DB->request($query_targets) as $data_targets) {\n $query_insert = \"INSERT INTO `glpi_notificationtargets`\n (`id`, `notifications_id`, `type`, `items_id`)\n VALUES (NULL, \".$data_resa['id'].\", \".$data_targets['type'].\",\n \".$data_targets['items_id'].\");\";\n $DB->queryOrDie($query_insert, \"0.78 add target for reservations\");\n }\n }\n\n //Manage contract notice\n $query_type = \"SELECT `id`\n FROM `glpi_notifications`\n WHERE `itemtype` = 'Contract'\n AND `event` = 'notice'\";\n foreach ($DB->request($query_type) as $data_contract) {\n\n $query_targets = \"SELECT `glpi_notificationtargets`.*\n FROM `glpi_notifications` , `glpi_notificationtargets`\n WHERE `glpi_notifications`.`itemtype` = 'Contract'\n AND `glpi_notifications`.`event` = 'end'\n AND `glpi_notificationtargets`.notifications_id\n = `glpi_notifications`.id\";\n\n foreach ($DB->request($query_targets) as $data_targets) {\n $query_insert = \"INSERT INTO `glpi_notificationtargets`\n (`id`, `notifications_id`, `type`, `items_id`)\n VALUES (NULL, \".$data_contract['id'].\", \".$data_targets['type'].\",\n \".$data_targets['items_id'].\")\";\n $DB->queryOrDie($query_insert, \"0.78 add target for contract\");\n }\n }\n\n //Manage ticket tasks & followups\n $query_type = \"SELECT `id`\n FROM `glpi_notifications`\n WHERE `itemtype`='Ticket'\n AND `event` IN ('add_task', 'update_task', 'update_followup',\n 'delete_task', 'delete_followup')\";\n foreach ($DB->request($query_type) as $data_ticket) {\n\n $query_targets = \"SELECT `glpi_notificationtargets`.*\n FROM `glpi_notifications` ,\n `glpi_notificationtargets`\n WHERE `glpi_notifications`.`itemtype` = 'Ticket'\n AND `glpi_notifications`.`event` = 'add_followup'\n AND `glpi_notificationtargets`.notifications_id\n = `glpi_notifications`.id\";\n\n foreach ($DB->request($query_targets) as $data_targets) {\n $query_insert = \"INSERT INTO `glpi_notificationtargets`\n (`id`, `notifications_id`, `type`, `items_id`)\n VALUES (NULL, \".$data_ticket['id'].\", \".$data_targets['type'].\",\n \".$data_targets['items_id'].\");\";\n $DB->queryOrDie($query_insert, \"0.78 add target for tickets\");\n }\n }\n\n //Manage ticket solved\n $query_type = \"SELECT `id`\n FROM `glpi_notifications`\n WHERE `itemtype` = 'Ticket'\n AND `event` = 'solved'\";\n foreach ($DB->request($query_type) as $data_ticket) {\n\n $query_targets = \"SELECT `glpi_notificationtargets`.*\n FROM `glpi_notifications` ,\n `glpi_notificationtargets`\n WHERE `glpi_notifications`.`itemtype` = 'Ticket'\n AND `glpi_notifications`.`event` = 'closed'\n AND `glpi_notificationtargets`.notifications_id\n = `glpi_notifications`.id\";\n\n foreach ($DB->request($query_targets) as $data_targets) {\n $query_insert = \"INSERT INTO `glpi_notificationtargets`\n (`id`, `notifications_id`, `type`, `items_id`)\n VALUES (NULL, \".$data_ticket['id']. \", \".$data_targets['type'].\",\n \".$data_targets['items_id'].\")\";\n $DB->queryOrDie($query_insert, \"0.78 add target for tickets action solved\");\n }\n }\n\n }\n\n if (!$DB->fieldExists('glpi_profiles', 'notification', false)) {\n $query = \"ALTER TABLE `glpi_profiles`\n ADD `notification` CHAR( 1 ) NULL\";\n $DB->queryOrDie($query, \"0.78 add notification in glpi_profiles\");\n\n $query = \"UPDATE `glpi_profiles`\n SET `notification` = 'w'\n WHERE `config` ='w'\";\n\n $DB->queryOrDie($query, \"0.78 add notification write right user which have config right\");\n }\n\n if (!$DB->fieldExists('glpi_entitydatas', 'mailing_signature', false)) {\n $query = \"ALTER TABLE `glpi_entitydatas` ADD `mailing_signature` TEXT DEFAULT NULL ,\n ADD `cartridges_alert_repeat` INT( 11 ) NOT NULL DEFAULT '-1',\n ADD `consumables_alert_repeat` INT( 11 ) NOT NULL DEFAULT '-1',\n ADD `use_licenses_alert` TINYINT( 1 ) NOT NULL DEFAULT '-1',\n ADD `use_contracts_alert` TINYINT( 1 ) NOT NULL DEFAULT '-1',\n ADD `use_infocoms_alert` TINYINT( 1 ) NOT NULL DEFAULT '-1',\n ADD `use_reservations_alert` INT( 11 ) NOT NULL DEFAULT '-1',\n ADD `autoclose_delay` INT( 11 ) NOT NULL DEFAULT '-1',\n ADD `notclosed_delay` INT( 11 ) NOT NULL DEFAULT '-1'\";\n\n $DB->queryOrDie($query, \"0.78 add notifications fields in glpi_entitydatas\");\n }\n\n if (!$DB->fieldExists('glpi_configs', 'use_reservations_alert', false)) {\n $query = \"ALTER TABLE `glpi_configs`\n ADD `use_infocoms_alert` TINYINT( 1 ) NOT NULL DEFAULT '0',\n ADD `use_contracts_alert` TINYINT( 1 ) NOT NULL DEFAULT '0',\n ADD `use_reservations_alert` TINYINT( 1 ) NOT NULL DEFAULT '0',\n ADD `autoclose_delay` INT( 11 ) NOT NULL DEFAULT '0',\n ADD `notclosed_delay` INT( 11 ) NOT NULL DEFAULT '0'\";\n\n $DB->queryOrDie($query, \"0.78 add notifications fields in glpi_configs\");\n }\n\n if ($DB->tableExists('glpi_mailingsettings')) {\n $query = \"DROP TABLE `glpi_mailingsettings`;\";\n $DB->queryOrDie($query, \"0.78 drop table glpi_mailingsettings\");\n }\n\n $tables = ['glpi_infocoms' => __('Financial and administrative information'),\n 'glpi_reservationitems' => _n('Reservation', 'Reservations', 2),\n 'glpi_networkports' => _n('Network port', 'Network ports', 2)];\n foreach ($tables as $table => $label) {\n // Migrate infocoms entity information\n if (!$DB->fieldExists($table, 'entities_id', false)) {\n $migration->displayMessage(sprintf(__('Change of the database layout - %s'), $label));\n\n $query = \"ALTER TABLE `$table`\n ADD `entities_id` int(11) NOT NULL DEFAULT 0 AFTER `itemtype`,\n ADD `is_recursive` tinyint(1) NOT NULL DEFAULT 0 AFTER `entities_id`,\n ADD INDEX `entities_id` ( `entities_id` ),\n ADD INDEX `is_recursive` (`is_recursive`)\";\n\n $DB->queryOrDie($query, \"0.78 add entities_id and is_recursive in $table\");\n\n $entities = getAllDataFromTable('glpi_entities');\n $entities[0] = \"Root\";\n\n $query = \"SELECT DISTINCT `itemtype`\n FROM `$table`\";\n if ($result=$DB->query($query)) {\n if ($DB->numrows($result)>0) {\n while ($data = $DB->fetchAssoc($result)) {\n $migration->displayMessage(sprintf(__('Change of the database layout - %s'),\n sprintf(__('%1$s - %2$s'), $label,\n $data['itemtype'])));\n\n $itemtable = getTableForItemType($data['itemtype']);\n // ajout d'un contr??le pour voir si la table existe ( cas migration plugin non fait)\n if (!$DB->tableExists($itemtable)) {\n $migration->displayWarning(\"*** Skip : no table $itemtable ***\", true);\n continue;\n }\n $do_recursive = false;\n if ($DB->fieldExists($itemtable, 'is_recursive', false)) {\n $do_recursive = true;\n }\n // This is duplicated in Plugin::migrateItemType() for plugin object\n foreach ($entities as $entID => $val) {\n if ($do_recursive) {\n // Non recursive ones\n $query3 = \"UPDATE `$table`\n SET `entities_id` = $entID,\n `is_recursive` = 0\n WHERE `itemtype` = '\".$data['itemtype'].\"'\n AND `items_id` IN (SELECT `id`\n FROM `$itemtable`\n WHERE `entities_id` = $entID\n AND `is_recursive` = 0)\";\n $DB->queryOrDie($query3, \"0.78 update entities_id and is_recursive=0 in $table for \".\n $data['itemtype']);\n\n // Recursive ones\n $query3 = \"UPDATE `$table`\n SET `entities_id` = $entID,\n `is_recursive` = 1\n WHERE `itemtype` = '\".$data['itemtype'].\"'\n AND `items_id` IN (SELECT `id`\n FROM `$itemtable`\n WHERE `entities_id` = $entID\n AND `is_recursive` = 1)\";\n $DB->queryOrDie($query3, \"0.78 update entities_id and is_recursive=1 in $table for \".\n $data['itemtype']);\n } else {\n $query3 = \"UPDATE `$table`\n SET `entities_id` = $entID\n WHERE `itemtype` = '\".$data['itemtype'].\"'\n AND `items_id` IN (SELECT `id`\n FROM `$itemtable`\n WHERE `entities_id` = $entID)\";\n $DB->queryOrDie($query3, \"0.78 update entities_id in $table for \".$data['itemtype']);\n }\n }\n }\n }\n }\n }\n }\n\n // Migrate consumable and cartridge and computerdisks entity information\n $items = ['glpi_cartridges' => 'glpi_cartridgeitems',\n 'glpi_consumables' => 'glpi_consumableitems',\n 'glpi_computerdisks' => 'glpi_computers'];\n foreach ($items as $linkitem => $sourceitem) {\n if (!$DB->fieldExists($linkitem, 'entities_id', false)) {\n $migration->displayMessage(sprintf(__('Change of the database layout - %s'), $linkitem));\n\n $query = \"ALTER TABLE `$linkitem`\n ADD `entities_id` int(11) NOT NULL DEFAULT 0 AFTER `id`,\n ADD INDEX `entities_id` ( `entities_id` )\";\n\n $DB->queryOrDie($query, \"0.78 add entities_id in $linkitem\");\n\n $entities = getAllDataFromTable('glpi_entities');\n $entities[0] = \"Root\";\n\n foreach ($entities as $entID => $val) {\n $query3 = \"UPDATE `$linkitem`\n SET `entities_id` = '$entID'\n WHERE \".getForeignKeyFieldForTable($sourceitem).\"\n IN (SELECT `id`\n FROM `$sourceitem`\n WHERE `entities_id` = '$entID' )\";\n $DB->queryOrDie($query3, \"0.78 update entities_id in $linkitem\");\n }\n }\n }\n\n // Migrate softwareversions entity information\n if (!$DB->fieldExists('glpi_softwareversions', 'entities_id', false)) {\n $migration->displayMessage(sprintf(__('Change of the database layout - %s'),\n 'glpi_softwareversions'));\n\n $query = \"ALTER TABLE `glpi_softwareversions`\n ADD `entities_id` int(11) NOT NULL DEFAULT 0 AFTER `id`,\n ADD INDEX `entities_id` ( `entities_id` ),\n ADD `is_recursive` tinyint(1) NOT NULL DEFAULT 0 AFTER `entities_id`,\n ADD INDEX `is_recursive` ( `is_recursive` )\";\n\n $DB->queryOrDie($query, \"0.78 add entities_id in glpi_softwareversion\");\n\n $entities = getAllDataFromTable('glpi_entities');\n $entities[0] = \"Root\";\n\n foreach ($entities as $entID => $val) {\n // Non recursive ones\n $query3 = \"UPDATE `glpi_softwareversions`\n SET `entities_id` = $entID,\n `is_recursive` = 0\n WHERE `softwares_id` IN (SELECT `id`\n FROM `glpi_softwares`\n WHERE `entities_id` = $entID\n AND `is_recursive` = 0)\";\n $DB->queryOrDie($query3, \"0.78 update entities_id and is_recursive=0 in glpi_softwareversions\");\n\n // Recursive ones\n $query3 = \"UPDATE `glpi_softwareversions`\n SET `entities_id` = $entID,\n `is_recursive` = 1\n WHERE `softwares_id` IN (SELECT `id`\n FROM `glpi_softwares`\n WHERE `entities_id` = $entID\n AND `is_recursive` = 1)\";\n $DB->queryOrDie($query3, \"0.78 update entities_id and is_recursive=1 in glpi_softwareversions\");\n }\n }\n\n $migration->displayMessage(sprintf(__('Change of the database layout - %s'),\n 'glpi_mailcollectors'));\n\n if (!$DB->fieldExists(\"glpi_mailcollectors\", \"is_active\", false)) {\n $query = \"ALTER TABLE `glpi_mailcollectors`\n ADD `is_active` tinyint( 1 ) NOT NULL DEFAULT '1',\n ADD INDEX `is_active` (`is_active`) \";\n\n $DB->queryOrDie($query, \"0.78 add is_active in glpi_mailcollectors\");\n }\n\n if (!$DB->fieldExists('glpi_mailcollectors', 'date_mod', false)) {\n $query = \"ALTER TABLE `glpi_mailcollectors`\n ADD `date_mod` DATETIME NULL, ADD INDEX `date_mod` (`date_mod`)\";\n\n $DB->queryOrDie($query, \"0.78 add date_mod to glpi_mailcollectors\");\n }\n\n if (!$DB->fieldExists('glpi_mailcollectors', 'comment', false)) {\n $query = \"ALTER TABLE `glpi_mailcollectors`\n ADD `comment` text collate utf8_unicode_ci\";\n\n $DB->queryOrDie($query, \"0.78 add comment to glpi_mailcollectors\");\n }\n\n if (!$DB->fieldExists('glpi_profiles', 'rule_mailcollector', false)) {\n $query = \"ALTER TABLE `glpi_profiles`\n ADD `rule_mailcollector` CHAR( 1 ) NULL \";\n\n $DB->queryOrDie($query, \"0.78 add rule_mailcollector to glpi_profiles\");\n\n $query = \"UPDATE `glpi_profiles`\n SET `rule_mailcollector` = `rule_ticket`\";\n\n $DB->queryOrDie($query, \"0.78 set default rule_mailcollector same as rule_ticket\");\n }\n\n // Change search pref : add active / date_mod\n $ADDTODISPLAYPREF['MailCollector'] = [2, 19];\n\n $migration->displayMessage(sprintf(__('Change of the database layout - %s'), 'glpi_authldaps'));\n\n if (!$DB->fieldExists('glpi_authldaps', 'date_mod', false)) {\n $query = \"ALTER TABLE `glpi_authldaps`\n ADD `date_mod` DATETIME NULL,\n ADD INDEX `date_mod` (`date_mod`)\";\n\n $DB->queryOrDie($query, \"0.78 add date_mod to glpi_authldaps\");\n }\n\n if (!$DB->fieldExists('glpi_authldaps', 'comment', false)) {\n $query = \"ALTER TABLE `glpi_authldaps`\n ADD `comment` text collate utf8_unicode_ci\";\n\n $DB->queryOrDie($query, \"0.78 add comment to glpi_authldaps\");\n }\n\n // Change search pref : host, date_mod\n $ADDTODISPLAYPREF['AuthLDAP'] = [3, 19];\n\n $migration->displayMessage(sprintf(__('Change of the database layout - %s'), 'glpi_authldaps'));\n\n if (!$DB->fieldExists('glpi_authmails', 'date_mod', false)) {\n $query = \"ALTER TABLE `glpi_authmails`\n ADD `date_mod` DATETIME NULL,\n ADD INDEX `date_mod` (`date_mod`)\";\n\n $DB->queryOrDie($query, \"0.78 add date_mod to glpi_authmails\");\n }\n\n if (!$DB->fieldExists('glpi_authmails', 'comment', false)) {\n $query = \"ALTER TABLE `glpi_authmails`\n ADD `comment` text collate utf8_unicode_ci\";\n\n $DB->queryOrDie($query, \"0.78 add comment to glpi_authmails\");\n }\n\n // Change search pref : host, date_mod\n $ADDTODISPLAYPREF['AuthMail'] = [3, 19];\n\n $migration->displayMessage(sprintf(__('Change of the database layout - %s'), 'glpi_ocsservers'));\n\n if (!$DB->fieldExists('glpi_ocsservers', 'date_mod', false)) {\n $query = \"ALTER TABLE `glpi_ocsservers`\n ADD `date_mod` DATETIME NULL,\n ADD INDEX `date_mod` (`date_mod`)\";\n\n $DB->queryOrDie($query, \"0.78 add date_mod to glpi_ocsservers\");\n }\n\n if (!$DB->fieldExists('glpi_ocsservers', 'comment', false)) {\n $query = \"ALTER TABLE `glpi_ocsservers`\n ADD `comment` text collate utf8_unicode_ci\";\n\n $DB->queryOrDie($query, \"0.78 add comment to glpi_ocsservers\");\n }\n // Change search pref : date_mod / host\n $ADDTODISPLAYPREF['OcsServer'] = [3, 19];\n\n $migration->displayMessage(sprintf(__('Change of the database layout - %s'), 'glpi_profiles'));\n\n if (!$DB->fieldExists('glpi_profiles', 'date_mod', false)) {\n $query = \"ALTER TABLE `glpi_profiles`\n ADD `date_mod` DATETIME NULL,\n ADD INDEX `date_mod` (`date_mod`)\";\n\n $DB->queryOrDie($query, \"0.78 add date_mod to glpi_profiles\");\n }\n\n if (!$DB->fieldExists('glpi_profiles', 'comment', false)) {\n $query = \"ALTER TABLE `glpi_profiles`\n ADD `comment` text collate utf8_unicode_ci\";\n\n $DB->queryOrDie($query, \"0.78 add comment to glpi_profiles\");\n }\n\n // Change search pref : date_mod / host\n $ADDTODISPLAYPREF['Profile'] = [2, 3, 19];\n\n $migration->displayMessage(sprintf(__('Change of the database layout - %s'), 'glpi_printers'));\n\n if (!$DB->fieldExists('glpi_printers', 'have_ethernet', false)) {\n $query = \"ALTER TABLE `glpi_printers`\n ADD `have_ethernet` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `have_usb`\";\n\n $DB->queryOrDie($query, \"0.78 add have_ethernet to glpi_printers\");\n }\n\n if (!$DB->fieldExists('glpi_printers', 'have_wifi', false)) {\n $query = \"ALTER TABLE `glpi_printers`\n ADD `have_wifi` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `have_usb`\";\n\n $DB->queryOrDie($query, \"0.78 add have_wifi to glpi_printers\");\n }\n\n $migration->displayMessage(sprintf(__('Change of the database layout - %s'), 'glpi_profiles'));\n\n if (!$DB->fieldExists('glpi_transfers', 'date_mod', false)) {\n $query = \"ALTER TABLE `glpi_transfers`\n ADD `date_mod` DATETIME NULL,\n ADD INDEX `date_mod` (`date_mod`)\";\n\n $DB->queryOrDie($query, \"0.78 add date_mod to glpi_transfers\");\n }\n\n if (!$DB->fieldExists('glpi_transfers', 'comment', false)) {\n $query = \"ALTER TABLE `glpi_transfers`\n ADD `comment` text collate utf8_unicode_ci\";\n\n $DB->queryOrDie($query, \"0.78 add comment to glpi_transfers\");\n }\n // Change search pref : date_mod\n $ADDTODISPLAYPREF['Transfer']=[19];\n\n // Convert events\n $migration->displayMessage(sprintf(__('Data migration - %s'), 'glpi_events'));\n\n $convert_types = ['tracking' => 'ticket',\n 'networking' => 'networkequipment',\n 'knowbase' => 'knowbaseitem',\n 'typedocs' => 'documenttype',\n 'mailgate' => 'mailcollector'];\n\n foreach ($convert_types as $from =>$to) {\n $query2 = \"UPDATE `glpi_events`\n SET `type` = '$to'\n WHERE `type` = '$from'\";\n\n $DB->queryOrDie($query2, \"0.78 update events data\");\n }\n\n $migration->displayMessage(sprintf(__('Data migration - %s'), 'ticket bookmarks'));\n\n $query = \"SELECT *\n FROM `glpi_bookmarks`\n WHERE `itemtype` = 'Ticket'\n AND `type` = '\".Bookmark::SEARCH.\"'\";\n\n if ($result = $DB->query($query)) {\n if ($DB->numrows($result)>0) {\n while ($data = $DB->fetchAssoc($result)) {\n $num = 0;\n $num2 = 0;\n $options = [];\n parse_str($data[\"query\"], $options);\n $newoptions = [];\n\n foreach ($options as $key => $val) {\n switch ($key) {\n case \"status\" :\n $newoptions['field'][$num] = 12;\n $newoptions['searchtype'][$num] = 'equals';\n $newoptions['link'][$num] = 'AND';\n if ($val=='old_done' || $val=='old_notdone') {\n $newoptions['contains'][$num] = 'closed';\n } else {\n $newoptions['contains'][$num] = $val;\n }\n $num++;\n break;\n\n case \"priority\" :\n if ($val!=0) {\n $newoptions['field'][$num] = 3;\n $newoptions['searchtype'][$num] = 'equals';\n $newoptions['contains'][$num] = $val;\n $newoptions['link'][$num] = 'AND';\n $num++;\n }\n break;\n\n case \"category\" :\n if ($val>0) {\n $newoptions['field'][$num] = 7;\n $newoptions['searchtype'][$num] = 'equals';\n $newoptions['contains'][$num] = $val;\n $newoptions['link'][$num] = 'AND';\n $num++;\n }\n break;\n\n case \"request_type\" :\n if ($val>0) {\n $newoptions['field'][$num] = 9;\n $newoptions['searchtype'][$num] = 'equals';\n $newoptions['contains'][$num] = $val;\n $newoptions['link'][$num] = 'AND';\n $num++;\n }\n break;\n\n case \"type\" :\n if ($val>0 && isset($data['item']) && $data['item']>0) {\n $newoptions['itemtype2'][$num2] = $typetoname[$val];\n $newoptions['field2'][$num2] = 1;\n $newoptions['searchtype2'][$num2] = 'equals';\n $newoptions['contains2'][$num2] = $data['item'];\n $newoptions['link2'][$num2] = 'AND';\n $num2++;\n }\n break;\n\n case \"author\" :\n if ($val>0) {\n $newoptions['field'][$num] = 4;\n $newoptions['searchtype'][$num] = 'equals';\n $newoptions['contains'][$num] = $val;\n $newoptions['link'][$num] = 'AND';\n $num++;\n }\n break;\n\n case \"group\" :\n if ($val>0) {\n $newoptions['field'][$num] = 71;\n $newoptions['searchtype'][$num] = 'equals';\n $newoptions['contains'][$num] = $val;\n $newoptions['link'][$num] = 'AND';\n $num++;\n }\n break;\n\n case \"assign\" :\n if ($val>0) {\n $newoptions['field'][$num] = 5;\n $newoptions['searchtype'][$num] = 'equals';\n $newoptions['contains'][$num] = $val;\n $newoptions['link'][$num] = 'AND';\n $num++;\n }\n break;\n\n case \"assign_group\" :\n if ($val>0) {\n $newoptions['field'][$num] = 8;\n $newoptions['searchtype'][$num] = 'equals';\n $newoptions['contains'][$num] = $val;\n $newoptions['link'][$num] = 'AND';\n $num++;\n }\n break;\n\n case \"assign_ent\" :\n if ($val>0) {\n $newoptions['field'][$num] = 6;\n $newoptions['searchtype'][$num] = 'equals';\n $newoptions['contains'][$num] = $val;\n $newoptions['link'][$num] = 'AND';\n $num++;\n }\n break;\n\n case \"recipient\" :\n if ($val>0) {\n $newoptions['field'][$num] = 22;\n $newoptions['searchtype'][$num] = 'equals';\n $newoptions['contains'][$num] = $val;\n $newoptions['link'][$num] = 'AND';\n $num++;\n }\n break;\n\n case \"date1\" : // begin from\n if (strlen($val)>0 && $val!='NULL') {\n $newoptions['field'][$num] = 15;\n $newoptions['searchtype'][$num] = 'contains';\n $newoptions['contains'][$num] = '&gt;='.$val;\n $newoptions['link'][$num] = 'AND';\n $num++;\n }\n break;\n\n case \"date2\" : // begin to\n if (strlen($val)>0 && $val!='NULL') {\n $newoptions['field'][$num] = 15;\n $newoptions['searchtype'][$num] = 'contains';\n $newoptions['contains'][$num] = '&lt;='.$val;\n $newoptions['link'][$num] = 'AND';\n $num++;\n }\n break;\n\n case \"enddate1\" : // end from\n if (strlen($val)>0 && $val!='NULL') {\n $newoptions['field'][$num] = 16;\n $newoptions['searchtype'][$num] = 'contains';\n $newoptions['contains'][$num] = '&gt;='.$val;\n $newoptions['link'][$num] = 'AND';\n $num++;\n }\n break;\n\n case \"enddate2\" : // end to\n if (strlen($val)>0 && $val!='NULL') {\n $newoptions['field'][$num] = 16;\n $newoptions['searchtype'][$num] = 'contains';\n $newoptions['contains'][$num] = '&lt;='.$val;\n $newoptions['link'][$num] = 'AND';\n $num++;\n }\n break;\n\n case \"datemod1\" : // mod from\n if (strlen($val)>0 && $val!='NULL') {\n $newoptions['field'][$num] = 19;\n $newoptions['searchtype'][$num] = 'contains';\n $newoptions['contains'][$num] = '&gt;='.$val;\n $newoptions['link'][$num] = 'AND';\n $num++;\n }\n break;\n\n case \"datemod2\" : // mod to\n if (strlen($val)>0 && $val!='NULL') {\n $newoptions['field'][$num] = 19;\n $newoptions['searchtype'][$num] = 'contains';\n $newoptions['contains'][$num] = '&lt;='.$val;\n $newoptions['link'][$num] = 'AND';\n $num++;\n }\n break;\n\n case \"tosearch\" :\n if (isset($data['search'])) {\n $search=trim($data['search']);\n if (strlen($search) > 0) {\n $first=false;\n if (strstr($data['search'], 'name')) {\n $newoptions['field'][$num] = 1;\n $newoptions['searchtype'][$num] = 'contains';\n $newoptions['contains'][$num] = $val;\n $newoptions['link'][$num] = ($first?'AND':'OR');\n $first=false;\n $num++;\n }\n if (strstr($data['search'], 'contents')) {\n $newoptions['field'][$num] = 21;\n $newoptions['searchtype'][$num] = 'contains';\n $newoptions['contains'][$num] = $val;\n $newoptions['link'][$num] = ($first?'AND':'OR');\n $first=false;\n $num++;\n }\n if (strstr($data['search'], 'followup')) {\n $newoptions['field'][$num] = 25;\n $newoptions['searchtype'][$num] = 'contains';\n $newoptions['contains'][$num] = $val;\n $newoptions['link'][$num] = ($first?'AND':'OR');\n $first=false;\n $num++;\n }\n if (strstr($data['search'], 'ID')) {\n $newoptions['field'][$num] = 2;\n $newoptions['searchtype'][$num] = 'contains';\n $newoptions['contains'][$num] = $val;\n $newoptions['link'][$num] = 'AND';\n $first=false;\n $num++;\n }\n }\n }\n break;\n }\n }\n\n if ($num>0 || $num2 >0) {\n $newoptions['glpisearchcount']=$num;\n $newoptions['glpisearchcount2']=$num2;\n $newoptions['itemtype']='Ticket';\n $query2 = \"UPDATE `glpi_bookmarks`\n SET `query` = '\".addslashes(Toolbox::append_params($newoptions)).\"'\n WHERE `id` = '\".$data['id'].\"'\";\n\n $DB->queryOrDie($query2, \"0.78 update ticket bookmarks\");\n\n } else {\n $query2 = \"DELETE\n FROM `glpi_bookmarks`\n WHERE `id` = '\".$data['id'].\"'\";\n\n $DB->queryOrDie($query2, \"0.78 delete ticket bookmarks : cannot convert\");\n }\n // Lost paramaters\n //only_computers=1&contains=dddd&field=moboard.designation&\n }\n }\n }\n\n if (!$DB->tableExists('glpi_ticketvalidations')) {\n $query = \"CREATE TABLE `glpi_ticketvalidations` (\n `id` int(11) NOT NULL auto_increment,\n `entities_id` int(11) NOT NULL default '0',\n `users_id` int(11) NOT NULL default '0',\n `tickets_id` int(11) NOT NULL default '0',\n `users_id_validate` int(11) NOT NULL default '0',\n `comment_submission` text collate utf8_unicode_ci,\n `comment_validation` text collate utf8_unicode_ci,\n `status` varchar(255) collate utf8_unicode_ci default 'waiting',\n `submission_date` datetime default NULL,\n `validation_date` datetime default NULL,\n PRIMARY KEY (`id`),\n KEY `entities_id` (`entities_id`),\n KEY `users_id` (`users_id`),\n KEY `users_id_validate` (`users_id_validate`),\n KEY `tickets_id` (`tickets_id`),\n KEY `submission_date` (`submission_date`),\n KEY `validation_date` (`validation_date`),\n KEY `status` (`status`)\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci\";\n\n $DB->queryOrDie($query, \"0.78 create glpi_ticketvalidations\");\n\n $ADDTODISPLAYPREF['TicketValidation'] = [3, 2, 8, 4, 9, 7];\n }\n\n if (!$DB->fieldExists('glpi_tickets', 'global_validation', false)) {\n $query = \"ALTER TABLE `glpi_tickets`\n ADD `global_validation` varchar(255) collate utf8_unicode_ci default 'accepted',\n ADD INDEX `global_validation` (`global_validation`)\";\n\n $DB->queryOrDie($query, \"0.78 add global_validation to glpi_tickets\");\n }\n\n if (!$DB->fieldExists('glpi_profiles', 'validate_ticket', false)) {\n $query = \"ALTER TABLE `glpi_profiles`\n ADD `validate_ticket` char(1) collate utf8_unicode_ci default NULL\";\n\n $DB->queryOrDie($query, \"0.78 add validate_ticket to glpi_profiles\");\n\n $query = \"UPDATE `glpi_profiles`\n SET `validate_ticket` = '1'\n WHERE `interface` = 'central' \";\n\n $DB->queryOrDie($query, \"0.78 add validate_ticket write right to super-admin and admin profiles\");\n\n $query = \"ALTER TABLE `glpi_profiles`\n ADD `create_validation` char(1) collate utf8_unicode_ci default NULL\";\n\n $DB->queryOrDie($query, \"0.78 add create_validation to glpi_profiles\");\n\n $query = \"UPDATE `glpi_profiles`\n SET `create_validation` = `own_ticket`\";\n\n $DB->queryOrDie($query, \"0.78 add create_validation right if can own ticket\");\n }\n\n if ($DB->fieldExists('glpi_mailcollectors', 'entities_id', false)) {\n $ranking = 1;\n\n // No mailcollector : set a default rule\n if (countElementsInTable('glpi_mailcollectors') == 0) {\n $query = \"INSERT INTO `glpi_rules`\n VALUES (NULL, -1, 'RuleMailCollector', $ranking, 'Root', '', 'OR', 1, NULL,\n NULL)\";\n\n $DB->queryOrDie($query, \"0.78 error inserting new default maigate rule\");\n\n if ($newID = $DB->insertId()) {\n $query = \"INSERT INTO `glpi_rulecriterias`\n VALUES (NULL, $newID, 'subject', 6, '/.*/')\";\n\n $DB->queryOrDie($query, \"0.78 error getting new criteria for rule\");\n\n $query = \"INSERT INTO `glpi_ruleactions`\n VALUES (NULL, $newID, 'assign', 'entities_id', '0')\";\n\n $DB->queryOrDie($query, \"0.78 error getting new action for rule\");\n }\n\n } else {\n $collectors = getAllDataFromTable('glpi_mailcollectors');\n foreach ($collectors as $collector) {\n $query = \"INSERT INTO `glpi_rules`\n VALUES (NULL, -1, 'RuleMailCollector', $ranking, '\".$collector['name'].\"', '',\n 'AND', 1, NULL, NULL)\";\n\n $DB->queryOrDie($query, \"0.78 error inserting new maigate rule \".$collector['name']);\n\n if ($newID = $DB->insertId()) {\n $query = \"INSERT INTO `glpi_rulecriterias`\n VALUES (NULL, $newID, 'mailcollector', 0, '\".$collector['id'].\"')\";\n\n $DB->queryOrDie($query, \"0.78 error getting new criteria for rule \".$collector['name']);\n\n $query = \"INSERT INTO `glpi_ruleactions`\n VALUES (NULL, $newID, 'assign', 'entities_id',\n '\".$collector['entities_id'].\"')\";\n\n $DB->queryOrDie($query, \"0.78 error getting new action for rule \".$collector['name']);\n }\n\n $ranking++;\n }\n }\n\n $query = \"ALTER TABLE `glpi_mailcollectors`\n DROP INDEX `entities_id` \";\n\n $DB->queryOrDie($query, \"0.78 drop index entities_id from glpi_mailcollectors\");\n\n $query = \"ALTER TABLE `glpi_mailcollectors`\n DROP `entities_id` \";\n\n $DB->queryOrDie($query, \"0.78 drop entities_id from glpi_mailcollectors\");\n\n $query = \"DELETE\n FROM `glpi_displaypreferences`\n WHERE `itemtype` = 'MailCollector'\n AND `num` = '80'\";\n\n $DB->queryOrDie($query, \"0.78 drop entities_id from collectors display preferences\");\n }\n\n if (!$DB->tableExists('glpi_notimportedemails')) {\n $query = \"CREATE TABLE `glpi_notimportedemails` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `from` varchar(255) NOT NULL,\n `to` varchar(255) NOT NULL,\n `mailcollectors_id` int(11) NOT NULL DEFAULT '0',\n `date` datetime NOT NULL,\n `subject` text,\n `messageid` varchar(255) NOT NULL,\n `reason` int(11) NOT NULL DEFAULT '0',\n `users_id` int(11) NOT NULL DEFAULT '0',\n PRIMARY KEY (`id`),\n KEY `users_id` (`users_id`),\n KEY `mailcollectors_id` (`mailcollectors_id`)\n ) ENGINE=MyISAM DEFAULT CHARSET=latin1;\";\n\n $DB->queryOrDie($query, \"0.78 add table glpi_notimportedemails\");\n\n $ADDTODISPLAYPREF['NotImportedEmail'] = [2, 5, 4, 6, 16, 19];\n }\n\n if (!$DB->fieldExists(\"glpi_profiles\", \"entity_rule_ticket\", false)) {\n $query = \"ALTER TABLE `glpi_profiles`\n ADD `entity_rule_ticket` CHAR( 1 ) NULL AFTER `rule_ticket`\";\n\n $DB->queryOrDie($query, \"0.78 add entity_rule_ldap in glpi_profiles\");\n\n $query = \"UPDATE `glpi_profiles`\n SET `entity_rule_ticket` = `rule_ticket`\";\n\n $DB->queryOrDie($query, \"0.78 update default entity_rule_ticket rights\");\n\n $query = \"UPDATE `glpi_profiles`\n SET `rule_ticket` = 'r'\n WHERE `rule_ticket` = 'w'\";\n\n $DB->queryOrDie($query, \"0.78 update rule_ticket rights\");\n }\n\n if (!$DB->fieldExists('glpi_authldaps', 'is_default', false)) {\n $query = \"ALTER TABLE `glpi_authldaps`\n ADD `is_default` TINYINT( 1 ) NOT NULL DEFAULT '0',\n ADD INDEX `is_default` (`is_default`)\";\n\n $DB->queryOrDie($query, \"0.78 add is_default to glpi_authldaps\");\n\n $query = \"SELECT COUNT(*) AS cpt\n FROM `glpi_authldaps`\";\n $result = $DB->query($query);\n $number_servers = $DB->result($result, 0, 'cpt');\n\n if ($number_servers >= 1) {\n //If only one server defined\n if ($number_servers==1) {\n $query = \"SELECT `id`\n FROM `glpi_authldaps`\";\n $result = $DB->query($query);\n $ldapservers_id = $DB->result($result, 0, 'id');\n } else {\n //If more than one server defined, get the most used\n $query = \"SELECT `auths_id`, COUNT(`auths_id`) AS cpt\n FROM `glpi_users`\n WHERE `authtype` = '3'\n GROUP BY `auths_id`\n ORDER BY `cpt` DESC\";\n $result = $DB->query($query);\n $ldapservers_id = $DB->result($result, 0, 'auths_id');\n }\n $query = \"UPDATE `glpi_authldaps`\n SET `is_default` = '1'\n WHERE `id` = '\".$ldapservers_id.\"'\";\n\n $DB->queryOrDie($query, \"0.78 set default directory\");\n }\n\n }\n\n if ($DB->tableExists('glpi_rulerightparameters')) {\n $query = \"ALTER TABLE `glpi_rulerightparameters`\n ADD `comment` TEXT NOT NULL \";\n\n $DB->queryOrDie($query, \"0.78 add comment to glpi_rulerightparameters\");\n $ADDTODISPLAYPREF['RuleRightParameter']=[11];\n }\n\n if (!$DB->fieldExists('glpi_rules', 'is_recursive', false)) {\n $query = \"ALTER TABLE `glpi_rules`\n ADD `is_recursive` TINYINT( 1 ) NOT NULL DEFAULT '0',\n ADD INDEX `is_recursive` (`is_recursive`)\";\n\n $DB->queryOrDie($query, \"0.78 add is_recursive to glpi_rules\");\n\n $query = \"UPDATE `glpi_rules`\n SET `entities_id` = '0'\n WHERE `entities_id` = '-1'\";\n\n $DB->queryOrDie($query, \"0.78 set entities_id to 0 where value is -1 in glpi_rules\");\n\n $query = \"UPDATE `glpi_rules`\n SET `is_recursive`='1'\n WHERE `sub_type` = 'RuleTicket'\";\n\n $DB->queryOrDie($query, \"0.78 set is_recursive to 1 for RuleTicket in glpi_rules\");\n }\n\n if (!$DB->fieldExists('glpi_configs', 'user_deleted_ldap', false)) {\n $query = \"ALTER TABLE `glpi_configs`\n ADD `user_deleted_ldap` TINYINT( 1 ) NOT NULL DEFAULT '0'\";\n\n $DB->queryOrDie($query, \"0.78 add user_deleted_ldap to glpi_configs\");\n }\n\n if (!$DB->fieldExists(\"glpi_profiles\", \"group_add_followup\", false)) {\n $query = \"ALTER TABLE `glpi_profiles`\n ADD `group_add_followups` CHAR(1) NULL AFTER `add_followups`\";\n\n $DB->queryOrDie($query, \"0.78 add budget in glpi_profiles\");\n\n $query = \"UPDATE `glpi_profiles`\n SET `group_add_followups`=`global_add_followups`\";\n\n $DB->queryOrDie($query, \"0.78 update default budget rights\");\n\n }\n\n if (!$DB->fieldExists(\"glpi_groups_users\", \"is_dynamic\", false)) {\n $query = \"ALTER TABLE `glpi_groups_users`\n ADD `is_dynamic` TINYINT( 1 ) NOT NULL DEFAULT '0'\";\n\n $DB->queryOrDie($query, \"0.78 add is_dynamic in glpi_groups_users\");\n\n //If group comes from an LDAP directory, then update users belonging to it\n //by setting is_dynamic to 1\n $query =\"UPDATE `glpi_groups_users` SET `is_dynamic`='1'\n WHERE groups_id IN (SELECT `id`\n FROM `glpi_groups`\n WHERE (`ldap_group_dn` IS NOT NULL AND `ldap_group_dn` <> '')\n OR ((`ldap_field` IS NOT NULL AND `ldap_field` <> '')\n AND (`ldap_value` IS NOT NULL AND `ldap_value` <> '')))\";\n $DB->queryOrDie($query, \"0.78 update is_dynamic in glpi_groups_users\");\n }\n\n $migration->displayMessage(sprintf(__('Data migration - %s'), 'glpi_displaypreferences'));\n\n // Add search values for tickets\n $ADDTODISPLAYPREF['Ticket'] = [12, 19, 15, 3, 4, 5, 7];\n\n foreach ($ADDTODISPLAYPREF as $type => $tab) {\n\n $query = \"SELECT DISTINCT `users_id`\n FROM `glpi_displaypreferences`\n WHERE `itemtype` = '$type'\";\n if ($result = $DB->query($query)) {\n if ($DB->numrows($result)>0) {\n while ($data = $DB->fetchAssoc($result)) {\n $query = \"SELECT max(`rank`)\n FROM `glpi_displaypreferences`\n WHERE `users_id` = '\".$data['users_id'].\"'\n AND `itemtype` = '$type'\";\n $result = $DB->query($query);\n $rank = $DB->result($result, 0, 0);\n $rank ++;\n foreach ($tab as $newval) {\n $query = \"SELECT *\n FROM `glpi_displaypreferences`\n WHERE `users_id` = '\".$data['users_id'].\"'\n AND `num` = '$newval'\n AND `itemtype` = '$type'\";\n if ($result2=$DB->query($query)) {\n if ($DB->numrows($result2)==0) {\n $query = \"INSERT INTO `glpi_displaypreferences`\n (`itemtype` ,`num` ,`rank` ,`users_id`)\n VALUES ('$type', '$newval', '\".$rank++.\"', '\".$data['users_id'].\"')\";\n $DB->query($query);\n }\n }\n }\n }\n\n } else { // Add for default user\n $rank = 1;\n foreach ($tab as $newval) {\n $query = \"INSERT INTO `glpi_displaypreferences`\n (`itemtype` ,`num` ,`rank` ,`users_id`)\n VALUES ('$type', '$newval', '\".$rank++.\"', '0')\";\n $DB->query($query);\n }\n }\n }\n }\n\n // must always be at the end (only for end message)\n $migration->executeMigration();\n\n return $updateresult;\n}", "title": "" }, { "docid": "c1570e7aad67ad2341035ea432952084", "score": "0.483902", "text": "protected function getStatesFromContentModerationField(): array\n {\n return $this->getWorkflowFromContentModerationField()?->getTypePlugin()?->getStates() ?? [];\n }", "title": "" }, { "docid": "de862df766a826e69ca83fe55e41afe0", "score": "0.48341477", "text": "public static function runMigrationScripts()\n {\n if (empty(static::$_migration)) {\n return;\n }\n if (!BDebug::i()->is('debug,development,migrate')) {\n return;\n }\n $modReg = BModuleRegistry::i();\n // initialize module tables\n // find all installed modules\n foreach (static::$_migration as $connectionName=>&$modules) {\n // collect module code versions\n foreach ($modules as $modName=>&$m) {\n if (($version = $modReg->module($modName)->version)) {\n $m['code_version'] = $version;\n $m['module_name'] = $modName;\n $m['connection_name'] = $connectionName;\n } else {\n unset($modules[$modName]);\n }\n }\n unset($m);\n\n if (!$modules) continue; // skip database if none of the modules needs migration\n\n BDb::connect($connectionName);\n BDbModule::init();\n $dbModules = BDbModule::i()->factory()->find_many();\n\n // collect module db schema versions\n foreach ($dbModules as $m) {\n if ($m->last_status==='INSTALLING') { // error during last installation\n $m->delete();\n continue;\n }\n $modules[$m->module_name]['schema_version'] = $m->schema_version;\n }\n\n // run required migration scripts\n foreach ($modules as $modName=>$mod) {\n if (empty($mod['code_version'])) {\n continue; // skip migration of registered module that is not current active\n }\n if (empty($mod['script'])) {\n BDebug::warning('No migration script found: '.$modName);\n continue;\n }\n $modReg->currentModule($modName);\n $script = $mod['script'];\n $module = $modReg->module($modName);\n static::$_migratingModule =& $mod;\n /*\n try {\n BDb::transaction();\n */\n BDebug::debug('DB.MIGRATE '.$script);\n if (is_callable($script)) {\n call_user_func($script);\n } elseif (is_file($module->root_dir.'/'.$script)) {\n include_once($module->root_dir.'/'.$script);\n } elseif (is_dir($module->root_dir.'/'.$script)) {\n //TODO: process directory of migration scripts\n } elseif (class_exists($script, true)) {\n $script::i()->run();\n }\n /*\n BDb::commit();\n } catch (Exception $e) {\n BDb::rollback();\n throw $e;\n }\n */\n }\n }\n unset($modules);\n $modReg->currentModule(null);\n static::$_migratingModule = null;\n }", "title": "" }, { "docid": "0e1ba125780cd55bda2469025cb86cd3", "score": "0.48267144", "text": "public function isMigrated()\n {\n return $this->migrated;\n }", "title": "" }, { "docid": "c48962cf306f17940d308f7b811a8cd0", "score": "0.4785268", "text": "public function getMigrations()\n\t{\n\t\treturn $this->migrations;\n\t}", "title": "" }, { "docid": "551730f8618399d7559fd7f3ce600f87", "score": "0.47811058", "text": "protected function loadMigrationTemplate() {\n\n $templateFile = $this->config->get('ardyn/zipcode::migration_file') ?: __DIR__.'/../../../migration_table.tpl';\n return file_get_contents($templateFile);\n\n }", "title": "" }, { "docid": "0769bcd080d948cffe7b5d0a3876dfa9", "score": "0.47446713", "text": "public function isMigrated();", "title": "" }, { "docid": "a5be3da32f6730a707fac36a780aa958", "score": "0.47256723", "text": "public function getMigrations()\n {\n return $this->migrations;\n }", "title": "" }, { "docid": "d64ddcd55407f56121f8b152be2da47f", "score": "0.47229603", "text": "public function getRanMigrations(): array;", "title": "" }, { "docid": "e74a747eeac0f235ff8a30467ec10658", "score": "0.4717999", "text": "public function fields_states(): array {\n\t\t$field_states = [];\n\t\t/**\n\t\t * Factory instance.\n\t\t *\n\t\t * @var Factory\n\t\t */\n\t\t$factory = $this->injector->make( Factory::class );\n\n\t\t$views = $this->get_layouts();\n\n\t\t$fields = [\n\t\t\t'title',\n\t\t\t'author',\n\t\t\t'date',\n\t\t\t'image_alignment',\n\t\t\t'excerpt',\n\t\t\t'sharp_corners',\n\t\t\t'archive_link',\n\t\t\t'circle_size',\n\t\t\t'number_of_columns',\n\t\t];\n\n\t\tforeach ( array_keys( $views ) as $view_type ) {\n\t\t\t$field_state = $factory->get_field( (string) $view_type );\n\t\t\tforeach ( $fields as $field ) {\n\t\t\t\t$field_states[ $view_type ][ $field ] = [\n\t\t\t\t\t'show' => $field_state->$field()->show(),\n\t\t\t\t\t'label' => $field_state->$field()->label(),\n\t\t\t\t\t'hidden' => $field_state->$field()->hidden(),\n\t\t\t\t];\n\t\t\t}\n\t\t}\n\n\t\treturn $field_states;\n\t}", "title": "" }, { "docid": "31f13a10c6bbbcc7f5349c054213cecc", "score": "0.47064483", "text": "public function testMigrateContent() {\n $migration_id = 'recipe_node';\n $migration = \\Drupal::service('plugin.manager.migration')->createInstance($migration_id);\n $migration->getIdMap()->prepareUpdate();\n $executable = new MigrateExecutable($migration, new MigrateMessage());\n $executable->import();\n }", "title": "" }, { "docid": "bf2ee26778442a9e83062e10cbc94bbb", "score": "0.46921295", "text": "private function databaseInfo()\n\t{\n\t\t// database instance\n\t\t$db = Knife::getDB(true);\n\n\t\ttry\n\t\t{\n\t\t\t/*\n\t\t\t * Insert module\n\t\t\t */\n\t\t\t$parameters = array();\n\t\t\t$parameters['name'] = strtolower($this->moduleName);\n\t\t\tif(VERSIONCODE >= 3) $parameters['installed_on'] = gmdate('Y-m-d H:i:s');\n\t\t\t$db->insert('modules', $parameters);\n\n\t\t\t// group module rights\n\t\t\t$parameters = array();\n\t\t\t$parameters['group_id'] = 1;\n\t\t\t$parameters['module'] = strtolower($this->moduleName);\n\t\t\t$db->insert('groups_rights_modules', $parameters);\n\n\t\t\t/*\n\t\t\t * Insert index action\n\t\t\t */\n\t\t\t$parameters['action'] = 'index';\n\t\t\t$parameters['level'] = 7;\n\t\t\t$db->insert('groups_rights_actions', $parameters);\n\t\t}\n\t\t// houston, we have a problem.\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tif(DEV_MODE) throw $e;\n\t\t\telse throw new Exception('Something went wrong while inserting the data into the database.');\n\t\t}\n\n\t\t// return\n\t\treturn true;\n\t}", "title": "" }, { "docid": "f60a82b85731026af64444f989867b2c", "score": "0.4691772", "text": "public function state() {\n return $this->callSyncStrip('vm_state', array($this->vmName), false);\n }", "title": "" }, { "docid": "10ee6faef99db20b98a5f1a432da339d", "score": "0.46896562", "text": "function hook_install($is_syncing) {\n // Set general module variables.\n \\Drupal::state()->set('mymodule.foo', 'bar');\n}", "title": "" }, { "docid": "b13925ae0783726bdfd18a1fc4f9ecf5", "score": "0.46870965", "text": "public function getRelayState()\n {\n if (array_key_exists(\"relayState\", $this->_propDict)) {\n return $this->_propDict[\"relayState\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "38675575f2a80d5bc675bd2bd5201a8f", "score": "0.46789303", "text": "private function getRanMigrations(): array\n {\n $ranMigrations = [];\n\n $sql = \"SELECT * FROM \" . self::MIGRATION_TABLE_NAME;\n\n $statement = $this->dataSource->getClient()->query($sql);\n\n if (false === $statement || false === $statement->execute())\n {\n throw new MigrationException(\"Failed to load ran migrations\");\n }\n\n $results = $statement->fetchAll(PDO::FETCH_ASSOC);\n\n /** @var [migration, ran_on] $record */\n foreach ($results as $record)\n {\n $key = $record['migration'];\n $ranMigrations[$key] = $record['ran_on'];\n }\n\n return $ranMigrations;\n }", "title": "" }, { "docid": "0850aa1158f3501d02fafa8f1684a0e5", "score": "0.4673437", "text": "static function fetchStateList()\n {\n if ( isset( $GLOBALS['StateList'] ) )\n return $GLOBALS['StateList'];\n\n $ini = eZINI::instance( 'ghstate.ini' );\n $states = $ini->getNamedArray();\n //GHStateType::fetchTranslatedNames( $states );\n $GLOBALS['StateList'] = $states;\n\n return $states;\n }", "title": "" }, { "docid": "32d4202c45ee5713e84f6deddb3f0210", "score": "0.4661265", "text": "public function get_migration_log()\n {\n return $this->m_migration_log;\n }", "title": "" }, { "docid": "10e8af86ee03b7101d1b2c22666047d2", "score": "0.4652835", "text": "protected function getMigrationDescription() {\n\t\treturn 'Found old references to EXT:cal/static/. This wizard will replace EXT:cal/static/ references to the new EXT:cal/Configuration/TypoScript/ folder.';\n\t}", "title": "" }, { "docid": "14eb7d6c6de292ee7c1f1d5975bdfff0", "score": "0.46265855", "text": "public function provider_get_class_from_migration()\n\t{\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'Migration_Kohana_201012290258',\n\t\t\t\t'kohana:201012290258',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'Migration_Kohana_201012290258',\n\t\t\t\tarray('location' => 'kohana', 'timestamp' => '201012290258'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "e727829b959bdf13cba686f7812564fc", "score": "0.4621763", "text": "protected function getDrupalSettings() {\n $settings_key = \"gallery-{$this->viewMode}-{$this->gallery->id()}\";\n\n $settings = [\n $settings_key => [\n 'hashNavReplaceState' => (bool) $this->getSetting('hash_nav_replace_state'),\n ],\n ];\n\n return $settings;\n }", "title": "" }, { "docid": "c62fcdccf2bcca79ff4219cd26c07783", "score": "0.4619395", "text": "public static function getModuleInfo() {\n\t\treturn array(\n\t\t\t'title' => '', // printable name/title of module\n\t\t\t'version' => 1, // version number of module\n\t\t\t'summary' => '', // 1 sentence summary of module\n\t\t\t'href' => '', // URL to more information (optional)\n\n\t\t\t// all admin themes should have this as their autoload selector:\n\t\t\t'autoload' => 'template=admin',\n\t\t\t'singular' => true\n\t\t);\n\t}", "title": "" }, { "docid": "1b6762b9367d2f4fc5226bac09af0ff3", "score": "0.4580137", "text": "public function migrate() {\n $batch = [\n 'title' => t('Migrating WBM to CM'),\n 'operations' => [\n ['wbm2cm_step1', []],\n ['wbm2cm_step2', []],\n ['wbm2cm_step3', []],\n ['wbm2cm_step4', []],\n ['wbm2cm_step5', []],\n ['wbm2cm_step6', []],\n ['wbm2cm_stepIntermediare', []],\n ['wbm2cm_step7', []],\n ['wbm2cm_stepLast', []],\n ['wbm2cm_step8', []],\n ],\n 'finished' => 'wbm2cm_migrate_finished_callback',\n 'file' => drupal_get_path('module', 'wbm2cm') . '/wbm2cm.migrate.inc',\n ];\n batch_set($batch);\n return batch_process();\n }", "title": "" }, { "docid": "5b960a951992f2a530dee1274e88192c", "score": "0.45792705", "text": "public function getStateImports() {\n\t\t$stateInports = array();\n\t\t\n\t\t$semanticsMgr = $this->container->get('seriel_dandelion.article_semantics_manager');\n\t\tif (false) $semanticsMgr = new DandelionArticleSemanticsManager();\n\t\t\n\t\t$date= $semanticsMgr->getLastDateCalcul();\n\t\tif (isset($date)) {\n\t\t\t$stateInports[] = New StateImport('Dandelion - Dernier calcul', $date);\n\t\t}\n\t\treturn $stateInports;\n\t}", "title": "" }, { "docid": "06c3817af540b5c082518cc8140079c9", "score": "0.45689967", "text": "public function getMigrationOptions(): array\n {\n return $this->migrationOptions;\n }", "title": "" }, { "docid": "49c91d9e49c3a755d7b84b1ab9b7ff2f", "score": "0.45439222", "text": "public function getAppliedMigration () {\n $statement = $this->pdo->prepare(getAppliedMigrationSql());\n $statement->execute();\n return $statement->fetchAll(PDO::FETCH_COLUMN);\n }", "title": "" }, { "docid": "1d3c8aa70aacd8d76221aa3d3b425a18", "score": "0.45431116", "text": "public function getConfiguredMigrationNames()\n {\n return $this->databaseConfigurationCollection->listConfigurations();\n }", "title": "" }, { "docid": "a1b3a37b07e3552994bd3b0c05036d38", "score": "0.4540071", "text": "function save_state($migrations) {\r\n file_put_contents($this -> system -> paths['root_dir'] . $this -> system -> files_folder . 'migrations_versions.json', json_encode($migrations));\r\n }", "title": "" }, { "docid": "e952ca43c7e9c49965570c1c930248a7", "score": "0.45298386", "text": "function islandora_ingest_form_get_steps(array &$form_state) {\n module_load_include('inc', 'islandora', 'includes/utilities');\n $steps = &drupal_static(__FUNCTION__);\n if (isset($steps)) {\n return $steps;\n }\n $steps = array();\n $shared_storage = &islandora_ingest_form_get_shared_storage($form_state);\n foreach (islandora_build_hook_list(ISLANDORA_INGEST_STEP_HOOK, $shared_storage['models']) as $hook) {\n // Required for pass by reference.\n // @todo Change this around so that it isn't passed by reference, there\n // Is an alter below that can handle that requirement.\n foreach (module_implements($hook) as $module) {\n $function = $module . '_' . $hook;\n $module_steps = (array) $function($form_state);\n $steps = array_merge($steps, $module_steps);\n }\n }\n $steps = array_filter($steps);\n foreach (islandora_build_hook_list(ISLANDORA_INGEST_STEP_HOOK, $shared_storage['models']) as $hook) {\n drupal_alter($hook, $steps, $form_state);\n }\n // Add any defaults.\n foreach ($steps as $key => &$step) {\n $step['id'] = $key;\n }\n uasort($steps, 'drupal_sort_weight');\n return $steps;\n}", "title": "" }, { "docid": "c619c7390d8487879dccc5bf08f3383b", "score": "0.45287338", "text": "private function workflowTransitionsConf()\n {\n return [\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW_TRANSITION,\n 'workflow_id' => self::WORKFLOW_NAME,\n 'start_status_id' => 'DRAFT',\n 'end_status_id' => 'ACTIVE'\n ],\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW_TRANSITION,\n 'workflow_id' => self::WORKFLOW_NAME,\n 'start_status_id' => 'ACTIVE',\n 'end_status_id' => 'DRAFT'\n ],\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW_TRANSITION,\n 'workflow_id' => self::WORKFLOW_NAME,\n 'start_status_id' => 'ACTIVE',\n 'end_status_id' => 'TOVALIDATE'\n ],\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW_TRANSITION,\n 'workflow_id' => self::WORKFLOW_NAME,\n 'start_status_id' => 'TOVALIDATE',\n 'end_status_id' => 'RELEVANT'\n ],\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW_TRANSITION,\n 'workflow_id' => self::WORKFLOW_NAME,\n 'start_status_id' => 'TOVALIDATE',\n 'end_status_id' => 'REJECTED'\n ]\n ];\n }", "title": "" }, { "docid": "6d7b09c01a8fb5983fef58ac5289adcb", "score": "0.45248488", "text": "private function workflowTransitionsConf()\n {\n return [\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW_TRANSITION,\n 'workflow_id' => self::PROJECTS_WORKFLOW_NAME,\n 'start_status_id' => 'STEPA',\n 'end_status_id' => 'STEPB'\n ],\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW_TRANSITION,\n 'workflow_id' => self::PROJECTS_WORKFLOW_NAME,\n 'start_status_id' => 'STEPA',\n 'end_status_id' => 'STEPC'\n ],\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW_TRANSITION,\n 'workflow_id' => self::PROJECTS_WORKFLOW_NAME,\n 'start_status_id' => 'STEPB',\n 'end_status_id' => 'STEPC'\n ],\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW_TRANSITION,\n 'workflow_id' => self::PROJECTS_WORKFLOW_NAME,\n 'start_status_id' => 'STEPB',\n 'end_status_id' => 'STEPD'\n ],\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW_TRANSITION,\n 'workflow_id' => self::PROJECTS_WORKFLOW_NAME,\n 'start_status_id' => 'STEPC',\n 'end_status_id' => 'STEPD'\n ]\n ];\n }", "title": "" }, { "docid": "c254a8ad887f74818eca6e2379f0eba9", "score": "0.4499285", "text": "function pygame_node_info() {\n // We define the node type as an associative array.\n return array(\n 'pygame_node_level' => array(\n 'name' => t('AI Game Level'),\n // 'base' tells Drupal the base string for hook functions.\n // This is often the module name; if base is set to 'mymodule',\n // Drupal would call mymodule_insert() or similar for node\n // hooks. In our case, the base is 'node_example'.\n 'base' => 'pygame_node_level',\n 'description' => t('Node representing a single level.'),\n 'title_label' => t('Level Title'),\n // We'll set the 'locked' attribute to TRUE, so users won't be\n // able to change the machine name of our content type.\n 'locked' => TRUE,\n ),\n\t'pygame_node_tile' => array(\n\t\t'name' => t('AI Game Tile'),\n\t\t'base' => 'pygame_node_tile',\n\t\t'description' => t('Node representing a single tile.'),\n\t\t'title_label' => t('Tile Name'),\n\t\t'locked' => TRUE,\n ),\n\t'pygame_node_submission' => array(\n\t\t'name' => t('AI Game Submission'),\n\t\t'base' => 'pygame_node_submission',\n\t\t'description' => t('Node representing a user submission.'),\n\t\t'title_label' => t('Level Title'),\n\t\t'locked' => TRUE\n\t)\n );\n}", "title": "" }, { "docid": "7132124e79abcbdd51b4ed96bf7860c9", "score": "0.44941637", "text": "protected function get_migration_page_url() {\n\t\treturn add_query_arg( 'page', self::SLUG_MIGRATION_PAGE, admin_url( 'admin.php' ) );\n\t}", "title": "" }, { "docid": "f91542d316101d4cc9a6a67480fa3ea9", "score": "0.44896755", "text": "public function fields($migration = NULL) {\n $fields = array(\n 'rid' => t('The redirect id. Primary key.'),\n 'hash' => t('A unique hash based on source, source options and language.'),\n 'type' => t(''),\n 'uid' => t(''),\n 'source' => t(''),\n 'source_options' => t(''),\n 'redirect' => t(''),\n 'redirect_options' => t(''),\n 'language' => t(''),\n 'status_code' => t(''),\n 'count' => t(''),\n 'access' => t(''),\n\n );\n return $fields;\n }", "title": "" }, { "docid": "b51a8c478bef8df3fb3942ec32428dbd", "score": "0.44824094", "text": "function sf_run_migration() {\n $GLOBALS['sf_customizer']['page_bg_color'] = get_option('page_bg_color', '#fff');\n $GLOBALS['sf_customizer']['inner_page_bg_color'] = get_option('inner_page_bg_color', '#fff');\n $GLOBALS['sf_customizer']['section_divide_color'] = get_option('section_divide_color', '#eaeaea');\n $GLOBALS['sf_customizer']['accent_color'] = get_option('accent_color', '#7eced5');\n $GLOBALS['sf_customizer']['body_color'] = get_option('body_color', '#222');\n $GLOBALS['sf_customizer']['body_alt_color'] = get_option('body_alt_color', '#222');\n $GLOBALS['sf_customizer']['link_color'] = get_option('link_color', '#999');\n $GLOBALS['sf_customizer']['link_hover_color'] = get_option('link_hover_color', '#7eced5');\n $GLOBALS['sf_customizer']['h1_color'] = get_option('h1_color', '#222');\n $GLOBALS['sf_customizer']['h2_color'] = get_option('h2_color', '#222');\n $GLOBALS['sf_customizer']['h3_color'] = get_option('h3_color', '#333');\n $GLOBALS['sf_customizer']['h4_color'] = get_option('h4_color', '#222');\n $GLOBALS['sf_customizer']['h5_color'] = get_option('h5_color', '#222');\n $GLOBALS['sf_customizer']['h6_color'] = get_option('h6_color', '#222');\n \n $GLOBALS['sf_customizer']['topbar_bg_color'] = get_option('topbar_bg_color', '#fff');\n $GLOBALS['sf_customizer']['topbar_text_color'] = get_option('topbar_text_color', '#444');\n $GLOBALS['sf_customizer']['topbar_link_color'] = get_option('topbar_link_color', '#999');\n $GLOBALS['sf_customizer']['topbar_link_hover_color'] = get_option('topbar_link_hover_color', '#7eced5');\n $GLOBALS['sf_customizer']['topbar_divider_color'] = get_option('topbar_divider_color', '#eaeaea');\n \n $GLOBALS['sf_customizer']['header_bg_color'] = get_option('header_bg_color', '#fff');\n $GLOBALS['sf_customizer']['header_border_color'] = get_option('header_border_color', '#eaeaea');\n $GLOBALS['sf_customizer']['header_text_color'] = get_option('header_text_color', '#222');\n $GLOBALS['sf_customizer']['header_link_color'] = get_option('header_link_color', '#222');\n $GLOBALS['sf_customizer']['header_link_hover_color'] = get_option('header_link_hover_color', '#7eced5');\n \n $GLOBALS['sf_customizer']['nav_bg_color'] = get_option('nav_bg_color', '#fff');\n $GLOBALS['sf_customizer']['nav_text_color'] = get_option('nav_text_color', '#414141');\n $GLOBALS['sf_customizer']['nav_text_hover_color'] = get_option('nav_text_hover_color', '#7eced5');\n $GLOBALS['sf_customizer']['nav_selected_text_color'] = get_option('nav_selected_text_color', '#303030');\n $GLOBALS['sf_customizer']['nav_sm_bg_color'] = get_option('nav_sm_bg_color', '#f9f9f9');\n $GLOBALS['sf_customizer']['nav_sm_text_color'] = get_option('nav_sm_text_color', '#999');\n $GLOBALS['sf_customizer']['nav_sm_text_hover_color'] = get_option('nav_sm_text_hover_color', '#7eced5');\n $GLOBALS['sf_customizer']['nav_sm_selected_text_color'] = get_option('nav_sm_selected_text_color', '#333');\n $GLOBALS['sf_customizer']['nav_divider_color'] = get_option('nav_divider_color', '#f0f0f0');\n \n $GLOBALS['sf_customizer']['overlay_menu_bg_color'] = get_option('overlay_menu_bg_color', '#7eced5');\n $GLOBALS['sf_customizer']['overlay_menu_text_color'] = get_option('overlay_menu_text_color', '#c5e7eb');\n $GLOBALS['sf_customizer']['overlay_menu_link_color'] = get_option('overlay_menu_link_color', '#d9f0f2');\n $GLOBALS['sf_customizer']['overlay_menu_link_hover_color'] = get_option('overlay_menu_link_hover_color', '#fff');\n \n $GLOBALS['sf_customizer']['slideout_menu_bg_color'] = get_option('slideout_menu_bg_color', '#f7f7f7');\n $GLOBALS['sf_customizer']['slideout_menu_link_color'] = get_option('slideout_menu_link_color', '#fff');\n $GLOBALS['sf_customizer']['slideout_menu_link_hover_color'] = get_option('slideout_menu_link_hover_color', '#7eced5');\n $GLOBALS['sf_customizer']['slideout_menu_divider_color'] = get_option('slideout_menu_divider_color', '#ccc');\n \n $GLOBALS['sf_customizer']['mobile_menu_bg_color'] = get_option('mobile_menu_bg_color', '#fff');\n $GLOBALS['sf_customizer']['mobile_menu_text_color'] = get_option('mobile_menu_text_color', '#222');\n $GLOBALS['sf_customizer']['mobile_menu_link_color'] = get_option('mobile_menu_link_color', '#222');\n $GLOBALS['sf_customizer']['mobile_menu_link_hover_color'] = get_option('mobile_menu_link_hover_color', '#7eced5');\n $GLOBALS['sf_customizer']['mobile_menu_divider_color'] = get_option('mobile_menu_divider_color', '#eee');\n \n $GLOBALS['sf_customizer']['header_banner_bg_color'] = get_option('header_banner_bg_color', '#fff');\n $GLOBALS['sf_customizer']['header_banner_text_color'] = get_option('header_banner_text_color', '#222');\n $GLOBALS['sf_customizer']['header_banner_link_color'] = get_option('header_banner_link_color', '#333');\n $GLOBALS['sf_customizer']['header_banner_link_hover_color'] = get_option('header_banner_link_hover_color', '#7eced5');\n $GLOBALS['sf_customizer']['header_banner_border_color'] = get_option('header_banner_border_color', '#e3e3e3');\n \n $GLOBALS['sf_customizer']['page_heading_bg_color'] = get_option('page_heading_bg_color', '#f7f7f7');\n $GLOBALS['sf_customizer']['page_heading_text_color'] = get_option('page_heading_text_color', '#333');\n \n $GLOBALS['sf_customizer']['breadcrumb_text_color'] = get_option('breadcrumb_text_color', '#777');\n $GLOBALS['sf_customizer']['breadcrumb_link_color'] = get_option('breadcrumb_link_color', '#aaa');\n \n $GLOBALS['sf_customizer']['newsletter_bar_bg_color'] = get_option('newsletter_bar_bg_color', '#222');\n $GLOBALS['sf_customizer']['newsletter_bar_text_color'] = get_option('newsletter_bar_text_color', '#ccc');\n $GLOBALS['sf_customizer']['newsletter_bar_link_hover_color'] = get_option('newsletter_bar_link_hover_color', '#fff');\n \n $GLOBALS['sf_customizer']['footer_bg_color'] = get_option('footer_bg_color', '#f9f9f9');\n $GLOBALS['sf_customizer']['footer_text_color'] = get_option('footer_text_color', '#999');\n $GLOBALS['sf_customizer']['footer_link_color'] = get_option('footer_link_color', '#666');\n $GLOBALS['sf_customizer']['footer_link_hover_color'] = get_option('footer_link_hover_color', '#444');\n $GLOBALS['sf_customizer']['footer_border_color'] = get_option('footer_border_color', '#eee');\n $GLOBALS['sf_customizer']['copyright_bg_color'] = get_option('copyright_bg_color', '#f7f7f7');\n $GLOBALS['sf_customizer']['copyright_text_color'] = get_option('copyright_text_color', '#999');\n $GLOBALS['sf_customizer']['copyright_link_color'] = get_option('copyright_link_color', '#666');\n $GLOBALS['sf_customizer']['copyright_link_hover_color'] = get_option('copyright_link_hover_color', '#444');\n \n $GLOBALS['sf_customizer']['input_bg_color'] = get_option('input_bg_color', '#fff');\n $GLOBALS['sf_customizer']['input_text_color'] = get_option('input_text_color', '#999');\n $GLOBALS['sf_customizer']['overlay_bg_color'] = get_option('overlay_bg_color', '#7eced5');\n $GLOBALS['sf_customizer']['overlay_text_color'] = get_option('overlay_text_color', '#fff');\n $GLOBALS['sf_customizer']['preview_slider_bg_color'] = get_option('preview_slider_bg_color', '#f7f7f7');\n $GLOBALS['sf_customizer']['sale_tag_color'] = get_option('sale_tag_color', '#ff8a80');\n $GLOBALS['sf_customizer']['new_tag_color'] = get_option('new_tag_color', '#7eced5');\n $GLOBALS['sf_customizer']['oos_tag_color'] = get_option('oos_tag_color', '#ccc');\n \n $GLOBALS['sf_customizer']['tweet_slider_bg'] = get_option('tweet_slider_bg', '#7eced5');\n $GLOBALS['sf_customizer']['tweet_slider_text'] = get_option('tweet_slider_text', '#fff');\n $GLOBALS['sf_customizer']['tweet_slider_link'] = get_option('tweet_slider_link', '#222');\n $GLOBALS['sf_customizer']['tweet_slider_link_hover'] = get_option('tweet_slider_link_hover', '#fb3c2d');\n $GLOBALS['sf_customizer']['testimonial_slider_bg'] = get_option('testimonial_slider_bg', '#7eced5');\n $GLOBALS['sf_customizer']['testimonial_slider_text'] = get_option('testimonial_slider_text', '#fff');\n \n $GLOBALS['sf_customizer']['promo_bar_bg_color'] = get_option('promo_bar_bg_color', '#e4e4e4');\n $GLOBALS['sf_customizer']['promo_bar_text_color'] = get_option('promo_bar_text_color', '#222');\n $GLOBALS['sf_customizer']['icon_container_border_color'] = get_option('icon_container_border_color', '#eaeaea');\n $GLOBALS['sf_customizer']['icon_container_hover_border_color'] = get_option('icon_container_hover_border_color', '#7eced5');\n \n update_option( 'sf_customizer', $GLOBALS['sf_customizer']);\n }", "title": "" }, { "docid": "d26d9e41b956514cced8434155bb00b0", "score": "0.44557497", "text": "public function testModuleInfo($module) {\n $module_directory = __DIR__ . '/../../../../../modules/' . $module;\n $info = Yaml::decode(file_get_contents($module_directory . '/' . $module . '.info.yml'));\n $this->assertArrayHasKey('version', $info);\n $this->assertEquals('VERSION', $info['version']);\n }", "title": "" }, { "docid": "9531dd1302a19769311a6cbdba5e4f4b", "score": "0.44493118", "text": "function handle_Migration($modulenode, $moduleInstance) {\n\t\t// TODO Handle module migration SQL\n\t\t$this->parse_Migration($modulenode);\n\t\t$cur_version = $moduleInstance->version;\n\t\tforeach($this->_migrations as $migversion=>$migrationnode) {\n\t\t\t// Perform migration only for higher version than current\n\t\t\tif(version_compare($cur_version, $migversion, '<')) {\n\t\t\t\tself::log(\"Migrating to $migversion ... STARTED\");\n\t\t\t\tif(!empty($migrationnode->tables) && !empty($migrationnode->tables->table)) {\n\t\t\t\t\tforeach($migrationnode->tables->table as $tablenode) {\n\t\t\t\t\t\t$tablename = $tablenode->name;\n\t\t\t\t\t\t$tablesql = \"$tablenode->sql\"; // Convert to string\n\n\t\t\t\t\t\t// Skip SQL which are destructive\n\t\t\t\t\t\tif(Vtiger_Utils::IsDestructiveSql($tablesql)) {\n\t\t\t\t\t\t\tself::log(\"SQL: $tablesql ... SKIPPED\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Supress any SQL query failures\n\t\t\t\t\t\t\tself::log(\"SQL: $tablesql ... \", false);\n\t\t\t\t\t\t\tVtiger_Utils::ExecuteQuery($tablesql, true);\n\t\t\t\t\t\t\tself::log(\"DONE\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tself::log(\"Migrating to $migversion ... DONE\");\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5c60a3441a131b3fd7f0c5b5ae1e3890", "score": "0.44454083", "text": "private function load_module_info() {\r\n\t\t$data = array ();\r\n\t\t$data ['module_label'] = $this->module_label;\r\n\t\t$data ['module_labels'] = $this->module_labels;\r\n\t\t$data ['module'] = $this->module;\r\n\t\treturn $data;\r\n\t}", "title": "" }, { "docid": "52c84fed191eb72590ef7cd574134986", "score": "0.444402", "text": "public function provider_get_migration_from_filename()\n\t{\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'location' => 'myapp',\n\t\t\t\t\t'description' => 'initial-setup',\n\t\t\t\t\t'timestamp' => '1293214439',\n\t\t\t\t\t'id' => 'myapp:1293214439',\n\t\t\t\t),\n\t\t\t\t'migrations/myapp/1293214439_initial-setup.php',\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "4b179773b313be7426de38f97c134acb", "score": "0.44318113", "text": "function mymodule_update_7101() {\n $table_name = 'table2';\n $schema = drupal_get_schema_unprocessed('mymodule', $table_name);\n db_create_table($table_name, $schema);\n\n return $table_name . ' table created.';\n}", "title": "" }, { "docid": "fe73cb8906819cc6ea0d2df5b9584c4f", "score": "0.44236133", "text": "public function getListOfMigrationsAsString(): string\n {\n $this->ranMigrationsList->loadList();\n return $this->ranMigrationsList;\n }", "title": "" }, { "docid": "77159454c2aac4e0093f7b48d1a73f83", "score": "0.4416141", "text": "function et_pb_transition_options() {\n\treturn ET_Builder_Module_Transition_Options::get();\n}", "title": "" }, { "docid": "1606467ba008a3a33af28d3f981ed801", "score": "0.44080544", "text": "function om_membership_list_steps() {\n $steps = array();\n global $user;\n if ($user->uid == 0) {\n $steps['user-registration'] = array(\n 'label' => t('Create Your User Account'),\n 'form_builder' => 'om_membership_user_registration_form',\n 'step' => 0\n );\n }\n else {\n $steps['user-registration'] = array(\n 'label' => t('Edit Your User Account'),\n 'form_builder' => 'om_membership_profile_edit_form',\n 'step' => 0\n );\n }\n $hook_steps = &drupal_static(__FUNCTION__);\n if (empty($hook_steps)) {\n $hook_steps = array();\n $hook_steps = module_invoke_all('om_membership_registration_steps');\n }\n $steps = array_merge($steps, $hook_steps);\n module_invoke_all('om_membership_alter_steps', $steps);\n return $steps;\n}", "title": "" }, { "docid": "545928157855c956977e7e008dacea26", "score": "0.44045386", "text": "public function getViewsData() {\n $data = [];\n\n $entity_types_with_moderation = array_filter($this->entityTypeManager->getDefinitions(), function (EntityTypeInterface $type) {\n return $this->moderationInformation->isModeratedEntityType($type);\n });\n\n foreach ($entity_types_with_moderation as $entity_type) {\n $table = $entity_type->getDataTable() ?: $entity_type->getBaseTable();\n\n $data[$table]['moderation_state'] = [\n 'title' => t('Moderation state'),\n 'field' => [\n 'id' => 'moderation_state_field',\n 'default_formatter' => 'content_moderation_state',\n 'field_name' => 'moderation_state',\n ],\n 'filter' => ['id' => 'moderation_state_filter', 'allow empty' => TRUE],\n 'sort' => ['id' => 'moderation_state_sort'],\n ];\n\n $revision_table = $entity_type->getRevisionDataTable() ?: $entity_type->getRevisionTable();\n $data[$revision_table]['moderation_state'] = [\n 'title' => t('Moderation state'),\n 'field' => [\n 'id' => 'moderation_state_field',\n 'default_formatter' => 'content_moderation_state',\n 'field_name' => 'moderation_state',\n ],\n 'filter' => ['id' => 'moderation_state_filter', 'allow empty' => TRUE],\n 'sort' => ['id' => 'moderation_state_sort'],\n ];\n }\n\n return $data;\n }", "title": "" }, { "docid": "587c86ffd836262cb4e6e1ea04fab429", "score": "0.4402114", "text": "public function getMigrateTaskId()\n {\n return $this->get(self::MIGRATETASKID);\n }", "title": "" }, { "docid": "2c44e11683b69e32c32bd8270eef3add", "score": "0.43916792", "text": "public function migrateModule(string $module)\n {\n // Suppress the \"Nothing to migrate\" message\n if (isset($this->notesOutput)) {\n $this->migrator->setOutput(new \\Symfony\\Component\\Console\\Output\\NullOutput);\n\n Event::listen(\\Illuminate\\Database\\Events\\MigrationsStarted::class, function() {\n $this->migrator->setOutput($this->notesOutput);\n });\n }\n\n if ($this->migrator->run(base_path('modules/'.strtolower($module).'/database/migrations'))) {\n $this->migrateCount++;\n }\n }", "title": "" }, { "docid": "88cc976bccf09dbc45911593b1788bbb", "score": "0.43904114", "text": "public function provider_get_filename_from_migration()\n\t{\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'myapp/1293214439_initial-setup.php',\n\t\t\t\tarray(\n\t\t\t\t\t'location' => 'myapp',\n\t\t\t\t\t'timestamp' => '1293214439',\n\t\t\t\t\t'description' => 'initial-setup',\n\t\t\t\t\t'id' => 'myapp:1293214439'\n\t\t\t\t),\n\t\t\t\t'myapp',\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "e7a47b7662343f7af0be74e55f14f873", "score": "0.43896025", "text": "public function testMigrateSuccess()\n {\n $migration = (new MigrationsBuilder())->build();\n $migration->execute('migrations:migrate');\n\n $databaseName = $this->configFile->dbName;\n $databaseConnection = new \\mysqli($this->configFile->dbHost, $this->configFile->dbUser, $this->configFile->dbPwd);\n\n $result = $databaseConnection->query(\n \"SELECT id as entries FROM `$databaseName`.`test_doctrine_migration_wrapper`\"\n );\n $this->assertSame(2, $result->num_rows, 'There must be one row for shop migration and one for project.');\n\n $result = $databaseConnection->query(\n \"SELECT 1 FROM `$databaseName`.`test_doctrine_migration_wrapper` WHERE id = 'shop_migration'\"\n );\n $this->assertSame(1, $result->num_rows, 'There must be one row for shop migration');\n\n $result = $databaseConnection->query(\n \"SELECT 1 FROM `$databaseName`.`test_doctrine_migration_wrapper` WHERE id = 'project_migration'\"\n );\n $this->assertSame(1, $result->num_rows, 'There must be one row for project migration');\n }", "title": "" }, { "docid": "936faca75617f5564ea103df4c5601c2", "score": "0.43849993", "text": "public function LoadState() {\n return json_decode($this->ReadAttributeString(STATE));\n }", "title": "" }, { "docid": "bfc4022a161e5042a699913189c41e34", "score": "0.43744954", "text": "function pm_drush_engine_release_info() {\n return array(\n 'updatexml' => array(\n 'description' => 'Drush release info engine for update.drupal.org and compatible services.',\n 'options' => array(\n 'source' => 'The base URL which provides project release history in XML. Defaults to http://updates.drupal.org/release-history.',\n 'dev' => 'Work with development releases solely.',\n ),\n 'sub-options' => array(\n 'cache' => array(\n 'cache-duration-releasexml' => 'Expire duration (in seconds) for release XML. Defaults to 86400 (24 hours).',\n ),\n 'select' => array(\n 'all' => 'Shows all available releases instead of a short list of recent releases.',\n ),\n ),\n ),\n );\n}", "title": "" }, { "docid": "a3249992d6a79131703e83dfe376ecdf", "score": "0.43712205", "text": "function resource_20_prepare_migration() {\n global $DB;\n\n $dbman = $DB->get_manager();\n\n // If the resource not created yet, this is probably a new install\n $table = new xmldb_table('resource');\n if (!$dbman->table_exists($table)) {\n return false;\n }\n\n // Define table resource_old to be created\n $table = new xmldb_table('resource_old');\n\n if ($dbman->table_exists($table)) {\n //already executed\n return true;\n }\n\n // Adding fields to table resource_old\n $table->add_field('id', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, XMLDB_SEQUENCE, null);\n $table->add_field('course', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0');\n $table->add_field('name', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null);\n $table->add_field('type', XMLDB_TYPE_CHAR, '30', null, XMLDB_NOTNULL, null, null);\n $table->add_field('reference', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null);\n $table->add_field('intro', XMLDB_TYPE_TEXT, 'small', null, null, null, null);\n $table->add_field('introformat', XMLDB_TYPE_INTEGER, '4', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0');\n $table->add_field('alltext', XMLDB_TYPE_TEXT, 'medium', null, XMLDB_NOTNULL, null, null);\n $table->add_field('popup', XMLDB_TYPE_TEXT, 'small', null, XMLDB_NOTNULL, null, null);\n $table->add_field('options', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null);\n $table->add_field('timemodified', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0');\n $table->add_field('oldid', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null);\n $table->add_field('cmid', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, null, null, null);\n $table->add_field('newmodule', XMLDB_TYPE_CHAR, '50', null, null, null, null);\n $table->add_field('newid', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, null, null, null);\n $table->add_field('migrated', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0');\n\n // Adding keys to table resource_old\n $table->add_key('primary', XMLDB_KEY_PRIMARY, array('id'));\n\n // Adding indexes to table resource_old\n $table->add_index('oldid', XMLDB_INDEX_UNIQUE, array('oldid'));\n $table->add_index('cmid', XMLDB_INDEX_NOTUNIQUE, array('cmid'));\n\n // Launch create table for resource_old\n $dbman->create_table($table);\n\n $module = $DB->get_field('modules', 'id', array('name'=>'resource'));\n\n if (!$DB->count_records('resource')) {\n // upgrade of fresh new server from 1.9 - no upgrade needed\n return false;\n }\n\n // copy old data, the intro text format was FORMAT_MOODLE==0\n $sql = \"INSERT INTO {resource_old} (oldid, course, name, type, reference, intro, introformat, alltext, popup, options, timemodified, cmid)\n SELECT r.id, r.course, r.name, r.type, r.reference, r.summary, 0, r.alltext, r.popup, r.options, r.timemodified, cm.id\n FROM {resource} r\n LEFT JOIN {course_modules} cm ON (r.id = cm.instance AND cm.module = :module)\";\n\n $DB->execute($sql, array('module'=>$module));\n\n return true;\n}", "title": "" }, { "docid": "31a65bbbaae02cadf4d751eef06f6127", "score": "0.43688872", "text": "function drush_ti_amg_fw_custom_log_local_flavor_nids() {\n $bundle = 'article';\n $result_nids = ti_amg_fw_custom_get_local_flavor_nids($bundle);\n $success_fp = fopen(\"sites/default/files/migration_logs/migration_success.txt\", \"w+\");\n if (!empty($result_nids) && count($result_nids) > 0) {\n $success_log_fp = fopen(\"sites/default/files/migration_logs/migration_success.txt\", \"a+\");\n drush_print(\"\\n--------------------------------------------------------\\n\");\n drush_print(dt(\"Total number of \". $bundle .\" nodes with local flavor: @count\", array('@count' => count($result_nids))));\n drush_print(\"\\n--------------------------------------------------------\\n\");\n foreach($result_nids as $nid) {\n fwrite($success_log_fp, $nid . \"\\r\\n\");\n drush_print(\"Nid: \" . $nid);\n drush_print(PHP_EOL);\n }\n }\n}", "title": "" }, { "docid": "4d989dc80e3c6edd5b02e8fe1f298172", "score": "0.43570584", "text": "public function getList($db=true) {\n\t\tif(!file_exists($this->dir.'/migrations.json'))\n\t\t\treturn [];\n\t\t$migrations = json_decode(file_get_contents($this->dir.'/migrations.json'), true);\n\n\t\tif($db) {\n\t\t\t$tracking = [];\n\n\t\t\t$this->createTable();\n\t\t\tforeach($this->db->dal()->from('_migrations')->get() as $r)\n\t\t\t\t$tracking[$r['name']] = ['migrated' => strtotime($r['migrated'])];\n\n\t\t\tforeach($migrations as $migration=>$params) {\n\t\t\t\tif(isset($tracking[$migration]))\n\t\t\t\t\t$migrations[$migration] = array_merge($migrations[$migration], $tracking[$migration]);\n\t\t\t}\n\t\t}\n\n\t\tuasort($migrations, function($a, $b) {\n\t\t\tif(isset($a['migrated']) && !isset($b['migrated']))\n\t\t\t\treturn -1;\n\t\t\telseif(!isset($a['migrated']) && isset($b['migrated']))\n\t\t\t\treturn 1;\n\t\t\telseif(isset($a['migrated']) && isset($b['migrated'])) {\n\t\t\t\tif($a['migrated'] !== $b['migrated'])\n\t\t\t\t\treturn $a['migrated'] > $b['migrated'];\n\t\t\t}\n\t\t\treturn $a['added'] > $b['added'];\n\t\t});\n\t\t\n\t\treturn $migrations;\n\t}", "title": "" }, { "docid": "92f089034505f53a23de9f3815fa9592", "score": "0.43511364", "text": "function getScriptsInModule(AngieModule $module) {\n return AngieModelMigrationDiscoverer::discoverFromPaths(array($module->getPath() . '/migrations'));\n }", "title": "" }, { "docid": "05e8eea763c4389f0efd2eeda06acc3d", "score": "0.4350776", "text": "public function moduleUpgraded(ModuleStateEvent $event)\n {\n parent::moduleUpgraded($event);\n \n // you can access general data available in the event\n \n // the event name\n // echo 'Event: ' . $event->getName();\n \n // type of current request: MASTER_REQUEST or SUB_REQUEST\n // if a listener should only be active for the master request,\n // be sure to check that at the beginning of your method\n // if ($event->getRequestType() !== HttpKernelInterface::MASTER_REQUEST) {\n // // don't do anything if it's not the master request\n // return;\n // }\n \n // kernel instance handling the current request\n // $kernel = $event->getKernel();\n \n // the currently handled request\n // $request = $event->getRequest();\n }", "title": "" }, { "docid": "a5f6a1d73e554f00cec3fc62c81a63e4", "score": "0.43498176", "text": "public function migration_name()\n {\n return $this->name;\n }", "title": "" }, { "docid": "8d9a620bfa6173c8192d4de99235b647", "score": "0.43476632", "text": "function AuthDrupal() {\r\n\t\tglobal $wgAuthDrupal_TablePrefix;\r\n\t\tglobal $wgAuthDrupal_UserTable;\r\n\t\tglobal $wgAuthDrupal_RolesTable;\r\n\t\tglobal $wgAuthDrupal_UsersRolesTable;\r\n\t\tglobal $wgAuthDrupal_LogMessages;\r\n\t\tglobal $wgAuthDrupal_UID;\r\n\t\tglobal $wgAuthDrupal_AccessControlCategoriesTable;\r\n\r\n\t\tif (! empty( $wgAuthDrupal_LogMessages ) ) {\r\n\t\t\t$drupal_logging = $wgAuthDrupal_LogMessages;\r\n\t\t}\r\n\r\n\t\tif (! empty( $wgAuthDrupal_UID) ) {\r\n\t\t\t$drupal_uid = $wgAuthDrupal_UID;\r\n\t\t}\r\n\r\n\t\t$this->db_prefix = $wgAuthDrupal_TablePrefix;\r\n\r\n\t\t// $this->drupal_users_table = \"`\" . $this->db_prefix . $this->db_table . \"`\";\r\n\t\t// $this->drupal_log_table = \"`\" . $this->db_prefix . \"watchdog`\";\r\n\t\t$this->drupal_users_table = $this->makeDrupalTableName( $wgAuthDrupal_UserTable );\r\n\t\t$this->drupal_roles_table = $this->makeDrupalTableName( $wgAuthDrupal_RolesTable );\r\n\t\t$this->drupal_users_roles_table = $this->makeDrupalTableName( $wgAuthDrupal_UsersRolesTable );\r\n\t\t$this->drupal_log_table = $this->makeDrupalTableName( \"watchdog\" );\r\n\r\n\t\treturn;\r\n\t}", "title": "" }, { "docid": "1d28b27c993c24120fdfc3077da86d87", "score": "0.43451178", "text": "public function fields($migration = NULL) {\n $fields = array();\n\n $fields['vid'] = t('Vocabulary: Existing vocabulary ID');\n $fields['name'] = t('Vocabulary: Name of the vocabulary');\n $fields['machine_name'] = t('Vocabulary: The vocabulary machine name');\n $fields['description'] = t('Vocabulary: Description of the vocabulary');\n $fields['weight'] = t('Vocabulary: Weight');\n\n return $fields;\n }", "title": "" }, { "docid": "e0b8b0e47a1c019db09bf0d021bbea9d", "score": "0.43440107", "text": "protected function migrate()\n {\n // The structures and related classes that creates Vanilla's DB scheme\n // do more wild things like using undefined variables, merging booleans\n // as arrays etc etc. So we disable all errors except fatal errors, so\n // we can run these files.\n error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR);\n ini_set('display_errors', 0);\n\n // Used in attached files to drop all tables before seeding\n $Drop = true;\n\n // Create the database tables\n require_once 'public/applications/dashboard/settings/structure.php';\n require_once 'public/applications/vanilla/settings/structure.php';\n require_once 'public/applications/conversations/settings/structure.php';\n }", "title": "" }, { "docid": "38514df07cdbbceb72cb452ffd5733f7", "score": "0.43400228", "text": "public function getProjectState() {\n $translate = Zend_Registry::get('Zend_Translate');\n if ($this->state == 'draft') {\n return $translate->translate(\"Draft\");\n }else if($this->state === 'rejected'){\n return $translate->translate(\"Rejected\");\n }else if($this->state === 'submitted'){\n return $translate->translate(\"Under Review\");\n }else if ($this->state == 'published' && $this->approved == 1) {\n return $translate->translate(\"Published\");\n }\n return $translate->translate(\"Draft\");\n }", "title": "" }, { "docid": "62dd80191acb15989b17809f425b3624", "score": "0.43380636", "text": "function _backup_migrate_get_sql_file_header_mysql() {\n return \"\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=NO_AUTO_VALUE_ON_ZERO */;\n\nSET NAMES utf8;\n\";\n }", "title": "" }, { "docid": "828230a7dc05db5d198687ab16a134b2", "score": "0.43352038", "text": "public function getDownList() {\n\t\t$list = $this->getList();\n\t\tforeach($list as $migration=>$params) {\n\t\t\tif(isset($params['migrated']))\n\t\t\t\tunset($list[$migration]);\n\t\t}\n\t\treturn $list;\n\t}", "title": "" }, { "docid": "7b8b11bbf3b93b2eb3625f1643a549bb", "score": "0.43347222", "text": "public function movesDataProvider() {\n return Yaml::decode(file_get_contents(__DIR__.'/../movesScenarios.yml'));\n }", "title": "" }, { "docid": "1c6c289c2e3d285df52631e9450524cd", "score": "0.4329474", "text": "private function getMigrations(?string $migrationsDirectory = null): array\n {\n $migrations = [];\n $migrationsDirectory = $migrationsDirectory ?? $this->migrationsDirectory;\n // code to retrieve all migrations in the migrations directory and store them in the $migrations array\n\n $fileNames = scandir($migrationsDirectory);\n $fileNames = array_slice($fileNames, 2);\n\n foreach ($fileNames as $fileName)\n {\n $path = Paths::join($migrationsDirectory, $fileName);\n if (!is_file($path))\n {\n Log::warn(__METHOD__, \"File not found: $fileName\");\n continue;\n }\n\n $pathDidLoad = require($path);\n if (boolval($pathDidLoad) === false)\n {\n Log::warn(__METHOD__, \"Failed to load migration file $path\");\n continue;\n }\n\n $migrationFileContent = file_get_contents($path);\n $migrationClassname = extract_class_name($migrationFileContent);\n if (false === $migrationClassname)\n {\n Log::warn(__METHOD__, \"Failed to extract a class name from $path\");\n continue;\n }\n\n $migrationInstance = new $migrationClassname;\n\n if ($migrationInstance instanceof Migration)\n {\n $migrations[$fileName] = $migrationInstance;\n }\n }\n\n return $migrations;\n }", "title": "" }, { "docid": "3a10871de78d0003adf8e3f0add59019", "score": "0.4329003", "text": "protected function getBasedOnModuleEnabledStateModuleClassConfiguration(): array\n {\n $moduleRegistry = SystemModuleRegistryFacade::getInstance();\n $moduleClassConfiguration = [];\n\n $moduleToModuleClassConfigurationMappings = $this->getModuleToModuleClassConfigurationMapping();\n foreach ($moduleToModuleClassConfigurationMappings as $mapping) {\n // Copy the state (enabled/disabled) to the module configuration\n /** @var string */\n $module = $mapping['module'];\n $value = $moduleRegistry->isModuleEnabled($module);\n // Make explicit it can be null so that PHPStan level 3 doesn't fail\n /** @var callable|null */\n $callback = $mapping['callback'] ?? null;\n if ($callback !== null) {\n $value = $callback($value);\n }\n /** @var class-string<ModuleInterface> */\n $class = $mapping['class'];\n /** @var string */\n $envVariable = $mapping['envVariable'];\n $moduleClassConfiguration[$class][$envVariable] = $value;\n }\n\n return $moduleClassConfiguration;\n }", "title": "" }, { "docid": "118f3fe57a068fba4ef838014fdcb969", "score": "0.43201193", "text": "function loadModuleDBData() {\n if (isset($this->modules) && is_array($this->modules)) {\n $filter = str_replace(\n '%',\n '%%',\n $this->databaseGetSQLCondition('module_guid', array_keys($this->modules))\n );\n $sql = \"SELECT module_guid, module_type, module_useoutputfilter, module_title,\n module_title_org, module_description, module_class,\n module_file, module_path, module_glyph,\n module_active\n FROM %s\n WHERE $filter\n ORDER BY module_guid\";\n $tableModules = $this->databaseGetTableName(PapayaContentTables::MODULES);\n if ($res = $this->databaseQueryFmt($sql, $tableModules)) {\n while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {\n if (isset($this->modules[$row['module_guid']])) {\n $module = $this->modules[$row['module_guid']];\n if ($module['type'] !== $row['module_type'] ||\n $module['name'] !== $row['module_title_org'] ||\n $module['description'] !== $row['module_description'] ||\n $module['class'] !== $row['module_class'] ||\n $module['file'] !== $row['module_file'] ||\n $module['path'] !== $row['module_path'] ||\n $module['glyph'] !== $row['module_glyph']) {\n $this->modules[$row['module_guid']]['error'] = TRUE;\n } else {\n $this->modules[$row['module_guid']]['error'] = FALSE;\n }\n $this->modules[$row['module_guid']]['active'] =\n (boolean)$row['module_active'];\n }\n }\n $res->free();\n }\n }\n }", "title": "" }, { "docid": "ed0c24c06ec791e3debb3fa287d37f1c", "score": "0.43156046", "text": "public static function isMigrationWasPerformed()\n {\n return (bool) Configuration::get('INGENICO_MIGRATION_DONE');\n }", "title": "" }, { "docid": "01d9794c3d73b5dfabca613539e70afb", "score": "0.4307711", "text": "private function getUpgrades() {\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "63645274a475efc025d7bbec1b245d78", "score": "0.43026644", "text": "public function getParticipantInfoState($i){\n\t\tglobal $config;\n\t\tif($i<0 || $i>$config->REG_PARTICIPANT_NUM) return false;\n\t\tif($i>=count($this->memberInfoState)) return $this->getParticipantInfoState($i-1);\n\t\treturn $this->memberInfoState[$i];\n\t}", "title": "" }, { "docid": "3621a0f1c458658b54ecc8d4f6babac4", "score": "0.4294471", "text": "public function build() {\n $routeName = 'nycmigrate.batchoverview';\n $routeParameters = [];\n $url = \\Drupal::url($routeName, $routeParameters);\n\n $link = \"<a href=\\\"$url\\\">Run overview migration batch process</a><br />Source: Project > field_overview_header<br />Target: Overview > field_header</a><br />\";\n\n\n $routeName = 'nycmigrate.batchdocuments';\n $routeParameters = [];\n $url = \\Drupal::url($routeName, $routeParameters);\n\n $link .= \"<a href=\\\"$url\\\">Run documents list page batch process</a><br />Source: Project > field_presentations_header<br />Target: List Page, type: Document > field_header</a><br />\";\n\n $routeName = 'nycmigrate.batchevents';\n $routeParameters = [];\n $url = \\Drupal::url($routeName, $routeParameters);\n\n $link .= \"<a href=\\\"$url\\\">Run events list page batch process</a><br />Source: Project > field_events_header<br />Target: List Page, type: Events > field_header</a><br />\";\n\n $routeName = 'nycmigrate.batchvideos';\n $routeParameters = [];\n $url = \\Drupal::url($routeName, $routeParameters);\n\n $link .= \"<a href=\\\"$url\\\">Run videos list page batch process</a><br />Source: Project > field_videos_header<br />Target: List Page, type: Videos > field_header</a><br />\";\n $routeName = 'nycmigrate.batchdocs';\n $routeParameters = [];\n $url = \\Drupal::url($routeName, $routeParameters);\n $link .= \"<a href=\\\"$url\\\">Run documents batch process</a><br />Source: Project > field_project_documents<br />Target: Document > field_document</a><br />\";\n\n\n $routeName = 'nycmigrate.batchvideo';\n $routeParameters = [];\n $url = \\Drupal::url($routeName, $routeParameters);\n $link .= \"<a href=\\\"$url\\\">Run video content item batch process</a><br />Source: Project > field_project_videos<br />Target: Video > field_header</a><br />\";\n\n $routeName = 'nycmigrate.batchsurvey';\n $routeParameters = [];\n $url = \\Drupal::url($routeName, $routeParameters);\n $link .= \"<a href=\\\"$url\\\">Run survey content item batch process</a><br />Source: Project > field_project_survey<br />Target: Survey > field_header</a><br />\";\n\n\n $routeName = 'nycmigrate.batchlinks';\n $routeParameters = [];\n $url = \\Drupal::url($routeName, $routeParameters);\n $link .= \"<a href=\\\"$url\\\">Run links content item batch process</a><br />Source: Project > field_project_links<br />Target: Project Links > field_header</a><br />\";\n\n\n $build['content'] = [\n '#type' => 'item',\n '#markup' => $this->t($link),\n ];\n return $build;\n }", "title": "" }, { "docid": "fdfe88862a6cdbcdc990aaf47c591be7", "score": "0.42929575", "text": "public function getUpSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nALTER TABLE `user` CHANGE `birth_date` `user_birth_date` DATE;\n\nALTER TABLE `user_level` DROP PRIMARY KEY;\n\nALTER TABLE `user_level` CHANGE `user_level_id` `ul_id` INTEGER NOT NULL AUTO_INCREMENT;\n\nALTER TABLE `user_level` CHANGE `user_level_name` `ul_name` VARCHAR(40);\n\nALTER TABLE `user_level` CHANGE `user_level_status` `ul_name` VARCHAR(40);\n\nALTER TABLE `user_level` CHANGE `user_level_added_by` `ul_added_by` INTEGER;\n\nALTER TABLE `user_level`\n ADD `ul_status` VARCHAR(40) AFTER `ul_name`;\n\nALTER TABLE `user_level` ADD PRIMARY KEY (`ul_id`);\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "title": "" }, { "docid": "3b72e8b7c438840812c5052824ce2e6b", "score": "0.428531", "text": "public function translatableModuleSettings($module);", "title": "" }, { "docid": "6e2d95f6b0d967c7d825f404da1e834c", "score": "0.42812073", "text": "public function up()\n {\n // Drop table 'table_name' if it exists\n $this->dbforge->drop_table('pxmenu', true);\n\n // Table structure for table 'table_name'\n $this->dbforge->add_field(array(\n 'id' => array(\n 'type' => 'MEDIUMINT',\n 'constraint' => '8',\n 'unsigned' => true,\n 'auto_increment' => true\n ),\n 'title' => array(\n 'type' => 'varchar',\n 'constraint' => '255',\n 'null' => true,\n ),\n 'url' => array(\n 'type' => 'varchar', \n 'constraint' => '255',\n 'null' => true,\n ),\n 'icon' => array(\n 'type' => 'varchar', \n 'constraint' => '255',\n 'null' => true,\n ),\n 'ismain_menu' => array(\n 'type' => 'integer', \n 'constraint' => '11',\n 'null' => true,\n ), \n 'isaktif'=> array(\n 'type' => 'smallint', \n 'constraint' => '1',\n 'default' => '1',\n 'null' => true,\n ), \n 'position' => array(\n 'type' => 'integer', \n 'constraint' => '11',\n 'null' => true,\n ),\n 'registerdate' => array(\n 'type' => 'timestamp', \n 'null' => true,\n )\n ));\n $this->dbforge->add_key('id', true);\n $this->dbforge->create_table('pxmenu');\n }", "title": "" }, { "docid": "562192b5a06b9f29689d1210a6962366", "score": "0.42808995", "text": "function hook_install_tasks(&$install_state) {\n // Here, we define a variable to allow tasks to indicate that a particular,\n // processor-intensive batch process needs to be triggered later on in the\n // installation.\n $my_profile_needs_batch_processing = \\Drupal::state()->get('my_profile.needs_batch_processing', FALSE);\n $tasks = [\n // This is an example of a task that defines a form which the user who is\n // installing the site will be asked to fill out. To implement this task,\n // your profile would define a function named my_profile_data_import_form()\n // as a normal form API callback function, with associated validation and\n // submit handlers. In the submit handler, in addition to saving whatever\n // other data you have collected from the user, you might also call\n // \\Drupal::state()->set('my_profile.needs_batch_processing', TRUE) if the\n // user has entered data which requires that batch processing will need to\n // occur later on.\n 'my_profile_data_import_form' => [\n 'display_name' => t('Data import options'),\n 'type' => 'form',\n ],\n // Similarly, to implement this task, your profile would define a function\n // named my_profile_settings_form() with associated validation and submit\n // handlers. This form might be used to collect and save additional\n // information from the user that your profile needs. There are no extra\n // steps required for your profile to act as an \"installation wizard\"; you\n // can simply define as many tasks of type 'form' as you wish to execute,\n // and the forms will be presented to the user, one after another.\n 'my_profile_settings_form' => [\n 'display_name' => t('Additional options'),\n 'type' => 'form',\n ],\n // This is an example of a task that performs batch operations. To\n // implement this task, your profile would define a function named\n // my_profile_batch_processing() which returns a batch API array definition\n // that the installer will use to execute your batch operations. Due to the\n // 'my_profile.needs_batch_processing' variable used here, this task will be\n // hidden and skipped unless your profile set it to TRUE in one of the\n // previous tasks.\n 'my_profile_batch_processing' => [\n 'display_name' => t('Import additional data'),\n 'display' => $my_profile_needs_batch_processing,\n 'type' => 'batch',\n 'run' => $my_profile_needs_batch_processing ? INSTALL_TASK_RUN_IF_NOT_COMPLETED : INSTALL_TASK_SKIP,\n ],\n // This is an example of a task that will not be displayed in the list that\n // the user sees. To implement this task, your profile would define a\n // function named my_profile_final_site_setup(), in which additional,\n // automated site setup operations would be performed. Since this is the\n // last task defined by your profile, you should also use this function to\n // call \\Drupal::state()->delete('my_profile.needs_batch_processing') and\n // clean up the state that was used above. If you want the user to pass\n // to the final Drupal installation tasks uninterrupted, return no output\n // from this function. Otherwise, return themed output that the user will\n // see (for example, a confirmation page explaining that your profile's\n // tasks are complete, with a link to reload the current page and therefore\n // pass on to the final Drupal installation tasks when the user is ready to\n // do so).\n 'my_profile_final_site_setup' => [],\n ];\n return $tasks;\n}", "title": "" }, { "docid": "690ee1119db7f4c54dee2ff82f15f667", "score": "0.42798966", "text": "function druid_getmoduleinfo()\n{\n\t$info = array (\n\t\t\"name\" => \"Druid\",\n\t\t\"version\" => \"1.62\",\n\t\t\"author\" => \"Strider and Talisman<br>of Legendgard / Dragonprime\",\n\t\t\"category\" => \"Forest Specials\",\n\t\t\"download\" =>\"core_module\",\n\t\t\"settings\"=>array(\n\t\t\t\"Druid Forest Event Settings,title\",\n\t\t\t\"carrydk\"=>\"Do max hitpoints gained carry across DKs?,bool|0\",\n\t\t),\n\t\t\"prefs\"=>array(\n\t\t\t\"Druid Forest Event User Preferences,title\",\n\t\t\t\"extrahps\"=>\"How many extra max hitpoints has the user gained?,int\",\n\t\t),\n\t);\n\treturn $info;\n}", "title": "" }, { "docid": "3941e600d7ca1c0089f48d3c2ae59027", "score": "0.4275569", "text": "public function getModuleConfigFields()\r\n {\r\n return $this->_fields;\r\n }", "title": "" }, { "docid": "f81e0247a735707ee936dea2b140ef78", "score": "0.42728308", "text": "public function getMigration(string $path = ''): array;", "title": "" }, { "docid": "34cd90c8117be917d7feddd3f919b9e0", "score": "0.42710817", "text": "public function loadChildThemeInfo($name)\n {\n $theme = $this->theme_repository->getInstanceByName($name);\n $infoPath = $theme->getDirectory().'config/themeChildInfo.yml';\n\n return Yaml::parse(file_get_contents($infoPath));\n }", "title": "" }, { "docid": "609fc5175c4e5575f7530600a5a2c815", "score": "0.42706242", "text": "public function getEntryState();", "title": "" }, { "docid": "fb4320e30a1dd4ff93042a1738f9fe81", "score": "0.42699772", "text": "function drush_drupal_version($drupal_root = NULL) {\n static $version = FALSE;\n\n if (!$version) {\n if (($drupal_root != NULL) || ($drupal_root = Drush::bootstrapManager()->getRoot())) {\n $bootstrap = Drush::bootstrapManager()->bootstrapObjectForRoot($drupal_root);\n if ($bootstrap) {\n $version = $bootstrap->getVersion($drupal_root);\n }\n }\n }\n return $version;\n}", "title": "" }, { "docid": "4d40d7cda6601a53e60cc25a0562e187", "score": "0.42688504", "text": "function bimber_run_migrations() {\n\t// V5.4.\n\tif ( ! bimber_get_theme_option( 'migration', 'v54' ) ) {\n\t\tbimber_migration_5_4();\n\t\tbimber_set_theme_option( 'migration', 'v54', 'done' );\n\t}\n\n\t/*\n\t * v6.0\n\t *\n\t * From now, please use get_option instead of bimber_get_theme_option.\n\t * It will be easier to check in user's db if migration has been done or not.\n\t */\n\tif ( ! get_option( 'bimber_migration_v60' ) ) {\n\t\tif ( bimber_migration_6_0() ) {\n\t\t\tupdate_option( 'bimber_migration_v60', 'done' );\n\t\t}\n\t}\n\n\t// Reset TGM notices after every update.\n\tif ( bimber_get_theme_version() !== get_option( 'bimber_tgm_reset_ver' ) ) {\n\t\tbimber_reset_tgm_notices();\n\t\tupdate_option( 'bimber_tgm_reset_ver', bimber_get_theme_version() );\n\t}\n}", "title": "" }, { "docid": "b2c5a3ab816327e4ed2da2604eb082f0", "score": "0.42659378", "text": "public function getIsLiveMigration()\n {\n return isset($this->is_live_migration) ? $this->is_live_migration : false;\n }", "title": "" }, { "docid": "e457b905333cb6b4d7f6f796d794a1eb", "score": "0.42637596", "text": "public function stateList()\n {\n return array_flip($this->getConfig('states'));\n }", "title": "" }, { "docid": "9779ddb93f16a0f3fa9674eb75694576", "score": "0.42624897", "text": "public function getNext() {\n\t\t$list = $this->getList();\n\t\tforeach($list as $migration=>$params) {\n\t\t\tif(!isset($params['migrated']))\n\t\t\t\treturn $migration;\n\t\t}\n\t}", "title": "" }, { "docid": "b50315b07672b74bf8e77c22d824d006", "score": "0.42589387", "text": "public function getDbUrl()\n {\n return 'mysql://drupal:123@db/drupal';\n }", "title": "" } ]
0edc9aadc78ca8b2a5a02e1a0860fb56
Deletes a Nouvelle entity.
[ { "docid": "98747db54bd6baba033878b166213fd5", "score": "0.61069334", "text": "public function deleteAction(Request $request, $id)\n {\n $em = $this->getDoctrine()->getManager();\n $nouvelle = $em->getRepository('ApplicationPlateformeBundle:Nouvelle')->find($id);\n $beneficiaire = $nouvelle->getBeneficiaire();\n\n if (!$nouvelle) {\n throw $this->createNotFoundException('Unable to find Nouvelle.');\n }\n\n $em->remove($nouvelle);\n $em->flush();\n\n $this->get('session')->getFlashBag()->add('info', 'Nouvelle supprimé avec succès');\n\n return $this->redirect($this->generateUrl('application_show_beneficiaire', array(\n 'id' => $beneficiaire->getId(),\n )));\n }", "title": "" } ]
[ { "docid": "358ac0e824cef5f24178fc0daf22ba70", "score": "0.71941173", "text": "public function delete($entity);", "title": "" }, { "docid": "fa12fe324725b5cb45a9c32764e31e88", "score": "0.7057556", "text": "function delete($entity);", "title": "" }, { "docid": "694bffff191c2674a9111f471eb49a7d", "score": "0.6931166", "text": "public function Delete($entity) {\r\n }", "title": "" }, { "docid": "7629c942d46ca9ccd4fb31fca0998d4e", "score": "0.69029164", "text": "abstract public function delete($entity);", "title": "" }, { "docid": "d42dab2c1056cf07f60115a8ff909fe2", "score": "0.689617", "text": "public function Delete($entity) {\n }", "title": "" }, { "docid": "398647716a6a2003806e5dd00599988c", "score": "0.672739", "text": "public function delete($entity)\n {\n }", "title": "" }, { "docid": "4bb5cfeaa64c89197c345f3388cd3903", "score": "0.65544206", "text": "public function delete()\n {\n //recuperation des informations pour la suppression d'un niveau\n $data = $this->request->data;\n $id_niveau = (int)$data['id_niveau'] ?? null;\n if (empty($id_niveau)) {\n $this->_return('Veillez spécifier l\\'identifiant du niveau à supprimer', false);\n }\n\n if (true !== $this->model->exist('id_niveau', (int)$data['id_niveau'], 'Classes')) {\n $this->_return('impossible de supprimer ce niveau car il comporte encore des classes ', false);\n }\n if (true !== $this->model->exist('id_niveau', (int)$data['id_niveau'], 'Semestres')) {\n $this->_return('impossible de supprimer ce niveau car il comorte encore des semestres ', false);\n }\n\n try {\n $this->model->remove($id_niveau);\n $this->_return('niveau supprimé avec succès', true);\n //code...\n } \n catch (Exception $e)\n {\n $this->_exception($e);\n }\n }", "title": "" }, { "docid": "78c9b625223524b67f3b97fec5b71e41", "score": "0.64453256", "text": "public function deleted(Personne $personne)\n {\n //\n }", "title": "" }, { "docid": "1119ac12c1623754aa04d572730782cf", "score": "0.6424835", "text": "public function delete(EntityInterface $entity);", "title": "" }, { "docid": "18acd8ad0eaeee766c3f4345e45e4834", "score": "0.6415658", "text": "public function onEntityDelete(EntityEvent $event) {\n // $this->projectRepository->delete($event->getEntity()->id());\n }", "title": "" }, { "docid": "7717e4099460cf565157db9566126e7c", "score": "0.6394231", "text": "public function delete($entity) {\n $this->deleteMultiple(array($entity));\n }", "title": "" }, { "docid": "eb42c7ecb4fb41c06a24f7635818b9a9", "score": "0.63894373", "text": "abstract public function delete(AbstractDomainObject $entity);", "title": "" }, { "docid": "88670a1827ab4774bb7496b677d54a83", "score": "0.63639313", "text": "abstract public function deleteEntity($entity_id);", "title": "" }, { "docid": "2f9a877385cccac79539a49b735477f9", "score": "0.6332526", "text": "public function delete () {\n $news = new News();\n\n $news = $news->delete('news', [\n 'id' => $_GET['id'],\n ]);\n\n return $this->redirect('');\n }", "title": "" }, { "docid": "408b99a681c5efdc5c7ad70338b84ef7", "score": "0.62964404", "text": "public function delete(object $entity, int $mode = self::MODE_CASCADE): self;", "title": "" }, { "docid": "0dfd52f3d0fa7f968c71b455d6d15be0", "score": "0.62917715", "text": "public function deleteById($entityId);", "title": "" }, { "docid": "0dfd52f3d0fa7f968c71b455d6d15be0", "score": "0.62917715", "text": "public function deleteById($entityId);", "title": "" }, { "docid": "0dfd52f3d0fa7f968c71b455d6d15be0", "score": "0.62917715", "text": "public function deleteById($entityId);", "title": "" }, { "docid": "1cbc05cf3e1f2d58a2612588144496ed", "score": "0.62727755", "text": "public function delete( Entity $form ) {\n\t}", "title": "" }, { "docid": "325c9b45a992e4fb3fba4eaede80175b", "score": "0.6242436", "text": "protected function _delete()\n { \n $id = (int) $this->id;\n \n //Check if there is a user account associated with this\n \n if ($user = $this->user_id) {\n $user->delete();\n }\n \n $db = get_db();\n \n //Remove all taggings associated with this entity\n $taggings = $db->getTable('Taggings')->findBy(array('entity' => $id));\n \n foreach ($taggings as $tagging) {\n $tagging->delete();\n }\n \n $update_join = \"\n UPDATE $db->EntitiesRelations \n SET entity_id = NULL \n WHERE entity_id = ?\";\n \n $db->exec($update_join, array($id)); \n }", "title": "" }, { "docid": "15a69ecfd10ca1faa0fb630cccf044b6", "score": "0.62369776", "text": "public function delete(EntityInterface $entity): void;", "title": "" }, { "docid": "15a69ecfd10ca1faa0fb630cccf044b6", "score": "0.62369776", "text": "public function delete(EntityInterface $entity): void;", "title": "" }, { "docid": "79c1b6660834f49911cdc573ee87bf16", "score": "0.62316215", "text": "public function delete() {\n\t\t$pk = $this->_route->location;\n\n\t\t$model = $this->__model();\n\n\t\t$conditions = array($model::key() => $pk);\n\t\t$entity = $model::find('first', compact('conditions'));\n\n\t\t$container = $this->container('Entity');\n\t\tif ($entity) {\n\t\t\tif (!$entity->delete()) {\n\t\t\t\tthrow new \\Exception('Delete failed!');\n\t\t\t}\n\t\t\t$container['data'] = $entity->to('array');\n\t\t}\n\n\n\t\treturn $container;\n\t}", "title": "" }, { "docid": "75613db9edf54a593aac8b5d470ef0b5", "score": "0.62141454", "text": "public function deleteAction()\n {\n $request = $this->getRequest();\n $newsId = $request->getQuery('id');\n if (filter_var($newsId, FILTER_VALIDATE_INT, array('options' => array('min_range' => 1))) === false) {\n $this->_redirect('/admin/index/index');\n return;\n }\n \n $news = new \\Service\\News();\n $response = $news->delete($newsId)->get();\n \n if ($response['result'] == true) {\n \\Zend_Registry::getInstance()->entityManager->flush();\n }\n\n $this->indexAction();\n $this->render('index');\n }", "title": "" }, { "docid": "15d48c929b0554fe75eb18d125ce7ded", "score": "0.62139547", "text": "public function deleteAction( Request $oRequest ) {\n\t\t\n\t\t$this->_handleRequest($oRequest);\n\t\t\n\t\t$oUser = $this->getUser();\n\t\t$oGame = $this->getGame();\n\t\t\n\t\t//\n\t\t$oEntManager = $this->getDoctrine()->getEntityManager();\n\t\t\n\t\t$aForm = $this->_getFormEntityDeleteAr( $oGame, $oUser );\n\t\tforeach ( $aForm as $oForm ) {\n\t\t\t\n\t\t\t// Skip unsubmited/invalid form\n\t\t\t$oForm->handleRequest( $oRequest );\n\t\t\tif( !$oForm->isSubmitted() || !$oForm->isValid() )\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\t$iEntityId = $oForm->getData()['entity_id'];\n\t\t\t\n\t\t\t// Fast delete\n\t\t\t$oEntityRef = $oEntManager->getReference( Pawn::class, $iEntityId );\n\t\t\t$oEntManager->remove( $oEntityRef );\n\t\t\t\n\t\t\t// Commit\n\t\t\t$oEntManager->flush();\n\t\t\t\n\t\t\tbreak;\n\t\t}\n\t\treturn $this->redirect( $this->generateUrl('play') );\n\t}", "title": "" }, { "docid": "30d12407d208c7245c67fe3e3c0e6844", "score": "0.6207272", "text": "public function remove (object $entity);", "title": "" }, { "docid": "cc2c375b50004ae2e2149c6b206c8cfa", "score": "0.6190034", "text": "public function onDeleteDoi(EntityEvent $event)\n {\n $dataset = $event->getEntity();\n $doi = $dataset->getDoi();\n if ($doi) {\n $doiMessage = new DoiMessage((string) $doi->getDoi(), DoiMessage::DELETE_ACTION);\n $this->messageBus->dispatch($doiMessage);\n }\n }", "title": "" }, { "docid": "fb95502c06030703812849f0bc2cb8ca", "score": "0.61786705", "text": "public function delete() {\n \n // Does the Article object have an ID?\n if ( is_null( $this->id ) ) trigger_error ( \"Article::delete(): Attempt to delete an Article object that does not have its ID property set.\", E_USER_ERROR );\n \n\n \t\t// delete all images which are connected to the article\n\t\t$images = Image::getImagesByArticleId( $this->id );\n\n\t\tforeach ($images as $image) {\n\t\t\t$image->delete();\n\t\t}\n\n // Delete the Article\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $st = $conn->prepare ( \"DELETE FROM articles WHERE id = :id LIMIT 1\" );\n $st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\n $st->execute();\n $conn = null;\n }", "title": "" }, { "docid": "952f16dc99e658bbfdd06de2fb3c888a", "score": "0.61777425", "text": "public function deleteFromDatabase();", "title": "" }, { "docid": "519a5907c08c52ff68eb133ecf004ec5", "score": "0.6171091", "text": "public function testDelete()\n {\n $loader = $this->account->getServiceManager()->get(\"EntityLoader\");\n $entity = $loader->create(\"note\");\n $entity->setValue(\"name\", \"Test\");\n $dm = $this->account->getServiceManager()->get(\"Entity_DataMapper\");\n $dm->save($entity);\n $entityId = $entity->getId();\n\n // Set params in the request\n $req = $this->controller->getRequest();\n $req->setParam(\"obj_type\", \"note\");\n $req->setParam(\"id\", $entityId);\n\n // Try to delete\n $ret = $this->controller->postRemoveAction();\n $this->assertEquals($entityId, $ret[0]);\n }", "title": "" }, { "docid": "845a08ee32fa9e300ba65b3a8910fb6b", "score": "0.61694485", "text": "public function deleteAction(Request $request, Niveau $niveau)\n {\n $form = $this->createDeleteForm($niveau);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->remove($niveau);\n $em->flush();\n }\n\n return $this->redirectToRoute('niveau_index');\n }", "title": "" }, { "docid": "27c6541a21ec8355a640070a3ac77de9", "score": "0.61471105", "text": "public function deleteAction(Request $request, Ventes $vente)\n {\n $form = $this->createDeleteForm($vente);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->remove($vente);\n $em->flush();\n }\n\n return $this->redirectToRoute('admin_ventes_index');\n }", "title": "" }, { "docid": "5461d182975a25ef96f9aac94f93938b", "score": "0.61419576", "text": "public function deleteAction(Request $request, TurnosSede $turnosSede)\n{\n $form = $this->createDeleteForm($turnosSede);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n try{\n $em = $this->getDoctrine()->getManager();\n $em->remove($turnosSede);\n $em->flush();\n\n $this->get('session')->getFlashBag()->add('success', 'El registro se ha dado de baja satisfactoriamente.');\n }catch(\\Exception $e){\n $this->get('session')->getFlashBag()->add('error', 'Hubo un error al intentar eliminar el registro.');\n }\n }\n\n return $this->redirectToRoute('turnossede_index');\n}", "title": "" }, { "docid": "6338991c738e7893e06b3949c7ec95d7", "score": "0.6133655", "text": "public function delEntity()\n {\n list($response) = $this->delEntityWithHttpInfo();\n return $response;\n }", "title": "" }, { "docid": "0929be2e4487a3c07a7b16dfb82985c5", "score": "0.61324066", "text": "public function getElimartarifadetalle(){\n\t $id = Input::get('id');\n\n\t $t_d = TarifaDetalle::find($id);\n\t $t_d->delete();\n\n}", "title": "" }, { "docid": "5bfd974282e13e886f7e9759e7988b9c", "score": "0.6125657", "text": "public function delete(Request $request)\n {\n \t$id = $request->input('id');\n\n \t$article = $this->repository->find($id);\n\n \t$article->delete();\n \n return redirect()->route($this->getProperRedirectRoute('articles'))->with('success', 'Article succesfully deleted');\n }", "title": "" }, { "docid": "d4379790445cb67f8ac00152d4c85f19", "score": "0.6107416", "text": "public function deleteAction(Request $request)\n {\n $em = $this->getDoctrine()->getManager();\n $id = $request->request->get('POST_ID');\n\n $post = $em->getRepository('BlogBundle:Post')->find($id);\n $em->remove($post);\n $this->addFlash('success', 'Votre article a été supprimé avec succès !');\n $em->flush($post);\n \n return $this->redirectToRoute('admin_show');\n }", "title": "" }, { "docid": "e397868c677197d35e62e679d611a425", "score": "0.6104314", "text": "public function deleteNiveauAction($id)\n { try{\n $em= $this->getDoctrine()->getManager();\n $niveau = $em->getRepository('AdminBundle:Niveau')->find($id);\n $em->remove($niveau);\n $em->flush();\n }catch (\\Exception $e)\n { $res=2;}\n return $this->redirect($this->generateUrl('admin_listeniveau'));\n }", "title": "" }, { "docid": "b145f1e2fa5a3cfa4104293cb1e1f18c", "score": "0.6098348", "text": "public function delete()\n {\n $this->delete_by_id($this->field['id']);\n }", "title": "" }, { "docid": "857ca450b4133a6bb916ed82187d9907", "score": "0.60921866", "text": "public function delete()\n {\n \n }", "title": "" }, { "docid": "857ca450b4133a6bb916ed82187d9907", "score": "0.60921866", "text": "public function delete()\n {\n \n }", "title": "" }, { "docid": "17d322b8fc578a2985e5d004225626da", "score": "0.60824066", "text": "public function delete($entity)\n\t{\n\t\t$this->entityManager->remove($entity);\n\t\t$this->entityManager->flush();\n\t\treturn $entity;\n\t}", "title": "" }, { "docid": "22962fb4e53e95756a466e5ad64a96f8", "score": "0.6078858", "text": "public function delete($entity) {\n\t\t$class = $this->_class;\n\t\tif (!$entity->getLocalUniqueIdentifier())\n\t\t\tthrow new Exception(\"cannot delete entity which doesn't have an ID value\");\n\t\t\n\t\t$idArray = $entity->getId();\n\t\tif (!is_array($idArray))\n\t\t\t$idArray = array($entity::getIdField() => $idArray);\n\t\t\n\t\tunset($this->_cachedEntities[$entity->getLocalUniqueIdentifier()]);\n\t\t$this->_connection->delete($class, $idArray);\n\t}", "title": "" }, { "docid": "5227164234674a69f9f55db6094acd03", "score": "0.60783744", "text": "public function delete(Request $request)\n {\n $this->newHouseService->deleteItem($request->id);\n return $this->success();\n }", "title": "" }, { "docid": "d4f1f76b52592340ca5eef659569e4c0", "score": "0.6067995", "text": "public function deleteAction() {\n $logger = $this->get('logger');\n if (!$this->get('request')->isXmlHttpRequest()) { // Is the request an ajax one?\n return new Response(\"<b>Not an ajax call!!!\" . \"</b>\");\n }\n\n try {\n //Get parameters\n $request = $this->get('request');\n $id = $request->get('id');\n $entity = $request->get('entity');\n $translator = $this->get(\"translator\");\n\n if( isset($id) ){\n $em = $this->getDoctrine()->getManager();\n $user = $em->getRepository('TecnotekAsiloBundle:User')->find($id);\n if( isset($user) ) {\n $em->remove($user);\n $em->flush();\n return new Response(json_encode(array(\n 'error' => false,\n 'msg' => $translator->trans('catalog.delete.success'))));\n } else {\n return new Response(json_encode(array(\n 'error' => true,\n 'msg' => $translator->trans('validation.not.found'))));\n }\n } else {\n return new Response(json_encode(array('error' => true, 'msg' => \"Missing Parameters\")));\n }\n } catch (Exception $e) {\n $info = toString($e);\n $logger->err('Catalog::deleteAction [' . $info . \"]\");\n return new Response(json_encode(array('error' => true, 'msg' => $info)));\n }\n }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.60659355", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.60659355", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.60659355", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.60659355", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.60659355", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.60659355", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.60659355", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.60659355", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.60659355", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.60659355", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.60659355", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.60659355", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.60659355", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.60659355", "text": "public function delete();", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6064678", "text": "public function delete() {}", "title": "" }, { "docid": "54a387b7bd89c7b21b61069e636e1951", "score": "0.60644996", "text": "public function remove() {\n $em = new EntityManager($this);\n $em->remove();\n if ($em->getError() !== false) {\n // tratar retorno false\n echo $em->getMessage(); // mostra mensagem de erro\n } else {\n // zerar dados do objeto;\n $this->setDados(array());\n }\n }", "title": "" }, { "docid": "ca760c7acadedc3adc3970ed7a4089c8", "score": "0.6058526", "text": "public function delete() {\n }", "title": "" }, { "docid": "ca760c7acadedc3adc3970ed7a4089c8", "score": "0.6058526", "text": "public function delete() {\n }", "title": "" }, { "docid": "079c717dc7b2a9f3c32d5d15fd0c26f8", "score": "0.60550547", "text": "public function delete()\n {\n EM::instance()->remove($this);\n EM::instance()->flush($this);\n }", "title": "" }, { "docid": "0e34fcfdc62ceda4553fa85cb03f08aa", "score": "0.6054914", "text": "function delete ()\n {\n $node_type_category_id = $this->input->post ( 'node_type_category_id' );\n $checkNodeInCategory = Doctrine::getTable ( 'NodeTypeCategory' )->checkNodeInCategory ( $node_type_category_id );\n if ( $checkNodeInCategory === false )\n {\n $nodeTypeCategory = Doctrine::getTable ( 'NodeTypeCategory' )->find ( $node_type_category_id );\n if ( $nodeTypeCategory->delete () )\n {\n $exito = true;\n $msg = $this->translateTag ( 'General' , 'operation_successful' );\n }\n else\n {\n $exito = false;\n $msg = 'Error: ';\n }\n }\n else\n {\n $exito = false;\n $msg = $this->translateTag ( 'General' , 'category_node_type_eliminated_associated_node' );\n }\n $json_data = $this->json->encode ( array ( 'success' => $exito , 'msg' => $msg ) );\n echo $json_data;\n }", "title": "" }, { "docid": "02cb539940ba7238affa344a84c40838", "score": "0.60446", "text": "function deleteOrangtua (Request $request) {\n$id=Crypt::decrypt($request->input('id'));\n$record = Orangtua::find($id);\nif($record){\n$record->delete();\n$request->session()->flash('notice', \"Hapus Data Berhasil!\");\nreturn redirect(URLGroup('bidikmisi/orangtua'));\n}else{\nthrow new HttpException(404);\n}\n}", "title": "" }, { "docid": "c8f8de7f788359037ec146f1655e70b3", "score": "0.6041517", "text": "public function deleteAction( Request $request, Expediente $expediente ) {\n\t\t$form = $this->createDeleteForm( $expediente );\n\t\t$form->handleRequest( $request );\n\n\t\tif ( $form->isSubmitted() && $form->isValid() ) {\n\t\t\t$em = $this->getDoctrine()->getManager();\n\t\t\t$em->remove( $expediente );\n\t\t\t$em->flush();\n\t\t}\n\n\t\treturn $this->redirectToRoute( 'expediente_index' );\n\t}", "title": "" }, { "docid": "3795c68099094f43b184b695c451d5ab", "score": "0.60220337", "text": "public function delete() {\n\t\t}", "title": "" }, { "docid": "50e8191989cb34e1f4734db71d29dd94", "score": "0.60209817", "text": "protected function removeEntity($entity)\n {\n }", "title": "" }, { "docid": "c9ac0b4923dbe67b87eee63dd61daa3e", "score": "0.6013544", "text": "public function delete() {\n\t\t\n\t}", "title": "" }, { "docid": "46b27c6f70c5255bfef9da1a2486c569", "score": "0.5994064", "text": "public function delete(Entity $entity) {\n\t\t$sql = 'DELETE FROM `' . $this->tableName . '` WHERE `id` = ?';\n\t\t$stmt = $this->execute($sql, [$entity->getId()]);\n\t\t$stmt->closeCursor();\n\t\treturn $entity;\n\t}", "title": "" }, { "docid": "e49e05101bf5d11df61dada505bb0393", "score": "0.5988894", "text": "public function delete(Model $model);", "title": "" }, { "docid": "e10bb47671bdebd87a5ecc41c5b4187c", "score": "0.59884006", "text": "public function delete($puesto);", "title": "" }, { "docid": "e0560362c1819505ade7915ab3fbcc0f", "score": "0.5985576", "text": "public function delete($majoraEntitys);", "title": "" }, { "docid": "95bcf86fa8c0d49d866fc5da18503124", "score": "0.5981805", "text": "public function deleteArticle(Article $article)\n {\n }", "title": "" }, { "docid": "64a38833fc817017c30dd356b65bd4a7", "score": "0.59808135", "text": "public function delete()\n {\n $this->phclass->delete($this);\n }", "title": "" }, { "docid": "7e8e11c10a2b7fe211fee248cc294e35", "score": "0.59771556", "text": "public function delete(Request $request)\n {\n $id = $request->id;\n\n $tipo = $this->tipo->find($id);\n\n if ($tipo->delete() == TRUE) {\n\n flash('Tipo removido com sucesso!')->success();\n return redirect()->route('admin.tipos.index');\n\n }\n \n }", "title": "" }, { "docid": "c8a805f3c7732481dd056530789a0758", "score": "0.5974206", "text": "public function eliminar(Request $request)\n {\n $silla = $this->repo->find($request->id);\n if (!$silla) {\n return response()->json([\n \t\t'status' => 'No existe silla con el id asociado'\n\t\t]);\n }\n else{\n //fwrite(STDERR, print_r($request->id, TRUE));\n // $silla = $this->repo->find($request->id);\n // fwrite(STDERR, print_r($silla, TRUE));\n $silla->delete();\n return response()->json([\n 'status' => 'ok'\n ]);\n }\n\n\n }", "title": "" }, { "docid": "ea813e95cca2739bbb2c5e6c7b444263", "score": "0.59662336", "text": "public function delete($model);", "title": "" }, { "docid": "f7bd2b7711c6c767bea3eda819c8fa5b", "score": "0.5964226", "text": "public function deleteAction(Request $request, Glycemie $glycemie) {\n $form = $this->createDeleteForm($glycemie);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->remove($glycemie);\n $em->flush();\n }\n\n return $this->redirectToRoute('glycemie_index');\n }", "title": "" }, { "docid": "da4a2033f5d8999870c23a4c90d3d7d4", "score": "0.5962288", "text": "function hook_entity_delete(\\Drupal\\Core\\Entity\\EntityInterface $entity) {\n // Delete the entity's entry from a fictional table of all entities.\n \\Drupal::database()->delete('example_entity')\n ->condition('type', $entity->getEntityTypeId())\n ->condition('id', $entity->id())\n ->execute();\n}", "title": "" }, { "docid": "dec8008a7ff4971074f78c213ebaaa3e", "score": "0.59600496", "text": "public function deleting()\n {\n //\n }", "title": "" }, { "docid": "348edbf1a45909b767f9e022367088b0", "score": "0.5957971", "text": "public function delete($dn);", "title": "" }, { "docid": "3de5e127881252d6baaaac700c781209", "score": "0.5952305", "text": "public function removeAction() {\n $id = $_GET['dat_id'];\n // inicia o model\n $data = new Application_Model_Data();\n // remove o item do banco de dados\n $data->delete($id);\n echo 'ok';\n exit;\n }", "title": "" }, { "docid": "6fb88152083f5c62b146994589ce3b8c", "score": "0.5950684", "text": "public function actionDelete()\n {\n if (Yii::$app->request->isAjax && Yii::$app->request->isPost) {\n $equipoId = Yii::$app->request->post('equipo_id');\n return $this->findModel($equipoId, Yii::$app->user->identity->id)->delete();\n }\n }", "title": "" }, { "docid": "6de915084d42cb5f62ed069fed75bb6d", "score": "0.5942932", "text": "public function delete(){ }", "title": "" }, { "docid": "a81365633fd5b106741f1068f03a568a", "score": "0.5940962", "text": "public function remove(object $entity): void;", "title": "" }, { "docid": "b076952b6a3cd8a6087205d283aec5d1", "score": "0.59314406", "text": "public function delete()\n {\n if ($this->request->exists('post')) {\n $data = $this->request->get();\n if ($data['csrftoken'] && $this->token->validateToken($data['csrftoken'], $data['frm_name'])) {\n $table = str_replace(' ', '', ucwords(str_replace('_', ' ', $data['table'])));\n $model = $this->container->make($table . 'Manager'::class);\n $method = isset($data['method']) ? $data['method'] : '';\n $output = $method != '' ? $model->$method($data) : $model->delete($data);\n if ($output) {\n $this->jsonResponse(['result' => 'success', 'msg' => $output]);\n }\n }\n }\n }", "title": "" }, { "docid": "1adbb7a2d3d855d2cd3da88bb8d8f77a", "score": "0.59293383", "text": "public function delete(Entity $entity) {\n if ( $entity->id ) {\n return $this->_model->delete($this->_table_name)->where(['id' => $entity->id])->execute();\n }\n \n return FALSE;\n }", "title": "" }, { "docid": "f6af3990b6ceaaa32c24292a13bf6c83", "score": "0.5928763", "text": "public function delete()\r\n {\r\n }", "title": "" }, { "docid": "394ee1a29eb8fbc705dde5527169f2b4", "score": "0.5928242", "text": "public function delete()\n\t{}", "title": "" }, { "docid": "0ddf91c6bf2366e5443d1e4d39be5784", "score": "0.59189147", "text": "public function deleteAction(Request $request, Entreprises $entreprise)\n {\n $form = $this->createDeleteForm($entreprise);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->remove($entreprise);\n $em->flush();\n }\n\n return $this->redirectToRoute('entreprises_index');\n }", "title": "" }, { "docid": "4c602d64208e8eb86b27934e50fbb711", "score": "0.59147704", "text": "public function actionDelete()\n {\n $purifier = new HtmlPurifier;\n $param = $purifier->process( Yii::$app->request->get('id') );\n\n $realidadaumentada = $this->findModel($param);\n $proyecto = Proyecto::find()->where(['idpro'=>$realidadaumentada->fkpro])->one();\n $imagen = Imagen::find()->where(['idimag'=>$realidadaumentada->fkimag])->one();\n\n if ($realidadaumentada->delete()) {\n if ($proyecto->delete()) {\n if ($imagen->delete()) {\n Yii::$app->session->setFlash('succes','El Proyecto de Realidad Aumentada fue Eliminado!!');\n return $this->redirect(['index']);\n }\n }\n }\n\n }", "title": "" }, { "docid": "60c04de65f5160a1c865e13ede50ed38", "score": "0.5913694", "text": "public function delete()\r\n\t{\r\n\t\t$sql = 'DELETE FROM '.static::$_table.' WHERE id=\"'.$this->_obj_id.'\"';\r\n\t\tself::db()->delete($sql);\r\n\t}", "title": "" }, { "docid": "878c02e45adaebfb6493e76b5977d9d1", "score": "0.5911742", "text": "public function deleteAction()\n {\n\n $data = $this->getService()->removeEntity($this->getRequest());\n\n return $this->renderJson($data);\n }", "title": "" }, { "docid": "63ec886596fa90e6a98d8e7b252aa742", "score": "0.5909614", "text": "public function delete()\n {\n }", "title": "" }, { "docid": "63ec886596fa90e6a98d8e7b252aa742", "score": "0.5909614", "text": "public function delete()\n {\n }", "title": "" }, { "docid": "63ec886596fa90e6a98d8e7b252aa742", "score": "0.5909614", "text": "public function delete()\n {\n }", "title": "" }, { "docid": "63ec886596fa90e6a98d8e7b252aa742", "score": "0.5909614", "text": "public function delete()\n {\n }", "title": "" }, { "docid": "63ec886596fa90e6a98d8e7b252aa742", "score": "0.5909614", "text": "public function delete()\n {\n }", "title": "" } ]
59c94950b4c3038042dd1d26d1d0617f
Returns a string representation of the name by imploding the namespace parts with the namespace separator.
[ { "docid": "dd90521c1bd55f8fa77ed0ed56a4e500", "score": "0.0", "text": "public function __toString() : string {\n return implode('\\\\', $this->parts);\n }", "title": "" } ]
[ { "docid": "2572b95c14cfe19888f97c4eb362ab95", "score": "0.7026452", "text": "public function n($name = '') {\n if ($this->namespace == '')\n return $name;\n if ($name == '')\n return $this->namespace;\n return $this->namespace . '\\\\' . $name;\n }", "title": "" }, { "docid": "2bb7eaec3c5d5beb5702b14e710ead6d", "score": "0.6768248", "text": "public function getNamespaceName(): string\n {\n $parts = $this->node->namespacedName->parts;\n array_pop($parts);\n return implode('\\\\', $parts);\n }", "title": "" }, { "docid": "0aa67da3c64d61dfdb81af001cdb3217", "score": "0.6621543", "text": "public function getNamespaceName()\n {\n if ( ( $pos = strrpos( $this->_name, '\\\\' ) ) === false )\n {\n return '';\n }\n return substr( $this->_name, 0, $pos );\n }", "title": "" }, { "docid": "5de95b32aaf50d00f37c68c9dd35b5f9", "score": "0.6251759", "text": "abstract protected function getNamespaceSeparator();", "title": "" }, { "docid": "4f756ac7c5ffbb0245b85ecdc3b992ed", "score": "0.59658134", "text": "protected function prefixWithNamespace($path)\n {\n return $this->argumentNameSpace . ':'.$path;\n }", "title": "" }, { "docid": "47b992e112d4042ff5044a17eed9a410", "score": "0.5914868", "text": "protected function getFullyQualifiedName($name)\n {\n if ($name instanceof FullyQualifiedName) {\n return implode('\\\\', $name->parts);\n } elseif ($name instanceof Name) {\n $name = $name->parts;\n } elseif (!is_array($name)) {\n $name = array($name);\n }\n\n return implode('\\\\', array_merge($this->namespace, $name));\n }", "title": "" }, { "docid": "0bdfcbd53d94dc813fdce0a4667f8646", "score": "0.58676773", "text": "public function getFullname() {\n return $this->getNamespace().'\\\\'.$this->getName();\n }", "title": "" }, { "docid": "9ecbb6ef62a13d47ea3b487251fb87e7", "score": "0.58162206", "text": "protected function build_namespace($namespace)\r\n\t{\r\n\t\tif(!$this->supports_namespaces){\r\n\t\t\tif(!isset($this->namespace_version_map[$namespace])){\r\n\t\t\t\t$this->namespace_version_map[$namespace] = 1;\r\n\t\t\t\t$this->save('namespace_version_map', $this->namespace_version_map);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn $namespace.'_'.$this->namespace_version_map[$namespace];\r\n\t\t}\r\n\t\t\r\n\t\treturn $namespace;\r\n\t}", "title": "" }, { "docid": "8624c4b666a6ea0667544bc8506bf49d", "score": "0.5808168", "text": "protected function getFullyQualifiedName($name): string\n {\n if ($name instanceof FullyQualifiedName) {\n return \\implode('\\\\', $name->parts);\n } elseif ($name instanceof Name) {\n $name = $name->parts;\n } elseif (!\\is_array($name)) {\n $name = [$name];\n }\n\n return \\implode('\\\\', \\array_merge($this->namespace, $name));\n }", "title": "" }, { "docid": "33398bfbccadb8c18c5bf50be1b98883", "score": "0.58004653", "text": "final public function getName()\n {\n if (null !== $this->name) {\n return $this->name;\n }\n\n $name = $this->getNamespace();\n $pos = strrpos($name, '\\\\');\n\n return $this->name = false === $pos ? $name : substr($name, $pos + 1);\n }", "title": "" }, { "docid": "80c79d5c26b8c68c940381cf9afa13c0", "score": "0.57796884", "text": "public function getNamespaceName();", "title": "" }, { "docid": "1a49334a7890ffc12e484554015d90c1", "score": "0.5771713", "text": "public function namespace(): string\n {\n return rtrim($this->classes()->countBy(function ($class) {\n return Str::before($class, class_basename($class));\n })->sort()->keys()->last(), \"\\\\\");\n }", "title": "" }, { "docid": "a20e877d0e2b1b21edb9efbfa171381f", "score": "0.5755274", "text": "public function getNamespaceSeparator()\n {\n return $this->nsSep;\n }", "title": "" }, { "docid": "435c702331fb190153602c80a503c9fa", "score": "0.57358116", "text": "protected function getNamespace($name)\n {\n return trim(implode('\\\\', array_slice(explode('\\\\', $name), 0, -1)), '\\\\');\n }", "title": "" }, { "docid": "435c702331fb190153602c80a503c9fa", "score": "0.57358116", "text": "protected function getNamespace($name)\n {\n return trim(implode('\\\\', array_slice(explode('\\\\', $name), 0, -1)), '\\\\');\n }", "title": "" }, { "docid": "435c702331fb190153602c80a503c9fa", "score": "0.57358116", "text": "protected function getNamespace($name)\n {\n return trim(implode('\\\\', array_slice(explode('\\\\', $name), 0, -1)), '\\\\');\n }", "title": "" }, { "docid": "4d4daabebd28f475e915a1f8cb50925e", "score": "0.57161075", "text": "public static function insertNamespace($namespace, $name, $position = 0)\n {\n $parts = explode('\\\\', $namespace);\n\n // Fix the WTF with negative positions with too big amplitude\n if (count($parts) + $position + 1 < 0) {\n $position = 0;\n }\n\n if ($position === 0) {\n // Position = 0\n $parts = array_merge(\n array($name),\n $parts\n );\n } elseif ($position < 0) {\n // Negative position\n $parts = array_merge(\n array_slice($parts, 0, count($parts) + $position + 1),\n array($name),\n array_slice($parts, count($parts) + $position + 1)\n );\n } else {\n // Positive position\n $parts = array_merge(\n array_slice($parts, 0, $position),\n array($name),\n array_slice($parts, $position)\n );\n }\n\n return implode('\\\\', $parts);\n }", "title": "" }, { "docid": "7b9407ba8c1652c1f8785872c75f835d", "score": "0.57052934", "text": "private function toClassName($namespace)\n {\n return str_replace('\\\\', \\DIRECTORY_SEPARATOR, $namespace);\n }", "title": "" }, { "docid": "329dd531ff628b87e247bde83fe9b061", "score": "0.569335", "text": "public static function implodeNames(string $separator): string\n {\n return implode($separator, self::names());\n }", "title": "" }, { "docid": "30219f38bf0973e9536c6514f6fb09af", "score": "0.5645496", "text": "public function getNamespacedName(Node $node)\n {\n if (null !== $this->namespace) {\n $namespacedName = clone $this->namespace;\n $namespacedName->append($node->name);\n } else {\n $namespacedName = $node->name;\n }\n\n return (string) $namespacedName;\n }", "title": "" }, { "docid": "cc956bd4f5968c98c92ff1cdb5e6a9b5", "score": "0.560838", "text": "private function prefixNameSpace($name) {\r\n\t\t$nameSpace = $this->cfg->nameSpace? $this->cfg->nameSpace.'_' : null;\r\n\t\treturn $this->cfg->prefix.$nameSpace.$name;\r\n\t}", "title": "" }, { "docid": "9983c4f15d8ff610c14cf0b066ea28b6", "score": "0.56063026", "text": "public function getNamespaceSeparator ()\n {\n return $this->_namespaceSeparator;\n }", "title": "" }, { "docid": "1a1ab8853939ce1d3f10b3496597282c", "score": "0.55737376", "text": "private function toNamespace($str) {\n $stringParts = preg_split('/_+/', $str);\n\n foreach($stringParts as $key => $stringPart){\n $stringParts[$key] = ucfirst(strtolower($stringPart));\n }\n return implode('\\\\', $stringParts) . '\\\\';\n }", "title": "" }, { "docid": "aaf61dab84b71c2599afa5ca12176f34", "score": "0.5546407", "text": "private function appendNamespace($namespace, $appendFormat = null, $id = null)\n {\n return (null !== $id && null !== $appendFormat) ? sprintf($namespace . ':' . $appendFormat, $id) : $namespace;\n }", "title": "" }, { "docid": "248563d8b012d4c556632e2c092b9cd7", "score": "0.5514472", "text": "public static function getNamespaceSeparator()\n\t\t {\n\t\t \t return self::$_namespaceSeparator;\n\t\t }", "title": "" }, { "docid": "43371603f16e275e47382c2f1abb4e04", "score": "0.5512634", "text": "public function getNamespaceSeparator()\n\t{\n\t\treturn $this->namespaceSeparator;\n\t}", "title": "" }, { "docid": "649f74aa299863e889f97ac1b4bee8e9", "score": "0.5501358", "text": "public function getFullOperationName($separator = '/');", "title": "" }, { "docid": "b65af0f45e1a176f2a8743886fc9314a", "score": "0.5497962", "text": "protected function getNamespacePlaceholder(): string\n {\n return \"{namespace}\";\n }", "title": "" }, { "docid": "423913392168ec6539a77027bdebfec0", "score": "0.5495849", "text": "public static function fullyQualify(string $name): string\n {\n return '\\\\'.ltrim($name, '\\\\');\n }", "title": "" }, { "docid": "d5eaf877e4f7fcb94162f76e5588b63d", "score": "0.54835415", "text": "protected function _formatName($unformatted, $isAction = false)\n {\n $implodedSegments = parent::_formatName($unformatted, $isAction);\n\n return str_replace('_', '\\\\', $implodedSegments);\n }", "title": "" }, { "docid": "0fb3e0259cbc4a111eb5c678f03cafbc", "score": "0.546926", "text": "public function getNameSpace($packageName)\n {\n return implode('\\\\', $this->splitPackageName($packageName));\n }", "title": "" }, { "docid": "09e1632d9d500fa1882c321fe1b8dde4", "score": "0.54486084", "text": "protected static function namespace(object|string|null $class = null): string\n {\n\n $class = static::class($class);\n\n if ( ! str_contains($class, NAMESPACE_SEPARATOR))\n {\n return '';\n }\n return substr($class, 0, strrpos($class, NAMESPACE_SEPARATOR));\n }", "title": "" }, { "docid": "f7c798148f60f6852f89469fe3ab483e", "score": "0.54441404", "text": "public static function name()\n {\n return sprintf(\n self::pickOne(array(\n '%1$s %4$s',\n '%1$s-%2$s',\n '%1$s, %2$s and %3$s'\n )),\n Name::lastName(),\n Name::lastName(),\n Name::lastName(),\n self::suffix()\n );\n }", "title": "" }, { "docid": "3ba4148f99039d89ee4cd96571d12f60", "score": "0.54327875", "text": "protected function getNamespace($name)\n {\n return $this->rootNamespace() . trim(implode('\\\\', array_slice(explode('\\\\', $name), 0, -1)), '\\\\');\n }", "title": "" }, { "docid": "5bacfc49e8f7a8ca90d1f358d7d4f8e0", "score": "0.54323804", "text": "function getNameSpace()\r\n\t\t{\r\n\t\t\t$currentClass = get_class($this);\r\n\t\t\t$refl = new \\ReflectionClass($currentClass);\r\n\t\t\t$namespace = $refl->getNamespaceName();\r\n\t\t\treturn '\\\\' .$namespace . '\\\\';\r\n\t\t}", "title": "" }, { "docid": "94c3578dfa636333748766c67c5ee599", "score": "0.54222596", "text": "public static function namespaceToUrl(string $namespace): string\n {\n $url = preg_replace('/(?<!\\/|^)([A-Z])/', '-$1', $namespace);\n $url = strtolower($url);\n\n return $url;\n }", "title": "" }, { "docid": "3d8be4d6caf511a799df07d201dd8ee4", "score": "0.5418302", "text": "protected function getNamespacePlaceholder () : string\n {\n return \"{namespace}\";\n }", "title": "" }, { "docid": "3806d94dbceb9f2372624dac4ffdd839", "score": "0.5412285", "text": "protected function formatName()\n {\n if (is_null($this->prefix)) {\n return $this->column;\n }\n\n if (is_array($this->prefix)) {\n return empty($this->prefix[1]) ? $this->column : $this->prefix[1] .'['. $this->column .']';\n }\n\n return $this->prefix .'['. $this->column .']';\n }", "title": "" }, { "docid": "40ee2a5b7ac57627a57de161f87a8e38", "score": "0.5404643", "text": "protected function getNamespace($name)\n {\n $name = str_replace('\\\\routes\\\\', '\\\\', $name);\n return trim(implode('\\\\', array_map('ucfirst', array_slice(explode('\\\\', studly_case($name)), 0, -1))), '\\\\');\n }", "title": "" }, { "docid": "1a10952ea6e0d7c1adb6cda5a43885f0", "score": "0.5404442", "text": "function prefix( $name, $prefix = '', $strip_hyphens = true ) {\n\n\t$name = (string) $name;\n\n\tif ( true === $strip_hyphens ) {\n\t\t$name = str_replace( '-', '_', $name );\n\t}\n\n\tif ( empty( $prefix ) ) {\n\t\t$prefix = '_wpmoly_';\n\t}\n\n\t$name = $prefix . $name;\n\n\treturn $name;\n}", "title": "" }, { "docid": "f0b204491e4bb870fdd301e7abec8412", "score": "0.53794867", "text": "public static function setNamespaceSeparator($sep)\n\t\t {\n\t\t \tself::$_namespaceSeparator = $sep;\n\t\t }", "title": "" }, { "docid": "2427093f4e4c16062bcf7787bf3e885a", "score": "0.5351077", "text": "protected function prependNamespace($string)\n {\n if ($this->namespace === null) {\n return $string;\n }\n\n return $this->namespace . $this->namespaceSeparator . $string;\n }", "title": "" }, { "docid": "2573cfd763084dd7c917fdc69bc04bf6", "score": "0.53453934", "text": "public function getPrettyName()\n\t{\n\t\treturn sprintf('%s::$%s', $this->declaringClassName ?: $this->declaringTraitName, $this->name);\n\t}", "title": "" }, { "docid": "1a126d871e70116c42f761b00e3df9df", "score": "0.5332607", "text": "public static function asPackage(string $namespaced): string\n {\n return ltrim(str_replace(\"\\\\\", \".\", $namespaced), '.');\n }", "title": "" }, { "docid": "7337535a47d3c7d66c41a8d1ae3f4b4b", "score": "0.5331662", "text": "public function getNamespace($withLeadingBackslash = false)\n {\n $leadingBackslash = $withLeadingBackslash ? '\\\\' : '';\n\n return $leadingBackslash . 'Concrete\\\\Package\\\\' . camelcase($this->getPackageHandle());\n }", "title": "" }, { "docid": "eb98935013768078f6ad609b57508467", "score": "0.532728", "text": "protected function getNamespace($name)\n {\n return trim(implode('\\\\', array_slice(explode('\\\\', 'App\\\\' . $name), 0, -1)), '\\\\');\n }", "title": "" }, { "docid": "a7f98c5a062329d3da919925d45344b9", "score": "0.5319756", "text": "private function getNamespacedId($id)\n {\n $namespaceVersion = $this->getNamespaceVersion();\n return sprintf('%s[%s][%s]', $this->namespace, $id, $namespaceVersion);\n }", "title": "" }, { "docid": "aef8de9ea95feea631b9880baf92d9d3", "score": "0.5318181", "text": "function nameConcat(string $a, string $b): string\n{\n if ($a === '') {\n return $b;\n }\n $a = rtrim($a, '\\\\');\n $b = ltrim($b, '\\\\');\n return \"$a\\\\$b\";\n}", "title": "" }, { "docid": "56a0a2ba698b7d8a182a4009fcb533f3", "score": "0.53162163", "text": "public function prefixName($name, $seperator= \" \") {\r\n if ($name == \"Familienmann\") {\r\n $prefix = \"Herr\";\r\n } elseif ($name == \"Familienfrau\") {\r\n $prefix = \"Frau\";\r\n } else {\r\n $prefix = \"\";\r\n }\r\n return \"{$prefix}\". ($seperator).\"{$name}\";\r\n }", "title": "" }, { "docid": "c8c094c2a5530db6f3c44523f5c9e13d", "score": "0.5314484", "text": "private function getNamespacedId($id)\n {\n $namespaceVersion = $this->getNamespaceVersion();\n\n return sprintf('%s[%s][%s]', $this->namespace, $id, $namespaceVersion);\n }", "title": "" }, { "docid": "f8beb66102c95da24e18db634d6d7672", "score": "0.5299601", "text": "protected function getNamespace()\n {\n return sprintf('%s.%s', $this->getDatabaseName(), $this->getCollectionName());\n }", "title": "" }, { "docid": "8cbd41bca2334a24fcaee69b3fb0eda0", "score": "0.5280506", "text": "public function getClassNamespace(): string\n {\n $extra = str_replace(array($this->getClass(), '/'), array('', '\\\\'), $this->argument($this->argumentName));\n $namespace = $this->getDefaultNamespace();\n\n $namespace .= '\\\\' . $extra;\n\n $namespace = str_replace('/', '\\\\', $namespace);\n\n return trim($namespace, '\\\\');\n }", "title": "" }, { "docid": "046577b9cf65128bc50c89945ba511c3", "score": "0.5278403", "text": "public function getNamespace(): string\n {\n return $this->name;\n }", "title": "" }, { "docid": "5019a6c2bdd56c0d1169361940485fbc", "score": "0.5273633", "text": "public function getNamespace(): string\n {\n return rtrim(config('stellar.modules-namespace'), '/\\\\');\n }", "title": "" }, { "docid": "56b291e3e235e11d2b0f3455b7c796fb", "score": "0.52716994", "text": "function _formatPathName($path) {\n if (preg_match(\"/(\\A\\d{2}+-)/\", $path)) {\n $path = substr($path, 3);\n }\n\n return str_replace(\"_\", \" \", $path);\n }", "title": "" }, { "docid": "4c9d5d30911508534929bc153448cc90", "score": "0.52546066", "text": "public static function properName($value)\n\t{\n\t\t$ret_val = explode('_', $value);\n\t\treturn implode(' ', $ret_val);\n\t}", "title": "" }, { "docid": "36e971808d8c0cc234eceee839aa8576", "score": "0.52507174", "text": "public function getInterfaceNamespace(): string\n {\n $extra = str_replace(array($this->getClass() . 'Interface', '/'), array('', '\\\\'), $this->argument($this->argumentName) . 'Interface');\n $namespace = $this->getDefaultInterfaceNamespace();\n\n $namespace .= '\\\\' . $extra;\n\n $namespace = str_replace('/', '\\\\', $namespace);\n\n return trim($namespace, '\\\\');\n }", "title": "" }, { "docid": "c419166e233c7ca323d7fdeb4302b424", "score": "0.5248383", "text": "private function slashNamespace(string &$namespace)\n {\n // Check for end \\\\.\n if (substr($namespace, -1, 1) !== '\\\\') {\n $namespace .= '\\\\';\n }\n }", "title": "" }, { "docid": "733c0c28972467dd10641e126e71a3c8", "score": "0.5247927", "text": "protected function get_namespace() {\r\n\t\treturn $this->namespace . '/v' . $this->version;\r\n\t}", "title": "" }, { "docid": "67d053b4cc816f95a909252133b3c4cd", "score": "0.52319914", "text": "public function setNamespaceSeparator ($sep)\n {\n $this->_namespaceSeparator = $sep;\n }", "title": "" }, { "docid": "f5c5b0f8fb7afc403ddc372dfc9bd13c", "score": "0.5231723", "text": "public function ns($ns)\n {\n // Alias the packages registry to a local var\n $map =& $this->compiler->packages;\n\n // Remove leading dot (used in references)\n $package = ltrim($ns, '.');\n\n if (empty($package)) {\n return '';\n }\n\n if (isset($map[$package])) {\n return $map[$package];\n }\n\n // Check the currently registered packages to find a root one\n $found = null;\n foreach ($map as $pkg=>$ns) {\n // Keep only the longest match\n if (0 === strpos($package, $pkg.'.') && strlen($found) < strlen($pkg)) {\n $found = $pkg;\n }\n }\n\n // If no matching package was found issue a warning and use the package name\n if (!$found) {\n $this->compiler->warning('Non tracked package name found \"' . $package . '\" ');\n $namespace = str_replace('.', $this->nsSep, $package);\n } else {\n // Complete the namespace with the remaining package\n $namespace = $map[$found];\n $namespace .= substr($package, strlen($found));\n $namespace = str_replace('.', $this->nsSep, $namespace);\n\n // Set the newly found namespace in the registry\n $map[$package] = $namespace;\n }\n\n return $namespace;\n }", "title": "" }, { "docid": "faa2998493bcf5e2d429e3ec0edd61cb", "score": "0.52310526", "text": "private function transformNamespace(array $parts)\n {\n // Build the exploded namespace into a string with a slash at the end\n $string = sprintf('%s\\\\', trim(implode('\\\\', $parts), '\\\\'));\n\n // Prepend the prefix\n if ($this->checker->shouldTransform($string)) {\n array_unshift($parts, $this->prefix);\n $this->transformed = true;\n }\n\n return $parts;\n }", "title": "" }, { "docid": "023ec0ce6afd5b4abdd56d19e97b12b7", "score": "0.5216702", "text": "public function setNamespaceSeparator($separator)\n\t{\n\t\t$this->namespaceSeparator = (string)$separator;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "7056e53ff46bb29472a7d4b04dd316e4", "score": "0.5206364", "text": "protected function parseName( array $args )\n\t{\n\t\t$name = $args['name'];\n\t\t$prefix = $this->parsePrefix( $args );\n\n\t\tif( $prefix === false ) {\n\t\t\treturn $name;\n\t\t}\n\n\t\t$paths = explode( '.', $name );\n\n\t\treturn array_reduce( $paths, function( $result, $value ) {\n\t\t\treturn $result .= \"[$value]\";\n\t\t}, $prefix );\n\t}", "title": "" }, { "docid": "dac681f977b9cd2c25763130904057c8", "score": "0.52013177", "text": "protected function getPrefix(Arguments $args): string\n {\n $prefix = $args->getOption('prefix');\n if (!$prefix) {\n return '';\n }\n $parts = explode('/', $prefix);\n\n return implode('/', array_map([$this, '_camelize'], $parts));\n }", "title": "" }, { "docid": "7423c61378cc8c44c3f9687b688c8390", "score": "0.51935285", "text": "public function getFullyQualifiedName()\n {\n $name = $this->getName();\n\n if (null !== ($belongsTo = $this->getBelongsTo())) {\n $name = $belongsTo . '[' . $name . ']';\n }\n\n return $name;\n }", "title": "" }, { "docid": "be45edcd6945da4cc3c43ef0e315a842", "score": "0.5187953", "text": "public function namespace($class = null): string\n {\n return $this->namespace . ($class ? '\\\\' . $class : $class);\n }", "title": "" }, { "docid": "aef53cc6639eaf900ffd8ba30702021b", "score": "0.5169245", "text": "public function namespace($namespace)\n {\n if($namespace[strlen($namespace) - 1] !== \"\\\\\"){\n $namespace .= \"\\\\\";\n }\n $this->namespace .= $namespace;\n return $this;\n }", "title": "" }, { "docid": "3dc2d096aa7286fa46124c60aca20529", "score": "0.5164031", "text": "function lookupPrefix($namespaceName);", "title": "" }, { "docid": "e031dd54919e1cf38a03251148836734", "score": "0.5162332", "text": "public function getModuleNamespace(string $module, bool $includeBackslash = true): string;", "title": "" }, { "docid": "85ee52fd316e470a453b084741034382", "score": "0.51527876", "text": "protected function getConfigNamespace()\n {\n $directory = config('repository.directory', 'Repositories');\n $namespace = str_replace('{directory}', $directory, config('repository.namespace', '{directory}\\\\{name}'));\n return str_replace('{name}', $this->getNameInput(), $namespace);\n }", "title": "" }, { "docid": "d13591724838050d3af3960d7f387443", "score": "0.51400423", "text": "protected function referenceName()\n {\n $table = $this->_table;\n $name = namespaceSplit(get_class($table));\n $name = substr(end($name), 0, -5);\n if (empty($name)) {\n $name = $table->getTable() ?: $table->getAlias();\n $name = Inflector::camelize($name);\n }\n\n return $name;\n }", "title": "" }, { "docid": "b4d53dca7f7bc3325978db1aa76934ca", "score": "0.5139562", "text": "protected function getNamespace(){\n $namespace = 'App\\Controllers\\\\';\n\n if (array_key_exists('namespace', $this->params)) {\n $namespace .= $this->params['namespace'] . '\\\\';\n }\n return $namespace;\n }", "title": "" }, { "docid": "d839a72986e588c039c42290d17a23ad", "score": "0.51313275", "text": "protected function getRequestNamespacePath(ActionRequest $request): string\n {\n $namespaceParts = [];\n while ($request !== null && $request->isMainRequest() === false) {\n $namespaceParts[] = $request->getArgumentNamespace();\n $request = $request->getParentRequest();\n }\n\n return implode('.', array_reverse($namespaceParts));\n }", "title": "" }, { "docid": "3d954dfdf34ef2de6df2fe3fb6deff33", "score": "0.51306844", "text": "protected function resolveNamespace(array $properties): string\n {\n return isset($properties['namespace'])\n ? $properties['namespace']\n : studly_case($properties['slug']);\n }", "title": "" }, { "docid": "8b544bd9c265825644fb5629da8e83ce", "score": "0.51220953", "text": "public function getLocalName();", "title": "" }, { "docid": "a0f95712892fad6297643e165cb1b3b6", "score": "0.5105901", "text": "public static function getNamespace(FileDescriptorProto $fileDesc): string\n {\n if ($fileDesc->hasOptions()) {\n $opts = $fileDesc->getOptions();\n if ($opts->hasPhpNamespace()) {\n return $opts->getPhpNamespace();\n }\n }\n // Fallback to munging the proto package.\n // DO NOT CHANGE THIS LOGIC.\n // Used by devrel_library_tracker/langs/utils.py (as of 2021/06/22).\n return Vector::new(explode('.', $fileDesc->getPackage()))\n ->map(fn ($x) => strtoupper($x[0]) . substr($x, 1))\n ->join('\\\\');\n }", "title": "" }, { "docid": "1bb66e5d735f56798d612c9ce7315fe0", "score": "0.51024467", "text": "public static function getPrefix() {\n return '$2a$';\n }", "title": "" }, { "docid": "8e9584e56e8404702eaf7234027f7abd", "score": "0.510107", "text": "public function toString() : string\n {\n $parts = [];\n foreach ($this->toCombinedStubs() as $namespace => $stubs) {\n $concatenated_stubs_representation = implode('', $stubs);\n $namespace_repr = ($namespace === '' ? '' : \"$namespace \");\n $parts[] = sprintf(\"namespace %s{\\n%s}\\n\", $namespace_repr, $concatenated_stubs_representation);\n }\n return implode(\"\\n\", $parts);\n }", "title": "" }, { "docid": "dea26d503484fc73d604bff9b160c2c2", "score": "0.51002043", "text": "protected function getNewNamespace(): string\n {\n return $this->nameSpacesMapping[$this->found] ?? '';\n }", "title": "" }, { "docid": "a81124ee65947ff16f62919845a871f3", "score": "0.5096009", "text": "public static function urlToNamespace(string $url): string\n {\n return implode('', array_map('ucfirst', explode('-', $url)));\n }", "title": "" }, { "docid": "adcfe39c0c6af089273bdad1a5065c0d", "score": "0.509331", "text": "protected function getQualifiedName(InputInterface $input): string\n {\n return str_replace('\\\\', '/', ltrim(trim($input->getArgument('name')), '\\\\/'));\n }", "title": "" }, { "docid": "c27c13cd2f1410e75eb217afaf28623a", "score": "0.5092871", "text": "protected function generateNamespace($name)\n {\n $configKey = Str::contains($name, 'Interface') ? 'repo_interface' : 'repo';\n\n return sprintf(\n \"%s%s\",\n $this->rootNamespace(),\n str_replace('/', '\\\\', Str::after(config(\"repos.paths.{$configKey}\"), 'app/'))\n );\n }", "title": "" }, { "docid": "722c39a202ce68ce44b51d46abbb52e9", "score": "0.5085741", "text": "public function getNamespace($pagename=null)\n\t{\n\t\tif (is_null($pagename))\n\t\t{\n\t\t\t$pagename = $this->get('pagename');\n\t\t}\n\t\tif (strstr($pagename, ':'))\n\t\t{\n\t\t\treturn strtolower(strstr($pagename, ':', true));\n\t\t}\n\t\treturn '';\n\t}", "title": "" }, { "docid": "a70ecae32f07040a9b279256b3611c99", "score": "0.5073873", "text": "public function setNamespaceSeparator($sep)\n {\n $this->nsSep = $sep;\n }", "title": "" }, { "docid": "248495efbb3bbaee21eb123c05f855f7", "score": "0.50584567", "text": "public function generateNamespace($input=null, $uniqueness = false){\n// uniqueness est la clé qui intègre des trucs au namespace :). Pour s'assurer de son unicité (à l'inscription par exemple)\n if(empty($input)){\n $input = $this->getName();\n }\n// Generates the final namespace from the namespace typed on the form.\n $string = \\transliterator_transliterate('Any-Latin; Latin-ASCII; [\\u0080-\\u7fff] remove', $input);\n $tmp = preg_replace('/-{2,}/', '-',\n preg_replace('/\\s+/i', '-',\n preg_replace('/[^0-9a-z-\\s]/i', '-',\n strtolower(\n trim($string)\n )\n )\n )\n );\n\n $last_index = strlen($tmp)-1;\n if($last_index > 0){\n if(in_array($tmp[$last_index], ['.', '-']) ){\n $tmp = substr($tmp, 0, $last_index-1);\n }\n }\n\n\n if($uniqueness){\n $tmp = time().'-'.$tmp;\n }\n $this->setNamespace($tmp);\n return $tmp;\n }", "title": "" }, { "docid": "7d2c639cae9247645447396078ebf9e7", "score": "0.5049509", "text": "function _EscapeName ( $name )\n\t{\n\t\tif( $name[0] == '_' )\t\t\t\t\t\t\t\treturn '`' . _T($name) . '`' ;\n\t\telse\t\t\t\t\t\t\t\t\t\t\t\treturn '`' . $name . '`' ;\n\t}", "title": "" }, { "docid": "babaa38272678e0f482f5dad4d361bba", "score": "0.50487685", "text": "protected function pickupClassName(string $ns_classname): string\n {\n return substr(strrchr($ns_classname, '\\\\'), 1);\n }", "title": "" }, { "docid": "233564df1647b1795c1813c60f282423", "score": "0.5037082", "text": "function normalName($name){\n\t\t$new= \"\";\n\t\t$new.= strtoupper(substr($name, 0, 1));\n\t\n\t\t$find= array(\"_\", \"-\", \"+\");\n\t\t$name= str_replace($find, \" \", substr($name, 1));\n\t\t\n\t\treturn $new.$name;\n\t}", "title": "" }, { "docid": "4ecd2e3bf636a3f64d28c993aaec50f9", "score": "0.50339246", "text": "public function getQuotedName($name)\n {\n $name = explode('.', $name);\n $name = array_map(\n function ($data) {\n return '\"' . $data . '\"';\n },\n $name\n );\n\n return implode('.', $name);\n }", "title": "" }, { "docid": "078430bed23a0895ddb7bb92be71bf85", "score": "0.50249255", "text": "private function getDefaultNamespace()\n {\n return 'EventEspresso\\\\'\n . str_replace(\n ' ',\n '',\n ucwords($this->addon_string->package())\n );\n }", "title": "" }, { "docid": "5ae334fc311726733b249fd8fbd8a4d4", "score": "0.5020768", "text": "protected function getGroupNamespace($namespace)\n {\n return empty($namespace) ? '' : sprintf(\"'namespace' => '%s',\", $namespace);\n }", "title": "" }, { "docid": "04b6ea6957052d5bab9cca499c403ec1", "score": "0.50155944", "text": "private function getFullNameSpace(string $baseNamespace, string $fullClassName) : string\n {\n $baseNamespace = $this->normalizeSlash($baseNamespace);\n $className = $this->normalizeSlash($fullClassName);\n $classParts = explode('\\\\', $className);\n $classNamespace = implode('\\\\', array_splice($classParts, 0, count($classParts) - 1));\n if (!empty($classNamespace)) {\n return \"$baseNamespace\\\\$classNamespace\";\n }\n return $baseNamespace; \n }", "title": "" }, { "docid": "ffc907a6b6e59ca9d5b09362781184f8", "score": "0.50142276", "text": "public function getNamespace()\n {\n $namespace = array();\n $parent = $this->parent;\n do {\n if ($parent instanceof SassPropertyNode) {\n $namespace[] = $parent->name;\n }\n $parent = $parent->parent;\n } while (is_object($parent));\n\n return join('-', array_reverse($namespace));\n }", "title": "" }, { "docid": "df79f07f53b5cd67c2d875cf569f9204", "score": "0.5009314", "text": "function prettyName($name){\n $origName = $name;\n $name = basename($name);\n $name = preg_split('/([^\\w-]|[_])/u',$name);\n $name = array_map('ucfirst',$name);\n $name = implode(' ',array_filter($name));\n if($name === ''){\n return $origName;\n }\n return $name;\n}", "title": "" }, { "docid": "46fe1134835a706bfec95b3cc1456689", "score": "0.49908477", "text": "abstract protected function prefixName($name);", "title": "" }, { "docid": "8c16b45b5de8c50f99b9077d033cf13f", "score": "0.49896297", "text": "private function getNamespacePath($namespace)\n {\n return str_replace('/', DIRECTORY_SEPARATOR, Yii::getAlias('@' . str_replace('\\\\', '/', $namespace)));\n }", "title": "" }, { "docid": "9bb445bebd776b24834ac1e60892c852", "score": "0.49873748", "text": "public function getNamespace()\n {\n $namespace = 'flash_notification';\n if ($this->namespace != '') {\n $namespace .= '.namespace.' .$this->namespace;\n }\n return $namespace;\n }", "title": "" }, { "docid": "254d61873c5a10e6188859453c1f2ac2", "score": "0.49828088", "text": "public function testNamespaceSpacing(): void\n {\n //\n // There MAY NOT be a space around a namespace separator.\n }", "title": "" }, { "docid": "e0d3d38ecafe95031ed501d87e8312a5", "score": "0.4980628", "text": "public function elementNS($name, $namespace = null);", "title": "" }, { "docid": "8c7014af3129465c17b81f39efaedc3d", "score": "0.49786127", "text": "public function getXmlName()\n\t{\n\t\tif(is_null($this->_namespace))\n\t\t{\n\t\t\treturn $this->_name;\n\t\t}\n\t\treturn $this->_namespace.':'.$this->_name;\n\t}", "title": "" } ]
474fa9612537ec5e67ee0d2fac16de6e
Get the enumeration for projections.
[ { "docid": "4328f500aac29845a8d24eb2be3e6c79", "score": "0.6066278", "text": "public function mc_enum_projections($username, $password)\n {\n return $this->__soapCall(\n 'mc_enum_projections',\n array($username, $password)\n );\n }", "title": "" } ]
[ { "docid": "585aea24e05ee3356686fd2f10e8a8c6", "score": "0.64758587", "text": "public function getProjectionList(){\n return $this->_get(3);\n }", "title": "" }, { "docid": "3ab5bbcc52ab6ff7779408f689ec62b0", "score": "0.6415666", "text": "public function projectionName(): string;", "title": "" }, { "docid": "d90889e296cb71adac09e40d8a09b790", "score": "0.54772246", "text": "public function getEnumeration()\n\t{\n\t\treturn $this->enumeration;\n\t}", "title": "" }, { "docid": "4ec423443041b34788f44b9c8330a797", "score": "0.5327057", "text": "public function loadStatus(): ProjectionStatus;", "title": "" }, { "docid": "a526fddbd3e8cc1b0cbbba1deadebc43", "score": "0.527961", "text": "public function getEnumValues()\n {\n return array(\n 'UnknownDocumentAccessLevel' => self::UnknownDocumentAccessLevel,\n 'DepartmentOnly' => self::DepartmentOnly,\n 'DepartmentAndSubdepartments' => self::DepartmentAndSubdepartments,\n 'AllDocuments' => self::AllDocuments,\n 'SelectedDepartments' => self::SelectedDepartments,\n );\n }", "title": "" }, { "docid": "2a5f512acc28dac0d0750c9af9ad9616", "score": "0.5278069", "text": "public function getCrs()\n {\n return $this->crs;\n }", "title": "" }, { "docid": "a6b73480a96bfcfdad08fe56802b7542", "score": "0.52302957", "text": "public function getEnumeration(): string\n {\n return $this->enumeration;\n }", "title": "" }, { "docid": "091b7dda93d13ed14125fe94ef9a1bd4", "score": "0.5142377", "text": "public function getDefaultProjection()\n {\n return ['*'];\n }", "title": "" }, { "docid": "174bbdb911731ab727e0b39313feab2f", "score": "0.5107424", "text": "public function getEnumValues()\n {\n return array(\n 'open' => self::open,\n 'add' => self::add,\n 'remove' => self::remove,\n 'close' => self::close,\n 'opened' => self::opened,\n 'closed' => self::closed,\n 'query' => self::query,\n 'query_result' => self::query_result,\n 'conflict' => self::conflict,\n 'added' => self::added,\n 'removed' => self::removed,\n 'start' => self::start,\n 'started' => self::started,\n 'joined' => self::joined,\n 'members_joined' => self::members_joined,\n 'left' => self::left,\n 'members_left' => self::members_left,\n 'results' => self::results,\n 'count' => self::count,\n 'result' => self::result,\n 'update' => self::update,\n 'updated' => self::updated,\n 'mute' => self::mute,\n 'unmute' => self::unmute,\n 'status' => self::status,\n 'members' => self::members,\n 'join' => self::join,\n 'invite' => self::invite,\n 'leave' => self::leave,\n 'kick' => self::kick,\n 'reject' => self::reject,\n 'invited' => self::invited,\n 'kicked' => self::kicked,\n 'upload' => self::upload,\n 'uploaded' => self::uploaded,\n );\n }", "title": "" }, { "docid": "592615fdb21c51d9ae6fb8cc3aa6d2bd", "score": "0.5093141", "text": "function _get_projects() {\r\n\t\tstatic $projects = null;\r\n\t\tif(is_null($projects)) {\r\n\t\t\t$projects = $this->pdb()->assoc(\"SELECT pp.nid, pp.uri FROM project_projects pp, term_node tn, term_data td where tn.nid = pp.nid and tn.tid = td.tid and td.vid = 4 and td.name = 'Open';\");\r\n\t\t}\r\n\t\treturn $projects;\r\n\t}", "title": "" }, { "docid": "73f36115d50e1e4c61537b3895816532", "score": "0.5084718", "text": "public function getDefaultProjection()\n {\n return ['p.*'];\n }", "title": "" }, { "docid": "b62faa6b275a4b2641250e78bb7a0307", "score": "0.502908", "text": "public function getProjectsRegions(){\n\t\t$connection=Database::getConnection();\n\t\t$items=\"\";\n\t\t$query = \"SELECT project_country.project_idproject, country.region FROM project_country INNER JOIN country on project_country.country_idcountry = country.idcountry\";\n\t\t$result_obj=$connection->query($query);\n\t\ttry{\n\t\t\twhile($result = $result_obj->fetch_array(MYSQLI_ASSOC)){\n\t\t\t\t$items[]=$result;\n\t\t\t}\n\t\t\treturn($items);\n\t\t}\n\t\tcatch(Exception $e){\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "d3aebc0730f8a763a1e0e8636bdd4e49", "score": "0.5018902", "text": "public function getProjects() : array\r\n {\r\n return $this->mapProjects($this->executeQuery(\"SELECT * FROM projects\"));\r\n }", "title": "" }, { "docid": "67178be454be522e19559aa36d3736b6", "score": "0.5016867", "text": "public function hasProjection(){\n return $this->_has(3);\n }", "title": "" }, { "docid": "2bf053114da999845571f9fd9577f87c", "score": "0.4984694", "text": "public function getEnumValues()\n {\n return array(\n 'WGS84' => self::WGS84,\n 'GCJ02' => self::GCJ02,\n 'BD09' => self::BD09,\n );\n }", "title": "" }, { "docid": "3294759c6190818300ba9ad0ee1f7698", "score": "0.49788138", "text": "public function getOngoingProject(): array {\n return $this->createQueryBuilder('proj')\n ->where('proj.status = :status')\n ->setParameter('status' , Article::STATUS_ONGOING)\n ->getQuery()\n ->getArrayResult();\n }", "title": "" }, { "docid": "8fa195819eb1d48ba8e8aae4987a36b8", "score": "0.4902171", "text": "public static function getEnumFields()\n\t{\n\t\treturn self::$enumFields;\n\t}", "title": "" }, { "docid": "d879ed15641b301ef615198c61ca069e", "score": "0.48919636", "text": "private static function search_columns_enum() {\n\n\t\tif ( null === self::$search_columns_enum ) {\n\n\t\t\tself::$search_columns_enum = new EnumType([\n\t\t\t\t'name' => 'searchColumnsEnum',\n\t\t\t\t'values' => [\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'ID',\n\t\t\t\t\t\t'value' => 'ID',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'LOGIN',\n\t\t\t\t\t\t'value' => 'login',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'NICENAME',\n\t\t\t\t\t\t'value' => 'nicename',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'EMAIL',\n\t\t\t\t\t\t'value' => 'email',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'URL',\n\t\t\t\t\t\t'value' => 'url',\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t]);\n\n\t\t}\n\n\t\treturn self::$search_columns_enum;\n\n\t}", "title": "" }, { "docid": "42ffb68c0d68fc975f9e1589d7924f97", "score": "0.48761794", "text": "public function isProjectionExists(): bool;", "title": "" }, { "docid": "8635b5d5836831e454a464a57b43db89", "score": "0.4817033", "text": "public function getAllProjects() {\n\t\t$projects = array();\n\t\tforeach ($this->getMinistryObjectives() as $ministryObjective) {\n\t\t\t$projects = array_merge($projects, $ministryObjective->getAllProjects()->getArrayCopy());\n\t\t}\n\t\treturn new PropelObjectCollection($projects);\n\t}", "title": "" }, { "docid": "8abc196d9a3c0b751f4551a278032cb7", "score": "0.48137757", "text": "public function getProjects() {\n\t\treturn $this->callMantis('mc_projects_get_user_accessible');\n\t}", "title": "" }, { "docid": "8e9c45f522c1a47c6ef68e054ae434c5", "score": "0.47980472", "text": "public function getProjects(): array;", "title": "" }, { "docid": "e63f86c7c86efee55fd62584a95b3d55", "score": "0.47953215", "text": "abstract protected function generateEnumeration();", "title": "" }, { "docid": "57d399f6199ec3be07e55134bc8e0c5c", "score": "0.47897416", "text": "public function getInterventions()\n {\n return self::getCollection('/interventions');\n }", "title": "" }, { "docid": "cac7eb447581b569c771415ea0837051", "score": "0.47817984", "text": "function getEnumValues() {\n return ($this->enum_values) ? $this->enum_values : false;\n }", "title": "" }, { "docid": "60ca63dff066b6eae46f9f4ea0d33cbc", "score": "0.47642577", "text": "public function getProjects() {\n $projects = $this->apiGet($this->endpoints[\"projects\"]);\n return $projects;\n }", "title": "" }, { "docid": "b96cca99631889d9694150e7e7082368", "score": "0.47491026", "text": "public function projection(array $projection = [])\n {\n $op = $this->containsSQLParts('projection') ? ', ' : '';\n return $this->unsafeAppendSQLPart('projection', $op . $this->asProjectionList($projection));\n }", "title": "" }, { "docid": "fd98f01d9a58dced517e40509ddcaa79", "score": "0.47413525", "text": "public function getEnumvalue() {}", "title": "" }, { "docid": "1d80b43d53674a2fc443073fb6a535d2", "score": "0.47396645", "text": "public function getEnumValues()\n {\n return array(\n 'session' => self::session,\n 'conv' => self::conv,\n 'direct' => self::direct,\n 'ack' => self::ack,\n 'rcp' => self::rcp,\n 'unread' => self::unread,\n 'logs' => self::logs,\n 'error' => self::error,\n 'login' => self::login,\n 'data' => self::data,\n 'room' => self::room,\n 'read' => self::read,\n 'presence' => self::presence,\n 'report' => self::report,\n 'echo_a' => self::echo_a,\n );\n }", "title": "" }, { "docid": "217029b8737adc0414047c67b4573b4c", "score": "0.4719396", "text": "public function getRegions()\n\t{\n\t\treturn new \\ArrayIterator($this->_regions);\n\t}", "title": "" }, { "docid": "e10ca5d97fe5ff2251b6eab195e1abdc", "score": "0.46843326", "text": "public function ListProjects()\n {\n return $this->callMethod(__FUNCTION__);\n }", "title": "" }, { "docid": "99a1f55dacda58678b1fe8da298db749", "score": "0.4684232", "text": "public function proj()\n {\n return $this->belongsTo('App\\Models\\Projection','proj_id');\n }", "title": "" }, { "docid": "7b35849433a30e78b507f839360c0a4a", "score": "0.46659702", "text": "public function index()\n\t{\n\t\t$projections = Projection::all();\n\t\treturn View::make('projections.index', compact('projections'));\n\t}", "title": "" }, { "docid": "0ce80fb2e711c0f200535418a818f2bc", "score": "0.46527812", "text": "public function getAllOrganizer()\n\t{\n\n\t\t$Result = new Result();\n\t\t$Result = $this->_CCAORGDAO->getAllOrganizer();\n\n\t\tif(!$Result->getIsSuccess())\n\t\t\t$Result->setResultObject(\"Database failure in CCAMENUDAO.getAllOrganizer()\");\n\n\t\treturn $Result;\n\t}", "title": "" }, { "docid": "f3b1bc83069bebb201cd1a887da8588f", "score": "0.4647737", "text": "public function getEnum(): EnumElement\n {\n return $this->enum;\n }", "title": "" }, { "docid": "28fc24624cc506415e37575ad1f07982", "score": "0.463081", "text": "protected function getProjectionNodes()\n {\n $expandedProjectionNode = $this->getCurrentExpandedProjectionNode();\n if (is_null($expandedProjectionNode)\n || $expandedProjectionNode->canSelectAllProperties()\n ) {\n return null;\n }\n\n return $expandedProjectionNode->getChildNodes();\n }", "title": "" }, { "docid": "7ac484ed2bc8bca785eb2fbf25b3468b", "score": "0.46298227", "text": "abstract public function getProjects();", "title": "" }, { "docid": "cb5191a39bfa5274b367da04b2140532", "score": "0.46274236", "text": "public function dropdown_project()\n {\n $sql = \"SELECT DISTINCT P_Name_ind {$this->sql_from()} {$this->sql_where()} ORDER BY P_Name_ind ASC\";\n $rows = \\NMI::db()->query($sql)->fetchAll();\n return \\Arr::assoc_to_keyval($rows, 'P_Name_ind', 'P_Name_ind');\n }", "title": "" }, { "docid": "d71e5d37bc819c69149e4afc94e7920e", "score": "0.46228486", "text": "public function getAllProject()\n {\n return $this->client->request('GET','/rest/api/2/project');\n }", "title": "" }, { "docid": "f028352b93ff7ab6b2e4acaa507f7038", "score": "0.4622414", "text": "public function getCollection()\n {\n return $this->baseCursor->getCollection();\n }", "title": "" }, { "docid": "b42f391fb96bcd41c86a52bbeb7b5cb6", "score": "0.46119118", "text": "public function getProjects() {\n\t\t$rows = self::$factory->getProjectId();\n\t\t\n\t\t$response = array();\n\t\tforeach ($rows as $project) {\n\t\t\t$p = new Project($project['id'], $this->bdd);\n\t\t\t$p->setDetails();\n\t\t\t$response[$project['id']] = $p->getDetails();\n\t\t}\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "55a6abfc8dc21c356e7b0bb8b555dcd1", "score": "0.46086302", "text": "public function projects()\n {\n return $this->unorderedProjects()->orderBy('open_date')->get();\n }", "title": "" }, { "docid": "271c046dc409891d85bee6d060e297ef", "score": "0.45945403", "text": "public function getProvider()\n {\n $arrLocations = array();\n $objLocations = ContaoEstateManager\\ProviderModel::findAll();\n\n while ($objLocations->next())\n {\n $arrLocations[ $objLocations->id ] = $objLocations->postleitzahl . ' ' . $objLocations->ort . ' (' . $objLocations->firma . ')';\n }\n\n return $arrLocations;\n }", "title": "" }, { "docid": "119506078452e757996f36484df2b08b", "score": "0.45933262", "text": "public function getEnumConstants()\n {\n if ( !self::$constants )\n {\n // array of enums constants\n self::$constants = array(\n new PropertyType (self::MEMBER),\n new PropertyType (self::CELL),\n new PropertyType (self::SYSTEM),\n new PropertyType (self::BLOB)\n );\n }\n\n return self::$constants;\n }", "title": "" }, { "docid": "6d7243d6e06d174d0ee8c69847631a35", "score": "0.4588904", "text": "public function getProjectsForDropdown() {\n $projects = Project::forCompany()->get();\n return $projects;\n }", "title": "" }, { "docid": "f13aaccb5c00dba3406720a97c6e858a", "score": "0.45880914", "text": "public function getEnumType() {}", "title": "" }, { "docid": "f13aaccb5c00dba3406720a97c6e858a", "score": "0.45880914", "text": "public function getEnumType() {}", "title": "" }, { "docid": "67bdc91899f0b6bba8133def3f1e479c", "score": "0.45728514", "text": "function enum_list() {\r\n /* by default, if available, expects enum_keyval to be filled with array('field1','field2') */\r\n if ($this->enum_keyval) {\r\n $enumlist = array();\r\n foreach ($this->get_rows('', $this->enum_keyval[0].','.$this->enum_keyval[1],'row') as $row) $enumlist[$row[0]] = $row[1];\r\n return $enumlist;\r\n }\r\n }", "title": "" }, { "docid": "f851c773be40d33c153f0d22e1413467", "score": "0.45636454", "text": "public function getProjectType();", "title": "" }, { "docid": "7181878aeeb14b69c6642ec8b616fc8b", "score": "0.45611674", "text": "private static function roles_enum() {\n\n\t\tif ( null === self::$roles_enum ) {\n\n\t\t\tglobal $wp_roles;\n\t\t\t$all_roles = $wp_roles->roles;\n\t\t\t$editable_roles = apply_filters( 'editable_roles', $all_roles );\n\t\t\t$roles = [];\n\n\t\t\tif ( ! empty( $editable_roles ) && is_array( $editable_roles ) ) {\n\t\t\t\tforeach ( $editable_roles as $key => $role ) {\n\t\t\t\t\t$roles[] = [\n\t\t\t\t\t\t'name' => ! empty( $role['name'] ) ? self::format_enum_name( $role['name'] ) : $key,\n\t\t\t\t\t\t'value' => $key,\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( ! empty( $roles ) ) {\n\t\t\t\tself::$roles_enum = new EnumType( [\n\t\t\t\t\t'name' => 'userRoleEnum',\n\t\t\t\t\t'values' => $roles,\n\t\t\t\t] );\n\t\t\t}\n\t\t}\n\n\t\treturn self::$roles_enum;\n\n\t}", "title": "" }, { "docid": "78afbc7d8513b2c62bf87e6f5832743d", "score": "0.45554104", "text": "public function findProvider()\n {\n return [\n [[], false],\n [['foo' => 'bar'], false],\n [['projection' => []], false],\n [['projection' => ['field' => 1]], true]\n ];\n }", "title": "" }, { "docid": "49b03bbc17022b514b5acdf8cd774dde", "score": "0.45382947", "text": "private static function getProjectList() {\n\t\tstatic $cache;\n\t\tif (!$cache) {\n\t\t\t$cache = Project::getProjects();\n\t\t\t$cache = $cache->sort(array(new SortRule($cache->exprMember('name'))));\n\t\t}\n\t\treturn $cache;\n\t}", "title": "" }, { "docid": "fdae128a2ee1ba054f2eb06ef5b20309", "score": "0.4534072", "text": "public function getEnumValues()\n {\n return array(\n 'NO_INTERACTION' => self::NO_INTERACTION,\n 'SURFING' => self::SURFING,\n 'DOWNLOAD' => self::DOWNLOAD,\n );\n }", "title": "" }, { "docid": "bfbfe69f90b7b62f3a8f9c748f7c8929", "score": "0.45174527", "text": "public function getProject_types_list() {\n $list = array();\n foreach ($this->project_types as $key => $value) {\n $list[$key] = $value['name'];\n }\n return $list;\n }", "title": "" }, { "docid": "a0dd9e300dcb75ce8969d2a08d3b1a67", "score": "0.4517258", "text": "public function getEnumField() {\n if($this->get('Map')) {\n return 'Enum(\"'.implode(',',$this->get('Map')->toArray()).'\")'; \n }\n return 'Enum(\"\")';\n }", "title": "" }, { "docid": "22401274fa2e34dc3ca02a1651ab78eb", "score": "0.45070952", "text": "public static function getOrganizations() {\n }", "title": "" }, { "docid": "fe6f986ac8abb86206555856b7288456", "score": "0.45020586", "text": "public function index()\n {\n try {\n return view('admin.admin.projection.index')->render();\n\n } catch (\\Throwable $e) {\n\n return response()->json([\n 'message' => [\n 'type' => 'error',\n 'text' => $e->getMessage()\n ]\n ]);\n }\n }", "title": "" }, { "docid": "f40adca78614cf3b2c269c7ac702b61d", "score": "0.4501589", "text": "public function getEnumerator() {\n return new Enumerator($this->collection);\n }", "title": "" }, { "docid": "54a5b8088aea146c027958baf110b8a5", "score": "0.44974747", "text": "public function getOrigem() { \n return $this->iOrigemFase;\n }", "title": "" }, { "docid": "e948578475a4fca2eb9024e944958bb8", "score": "0.44927254", "text": "public function getEnumTypes(){\n\n $array = self::getMetadataArray();\n $types = $array['Schema'][0]['EnumType']; // MAGIC\n\n return $types;\n }", "title": "" }, { "docid": "43323be363e2c991f0f9a02c8627cf40", "score": "0.44872996", "text": "public function getEnumValues()\n {\n return array(\n 'PHONE' => self::PHONE,\n 'TABLET' => self::TABLET,\n );\n }", "title": "" }, { "docid": "2c40aae35cb236cdccc5679a76f09313", "score": "0.44872582", "text": "public static function i() {\n\t\treturn self::_getMultiple(__CLASS__);\n\t}", "title": "" }, { "docid": "2c40aae35cb236cdccc5679a76f09313", "score": "0.44872582", "text": "public static function i() {\n\t\treturn self::_getMultiple(__CLASS__);\n\t}", "title": "" }, { "docid": "2c40aae35cb236cdccc5679a76f09313", "score": "0.44872582", "text": "public static function i() {\n\t\treturn self::_getMultiple(__CLASS__);\n\t}", "title": "" }, { "docid": "bbe20101e4408d921ca0a23b11933e13", "score": "0.447596", "text": "public function getI()\n {\n return $this->get(self::I);\n }", "title": "" }, { "docid": "5e7ccfc4d4e6933d9a49657fa9c28ca5", "score": "0.4473949", "text": "public function getInvolvedProjects()\n {\n return array();\n }", "title": "" }, { "docid": "497cc17c1716c0acd49bb42d2cf39090", "score": "0.446689", "text": "public function get_orgs()\n\t\t{\n\t\t\t$retArr = null;\n\n\t\t\t// Scaffolding Code For Array:\n\t\t\t$objs = $this->obj->find_all();\n\t\t\tforeach($objs as $obj)\n\t\t\t{\n\t\t\t\t$retArr[] = $obj->getBasics();\n\t\t\t}\n \n\t\t\treturn $retArr;\n\t\t}", "title": "" }, { "docid": "3458dab7cf2ad0d049c010f0b192708e", "score": "0.44638973", "text": "final public static function get()\n {\n return array(\n 'PointRetrait' => '\\\\ColissimoPickupPoint\\\\StructType\\\\PointRetrait',\n 'Conges' => '\\\\ColissimoPickupPoint\\\\StructType\\\\Conges',\n 'findRDVPointRetraitAcheminement' => '\\\\ColissimoPickupPoint\\\\StructType\\\\FindRDVPointRetraitAcheminement',\n 'findRDVPointRetraitAcheminementResponse' => '\\\\ColissimoPickupPoint\\\\StructType\\\\FindRDVPointRetraitAcheminementResponse',\n 'rdvPointRetraitAcheminementResult' => '\\\\ColissimoPickupPoint\\\\StructType\\\\RdvPointRetraitAcheminementResult',\n 'pointRetraitAcheminementResult' => '\\\\ColissimoPickupPoint\\\\StructType\\\\PointRetraitAcheminementResult',\n 'pointRetraitAcheminement' => '\\\\ColissimoPickupPoint\\\\StructType\\\\PointRetraitAcheminement',\n 'findRDVPointRetraitAcheminementByToken' => '\\\\ColissimoPickupPoint\\\\StructType\\\\FindRDVPointRetraitAcheminementByToken',\n 'findRDVPointRetraitAcheminementByTokenResponse' => '\\\\ColissimoPickupPoint\\\\StructType\\\\FindRDVPointRetraitAcheminementByTokenResponse',\n 'findPointRetraitAcheminementByID' => '\\\\ColissimoPickupPoint\\\\StructType\\\\FindPointRetraitAcheminementByID',\n 'findPointRetraitAcheminementByIDResponse' => '\\\\ColissimoPickupPoint\\\\StructType\\\\FindPointRetraitAcheminementByIDResponse',\n 'pointRetraitAcheminementByIDResult' => '\\\\ColissimoPickupPoint\\\\StructType\\\\PointRetraitAcheminementByIDResult',\n 'Exception' => '\\\\ColissimoPickupPoint\\\\StructType\\\\Exception',\n );\n }", "title": "" }, { "docid": "8a0cb0eb15ed68a29943cbdb275f03ea", "score": "0.4462495", "text": "public function listProjects()\n {\n \t$q = new CMQuery('AMProject');\n \t$j = new CMJoin(CMJoin::INNER);\n \t$j->setClass('CMGroup');\n \t$j->on('AMProject::codeGroup=CMGroup::codeGroup');\n \t$j->setFake();\n\n \t$j2 = new CMJoin(CMJoin::LEFT);\n \t$j2->setClass('CMGroupMember');\n \t$j2->on('CMGroupMember::codeGroup=CMGroup::codeGroup');\n \t$j2->setFake();\n\n \t$q->addJoin($j, \"grupos\");\n \t$q->addJoin($j2, \"membros\");\n\n \t$q->setFilter('CMGroupMember::codeUser = '.$this->codeUser.' AND CMGroupMember::status=\"'.CMGroupMember::ENUM_STATUS_ACTIVE.'\"');\n\n\n \treturn $q->execute();\n }", "title": "" }, { "docid": "9461de5f2a93e1a2e191cece8647c1ae", "score": "0.4461811", "text": "public function getProjectsRows() {\n return $this->_excelProjectsRows;\n }", "title": "" }, { "docid": "9461de5f2a93e1a2e191cece8647c1ae", "score": "0.4461811", "text": "public function getProjectsRows() {\n return $this->_excelProjectsRows;\n }", "title": "" }, { "docid": "54a093124124000f11cd62e10669a9d8", "score": "0.4459456", "text": "function &getAssocTypes() {\n\t\treturn $this->_assocTypes;\n\t}", "title": "" }, { "docid": "7150cbe14ea698170f4a81d977b2c635", "score": "0.4459441", "text": "public function getEnumerator();", "title": "" }, { "docid": "e3d58e43d30886eab0fa918a64fc00ef", "score": "0.44538152", "text": "public function getOrganization(): array\n {\n $organization = $this->mollie->organizations->current();\n\n return X::toArray($organization);\n }", "title": "" }, { "docid": "0a711a745303e147cafdd40f8c3a9084", "score": "0.4444241", "text": "final public static function get()\r\n {\r\n return array(\r\n 'ConsultaCadastroPF2' => 'App\\\\Http\\AreasNegocio\\\\CAD\\\\WSDL\\\\StructType\\\\ConsultaCadastroPF2',\r\n 'ConsultaCadastroPF2Response' => 'App\\\\Http\\\\AreasNegocio\\\\CAD\\\\WSDL\\\\StructType\\\\ConsultaCadastroPF2Response',\r\n 'PDVConsultaCadastroPFV2ReturnData' => 'App\\\\Http\\\\AreasNegocio\\CAD\\WSDL\\\\StructType\\\\PDVConsultaCadastroPFV2ReturnData',\r\n 'baseWebServiceReturnConsulta' => 'App\\\\Http\\\\AreasNegocio\\\\CAD\\WSDL\\\\StructType\\\\BaseWebServiceReturnConsulta',\r\n );\r\n }", "title": "" }, { "docid": "5373b32e9f5c2c904cedde56f8743258", "score": "0.4433889", "text": "public function getListActitivty() {\n return Enumerations::find()->select('name')->where(['type' => self::TYPE_TIME_ENTRY_ACTIVITY, 'active' => self::IS_ACTIVE, 'project_id' => NULL])->orderBy(['position' => SORT_ASC])->indexBy('id')->column();\n }", "title": "" }, { "docid": "2affdff01611ca336ca005900516c9f9", "score": "0.4432151", "text": "public function mc_enum_project_view_states($username, $password)\n {\n return $this->__soapCall(\n 'mc_enum_project_view_states',\n array($username, $password)\n );\n }", "title": "" }, { "docid": "5a5addaaf19af759daa5077853b4ca47", "score": "0.442385", "text": "public function getEnumValues()\n {\n return array(\n 'CONNCTION_UNKNOWN' => self::CONNCTION_UNKNOWN,\n 'CELL_UNKNOWN' => self::CELL_UNKNOWN,\n 'CELL_2G' => self::CELL_2G,\n 'CELL_3G' => self::CELL_3G,\n 'CELL_4G' => self::CELL_4G,\n 'CELL_5G' => self::CELL_5G,\n 'WIFI' => self::WIFI,\n 'ETHERNET' => self::ETHERNET,\n 'NEW_TYPE' => self::NEW_TYPE,\n );\n }", "title": "" }, { "docid": "9b965791be0bb4580fb50bed7af5d517", "score": "0.44214934", "text": "function _resultsSelections()\n {\n // Gender options and labels are set based on\n // the plugin options\n\n $g = array(ucfirst(WPST_PUBLIC) => WPST_PUBLIC\n ,ucfirst(WPST_PRIVATE) => WPST_PRIVATE\n ) ;\n\n return $g ;\n }", "title": "" }, { "docid": "cf66b00f34196dae8e92677e63fa1ddf", "score": "0.44208604", "text": "public function addProjection(\\google\\privacy\\dlp\\v2beta1\\Projection $value){\n return $this->_add(3, $value);\n }", "title": "" }, { "docid": "75264fa1216b4913b9233a2103af2eda", "score": "0.44184607", "text": "public function getAllProjectStatuses() {\n\n $query = Doctrine_Core::getTable('ProjectStatus')\n ->createQuery('c');\n\n return $query->execute();\n }", "title": "" }, { "docid": "21cfb5cc0ca81ac0ef121d18ab3e2062", "score": "0.44116715", "text": "public function getIterator(): ArrayIterator\n\t{\n\t\treturn new ArrayIterator($this->getEnums());\n\t}", "title": "" }, { "docid": "6ebffe57f17df2fb704b004918fc3b80", "score": "0.4408792", "text": "public static final function getEnum() {\n return array(\n self::SENT,\n self::DELIVERED,\n self::NOT_DELIVERED,\n self::NO_CREDITS,\n self::ERROR,\n );\n }", "title": "" }, { "docid": "dbd5e1aa57a9e276785ca34b4c8f8e16", "score": "0.43972793", "text": "public function obtenerComisiones() {\n\t\t$q = Doctrine_Query::create()\n\t\t\t->select('c.*')\n\t\t\t->from('Comisiones c')\n\t\t\t->where('c.idcatedra = '.$this->idcatedra)\t \t\t\n\t\t\t->execute();\t\t\t\n \t\t\t\n\t\treturn $q;\n\t}", "title": "" }, { "docid": "41a66b581a13f4f6c4a3855c2348f20c", "score": "0.43970853", "text": "public function getEnumValues()\n {\n return array(\n 'UNKNOWN_OPERATOR' => self::UNKNOWN_OPERATOR,\n 'CHINA_MOBILE' => self::CHINA_MOBILE,\n 'CHINA_TELECOM' => self::CHINA_TELECOM,\n 'CHINA_UNICOM' => self::CHINA_UNICOM,\n 'OTHER_OPERATOR' => self::OTHER_OPERATOR,\n );\n }", "title": "" }, { "docid": "e4b4143142b7f39156caae98ec258958", "score": "0.43904045", "text": "final public static function getEnumerators()\n {\n if (!isset(self::$names[static::class])) {\n static::getConstants();\n }\n\n /** @var callable $byNameFn */\n $byNameFn = [static::class, 'byName'];\n return \\array_map($byNameFn, self::$names[static::class]);\n }", "title": "" }, { "docid": "857c80679585e9bfea59d87484aaed62", "score": "0.4387788", "text": "public static function all(): array\n {\n return array_values(self::enumMembers());\n }", "title": "" }, { "docid": "ebeb0ce1147625af41f590b5143277ba", "score": "0.4385494", "text": "public function getRegions() {\n\t\t$SQL = 'SELECT id, XNG_ID, region FROM Locations.Regions';\n\t\ttry {\n\t\t\t$SQL = $this->PDO->query($SQL);\n\t\t\t$resultSet = $SQL->fetchAll(PDO::FETCH_ASSOC);\n\t\t}\n\t\tcatch (PDOException $e) {\n\t\t\tthrow new Exception('Error on line '.$e->getLine().': '.$e->getMessage());\n\t\t}\n\t\treturn $resultSet;\n\t}", "title": "" }, { "docid": "e12ac17d4529ff5f1c77af252f978946", "score": "0.43825203", "text": "public function getParliamentarians()\n {\n return $this->organization->getParliamentarians();\n }", "title": "" }, { "docid": "f567604a57b964250fe54fb76ceac1d3", "score": "0.43810847", "text": "public function getProjection($lat, $lon)\n\t{\n\t\tif($this->container === NULL)\n\t\t{\n\t\t\tthrow new AyMapException('Cannot calculate projection without the container dimensions.');\n\t\t}\n\t\t\n\t\t$x\t\t= ($lon - $this->map['lon1']) * ($this->container['width'] / $this->map['lon_delta']);\n\t\n\t $lat\t= $lat * M_PI / 180;\n\t \n\t $y\t\t= $this->container['height'] - (($this->map['world_width'] / 2 * log((1 + sin($lat)) / (1 - sin($lat)))) - $this->map['offset_y']);\n\t\n\t return array($x, $y);\n\t}", "title": "" }, { "docid": "7bfe2d8a4f248d6876a94b9912c87358", "score": "0.4377813", "text": "public function getProjects($type)\n\t{\n\t\tswitch($type)\n\t\t{\n\t\t\tcase \"phase\": self::byphase();\n\t\t\tbreak;\n\t\t\tcase \"phaseuser\": self::byphasenuser();\n\t\t\tbreak;\n\t\t\tcase \"finish\": self::ended();\n\t\t\tbreak;\n\t\t\tcase \"finishuser\": self::endeduser();\n\t\t\tbreak;\n\t\t\tcase \"status\": self::bystatus();\n\t\t\tbreak;\n\t\t\tcase \"statususer\": self::bystatususer();\n\t\t\tbreak;\n\t\t\tdefault: self::usersprojects();\n\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "aa5f722ac655525288f4337239c22a4e", "score": "0.43776995", "text": "public function getOrganisations()\n {\n return $this->getOrganizations();\n }", "title": "" }, { "docid": "70da2182fd65831ead5eea525657d056", "score": "0.4376502", "text": "public function getStatus()\n { \n if(!$this->status)\n { \n throw new \\Exception(\"No aggregation choice has been set.\"); \n }\n return $this->status;\n }", "title": "" }, { "docid": "1335cadc0421073e12b602970e22bbd3", "score": "0.43722335", "text": "public function getRgExpedidor()\n\t{\n\t\treturn $this->rg_expedidor;\n\t}", "title": "" }, { "docid": "b8dd3c3e0d7b1dd550902b6d266b5576", "score": "0.43678105", "text": "final public static function getConstants()\n {\n if (isset(self::$constants[static::class])) {\n return self::$constants[static::class];\n }\n\n $reflection = new ReflectionClass(static::class);\n $constants = [];\n\n do {\n $scopeConstants = [];\n // Enumerators must be defined as public class constants\n foreach ($reflection->getReflectionConstants() as $reflConstant) {\n if ($reflConstant->isPublic()) {\n $scopeConstants[ $reflConstant->getName() ] = $reflConstant->getValue();\n }\n }\n\n $constants = $scopeConstants + $constants;\n } while (($reflection = $reflection->getParentClass()) && $reflection->name !== __CLASS__);\n\n /** @var array<string, null|bool|int|float|string|array<mixed>> $constants */\n\n assert(\n self::noAmbiguousValues($constants),\n 'Ambiguous enumerator values detected for ' . static::class\n );\n\n self::$names[static::class] = \\array_keys($constants);\n return self::$constants[static::class] = $constants;\n }", "title": "" }, { "docid": "2dc8f049c78a9adf8bacbd1a5f44c9f2", "score": "0.43651047", "text": "public function getProjectList(){\n\t\treturn ProjectProject::model()->findAll();\n\t}", "title": "" }, { "docid": "a2e231fc447bde578a2466fec62aede3", "score": "0.43646726", "text": "public static function getMap()\n {\n return [\n new Entity\\IntegerField(\n 'ID',\n [\n 'primary' => true,\n 'autocomplete' => true,\n 'column_name' => 'ID'\n ]\n ),\n new Entity\\IntegerField(\n 'PUBLISHER_ID',\n [\n 'column_name' => 'PUBLISHER_ID'\n ]\n ),\n new Entity\\StringField(\n 'TITLE',\n [\n 'column_name' => 'TITLE'\n ]\n ),\n new Entity\\DatetimeField(\n 'YEAR',\n [\n 'column_name' => 'YEAR'\n ]\n ),\n new Entity\\IntegerField(\n 'COPIES_CNT',\n [\n 'column_name' => 'COPIES_CNT'\n ]\n ),\n ];\n }", "title": "" }, { "docid": "646718d8054e3ca1862ea11b9fa6f25d", "score": "0.43592626", "text": "public function get_all_research_project()\n {\n $q = $this->db->get('research_project');\n if ($q->num_rows() > 0){\n return $q->result();\n }return array();\n }", "title": "" }, { "docid": "722dca861b8b259ce97fc997e3a59608", "score": "0.43541595", "text": "public function getEavEntityTypes();", "title": "" }, { "docid": "9053ccda753ab255f8103b0436faba23", "score": "0.4347357", "text": "final public static function get()\n {\n return array(\n 'submeterDeclaracaoIESRequest' => '\\\\IFT_IES\\\\StructType\\\\IFT_IESSubmeterDeclaracaoIESRequest',\n 'submeterDeclaracaoIESResponse' => '\\\\IFT_IES\\\\StructType\\\\IFT_IESSubmeterDeclaracaoIESResponse',\n 'validarDeclaracaoIESRequest' => '\\\\IFT_IES\\\\StructType\\\\IFT_IESValidarDeclaracaoIESRequest',\n 'validarDeclaracaoIESResponse' => '\\\\IFT_IES\\\\StructType\\\\IFT_IESValidarDeclaracaoIESResponse',\n 'AutenticationException' => '\\\\IFT_IES\\\\StructType\\\\IFT_IESAutenticationException',\n 'AuthenticationFailed' => '\\\\IFT_IES\\\\StructType\\\\IFT_IESAuthenticationFailed',\n 'informacaoSubmissao' => '\\\\IFT_IES\\\\StructType\\\\IFT_IESInformacaoSubmissao',\n 'contribuinte' => '\\\\IFT_IES\\\\StructType\\\\IFT_IESContribuinte',\n 'dadosPagamento' => '\\\\IFT_IES\\\\StructType\\\\IFT_IESDadosPagamento',\n 'informacaoErros' => '\\\\IFT_IES\\\\StructType\\\\IFT_IESInformacaoErros',\n 'informacaoErro' => '\\\\IFT_IES\\\\StructType\\\\IFT_IESInformacaoErro',\n );\n }", "title": "" } ]
038c0daf94f6878c4cb14ceedbce562b
Set the dependency in a class property, so it's easily accessible for later use of class methods.
[ { "docid": "d36f77d43a5cd53de760a9ba58cf6457", "score": "0.0", "text": "public function action_savecomment()\n {\n $this->model = new Tumor_Model();\n $result = $this->model->saveComment();\n $this->send_plaintext($result);\n }", "title": "" } ]
[ { "docid": "b4a3d1221eb36156fd57ecb400db5f87", "score": "0.71523124", "text": "public function setDependency($dependency)\r\n {\r\n $this->dependency = $dependency;\r\n }", "title": "" }, { "docid": "2f8126277cc438496d7003d4c31d6136", "score": "0.6593478", "text": "public function testSetDependencies(): void\n {\n self::assertSame($this->class, $this->class->setDependencies([$this->value]));\n }", "title": "" }, { "docid": "e317c9ebc7cdd703fe08db3fe14e686a", "score": "0.6024267", "text": "public function setDependencies() {\n }", "title": "" }, { "docid": "4d35eee7f49f4c573c4e6467e048935e", "score": "0.5899052", "text": "private function setDependencyInjector() {\n $this->dependencyInjector = new DependencyInjector();\n\n // gets the dependency container through the configuration\n $dependencyIO = $this->getConfigValue(self::CONFIG_DEPENDENCY_IO);\n if ($dependencyIO) {\n $objectFactory = new ObjectFactory();\n $dependencyIO = $objectFactory->create($dependencyIO, self::INTERFACE_DEPENDENCY_IO);\n\n $container = $dependencyIO->getContainer($this);\n\n $this->dependencyInjector->setContainer($container);\n $this->dependencyInjector->setInstance($objectFactory);\n }\n\n // set Zibo to the dependency injector\n $this->dependencyInjector->setInstance($this);\n $this->dependencyInjector->setInstance($this->getEnvironment(), self::INTERFACE_ENVIRONMENT);\n $this->dependencyInjector->setInstance($this->fileBrowser, self::INTERFACE_FILE_BROWSER);\n }", "title": "" }, { "docid": "417c60c4e42e35f308c9fa434ddf9483", "score": "0.5669957", "text": "public function testGetDependencies(): void\n {\n $this->class->setDependencies([$this->value]);\n\n self::assertSame([$this->value], $this->class->getDependencies());\n }", "title": "" }, { "docid": "ec957275a4f56c80722cfbcf46bb4cf6", "score": "0.55694294", "text": "public function __construct() {\n $this->dependencies = array();\n }", "title": "" }, { "docid": "0fd1012cb8281ee011c6e1adef09de8e", "score": "0.5560845", "text": "public function setDI(\\Phalcon\\DiInterface $dependencyInjector) {}", "title": "" }, { "docid": "fedd363088ce05b869048cbe9e7c604d", "score": "0.55557287", "text": "public function getDependency()\r\n {\r\n return $this->dependency;\r\n }", "title": "" }, { "docid": "d0b4db6120d1d27ad0b12c2abc34ca83", "score": "0.54738265", "text": "public function setDI(\\Phalcon\\DiInterface $dependencyInjector) {\r\n\t\t$this->_di = $dependencyInjector;\t\r\n\t}", "title": "" }, { "docid": "1956444ed03ab09e046a6119d17bc254", "score": "0.54467714", "text": "private function setClassProperty(ReflectionProperty $reflection, $value)\n {\n $reflection->setAccessible(true);\n $reflection->setValue($value);\n }", "title": "" }, { "docid": "13b707468e3ee2da752b8af3a556af19", "score": "0.5442794", "text": "public function set_data_manager_class($class)\n {\n $this->get_dependency_container()->add(self::DEPENDENCY_DATA_MANAGER_CLASS, $class);\n }", "title": "" }, { "docid": "2c5b1ffd5b86b6a71b932969b4138ec2", "score": "0.54333097", "text": "public function getDependency() {\n return $this->dependency;\n }", "title": "" }, { "docid": "cbdc6e4bf3477722172a319e28d40c7f", "score": "0.5389712", "text": "public function setDI(\\Phalcon\\DiInterface $dependencyInjector) {\r\n\t\t$this->_di = $dependencyInjector;\r\n\t}", "title": "" }, { "docid": "1c3c7a4dced2e1688463e30a69c1962e", "score": "0.5374496", "text": "public function buildDependency() {\n $this->stubGenerator\n ->loadStub(__DIR__ . '/../../stubs/packages/presenter.stub');\n\n $class = ucfirst(str_singular($this->getAttribute('name')));\n\n $this->stubGenerator\n ->addFields([\n 'class' => $class,\n 'vendor' => $this->getAttribute('module')['vendor'],\n 'name' => $this->getAttribute('module')['name'],\n ])->save(\n $this->getAttribute('path') . DIRECTORY_SEPARATOR . $class . 'Presenter.php'\n );\n\n return $this;\n }", "title": "" }, { "docid": "8bdb9bb92dacf89e374904fa7df328e3", "score": "0.5342707", "text": "public function testSetProperty(): void\n {\n self::assertSame($this->class, $this->class->setProperty($this->value));\n }", "title": "" }, { "docid": "5853e2fbedb1d1ae8f7a2e6093976504", "score": "0.53183144", "text": "public function setDI(DiInterface $dependencyInjector)\n {\n $this->_dependencyInjector = $dependencyInjector;\n }", "title": "" }, { "docid": "92c38c3878b7835e59d0aa84d214c1a4", "score": "0.52760196", "text": "public function inject(&$targetInstance,$dependencyList);", "title": "" }, { "docid": "767acf1d60a2107b147ec3814fc568e1", "score": "0.5226289", "text": "public function addDependency($dependency) {\n if (!array_search($dependency, $this->dependencies)) {\n $this->dependencies[] = $dependency;\n }\n }", "title": "" }, { "docid": "1cf989ab92f52ca0d532d64b2e6746fe", "score": "0.52068233", "text": "public function testSetDependenciesNull(): void\n {\n self::assertSame($this->class, $this->class->setDependencies(null));\n }", "title": "" }, { "docid": "58b6bf43122bacd258ac81c2899e9913", "score": "0.51993567", "text": "function set($prop, $value) { \n $this->$prop = $value; \n }", "title": "" }, { "docid": "cd40160438a1c0f111c5a056f85aafbd", "score": "0.51384807", "text": "protected function setClassDependencies($work_object)\n {\n return $this->class_dependencies->get($work_object);\n }", "title": "" }, { "docid": "719ca4074f280c475e04ea0bdd4f98cb", "score": "0.5126095", "text": "public function __construct() {\n\t\tself::$class = self::getClass();\n\t}", "title": "" }, { "docid": "afa96fae2a0792fde4378f362ad0e72a", "score": "0.5118053", "text": "public function registerContextualDependency($class, string $interface, string $implementation);", "title": "" }, { "docid": "046f28f65a11d1fbeff5a82a2f4f8a8f", "score": "0.50853366", "text": "public function __set($property, $value){ }", "title": "" }, { "docid": "cc2405b0506aa760efde8a9063da5870", "score": "0.5026352", "text": "public function setClasspathRef(Reference $r)\n {\n $this->classpathId = $r->getRefId();\n $this->createClasspath()->setRefid($r);\n }", "title": "" }, { "docid": "186a16433fa01554e2151c578aa65484", "score": "0.49859655", "text": "public function testObjectDependenciesAutoAdd() {\n\t\t\t$str = \"You can call, but I probably won't hear you.\";\n\t\t\t$injector = new DependencyInjector(DependencyInjector::DEFAULT_FLAGS | DependencyInjector::AUTO_ADD_DEPENDENCIES);\n\n\t\t\t$injector->addComponent(\"DINeedyTestClass\");\n\t\t\t$injector->bind(\"DITestInterface\", \"DITestClass\");\n\t\t\t$component = $injector->getComponent(\"DINeedyTestClass\", false); /** @var DINeedyTestClass $component */\n\n\t\t\t$this->assertNotNull($component, \"Returned instance of DINeedyTestClass was null?\");\n\t\t\t$this->assertEquals($str, $component->test(), \"Needy class did not get constructed properly.\");\n\n\t\t\tunset($injector, $component);\n\t\t}", "title": "" }, { "docid": "371a7d0ae1ee417f41f52ad071a333a3", "score": "0.49733472", "text": "public function testSetClass(): void\n {\n self::assertSame($this->class, $this->class->setClass($this->value));\n }", "title": "" }, { "docid": "bf8b550673ee1589345c779c7f09231f", "score": "0.49542788", "text": "private function load_dependency() {\n require_once __DIR__ . '/includes/functions.php';\n\n $this->container['assets'] = new WP_Starter\\Classes\\Assets( $this->plugin_name );\n // $this->container['template'] = new WP_Starter\\Classes\\Template( $this->plugin_name );\n // $this->container['api'] = new WP_Starter\\Api( $this->plugin_name );\n\n if ( is_request( 'admin' ) ) {\n $this->container['admin'] = new WP_Starter\\Admin( $this->plugin_name, $this->assets );\n } elseif ( is_request( 'frontend' ) ) {\n $this->container['frontend'] = new WP_Starter\\Frontend( $this->plugin_name, $this->assets );\n }\n }", "title": "" }, { "docid": "8be066d001d6e53f7e64cfc79c4c32b7", "score": "0.494749", "text": "function __construct() {\n parent::__construct();\n $this->data['module'] = 'property';\n }", "title": "" }, { "docid": "c4942f6e949d73c6833ce03f93c5733e", "score": "0.49355897", "text": "function setDependencyFile($file = false) {\n\t\t$this->addDependencyFile($file);\n\t}", "title": "" }, { "docid": "8c8799a961d706256509dd2a93d18a7f", "score": "0.49349445", "text": "function setProperty($property, &$ref) {\r\n\t\t$this->$property = &$ref;\r\n\t}", "title": "" }, { "docid": "c04c9e7deb151366535c649a64c18679", "score": "0.49279457", "text": "function __set($prop, $url)\n {\n switch ($prop) {\n case ('url'):\n $this->url = $url;\n };\n }", "title": "" }, { "docid": "9e9801148bb9b450cdeacd57b1d254d0", "score": "0.49204445", "text": "private function Flow_Proxy_LazyPropertyInjection($propertyObjectName, $propertyClassName, $propertyName, $setterArgumentHash, callable $lazyInjectionResolver)\n {\n $injection_reference = &$this->$propertyName;\n $this->$propertyName = \\Neos\\Flow\\Core\\Bootstrap::$staticObjectManager->getInstance($propertyObjectName);\n if ($this->$propertyName === null) {\n $this->$propertyName = \\Neos\\Flow\\Core\\Bootstrap::$staticObjectManager->getLazyDependencyByHash($setterArgumentHash, $injection_reference);\n if ($this->$propertyName === null) {\n $this->$propertyName = \\Neos\\Flow\\Core\\Bootstrap::$staticObjectManager->createLazyDependency($setterArgumentHash, $injection_reference, $propertyClassName, $lazyInjectionResolver);\n }\n }\n }", "title": "" }, { "docid": "e49262bed61f800a7c9ca175ba096e8c", "score": "0.48911053", "text": "function __construct() {\n // use it to set stuff up before the class is run, i.e. database call.\n echo $this->wheels = 15;\n}", "title": "" }, { "docid": "1ee51630a71a2f08db3edc2d01d9076a", "score": "0.48864833", "text": "public function setClass( $class ) {\n $this->class = $class;\n }", "title": "" }, { "docid": "639bea0d33823bab488ef420b1c93e56", "score": "0.48719916", "text": "public function setData(array $data) {\n array_walk($data, function (&$config, $name) {\n $config = new ConfigEntityDependency($name, $config);\n });\n $this->data = $data;\n $this->graph = NULL;\n return $this;\n }", "title": "" }, { "docid": "48539c9b0258029dcd4fdcdd302f19f4", "score": "0.48705113", "text": "public function setDependencies(array $reflection = array())\n {\n parent::setDependencies(array());\n\n $options = array();\n $this->dependencies['Runtimedata'] = $options;\n $this->dependencies['Mailer'] = $options;\n $this->dependencies['Encrypt'] = $options;\n $this->dependencies['Fieldhandler'] = $options;\n $this->dependencies['Flashmessage'] = $options;\n $this->dependencies['Userdata'] = $options;\n\n return $this->dependencies;\n }", "title": "" }, { "docid": "4ddacaa30b9da699bbcb02e1b798293a", "score": "0.48547402", "text": "public function setClass($class)\n {\n $this->class = $class;\n }", "title": "" }, { "docid": "4ddacaa30b9da699bbcb02e1b798293a", "score": "0.48547402", "text": "public function setClass($class)\n {\n $this->class = $class;\n }", "title": "" }, { "docid": "5acc7faf2277bdeb56d9e91ce0df8fc4", "score": "0.48496294", "text": "protected function setDependencies(Container $container)\n {\n parent::setDependencies($container);\n\n $this->setAppConfig($container['config']);\n $this->setModelFactory($container['model/factory']);\n }", "title": "" }, { "docid": "1af687e8bddcae46a24cd241ecc1f2ba", "score": "0.4844405", "text": "public function setClass($class) {\n $this->class = $class;\n }", "title": "" }, { "docid": "71b87e45126d3361955e98bb3cdff304", "score": "0.48355883", "text": "public function setDI($dependencyInjector)\n {\n $this->_di = $dependencyInjector;\n //注入request对象需要的服务,这里只需要filter,只设置filter,可以设置更多\n $this->_filter = $this->_di->get('filter');\n }", "title": "" }, { "docid": "a9c1b36418514b7b2ed38d5ecf543221", "score": "0.48242357", "text": "public function evaluateDependency();", "title": "" }, { "docid": "18351f08b2e1faad52dedb45075faf30", "score": "0.48147324", "text": "function setClass($class_name, $args = null) {}", "title": "" }, { "docid": "d9376329e1e12672cb9f25db3747cbde", "score": "0.48134515", "text": "public function set_request_class($class)\n {\n $this->get_dependency_container()->add(self::DEPENDENCY_REQUEST_CLASS, $class);\n }", "title": "" }, { "docid": "f2b9755bb24f7556017fa1bafe8fe01a", "score": "0.48114812", "text": "protected function setDependencies(Container $container)\n {\n // This method is a stub. Reimplement in children template classes.\n }", "title": "" }, { "docid": "9108aba633438448f872804882d0989d", "score": "0.48000833", "text": "private function injectProperty($object, PropertyInjection $propertyInjection)\n {\n $propertyName = $propertyInjection->getPropertyName();\n $property = new ReflectionProperty(get_class($object), $propertyName);\n\n $entryName = $propertyInjection->getEntryName();\n if ($entryName === null) {\n throw new DefinitionException(get_class($object) . \"::$propertyName has no type defined or guessable\");\n }\n\n // Get the dependency\n try {\n $value = $this->container->get($propertyInjection->getEntryName(), $propertyInjection->isLazy());\n } catch (DependencyException $e) {\n throw $e;\n } catch (Exception $e) {\n throw new DependencyException(\"Error while injecting '\" . $propertyInjection->getEntryName() . \"' in \"\n . get_class($object) . \"::$propertyName. \" . $e->getMessage(), 0, $e);\n }\n\n // Allow access to protected and private properties\n $property->setAccessible(true);\n\n // Inject the dependency\n $property->setValue($object, $value);\n }", "title": "" }, { "docid": "44cd5ff67436654b02ed5c368d78024c", "score": "0.47969544", "text": "public function property(string $name, mixed $value, bool $autowrite = false): InjectionInterface;", "title": "" }, { "docid": "4b65e91c9aae3d0b693b4ccb0f1681c7", "score": "0.47913244", "text": "public function setDI($dependencyInjector)\n {\n if (!is_object($dependencyInjector) || \n $dependencyInjector instanceof DiInterface === false) {\n throw new Exception('The dependency injector must be an Object');\n }\n\n $this->_dependencyInjector = $dependencyInjector;\n }", "title": "" }, { "docid": "c811f47bf733e048e64b52231040d520", "score": "0.4764042", "text": "function __set($attr, $val)\n {\n $this->resolve();\n $this->original->$attr = $val;\n }", "title": "" }, { "docid": "1583b1940359a2800ab2db3ef57159c3", "score": "0.47607318", "text": "protected function _postConstruct()\n {\n parent::_postConstruct();\n\n $this->_facebook = Solar::dependency(\n 'Facebook',\n $this->_config['facebook']\n );\n }", "title": "" }, { "docid": "a2d6f11df6b11b0e70bfa1cfdf581bbf", "score": "0.47462493", "text": "public function propertyInjection($instance, $controller)\r\n {\r\n $definition = $this->getDefinition();\r\n\r\n $injectableDefinitions = $definition()->getPropertyDependencies();\r\n\r\n $this->setPropertyInjection($injectableDefinitions);\r\n\r\n $dependencies = $this->getDefinitions($controller);\r\n\r\n if (array_key_exists($controller, $this->definitions)) {\r\n\r\n $property = key($dependencies);\r\n\r\n $reflection = new Reflection();\r\n $reflection->setClass($controller);\r\n\r\n if (!$reflection->reflectionClass->hasProperty($property)) {\r\n throw new Exception(\r\n sprintf(\"Property %s is not defined in $controller controller\", $property)\r\n );\r\n }\r\n\r\n $reflection->makePropertyAccessible($property);\r\n $reflection->reflectionProperty->setValue(\r\n $instance, $dependencies[$property]\r\n );\r\n }\r\n }", "title": "" }, { "docid": "dd8a16e9f007bb89e8fe4c21a96e934d", "score": "0.47282884", "text": "public static function bind(string $key, $value): void\n {\n static::$dependency[$key] = $value;\n }", "title": "" }, { "docid": "472a42120c0fb6dd1afb91008df406a6", "score": "0.4724561", "text": "public function provide($id, $dependency);", "title": "" }, { "docid": "95c657e38b55fb3a32f374cb50c67430", "score": "0.471398", "text": "public function __construct() {\n self::$propertyManager = new class {\n public function setProperties(VO $vo, object $props) {\n foreach ($vo as $k => $v) {\n if (property_exists($props, $k)) {\n $propsValue = $props->$k;\n /*If the property is initialized to null, we allow it to be sett to anything*/\n if ($vo->$k === NULL) {\n $vo->$k = $propsValue;\n continue;\n }\n $expectedType = gettype($vo->$k);\n $propsType = gettype($propsValue);\n if ($expectedType != $propsType) {\n $class = get_class($vo);\n $vo->addValidationErrorMessage(\n \"Property $k of class $class expects type $expectedType. Got $propsType with value $propsValue.\"\n );\n } else {\n if ($expectedType === 'boolean') {\n $vo->$k = $this->toBoolean($propsValue);\n } elseif (is_string($propsValue)) {\n $vo->$k = trim($propsValue);\n } else {\n $vo->$k = $propsValue;\n }\n }\n }\n }\n }\n\n private function toBoolean($value) {\n if (is_bool($value)) {\n return $value;\n }\n if (is_string($value)) {\n $value = strtolower(trim($value));\n if ($value === 'true') {\n return TRUE;\n }\n if ($value === 'false') {\n return FALSE;\n }\n }\n if (is_numeric($value)) {\n if ($value === 1) {\n return TRUE;\n }\n if ($value === 0) {\n return FALSE;\n }\n }\n\n return NULL;\n }\n };\n }", "title": "" }, { "docid": "afba2579d9ee9de456a13449fa58458a", "score": "0.47079036", "text": "public function getDependencyManager();", "title": "" }, { "docid": "a2d391c092e0bd4ecd311b3488ae1497", "score": "0.4707103", "text": "protected function setDependencies(Container $container)\n {\n parent::setDependencies($container);\n\n $this->setWidgetFactory($container['widget/factory']);\n\n if (isset($container['attachments/config'])) {\n $this->setConfig($container['attachments/config']);\n } elseif (isset($container['config']['attachments'])) {\n $this->setConfig($container['config']['attachments']);\n }\n }", "title": "" }, { "docid": "e5b766a0737e6919a0b06fbcdfaa7d27", "score": "0.47038904", "text": "public function __construct(Module $module, Module $dependency, $message = null, $code = 0, Exception $previousException = null) {\n $this->dependency = $dependency;\n\n parent::__construct($module, $message, $code, $previousException);\n }", "title": "" }, { "docid": "0636fd165cc81816f5b6731e5d9b5e66", "score": "0.46842185", "text": "public function classSetUp(): void\n {\n $this->config = $this->getTestConfig();\n $this->factory = $this->getFactoryClass();\n $this->configId = $this->factory instanceof RequiresConfigId ? 'orm_default' : null;\n }", "title": "" }, { "docid": "1cb8da2c31847cd9f07d09d07531b4a9", "score": "0.46812403", "text": "private function load_dependencies() {\n\n /**\n * The class responsible for orchestrating the actions and filters of the\n * core plugin.\n */\n require_once VISUALBUDGET_PATH . 'includes/class-visualbudget-loader.php';\n\n /**\n * The class responsible for defining internationalization functionality\n * of the plugin.\n */\n require_once VISUALBUDGET_PATH . 'includes/class-visualbudget-i18n.php';\n\n /**\n * The class responsible for defining all actions that occur in the admin area.\n */\n require_once VISUALBUDGET_PATH . 'admin/class-visualbudget-admin.php';\n\n /**\n * The class responsible for defining all actions that occur in the public-facing\n * side of the site.\n */\n require_once VISUALBUDGET_PATH . 'public/class-visualbudget-public.php';\n\n $this->loader = new VisualBudget_Loader();\n\n }", "title": "" }, { "docid": "3849a967bf5be2bf916598dc6d485356", "score": "0.4669913", "text": "public function setDependencyContainer(Container $container)\n {\n $this->dependencyContainer = $container;\n\n return $this;\n }", "title": "" }, { "docid": "fe590a8438a11bcf99b82f879a5ecd78", "score": "0.4666908", "text": "public function setDI(\\Phalcon\\DiInterface $dependencyInjector)\r\n {\r\n $this->di = $dependencyInjector;\r\n return $this;\r\n }", "title": "" }, { "docid": "aac82e2a88563efe46cb8737c14440f0", "score": "0.46661437", "text": "public function setDependencies(\\stdClass $dependencies){\n\t\tforeach($dependencies as $dependency) {\n\t\t\tif(is_array($dependency)){\n\t\t\t\tforeach($dependency as $property) {\n\t\t\t\t\tif(!is_string($property)){\n\t\t\t\t\t\tthrow new \\InvalidArgumentException('Items of a dependency list must be strings.');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}elseif($this->isAJSONSchema($dependency)){\n\t\t\t\t// Pass\n\t\t\t}else{\n\t\t\t\tif(!is_string($dependency)){\n\t\t\t\t\tthrow new \\InvalidArgumentException('Dependencies must be strings.');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->dependencies = $dependencies;\n\t}", "title": "" }, { "docid": "5ef24e8906ad20f44dbcf168e7fc9d8c", "score": "0.46631625", "text": "private function getReflexDtoClass() : \\ReflectionProperty\n {\n return $this->getReflex('dtoClass');\n }", "title": "" }, { "docid": "72c00bc54865baaa71c58925913ee106", "score": "0.4658888", "text": "public function testConstructSetClient()\n {\n $node = new Node($this->client);\n\n // reflect `node`\n $reflectionClass = new \\ReflectionClass($node);\n\n // set `client` property from `node` parent (`abstract node`) accessible\n $reflectionProperty = $reflectionClass->getParentClass()->getProperty('client');\n $reflectionProperty->setAccessible(true);\n\n // asserts\n $this->assertSame($this->client, $reflectionProperty->getValue($node));\n }", "title": "" }, { "docid": "9edaa5306f06dc3f7981f75a23dcfab6", "score": "0.46553478", "text": "function register_theme_dependency(JKNThemeDependency $dep): void {\r\n $this->theme_deps[$dep->get_id()] = $dep;\r\n }", "title": "" }, { "docid": "f122168a4b6e6eb1c980d9be2adf9c73", "score": "0.46511617", "text": "public function configureDependencies(DependencyBuilder $dependencies): void\n {\n }", "title": "" }, { "docid": "3e114624624ee72c348f0fd96791f22d", "score": "0.46487194", "text": "public function inject($class, $definition)\n {\n $this->container[$class] = $this->container->factory($definition);\n }", "title": "" }, { "docid": "e0e9b92d77a6e9574f9c61e3909019bc", "score": "0.46297637", "text": "public function __set($prop, $value)\n {\n $this->data[$prop] = $value;\n }", "title": "" }, { "docid": "33fdaabcd875580e914eb0e5535e6226", "score": "0.462825", "text": "protected function define(ClassDefinition $class)\n {\n $class->property($this->number)->asInt();\n }", "title": "" }, { "docid": "25b72f26fd3ec453ff7d443c1de56339", "score": "0.4628007", "text": "public function set_application_dependency( \\Alexa\\Request\\Application $application ) {\n\t\t$this->application = $application;\n\t}", "title": "" }, { "docid": "1db08959284b13a20632a1a3e1c9bd7c", "score": "0.46260607", "text": "function setService($service) {\r\n $this -> service = $service;\r\n }", "title": "" }, { "docid": "c6087f3181cd76794cc98fa173ff8a8a", "score": "0.46129432", "text": "protected function setDependencies($package, array $dependencies)\n\t{\n\t\t$db = JFactory::getDbo();\n\n\t\t$query = $db->getQuery(true)\n\t\t\t->delete('#__akeeba_common')\n\t\t\t->where($db->qn('key') . ' = ' . $db->q($package));\n\n\t\ttry\n\t\t{\n\t\t\t$db->setQuery($query)->execute();\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t// Do nothing if the old key wasn't found\n\t\t}\n\n\t\t$object = (object)array(\n\t\t\t'key' => $package,\n\t\t\t'value' => json_encode($dependencies)\n\t\t);\n\n\t\ttry\n\t\t{\n\t\t\t$db->insertObject('#__akeeba_common', $object, 'key');\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t// Do nothing if the old key wasn't found\n\t\t}\n\t}", "title": "" }, { "docid": "80a9f3f3692ce4d08eb9e8cd0bcb1f45", "score": "0.4612164", "text": "protected function setDependencies(Container $container)\n {\n parent::setDependencies($container);\n\n // Fulfills the ViewableTrait dependencies\n $this->setView($container['view']);\n }", "title": "" }, { "docid": "35d1c743ce7013c5896c065b50aae8b5", "score": "0.46100408", "text": "function register_class(&$class)\n\t{\n\t\t$this->class = &$class;\n\t\t$this->ipsclass =& $class->ipsclass;\n\t\t$this->root_path = $this->class->root_path;\n\t}", "title": "" }, { "docid": "c1915040d14f9fccbb9a14191cb074c3", "score": "0.46010506", "text": "private function __construct($class)\n {\n $this->_class = $class;\n }", "title": "" }, { "docid": "a77c223ec744b822a66ef812606ee94d", "score": "0.4600726", "text": "private function setDataConnection()\n {\n # Databse configuration.\n # Databse configuration are stored in Data Connection class.\n # Below we are using reflection class to set private property \n # of Connection class.\n $datbaseConfig = $this->configurationLoader->getConfig('database');\n $reflection = new ReflectionClass(new Connection());\n\n # Registering all defined connections to connection class.\n $this->setClassProperty($reflection->getProperty(Connection::CONNECTIONS),\n $datbaseConfig->connections);\n\n # Registering default connection to connection class.\n $this->setClassProperty($reflection->getProperty(Connection::DEFAULT_CONNECTION),\n $datbaseConfig->default);\n }", "title": "" }, { "docid": "d2664770b676cb511fe546518807fac0", "score": "0.45903262", "text": "public function setDI(\\Phalcon\\DiInterface $dependencyInjector)\n {\n $this->di = $dependencyInjector;\n return $this;\n }", "title": "" }, { "docid": "54b9619a6409588cc15f778fb02c6174", "score": "0.45847633", "text": "function set_dep() {\n\t\tif (func_num_args()) {\n\t\t\t$this->arg_list = func_get_args();\n\t\t\t$internal_module = $this->arg_list[0];\n\t\t\t$external_module = $this->arg_list[1];\n\t\t}\n\t\t$sql = \"insert into module_dependencies (module_id, req_module) \".\n\t\t\t \"values ('$internal_module','$external_module')\";\n\t\tif ($result = mysql_query($sql)) {\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "bc89b1171241223495fe058c9560e0ce", "score": "0.4583772", "text": "public function instantiate( $class, $dependencies = [] );", "title": "" }, { "docid": "04f3b52030431252ee90dd742665ff93", "score": "0.45828432", "text": "public function setup()\n {\n // type\n $this->type = isset($this->config['type']) ? strtolower($this->config['type']) : $this->type;\n\n // save value of properties if they exist\n $configKeys = array_merge(\n $this->registerConfigKeys(),\n ['cssClass', 'default', 'description', 'label', 'readOnly', 'disabled', 'required',\n 'attributes', 'options', 'size']\n );\n \n foreach ($configKeys as $key) {\n if (isset($this->config[$key])) {\n $this->{$key} = $this->config[$key];\n }\n }\n\n // css class\n $this->cssClass .= ' form-control';\n }", "title": "" }, { "docid": "0434079d6758c5a2d22ff5208b37b26d", "score": "0.4579516", "text": "public function setDependencies(Container $container)\n {\n $this->setLogger($container['logger']);\n $this->setModelFactory($container['model/factory']);\n $this->setTranslator($container['translator']);\n\n $this->debug = (bool)$container['debug'];\n\n if ($container->has('api/auth/authenticator')) {\n $this->setAuthenticator($container['api/auth/authenticator']);\n }\n }", "title": "" }, { "docid": "168048c0f757f636107acef8dad6e7ab", "score": "0.45775145", "text": "public function set($property, $val) {\n\t\t$this->setInjects[$property] = $val;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "cc8e5dfe728fae1bdb01a335e6c56cd4", "score": "0.45755404", "text": "protected function setDependencies(Container $container)\n {\n parent::setDependencies($container);\n\n $this->setDebug($container['debug']);\n $this->setTranslator($container['translator']);\n $this->setAppConfig($container['config']);\n $this->setBaseUrl($container['base-url']);\n\n $metatags = $this->appConfig('cms.metatags');\n if (is_array($metatags)) {\n $this->setSeoMetadata($metatags);\n }\n }", "title": "" }, { "docid": "d3bc4fd1b8caa2de3c70c4d55fd56a9a", "score": "0.457429", "text": "function com_propset($module, $property_name, $value) {}", "title": "" }, { "docid": "348d1a7ff5d1bd5eb62264d9198a6905", "score": "0.45674574", "text": "public static function setDefault($dependencyInjector){ }", "title": "" }, { "docid": "1a60f416da5287c876092e1448b9fbf0", "score": "0.45623773", "text": "protected function _setFromConfigurationObject()\n {\n // set protected, non static properties\n $co = static::getConfiguration();\n if ($co && $mc = $co->toArray()) {\n foreach ($mc as $property => $value) {\n $this->{$property} = $value;\n }\n }\n }", "title": "" }, { "docid": "6ef0ea6d9074f8dd948b8b5e12fca517", "score": "0.4559323", "text": "protected function setClassProperties()\n {\n $properties = array(\n 'url_force_ssl',\n 'application_path',\n 'base_url'\n );\n\n foreach ($properties as $property_name) {\n $this->setClassProperty($property_name);\n }\n\n return $this;\n }", "title": "" }, { "docid": "76b427e661bb51b335359467e249f67e", "score": "0.45589307", "text": "protected function _setForeignClass($opts)\n {\n $catalog = $this->_native_model->catalog;\n \n // a little magic\n if (empty($opts['foreign_class']) && ! empty($opts['foreign_name'])) {\n $this->foreign_name = $opts['foreign_name'];\n $opts['foreign_class'] = $catalog->getClass($this->foreign_name);\n }\n \n if (empty($opts['foreign_class'])) {\n $this->foreign_name = $opts['name'];\n $this->foreign_class = $catalog->getClass($this->foreign_name);\n } else {\n $this->foreign_class = $opts['foreign_class'];\n }\n }", "title": "" }, { "docid": "a13418ae3e1e972ab5e4db4ddcafd751", "score": "0.45588645", "text": "private function load_dependencies() {\n\n\t\t$this->loader = new Loader();\n\n\t}", "title": "" }, { "docid": "4dd422a3c076787496ec30127b2fc6a4", "score": "0.4545748", "text": "public function __construct()\n {\n $this->resolverCallbacks = [\n 'class' => function ($value) {\n $class = \\str_replace('\\\\\\\\', '\\\\', $value);\n $class = \\sprintf('%s::class', $class);\n\n return \\mb_strpos($class, '\\\\') === 0 ? $class : '\\\\' . $class;\n },\n 'integer' => function ($value) {\n return (string) $value;\n },\n 'double' => function ($value) {\n return (string) $value;\n },\n ];\n }", "title": "" }, { "docid": "dd5221dff5841bf5b4b3da9462dcc76a", "score": "0.45349714", "text": "public function __set( $property, $value )\n\t{\n\t}", "title": "" }, { "docid": "03c30bc4c6a3b771d86a37a925131b47", "score": "0.45325714", "text": "public function testConstructorBindings() {\n\t\t\t$class = new DITestClass();\n\t\t\t$injector = new DependencyInjector(DependencyInjector::DEFAULT_FLAGS, [$class], [\n\t\t\t\t\"ITestInterfaceOfDoom\" => \"DITestClass\"\n\t\t\t]);\n\n\t\t\t$component = $injector->getComponent(\"ITestInterfaceOfDoom\");\n\t\t\t$this->assertEquals($class->getID(), $component->getID(), \"Injector did not provide the correct bound instance.\");\n\n\t\t\tunset($injector, $class);\n\t\t}", "title": "" }, { "docid": "177ff3108ead3befb68e370035b925a9", "score": "0.45320368", "text": "public static function setProperty(object|string $class, string $name, mixed $value): void\n {\n $property = static::findProperty((is_object($class) ? get_class($class) : $class), $name);\n $property->setValue(is_object($class) ? $class : null, $value);\n }", "title": "" }, { "docid": "fd330e0ea217af0c080028f0e8ed05c5", "score": "0.4530525", "text": "private function _setDependencies($configuration)\n\t{\n\t\tif(isset($configuration['dependencies']['factories']))\n\t\t{\n\t\t\tforeach($configuration['dependencies']['factories'] as $className => $factoryName)\n\t\t\t{\n\t\t\t\t$this->setFactory($className, $factoryName);\n\t\t\t}\n\t\t}\n\t\tif(isset($configuration['dependencies']['invokables']))\n\t\t{\n\t\t\tforeach($configuration['dependencies']['invokables'] as $interface => $implementation)\n\t\t\t{\n\t\t\t\t$this->setInvokable($interface, $implementation);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "ffb74ef7a4dc19341ba8f48014824223", "score": "0.4517095", "text": "public function setConnectionWrapperClass(string $class): void\n {\n $this->wrapper = $class;\n }", "title": "" }, { "docid": "705a3590a87df30e7ef667553372b219", "score": "0.451648", "text": "public function setDep($dep)\n {\n $this->dep = $dep;\n\n return $this;\n }", "title": "" }, { "docid": "c10bf2a14db14a7b0ee9c2a738746364", "score": "0.45162433", "text": "public function testGetProperty(): void\n {\n $this->class->setProperty($this->value);\n\n self::assertSame($this->value, $this->class->getProperty());\n }", "title": "" }, { "docid": "3a593cbb6efc4de76b2023f8b7afd38b", "score": "0.4506655", "text": "function com_set($module, $property_name, $value) {}", "title": "" }, { "docid": "87938e46f11e74899057c1ee505c6f4c", "score": "0.45058563", "text": "public function init()\n {\n extract($this->data);\n if ($shadow) {\n $this->data['classList'][] = $this->getBaseClass('shadow', true);\n }\n }", "title": "" }, { "docid": "3f7eb56430b3bf32a861d4c6ca16898d", "score": "0.44984525", "text": "public function setReflector(string|object $class)\n {\n $this->reflector = new ReflectionClass($class);\n\n return $this;\n }", "title": "" } ]
10aaf9b3852e6f81d8681f37ba31ad17
/================================================ 1. Lay thong cua node bi xoa /================================================
[ { "docid": "e36e09d98ec6778609a19ee26c1b1ac0", "score": "0.0", "text": "protected function removeBranch(){\n\t\t$infoNodeRemove = $this->getNodeInfo($this->_id);\n\n\t\tif(!empty($infoNodeRemove)) {\n\t\t\t$this->_project_id = $infoNodeRemove['project_id'];\n\t\t\t/*================================================\n\t\t\t * 2. Tinh chieu dai cua nhanh chung muon xoa\n\t\t\t/*================================================*/\n\t\t\t$widthNodeRemove = $this->widthNode($infoNodeRemove['lft'], $infoNodeRemove['rgt']);\n\t\t\t\n\t\t\t/*================================================\n\t\t\t * 3. Xoa nhanh\n\t\t\t/*================================================*/\n\t\t\t$sqlDelete = 'DELETE FROM ' .$this->db->dbprefix($this->_table) . '\n\t\t\t\t\t\t WHERE lft BETWEEN ' . $infoNodeRemove['lft'] . ' AND ' . $infoNodeRemove['rgt'] . ' AND project_id = ' . $this->_project_id;\n\t\t\n\t\t\t$this->db->query($sqlDelete);\n\t\t\t\n\t\t\t/*================================================\n\t\t\t * 4. Cap nhat lai cai gia tri left - right của cay\n\t\t\t/*================================================*/\n\t\t\t$sqlUpdateLeft = ' UPDATE ' . $this->db->dbprefix($this->_table) . '\n\t\t\t\t\t\t\t SET lft = (lft - ' . $widthNodeRemove . ')\n\t\t\t\t\t\t\t WHERE lft > ' . $infoNodeRemove['rgt'] . ' AND project_id = '. $this->_project_id;\n\t\t\t\n\t\t\t$this->db->query($sqlUpdateLeft);\n\t\n\t\t\t$sqlUpdateRight = ' UPDATE ' . $this->db->dbprefix($this->_table) . '\n\t\t\t\t\t\t\t\tSET rgt = (rgt - ' . $widthNodeRemove . ')\n\t\t\t\t\t\t\t\tWHERE rgt > ' . $infoNodeRemove['rgt'] . ' AND project_id = ' . $this->_project_id;\n\t\t\t\n\t\t\t$this->db->query($sqlUpdateRight);\n\t\t}\n\t\n\t}", "title": "" } ]
[ { "docid": "af0ad88193fe9f57363da07aff9d8bf9", "score": "0.603145", "text": "public function node();", "title": "" }, { "docid": "0563e55a1c40adb84b398e083e1ad3eb", "score": "0.58318657", "text": "function e_node ($node_id) {\n if (! $node_id) return \"\";\n return l_node_t($node_id,$node_id);\n}", "title": "" }, { "docid": "efdd4bde0fcf631aa60411ca640a628c", "score": "0.5799468", "text": "public abstract function getNode();", "title": "" }, { "docid": "b05327b591472aa0b4e636ab2112e619", "score": "0.57264656", "text": "public function getNode();", "title": "" }, { "docid": "b05327b591472aa0b4e636ab2112e619", "score": "0.57264656", "text": "public function getNode();", "title": "" }, { "docid": "e90296f4a7219ca635ae31672a5428df", "score": "0.5704511", "text": "function node()\n {\n view_plain(\"gps/gps_node\",null);\n }", "title": "" }, { "docid": "1e7916e9ddfdefb4eecfdc6b035c439e", "score": "0.56673497", "text": "function createTreeNode($db, $idPadre, Compuesto $nodoPadre)\n{\n $sql = \"select distinct(tree.hijo_id), fuentes.nombre,fuentes.active from crm_fuentes_arbol as tree,\n crm_fuentes as fuentes where tree.hijo_id=fuentes.fuente_id and tree.padre_id='$idPadre';\";\n $result = $db->sql_query($sql);\n if($db->sql_numrows($result) == 0)\n return null;\n else\n { \n while(list($idFuente, $nombreFuente,$active) = $db->sql_fetchrow($result))\n {\n $nodo = new Compuesto($idFuente, $nombreFuente,$active);\n $nodoPadre->agregar($nodo); \n createTreeNode($db, $idFuente, $nodo);\n } \n }\n}", "title": "" }, { "docid": "6a09629233a76d9478ceedbb6fb5538d", "score": "0.56516075", "text": "public function putInfoForNodes() {\n// foreach ($this->nodes as $node) {\n// foreach ($this->edges as $edge) {\n// if ($edge->getNodeFrom() === $node) {\n// $array = $node->getNextNodes();\n// array_push($array, $edge->getNodeTo());\n// $node->setNextNodes($array);\n// $edge->setNodeFrom($node);\n// $node->setCapacity($node->getCapacity() + $edge->getCapacity());\n// }\n// if ($edge->getNodeTo() === $node) {\n// $array = $node->getPrevNodes();\n// array_push($array, $edge->getNodeFrom());\n// $node->setPrevNodes($array);\n// $edge->setNodeTo($node);\n// }\n// }\n// }\n foreach ($this->edges as $edge) {\n $node_from = $edge->getNodeFrom();\n $node_to = $edge->getNodeTo();\n foreach ($this->nodes as $node) {\n if ($node_from->equals($node)) {\n $array = $node->getNextNodes();\n array_push($array, $node_to);\n $node->setNextNodes($array);\n $node->setCapacity($node->getCapacity() + $edge->getCapacity());\n }\n if ($node_to->equals($node)) {\n $array = $node->getPrevNodes();\n array_push($array, $node_from);\n $node->setPrevNodes($array);\n }\n }\n }\n }", "title": "" }, { "docid": "97b1f757d155d452b4e9b47f5c0a116b", "score": "0.5633373", "text": "function __construct(){\n $this->nodes = array();\n }", "title": "" }, { "docid": "5cac93b53f01662624302b413ece668b", "score": "0.5578821", "text": "function clleague_node_info() {\n\t//Define our node content type.\n\treturn array(\n\t\t'league' => array(\n\t\t\t'name' => 'Cityleague',\n\t\t\t'base' => 'league',\n\t\t\t'description' => 'A cityleague.',\n\t\t\t'locked' => TRUE,\n\t\t),\n\t);\n}", "title": "" }, { "docid": "64a0a9a5450b8e3a463aee5c5e441db3", "score": "0.55021214", "text": "private function processBoard(Node $node){\n\t\t// cek kondisi sebelumnya is null\n\t\tif(!$node->isExists()){ //board null\n\t\t\t\n\t\t\t// kalau sequence pertama, maka insert; gausah cek data sebelumnya dulu;\n\t\t\tif ($node->isFirstSequence() ) {\n\t\t\t\t// langsung input;\n\t\t\t\t$node->setStatus('IN');\n\t\t\t\t$node->setJudge('OK');\n\t\t\t\tif(!$node->save()){\n\t\t\t\t\t// throw new StoreResourceFailedException(\"Error Saving Progress\", [\n\t\t\t\t\tthrow new StoreResourceFailedException(\"Terjadi Error Ketika Menyimpan Progress\", [ //Ario 20180915\n\t\t\t\t\t\t'message' => '172 : something went wrong with save method on model! ask your IT member'\n\t\t\t\t\t]);\n\t\t\t\t};\n\n\t\t\t\t//$this->returnValue['node'] = $node;\n\t\t\t\t$this->returnValue['line_code'] = 100;\n\t\t\t\t$this->returnValue['message'] = $node->getDummyId() .' : '. $node->getStatus() . ' / ' . $node->getJudge() ;\n\n\t\t\t\treturn $this->returnValue;\n\t\t\t}\n\n\t\t\t$prevNode = $node->prev();\n\n\t\t\tif( $prevNode->getStatus() == 'OUT' ){\n\t\t\t\t// if it's rework, then judgment will get rework instead;\n\t\t\t\t\n\t\t\t\tif(($prevNode->getJudge() != 'SOLDER') && ($node->is_solder == true)){\n\t\t\t\t\tthrow new StoreResourceFailedException(\"HAPUS CHECKLIST SOLDER !!!\", [\n\t\t\t\t\t\t// 'message' => 'Scan in this process',\n\t\t\t\t\t\t'message' => '192 Scan in this process',\n\t\t\t\t\t\t'prevNode' => json_decode( $prevNode, true )\n\t\t\t\t\t]);\n\t\t\t\t}\n\n\t\t\t\t$judgement = 'OK';\n\t\t\t\t// we not sure if it calling prev() twice or not, hopefully it's not;\n\t\t\t\tif($prevNode->getJudge() == 'NG'){ \n\t\t\t\t\t// kalau dia NG\n\t\t\t\t\t// cek di table repair, ada engga datanya.\n\t\t\t\t\tif( !$prevNode->isRepaired()){ //kalau ga ada, masuk sini\n\t\t\t\t\t\t// kalau ga ada, maka throw error data is NG in prev stages! repair it first!\n\t\t\t\t\t\tthrow new StoreResourceFailedException(\"DATA \". $prevNode->getDummyId() .\" ERROR DI PROSES SEBELUMNYA!\", [\n\t\t\t\t\t\t\t'prevnode' => json_decode( $prevNode, true),\n\t\t\t\t\t\t\t'node' => json_decode( $prevNode->next(), true) \n\t\t\t\t\t\t]);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$judgement = 'REWORK';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$node = $prevNode->next();\n\t\t\t\t$node->setStatus('IN');\n\t\t\t\t$node->setJudge($judgement);\n\t\t\t\tif(!$node->save()){\n\t\t\t\t\t// throw new StoreResourceFailedException(\"Error Saving Progress\", [\n\t\t\t\t\tthrow new StoreResourceFailedException(\"Terjadi Error Ketika Menyimpan Progress\", [ //Ario 20180915\t\n\t\t\t\t\t\t'message' => '219 something went wrong with save method on model! ask your IT member'\n\t\t\t\t\t]);\n\t\t\t\t};\n\t\t\t\t//$this->returnValue['node'] = $node;\n\n\t\t\t\t$this->returnValue['line_code'] = 131;\n\t\t\t\t$this->returnValue['message'] = $node->getDummyId() .' : '. $node->getStatus() . ' / ' . $node->getJudge() ;\n\n\t\t\t\treturn $this->returnValue;\n\t\t\t}\n\n\t\t\tif( $prevNode->getStatus() == 'IN' ){\n\t\t\t\t// error handler\n\t\t\t\tif($prevNode->getModelType() !== 'board'){\n\t\t\t\t\t$step = ( is_null($prevNode->getLineprocess()) ) ? '': $prevNode->getLineprocess()['name'];\n\t\t\t\t\tthrow new StoreResourceFailedException(\"DATA BELUM DI SCAN OUT DI PROSES SEBELUMNYA. ( \".$step.\" )\", [\n\t\t\t\t\t\t'message' => '235 bukan board',\n\t\t\t\t\t\t'prevNode' => json_decode( $prevNode, true )\n\t\t\t\t\t]);\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t* cek logic below, I think we don't record the is solder in db;\n\t\t\t\t* it's mean it will always return false;\n\t\t\t\t*/\n\n\t\t\t\t\n\t\t\t\tif(($prevNode->isExists('IN','SOLDER')) && ( $node->is_solder == false)){ //cek data solder dengan status out\n\t\t\t\t\tthrow new StoreResourceFailedException(\"DATA BELUM DI SCAN OUT DI PROSES SEBELUMNYA. ( SOLDER )\", [\n\t\t\t\t\t\t'message' => '248 SCAN OUT SOLDER',\n\t\t\t\t\t\t'prevNode' => json_decode( $prevNode, true )\n\t\t\t\t\t]); \n\t\t\t\t};\n\n\t\t\t\t// cek apakah solder atau bukan\n\t\t\t\tif (!$prevNode->is_solder) { //jika solder tidak diceklis, maka\n\t\t\t\t\t$step = ( is_null($prevNode->getLineprocess()) ) ? '': $prevNode->getLineprocess()['name'];\n\t\t\t\t\tthrow new StoreResourceFailedException(\"DATA BELUM DI SCAN OUT DI PROSES SEBELUMNYA. ( \".$step.\" )\", [\n\t\t\t\t\t\t'message' => '257 bukan solder',\n\t\t\t\t\t\t'node' => json_decode( $prevNode, true )\n\t\t\t\t\t]); \n\t\t\t\t}\n\n\t\t\t\tif($prevNode->isExists('OUT','SOLDER')){ //cek data solder dengan status out\n\t\t\t\t\tthrow new StoreResourceFailedException(\"DATA SOLDER SUDAH SCAN OUT!\", [\n\t\t\t\t\t\t'prevNode' => json_decode( $prevNode, true )\n\t\t\t\t\t]); \n\t\t\t\t};\n\n\t\t\t\t\n\n\t\t\t\t$node = $prevNode->next();\n\t\t\t\t$node->setStatus('OUT');\n\t\t\t\t$node->setJudge('SOLDER');\n\t\t\t\tif(!$node->save()){\n\t\t\t\t\t// throw new StoreResourceFailedException(\"Error Saving Progress\", [\n\t\t\t\t\tthrow new StoreResourceFailedException(\"Terjadi Error Ketika Menyimpan Progress\", [ //Ario 20180915\n\t\t\t\t\t\t'message' => '276 something went wrong with save method on model! ask your IT member'\n\t\t\t\t\t]);\n\n\t\t\t\t};\n\t\t\t\t//$this->returnValue['node'] = $node;\n\t\t\t\t$this->returnValue['line_code'] = 176;\n\t\t\t\t$this->returnValue['message'] = $node->getDummyId() .' : '. $node->getStatus() . ' / ' . $node->getJudge() ;\n\n\t\t\t\treturn $this->returnValue;\n\t\t\t}\n\n\t\t\t// jika get status bukan in atau out maka throw error\n\t\t\t$step = ( is_null($prevNode->getLineprocess()) ) ? '': $prevNode->getLineprocess()['name'];\n\t\t\tthrow new StoreResourceFailedException(\"DATA BELUM DI SCAN IN DI PROSES SEBELUMNYA. ( \".$step.\" )\", [\n\t\t\t\t'node' => json_decode( $prevNode, true )\n\t\t\t]);\n\t\t}\n\n\t\t// disini node sudah exists\n\t\tif($node->getStatus() == 'OUT'){\n\t\t\tif($node->is_solder == false){\n\t\t\t\t// cek current judge\n\t\t\t\tif($node->getJudge() != 'REWORK'){\n\t\t\t\t\tif($node->isRepaired()){\n\t\t\t\t\t\t$node->setStatus('IN');\n\t\t\t\t\t\t$node->setJudge('REWORK');\n\t\t\t\t\t\tif(!$node->save()){\n\t\t\t\t\t\t\t// throw new StoreResourceFailedException(\"Error Saving Progress\", [\n\t\t\t\t\t\t\tthrow new StoreResourceFailedException(\"Terjadi Error Ketika Menyimpan Progress\", [ //Ario 20180915\t\n\t\t\t\t\t\t\t\t'message' => '305 something went wrong with save method on model! ask your IT member'\n\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this->returnValue['line_code'] = 278;\n\t\t\t\t\t\t$this->returnValue['message'] = $node->getDummyId() .' : '. $node->getStatus() . ' / ' . $node->getJudge() ;\n\n\t\t\t\t\t\treturn $this->returnValue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif($node->getJudge() == 'OK'){\n\t\t\t\t\tthrow new StoreResourceFailedException(\"DATA '\".$node->getDummyId().\"' SUDAH DI SCAN OUT DI PROSES INI!\", [\n\t\t\t\t\t\t'node' => json_decode( $node, true ),\n\t\t\t\t\t]);\n\t\t\t\t}\n\n\t\t\t\t// kalau status skrg out & judge solder, itu artinya blm scan in proses terkini;\n\t\t\t\tif($node->getJudge() == 'SOLDER'){\n\t\t\t\t\t$node->setStatus('IN');\n\t\t\t\t\t$node->setJudge('OK');\n\t\t\t\t\tif(!$node->save()){\n\t\t\t\t\t\t// throw new StoreResourceFailedException(\"Error Saving Progress\", [\n\t\t\t\t\t\tthrow new StoreResourceFailedException(\"Terjadi Error Ketika Menyimpan Progress\", [\t//Ario 20180915\n\t\t\t\t\t\t\t'message' => '329 something went wrong with save method on model! ask your IT member'\n\t\t\t\t\t\t]);\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->returnValue['line_code'] = 307;\n\t\t\t\t\t$this->returnValue['message'] = $node->getDummyId() .' : '. $node->getStatus() . ' / ' . $node->getJudge() ;\n\n\t\t\t\t\treturn $this->returnValue;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\n\t\t\t//isExists already implement is solder, so we dont need to check it again.\n\t\t\t//if the code goes here, we save to immediately save the node;\n\t\t\tif($node->getJudge() == 'SOLDER'){\n\t\t\t\tthrow new StoreResourceFailedException(\"DATA '\".$node->getDummyId().\"' SUDAH SCAN OUT SOLDER!!\", [\n\t\t\t\t\t'node' => json_decode($node, true )\n\t\t\t\t]);\n\t\t\t}\n\n\t\t\tif($node->isExists('OUT', 'SOLDER')){\n\t\t\t\tthrow new StoreResourceFailedException(\"DATA '\".$node->getDummyId().\"' SUDAH SCAN OUT SOLDER!!\", [\n\t\t\t\t\t'MESSAGE' => 'DATA SUDAH SCAN OUT SOLDER DISINI DAN SUDAH IN OUT OK ',\n\t\t\t\t\t'node' => json_decode($node, true ),\n\n\t\t\t\t]);\n\t\t\t}\n\n\t\t\t$node->setStatus('IN');\n\t\t\t$node->setJudge('SOLDER');\n\t\t\tif(!$node->save()){\n\t\t\t\t// throw new StoreResourceFailedException(\"Error Saving Progress\", [\n\t\t\t\tthrow new StoreResourceFailedException(\"Error Saving Progress\", [ //Ario 20180915 \t\n\t\t\t\t\t'message' => '361 something went wrong with save method on model! ask your IT member'\n\t\t\t\t]);\n\t\t\t}\n\t\t\t//$this->returnValue['node'] = $node;\n\n\t\t\t$this->returnValue['line_code'] = 205;\n\t\t\t$this->returnValue['message'] = $node->getDummyId() .' : '. $node->getStatus() . ' / ' . $node->getJudge() ;\n\n\t\t\treturn $this->returnValue;\n\t\t}\n\n\t\t// return $node->getStatus();\n\t\tif($node->getStatus() == 'IN'){\n\n\t\t\t$currentStep = $node->getStep();\n\t\t\t// if( ($node->is_solder == true) && ($node->getJudge() == 'SOLDER' ) ){\n\t\t\t// \tthrow new StoreResourceFailedException(\"DATA '\".$node->getDummyId().\"' SUDAH SCAN IN SOLDER! SCAN OUT SOLDER DENGAN SCANNER BERIKUTNYA!\",[\n\t\t\t// \t\t'message' => 'SCAN SOLDER DENGAN PROSES BERIKUTNYA'\n\t\t\t// \t]);\n\t\t\t// }\n\n\t\t\tif( ($node->is_solder) ){\n\t\t\t\t\n\t\t\t\tif($node->getJudge() == 'SOLDER'){\n\t\t\t\t\tthrow new StoreResourceFailedException(\"DATA '\".$node->getDummyId().\"' SUDAH SCAN IN SOLDER! SCAN OUT SOLDER DENGAN SCANNER BERIKUTNYA!\",[\n\t\t\t\t\t\t'message' => 'SCAN SOLDER DENGAN PROSES BERIKUTNYA'\n\t\t\t\t\t]);\n\t\t\t\t}\n\t\t\t\tif( $node->getJudge() != 'SOLDER' ){\n\t\t\t\t\tthrow new StoreResourceFailedException(\"HAPUS CHECKLIST SOLDER UNTUK SCAN OUT PROSES SAAT INI !!\",[\n\t\t\t\t\t\t'message' => 'SCAN OUT PROCESS SAAT INI'\n\t\t\t\t\t]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($node->getJudge() == 'SOLDER'){\n\t\t\t\tthrow new StoreResourceFailedException(\"DATA '\".$node->getDummyId().\"' SUDAH SCAN OUT, LANJUTKAN PROSES BERIKUTNYA.\",[\n\t\t\t\t\t'message' => 'NEXT PROSES'\n\t\t\t\t]);\n\t\t\t}\t\n\t\t\t// we need to count how long it is between now and step->created_at\n\t\t\tif( !$this->isMoreThanStdTime($currentStep)){\n\t\t\t\t// belum mencapai std time\n\t\t\t\tthrow new StoreResourceFailedException(\"DATA SUDAH '\".$node->getDummyId().\"' SCAN IN! AND HARUS TUNGGU \". $currentStep['std_time'].\" DETIK\", [\n\t\t\t\t\t'message' => 'you scan within std time '. $currentStep['std_time']. ' try it again later'\n\t\t\t\t]);\n\t\t\t}\n\n\t\t\t// disini kita harus ikut update status dari child node; jika ini adalah proses join;\n\t\t\t// save\n\t\t\t$node->setStatus('OUT');\n\t\t\t// it's mean to get current in process judgement, so when it's rework; it'll get rework\n\n\t\t\t$node->setJudge($node->getJudge());\n\t\t\tif(!$node->save()){\n\t\t\t\tthrow new StoreResourceFailedException(\"Error Saving Progress\", [\n\t\t\t\t\t'message' => 'something went wrong with save method on model! ask your IT member'\n\t\t\t\t]);\n\t\t\t}\n\n\t\t\t// updateChildren hanya akan ter trigger ketika join saja;\n\t\t\t// method ini berfungsi untuk update board yg di scan skali, kemudian masuk ke dalam set;\n\t\t\t// board tsb tdk di scan langsung oleh user, melainkan di insert ketika parent nya di scan out pada proses \n\t\t\t// join;\n\t\t\t$node->updateChildren();\n\n\t\t\t$this->returnValue['line_code'] = 239;\n\t\t\t$this->returnValue['message'] = $node->getDummyId() .' : '. $node->getStatus() . ' / ' . $node->getJudge() ;\n\t\t\t\n\t\t\treturn $this->returnValue;\n\t\t}\n\t}", "title": "" }, { "docid": "76586284ff623aa584eaa8627ecab898", "score": "0.54894507", "text": "private function save_node_data()\n {\n\n\n $osm_obj = json_decode($this->query_all_node_data(self::BBOX_SS));\n\n $nodes = $osm_obj->elements;\n\n\n foreach($nodes as $node)\n {\n $restaurante = 'restaurante';\n $cafeteria = 'cafeteria';\n $comida_rapida = 'comida rapida';\n\n $bar = new Bar();\n $bar->node = $node->id;\n\n// if(isset($node->tags))\n// $this->mix_remaining_tags($node);\n//\n\n if(isset($node->tags))\n {\n\n if(isset($node->tags->name))\n {\n $bar->name = $node->tags->name;\n }\n else\n {\n $bar->name = 'no name';\n }\n\n\n $amenity = $node->tags->amenity;\n\n if($amenity == 'restaurant' )\n {\n $bar->amenity_es = $restaurante;\n }\n if($amenity == 'cafe' )\n {\n $bar->amenity_es = $cafeteria;\n }\n if($amenity == 'fast_food' )\n {\n $bar->amenity_es = $comida_rapida;\n }\n\n if($amenity == 'bar' )\n {\n $bar->amenity_es = $amenity;\n }\n\n $bar->amenity= $amenity;\n\n\n if(isset($node->tags->description))\n {\n $bar->description = $node->tags->description;\n }\n\n if(isset($node->tags->description_1))\n {\n $bar->description_1 = $node->tags->description_1;\n }\n print_r($node->id . \" [OK]\" . \"\\n\");\n\n $bar->all_tags = $this->mix_remaining_tags($node);\n\n\n $bar->save();\n }\n\n }\n\n }", "title": "" }, { "docid": "b76b885a49ed6c462b6339704d7f8f96", "score": "0.54784995", "text": "function expandNode($nid, $rid, $lang) {\n $request = Vostan::getInstance() -> request();\n $body = $request -> getBody();\n $input = json_decode($body);\n\n try {\n $db = getConnection();\n\n $sql0 = \"SELECT nodeID as nID from links where linkedNodeID = :nid \n UNION\n Select linkedNodeID as nID from links where nodeID = :nid;\";\n\n $sql = \"INSERT OR IGNORE INTO settings (\n nodeID, \n linkedNodeID, \n top, \n left,\n width,\n height,\n imgWidth,\n imgHeight,\n imgLeft,\n imgTop,\n titleWidth,\n titleHeight,\n titleLeft,\n titleTop,\n txtWidth,\n txtHeight,\n txtLeft,\n txtTop,\n titleInclude,\n imgInclude,\n txtInclude,\n leaf, \n carousel, \n modified)\n SELECT :rid, \n nodeID,\n top, \n left,\n width,\n height,\n imgWidth,\n imgHeight,\n imgLeft,\n imgTop,\n titleWidth,\n titleHeight,\n titleLeft,\n titleTop,\n txtWidth,\n txtHeight,\n txtLeft,\n txtTop,\n titleInclude,\n imgInclude,\n txtInclude,\n leaf,\n carousel, \n date()\n FROM settings where nodeID = :nid AND linkedNodeID = :nid; \";\n\n $stmt = $db -> prepare($sql0);\n $stmt -> bindParam(\"nid\", $nid);\n $stmt -> execute();\n $input = $stmt -> fetchAll(PDO::FETCH_OBJ);\n foreach ($input as $key => $item) {\n $nidToAdd = $item -> nID;\n $stmt = $db -> prepare($sql);\n $stmt -> bindParam(\"rid\", $rid);\n $stmt -> bindParam(\"nid\", $nidToAdd);\n $stmt -> execute();\n }\n\n $db = null;\n\n getMap($rid, $lang);\n //echoResponse('{\"root\":' . $rid . '}');\n } catch(PDOException $e) {\n echoResponse('{\"error\":{\"appendNode\":\"' . $e -> getMessage() . '\"}}');\n }\n}", "title": "" }, { "docid": "d3b446aa30087b37b84bb5c8411f065e", "score": "0.5450135", "text": "function print_osm_nodes($limit)\n{\n\t$fileOsm=dirname(__DIR__).'/../files/osm/database.osm';\n\n\t$nodes = get_intersections($limit);\n\n\tforeach ($nodes as $node) \n\t{\n\t\t//var_dump($node['idosm']);\n\t\t$line = \"<node id='\".$node['idosm'].\"' lat='\".$node['lat'].\"' lon='\".$node['lon'].\"'/>\";\n\t\tappend_to_file($fileOsm, $line);\n\t}\n}", "title": "" }, { "docid": "f80f7c9bc9ba05a85485494285740784", "score": "0.54248375", "text": "public function buildNodes()\n {\n \n $this->nodes = array\n (\n 'new' => array\n (\n 'label' => 'New',\n 'order' => 1,\n 'icon' => 'process/new.png',\n 'color' => 'default',\n 'phase' => '',\n 'description' => 'New',\n\n ),\n\n );\n\n }", "title": "" }, { "docid": "31167ce2c5b0aab7e40dcd58d701337b", "score": "0.54202974", "text": "function nodo2array($nodo)\r\n{\n //echo 'entre a nodo2array (comun.php) <br>';mio\r\n $arrayNodo = array();\r\n $arrayNodo['nombre'] = nodoGetName($nodo);\r\n $arrayNodo['atributos'] = array();\r\n foreach($nodo->attributes() as $nombre => $valor) {\n //echo 'entre al 1º foreach de nodo2array (comun.php) <br>';mio\r\n $arrayNodo['atributos'][$nombre] = (string) $valor;\r\n }\r\n $arrayNodo['hijos'] = array();\r\n foreach ($nodo->children() as $nodoHijo) {\n //echo 'entre al 2º foreach de nodo2array (comun.php) <br>';mio\r\n $arrayHijo = nodo2Array($nodoHijo);\r\n array_push($arrayNodo['hijos'], $arrayHijo);\r\n }\r\n return $arrayNodo;\r\n}", "title": "" }, { "docid": "74d17584c324d8fe7517f737b72b1ca4", "score": "0.5398311", "text": "function addNode($nid, $rid, $lang) {\n $request = Vostan::getInstance() -> request();\n $txt = $request -> params('attrs');\n $body = $request -> getBody();\n $input = json_decode($body);\n try {\n $db = getConnection();\n\n $sql1 = \"SELECT max(nodeID) FROM nodes;\";\n $stmt = $db -> prepare($sql1);\n $stmt -> execute();\n $max_id_db = $stmt -> fetch(PDO::FETCH_NUM);\n $max_id_db = $max_id_db[0];\n $max_id = $max_id_db + 1;\n\n $sql2 = \"\";\n if ($lang == \"en\") {\n $lang = \"\";\n $sql2 = \"insert into nodes (nodeID, title, img, txt, modified, script, tags, users, viewers) values ($max_id, :title, :img, :txt, date(), :script, :tags, :users, :viewers)\";\n } else {\n $lang = \"_$lang\";\n $sql2 = \"insert into nodes (nodeID, title, img, txt$lang, modified, script, tags$lang, users, viewers, title$lang) values ($max_id, 'New Node', :img, :txt, date(), :script, :tags, :users, :viewers, :title)\";\n }\n $stmt = $db -> prepare($sql2);\n $stmt -> bindParam(\"title\", $input -> title);\n $stmt -> bindParam(\"img\", $input -> img);\n $stmt -> bindParam(\"txt\", $input -> txt);\n $stmt -> bindParam(\"script\", $input -> script);\n $stmt -> bindParam(\"tags\", $input -> tags);\n $stmt -> bindParam(\"users\", $input -> users);\n $stmt -> bindParam(\"viewers\", $input -> viewers);\n $stmt -> execute();\n\n $sql3 = \"insert into settings (nodeID, linkedNodeID, top, left, titleHeight, modified,titleInclude, imgInclude ,txtInclude, leaf)\n values ($max_id, $max_id, 300, 300, 40, date(), :titleInclude, :imgInclude, :txtInclude, :leaf);\";\n $stmt = $db -> prepare($sql3);\n $stmt -> bindParam(\"titleInclude\", $input -> titleInclude);\n $stmt -> bindParam(\"imgInclude\", $input -> imgInclude);\n $stmt -> bindParam(\"txtInclude\", $input -> txtInclude);\n $stmt -> bindParam(\"leaf\", $input -> leaf);\n $stmt -> execute();\n\n $sql4 = \"insert into settings (nodeID, linkedNodeID, top, left, titleHeight, modified,titleInclude, imgInclude ,txtInclude, leaf)\n values ($max_id, :rid, 10, 10, 40, date(), :titleInclude, :imgInclude, :txtInclude, :leaf); \";\n $stmt = $db -> prepare($sql4);\n $stmt -> bindParam(\"titleInclude\", $input -> titleInclude);\n $stmt -> bindParam(\"imgInclude\", $input -> imgInclude);\n $stmt -> bindParam(\"txtInclude\", $input -> txtInclude);\n $stmt -> bindParam(\"leaf\", $input -> leaf);\n $stmt -> bindParam(\"rid\", $rid);\n $stmt -> execute();\n\n $sql5 = \"insert into settings (nodeID, linkedNodeID, top, left, titleHeight, modified,titleInclude, imgInclude ,txtInclude, leaf, carousel)\n values (:rid, $max_id, 10, 10, 40, date(), :titleInclude, :imgInclude, :txtInclude, :leaf,:carousel); \";\n $stmt = $db -> prepare($sql5);\n $stmt -> bindParam(\"titleInclude\", $input -> titleInclude);\n $stmt -> bindParam(\"imgInclude\", $input -> imgInclude);\n $stmt -> bindParam(\"txtInclude\", $input -> txtInclude);\n $stmt -> bindParam(\"leaf\", $input -> leaf);\n $stmt -> bindParam(\"carousel\", $input -> carousel);\n $stmt -> bindParam(\"rid\", $rid);\n $stmt -> execute();\n\n echoResponse('{\"root\":' . $rid . ', \"node\": ' . $max_id . '}');\n } catch(PDOException $e) {\n echoResponse('{\"error\":{\"addNode\":\"' . $e -> getMessage() . '\"}}');\n }\n}", "title": "" }, { "docid": "760867e2fa9f71f554831241f27d6924", "score": "0.5368433", "text": "function getnodes()\n {\n\n \t$result = array();\n\n $this->model->action('navigation','getNodes',\n array('result' => & $result,\n 'fields' => array('title','id_node')));\n\n echo \"### Print all navigation nodes ###\\n\\n\";\n\n foreach($result as $node)\n {\n \techo \"id_node:\\t\" . $node['id_node'] . \"\\n\";\n \techo \"title:\\t\\t\" . $node['title'] . \"\\n\\n\";\n }\n }", "title": "" }, { "docid": "29e7b2171faf8516fb6b2ed9b01c6a49", "score": "0.53564644", "text": "function wimd_node_info() {\n return array(\n 'wimd' => array(\n 'module' => 'wimd',\n 'name' => t('wimd'),\n 'description' => t(\"A wimd of a person.\"),\n 'has_title' => true,\n 'title_label' => t('wimd of'),\n 'has_body' => true,\n 'body_label' => t('Overview'),\n \t //'module' => 'wimd',\n )\n );\n}", "title": "" }, { "docid": "856bc56e9a33e7488fe5e0a7a82aee4c", "score": "0.5332278", "text": "public function createNode($label,$params){\r\n $model = new Model();\r\n $model->newNode($label,$params);\r\n $view = new View('neighborhood.view',['model'=>$model->getAllNodes('Neighborhood')]);\r\n }", "title": "" }, { "docid": "10aef58609e21f85dcae418480ffa8d5", "score": "0.530079", "text": "function bbiLab_creadorDeChapas_crearChapas($cantidad, $tipo, $prefijo, \n $contador, $ayuntamiento, $digitoControl = NULL, \n $fechaPeticion = NULL, $fechaEnvio = NULL, $finalizadoOK = NULL, \n $idVial = NULL) {\n for ($i = 0; $i < (int)$cantidad; $i++) {\n //Hay que aumentar el contador y que tenga 5 dígitos\n $contador = bbiLab_creadorDeChapas_transformTo5Digitos((int)$contador + 1); \n $titulo = $prefijo . $contador . $digitoControl; \n \n $values = array(\n 'type' => 'chapa',\n 'uid' => 1,\n 'status' => 1,\n 'comment' => 0,\n 'promote' => 0,\n );\n $entity = entity_create('node', $values);\n $ewrapper = entity_metadata_wrapper('node', $entity); \n $ewrapper->title->set($titulo);\n if($tipo != NULL) $ewrapper->field_chapa_tipo_chapa\n ->set($tipo); \n if($prefijo != NULL) $ewrapper->field_chapa_prefijo\n ->set($prefijo); \n if($contador != NULL) $ewrapper->field_chapa_contador\n ->set($contador); \n if($digitoControl != NULL) $ewrapper->field_chapa_digito_control\n ->set($tipo); \n if($fechaPeticion != NULL) $ewrapper->field_chapa_fecha_peticion\n ->set($fechaPeticion); \n if($fechaEnvio != NULL) $ewrapper->field_chapa_fecha_envio\n ->set($fechaEnvio); \n if($finalizadoOK != NULL) $ewrapper->field_chapa_finalizado_ok\n ->set($finalizadoOK); \n if($ayuntamiento != NULL) $ewrapper->field_ayuntamiento\n ->set((int)$ayuntamiento);\n if($idVial != NULL) $ewrapper->field_chapa_vial\n ->set((int)$idVial);\n $ewrapper->save(); \n \n if(node_load($ewrapper->getIdentifier())) {\n $ayto = bbiLab_getUserById((int)$ayuntamiento);\n drupal_set_message(\"Se ha creado la chapa $titulo del ayuntamiento \"\n . \"$ayto.\", 'status');\n } else {\n drupal_set_message(\"No se ha podido crear la chapa $titulo, avise a \"\n . \"el programador...\", 'error');\n }\n }\n}", "title": "" }, { "docid": "c287edbdecd989ee6b56e924beadfd41", "score": "0.5299163", "text": "function theme_node() {\n // This function is never used; see the corresponding template file instead.\n}", "title": "" }, { "docid": "6bb5f120155ecadc5c4550484c29d8bb", "score": "0.5278485", "text": "function GetNodeContent(){}", "title": "" }, { "docid": "cc10c304c3a3ac5955c1575408e6fd48", "score": "0.5278294", "text": "public function clutchPedal()\n {\n }", "title": "" }, { "docid": "e1f6bc8a3bf7682752de8e53d806a402", "score": "0.5259767", "text": "function get_subnodes_ex($node_id=1){\n global $myDB, $glob_language;\n $node = addslashes($node);\n $query = FormatSQL(SQL_SUBNODES_EX, array($node_id, $glob_language));\n//die(\"<pre>$query</pre>\");\n $myDB->query($query);\n if ($myDB->num_rows() <= 0) {\n return -1;\n }else{\n $idx = 0;\n $done = Array();\n $subcount = 0;\n $chidx = false;\n while ($myDB->next_record()){\n if (!$done[$myDB->f(\"name\")]){\n $subcount = 0;\n $done[$myDB->f(\"name\")] = 1;\n $arr[$idx]['name'] = $myDB->f(\"name\");\n $arr[$idx]['linkto'] = $myDB->f(\"LinkTo\");\n $indexes[$myDB->f(\"name\")] = $idx;\n $idx++;\n }\n if ( ($myDB->f(\"subname\") != \"\") and ($subcount < CAT_UP_COUNT_HI) ){\n $index = $indexes[$myDB->f(\"name\")];\n $arr[$index]['subs'][$subcount]['name'] = $myDB->f(\"subname\"); \n $arr[$index]['subs'][$subcount]['linkto'] = $myDB->f(\"sub_link_to\"); \n $subcount++;\n }\n }\n reset($arr);\n return $arr;\n }\n}", "title": "" }, { "docid": "66cd8cebe3c34b49f4d4c7b8ecd80336", "score": "0.5248709", "text": "function GenerateNode($data){\n\t\t$content = '';\n\t\t$content .= \"\\t\" . '<url>' . \"\\n\";\n\t\t$content .= \"\\t\\t\" . '<loc>'.trim($data['loc']).'</loc>' . \"\\n\";\n\t\t$content .= \"\\t\\t\" . '<lastmod>'.trim($data['lastmod']).'</lastmod>' . \"\\n\";\n\t\t$content .= \"\\t\\t\" . '<changefreq>'.trim($data['changefreq']).'</changefreq>' . \"\\n\";\n\t\t$content .= \"\\t\\t\" . '<priority>'.trim($data['priority']).'</priority>' . \"\\n\";\n\t\t$content .= \"\\t\" . '</url>' . \"\\n\";\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "c65bf0b257fda044da6255bd09ae1e57", "score": "0.52307683", "text": "function vline($id, $x_pos, $tags){\n\tglobal $time, $user, $top, $bottom;\n\tprint \"\\t<node id='\".(-3*$id-1).\"' timestamp='$time' user='$user' visible='true' version='1' lat='$top' lon='$x_pos' />\\n\";\n\tprint \"\\t<node id='\".(-3*$id-2).\"' timestamp='$time' user='$user' visible='true' version='1' lat='$bottom' lon='$x_pos' />\\n\";\n print \"\\t<way id='\".(-3*$id-3).\"' timestamp='$time' user='$user' visible='true' version='1'>\\n\".\n \"\\t\\t<nd ref='\".(-3*$id-1).\"' />\\n\".\n \"\\t\\t<nd ref='\".(-3*$id-2).\"' />\\n\".\n\t\t\"\\t\\t$tags\\n\".\n \"\\t</way>\\n\";\n}", "title": "" }, { "docid": "96facce6718b9dffd987eafeff32f640", "score": "0.52273756", "text": "function get_trails($node, $from=0, $level=0){\n global $myDB;\n \n // get the Object_ID\n if (is_integer($node)){\n $path = id2path($node);\n if ($path == -1) \n return -1;\n }else\n $path = $node; \n \n $path = addslashes($path); \n if ($from != -1)\n $query = FormatSQL(SQL_DIRSTRAILL, array($path, $from));\n else\n $query = FormatSQL(SQL_DIRSTRAILU, (array)$path);\n$myDB->query($query);\nif ($myDB->num_rows() <= 0) {\n return -1;\n}else{\n $idx = 0;\n while ($myDB->next_record()){\n $hsh['path'] = $myDB->f(\"Name\");\n $hsh['id'] = $myDB->f(\"Node_ID\");\n $hsh['description'] = $myDB->f(\"Description\");\n $hsh['userid'] = $myDB->f(\"Owner\");\n $hsh['username'] = $myDB->f(\"username\");\n $hsh['useraccess'] = $myDB->f(\"UserAccess\");\n $hsh['friendaccess'] = $myDB->f(\"FriendAccess\");\n $hsh['changedate'] = $myDB->f(\"ChangeDate\");\n $hsh['adddate'] = $myDB->f(\"AddDate\");\n $hsh['hasimage'] = $myDB->f(\"HasImage\");\n $hsh['from'] = $myDB->f(\"Parent\");\n $hsh['sponsored'] = $myDB->f(\"SponsoredBy\");\n $hsh['ownernotification'] = $myDB->f(\"OwnerNotification\");\n if (!$direct){\n $hsh['points'] = $myDB->f(\"ExtraLong\")*REM_POINTS;\n $hsh['up'] = true;\n }else{\n $hsh['points'] = $myDB->f(\"ExtraLong\"); \n $hsh['up'] = false; \n }\n $arr[$idx] = $hsh;\n $idx++;\n }\n reset($arr);\n return $arr; \n}\n \n}", "title": "" }, { "docid": "5d4f1dde0d0de27458cdae69a1b12efd", "score": "0.5217365", "text": "function getinitialnode() {\n $idNode = $this->input->get('id-node');\n $parent = $this->db->query(\"SELECT * FROM member_detail WHERE id_kategori IN ('$idNode') AND parent_id IS NULL ORDER BY parent_id, member_id ASC\")->row();\n echo \"<ul>\";\n echo \"<li>\";\n echo $parent->nama;\n if (empty($this->getRatu($idNode, $parent->member_id))) {\n echo \"</li>\";\n }\n echo \"</ul>\";\n }", "title": "" }, { "docid": "bf4dda901a69f511e2a091134aa2ef59", "score": "0.521259", "text": "private function getAllNodes() {\n\n\t\t\t$lang = Session::getInstance();\n\n\n\t\t\t$nodesList = array();\n\t\t\t$sql = 'SELECT *\n\t\t\t\t\t\t\tFROM `page`\n\t\t\t\t\t\t\tWHERE `language`=\\''.$lang->getAttribute('lang').'\\'\n\t\t\t\t\t\t\tORDER BY `id_parent`,`position` ASC ';\n\t\t\t$DB = DB::getInstance();\n\t\t\t$stmt = $DB->query($sql);\n\n\t\t\tif((int)$stmt) {\n\t\t\t\tforeach ($stmt as $rs) {\n\t\t\t\t\t$parent = $rs['id_parent'];\n\t\t\t\t\t$nodesList[$parent][] = array(\t'id_page' \t\t=> $rs['id_page'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t'id_parent' \t=> $rs['id_parent'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t'name' \t\t\t=> $rs['name'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t'active' \t\t=> $rs['active'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t'position' \t\t=> $rs['position'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t'addable'\t \t=> $rs['addable'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t'deletable'\t\t=> $rs['deletable'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t'statusable'\t=> $rs['statusable'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t'renameable'\t=> $rs['renameable'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t'editable'\t \t=> $rs['editable'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t'dragable'\t\t=> $rs['dragable'] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $nodesList;\n\t\t}", "title": "" }, { "docid": "a73c93930ce17c615af0e5a3a9f56af8", "score": "0.52119607", "text": "function dlr_oa_preprocess_node(&$vars) {\n // Reordering links on node teasers and full nodes\n $links = $vars['node']->links;\n if ($links) {\n if(!$vars['logged_in']) $links['comment_forbidden'] = array('html' => 1, 'title' => '<a href=\"/user/login?destination=comment%2Freply%2F'.$vars['node']->nid.'%23comment-form\"> | Anmelden</a> um Kommentare zu schreiben');\n $links = reorder_links($links, array('comment_add', 'forward_links', 'print_pdf','upload_attachments'), array('node_read_more'));\n $attributes = array('class' => 'links');\n $vars['links'] = theme('links', $links, array('class' => 'links inline'));\n }\n \n \n \n}", "title": "" }, { "docid": "8f72e8b727c8d29b8a1ba1528f56a917", "score": "0.51927537", "text": "function node_create($data) {\r\n\t\t\treturn $this->parent->mysql->query(\"INSERT INTO cms_node (Data) VALUES ('\" . $this->parent->mysql->escape($data) . \"')\");\r\n\t\t}", "title": "" }, { "docid": "d02ccd2298524dca45cd82e6a69bc662", "score": "0.5179475", "text": "public function search($obj){\n\n\t\t\t//controllo che l'idNode passato in GET sia esistente nel DB, se non esiste lancio un eccezione\n\t\t\t$sql_check = \"select * from node_tree where idNode=?\";\n\t\t\t$stm_check = $this->db->prepare($sql_check);\n\t\t\t$stm_check->execute([$obj['node_id']]);\n\t\t\t$res_check = $stm_check->fetchAll();\n\t\t\tif(count($res_check)==0){\n\t\t\t\t$this->response = ['error' => IDNODE_NOT_VALID];\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\t//query dei conteggi, individuo i nodi figli di quello specificato e ne conto i relativi figli\n\t\t\t$sql = '\n\t\t\t\tselect b.idNode, n.NodeName, count(c.idNode) as tot\n\t\t\t\tfrom node_tree a\n\t\t\t\tjoin node_tree b\n\t\t\t\t\ton (b.ileft between a.ileft and a.iright) and (b.iright between a.ileft and a.iright)\n\t\t\t\tjoin node_tree c\n\t\t\t\t\ton (c.ileft between b.ileft and b.iright) and (c.iright between b.ileft and b.iright)\t\n\t\t\t\tjoin node_tree_names n\n\t\t\t\t\ton b.idNode=n.idNode\n\t\t\t\twhere a.idNode=:idNode\n\t\t\t\tand n.language=:language\n\t\t\t\tgroup by b.idNode, n.NodeName\n\t\t\t';\n\t\t\t\n\t\t\t//nel caso passassi anche il parametro search_keyword, filtro ulteriormente i nodi figli\n\t\t\tif(array_key_exists('search_keyword', $obj) && $obj['search_keyword']!=\"\"){\n\t\t\t\t$sql .= \"and NodeName like :nodeName\";\n\t\t\t}\n\n\t\t\t//faccio il bind dei parametri nella query da ciò che ricevo in GET\n\t\t\t$stm = $this->db->prepare($sql);\n\t\t\t$stm->bindValue('idNode', $obj['node_id']);\n\t\t\t$stm->bindValue('language', $obj['language']);\n\t\t\tif(array_key_exists('search_keyword', $obj) && $obj['search_keyword']!=\"\"){\n\t\t\t\t$stm->bindValue('nodeName', $obj['search_keyword']);\n\t\t\t}\n\n\t\t\t//eseguo la query, in caso di errore fermo tutto\n\t\t\t$stm->execute() or die(var_dump($stm->errorInfo()));\n\t\t\t$res = $stm->fetchAll();\n\n\t\t\t//se ottengo dei record ma vogio far vedere un numero di risultati maggiore di quelli disponibili nella query\n\t\t\t//lancio l'errore\n\t\t\tif(count($res)>0 && intval($obj['page_size'])>count($res)){\n\t\t\t\t$page_size_not_valid = PAGE_SIZE_NOT_VALID;\n\t\t\t\t$this->response = ['error' => $page_size_not_valid];\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\t//nel caso passassi questi parametri li uso per estrarre solo la porzione desiderata del risultato\n\t\t\t$start = $obj['page_num']*$obj['page_size'];\n\t\t\t$end = $start+$obj['page_size'] > count($res) ? count($res) : $start+$obj['page_size'];\n\n\t\t\t$res = array_slice($res, $start, $obj['page_size']);\n\n\t\t\t//calcolo l'eventuale numero di pagina precedente\n\t\t\t$prev_page = $obj['page_num']>0 ? $obj['page_num']-1 : 0;\n\t\t\tif($prev_page>=0){\n\t\t\t\t$this->response['prev_page'] = $prev_page;\n\t\t\t}\n\t\t\t\n\t\t\t//calcolo l'eventuale numero di pagina successivo\n\t\t\tif(count($res)>intval($obj['page_size'])){\n\t\t\t\t$this->response['next_page'] = $obj['page_num']+1;\n\t\t\t}\n\t\t\t\n\t\t\t//inizializzo l'array dei nodi\n\t\t\tif(!array_key_exists('nodes', $this->response)){\n\t\t\t\t$this->response['nodes']=[];\n\t\t\t}\n\t\t\t//riempio l'array con i risultati della query\n\t\t\tforeach ($res as $k => $row) {\n\t\t\t\t$arr = [\n\t\t\t\t\t'node_id' => $row['idNode']\n\t\t\t\t\t,'name' => $row['NodeName']\n\t\t\t\t\t,'children_count' => $row['tot']\n\t\t\t\t];\n\t\t\t\tarray_push($this->response['nodes'], $arr);\n\t\t\t}\t\n\t\t}", "title": "" }, { "docid": "7df5e1d73bd7622b38ac9e772a9dcdea", "score": "0.51789254", "text": "function site_sitemap_node($siteObj, $pageObj, $lang='') {\n $node = new stdClass;\n $node->page_id = $pageObj->id;\n if($pageObj->path) {\n $pageContent = $pageObj;\n $lang = $pageContent->language;\n } else if($lang) {\n $pageContent = site_find_content($siteObj, $pageObj, $lang);\n } else {\n die(\"site_sitemap_node: neither page content nor language passed\");\n }\n \n if(!$pageContent) return NULL;\n $node->content_id = $pageContent->content_id;\n $copy_flds = array('title', 'menu_title', 'user_level', 'page_type', 'is_folder'); \n foreach($copy_flds as $fld) $node->$fld = $pageContent->$fld;\n\n if($node->is_folder) { \n $node->name = $pageObj->name;\n $node->path = $pageContent->path;\n } else { \n //dump($pageContent); \n $node->se_title = site_header_var($siteObj, $pageObj, 'title');\n $node->path = $pageContent->path;\n $node->url = site_page_link($siteObj, $pageContent, array('full' => true, 'lang' => $lang));\n $node->name = pick_first(array($pageContent->menu_title, $pageContent->title, $pageContent->se_title, $pageObj->name));\n $node->lang = $lang;\n $node->show_menu = $pageObj->show_menu; \n $node->user_level = $pageObj->user_level;\n \n if($page_type = $node->page_type) {\n $pageTypeObj = get_object('page_type', $page_type);\n }\n } \n //dump($node); \n //echo(\"$node->name<br>\");\n return $node;\n}", "title": "" }, { "docid": "a25c40a0e3c0e0b2b69f6ab06a832f36", "score": "0.5174255", "text": "public function hitungLuas();", "title": "" }, { "docid": "a92eff13b170f4e28256c5983db76048", "score": "0.5165798", "text": "protected function detail°potomekNeni()\n\t{\n\t}", "title": "" }, { "docid": "9ef3e7a7acb5f49d554fd6361cab34bd", "score": "0.51642865", "text": "function get_subnodes($node, $climb=false){\n global $myDB;\n \n if (is_integer($node)){\n $path = id2path($node);\n if ($path == -1) \n return -1;\n }else\n $path = $node;\n $path = addslashes($path); \n $query = FormatSQL(SQL_SUBNODE, (array)$path); \n// die($query);\n $myDB->query($query);\n if ($myDB->num_rows() <= 0) {\n return -1;\n }else{\n $idx = 0;\n while ($myDB->next_record()){\n $arr[$idx] = $myDB->f(\"Name\");\n $idx++;\n }\n reset($arr);\n if (!$climb)\n return $arr;\n else{\n for($x=0; $x<count($arr); $x++){\n $nrs[0] = level_count($arr[$x]);\n $nrs[1] = $nrs[0]; \n $query = FormatSQL(SQL_CATUP, $nrs); \n echo(\"$query<br>\");\n $myDB->query($query);\n $tmphash['path'] = $arr[$x];\n $idx = 0;\n while ($myDB->next_record()){\n $tmparr[$idx] = $myDB->f(\"Name\");\n $idx++;\n }\n $tmphash['sub'] = $tmparr;\n $newarr[$x] = $tmphash; \n }\n return $newarr;\n } \n }\n}", "title": "" }, { "docid": "50d22321e4687b3544fe340549c466d0", "score": "0.5161244", "text": "abstract protected function getNodeName(): string;", "title": "" }, { "docid": "50296a547a9d6400040d2b86c0e5143d", "score": "0.5156509", "text": "function node_view()\n {\n $this->db->order_by('nodesNode', 'ASC');\n\n $result = $this->db->get('adviser_nodes');\n return $result->result();\n\n }", "title": "" }, { "docid": "4ca90b67573804cb6b14e8050c6afc6a", "score": "0.5144998", "text": "abstract public function berjalan();", "title": "" }, { "docid": "d1dcf64e2c50478e38aaa98f7d584f6c", "score": "0.512286", "text": "function setNewRelic() {\n $dom = new DomDocument();\n $dom->preserveWhiteSpace = FALSE;\n $dom->loadXML($this->__xml_config);\n $xpath = new DOMXpath($dom);\n foreach ($xpath->query(\"/atentus/config/apm\") as $config) {\n $this->nombre= $config->getAttribute('nombre');\n $this->descripcion= $config->getAttribute('descripcion');\n $cont=0;\n \n /* LISTA DE COMPONENTES. */\n foreach ($xpath->query(\"panel/componente\", $config) as $componente) {\n $cont_orden=0;\n $cont_url=0;\n $cont_inf=0;\n $datos = new stdClass();\n $datos->tipo = $componente->getAttribute('tipo');\n $datos->captura = $componente->getAttribute('captura');\n $datos->titulo = $componente->getAttribute('titulo');\n $datos->visible = $componente->getAttribute('visible');\n foreach($xpath->query(\"grupo/elemento\", $componente) as $elemento){\n $datos->orden[$cont_orden] = $elemento->getAttribute('orden');\n $datos->titulo [$cont_orden]= $elemento->getAttribute('titulo');\n \n foreach ($xpath->query(\"url\", $elemento) as $tag_url) {\n $datos->url[$cont_url] = $tag_url->nodeValue;\n $cont_url++;\n }\n foreach ($xpath->query(\"informacion\", $elemento) as $tag_informacion) {\n $datos->informacion[$cont_inf] = $tag_informacion->nodeValue;\n $cont_inf++;\n }\n $datos->link[$cont_orden] = $xpath->query(\"link\", $elemento)->item(0)->nodeValue;\n $cont_orden++;\n \n }\n \n $this->__datos[$cont] = $datos;\n $cont++;\n }\n }\n }", "title": "" }, { "docid": "e7904bfecb0d6dc602b77167dcf788b8", "score": "0.5112696", "text": "private function get_nodes()\n {\n $sFilter = \"\";\n $aNodes = array();\n $sWhere = $this->get_variationfilter('prozessteilschritte');\n $sQuery = \"SELECT SUM(Haeufigkeit) AS anzahl, Aktivitaet, aktivitaeten_ID FROM prozessteilschritte \"\n . \"INNER JOIN aktivitaeten ON prozessteilschritte.aktivitaeten_ID = aktivitaeten.ID \"\n . \"WHERE 1=1 $sWhere \"\n . \"GROUP BY Aktivitaeten_ID \"\n . \"ORDER BY anzahl DESC;\";\n $oTable = $this->oDB->query($sQuery);\n while($aRow = $oTable->fetch_assoc())\n {\n $aNodes[] = array(\"name\"=>$aRow['Aktivitaet'],\"value\"=>intval($aRow['anzahl']));\n $this->aAktivitaeten[$aRow['aktivitaeten_ID']] = intval($aRow['anzahl']);\n }\n // add dummy node for start and end\n $aNodes[] = array(\"name\"=>'Start',\"value\"=>0);\n $aNodes[] = array(\"name\"=>'End',\"value\"=>0);\n return $aNodes;\n }", "title": "" }, { "docid": "14393d98c88b282643438222506443c7", "score": "0.51072204", "text": "private function getNid() {\n return $this->node_id;\n }", "title": "" }, { "docid": "35ea6562d08bfff2042ba8980b53bc3e", "score": "0.5103036", "text": "function site_sitemap_xml_nodes($siteObj_or_id, $nodes) {\n $site_url = rtrim(site_full_url($siteObj_or_id), '/');\n \n foreach($nodes as $path => $node) {\n if(strpos($path, 'http') !== 0) {\n $path = \"{$site_url}{$path}\";\n //die(\"no http, now $path\");\n }\n $xml .= \"\n <url>\n <loc>\".$path.\"</loc>\n </url>\";\n if($node->children) $xml .= site_sitemap_xml_nodes($siteObj_or_id, $node->children);\n }\n return $xml;\n// $priority = $node->priority ?: '0.5';\n// $change_freq = $node->change_freq ?: 'daily';\n// <priority>\".$priority.\"</priority>\n// <changefreq>\".$change_freq.\"</changefreq>\n\n}", "title": "" }, { "docid": "a1203f8270d3f73462192fc42c64d50c", "score": "0.5100488", "text": "public function addNode($params) {\r\n\r\n $parentId = addText($params[\"parentId\"]);\r\n\r\n $OBJECT_PARENT = AcademicDBAccess::findGradeFromId($parentId);\r\n\r\n $SAVEDATA['GUID'] = generateGuid();\r\n $SAVEDATA['TERM_NUMBER'] = 1;\r\n\r\n if (isset($params[\"parentId\"]))\r\n $SAVEDATA['PARENT'] = $parentId;\r\n if (isset($params[\"objecttype\"]))\r\n $SAVEDATA['OBJECT_TYPE'] = addText($params[\"objecttype\"]);\r\n\r\n $postName = isset($params[\"NAME\"]) ? addText($params[\"NAME\"]) . \"\" : \"\";\r\n $chooseSubjectName = isset($params[\"CHOOSE_SUBJECT_NAME\"]) ? addText($params[\"CHOOSE_SUBJECT_NAME\"]) . \"\" : \"\";\r\n $chooseSubjectId = isset($params[\"CHOOSE_SUBJECT\"]) ? addText($params[\"CHOOSE_SUBJECT\"]) . \"\" : \"\";\r\n\r\n if (isset($params[\"SORTKEY\"]))\r\n $SAVEDATA['SORTKEY'] = addText($params[\"SORTKEY\"]);\r\n\r\n if (isset($params[\"SHORT\"]))\r\n $SAVEDATA['SHORT'] = addText($params[\"SHORT\"]);\r\n\r\n switch ($params[\"objecttype\"]) {\r\n case \"CAMPUS\":\r\n $name = setShowText($postName);\r\n $SAVEDATA['NAME'] = $name;\r\n $SAVEDATA['TITLE'] = $name;\r\n $SAVEDATA['TREE_TYPE'] = 0;\r\n\r\n if (isset($params[\"QUALIFICATION_TYPE\"])) {\r\n $SAVEDATA['EDUCATION_TYPE'] = addText($params[\"QUALIFICATION_TYPE\"]);\r\n $SAVEDATA['QUALIFICATION_TYPE'] = addText($params[\"QUALIFICATION_TYPE\"]);\r\n }\r\n\r\n if (isset($params[\"EDUCATION_SYSTEM\"]))\r\n $SAVEDATA['EDUCATION_SYSTEM'] = $params[\"EDUCATION_SYSTEM\"];\r\n\r\n if (isset($params[\"SCHOOL_TYPE\"]))\r\n $SAVEDATA['SCHOOL_TYPE'] = addText($params[\"SCHOOL_TYPE\"]);\r\n\r\n if (isset($params[\"DEPARTMENT\"]))\r\n $SAVEDATA['DEPARTMENT'] = addText($params[\"DEPARTMENT\"]);\r\n\r\n $SAVEDATA['EMAIL'] = \"[email protected]\";\r\n\r\n $leaf = false;\r\n $objecttype = \"CAMPUS\";\r\n $iconCls = \"icon-bricks\";\r\n $navtitle = $name;\r\n $cls = \"nodeCampus\";\r\n\r\n break;\r\n\r\n case \"GRADE\":\r\n $name = setShowText($postName);\r\n $SAVEDATA['NAME'] = $postName;\r\n $SAVEDATA['TITLE'] = $OBJECT_PARENT->TITLE . \" &raquo; \" . $postName;\r\n $SAVEDATA['TREE_TYPE'] = 0;\r\n\r\n if (isset($params[\"LEVEL\"]))\r\n $SAVEDATA['LEVEL'] = addText($params[\"LEVEL\"]);\r\n\r\n $SAVEDATA['SHORT'] = $OBJECT_PARENT->SHORT;\r\n $SAVEDATA['TERM_NUMBER'] = $OBJECT_PARENT->TERM_NUMBER;\r\n $SAVEDATA['CAMPUS_ID'] = $OBJECT_PARENT->ID;\r\n $SAVEDATA['EDUCATION_TYPE'] = $OBJECT_PARENT->EDUCATION_TYPE;\r\n $SAVEDATA['QUALIFICATION_TYPE'] = $OBJECT_PARENT->EDUCATION_TYPE;\r\n $SAVEDATA['EDUCATION_SYSTEM'] = $OBJECT_PARENT->EDUCATION_SYSTEM;\r\n\r\n $SAVEDATA['PRE_REQUIREMENTS'] = $OBJECT_PARENT->PRE_REQUIREMENTS;\r\n $SAVEDATA['SEMESTER1_WEIGHTING'] = 1;\r\n $SAVEDATA['SEMESTER2_WEIGHTING'] = 2;\r\n\r\n $leaf = false;\r\n $objecttype = \"GRADE\";\r\n $iconCls = \"icon-package_white\";\r\n $navtitle = $OBJECT_PARENT->TITLE . \" &raquo; \" . $postName;\r\n $cls = \"nodeGrade\";\r\n\r\n break;\r\n\r\n case \"SCHOOLYEAR\":\r\n\r\n $SAVEDATA['EVALUATION_TYPE'] = isset($params[\"EVALUATION_TYPE\"]) ? 1 : 0;\r\n\r\n if (isset($params[\"DISTRIBUTION_VALUE\"]))\r\n $SAVEDATA['DISTRIBUTION_VALUE'] = addText($params[\"DISTRIBUTION_VALUE\"]);\r\n\r\n if (isset($params[\"NUMBER_CREDIT\"]))\r\n $SAVEDATA['NUMBER_CREDIT'] = addText($params[\"NUMBER_CREDIT\"]);\r\n\r\n $SAVEDATA['DISPLAY_MONTH_RESULT'] = isset($params[\"DISPLAY_MONTH_RESULT\"]) ? 1 : 0;\r\n $SAVEDATA['DISPLAY_FIRST_RESULT'] = isset($params[\"DISPLAY_FIRST_RESULT\"]) ? 1 : 0;\r\n $SAVEDATA['DISPLAY_SECOND_RESULT'] = isset($params[\"DISPLAY_SECOND_RESULT\"]) ? 1 : 0;\r\n $SAVEDATA['DISPLAY_YEAR_RESULT'] = isset($params[\"DISPLAY_YEAR_RESULT\"]) ? 1 : 0;\r\n $newSchoolyear = isset($params[\"HIDDEN_SCHOOLYEAR\"]) ? $params[\"HIDDEN_SCHOOLYEAR\"] : 0;\r\n\r\n $SAVEDATA['TREE_TYPE'] = 0;\r\n $OBJECT_SCHOOL_YEAR = AcademicDateDBAccess::findAcademicDateFromId($newSchoolyear);\r\n\r\n if ($OBJECT_SCHOOL_YEAR) {\r\n $SAVEDATA['SHORT'] = $OBJECT_PARENT->SHORT;\r\n $SAVEDATA['NAME'] = $OBJECT_SCHOOL_YEAR->NAME;\r\n $SAVEDATA['TITLE'] = $OBJECT_PARENT->TITLE . \" &raquo; \" . $OBJECT_SCHOOL_YEAR->NAME . \" (\" . getTermNumberShort($OBJECT_PARENT->TERM_NUMBER) . \")\";\r\n $SAVEDATA['SCHOOL_YEAR'] = $OBJECT_SCHOOL_YEAR->ID;\r\n\r\n $SAVEDATA['LEVEL'] = $OBJECT_PARENT->LEVEL;\r\n $SAVEDATA['EDUCATION_TYPE'] = $OBJECT_PARENT->EDUCATION_TYPE;\r\n $SAVEDATA['QUALIFICATION_TYPE'] = $OBJECT_PARENT->EDUCATION_TYPE;\r\n $SAVEDATA['EDUCATION_SYSTEM'] = $OBJECT_PARENT->EDUCATION_SYSTEM;\r\n\r\n $SAVEDATA['SCHOOL_TYPE'] = $OBJECT_PARENT->SCHOOL_TYPE;\r\n $SAVEDATA['TERM_NUMBER'] = $OBJECT_PARENT->TERM_NUMBER;\r\n $SAVEDATA['GRADE_ID'] = $OBJECT_PARENT->ID;\r\n\r\n if ($OBJECT_PARENT->EDUCATION_SYSTEM) {\r\n $SAVEDATA['CAMPUS_ID'] = $OBJECT_PARENT->ID;\r\n } else {\r\n $SAVEDATA['CAMPUS_ID'] = $OBJECT_PARENT->CAMPUS_ID;\r\n }\r\n\r\n $SAVEDATA['PRE_REQUIREMENTS'] = $OBJECT_PARENT->PRE_REQUIREMENTS;\r\n $SAVEDATA['SEMESTER1_WEIGHTING'] = $OBJECT_PARENT->SEMESTER1_WEIGHTING;\r\n $SAVEDATA['SEMESTER2_WEIGHTING'] = $OBJECT_PARENT->SEMESTER2_WEIGHTING;\r\n $SAVEDATA['EVALUATION_OPTION'] = $OBJECT_PARENT->EVALUATION_OPTION;\r\n $SAVEDATA['GRADING_TYPE'] = $OBJECT_PARENT->GRADING_TYPE;\r\n\r\n $name = $OBJECT_SCHOOL_YEAR->NAME . \" (\" . getTermNumberShort($OBJECT_PARENT->TERM_NUMBER) . \")\";\r\n $leaf = false;\r\n $objecttype = \"SCHOOLYEAR\";\r\n $iconCls = \"icon-date_add\";\r\n $navtitle = $OBJECT_PARENT->TITLE . \" &raquo; \" . $OBJECT_SCHOOL_YEAR->NAME . \" (\" . getTermNumberShort($OBJECT_PARENT->TERM_NUMBER) . \")\";\r\n $cls = \"nodeTextBoldBlue\";\r\n } else {\r\n\r\n $name = \"\";\r\n $leaf = false;\r\n $objecttype = \"SCHOOLYEAR\";\r\n $iconCls = \"icon-date_add\";\r\n $navtitle = \"\";\r\n $cls = \"nodeTextBoldBlue\";\r\n }\r\n\r\n break;\r\n\r\n case \"CLASS\":\r\n\r\n $SAVEDATA['NUMBER_CREDIT'] = $OBJECT_PARENT->NUMBER_CREDIT;\r\n\r\n if ($chooseSubjectId) {\r\n $name = $chooseSubjectName . \" (?)\";\r\n $SAVEDATA['NAME'] = $chooseSubjectName;\r\n $SAVEDATA['TITLE'] = $OBJECT_PARENT->TITLE . \" &raquo; \" . $chooseSubjectName;\r\n $SAVEDATA['TREE_TYPE'] = 1;\r\n $SAVEDATA['SUBJECT_ID'] = $chooseSubjectId;\r\n\r\n GradeSubjectDBAccess::addSubject2Grade($chooseSubjectId, $OBJECT_PARENT->ID);\r\n } else {\r\n $name = $postName . \" (?)\";\r\n $SAVEDATA['NAME'] = $postName;\r\n $SAVEDATA['TITLE'] = $OBJECT_PARENT->TITLE . \" &raquo; \" . $postName;\r\n $SAVEDATA['TREE_TYPE'] = 1;\r\n }\r\n\r\n $SAVEDATA['ENROLLMENT_TYPE'] = $OBJECT_PARENT->ENROLLMENT_TYPE;\r\n $SAVEDATA['SHORT'] = $OBJECT_PARENT->SHORT;\r\n $SAVEDATA['LEVEL'] = $OBJECT_PARENT->LEVEL;\r\n $SAVEDATA['TERM_NUMBER'] = $OBJECT_PARENT->TERM_NUMBER;\r\n $SAVEDATA['SCHOOL_YEAR'] = $OBJECT_PARENT->SCHOOL_YEAR;\r\n $SAVEDATA['EDUCATION_TYPE'] = $OBJECT_PARENT->EDUCATION_TYPE;\r\n $SAVEDATA['QUALIFICATION_TYPE'] = $OBJECT_PARENT->EDUCATION_TYPE;\r\n $SAVEDATA['EDUCATION_SYSTEM'] = $OBJECT_PARENT->EDUCATION_SYSTEM;\r\n\r\n $SAVEDATA['SCHOOL_TYPE'] = $OBJECT_PARENT->SCHOOL_TYPE;\r\n $SAVEDATA['END_SCHOOL'] = $OBJECT_PARENT->END_SCHOOL;\r\n\r\n $SAVEDATA['GRADE_ID'] = $OBJECT_PARENT->GRADE_ID;\r\n $SAVEDATA['CAMPUS_ID'] = $OBJECT_PARENT->CAMPUS_ID;\r\n $SAVEDATA['PRE_REQUIREMENTS'] = $OBJECT_PARENT->PRE_REQUIREMENTS;\r\n\r\n $SAVEDATA['MO'] = $OBJECT_PARENT->MO;\r\n $SAVEDATA['TU'] = $OBJECT_PARENT->TU;\r\n $SAVEDATA['WE'] = $OBJECT_PARENT->WE;\r\n $SAVEDATA['TH'] = $OBJECT_PARENT->TH;\r\n $SAVEDATA['FR'] = $OBJECT_PARENT->FR;\r\n $SAVEDATA['SA'] = $OBJECT_PARENT->SA;\r\n $SAVEDATA['SU'] = $OBJECT_PARENT->SU;\r\n\r\n $SAVEDATA['SEMESTER1_WEIGHTING'] = $OBJECT_PARENT->SEMESTER1_WEIGHTING;\r\n $SAVEDATA['SEMESTER2_WEIGHTING'] = $OBJECT_PARENT->SEMESTER2_WEIGHTING;\r\n\r\n $SAVEDATA['EVALUATION_TYPE'] = $OBJECT_PARENT->EVALUATION_TYPE;\r\n $SAVEDATA['DISTRIBUTION_VALUE'] = $OBJECT_PARENT->DISTRIBUTION_VALUE;\r\n $SAVEDATA['DISPLAY_MONTH_RESULT'] = $OBJECT_PARENT->DISPLAY_MONTH_RESULT;\r\n $SAVEDATA['DISPLAY_FIRST_RESULT'] = $OBJECT_PARENT->DISPLAY_FIRST_RESULT;\r\n $SAVEDATA['DISPLAY_SECOND_RESULT'] = $OBJECT_PARENT->DISPLAY_SECOND_RESULT;\r\n $SAVEDATA['DISPLAY_THIRD_RESULT'] = $OBJECT_PARENT->DISPLAY_THIRD_RESULT;\r\n $SAVEDATA['DISPLAY_FOURTH_RESULT'] = $OBJECT_PARENT->DISPLAY_FOURTH_RESULT;\r\n $SAVEDATA['DISPLAY_YEAR_RESULT'] = $OBJECT_PARENT->DISPLAY_YEAR_RESULT;\r\n $SAVEDATA['DISPLAY_GPA'] = $OBJECT_PARENT->DISPLAY_GPA;\r\n $SAVEDATA['DISPLAY_GRADE_POINTS'] = $OBJECT_PARENT->DISPLAY_GRADE_POINTS;\r\n\r\n ///@veasna\r\n $SAVEDATA['SEMESTER1_START'] = $OBJECT_PARENT->SEMESTER1_START;\r\n $SAVEDATA['SEMESTER1_END'] = $OBJECT_PARENT->SEMESTER1_END;\r\n $SAVEDATA['SEMESTER2_START'] = $OBJECT_PARENT->SEMESTER2_START;\r\n $SAVEDATA['SEMESTER2_END'] = $OBJECT_PARENT->SEMESTER2_END;\r\n $SAVEDATA['TERM1_START'] = $OBJECT_PARENT->TERM1_START;\r\n $SAVEDATA['TERM1_END'] = $OBJECT_PARENT->TERM1_END;\r\n $SAVEDATA['TERM2_START'] = $OBJECT_PARENT->TERM2_START;\r\n $SAVEDATA['TERM2_END'] = $OBJECT_PARENT->TERM2_END;\r\n $SAVEDATA['TERM3_START'] = $OBJECT_PARENT->TERM3_START;\r\n $SAVEDATA['TERM3_END'] = $OBJECT_PARENT->TERM3_END;\r\n $SAVEDATA['QUARTER1_START'] = $OBJECT_PARENT->QUARTER1_START;\r\n $SAVEDATA['QUARTER1_END'] = $OBJECT_PARENT->QUARTER1_END;\r\n $SAVEDATA['QUARTER2_START'] = $OBJECT_PARENT->QUARTER2_START;\r\n $SAVEDATA['QUARTER2_END'] = $OBJECT_PARENT->QUARTER2_END;\r\n $SAVEDATA['QUARTER3_START'] = $OBJECT_PARENT->QUARTER3_START;\r\n $SAVEDATA['QUARTER3_END'] = $OBJECT_PARENT->QUARTER3_END;\r\n $SAVEDATA['QUARTER4_START'] = $OBJECT_PARENT->QUARTER4_START;\r\n $SAVEDATA['QUARTER4_END'] = $OBJECT_PARENT->QUARTER4_END;\r\n\r\n $SAVEDATA[\"PERFORMANCE_MONTH_DIVISION_VALUE\"] = $OBJECT_PARENT->PERFORMANCE_MONTH_DIVISION_VALUE;\r\n $SAVEDATA[\"PERFORMANCE_FIRST_DIVISION_VALUE\"] = $OBJECT_PARENT->PERFORMANCE_FIRST_DIVISION_VALUE;\r\n $SAVEDATA[\"PERFORMANCE_SECOND_DIVISION_VALUE\"] = $OBJECT_PARENT->PERFORMANCE_SECOND_DIVISION_VALUE;\r\n $SAVEDATA[\"PERFORMANCE_THIRD_DIVISION_VALUE\"] = $OBJECT_PARENT->PERFORMANCE_THIRD_DIVISION_VALUE;\r\n $SAVEDATA[\"PERFORMANCE_FOURTH_DIVISION_VALUE\"] = $OBJECT_PARENT->PERFORMANCE_FOURTH_DIVISION_VALUE;\r\n $SAVEDATA[\"FORMULA_TERM\"] = $OBJECT_PARENT->FORMULA_TERM;\r\n $SAVEDATA[\"FORMULA_YEAR\"] = $OBJECT_PARENT->FORMULA_YEAR;\r\n ///\r\n\r\n if ($OBJECT_PARENT->EDUCATION_SYSTEM) {\r\n $SAVEDATA['SUBJECT_ID'] = $OBJECT_PARENT->SUBJECT_ID;\r\n }\r\n\r\n $leaf = true;\r\n $objecttype = \"CLASS\";\r\n $iconCls = \"icon-blackboard\";\r\n $navtitle = $OBJECT_PARENT->TITLE . \" &raquo; \";\r\n $navtitle .= $postName;\r\n $cls = \"nodeClass\";\r\n break;\r\n case \"SUBJECT\":\r\n\r\n $SAVEDATA['NUMBER_CREDIT'] = $OBJECT_PARENT->NUMBER_CREDIT;\r\n\r\n if ($chooseSubjectId) {\r\n $name = $chooseSubjectName . \" (?)\";\r\n $SAVEDATA['NAME'] = $chooseSubjectName;\r\n $SAVEDATA['TITLE'] = $OBJECT_PARENT->TITLE . \" &raquo; \" . $chooseSubjectName;\r\n $SAVEDATA['TREE_TYPE'] = 1;\r\n $SAVEDATA['SUBJECT_ID'] = $chooseSubjectId;\r\n\r\n GradeSubjectDBAccess::addSubject2Grade($chooseSubjectId, $OBJECT_PARENT->ID);\r\n } else {\r\n $name = $postName . \" (?)\";\r\n $SAVEDATA['NAME'] = $postName;\r\n $SAVEDATA['TITLE'] = $OBJECT_PARENT->TITLE . \" &raquo; \" . $postName;\r\n $SAVEDATA['TREE_TYPE'] = 1;\r\n }\r\n\r\n $SAVEDATA['ENROLLMENT_TYPE'] = $OBJECT_PARENT->ENROLLMENT_TYPE;\r\n $SAVEDATA['SHORT'] = $OBJECT_PARENT->SHORT;\r\n $SAVEDATA['LEVEL'] = $OBJECT_PARENT->LEVEL;\r\n $SAVEDATA['TERM_NUMBER'] = $OBJECT_PARENT->TERM_NUMBER;\r\n $SAVEDATA['SCHOOL_YEAR'] = $OBJECT_PARENT->SCHOOL_YEAR;\r\n $SAVEDATA['EDUCATION_TYPE'] = $OBJECT_PARENT->EDUCATION_TYPE;\r\n $SAVEDATA['QUALIFICATION_TYPE'] = $OBJECT_PARENT->EDUCATION_TYPE;\r\n $SAVEDATA['EDUCATION_SYSTEM'] = $OBJECT_PARENT->EDUCATION_SYSTEM;\r\n $SAVEDATA['SCHOOL_TYPE'] = $OBJECT_PARENT->SCHOOL_TYPE;\r\n $SAVEDATA['END_SCHOOL'] = $OBJECT_PARENT->END_SCHOOL;\r\n $SAVEDATA['CAMPUS_ID'] = $OBJECT_PARENT->CAMPUS_ID;\r\n $SAVEDATA['PRE_REQUIREMENTS'] = $OBJECT_PARENT->PRE_REQUIREMENTS;\r\n $SAVEDATA['SEMESTER1_WEIGHTING'] = $OBJECT_PARENT->SEMESTER1_WEIGHTING;\r\n $SAVEDATA['SEMESTER2_WEIGHTING'] = $OBJECT_PARENT->SEMESTER2_WEIGHTING;\r\n\r\n $SAVEDATA['EVALUATION_TYPE'] = $OBJECT_PARENT->EVALUATION_TYPE;\r\n $SAVEDATA['DISTRIBUTION_VALUE'] = $OBJECT_PARENT->DISTRIBUTION_VALUE;\r\n $SAVEDATA['DISPLAY_MONTH_RESULT'] = $OBJECT_PARENT->DISPLAY_MONTH_RESULT;\r\n $SAVEDATA['DISPLAY_FIRST_RESULT'] = $OBJECT_PARENT->DISPLAY_FIRST_RESULT;\r\n $SAVEDATA['DISPLAY_SECOND_RESULT'] = $OBJECT_PARENT->DISPLAY_SECOND_RESULT;\r\n $SAVEDATA['DISPLAY_THIRD_RESULT'] = $OBJECT_PARENT->DISPLAY_THIRD_RESULT;\r\n $SAVEDATA['DISPLAY_FOURTH_RESULT'] = $OBJECT_PARENT->DISPLAY_FOURTH_RESULT;\r\n $SAVEDATA['DISPLAY_YEAR_RESULT'] = $OBJECT_PARENT->DISPLAY_YEAR_RESULT;\r\n $SAVEDATA['DISPLAY_GPA'] = $OBJECT_PARENT->DISPLAY_GPA;\r\n $SAVEDATA['DISPLAY_GRADE_POINTS'] = $OBJECT_PARENT->DISPLAY_GRADE_POINTS;\r\n\r\n ///@veasna\r\n $SAVEDATA['SEMESTER1_START'] = $OBJECT_PARENT->SEMESTER1_START;\r\n $SAVEDATA['SEMESTER1_END'] = $OBJECT_PARENT->SEMESTER1_END;\r\n $SAVEDATA['SEMESTER2_START'] = $OBJECT_PARENT->SEMESTER2_START;\r\n $SAVEDATA['SEMESTER2_END'] = $OBJECT_PARENT->SEMESTER2_END;\r\n $SAVEDATA['TERM1_START'] = $OBJECT_PARENT->TERM1_START;\r\n $SAVEDATA['TERM1_END'] = $OBJECT_PARENT->TERM1_END;\r\n $SAVEDATA['TERM2_START'] = $OBJECT_PARENT->TERM2_START;\r\n $SAVEDATA['TERM2_END'] = $OBJECT_PARENT->TERM2_END;\r\n $SAVEDATA['TERM3_START'] = $OBJECT_PARENT->TERM3_START;\r\n $SAVEDATA['TERM3_END'] = $OBJECT_PARENT->TERM3_END;\r\n $SAVEDATA['QUARTER1_START'] = $OBJECT_PARENT->QUARTER1_START;\r\n $SAVEDATA['QUARTER1_END'] = $OBJECT_PARENT->QUARTER1_END;\r\n $SAVEDATA['QUARTER2_START'] = $OBJECT_PARENT->QUARTER2_START;\r\n $SAVEDATA['QUARTER2_END'] = $OBJECT_PARENT->QUARTER2_END;\r\n $SAVEDATA['QUARTER3_START'] = $OBJECT_PARENT->QUARTER3_START;\r\n $SAVEDATA['QUARTER3_END'] = $OBJECT_PARENT->QUARTER3_END;\r\n $SAVEDATA['QUARTER4_START'] = $OBJECT_PARENT->QUARTER4_START;\r\n $SAVEDATA['QUARTER4_END'] = $OBJECT_PARENT->QUARTER4_END;\r\n\r\n $SAVEDATA[\"PERFORMANCE_MONTH_DIVISION_VALUE\"] = $OBJECT_PARENT->PERFORMANCE_MONTH_DIVISION_VALUE;\r\n $SAVEDATA[\"PERFORMANCE_FIRST_DIVISION_VALUE\"] = $OBJECT_PARENT->PERFORMANCE_FIRST_DIVISION_VALUE;\r\n $SAVEDATA[\"PERFORMANCE_SECOND_DIVISION_VALUE\"] = $OBJECT_PARENT->PERFORMANCE_SECOND_DIVISION_VALUE;\r\n $SAVEDATA[\"PERFORMANCE_THIRD_DIVISION_VALUE\"] = $OBJECT_PARENT->PERFORMANCE_THIRD_DIVISION_VALUE;\r\n $SAVEDATA[\"PERFORMANCE_FOURTH_DIVISION_VALUE\"] = $OBJECT_PARENT->PERFORMANCE_FOURTH_DIVISION_VALUE;\r\n $SAVEDATA[\"FORMULA_TERM\"] = $OBJECT_PARENT->FORMULA_TERM;\r\n $SAVEDATA[\"FORMULA_YEAR\"] = $OBJECT_PARENT->FORMULA_YEAR;\r\n ///\r\n\r\n $leaf = true;\r\n $objecttype = \"CLASS\";\r\n $iconCls = \"icon-blackboard\";\r\n $navtitle = $OBJECT_PARENT->TITLE . \" &raquo; \";\r\n $navtitle .= $postName;\r\n $cls = \"nodeClass\";\r\n\r\n break;\r\n }\r\n\r\n $SAVEDATA['CODE'] = createCode();\r\n $SAVEDATA['CREATED_DATE'] = getCurrentDBDateTime();\r\n $SAVEDATA['CREATED_BY'] = Zend_Registry::get('USER')->CODE;\r\n\r\n self::dbAccess()->insert('t_grade', $SAVEDATA);\r\n $objectId = self::dbAccess()->lastInsertId();\r\n\r\n switch ($params[\"objecttype\"]) {\r\n\r\n case \"SCHOOLYEAR\":\r\n $newSchoolyearId = isset($params[\"NEW_SCHOOLYEAR\"]) ? $params[\"NEW_SCHOOLYEAR\"] : \"\";\r\n $QUESTION = isset($params[\"QUESTION\"]) ? $params[\"QUESTION\"] : \"\";\r\n $COPY_LASTSCHOOLYEAR = isset($params[\"COPY_LASTSCHOOLYEAR\"]) ? $params[\"COPY_LASTSCHOOLYEAR\"] : \"\";\r\n $COPY_SUBJECT = isset($params[\"COPY_SUBJECT\"]) ? $params[\"COPY_SUBJECT\"] : \"\";\r\n $COPY_ASSIGNMENT = isset($params[\"COPY_ASSIGNMENT\"]) ? $params[\"COPY_ASSIGNMENT\"] : \"\";\r\n $gradeId = isset($params[\"parentId\"]) ? addText($params[\"parentId\"]) : \"\";\r\n $newGradeSchoolyearId = $objectId;\r\n\r\n if ($QUESTION == \"YES\") {\r\n $ACTION = true;\r\n } else {\r\n $ACTION = false;\r\n }\r\n\r\n if ($COPY_LASTSCHOOLYEAR && $ACTION) {\r\n\r\n $entriesClass = self::dbAccess()->fetchAll(\"SELECT * FROM t_grade WHERE SCHOOL_YEAR='\" . $COPY_LASTSCHOOLYEAR . \"' AND GRADE_ID='\" . $gradeId . \"' AND OBJECT_TYPE='CLASS'\");\r\n\r\n if ($newSchoolyearId) {\r\n\r\n if ($entriesClass) {\r\n foreach ($entriesClass as $value) {\r\n $SAVE_CLASS_DATA['PARENT'] = $newGradeSchoolyearId;\r\n $SAVE_CLASS_DATA['CODE'] = createCode();\r\n $SAVE_CLASS_DATA['GUID'] = generateGuid();\r\n $SAVE_CLASS_DATA['NAME'] = $value->NAME;\r\n $SAVE_CLASS_DATA['TITLE'] = $value->TITLE;\r\n $SAVE_CLASS_DATA['LEVEL'] = $value->LEVEL;\r\n $SAVE_CLASS_DATA['NUMBER_CREDIT'] = $value->NUMBER_CREDIT;\r\n $SAVE_CLASS_DATA['TERM_NUMBER'] = $value->TERM_NUMBER;\r\n $SAVE_CLASS_DATA['SCHOOL_YEAR'] = $newSchoolyearId;\r\n $SAVE_CLASS_DATA['EDUCATION_TYPE'] = $value->EDUCATION_TYPE;\r\n $SAVE_CLASS_DATA['QUALIFICATION_TYPE'] = $value->EDUCATION_TYPE;\r\n $SAVE_CLASS_DATA['EDUCATION_SYSTEM'] = $value->EDUCATION_SYSTEM;\r\n\r\n $SAVE_CLASS_DATA['SCHOOL_TYPE'] = $value->SCHOOL_TYPE;\r\n $SAVE_CLASS_DATA['END_SCHOOL'] = $value->END_SCHOOL;\r\n $SAVE_CLASS_DATA['GRADE_ID'] = $value->GRADE_ID;\r\n $SAVE_CLASS_DATA['CAMPUS_ID'] = $value->CAMPUS_ID;\r\n $SAVE_CLASS_DATA['YEAR_FORMULAR'] = $value->YEAR_FORMULAR;\r\n $SAVE_CLASS_DATA['SEMESTER_FORMULAR'] = $value->SEMESTER_FORMULAR;\r\n $SAVE_CLASS_DATA['YEAR_FORMULAR'] = $value->YEAR_FORMULAR;\r\n $SAVE_CLASS_DATA['MO'] = $value->MO;\r\n $SAVE_CLASS_DATA['TU'] = $value->TU;\r\n $SAVE_CLASS_DATA['WE'] = $value->WE;\r\n $SAVE_CLASS_DATA['TH'] = $value->TH;\r\n $SAVE_CLASS_DATA['FR'] = $value->FR;\r\n $SAVE_CLASS_DATA['SA'] = $value->SA;\r\n $SAVE_CLASS_DATA['SU'] = $value->SU;\r\n $SAVE_CLASS_DATA['OBJECT_TYPE'] = $value->OBJECT_TYPE;\r\n $SAVE_CLASS_DATA['SEMESTER1_WEIGHTING'] = $value->SEMESTER1_WEIGHTING;\r\n $SAVE_CLASS_DATA['SEMESTER2_WEIGHTING'] = $value->SEMESTER2_WEIGHTING;\r\n self::dbAccess()->insert('t_grade', $SAVE_CLASS_DATA);\r\n }\r\n }\r\n }\r\n }\r\n\r\n ////////////////////////////////////////////////////////////////\r\n //COPY SUBJECT...\r\n ////////////////////////////////////////////////////////////////\r\n if ($COPY_SUBJECT && $ACTION) {\r\n\r\n $entriesSubject = self::dbAccess()->fetchAll(\"SELECT * FROM t_grade_subject WHERE SCHOOLYEAR='\" . $COPY_LASTSCHOOLYEAR . \"' AND GRADE='\" . $gradeId . \"'\");\r\n\r\n if ($newSchoolyearId) {\r\n\r\n if ($entriesSubject) {\r\n foreach ($entriesSubject as $value) {\r\n\r\n $SAVE_SUBJECT_DATA['SCHOOLYEAR'] = $newSchoolyearId;\r\n $SAVE_SUBJECT_DATA['ASSIGNED_SUBJECT'] = $value->ASSIGNED_SUBJECT;\r\n $SAVE_SUBJECT_DATA['SUBJECT_GUID'] = generateGuid();\r\n $SAVE_SUBJECT_DATA['NUMBER_CREDIT'] = $value->NUMBER_CREDIT;\r\n $SAVE_SUBJECT_DATA['GRADE'] = $value->GRADE;\r\n $SAVE_SUBJECT_DATA['SUBJECT'] = $value->SUBJECT;\r\n $SAVE_SUBJECT_DATA['DESCRIPTION'] = $value->DESCRIPTION;\r\n $SAVE_SUBJECT_DATA['GOALS'] = $value->GOALS;\r\n $SAVE_SUBJECT_DATA['OBJECTIVES'] = $value->OBJECTIVES;\r\n $SAVE_SUBJECT_DATA['MATERIALS'] = $value->MATERIALS;\r\n $SAVE_SUBJECT_DATA['BODY_OF_LESSON'] = $value->BODY_OF_LESSON;\r\n $SAVE_SUBJECT_DATA['EVALUATION'] = $value->EVALUATION;\r\n $SAVE_SUBJECT_DATA['DURATION'] = $value->DURATION;\r\n $SAVE_SUBJECT_DATA['SORTKEY'] = $value->SORTKEY;\r\n $SAVE_SUBJECT_DATA['NAME'] = $value->NAME;\r\n $SAVE_SUBJECT_DATA['GRADING'] = $value->GRADING;\r\n $SAVE_SUBJECT_DATA['SUBJECT_TYPE'] = $value->SUBJECT_TYPE;\r\n $SAVE_SUBJECT_DATA['EDUCATION_TYPE'] = $value->EDUCATION_TYPE;\r\n $SAVE_SUBJECT_DATA['QUALIFICATION_TYPE'] = $value->EDUCATION_TYPE;\r\n $SAVE_SUBJECT_DATA['COEFF'] = $value->COEFF;\r\n $SAVE_SUBJECT_DATA['NATIONAL_EXAM'] = $value->NATIONAL_EXAM;\r\n $SAVE_SUBJECT_DATA['FORMULA_TYPE'] = $value->FORMULA_TYPE;\r\n $SAVE_SUBJECT_DATA['COEFF_VALUE'] = $value->COEFF_VALUE;\r\n $SAVE_SUBJECT_DATA['AVERAGE_FROM_SEMESTER'] = $value->AVERAGE_FROM_SEMESTER;\r\n $SAVE_SUBJECT_DATA['SCORE_TYPE'] = $value->SCORE_TYPE;\r\n $SAVE_SUBJECT_DATA['COEFF_VALUE'] = $value->COEFF_VALUE;\r\n $SAVE_SUBJECT_DATA['INCLUDE_IN_EVALUATION'] = $value->INCLUDE_IN_EVALUATION;\r\n $SAVE_SUBJECT_DATA['MAX_POSSIBLE_SCORE'] = displayNumberFormat($value->MAX_POSSIBLE_SCORE);\r\n self::dbAccess()->insert('t_grade_subject', $SAVE_SUBJECT_DATA);\r\n }\r\n }\r\n }\r\n }\r\n ////////////////////////////////////////////////////////////////\r\n //COPY ASSIGNMENT...\r\n ////////////////////////////////////////////////////////////////\r\n if ($COPY_ASSIGNMENT && $ACTION) {\r\n $entriesAssignment = self::dbAccess()->fetchAll(\"SELECT * FROM t_assignment WHERE SCHOOLYEAR='\" . $COPY_LASTSCHOOLYEAR . \"' AND GRADE='\" . $gradeId . \"'\");\r\n if ($newSchoolyearId) {\r\n\r\n if ($entriesAssignment) {\r\n foreach ($entriesAssignment as $value) {\r\n\r\n $SAVE_ASSIGNMENT_DATA['SCHOOLYEAR'] = $newSchoolyearId;\r\n $SAVE_ASSIGNMENT_DATA['GRADE'] = $value->GRADE;\r\n $SAVE_ASSIGNMENT_DATA['STATUS'] = $value->STATUS;\r\n $SAVE_ASSIGNMENT_DATA['NAME'] = $value->NAME;\r\n $SAVE_ASSIGNMENT_DATA['SHORT'] = $value->SHORT;\r\n $SAVE_ASSIGNMENT_DATA['SUBJECT'] = $value->SUBJECT;\r\n $SAVE_ASSIGNMENT_DATA['INCLUDE_IN_EVALUATION'] = $value->INCLUDE_IN_EVALUATION;\r\n $SAVE_ASSIGNMENT_DATA['EVALUATION_TYPE'] = $value->EVALUATION_TYPE;\r\n $SAVE_ASSIGNMENT_DATA['COEFF_VALUE'] = $value->COEFF_VALUE;\r\n $SAVE_ASSIGNMENT_DATA['SMS_SEND'] = $value->SMS_SEND;\r\n $SAVE_ASSIGNMENT_DATA['DESCRIPTION'] = $value->DESCRIPTION;\r\n $SAVE_ASSIGNMENT_DATA['CATEGORY'] = $value->CATEGORY;\r\n $SAVE_ASSIGNMENT_DATA['TASK'] = $value->TASK;\r\n self::dbAccess()->insert('t_assignment', $SAVE_ASSIGNMENT_DATA);\r\n }\r\n }\r\n }\r\n }\r\n\r\n break;\r\n }\r\n\r\n return array(\r\n \"success\" => true\r\n , \"objectId\" => $objectId\r\n , \"text\" => $name\r\n , \"leaf\" => $leaf\r\n , \"objecttype\" => $objecttype\r\n , \"iconCls\" => $iconCls\r\n , \"navtitle\" => $navtitle\r\n , \"cls\" => $cls\r\n , \"allowDelete\" => true\r\n );\r\n }", "title": "" }, { "docid": "30ad6b8079256b8cedf967699ee74f39", "score": "0.50986814", "text": "public function __construct(int $node){\n parent::__construct($node);\n }", "title": "" }, { "docid": "149047b98a83960a11c98d0e6ad4f6a2", "score": "0.50687754", "text": "function render($data,$nodes){\n\t\t\t$nodes[$data['index']]['result']='';\n\t\t\tfor($i=0;$i<=$data['number_ports']-1;$i++){\n\t\t\t\tif(array_key_exists('result',$nodes[$data['index']])) {\n\n\t\t\t\t\t//$nodes[$data['index']]['result'].= $this->check_array_value($nodes, $data['content'.$i]['index'], $data['port_content'.$i] );\n\n\t\t\t\t\t$nodes[$data['index']]['result'].= $nodes[$data['content'.$i]['index']][$data['port_content'.$i]];\n\t\t\t\t}\n\t\t}\n\t\treturn $nodes[$data['index']];//return the entire node, with the result\n\t}", "title": "" }, { "docid": "ae76af1af50ff570b2633b13ec5ae91f", "score": "0.5068304", "text": "function consoleWaypoint($niveau_gene,$camp,$carte_id)\n{\n\tif($niveau_gene !=-1 /*50*/)\n\t{ \n\t\t//Reutilisation de $camp/$map/$x/$y\t\t\n\t\t//on verifie si il faut supprimer un waypoint ou pas\n\t\tif(isset($_POST['strat_ok'], $_POST['strat_suppr_waypoint']))\n\t\t{\n\t\t\trequest('DELETE FROM waypoint WHERE id='.$_POST['strat_suppr_waypoint'].' and camps='.$camp.' ');\n\n\t\t}\t\n\t\t//on verifie si on doit ajouter un Waypoint ou non\n\t\tif(isset($_POST['strat_ok'],$_POST['strat_color'], $_POST['strat_x'],$_POST['strat_y'],$_POST['carte_id_wp'],$_POST['strat_label']) && is_numeric($_POST['strat_x']) && is_numeric($_POST['strat_y']))\n\t\t{\n\t\t\t$exclu_compa=0; \n\t\t\t//on prepare les couleurs\n\t\t\t$couleur_label=explode('_',$_POST['strat_color']);\n\t\t\tif(post_on('strat_exclu_compa_ok'))\n\t\t\t{\n\t\t\t\t$exclu_compa=$_POST['strat_exclu_compa'];\n\t\t\t}\n\n\t\t\trequest(\"INSERT INTO waypoint (`camps`,`carte`,`x`,`y`,`label`,`color_R`,`color_G`,`color_B`,`grade`,`compa`)\n\t\t\t\tVALUES(\".$camp.\",\".$_POST['carte_id_wp'].\",\".$_POST['strat_x'].\",\t\t\t\".$_POST['strat_y'].\",'\".$_POST['strat_label'].\"',\".$couleur_label[0].\",\".$couleur_label[1].\",\".$couleur_label[2].\",\".(post_on('strat_exclu_generaux')*50). \",\".$exclu_compa.\")\");\n\t\t\tadd_message(3,'Votre Zone stratégique a bien ajoutée<br /> Elle s\\'affichera au prochain rafraichissement de la carte');\n\t\t}\n\n\t\t//---------------Affichage---------------\n\n\t\t$waypoints=my_fetch_array('SELECT id,CONCAT(label,\\' ; X=\\',x,\\' / Y=\\',y) FROM waypoint WHERE camps='.$camp.' ');\n\t\t$compas=my_fetch_array('SELECT id,CONCAT(nom,\\'\\ (\\',initiales,\\'\\) \\')\n\t\t\tFROM compagnies\n\t\t\tWHERE compagnies.camp='.$camp.' AND compagnies.valide=1');\t\t\n\n\t\t$color=array(7,\n\t\t\tarray('200_010_200','violet'),\n\t\t\tarray('015_128_015','vert'),\n\t\t\tarray('128_000_000','bordeaux'),\n\t\t\tarray('210_150_010','jaune'),\n\t\t\tarray('000_255_255','cyan'),\n\t\t\tarray('150_150_150','gris'),\n\t\t\tarray('000_000_128','bleu marine'));\n\n\n\t\techo'<h1>Zones Stratégiques</h1>\n\t\t\t<form method=\"post\" action=\"carte.php\">\n\t\t\t<p>',form_select('Zone a supprimer : ','strat_suppr_waypoint',$waypoints,''),'<br />\n\t\t\t',form_submit('strat_ok','Supprimer'),'\n\t\t\t</p> \n\t\t\t</form>\n\t\t\t<h1>Ajouter Zone</h1>\n\t\t\t<form name=\"waypointForm\" method=\"post\" action=\"carte.php\">\n\t\t\t<p>\n\t\t\t',form_text('Label : ','strat_label','3',''),' ',\n\t\t\tform_select('Couleur du label : ','strat_color',$color,''),'<br /> ',\n\t\t\tform_text('X : ','strat_x','3',''),' ',\n\t\t\tform_text('Y : ','strat_y','3',''),'<br />',\n\t\t\tform_check('Excusivement pour les généraux ? :','strat_exclu_generaux'),'<br />', \n\t\t\tform_check('Affecter à un kvindek ? :','strat_exclu_compa_ok'),' ',\n\t\t\tform_select('Choix du kvindek : ','strat_exclu_compa',$compas,''),'<br />',' \t\t\t\n\t\t\t<input type=\"hidden\" name=\"carte_id_wp\" value=\"',$carte_id,'\" />',\n\t\t\tform_submit('strat_ok','Ajouter'),'\n\t\t\t</p>\n\t\t\t</form>\n\t\t\t';\n\t}\n}", "title": "" }, { "docid": "44e4753d20b717e841dc0dc5ee525f40", "score": "0.50479144", "text": "private function setNodes(){\n \n $nodes = array();\n $settings = $this->getSettings();\n \n $query = new OverviewQuery();\n $query->baseConditions($settings['content_types'], $settings['nid'], $settings['langcode']);\n \n if($settings['popular'])\n $query->popularCondition($settings['popular']);\n \n if($settings['keywords'])\n $query->keywordConditions($settings['keywords']);\n \n if($settings['tags'])\n $query->tagConditions($settings['tags']);\n \n if($settings['sections'])\n $query->sectionConditions($settings['sections']);\n \n if($settings['taxonomy'])\n $query->taxonomyConditions($settings['taxonomy']);\n \n if($settings['items_per_page'])\n $query->range($settings['items_per_page']);\n \n if(count($settings['content_types']) == 1){ \n if(in_array('event',$settings['content_types'])){\n $query->eventConditions($settings['date_from'], $settings['date_to']);\n\n if($settings['order'] == 'created')\n $settings['order'] = 'field_event_date.value';\n \n }elseif(in_array('entity',$settings['content_types']) && $settings['entitytype']){\n $query->entityConditions($settings['entitytype']);\n }\n }\n \n if($settings['display'] == 'glossary'){\n $settings['order'] = 'title';\n $settings['sort'] = 'ASC';\n }\n \n if($settings['order'])\n $query->sort($settings['order'], $settings['sort']);\n \n $nids = $query->getNids();\n \n if(!empty($nids))\n $nodes = \\Drupal::entityTypeManager()->getStorage('node')->loadMultiple($nids);\n \n $this->nodes = $nodes;\n }", "title": "" }, { "docid": "f25bca1118d8d46b0f1592d701dfdad5", "score": "0.50450003", "text": "private function _draw_node($off, $len, $rl = 'T', $icon = '', $depth = 0) {\n\t\tif ($rl == 'T') echo '(T) '; else {\n\t\t\techo $icon;\n\t\t\tif ($rl == 'L') {\n\t\t\t\t$icon .= ' ┃';\n\t\t\t\techo ' ┟(L) ';\n\t\t\t} else {\n\t\t\t\t$icon .= '  ';\n\t\t\t\techo ' └(R) ';\n\t\t\t}\n\t\t}\n\t\tif ($len == 0) {\n\t\t\techo \"<NULL>\\n\";\n\n\t\t\treturn;\n\t\t}\n\n\t\t$rec = $this->_tree_get_record($off, $len);\n\t\techo \"{$rec['key']} (vlen={$rec['vlen']}, voff={$rec['voff']})\\n\";\n\t\tunset($rec['key'], $rec['value']);\n\n\t\t// debug used\n\t\t$this->_node_num++;\n\t\t$depth++;\n\t\tif ($depth >= $this->_cur_depth) $this->_cur_depth = $depth;\n\n\t\t// Left node & Right Node\n\t\t$this->_draw_node($rec['loff'], $rec['llen'], 'L', $icon, $depth);\n\t\t$this->_draw_node($rec['roff'], $rec['rlen'], 'R', $icon, $depth);\n\t}", "title": "" }, { "docid": "5c836eed3134c9dd485a3e3bfc3a5bcc", "score": "0.50205064", "text": "public function nilai()\n {\n }", "title": "" }, { "docid": "df7a0557a5e922554275ccb4d391ab13", "score": "0.5018014", "text": "public function _PohonKinerjaSubKegiatanTree(Request $request)\n {\n if ( $request->id == \"#\"){\n $data = 'subkegiatan';\n $node_id = '';\n }else{\n $data = $request->data;\n\n $x\t\t\t= explode('|',$request->id);\n $node_id = $x[1];\n }\n $state = array( \"opened\" => true, \"selected\" => false );\n \n switch ($data) {\n case 'subkegiatan':\n\n //ANGGARAN\n $subkegiatan_1 = SubKegiatan::SELECT('id','label')\n ->WHERE('renja_subkegiatan.renja_id', $request->renja_id )\n ->leftjoin('db_pare_2018.skp_tahunan_kegiatan AS kegiatan_tahunan', function($join){\n $join ->on('kegiatan_tahunan.subkegiatan_id','=','renja_subkegiatan.id');\n })\n ->SELECT( 'renja_subkegiatan.id AS subkegiatan_id',\n 'renja_subkegiatan.label AS subkegiatan_label',\n 'kegiatan_tahunan.id AS kegiatan_tahunan_id',\n 'kegiatan_tahunan.label AS kegiatan_tahunan_label'\n ) \n ->WHERE('renja_subkegiatan.cost','>', 0 );\n \n //NON ANGGARAN\n $subkegiatan_2 = SubKegiatan::SELECT('id','label')\n ->WHERE('renja_subkegiatan.renja_id', $request->renja_id )\n ->leftjoin('db_pare_2018.skp_tahunan_kegiatan AS kegiatan_tahunan', function($join){\n $join ->on('kegiatan_tahunan.subkegiatan_id','=','renja_subkegiatan.id');\n })\n ->SELECT( 'renja_subkegiatan.id AS subkegiatan_id',\n 'renja_subkegiatan.label AS subkegiatan_label',\n 'kegiatan_tahunan.id AS kegiatan_tahunan_id',\n 'kegiatan_tahunan.label AS kegiatan_tahunan_label'\n ) \n ->WHERE('renja_subkegiatan.cost','<=', 0 );\n \n \n $subkegiatan = $subkegiatan_1->unionAll($subkegiatan_2)->get();\n foreach ($subkegiatan as $x) {\n if ( $x->kegiatan_tahunan_id >= 1 ){\n $subkegiatan_id = \"KegiatanTahunan|\".$x->kegiatan_tahunan_id;\n $kegiatan_label = $x->kegiatan_tahunan_label;\n $data_kegiatan['icon']\t = 'jstree-kegiatan_tahunan';\n }else{\n $subkegiatan_id = \"SubKegiatan|\".$x->subkegiatan_id;\n $kegiatan_label = $x->subkegiatan_label;\n $data_kegiatan['icon']\t = 'jstree-kegiatan';\n }\n\n $data_kegiatan['id']\t = $subkegiatan_id;\n $data_kegiatan['data']\t = \"indikator_kegiatan\";\n $data_kegiatan['type'] = \"indikator_kegiatan\";\n $data_kegiatan['text']\t\t\t= Pustaka::capital_string($kegiatan_label);\n $data_kegiatan['state'] = $state;\n $data_kegiatan['children'] = true ;\n\n //Indikator Sub Kegiatan\n $ik = IndikatorSubKegiatan::WHERE('subkegiatan_id',$x->subkegiatan_id)->get();\n foreach ($ik as $y) {\n $data_ind_kegiatan['id']\t = \"IndikatorSubKegiatan|\".$y->id;\n $data_ind_kegiatan['text']\t\t\t= Pustaka::capital_string($y->label);\n $data_ind_kegiatan['data']\t = \"rencana_aksi\";\n $data_ind_kegiatan['type'] = \"rencana_aksi\";\n $data_ind_kegiatan['icon']\t = 'jstree-ind_kegiatan';\n\n //coba tes children\n $cd = RencanaAksi::WHERE('indikator_subkegiatan_id',$y->id)->select('id')->count();\n if ( $cd != null ){\n $data_ind_kegiatan['children'] = true ;\n }else{\n $data_ind_kegiatan['children'] = false ;\n }\n \n \n \n $ind_kegiatan_list[] = $data_ind_kegiatan ;\n }\t\n if(!empty($ind_kegiatan_list)) { \n $data_kegiatan['children'] = $ind_kegiatan_list;\n }\n $kegiatan_list[] = $data_kegiatan ;\t\n $ind_kegiatan_list = \"\";\n unset($data_kegiatan['children']);\n }\t\n\n if(!empty($kegiatan_list)) {\n return $kegiatan_list;\n }else{\n return \"[{}]\";\n } \n\n break;\n case 'rencana_aksi':\n //Rencana aksi\n $ra = RencanaAksi::WHERE('indikator_kegiatan_id',$node_id)->get();\n foreach ($ra as $z) {\n $data_rencana_aksi['id']\t = \"RencanaAksi|\".$z->id;\n $data_rencana_aksi['text']\t = Pustaka::capital_string($z->label).' ['. Pustaka::bulan($z->waktu_pelaksanaan).']';\n $data_rencana_aksi['icon']\t = 'jstree-rencana_aksi';\n $data_rencana_aksi['data']\t = \"kegiatan_bulanan\";\n $data_rencana_aksi['type'] = \"kegiatan_bulanan\";\n \n\n //coba tes children\n $cd = KegiatanSKPBulanan::WHERE('rencana_aksi_id',$z->id)->select('id')->count();\n if ( $cd != null ){\n $data_rencana_aksi['children'] = true ;\n }else{\n $data_rencana_aksi['children'] = false ;\n }\n $rencana_aksi_list[] = $data_rencana_aksi;\n }\n \n if(!empty($rencana_aksi_list)) { \n return $rencana_aksi_list;\n }else{\n return \"[{}]\";\n }\n break;\n case 'kegiatan_bulanan':\n $kb = KegiatanSKPBulanan::WHERE('rencana_aksi_id',$node_id)->get();\n foreach ($kb as $a) {\n $data_keg_bulanan['id']\t = \"KegiatanBulanan|\".$a->id;\n $data_keg_bulanan['text']\t\t= 'Target : '. $a->target.' '.$a->satuan/* .' / Pelaksana : '.Pustaka::capital_string($a->RencanaAksi->pelaksana->jabatan) */;\n $data_keg_bulanan['icon']\t = 'jstree-target';\n $data_keg_bulanan['data']\t = \"\";\n $data_keg_bulanan['type'] = \"\";\n $data_keg_bulanan['children'] = false ;\n \n $keg_bulanan_list[] = $data_keg_bulanan ;\n }\t\n \n if(!empty($keg_bulanan_list)) { \n return $keg_bulanan_list;\n }else{\n return \"[{}]\";\n }\n break;\n default:\n return \"[{}]\";\n break;\n }\n \n \n }", "title": "" }, { "docid": "62fd4f7df346d529e20882e8cb33fa2d", "score": "0.50125396", "text": "function interia_get_tree() {\n global $mdbd;\n global $lang;\n global $DOCUMENT_ROOT;\n global $database;\n //print \"cos\";\n $soap_request=$this->_interia_get_head();\n $soap_request.=$this->_interia_get_data();\n $soap_request.=$this->_interia_get_foot();\n if(!empty($soap_request)) {\n if($this->status) {\n //print \"file\";\n $filename=\"$DOCUMENT_ROOT/tmp/interia\";\n $fp = fopen($filename,'r');\n $content = fread($fp, filesize($filename));\n fclose($fp);\n } else {\n $content=$this->soap->send_soap_category($soap_request);\n $fd=@fopen(\"$DOCUMENT_ROOT/tmp/interia\",\"w+\");\n fwrite($fd,$content,strlen($content));\n fclose($fd);\n }\n if($this->_interia_send_request($content,\"trans\")) {\n\n $tree=$this->XMLtoArray($this->_values);\n $this->tree=@$tree['SOAP-ENV:ENVELOPE']['SOAP-ENV:BODY']['NAMESP1:GETCATEGORIESRESPONSE']['CATEGORIES']['CATEGORY'];\n\n if(isset($this->tree)) {\n $this->_interia_clear_table_db('interia_main_category');\n foreach($this->tree as $key=>$value) {\n if($value['PARENT']['content'] == 0 ) {\n $main_category=$value['NAME']['content'];\n $user_id=$value['ID']['content'];\n $main_category=$this->_interia_utf8_to_8859_2($main_category);\n $database->sql_insert(\"interia_main_category\",array(\"name\"=>$main_category,\"user_id\"=>$user_id));\n } else {\n $main_category=$value['NAME']['content'];\n $main_category=$this->_interia_utf8_to_8859_2($main_category);\n $database->sql_insert(\"interia_main_tree\",array(\"name\"=>$main_category,\"id_cat\"=>$value['ID']['content'],\"id_parent\"=>$value['PARENT']['content']));\n }\n }\n } else {\n return false;\n }\n if(!empty($this->tree)) {\n $this->_interia_select_category();\n print \"<center>\".$lang->interia_get_cat['tree_load_ok'].\"<center>\";\n } else {\n print \"<center>\".$lang->interia_get_cat['tree_load_error'].\"<center>\";\n }\n }\n return false;\n }\n return false;\n }", "title": "" }, { "docid": "8b1c6e2f9f35cf499387a960f1871d2c", "score": "0.50080234", "text": "public function print(){\n foreach($this->nodes as $node){\n echo $node->getId() . \" --> \";\n foreach($node->getEdges() as $edge){\n echo $edge->getEndNode()->getId() . \" \";\n }\n echo \"<br>\";\n }\n }", "title": "" }, { "docid": "2a65be3bde9c8b6751240911c4a6e51d", "score": "0.5007534", "text": "function get_nodes() {\r\n\t\t// Select user data to be displayed.\r\n\t\t$query = $this->db->get(\"nodes\");\r\n\t\treturn $query->result_array();\r\n\t}", "title": "" }, { "docid": "3fc5d656e354949fcbb62398acbbe7d8", "score": "0.50047415", "text": "function page_manutencaoPermlink() \n{\n $vQuery = \"SELECT *\n FROM `node` as n\n LEFT JOIN field_data_field_permlink as per ON per.entity_id = n.nid\n WHERE field_permlink_value is null\";\n\n $result = db_query($vQuery);\n global $base_url;\n\n foreach ($result as $res) {\n $vLink = $base_url . '/' . utf8_decode(drupal_lookup_path('alias', 'node/' . $res->nid));\n $vLinkPerm = file_get_contents('http://leiaja.me/ws/?url=' . $vLink);\n\n db_insert('field_data_field_permlink')->fields(array(\n 'entity_type' => 'node',\n 'bundle' => $res->type,\n 'deleted' => 0,\n 'entity_id' => $res->nid,\n 'revision_id' => $res->nid,\n 'language' => 'pt-br',\n 'delta' => 0,\n 'field_permlink_value' => trim($vLinkPerm)\n ))->execute();\n\n echo \"nid: {$res->nid} $vLink => $vLinkPerm<hr/>\";\n }\n}", "title": "" }, { "docid": "daafb433eb278cb5c2d177520cc78eac", "score": "0.49982488", "text": "public function odobri()\n {\n }", "title": "" }, { "docid": "b63596f534d963bb8fec4381d3a00398", "score": "0.49981874", "text": "function printTreeNode($node){\n if($node){\n $person = $node->getPerson();\n if($person){\n $display = $node->getPerson()->getDisplayExtension();\n ?>\n <tr>\n <td><?= $display->getAscendancyNumber(); ?></td>\n <td><a href=\"/examples/ReadPerson.php?personId=<?= $person->getId(); ?>\"><?= $person->getId(); ?></a></td>\n <td><?= $display->getName(); ?></td>\n </tr>\n <?php\n }\n }\n }", "title": "" }, { "docid": "82ea17d7e3896a8daf558abc3cc98841", "score": "0.49970585", "text": "function opc_httree(/* tree-object - xhtml(T/F) */){\n $ar = func_get_args();\n $def = array(NULL,FALSE);\n $typ = array('object','boolean');\n list($tree,$xhtml) = ops_arguments::setargs($ar,$def,$typ,1);\n $this->tree = $tree;\n parent::opc_ht($xhtml);\n $this->url = $this->myself();\n }", "title": "" }, { "docid": "f52c8f9546a6d2488c4a71a39ced73ac", "score": "0.4996737", "text": "public function getnodes() {\r\n\t // the second parameter (true) means we only want direct children\r\n\t\tif (isset($_POST['node']) && $_POST['node'] != 0 && $_POST['node'] != 'root') {\r\n\t\t\t$parent_id = $_POST['node'];\r\n\t\t} else {\r\n\t\t\t$parent_id = null;\r\n\t\t}\r\n\t\t$nodes = $this->Tag->children($parent_id, true);\r\n\t\t\t\r\n\t $rearranged_nodes = array('branches' => array(), 'leaves' => array());\r\n\t foreach ($nodes as $key => &$node) {\r\n\t \t$tag_id = $node['Tag']['id'];\r\n\t \t\r\n\t \t// Check for children\r\n\t \t$has_children = $this->Tag->childCount($tag_id, true);\r\n\t \tif ($has_children) {\r\n\t \t\t$tag_name = $node['Tag']['name'];\r\n\t \t\t$rearranged_nodes['branches'][$tag_name] = $node;\r\n\t \t} else {\r\n\t\t\t\t$rearranged_nodes['leaves'][$tag_id] = $node;\t\r\n\t \t}\r\n\t }\r\n\r\n\t // Sort nodes by alphabetical branches, then alphabetical leaves\r\n \tksort($rearranged_nodes['branches']);\r\n \tksort($rearranged_nodes['leaves']);\r\n\t\t$nodes = array_merge(\r\n\t\t\tarray_values($rearranged_nodes['branches']),\r\n\t\t\tarray_values($rearranged_nodes['leaves'])\r\n\t\t);\r\n\t \r\n\t // Visually note categories with no data\r\n\t $showNoCommentaries = true;\r\n\r\n\t // send the nodes to our view\r\n\t $this->set(compact('nodes', 'showNoCommentaries'));\r\n\r\n\t $this->layout = 'blank';\r\n\t}", "title": "" }, { "docid": "df6754bf99a675e909d9b0e9df50cb2f", "score": "0.4988851", "text": "protected function inclure_meta_donnees_open_graph() {\r\n }", "title": "" }, { "docid": "b54cb563583325225e0ddea7ea4c180a", "score": "0.49873978", "text": "public function build_node($node_id, $tour_uri) {\n $images = array();\n $audio_url = null;\n // Get the node title.\n $title = '';\n $this->db->where('node_id', $node_id);\n $query = $this->db->get('nodes');\n if ($query->num_rows() == 1)\n $title = $query->row()->node_name;\n // Get the slides and the media.\n $this->db->where('node_id', $node_id);\n $query = $this->db->get('slides');\n if ($query->num_rows() > 0) {\n foreach ($query->result() as $row) {\n if ($row->seq_num == 0)\n $audio_url = base_url().$row->media_uri;\n else {\n $images[$row->seq_num] = array(\n 'url' => base_url().$row->media_uri,\n 'caption' => $row->caption\n );\n }\n }\n ksort($images);\n }\n $h = array();\n $h[] = '<!DOCTYPE html>';\n $h[] = ' <head>';\n $h[] = ' <meta charset=\"utf-8\">';\n $h[] = ' <meta name=\"viewport\" content=\"initial-scale=1\">';\n $h[] = ' <title>CamelTours</title>';\n foreach ($this->ico as $ico) {\n $h[] = ' <link rel=\"shortcut icon\" href=\"'.base_url().$ico.'\"/>';\n }\n foreach ($this->css as $css) {\n $h[] = ' <link rel=\"stylesheet\" href=\"'.base_url().$css.'\">';\n }\n $h[] = ' </head>';\n $h[] = ' <body>';\n $h[] = ' <div id=\"loader\" class=\"outer-centerer\">';\n $h[] = ' <div class=\"middle-centerer\">';\n $h[] = ' <div class=\"inner-centerer text-center\">';\n $h[] = ' <h2>Please wait while your content loads...</h2>';\n $h[] = ' </div>';\n $h[] = ' </div>';\n $h[] = ' </div>';\n $h[] = ' <div class=\"swiper-container\" style=\"visibility: hidden;\">';\n //pagegination\n $h[] = '<div class=\"swiper-pagination\"></div>';\n //Add Arrows -->\n $h[] = '<div class=\"swiper-button-next\"></div>';\n $h[] = '<div class=\"swiper-button-prev\"></div>';\n if ($audio_url) {\n $h[] = ' <div class=\"audiobar\">';\n $h[] = ' <audio id=\"node-audio\" controls>';\n $h[] = ' <source src=\"'.$audio_url.'\" type=\"audio/mpeg\">';\n $h[] = ' Your browser does not support the audio tag.';\n $h[] = ' </audio>';\n $h[] = ' </div>';\n }\n $h[] = ' <div class=\"pagination\"></div>';\n $h[] = ' <div class=\"swiper-container\"></div>';\n $h[] = ' <div class=\"swiper-wrapper\">';\n $h[] = ' <div class=\"swiper-slide\">';\n $h[] = ' <div class=\"inner\">';\n $h[] = ' <div class=\"swiper-intro\">';\n $h[] = ' <div class=\"intro-content\">';\n $h[] = ' <br><br>';\n $h[] = ' <h3>'.$title.'</h3>';\n $h[] = ' <div class=\"callout-button\">';\n if ($audio_url) {\n $h[] = ' <h3><a id=\"node-control\" class=\"button-border\" href=\"#\">Begin Audio</a></h3>';\n }\n elseif (count($images) > 0) {\n $h[] = ' <h3><a id=\"node-control\" class=\"button-border\" href=\"#\">Swipe! &#9755;</a></h3>';\n }\n else {\n $h[] = ' <h3>No media found for this node.</h3>';\n }\n $h[] = ' </div>';\n $h[] = ' <a href=\"'.base_url().$tour_uri.'\">Tour Home</a>';\n $h[] = ' </div>';\n $h[] = ' </div>';\n $h[] = ' </div>';\n $h[] = ' </div>';\n foreach ($images as $seq_num => $img) {\n $h[] = ' <div class=\"swiper-slide\">';\n $h[] = ' <div class=\"inner\">';\n $h[] = ' <img src=\"'.$img['url'].'\">';\n $h[] = ' <div class=\"caption\"> '.$img['caption'].' </div>';\n $h[] = ' </div>';\n $h[] = ' </div>';\n }\n $h[] = ' </div>';\n $h[] = ' </div>';\n $h[] = ' </div>';\n \n \n $h[] = \"<script>\n var swiper = new Swiper('.swiper-container', {\n pagination: '.swiper-pagination',\n nextButton: '.swiper-button-next',\n prevButton: '.swiper-button-prev',\n slidesPerView: 1,\n paginationClickable: true,\n spaceBetween: 30,\n loop: true\n });\n </script>\";\n \n foreach ($this->js as $js) {\n $h[] = ' <script src=\"'.base_url().$js.'\"></script>';\n }\n $h[] = ' </body>';\n $h[] = '</html>';\n // Define the node index file.\n $node_file = getcwd().'/'.$tour_uri.'/n'.$node_id.'/index.html';\n // Create the HTML string to write to file.\n $html = implode(\"\\n\", $h);\n // Write the string!\n file_put_contents($node_file, $html);\n }", "title": "" }, { "docid": "9c209542dde92639138e8ab33bbf786d", "score": "0.49870685", "text": "function hline($id, $y_pos, $tags){\n\tglobal $time, $user, $left, $right;\n\tprint \"\\t<node id='\".((-3*$id)-1).\"' timestamp='$time' user='$user' visible='true' version='1' lat='$y_pos' lon='$left' />\\n\";\n\tprint \"\\t<node id='\".(-3*$id-2).\"' timestamp='$time' user='$user' visible='true' version='1' lat='$y_pos' lon='$right' />\\n\";\n print \"\\t<way id='\".(-3*$id-3).\"' timestamp='$time' user='$user' visible='true' version='1'>\\n\".\n \"\\t\\t<nd ref='\".(-3*$id-1).\"' />\\n\".\n \"\\t\\t<nd ref='\".(-3*$id-2).\"' />\\n\".\n\t\t\"\\t\\t$tags\\n\".\n \"\\t</way>\\n\";\n}", "title": "" }, { "docid": "c40486a22aa1cccb7f4f3296623cae73", "score": "0.49843547", "text": "public function __construct($data_ip,$data_port,$data_root,$data_pwd,$data_data,$node_id,$node_trans,$node_ip,$node_root,$node_pwd,$node_port,$path)\n {\n $this->data_ip = $data_ip;\n $this->data_port = $data_port;\n $this->data_root = $data_root;\n $this->data_pwd = $data_pwd;\n $this->data_data = $data_data;\n $this->node_id = $node_id;\n $this->node_trans = $node_trans;\n $this->node_ip = $node_ip;\n $this->data_ip = $data_ip;\n $this->node_root = $node_root;\n $this->node_pwd = $node_pwd;\n $this->node_port = $node_port;\n $this->path = $path;\n }", "title": "" }, { "docid": "181692d42789416016bef2c87f2e9c56", "score": "0.49802944", "text": "function dump_node()\r\n {\r\n echo $this->tag;\r\n if ($this->hasAttributes()){\r\n echo 'Attributes: ';\r\n foreach ($this->getAttributes() as $attribute => $value) {\r\n echo \"[$attribute] =>\\\"\". $value .'\", ';\r\n }\r\n }\r\n echo \"\\n\";\r\n\r\n if (count($this->nodeInfo) > 0)\r\n {\r\n $array = new MollyArray($this->nodeInfo);\r\n echo 'Nodeinfo (';\r\n echo $array;\r\n echo ')';\r\n }\r\n\r\n if (isset($this->text))\r\n {\r\n echo \" text: (\" . $this->text . \")\";\r\n }\r\n\r\n echo \" children: \" . count($this->getChildNodes());\r\n echo \" nodes: \" . count($this->getLinkedNodes());\r\n echo \" tag_start: \" . $this->tag_start;\r\n echo \"\\n\";\r\n }", "title": "" }, { "docid": "a857c71c3cd4a95a18387f2afd5e5a73", "score": "0.49780813", "text": "function updateNode($nid, $rid, $lang) {\n $request = Vostan::getInstance() -> request();\n $body = $request -> getBody();\n $input = json_decode($body);\n try {\n $db = getConnection();\n\n if ($lang == \"en\") {\n $lang = \"\";\n } else {\n $lang = \"_$lang\";\n }\n $sql1 = \"UPDATE nodes SET title$lang = :title, img = :img, txt$lang = :txt, modified = date(), script = :script, tags$lang = :tags, users = :users, viewers = :viewers\n WHERE nodeID = :nid;\";\n $stmt = $db -> prepare($sql1);\n $stmt -> bindParam(\"nid\", $nid);\n $stmt -> bindParam(\"title\", $input -> title);\n $stmt -> bindParam(\"img\", $input -> img);\n $stmt -> bindParam(\"txt\", $input -> txt);\n $stmt -> bindParam(\"script\", $input -> script);\n $stmt -> bindParam(\"tags\", $input -> tags);\n $stmt -> bindParam(\"users\", $input -> users);\n $stmt -> bindParam(\"viewers\", $input -> viewers);\n $stmt -> execute();\n\n $sql2 = \"UPDATE settings SET\n top = :top,\n left = :left,\n width = :width,\n height = :height,\n imgWidth = :imgWidth,\n imgHeight = :imgHeight,\n imgLeft = :imgLeft,\n imgTop = :imgTop,\n titleWidth = :titleWidth,\n titleHeight = :titleHeight,\n titleLeft = :titleLeft,\n titleTop = :titleTop,\n txtWidth = :txtWidth,\n txtHeight = :txtHeight,\n txtLeft = :txtLeft,\n txtTop = :txtTop,\n titleInclude = :titleInclude,\n imgInclude = :imgInclude,\n txtInclude = :txtInclude,\n modified = date(),\n leaf = :leaf,\n carousel = :carousel\n WHERE nodeID = :rid AND linkedNodeID = :nid; \";\n $stmt = $db -> prepare($sql2);\n $stmt -> bindParam(\"rid\", $rid);\n $stmt -> bindParam(\"nid\", $nid);\n $stmt -> bindParam(\"top\", $input -> top);\n $stmt -> bindParam(\"left\", $input -> left);\n $stmt -> bindParam(\"width\", $input -> width);\n $stmt -> bindParam(\"height\", $input -> height);\n $stmt -> bindParam(\"imgWidth\", $input -> imgWidth);\n $stmt -> bindParam(\"imgInclude\", $input -> imgInclude);\n $stmt -> bindParam(\"imgHeight\", $input -> imgHeight);\n $stmt -> bindParam(\"imgLeft\", $input -> imgLeft);\n $stmt -> bindParam(\"imgTop\", $input -> imgTop);\n $stmt -> bindParam(\"titleWidth\", $input -> titleWidth);\n $stmt -> bindParam(\"titleInclude\", $input -> titleInclude);\n $stmt -> bindParam(\"titleHeight\", $input -> titleHeight);\n $stmt -> bindParam(\"titleLeft\", $input -> titleLeft);\n $stmt -> bindParam(\"titleTop\", $input -> titleTop);\n $stmt -> bindParam(\"txtWidth\", $input -> txtWidth);\n $stmt -> bindParam(\"txtHeight\", $input -> txtHeight);\n $stmt -> bindParam(\"txtLeft\", $input -> txtLeft);\n $stmt -> bindParam(\"txtTop\", $input -> txtTop);\n $stmt -> bindParam(\"txtInclude\", $input -> txtInclude);\n $stmt -> bindParam(\"leaf\", $input -> leaf);\n $stmt -> bindParam(\"carousel\", $input -> carousel);\n\n $stmt -> execute();\n\n $db = null;\n\n echoResponse('{\"root\":' . $rid . '}');\n } catch(PDOException $e) {\n echoResponse('{\"error\":{\"updateNode\":\"' . $e -> getMessage() . '\"}}');\n }\n}", "title": "" }, { "docid": "cc1808ff193c0ca972e8b4c61d99849a", "score": "0.49760982", "text": "function get_shop_in_tree($uid)\n {\n $parent = 0;\n $user = $this->user_model->get(\"use_id, parent_id\", \"use_id = \". $uid); //lấy nó\n $u_pa_1 = $this->user_model->get(\"use_id, use_group, parent_id, parent_shop\", \"use_id = \". (int)$user->parent_id); // lấy cho nó\n if (!empty($u_pa_1)) {\n $parent = $u_pa_1->parent_shop > 0 ? $u_pa_1->parent_shop : $u_pa_1->parent_id;\n }\n\n // if($u_pa_1 && $u_pa_1->use_group == 3){\n // $parent = $u_pa_1->use_id;\n // } elseif ($u_pa_1 && $u_pa_1->use_group == 14) {\n // $u_pa_2 = $this->user_model->get(\"use_id, use_group, parent_id\", \"use_id = \". (int)$u_pa_1->parent_id);\n // if($u_pa_2 && $u_pa_2->use_group == 3){\n // $parent = $u_pa_2->use_id;\n // } else {\n // $u_pa_3 = $this->user_model->get(\"use_id, use_group, parent_id\", \"use_id = \". (int)$u_pa_2->parent_id);\n // if($u_pa_3 && $u_pa_3->use_group == 3) {\n // $parent = $u_pa_3->use_id;\n // }\n // }\n // } elseif ($u_pa_1 && $u_pa_1->use_group == 15) {\n // $u_pa_2 = $this->user_model->get(\"use_id, use_group, parent_id\", \"use_id = \". (int)$u_pa_1->parent_id);\n // if($u_pa_2 && $u_pa_2->use_group == 3){\n // $parent = $u_pa_2->use_id;\n // }\n // } elseif ($u_pa_1 && $u_pa_1->use_group == 11) {\n // $u_pa_2 = $this->user_model->get(\"use_id, use_group, parent_id\", \"use_id = \". (int)$u_pa_1->parent_id);\n // if($u_pa_2 && $u_pa_2->use_group == 3){\n // $parent = $u_pa_2->use_id;\n // } elseif ($u_pa_2 && $u_pa_2->use_group == 14) {\n // $u_pa_3 = $this->user_model->get(\"use_id, use_group, parent_id\", \"use_id = \". (int)$u_pa_2->parent_id);\n // if($u_pa_3 && $u_pa_3->use_group == 3) {\n // $parent = $u_pa_3->use_id;\n // } else {\n // $u_pa_4 = $this->user_model->get(\"use_id, use_group, parent_id\", \"use_id = \". (int)$u_pa_3->parent_id);\n // if($u_pa_4 && $u_pa_4->use_group == 3) {\n // $parent = $u_pa_4->use_id;\n // }\n // }\n // }\n // }\n return $parent;\n }", "title": "" }, { "docid": "a72a55014d7fd4ba4360cad3c1d6fc02", "score": "0.4972082", "text": "public function renderNode() {\r\n\t\t global $_whomp_template_class, $_whomp_storage_url;\r\n\t\t\r\n\t\t // insert the node xml\t \r\n\t\t $_whomp_template_class->insertXml($_whomp_storage_url . $this->_xml_path);\r\n\t\t // insert the node xsl\r\n\t\t $_whomp_template_class->insertXsl($_whomp_storage_url . $this->_xsl_path);\r\n\t\t // transform the document\r\n\t\t $_whomp_template_class->transformTemplate();\r\n\t\t // render the document and get options\r\n\t\t $options = $_whomp_template_class->renderTemplate();\r\n\t\t // add more information to the options array\r\n\t\t $options['language'] = $this->language;\r\n\t\t $options['page'] = $this->page;\r\n\t\t // check if we are editing\r\n\t\t if ($this->_edit) {\r\n\t\t\t // if so, set content type to html\r\n\t\t\t header('Content-type: text/html');\r\n\t\t } // end if\r\n\t\t return $options;\t \r\n\t }", "title": "" }, { "docid": "1db62f3a57c80b348b461a860996ea26", "score": "0.49642655", "text": "function getNeighbors(){\n }", "title": "" }, { "docid": "251d2dc3a0f95a5c98cf506315d6cce5", "score": "0.49628448", "text": "function nodoGetName($nodo)\r\n{\n //echo 'entre a nodoGetName (comun.php) <br>';mio\r\n $nodoXML = $nodo->asXML();\n //echo 'haber:'.$nodo.'<br>nodo:'.$nodoXML;mio\r\n // Se elimina la primera linea del XML: <?xml version=\"1.0\"? >\r\n if (substr($nodoXML, 1, 4) == '?xml') {\n //echo 'entre al 1º if de nodoGetName (comun.php) <br>';mio\r\n $nodoXML_ = strtok($nodoXML, \"\\n\");\r\n $nodoXML = strtok(\"\\n\");\r\n }\r\n $stringXML = substr(ltrim($nodoXML), 1);\r\n $nombre = strtok($stringXML, ' >');\r\n if ($nombre == '?xml') {\n //echo 'entre al 2º if de nodoGetName (comun.php) <br>';mio\r\n echo $stringXML.\"<br />\\n\";\r\n }\r\n return $nombre;\r\n}", "title": "" }, { "docid": "180a167783acc93603881283ac82358f", "score": "0.49615818", "text": "function libvirt_node_get_info($conn) : array|false\n{\n}", "title": "" }, { "docid": "b3feb3aa5ec35db07eccb7d5e5f934af", "score": "0.49615663", "text": "function antibody_define_node_type () {\n $content['type'] = array(\n 'name' => 'Antibody',\n 'type' => 'antibody',\n 'description' => 'Antibody description',\n 'has_title' => TRUE,\n 'has_body' => TRUE,\n 'title_label' => 'Title',\n 'body_label' => 'Body',\n 'min_word_count' => '0',\n 'help' => '',\n 'node_options' => \n array(\n 'status' => TRUE,\n 'promote' => FALSE,\n 'sticky' => FALSE,\n 'revision' => FALSE,\n ),\n 'upload' => TRUE,\n 'print_display' => '1',\n 'orig_type' => '',\n 'module' => 'node',\n 'custom' => FALSE,\n 'modified' => FALSE,\n 'locked' => FALSE,\n 'content_profile' => FALSE,\n 'comment' => '2',\n 'comment_default_mode' => '4',\n 'comment_default_order' => '1',\n 'comment_default_per_page' => '50',\n 'comment_controls' => '3',\n 'comment_anonymous' => 0,\n 'comment_subject_field' => '1',\n 'comment_preview' => '1',\n 'comment_form_location' => '0',\n 'print_display_comment' => '0',\n );\n $content['fields'] = array(\n array(\n 'widget_type' => 'nodereference_autocomplete',\n 'label' => 'Gene',\n 'weight' => '',\n 'description' => '',\n 'default_value_widget' => \n array(\n 'field_gene' => \n array(\n array(\n 'nid' => NULL,\n ),\n ),\n ),\n 'default_value_php' => '',\n 'group' => FALSE,\n 'required' => '0',\n 'multiple' => '1',\n 'previous_field' => '',\n 'referenceable_types' => array ('gene' => 'gene'),\n 'field_name' => 'field_gene',\n 'type' => 'nodereference',\n 'module' => 'nodereference',\n 'widget_module' => 'nodereference',\n 'columns' => \n array(\n 'nid' => \n array(\n 'type' => 'int',\n 'unsigned' => TRUE,\n 'not null' => FALSE,\n ),\n ),\n 'default_value' => \n array(\n array(\n 'nid' => NULL,\n ),\n ),\n ),\n array(\n 'widget_type' => 'text_textfield',\n 'label' => 'Source',\n 'weight' => '',\n 'rows' => 1,\n 'description' => 'From what lab can this Antibody be obtained?',\n 'default_value_widget' => \n array(\n 'field_source' => \n array(\n array(\n array(\n 'value' => '',\n ),\n 'value' => '',\n ),\n ),\n ),\n 'default_value_php' => '',\n 'group' => FALSE,\n 'required' => '0',\n 'multiple' => '1',\n 'previous_field' => '',\n 'text_processing' => '0',\n 'max_length' => '',\n 'allowed_values' => '',\n 'allowed_values_php' => '',\n 'field_name' => 'field_source',\n 'type' => 'text',\n 'module' => 'text',\n 'widget_module' => 'text',\n 'columns' => \n array(\n 'value' => \n array(\n 'type' => 'text',\n 'size' => 'big',\n 'not null' => FALSE,\n 'sortable' => TRUE\n )\n )\n )\n );\n $macro = \"\\$content = \" . var_export($content, TRUE) . \";\\n\";\n $form_state['values'] = array(\n 'type_name' => '<create>',\n 'macro' => $macro,\n 'op' => t('Submit')\n );\n drupal_load('module', 'content_copy');\n drupal_execute('content_copy_import_form', $form_state);\n}", "title": "" }, { "docid": "6971bef7655240675115cf745d901c0c", "score": "0.495691", "text": "function tree (){$this->add($this->tree2arr());}", "title": "" }, { "docid": "197eadae5b893a0b23711469f986ae65", "score": "0.4944779", "text": "private function setNodeData($data) {\n $nowTime = new \\DateTime();\n $posted = date('Y-m-d\\TH:i:s', strtotime($data->created_at));\n $user = \\Drupal::currentUser();\n $ip = \\Drupal::request()->getClientIp();//get user's IP\n\n $links = [];\n\n $terms = $this->processTerms($data);\n\n if (!empty($data->entities->urls)) {\n foreach ($data->entities->urls as $url) {\n $links[] = !strpos($url->display_url, 'http') ? 'http://' . $url->display_url : $url->display_url;\n }\n }\n //Check for attached media and create a directory for saving\n if (isset($data->extended_entities->media)) {\n $media = $this->getTweetMedia($data);\n }\n\n if ($data->user->profile_image_url_https) {\n //TODO get profile image\n }\n\n $node = Node::create([\n 'type' => 'tweet',\n 'title' => $data->user->screen_name . '_' . $nowTime->format('Y.m.d.Hi'),\n 'uid' => $user->id(),\n 'field_tags' => $terms->tags,\n 'field_tweet_url' => $this->parameter,\n 'field_twit_id' => $data->id,\n 'field_post_date' => [$posted],\n 'field_username' => $terms->username,\n 'field_users' => $terms->users,\n 'field_links' => $links,\n 'status' => 1,\n ]);\n\n $node->set('body', ['value' => '<div class=\"created-date\"> ' . $data->created_at . '</div>' . $data->full_text, 'format' =>'full_html']);\n return $node;\n\n }", "title": "" }, { "docid": "3d4ff1b92e36035791f24233a29347c0", "score": "0.49396405", "text": "function getNodes() {\n global $miner; \n\t$url = $miner[\"url\"] . \":\" . $miner[\"port\"] . \"/data/get-nodes\";\n\t$HTML = getURL($url);\n\treturn $HTML;\n}", "title": "" }, { "docid": "9dc73ed3100e86bb3b0f0756faa0d251", "score": "0.49360308", "text": "public function getNodesAction()\n\t{\n\t\t// New view\n\t\t$view = $this->view();\n\n\t\t// Grabbing Entity manager & repository\n\t\t$em\t\t = $this->getDoctrine()->getManager('psi_db');\n\t\t$nodeRepo = $em->getRepository('AppBundle:Node');\n\n\t\t$nodes = $nodeRepo->getAllNotIdiotaxons();\n\n\t\t// Return\n\t\t$view->setData($nodes);\n\t\treturn $this->handleView($view);\n\t}", "title": "" }, { "docid": "32c063dfa679e567e9cbb2b755c299b6", "score": "0.4934095", "text": "function getNodes($node=\"\", $tree=1 ,$echo=false){\n\t\t\n\t\tstatic $nodes;\n\t\tstatic $nodes2;\n\t\t\n\t\tif($echo){\n\t\t\t\n\t\t\tif($tree === 1){\n\t\t\t\t$nodes .= $node.\"@\";\n\t\t\t}\n\t\t\n\t\t\telse if($tree === 2){\n\t\t\t\t$nodes2 .= $node.\"@\";\n\t\t\t}\n\t\t}\t\t\n\t\telse{\n\t\t\t// Trim off extra \"@\" delimeter and return the array of values\n\t\t\tif($tree === 1){\n\t\t\t\t$pos = strripos($nodes,\"@\");\n\t\t\t\t$nodes = substr($nodes, 0, $pos);\n\t\t\t\techo json_encode(explode('@', $nodes));\n\t\t\t}\n\t\t\telse if($tree === 2){\n\t\t\t\t$pos = strripos($nodes2,\"@\");\n\t\t\t\t$nodes2 = substr($nodes2, 0, $pos);\n\t\t\t\techo json_encode(explode('@', $nodes2));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "11976cbba1c5a2265286ef114d5ef673", "score": "0.4928698", "text": "function visibility(){\n $mlev = 0;\n $arr = $this->tree->doOnAll('extractOverAll',\n\t\t\t array($this,'_cb_getvis'),\n\t\t\t ($this->_ajax & 1)==1);\n $ak = array_keys($arr);\n $llev = -1;\n foreach($ak as $ck){\n $clev = $arr[$ck]['_lev'];\n $arr[$ck]['_dlev'] = $clev - $llev;\n if(!isset($arr[$ck]['tip'])) $arr[$ck]['tip'] = NULL;\n $arr[$ck]['_rep'] = 0;\n $mlev = max($clev,$mlev);\n $llev = $clev;\n }\n\n $this->_max_level = $mlev;\n\n $rak = array_reverse($ak);\n $ctyp = $llev>0?array_fill(0,$llev,0):array();\n $ctyp[] = 3;\n $arr[array_shift($rak)]['_struc'] = $ctyp; // last node directly\n foreach($rak as $ck){ // go through and find out the relation between them\n $pk = $arr[$ck]['pid'];\n while(!is_null($pk)){\n $arr[$pk]['_rep']++;\n $pk = $arr[$pk]['pid'];\n }\n $clev = $arr[$ck]['_lev'];\n if($clev==$llev){ // sister\n $ctyp[$clev] = 2;\n } else if($clev<$llev){ // parent\n unset($ctyp[$llev--]);\n $ctyp[$llev] = $ctyp[$llev]==0?3:2; // . -> L; | -> t\n } else { // nephew\n for($ii=0;$ii<=$llev;$ii++) if($ctyp[$ii]!=0) $ctyp[$ii] = 1;\n for($ii=$llev+1;$ii<$clev;$ii++) $ctyp[$ii] = 0;\n $ctyp[$clev] = 3;\n $llev = $clev;\n }\n $arr[$ck]['_struc'] = $ctyp;\n }\n \n // forward loop for anchor element and bimg\n foreach($ak as $ck){\n $cline = $arr[$ck];\n if($this->anchor==4) {\n $cline['bimg'] = 'background: url('\n\t . $this->pict_anchor[$cline['_kind']] . ')'\n\t .' no-repeat ' . $this->pict_align . ';';\n }\n $cline['element'] = $this->_link($cline,FALSE);\n $cline['anchor'] = $this->_link($cline,TRUE);\n $arr[$ck] = $cline;\n }\n return($arr);\n }", "title": "" }, { "docid": "4d5f56003bede48e98b85c0716ffe4e2", "score": "0.4914315", "text": "function uottawa_lang_editor_extend_node(&$node, $language) {\r\n $node->language = $language;\r\n // default values for path\r\n $node->path = array(\r\n 'pid' => '',\r\n 'source' => '',\r\n 'alias' => '',\r\n 'language' => $language\r\n );\r\n if (isset($node->nid)) {\r\n // find the appropriate alias\r\n $rs = db_query_range('\r\n SELECT *\r\n FROM {url_alias}\r\n WHERE source = :source AND language = :lang\r\n ORDER BY pid ASC\r\n ', 0, 1, array(\r\n ':source' => 'node/' . $node->nid,\r\n ':lang' => $language\r\n ));\r\n if ($rs->rowCount() > 0) {\r\n $node->path = $rs->fetchAssoc();\r\n }\r\n }\r\n // Run other preparations on the object.\r\n node_object_prepare($node);\r\n}", "title": "" }, { "docid": "00b8dcb6dfbb881dbea6ad794c38db75", "score": "0.49122915", "text": "function sotb() { \n\t\t\t\tglobal $BF,$info;\n\t\t\t}", "title": "" }, { "docid": "c6e1f3b8d80c060aed76e66e1dbcbd63", "score": "0.48932767", "text": "abstract public function getNodeAt($index);", "title": "" }, { "docid": "22409cee717dc9d05d99cfe2c6cfa0f2", "score": "0.4892572", "text": "function wf_move_tree_element() {\n $model = $this->modelClass;\n $dom_id = $this->data['dom_id'];\t\t\n $number = $this->data['number'];\t\t\n\t\t\n //Possible characters to be used as indicators.\n $up = array('+', '▲', '-1');\n $down = array('-', '▼', '1');\n\t\t\n if(in_array($number, $up)) {\n $number = -1;\n } elseif(in_array($number, $down)) {\n $number = 1;\n } else {\n $number = intval($number);\n }\n\t\t\n list($model_name, $id) = explode('-', $dom_id);\t\t\n $id = intval($id);\n \n \tif($number > 0) {\n $this->$model->moveDown($id, $number);\n } else {\n $this->$model->moveUp($id, abs($number));\n }\n \t\n if($this->RequestHandler->isAjax()) {\n $this->layout = 'xml';\n $this->viewPath = 'elements';\n $this->set('data', $this->data);\n $this->render('json');\n } else {\n $this->redirect(array('action' => 'index')); \t\n }\n }", "title": "" }, { "docid": "99d0eee123ecf2d503cc1bfacd47c5c6", "score": "0.4886107", "text": "public function __construct(array $nodes)\n {\n\n }", "title": "" }, { "docid": "b58f551faaa04e334c0fdad8d1891417", "score": "0.48810565", "text": "function _connectUser($node){\n\t}", "title": "" }, { "docid": "afee7de9c8e11810a6de71435a818e42", "score": "0.48729712", "text": "function oomphbase_preprocess_node(&$variables) {\n\t// Output a class on the damn node title\n\t$variables['title_attributes_array']['class'][] = 'node-title';\n}", "title": "" }, { "docid": "c885a61b023e23b9690ed86146d0570e", "score": "0.4871977", "text": "function recursive_node_output( $node ){\n if ($node->hasChildNodes()) {\n foreach ($node->childNodes as $child){\n recursive_node_output($child);\n }\n } elseif( ! is_node_empty( $node->nodeValue ) && strpos( $node->nodeValue, 'CP' ) === FALSE ) {\n echo format_twitch_text( remove_nl_spaces( $node->nodeValue ) );\n }\n}", "title": "" }, { "docid": "de0b1f992910df8cc9772ac6c8223a0d", "score": "0.4868759", "text": "function appendNode($nid, $rid) {\n $request = Vostan::getInstance() -> request();\n $body = $request -> getBody();\n $input = json_decode($body);\n\n try {\n $db = getConnection();\n\n $sql1 = \"insert into settings (nodeID, linkedNodeID, top, left, titleHeight, modified)\n values (:rid, :nid, 10, 10, 40, date()); \";\n $stmt = $db -> prepare($sql1);\n $stmt -> bindParam(\"rid\", $rid);\n $stmt -> bindParam(\"nid\", $nid);\n $stmt -> execute();\n\n $db = null;\n\n echoResponse('{\"root\":' . $rid . '}');\n } catch(PDOException $e) {\n echoResponse('{\"error\":{\"appendNode\":\"' . $e -> getMessage() . '\"}}');\n }\n}", "title": "" }, { "docid": "d482dfe1a9cc2577244752fa2f5cf3bb", "score": "0.48679754", "text": "function dijkstra($start,$end){\n\t\tglobal $nodeArr,$nodeSolu,$nodeVisited,$nodeWeight;\n\t\t$nodeVisited[]=$start;\n\t\t$out='';\n\t\t// $nodeSolu[]=$end;\n\n\t\tforeach ($nodeArr as $i => $v) { \n\t\t\tif($start==$end) $out='node sama dengan tujuan'; // cek : apa start == end\n\t\t\telse{ // cek : jika tidak sama (beda node)\n\t\t\t\tif($i==$end) { //jika iterasi node ke -i = node tujuan \n\t\t\t\t\t$nodeSolu[]=$i;\n\t\t\t\t\tbreak;\n\t\t\t\t}else{ // jika \n\t\t\t\t\t$minVal=min($nodeArr[$i]); // edge terkecil\n\t\t\t\t\t$isNodeVisited=array_search($minVal, $nodeVisited);\n\t\t\t\t\tif(!$isNodeVisited){ // get index array of \"minimum distance\" where in \"array vsited\"\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}else{ // ada \n\t\t\t\t\t\t$minIndex=array_search($minVal,$nodeArr[$i]); // get index array of \"minimum dist of node\" in row -i \n\t\t\t\t\t\t$nodeVisited[]=$minIndex; \t// update (visited) \n\t\t\t\t\t\t$nodePrev[]=$i; \t// insert node prev \n\t\t\t\t\t\t$nodeWeight[]=$nodeArr[$i][$minIndex];\n\t\t\t\t\t\t// foreach ($v as $ii => $vv) {\n\t\t\t\t\t\t// \t$out.=$minIndex.'<br>';\n\t\t\t\t\t\t// \t$nodeSolu[]=$minIndex;\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}echo $out;\t\n\t}", "title": "" }, { "docid": "cb7c96856f6c8063232d52e30c6de2dd", "score": "0.48659453", "text": "function print_osm_way($idsegment)\n{\n\t$fileOsm=dirname(__DIR__).'/../files/osm/database.osm';\n\n\t$nds = get_NDs_by_id($idsegment);\n\n\t$line = \"<way id='\".$idsegment.\"'>\";\n\tappend_to_file($fileOsm, $line);\n\n\tforeach ($nds as $node) \n\t{\n\t\t$line = \"<nd ref='\".$node['idpointgps'].\"'/>\";\n\t\tappend_to_file($fileOsm, $line);\n\t}\n\n\tappend_to_file($fileOsm, \"</way>\");\n}", "title": "" }, { "docid": "ba3ada4c1af34978f9021f5fdc0b8596", "score": "0.48569238", "text": "function getNodes() {\n global $miner;\n\t$url = $miner[\"url\"] . \":\" . $miner[\"port\"] . \"/enstream/get-nodes\";\n\t$HTML = getURL($url);\n\treturn $HTML;\n}", "title": "" }, { "docid": "b6adc21519b36ccac0cebc245dccaeac", "score": "0.4854048", "text": "function cl_tipodespacho() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tipodespacho\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "997293ea68cd40a67f05f09dffa8519a", "score": "0.48529655", "text": "function addNode($node) {\r\n\t\tif(array_key_exists($node->getName(), $this->data))\r\n\t\t{\r\n\t\t\tif(!is_array($this->data[$node->getName()]))\r\n\t\t\t{\r\n\t\t\t\t$this->data[$node->getName()] = array();\r\n\t\t\t\t$this->data[$node->getName()][] = $node;\r\n\t\t\t}\r\n\t\t\t$this->data[$node->getName()][] = $node;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->data[$node->getName()] = $node;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "955d102e0e85e1c45ee318c85313b0e0", "score": "0.48524952", "text": "function updateNodeList(){\n $raw_node_file = file_get_contents(\"http://y.yakamo.org:3000/current\");\n $nodelist_api_pull = json_decode($raw_node_file, true);\n $replace_non_alnum = array(\"-\", \".\");\n $myfile = fopen(\"nodelist.txt\", \"w+\") or die(\"Unable to create file, please check permissions!\");\n foreach ($nodelist_api_pull{\"yggnodes\"} as $key => $value) {\n if(count($value) === 3){\n if (ctype_alnum(str_replace($replace_non_alnum, \"\", $value{2}))) {\n \t\tfwrite($myfile, $key . \" \" . $value{2} . \"\\n\");\n }\n }\n }", "title": "" }, { "docid": "143455f3f2c58313fc5ef2b095aba6ce", "score": "0.48502794", "text": "function dummyss($id=null){\r\n\t\t$res = $this->welcome_model->getspecificcolomnResult(TBL_TREE,['self_id','child_left','child_right'],[]);\r\n\t\tforeach($res as $row)\r\n\t\t{\r\n\t $this->alldata[$row->self_id] = array($row->child_left , $row->child_right);\r\n\t\t}\r\n\t\t$plan = $this->welcome_model->getspecificcolomnResult('step_income_plan',[],[]);\r\n\t\t$this->isNotFirstTime=0;\r\n $this->isRightStart=0;\r\n\t\t$this->tempFirstRightSponsorId=\"\";\r\n\t\t$this->isDownlineExist($id);\r\n\t\t$templeft=[];\r\n\t\t$tempright=[];\r\n\t\t$leftPlan=[];\r\n\t\t$rightPlan=[];\r\n\t\tfor($i=0; $i<36; $i++){\r\n\t\t\tunset($this->downlineleft[$i]);\r\n\t\t}\r\n\t\tfor($i=0; $i<36; $i++){\r\n\t\t\tunset($this->downlineright[$i]);\r\n\t\t}\r\n\t\t$this->downlineleft = array_values($this->downlineleft);\r\n\t\t$this->downlineright = array_values($this->downlineright);\r\n\t\tfor($i=0; $i<9; $i++){\r\n\t\t\t$templeft[] = array('user_id'=>$this->downlineleft[$i]);\r\n\t\t\tfor($j=$i; $j<count($plan);$j++){\r\n\t\t\t\t$leftPlan[] = array(\r\n\t\t\t\t\t\t\t\t\t'sponsor_id' =>$this->downlineleft[$i],\r\n\t\t\t\t\t\t\t\t\t'upgrade_plan'=>$plan[$j]->plan,\r\n\t\t\t\t\t\t\t\t\t'plan_benifit' => $plan[$j]->income,\r\n\t\t\t\t\t\t\t\t\t'binary_benifi' => $plan[$j]->binary_plan\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor($i=0; $i<9; $i++){\r\n\t\t\t$tempright[] = array('user_id'=>$this->downlineright[$i]);\r\n\t\t\tfor($j=$i; $j<count($plan);$j++){\r\n\t\t\t\t$rightPlan[] = array(\r\n\t\t\t\t\t\t\t\t\t'sponsor_id' => $this->downlineright[$i],\r\n\t\t\t\t\t\t\t\t\t'upgrade_plan'=>$plan[$j]->plan,\r\n\t\t\t\t\t\t\t\t\t'plan_benifit' => $plan[$j]->income,\r\n\t\t\t\t\t\t\t\t\t'binary_benifi' => $plan[$j]->binary_plan\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->welcome_model->fullinsert(USER_ORDER,array_merge($templeft,$tempright));\r\n\t\t$this->db->update_batch(TBL_USER,$rightPlan,'sponsor_id');\r\n\t\t$this->db->update_batch(TBL_USER,$leftPlan,'sponsor_id');\r\n\t\techo \"<pre>\"; print_r($leftPlan);\r\n }", "title": "" }, { "docid": "2db7045f3bf9b937986e8311bccbb2f3", "score": "0.48489156", "text": "public function transporte();", "title": "" }, { "docid": "56f095ceab2216eadf2471bd1b893298", "score": "0.484776", "text": "function setNewRelicRUM() {\n $dom = new DomDocument();\n $dom->preserveWhiteSpace = FALSE;\n $dom->loadXML($this->__xml_config);\n $xpath = new DOMXpath($dom);\n foreach ($xpath->query(\"/atentus/config/rum\") as $config) {\n $this->nombre= $config->getAttribute('nombre');\n $this->descripcion= $config->getAttribute('descripcion');\n $cont=0;\n \n /* LISTA DE COMPONENTES. */\n foreach ($xpath->query(\"panel/componente\", $config) as $componente) {\n $cont_orden=0;\n $cont_url=0;\n $cont_inf=0;\n $datos = new stdClass();\n $datos->tipo = $componente->getAttribute('tipo');\n $datos->captura = $componente->getAttribute('captura');\n $datos->titulo = $componente->getAttribute('titulo');\n $datos->visible = $componente->getAttribute('visible');\n foreach($xpath->query(\"grupo/elemento\", $componente) as $elemento){\n $datos->orden[$cont_orden] = $elemento->getAttribute('orden');\n $datos->titulo [$cont_orden]= $elemento->getAttribute('titulo');\n \n foreach ($xpath->query(\"url\", $elemento) as $tag_url) {\n $datos->url[$cont_url] = $tag_url->nodeValue;\n $cont_url++;\n }\n foreach ($xpath->query(\"informacion\", $elemento) as $tag_informacion) {\n $datos->informacion[$cont_inf] = $tag_informacion->nodeValue;\n $cont_inf++;\n }\n $datos->link[$cont_orden] = $xpath->query(\"link\", $elemento)->item(0)->nodeValue;\n $cont_orden++;\n \n }\n \n $this->__datos[$cont] = $datos;\n $cont++;\n }\n }\n }", "title": "" }, { "docid": "0eb07b4da6db52beed93fc8325f79f0a", "score": "0.48461202", "text": "function getMenuNodes_main($menuNodesObject)\r\n{\r\n\t$menuNodesObject->menuNodes[\"main\"] = array();\r\n\r\n\t$menuNode = array();\r\n\t$menuNode[\"id\"] = \"1\";\r\n\t$menuNode[\"name\"] = \"DASHBOARD_LISTAS_E_TAREFAS\";\r\n\t$menuNode[\"href\"] = \"mypage.htm\";\r\n\t$menuNode[\"type\"] = \"Leaf\";\r\n\t$menuNode[\"table\"] = \"Dashboard_Lista_e_Tarefas\";\r\n\t$menuNode[\"style\"] = \"\";\r\n\t$menuNode[\"params\"] = \"\";\r\n\t$menuNode[\"parent\"] = \"0\";\r\n\t$menuNode[\"nameType\"] = \"CustomID\";\r\n\t$menuNode[\"linkType\"] = \"Internal\";\r\n\t$menuNode[\"pageType\"] = strtolower(\"Dashboard\");//\r\n\t$menuNode[\"pageId\"] = \"\";\r\n\t$menuNode[\"openType\"] = \"None\";\r\n\r\n\t$menuNode[\"icon\"] = \"glyphicon-credit-card\";\r\n\t$menuNode[\"iconType\"] = \"2\";\r\n\t$menuNode[\"iconShow\"] = \"1\";\r\n\r\n\t\t$menuNode[\"color\"] = \"\";\r\n\r\n\t$menuNode[\"title\"] = GetCustomLabel(\"DASHBOARD_LISTAS_E_TAREFAS\");\r\n\r\n\r\n\r\n\t$menuNodesObject->menuNodes[\"main\"][] = $menuNode;\r\n\t$menuNode = array();\r\n\t$menuNode[\"id\"] = \"2\";\r\n\t$menuNode[\"name\"] = \"DASHBOARD_GRAFICOS\";\r\n\t$menuNode[\"href\"] = \"mypage.htm\";\r\n\t$menuNode[\"type\"] = \"Leaf\";\r\n\t$menuNode[\"table\"] = \"Dashboard_Graficos\";\r\n\t$menuNode[\"style\"] = \"\";\r\n\t$menuNode[\"params\"] = \"\";\r\n\t$menuNode[\"parent\"] = \"0\";\r\n\t$menuNode[\"nameType\"] = \"CustomID\";\r\n\t$menuNode[\"linkType\"] = \"Internal\";\r\n\t$menuNode[\"pageType\"] = strtolower(\"Dashboard\");//\r\n\t$menuNode[\"pageId\"] = \"\";\r\n\t$menuNode[\"openType\"] = \"None\";\r\n\r\n\t$menuNode[\"icon\"] = \"glyphicon-scale\";\r\n\t$menuNode[\"iconType\"] = \"2\";\r\n\t$menuNode[\"iconShow\"] = \"1\";\r\n\r\n\t\t$menuNode[\"color\"] = \"\";\r\n\r\n\t$menuNode[\"title\"] = GetCustomLabel(\"DASHBOARD_GRAFICOS\");\r\n\r\n\r\n\r\n\t$menuNodesObject->menuNodes[\"main\"][] = $menuNode;\r\n\t$menuNode = array();\r\n\t$menuNode[\"id\"] = \"3\";\r\n\t$menuNode[\"name\"] = \"TASK_S_LIST\";\r\n\t$menuNode[\"href\"] = \"mypage.htm\";\r\n\t$menuNode[\"type\"] = \"Leaf\";\r\n\t$menuNode[\"table\"] = \"tb_lista_atividades\";\r\n\t$menuNode[\"style\"] = \"\";\r\n\t$menuNode[\"params\"] = \"\";\r\n\t$menuNode[\"parent\"] = \"0\";\r\n\t$menuNode[\"nameType\"] = \"CustomID\";\r\n\t$menuNode[\"linkType\"] = \"Internal\";\r\n\t$menuNode[\"pageType\"] = strtolower(\"List\");//\r\n\t$menuNode[\"pageId\"] = \"\";\r\n\t$menuNode[\"openType\"] = \"None\";\r\n\r\n\t$menuNode[\"icon\"] = \"glyphicon-th-list\";\r\n\t$menuNode[\"iconType\"] = \"2\";\r\n\t$menuNode[\"iconShow\"] = \"1\";\r\n\r\n\t\t$menuNode[\"color\"] = \"\";\r\n\r\n\t$menuNode[\"title\"] = GetCustomLabel(\"TASK_S_LIST\");\r\n\r\n\r\n\r\n\t$menuNodesObject->menuNodes[\"main\"][] = $menuNode;\r\n\t$menuNode = array();\r\n\t$menuNode[\"id\"] = \"4\";\r\n\t$menuNode[\"name\"] = \"TASKS1\";\r\n\t$menuNode[\"href\"] = \"mypage.htm\";\r\n\t$menuNode[\"type\"] = \"Leaf\";\r\n\t$menuNode[\"table\"] = \"tb_atividade\";\r\n\t$menuNode[\"style\"] = \"\";\r\n\t$menuNode[\"params\"] = \"\";\r\n\t$menuNode[\"parent\"] = \"0\";\r\n\t$menuNode[\"nameType\"] = \"CustomID\";\r\n\t$menuNode[\"linkType\"] = \"Internal\";\r\n\t$menuNode[\"pageType\"] = strtolower(\"List\");//\r\n\t$menuNode[\"pageId\"] = \"\";\r\n\t$menuNode[\"openType\"] = \"None\";\r\n\r\n\t$menuNode[\"icon\"] = \"glyphicon-tasks\";\r\n\t$menuNode[\"iconType\"] = \"2\";\r\n\t$menuNode[\"iconShow\"] = \"1\";\r\n\r\n\t\t$menuNode[\"color\"] = \"\";\r\n\r\n\t$menuNode[\"title\"] = GetCustomLabel(\"TASKS1\");\r\n\r\n\r\n\r\n\t$menuNodesObject->menuNodes[\"main\"][] = $menuNode;\r\n\t$menuNode = array();\r\n\t$menuNode[\"id\"] = \"5\";\r\n\t$menuNode[\"name\"] = \"Ocorrências de Tarefas\";\r\n\t$menuNode[\"href\"] = \"mypage.htm\";\r\n\t$menuNode[\"type\"] = \"Leaf\";\r\n\t$menuNode[\"table\"] = \"tb_tarefas_ocorrencias\";\r\n\t$menuNode[\"style\"] = \"\";\r\n\t$menuNode[\"params\"] = \"\";\r\n\t$menuNode[\"parent\"] = \"0\";\r\n\t$menuNode[\"nameType\"] = \"Text\";\r\n\t$menuNode[\"linkType\"] = \"Internal\";\r\n\t$menuNode[\"pageType\"] = strtolower(\"List\");//\r\n\t$menuNode[\"pageId\"] = \"\";\r\n\t$menuNode[\"openType\"] = \"None\";\r\n\r\n\t$menuNode[\"icon\"] = \"glyphicon-tags\";\r\n\t$menuNode[\"iconType\"] = \"2\";\r\n\t$menuNode[\"iconShow\"] = \"1\";\r\n\r\n\t\t$menuNode[\"color\"] = \"\";\r\n\r\n\t$menuNode[\"title\"] = \"Ocorrências de Tarefas\";\r\n\r\n\r\n\r\n\t$menuNodesObject->menuNodes[\"main\"][] = $menuNode;\r\n\t$menuNode = array();\r\n\t$menuNode[\"id\"] = \"6\";\r\n\t$menuNode[\"name\"] = \"STATUS_DE_TAREFAS\";\r\n\t$menuNode[\"href\"] = \"mypage.htm\";\r\n\t$menuNode[\"type\"] = \"Leaf\";\r\n\t$menuNode[\"table\"] = \"tb_status_atividades\";\r\n\t$menuNode[\"style\"] = \"\";\r\n\t$menuNode[\"params\"] = \"\";\r\n\t$menuNode[\"parent\"] = \"0\";\r\n\t$menuNode[\"nameType\"] = \"CustomID\";\r\n\t$menuNode[\"linkType\"] = \"Internal\";\r\n\t$menuNode[\"pageType\"] = strtolower(\"List\");//\r\n\t$menuNode[\"pageId\"] = \"\";\r\n\t$menuNode[\"openType\"] = \"None\";\r\n\r\n\t$menuNode[\"icon\"] = \"glyphicon-ok\";\r\n\t$menuNode[\"iconType\"] = \"2\";\r\n\t$menuNode[\"iconShow\"] = \"1\";\r\n\r\n\t\t$menuNode[\"color\"] = \"\";\r\n\r\n\t$menuNode[\"title\"] = GetCustomLabel(\"STATUS_DE_TAREFAS\");\r\n\r\n\r\n\r\n\t$menuNodesObject->menuNodes[\"main\"][] = $menuNode;\r\n\t$menuNode = array();\r\n\t$menuNode[\"id\"] = \"7\";\r\n\t$menuNode[\"name\"] = \"CATEGORIES\";\r\n\t$menuNode[\"href\"] = \"mypage.htm\";\r\n\t$menuNode[\"type\"] = \"Leaf\";\r\n\t$menuNode[\"table\"] = \"tb_rotulos\";\r\n\t$menuNode[\"style\"] = \"\";\r\n\t$menuNode[\"params\"] = \"\";\r\n\t$menuNode[\"parent\"] = \"0\";\r\n\t$menuNode[\"nameType\"] = \"CustomID\";\r\n\t$menuNode[\"linkType\"] = \"Internal\";\r\n\t$menuNode[\"pageType\"] = strtolower(\"List\");//\r\n\t$menuNode[\"pageId\"] = \"\";\r\n\t$menuNode[\"openType\"] = \"None\";\r\n\r\n\t$menuNode[\"icon\"] = \"glyphicon-star-empty\";\r\n\t$menuNode[\"iconType\"] = \"2\";\r\n\t$menuNode[\"iconShow\"] = \"1\";\r\n\r\n\t\t$menuNode[\"color\"] = \"\";\r\n\r\n\t$menuNode[\"title\"] = GetCustomLabel(\"CATEGORIES\");\r\n\r\n\r\n\r\n\t$menuNodesObject->menuNodes[\"main\"][] = $menuNode;\r\n\t$menuNode = array();\r\n\t$menuNode[\"id\"] = \"8\";\r\n\t$menuNode[\"name\"] = \"CLIENTES___GERAL\";\r\n\t$menuNode[\"href\"] = \"mypage.htm\";\r\n\t$menuNode[\"type\"] = \"Leaf\";\r\n\t$menuNode[\"table\"] = \"tb_clientes\";\r\n\t$menuNode[\"style\"] = \"\";\r\n\t$menuNode[\"params\"] = \"\";\r\n\t$menuNode[\"parent\"] = \"0\";\r\n\t$menuNode[\"nameType\"] = \"CustomID\";\r\n\t$menuNode[\"linkType\"] = \"Internal\";\r\n\t$menuNode[\"pageType\"] = strtolower(\"List\");//\r\n\t$menuNode[\"pageId\"] = \"\";\r\n\t$menuNode[\"openType\"] = \"None\";\r\n\r\n\t$menuNode[\"icon\"] = \"glyphicon-user\";\r\n\t$menuNode[\"iconType\"] = \"2\";\r\n\t$menuNode[\"iconShow\"] = \"1\";\r\n\r\n\t\t$menuNode[\"color\"] = \"\";\r\n\r\n\t$menuNode[\"title\"] = GetCustomLabel(\"CLIENTES___GERAL\");\r\n\r\n\r\n\r\n\t$menuNodesObject->menuNodes[\"main\"][] = $menuNode;\r\n\t$menuNode = array();\r\n\t$menuNode[\"id\"] = \"9\";\r\n\t$menuNode[\"name\"] = \"CLIENTES___DETALHES\";\r\n\t$menuNode[\"href\"] = \"mypage.htm\";\r\n\t$menuNode[\"type\"] = \"Leaf\";\r\n\t$menuNode[\"table\"] = \"tb_clientes\";\r\n\t$menuNode[\"style\"] = \"\";\r\n\t$menuNode[\"params\"] = \"\";\r\n\t$menuNode[\"parent\"] = \"0\";\r\n\t$menuNode[\"nameType\"] = \"CustomID\";\r\n\t$menuNode[\"linkType\"] = \"Internal\";\r\n\t$menuNode[\"pageType\"] = strtolower(\"List\");//\r\n\t$menuNode[\"pageId\"] = \"cartao_cliente\";\r\n\t$menuNode[\"openType\"] = \"None\";\r\n\r\n\t$menuNode[\"icon\"] = \"glyphicon-user\";\r\n\t$menuNode[\"iconType\"] = \"2\";\r\n\t$menuNode[\"iconShow\"] = \"1\";\r\n\r\n\t\t$menuNode[\"color\"] = \"\";\r\n\r\n\t$menuNode[\"title\"] = GetCustomLabel(\"CLIENTES___DETALHES\");\r\n\r\n\r\n\r\n\t$menuNodesObject->menuNodes[\"main\"][] = $menuNode;\r\n\t$menuNode = array();\r\n\t$menuNode[\"id\"] = \"10\";\r\n\t$menuNode[\"name\"] = \"USERS\";\r\n\t$menuNode[\"href\"] = \"mypage.htm\";\r\n\t$menuNode[\"type\"] = \"Leaf\";\r\n\t$menuNode[\"table\"] = \"tb_usuarios\";\r\n\t$menuNode[\"style\"] = \"\";\r\n\t$menuNode[\"params\"] = \"\";\r\n\t$menuNode[\"parent\"] = \"0\";\r\n\t$menuNode[\"nameType\"] = \"CustomID\";\r\n\t$menuNode[\"linkType\"] = \"Internal\";\r\n\t$menuNode[\"pageType\"] = strtolower(\"List\");//\r\n\t$menuNode[\"pageId\"] = \"\";\r\n\t$menuNode[\"openType\"] = \"None\";\r\n\r\n\t$menuNode[\"icon\"] = \"glyphicon-sunglasses\";\r\n\t$menuNode[\"iconType\"] = \"2\";\r\n\t$menuNode[\"iconShow\"] = \"1\";\r\n\r\n\t\t$menuNode[\"color\"] = \"\";\r\n\r\n\t$menuNode[\"title\"] = GetCustomLabel(\"USERS\");\r\n\r\n\r\n\r\n\t$menuNodesObject->menuNodes[\"main\"][] = $menuNode;\r\n\t$menuNode = array();\r\n\t$menuNode[\"id\"] = \"11\";\r\n\t$menuNode[\"name\"] = \"SISTEMA_E_CONFIGURA__O\";\r\n\t$menuNode[\"href\"] = \"\";\r\n\t$menuNode[\"type\"] = \"Group\";\r\n\t$menuNode[\"table\"] = \"\";\r\n\t$menuNode[\"style\"] = \"\";\r\n\t$menuNode[\"params\"] = \"\";\r\n\t$menuNode[\"parent\"] = \"0\";\r\n\t$menuNode[\"nameType\"] = \"CustomID\";\r\n\t$menuNode[\"linkType\"] = \"None\";\r\n\t$menuNode[\"pageType\"] = strtolower(\"\");//\r\n\t$menuNode[\"pageId\"] = \"\";\r\n\t$menuNode[\"openType\"] = \"None\";\r\n\r\n\t$menuNode[\"icon\"] = \"\";\r\n\t$menuNode[\"iconType\"] = \"0\";\r\n\t$menuNode[\"iconShow\"] = \"1\";\r\n\r\n\t\t$menuNode[\"color\"] = \"\";\r\n\r\n\t$menuNode[\"title\"] = GetCustomLabel(\"SISTEMA_E_CONFIGURA__O\");\r\n\r\n\r\n\r\n\t$menuNodesObject->menuNodes[\"main\"][] = $menuNode;\r\n\t$menuNode = array();\r\n\t$menuNode[\"id\"] = \"12\";\r\n\t$menuNode[\"name\"] = \"DOMAINS\";\r\n\t$menuNode[\"href\"] = \"mypage.htm\";\r\n\t$menuNode[\"type\"] = \"Leaf\";\r\n\t$menuNode[\"table\"] = \"tb_dominios\";\r\n\t$menuNode[\"style\"] = \"\";\r\n\t$menuNode[\"params\"] = \"\";\r\n\t$menuNode[\"parent\"] = \"11\";\r\n\t$menuNode[\"nameType\"] = \"CustomID\";\r\n\t$menuNode[\"linkType\"] = \"Internal\";\r\n\t$menuNode[\"pageType\"] = strtolower(\"List\");//\r\n\t$menuNode[\"pageId\"] = \"\";\r\n\t$menuNode[\"openType\"] = \"None\";\r\n\r\n\t$menuNode[\"icon\"] = \"glyphicon-th\";\r\n\t$menuNode[\"iconType\"] = \"2\";\r\n\t$menuNode[\"iconShow\"] = \"1\";\r\n\r\n\t\t$menuNode[\"color\"] = \"\";\r\n\r\n\t$menuNode[\"title\"] = GetCustomLabel(\"DOMAINS\");\r\n\r\n\r\n\r\n\t$menuNodesObject->menuNodes[\"main\"][] = $menuNode;\r\n\t$menuNode = array();\r\n\t$menuNode[\"id\"] = \"13\";\r\n\t$menuNode[\"name\"] = \"PARAMETROS\";\r\n\t$menuNode[\"href\"] = \"mypage.htm\";\r\n\t$menuNode[\"type\"] = \"Leaf\";\r\n\t$menuNode[\"table\"] = \"tb_parametros\";\r\n\t$menuNode[\"style\"] = \"\";\r\n\t$menuNode[\"params\"] = \"\";\r\n\t$menuNode[\"parent\"] = \"11\";\r\n\t$menuNode[\"nameType\"] = \"CustomID\";\r\n\t$menuNode[\"linkType\"] = \"Internal\";\r\n\t$menuNode[\"pageType\"] = strtolower(\"List\");//\r\n\t$menuNode[\"pageId\"] = \"\";\r\n\t$menuNode[\"openType\"] = \"None\";\r\n\r\n\t$menuNode[\"icon\"] = \"glyphicon-wrench\";\r\n\t$menuNode[\"iconType\"] = \"2\";\r\n\t$menuNode[\"iconShow\"] = \"1\";\r\n\r\n\t\t$menuNode[\"color\"] = \"\";\r\n\r\n\t$menuNode[\"title\"] = GetCustomLabel(\"PARAMETROS\");\r\n\r\n\r\n\r\n\t$menuNodesObject->menuNodes[\"main\"][] = $menuNode;\r\n\t$menuNode = array();\r\n\t$menuNode[\"id\"] = \"14\";\r\n\t$menuNode[\"name\"] = \"SEGURAN_A_E_MONITORAMENTO\";\r\n\t$menuNode[\"href\"] = \"mypage.htm\";\r\n\t$menuNode[\"type\"] = \"Leaf\";\r\n\t$menuNode[\"table\"] = \"log_audit\";\r\n\t$menuNode[\"style\"] = \"\";\r\n\t$menuNode[\"params\"] = \"\";\r\n\t$menuNode[\"parent\"] = \"11\";\r\n\t$menuNode[\"nameType\"] = \"CustomID\";\r\n\t$menuNode[\"linkType\"] = \"Internal\";\r\n\t$menuNode[\"pageType\"] = strtolower(\"List\");//\r\n\t$menuNode[\"pageId\"] = \"\";\r\n\t$menuNode[\"openType\"] = \"None\";\r\n\r\n\t$menuNode[\"icon\"] = \"glyphicon-zoom-in\";\r\n\t$menuNode[\"iconType\"] = \"2\";\r\n\t$menuNode[\"iconShow\"] = \"1\";\r\n\r\n\t\t$menuNode[\"color\"] = \"\";\r\n\r\n\t$menuNode[\"title\"] = GetCustomLabel(\"SEGURAN_A_E_MONITORAMENTO\");\r\n\r\n\r\n\r\n\t$menuNodesObject->menuNodes[\"main\"][] = $menuNode;\r\n\t$menuNode = array();\r\n\t$menuNode[\"id\"] = \"15\";\r\n\t$menuNode[\"name\"] = \"\";\r\n\t$menuNode[\"href\"] = \"mypage.htm\";\r\n\t$menuNode[\"type\"] = \"Leaf\";\r\n\t$menuNode[\"table\"] = \"proc_limpar_tarefas_de_lista\";\r\n\t$menuNode[\"style\"] = \"\";\r\n\t$menuNode[\"params\"] = \"\";\r\n\t$menuNode[\"parent\"] = \"11\";\r\n\t$menuNode[\"nameType\"] = \"Text\";\r\n\t$menuNode[\"linkType\"] = \"Internal\";\r\n\t$menuNode[\"pageType\"] = strtolower(\"Add\");//\r\n\t$menuNode[\"pageId\"] = \"\";\r\n\t$menuNode[\"openType\"] = \"None\";\r\n\r\n\t$menuNode[\"icon\"] = \"glyphicon-cog\";\r\n\t$menuNode[\"iconType\"] = \"2\";\r\n\t$menuNode[\"iconShow\"] = \"1\";\r\n\r\n\t\t$menuNode[\"color\"] = \"\";\r\n\r\n\t$menuNode[\"title\"] = GetTableCaption(\"proc_limpar_tarefas_de_lista\");\r\n\r\n\r\n\r\n\t$menuNodesObject->menuNodes[\"main\"][] = $menuNode;\r\n\t$menuNode = array();\r\n\t$menuNode[\"id\"] = \"16\";\r\n\t$menuNode[\"name\"] = \"CLIENTES_E_PLANOS\";\r\n\t$menuNode[\"href\"] = \"\";\r\n\t$menuNode[\"type\"] = \"Group\";\r\n\t$menuNode[\"table\"] = \"\";\r\n\t$menuNode[\"style\"] = \"\";\r\n\t$menuNode[\"params\"] = \"\";\r\n\t$menuNode[\"parent\"] = \"0\";\r\n\t$menuNode[\"nameType\"] = \"CustomID\";\r\n\t$menuNode[\"linkType\"] = \"None\";\r\n\t$menuNode[\"pageType\"] = strtolower(\"\");//\r\n\t$menuNode[\"pageId\"] = \"\";\r\n\t$menuNode[\"openType\"] = \"None\";\r\n\r\n\t$menuNode[\"icon\"] = \"\";\r\n\t$menuNode[\"iconType\"] = \"0\";\r\n\t$menuNode[\"iconShow\"] = \"1\";\r\n\r\n\t\t$menuNode[\"color\"] = \"\";\r\n\r\n\t$menuNode[\"title\"] = GetCustomLabel(\"CLIENTES_E_PLANOS\");\r\n\r\n\r\n\r\n\t$menuNodesObject->menuNodes[\"main\"][] = $menuNode;\r\n\t$menuNode = array();\r\n\t$menuNode[\"id\"] = \"17\";\r\n\t$menuNode[\"name\"] = \"PLANOS_DE_ACESSO_DO_SISTEMA\";\r\n\t$menuNode[\"href\"] = \"mypage.htm\";\r\n\t$menuNode[\"type\"] = \"Leaf\";\r\n\t$menuNode[\"table\"] = \"tb_planos\";\r\n\t$menuNode[\"style\"] = \"\";\r\n\t$menuNode[\"params\"] = \"\";\r\n\t$menuNode[\"parent\"] = \"16\";\r\n\t$menuNode[\"nameType\"] = \"CustomID\";\r\n\t$menuNode[\"linkType\"] = \"Internal\";\r\n\t$menuNode[\"pageType\"] = strtolower(\"List\");//\r\n\t$menuNode[\"pageId\"] = \"\";\r\n\t$menuNode[\"openType\"] = \"None\";\r\n\r\n\t$menuNode[\"icon\"] = \"glyphicon-lock\";\r\n\t$menuNode[\"iconType\"] = \"2\";\r\n\t$menuNode[\"iconShow\"] = \"1\";\r\n\r\n\t\t$menuNode[\"color\"] = \"\";\r\n\r\n\t$menuNode[\"title\"] = GetCustomLabel(\"PLANOS_DE_ACESSO_DO_SISTEMA\");\r\n\r\n\r\n\r\n\t$menuNodesObject->menuNodes[\"main\"][] = $menuNode;\r\n\t$menuNode = array();\r\n\t$menuNode[\"id\"] = \"18\";\r\n\t$menuNode[\"name\"] = \"VALORES_BASE_DOS_PLANOS\";\r\n\t$menuNode[\"href\"] = \"mypage.htm\";\r\n\t$menuNode[\"type\"] = \"Leaf\";\r\n\t$menuNode[\"table\"] = \"tb_planos_valores\";\r\n\t$menuNode[\"style\"] = \"\";\r\n\t$menuNode[\"params\"] = \"\";\r\n\t$menuNode[\"parent\"] = \"16\";\r\n\t$menuNode[\"nameType\"] = \"CustomID\";\r\n\t$menuNode[\"linkType\"] = \"Internal\";\r\n\t$menuNode[\"pageType\"] = strtolower(\"List\");//\r\n\t$menuNode[\"pageId\"] = \"\";\r\n\t$menuNode[\"openType\"] = \"None\";\r\n\r\n\t$menuNode[\"icon\"] = \"glyphicon-usd\";\r\n\t$menuNode[\"iconType\"] = \"2\";\r\n\t$menuNode[\"iconShow\"] = \"1\";\r\n\r\n\t\t$menuNode[\"color\"] = \"\";\r\n\r\n\t$menuNode[\"title\"] = GetCustomLabel(\"VALORES_BASE_DOS_PLANOS\");\r\n\r\n\r\n\r\n\t$menuNodesObject->menuNodes[\"main\"][] = $menuNode;\r\n\t$menuNode = array();\r\n\t$menuNode[\"id\"] = \"19\";\r\n\t$menuNode[\"name\"] = \"PLANOS_DO_CLIENTE__REVER_\";\r\n\t$menuNode[\"href\"] = \"mypage.htm\";\r\n\t$menuNode[\"type\"] = \"Leaf\";\r\n\t$menuNode[\"table\"] = \"tb_clientes_planos\";\r\n\t$menuNode[\"style\"] = \"\";\r\n\t$menuNode[\"params\"] = \"\";\r\n\t$menuNode[\"parent\"] = \"16\";\r\n\t$menuNode[\"nameType\"] = \"CustomID\";\r\n\t$menuNode[\"linkType\"] = \"Internal\";\r\n\t$menuNode[\"pageType\"] = strtolower(\"List\");//\r\n\t$menuNode[\"pageId\"] = \"\";\r\n\t$menuNode[\"openType\"] = \"None\";\r\n\r\n\t$menuNode[\"icon\"] = \"glyphicon-shopping-cart\";\r\n\t$menuNode[\"iconType\"] = \"2\";\r\n\t$menuNode[\"iconShow\"] = \"1\";\r\n\r\n\t\t$menuNode[\"color\"] = \"\";\r\n\r\n\t$menuNode[\"title\"] = GetCustomLabel(\"PLANOS_DO_CLIENTE__REVER_\");\r\n\r\n\r\n\r\n\t$menuNodesObject->menuNodes[\"main\"][] = $menuNode;\r\n\t$menuNode = array();\r\n\t$menuNode[\"id\"] = \"20\";\r\n\t$menuNode[\"name\"] = \"GR_FICOS\";\r\n\t$menuNode[\"href\"] = \"\";\r\n\t$menuNode[\"type\"] = \"Group\";\r\n\t$menuNode[\"table\"] = \"\";\r\n\t$menuNode[\"style\"] = \"\";\r\n\t$menuNode[\"params\"] = \"\";\r\n\t$menuNode[\"parent\"] = \"0\";\r\n\t$menuNode[\"nameType\"] = \"CustomID\";\r\n\t$menuNode[\"linkType\"] = \"None\";\r\n\t$menuNode[\"pageType\"] = strtolower(\"\");//\r\n\t$menuNode[\"pageId\"] = \"\";\r\n\t$menuNode[\"openType\"] = \"None\";\r\n\r\n\t$menuNode[\"icon\"] = \"\";\r\n\t$menuNode[\"iconType\"] = \"0\";\r\n\t$menuNode[\"iconShow\"] = \"1\";\r\n\r\n\t\t$menuNode[\"color\"] = \"\";\r\n\r\n\t$menuNode[\"title\"] = GetCustomLabel(\"GR_FICOS\");\r\n\r\n\r\n\r\n\t$menuNodesObject->menuNodes[\"main\"][] = $menuNode;\r\n\t$menuNode = array();\r\n\t$menuNode[\"id\"] = \"21\";\r\n\t$menuNode[\"name\"] = \"TASKS_BY_LIST_CHART\";\r\n\t$menuNode[\"href\"] = \"mypage.htm\";\r\n\t$menuNode[\"type\"] = \"Leaf\";\r\n\t$menuNode[\"table\"] = \"Gráfico Tarefas por Lista\";\r\n\t$menuNode[\"style\"] = \"\";\r\n\t$menuNode[\"params\"] = \"\";\r\n\t$menuNode[\"parent\"] = \"20\";\r\n\t$menuNode[\"nameType\"] = \"CustomID\";\r\n\t$menuNode[\"linkType\"] = \"Internal\";\r\n\t$menuNode[\"pageType\"] = strtolower(\"Chart\");//\r\n\t$menuNode[\"pageId\"] = \"\";\r\n\t$menuNode[\"openType\"] = \"None\";\r\n\r\n\t$menuNode[\"icon\"] = \"glyphicon-adjust\";\r\n\t$menuNode[\"iconType\"] = \"2\";\r\n\t$menuNode[\"iconShow\"] = \"1\";\r\n\r\n\t\t$menuNode[\"color\"] = \"\";\r\n\r\n\t$menuNode[\"title\"] = GetCustomLabel(\"TASKS_BY_LIST_CHART\");\r\n\r\n\r\n\r\n\t$menuNodesObject->menuNodes[\"main\"][] = $menuNode;\r\n\t$menuNode = array();\r\n\t$menuNode[\"id\"] = \"22\";\r\n\t$menuNode[\"name\"] = \"CHART_TASKS_BY_STATUS\";\r\n\t$menuNode[\"href\"] = \"mypage.htm\";\r\n\t$menuNode[\"type\"] = \"Leaf\";\r\n\t$menuNode[\"table\"] = \"Gráfico Tarefas por Status\";\r\n\t$menuNode[\"style\"] = \"\";\r\n\t$menuNode[\"params\"] = \"\";\r\n\t$menuNode[\"parent\"] = \"20\";\r\n\t$menuNode[\"nameType\"] = \"CustomID\";\r\n\t$menuNode[\"linkType\"] = \"Internal\";\r\n\t$menuNode[\"pageType\"] = strtolower(\"Chart\");//\r\n\t$menuNode[\"pageId\"] = \"\";\r\n\t$menuNode[\"openType\"] = \"None\";\r\n\r\n\t$menuNode[\"icon\"] = \"glyphicon-adjust\";\r\n\t$menuNode[\"iconType\"] = \"2\";\r\n\t$menuNode[\"iconShow\"] = \"1\";\r\n\r\n\t\t$menuNode[\"color\"] = \"\";\r\n\r\n\t$menuNode[\"title\"] = GetCustomLabel(\"CHART_TASKS_BY_STATUS\");\r\n\r\n\r\n\r\n\t$menuNodesObject->menuNodes[\"main\"][] = $menuNode;\r\n\t$menuNode = array();\r\n\t$menuNode[\"id\"] = \"23\";\r\n\t$menuNode[\"name\"] = \"CHART_TASKS_BY_PRIORITY\";\r\n\t$menuNode[\"href\"] = \"mypage.htm\";\r\n\t$menuNode[\"type\"] = \"Leaf\";\r\n\t$menuNode[\"table\"] = \"Gráfico Tarefas por Prioridade\";\r\n\t$menuNode[\"style\"] = \"\";\r\n\t$menuNode[\"params\"] = \"\";\r\n\t$menuNode[\"parent\"] = \"20\";\r\n\t$menuNode[\"nameType\"] = \"CustomID\";\r\n\t$menuNode[\"linkType\"] = \"Internal\";\r\n\t$menuNode[\"pageType\"] = strtolower(\"Chart\");//\r\n\t$menuNode[\"pageId\"] = \"\";\r\n\t$menuNode[\"openType\"] = \"None\";\r\n\r\n\t$menuNode[\"icon\"] = \"glyphicon-adjust\";\r\n\t$menuNode[\"iconType\"] = \"2\";\r\n\t$menuNode[\"iconShow\"] = \"1\";\r\n\r\n\t\t$menuNode[\"color\"] = \"\";\r\n\r\n\t$menuNode[\"title\"] = GetCustomLabel(\"CHART_TASKS_BY_PRIORITY\");\r\n\r\n\r\n\r\n\t$menuNodesObject->menuNodes[\"main\"][] = $menuNode;\r\n\t$menuNode = array();\r\n\t$menuNode[\"id\"] = \"24\";\r\n\t$menuNode[\"name\"] = \"CHART_TASKS_CREATED_BY_USER\";\r\n\t$menuNode[\"href\"] = \"mypage.htm\";\r\n\t$menuNode[\"type\"] = \"Leaf\";\r\n\t$menuNode[\"table\"] = \"Gráfico Tarefas criadas por Usuário\";\r\n\t$menuNode[\"style\"] = \"\";\r\n\t$menuNode[\"params\"] = \"\";\r\n\t$menuNode[\"parent\"] = \"20\";\r\n\t$menuNode[\"nameType\"] = \"CustomID\";\r\n\t$menuNode[\"linkType\"] = \"Internal\";\r\n\t$menuNode[\"pageType\"] = strtolower(\"Chart\");//\r\n\t$menuNode[\"pageId\"] = \"\";\r\n\t$menuNode[\"openType\"] = \"None\";\r\n\r\n\t$menuNode[\"icon\"] = \"glyphicon-object-align-left\";\r\n\t$menuNode[\"iconType\"] = \"2\";\r\n\t$menuNode[\"iconShow\"] = \"1\";\r\n\r\n\t\t$menuNode[\"color\"] = \"\";\r\n\r\n\t$menuNode[\"title\"] = GetCustomLabel(\"CHART_TASKS_CREATED_BY_USER\");\r\n\r\n\r\n\r\n\t$menuNodesObject->menuNodes[\"main\"][] = $menuNode;\r\n\t$menuNode = array();\r\n\t$menuNode[\"id\"] = \"25\";\r\n\t$menuNode[\"name\"] = \"CATEGORIAS_DE_ATIVIDADES\";\r\n\t$menuNode[\"href\"] = \"mypage.htm\";\r\n\t$menuNode[\"type\"] = \"Leaf\";\r\n\t$menuNode[\"table\"] = \"tb_tarefas_x_rotulos\";\r\n\t$menuNode[\"style\"] = \"\";\r\n\t$menuNode[\"params\"] = \"\";\r\n\t$menuNode[\"parent\"] = \"0\";\r\n\t$menuNode[\"nameType\"] = \"CustomID\";\r\n\t$menuNode[\"linkType\"] = \"Internal\";\r\n\t$menuNode[\"pageType\"] = strtolower(\"List\");//\r\n\t$menuNode[\"pageId\"] = \"\";\r\n\t$menuNode[\"openType\"] = \"None\";\r\n\r\n\t$menuNode[\"icon\"] = \"glyphicon-star\";\r\n\t$menuNode[\"iconType\"] = \"2\";\r\n\t$menuNode[\"iconShow\"] = \"1\";\r\n\r\n\t\t$menuNode[\"color\"] = \"\";\r\n\r\n\t$menuNode[\"title\"] = GetCustomLabel(\"CATEGORIAS_DE_ATIVIDADES\");\r\n\r\n\r\n\r\n\t$menuNodesObject->menuNodes[\"main\"][] = $menuNode;\r\n\t$menuNode = array();\r\n\t$menuNode[\"id\"] = \"26\";\r\n\t$menuNode[\"name\"] = \"VW_TAREFAS_ROTULOS1\";\r\n\t$menuNode[\"href\"] = \"mypage.htm\";\r\n\t$menuNode[\"type\"] = \"Leaf\";\r\n\t$menuNode[\"table\"] = \"vw_tarefas_rotulos\";\r\n\t$menuNode[\"style\"] = \"\";\r\n\t$menuNode[\"params\"] = \"\";\r\n\t$menuNode[\"parent\"] = \"0\";\r\n\t$menuNode[\"nameType\"] = \"CustomID\";\r\n\t$menuNode[\"linkType\"] = \"Internal\";\r\n\t$menuNode[\"pageType\"] = strtolower(\"List\");//\r\n\t$menuNode[\"pageId\"] = \"\";\r\n\t$menuNode[\"openType\"] = \"None\";\r\n\r\n\t$menuNode[\"icon\"] = \"glyphicon-baby-formula\";\r\n\t$menuNode[\"iconType\"] = \"2\";\r\n\t$menuNode[\"iconShow\"] = \"1\";\r\n\r\n\t\t$menuNode[\"color\"] = \"\";\r\n\r\n\t$menuNode[\"title\"] = GetCustomLabel(\"VW_TAREFAS_ROTULOS1\");\r\n\r\n\r\n\r\n\t$menuNodesObject->menuNodes[\"main\"][] = $menuNode;\r\n}", "title": "" }, { "docid": "0fc154c37640e57d7940bd94e5a2aea7", "score": "0.484605", "text": "function _cals_importer_add_856_tag($node) {\n _cals_add_856_tag($node);\n drupal_goto(\"node/\" . $node->nid);\n}", "title": "" }, { "docid": "837e7a8932dc23f0ec7cbddc156335ab", "score": "0.4839002", "text": "public function calculate2(){\r\n\t\t$counter=$this->getNodeCount();\r\n// \t\t$operationType=null;\r\n// \t\t$r=null;\r\n\t\t\r\n\t\twhile($counter>=1){\r\n\t\t\t$operationType=null;\r\n\t\t\t$childrenObjects=array();\r\n\t\t\t\r\n\t\t\tif($this->_nodes[$counter] instanceof Operation){\r\n\t\t\t\t\r\n// \t\t\t\t$dataSet=array();\r\n// \t\t\t\t$operationType=$this->_node[$counter]->getValue();\r\n// \t\t\t\tforeach ($this->_nodes[$counter] as $key => $node) {\r\n\t\t\t\t\t$node=$this->_nodes[$counter];\r\n// \t\t\t\t\tvar_dump($node);\r\n\t\t\t\t\t$operationType=$node->getOperationType();\r\n\t\t\t\t\t\r\n// \t\t\t\t\t$id=$this->_nodes[$counter]->getId();\r\n\t\t\t\t\t$id=$node->getId();\r\n\t\t\t\t\tif(empty($id)){\r\n\t\t\t\t\t\tthrow new Exception('errororororoororororor');\r\n\t\t\t\t\t}else{\r\n// \t\t\t\t\t\tvar_dump($id);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t$childrenObjects[]=$this->fetchChildrenObjects($id);\r\n\t\t\t\t\techo 'oooooooooooooooooooooooooooooooooooooo2'.\"\\n\";\r\n// \t\t\t\t\tvar_dump($childrenObjects);\r\n\t\t\t\t\t$countChildren=count($childrenObjects);\r\n\t\t\t\t\tif($countChildren>0){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tforeach ($childrenObjects as $key => $ob) {\r\n\t\t\t\t\t\t\tforeach ($ob as $key => $value) {\r\n\t\t\t\t\t\t\t\tif(!is_null($ob)){\r\n\t\t\t\t\t\t\t\t\t$this->_dataset[]=$value->getValue();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n// \t\t\t\t\t}else{\r\n// // \t\t\t\t\t\techo 'warnign !!!!!!!!!!!!<br/>';\r\n// \t\t\t\t\t}\t\t\t\t\t\r\n// \t\t\t\t\t$childrenReference=$node->getChildren();\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n// \t\t\t\t\tforeach ($childrenReference as $key => $value) {\r\n// \t\t\t\t\t\t$childrenObjects=$this->getNode($value);\r\n// \t\t\t\t\t}\r\n// \t\t\t\t\techo 'children objects'.\"\\n\";\r\n// \t\t\t\t\tvar_dump($childrenObjects);\r\n// \t\t\t\t\t$r=$this->getNodeChildrenValuesIntoArray();\r\n// \t\t\t\t\t$this->_dataset[]=$this->childrenToarray($childrenObjects);\r\n// \t\t\t\t\tvar_dump($dataSet);\r\n// \t\t\t\t\tvar_dump($children);\r\n\t\t\t\t\t\r\n// \t\t\t\t\t\tforeach ($children as $key => $reference) {\r\n// \t\t\t\t\t\t\t$tmp=$this->getNode($reference);\r\n// \t\t\t\t\t\t\tif($tmp instanceof Node){\r\n// \t\t\t\t\t\t\t\tarray_push($dataSet, $tmp->getValue());\r\n// // \t\t\t\t\t\t\t\t$dataSet[]=$tmp->getValue();\r\n// \t\t\t\t\t\t\t}else if($tmp instanceof Operation){\r\n\t\t\t\t\t\t\t\t\r\n// \t\t\t\t\t\t\t\tarray_push($dataSet,$tmp->getOperationResult());\r\n// // \t\t\t\t\t\t\t\t$dataSet[]=$tmp->getOperationResult();\r\n// \t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n// \t\t\t\t\t\t}//end foreach\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n// \t\t\t\t\t$result=$node->getOperationResult();\r\n// \t\t\t\t\t$dataSet[]+=$result;\r\n// \t\t\t\t\t$ret2=$op->add($dataSet);\r\n// \t\t\t\t\techo '<pre>'.'dataset</br>';\r\n\t\t\t\t\t\r\n// \t\t\t\t}\r\n// \t\t\t\t\tvar_dump($this->_dataset);\r\n\t\t\t\t\t$this->_strategy=new MyStrategy($operationType);\r\n\t\t\t\t\t$ret=$this->_strategy->op($this->_dataset);\r\n\t\t\t\t\t$node->setResultOperation($ret);\r\n\t\t\t\t\t\r\n\t\t\t}//end if\r\n\t\t\t\r\n\t\t\t$counter-=1;\r\n\t\t}//end of while loop\r\n\t\t\r\n\t\t\r\n\t\treturn $ret;\r\n\t\t\r\n\t\t//TODO add calculate function body\r\n\t}", "title": "" }, { "docid": "3ee86a6b65e0c9285ede09915026d170", "score": "0.48372665", "text": "public function odbij()\n {\n }", "title": "" }, { "docid": "82cfb0a84c48d64978efc801a784d899", "score": "0.48336977", "text": "function getPath20($current_parent_id,$where,$catId,$tree2,$action,$targetF,$lang) {\nglobal $path1, $defaultOrder;\n ($where==\"top\")? $trans=\"|\" : $trans=\"|\";\n $current_query = mysql_query(\"select categories_name_\".$lang.\", parent_id, categories_id, categories_noeud \n from categories \n where categories_id = '\".$current_parent_id.\"'\");\n while($current = mysql_fetch_array($current_query)) {\n $yu = $current['categories_name_'.$lang];\n\n $catNum = $tree2[$yu];\n $catId = $current['categories_id'];\n $catName = $current['categories_name_'.$lang];\n $catNoeud = $current['categories_noeud'];\n if($catName == \"Menu\") { $catName = \"\";}\n if($catNoeud==\"B\") $goTo = \"index\"; else $goTo = \"list\";\n $cat_array[] = \"<img src='../im/accueil.gif' align='TEXTTOP'>&nbsp;<a href=\\\"index.php\\\">\".maj(HOME).\"</a> | <a href=\\\"\".$goTo.\".php?path=\".$catId.\"&num=\".$catNum.\"&action=\".$action.\"&sort=\".$defaultOrder.\"\\\">\".strtoupper($yu).\"</a> \".$trans.\"&nbsp;\";\n \n }\n if(isset($cat_array) and sizeof($cat_array)>0) {\n $path1 = implode(\",\",$cat_array);\n }\n else {\n switch($targetF) {\n case \"favorite\":\n $path1 = \"<img src='../im/accueil.gif' align='TEXTTOP'>&nbsp;<a href=\\\"index.php\\\">\".maj(HOME).\"</a> | <a href=\\\"list.php?target=favorite\\\">\".strtoupper(COEUR).\"</a>\";\n break;\n case \"flash\":\n $path1 = \"<img src='../im/accueil.gif' align='TEXTTOP'>&nbsp;<a href=\\\"index.php\\\">\".maj(HOME).\"</a> | <a href=\\\"list.php?target=promo&tow=flash\\\">\".strtoupper(VENTES_FLASH).\"</a>\";\n break;\n case \"new\":\n $path1 = \"<img src='../im/accueil.gif' align='TEXTTOP'>&nbsp;<a href=\\\"index.php\\\">\".maj(HOME).\"</a> | <a href=\\\"list.php?target=new\\\">\".NOUVEAUTESMAJ.\"</a>\";\n break;\n case \"promo\":\n $path1 = \"<img src='../im/accueil.gif' align='TEXTTOP'>&nbsp;<a href=\\\"index.php\\\">\".maj(HOME).\"</a> | <a href=\\\"list.php?target=promo\\\">\".strtoupper(PROMOTIONS).\"</a>\";\n \t break;\n default:\n $path1 = \"<img src='../im/accueil.gif' align='TEXTTOP'>&nbsp;<a href=\\\"index.php\\\">\".maj(HOME).\"</a>\";\n }\n }\n print \"<b>\".$path1.\"</b>\";\n }", "title": "" } ]
0de96379135761d39e6828cfef3a3a4a
Check whether the given file can be used for mapping purposes (is an XML file).
[ { "docid": "3047a45b9e8269ae69970b6ca872ebfb", "score": "0.6592187", "text": "static public function is_xmlFile($filename) {\n\n\t\tif (!self::includesFal()) {\n\t\t\treturn self::is_xmlFile_finfo($filename);\n\t\t}\n\t\t$isXmlFile = FALSE;\n\t\ttry {\n\t\t\t$file = self::file($filename);\n\t\t\tif (!$file instanceof \\TYPO3\\CMS\\Core\\Resource\\FolderInterface) {\n\t\t\t\t$isXmlFile = in_array($file->getMimeType(), array('text/html', 'application/xml'));\n\t\t\t}\n\t\t} catch (\\Exception $e) {\n\t\t}\n\n\t\treturn $isXmlFile;\n\t}", "title": "" } ]
[ { "docid": "a1d6299f82867c45c66b6f539fd0ec60", "score": "0.67476875", "text": "static protected function is_xmlFile_finfo($filename) {\n\t\t$isXml = FALSE;\n\t\tif (function_exists('finfo_open')) {\n\t\t\t$finfoMode = defined('FILEINFO_MIME_TYPE') ? FILEINFO_MIME_TYPE : FILEINFO_MIME;\n\t\t\t$fi = finfo_open($finfoMode);\n\t\t\t$mimeInformation = @finfo_file($fi, $filename);\n\t\t\tif (\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::isFirstPartOfStr($mimeInformation, 'text/html') ||\n\t\t\t\t\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::isFirstPartOfStr($mimeInformation, 'application/xml')\n\t\t\t) {\n\t\t\t\t$isXml = TRUE;\n\t\t\t}\n\t\t\tfinfo_close($fi);\n\t\t} else {\n\t\t\t$pi = @pathinfo($filename);\n\t\t\t$isXml = preg_match('/(html?|tmpl|xml)/', $pi['extension']);\n\t\t}\n\n\t\treturn $isXml;\n\t}", "title": "" }, { "docid": "c4783a89b1a841e6937dacbc9dfc90f9", "score": "0.64589053", "text": "public function loadFile($file){\n\t\t$this->xml = simplexml_load_file($file);\n\t\tif ($this->xml){\n\t\t\treturn true;\n\t\t}else{\n\t\t\t$this->xml = false;\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "10e1cc8614ef2909c3b85688f406bd89", "score": "0.6319015", "text": "private function _check_xml_file_availability($xml, $dir) {\n if (!is_object($xml)) die(\"Wrong input to _check_xml_file_availability\");\n if (!is_dir($dir)) die(sprintf(\"Cannot find directory \\\"%s\\\"\", $dir));\n if (property_exists($xml->settings->files, \"file\")) {\n foreach($xml->settings->files->file as $file) {\n if (!is_file(join(\"/\", array($dir, $file)))) {\n printf(\"Cannot find file which should be shipped with the exercise. \"\n .\"Name of the file: \\\"%s/%s\\\".\", $dir, $file);\n die();\n }\n }\n }\n return;\n }", "title": "" }, { "docid": "24ac0fd291cff00049e6c32437e9248a", "score": "0.6219869", "text": "public function validateXML($xmlFile){\n //Because of throwing errors from validation\n libxml_use_internal_errors(true);\n $xml = new DOMDocument(); \n $xml->load($xmlFile); \n if (!$xml->schemaValidate('php/models/record.xsd')) {\n return false;\n }else{\n return true;\n } \n }", "title": "" }, { "docid": "e82fee24c656ba731dc281a949c28fae", "score": "0.61697876", "text": "function validateXml($file, $schema) {\n if (!file_exists($file)) {\n printf(\"\\033[31mError: The %s file doesn't exists.\\033[0m\\n\", $file);\n exit(1);\n }\n if (!file_exists($schema)) {\n printf(\"\\033[31mError: The %s schema doesn't exists.\\033[0m\\n\", $schema);\n exit(1);\n }\n // Validate the deployment XML file\n $dom = new \\DOMDocument();\n $dom->loadXML(file_get_contents($file));\n return $dom->schemaValidate($schema);\n}", "title": "" }, { "docid": "e0823a220002aea665120a6d2fd4d5ad", "score": "0.6094961", "text": "public function receiveFile($file)\n {\n if (!isset($file['xml']['tmp_name'])) {\n throw new Exception(__(\"%s feed XML unknown tmp_name.\", $this->name), 500);\n }\n\n if (!is_uploaded_file($file['xml']['tmp_name'])) {\n throw new Exception(__(\"%s feed xml import possible file upload attack.\", $this->name), 500);\n }\n\n return true;\n }", "title": "" }, { "docid": "85923864460d8c914c0f84c54b35a177", "score": "0.60819393", "text": "private function checkFromFile()\n {\n if(file_exists(VIEWS.$this->view_name.'.php'))\n {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "8b3b3bfba58f261653a2bef82bf5319f", "score": "0.605554", "text": "function pdf2xml_validating($xml_file)\n{\n\tPhar::interceptFileFuncs();\n\tlibxml_use_internal_errors(true);\n\t$errors = array();\n\t$xml = new DOMDocument();\n\t$xml->load($xml_file);\n\tif(!$xml->schemaValidateSource(file_get_contents(PDF_XML_XSD)))\n\t{\n\t\t$errors = libxml_get_errors();\n\t}\n\tlibxml_clear_errors();\n\n\treturn $errors;\n}", "title": "" }, { "docid": "6181e48514aca6509c4c0b427060dae4", "score": "0.6054729", "text": "public function has_sitemap_xml() {\n\n\t\tstatic $has_map = null;\n\n\t\tif ( isset( $has_map ) )\n\t\t\treturn $has_map;\n\n\t\t// Ensure get_home_path() is declared.\n\t\tif ( ! \\function_exists( '\\\\get_home_path' ) )\n\t\t\trequire_once ABSPATH . 'wp-admin/includes/file.php';\n\n\t\t$path = \\get_home_path() . 'sitemap.xml';\n\n\t\t// phpcs:ignore, TSF.Performance.Functions.PHP -- we use path, not URL.\n\t\treturn $has_map = file_exists( $path );\n\t}", "title": "" }, { "docid": "1b0cca78dfa64ea26196890a068a3719", "score": "0.6024083", "text": "function testWellformedOK() {\n $file = realpath(dirname(__FILE__).'/../res/xmlfile.xml');\n $this->assertIdentical(binarypool_validate_xml::validate($file), true);\n }", "title": "" }, { "docid": "95d405760e37d4d373c848eae865e517", "score": "0.5890532", "text": "function process_xml_input_file($file)\n{\n $uploadfile = $file;\n \n //load coresponding xml file\n $xmlDoc = simplexml_load_file($uploadfile);\n if (!$xmlDoc) {\n die('Error while reading XML file ' . $uploadfile);\n }\n //check type of uploaded XML, and calling its parser\n if (isset($xmlDoc->hosts->host->audit)) {\n //Call retina XML file parser if file Retina app output\n retinaXMLFileParser($uploadfile);\n \n } elseif (isset($xmlDoc->Report->ReportHost->ReportItem)) {\n //Call retina XML file parser if file Nessus app output\n nessusXMLFileParser($uploadfile);\n \n } elseif (isset($xmlDoc->Scan->ReportItems->ReportItem)) {\n //Call retina XML file parser if file Acunetix app output\n acunetixXMLFileParser($uploadfile);\n }\n}", "title": "" }, { "docid": "5eae70577e6be0a0b4bb1e07ce8e698f", "score": "0.58598006", "text": "function testValidOK() {\n $file = realpath(dirname(__FILE__).'/../res/xmlfile.xml');\n $this->assertIdentical(binarypool_validate_xml::validate($file,\n dirname(__FILE__) . '/../../conf/schema/localinfo-2.0.xsd'),\n true);\n }", "title": "" }, { "docid": "d6d60deacefd7ce0441448d7bae5a9cf", "score": "0.5844842", "text": "public function validFile(File $file);", "title": "" }, { "docid": "446bdffb4eb3fd4b53654bf05eece04d", "score": "0.5800971", "text": "private function checkFile($file)\n {\n return (file_exists($file) && is_readable($file));\n }", "title": "" }, { "docid": "6f3583e9cf596b15e202b40b71e86022", "score": "0.5785926", "text": "public static function isFile($file) {\n \n }", "title": "" }, { "docid": "91fd94bc6101cd49259e2f3c78ed247d", "score": "0.57660764", "text": "public function validateFile($file);", "title": "" }, { "docid": "ac79a340c63d7dd0ed94de3a7bae6ac2", "score": "0.5730792", "text": "abstract protected function isValidFile(SplFileObject $file);", "title": "" }, { "docid": "0b9e8c8f3b7b1a8ca221060ac673fa54", "score": "0.57294136", "text": "public static function accepts_xml() \n {\r\n return self::accepts('xml');\r\n }", "title": "" }, { "docid": "fb6e600d1f2f1b68c2ef566cfd52836e", "score": "0.5702548", "text": "public function _xml($_xml_file='')\n\t\t/* includes specified xml file (if it exists) in the scope of this object\n\t\t *\n\t\t * returns true if the content was included successfully, false on an error\n\t\t *\n\t\t */\n\t\t{\n\t\t\t# and automatically linked content\n\t\t\tglobal $t;\n\t\t\tif (strlen($_xml_file)==0) return false;\n\t\t\tif (func_num_args() > 1) {\n\t \t\t$_xml_args = func_get_args();\n\t \t\tarray_shift($_xml_args);\n\t \t} else {\n\t \t\t$_xml_args = array();\n\t \t}\n\t\t\tif (@file_exists($this->_myloc . \"xml/$_xml_file.php\")) {\n\t\t\t\t# process args\n\t\t\t\tforeach($_xml_args as $_arg=>$_val) { ${$_arg}=$_val; }\n\t\t\t\tinclude($this->_myloc . \"xml/$_xml_file.php\");\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "46b99fa18544b48bc558e477494b91da", "score": "0.56990075", "text": "function isValidXmpskin($filename){\n\t\t$result = false;\n\t\t$check = \"skinconfig.txt\";\n\t\t// check if input is a directory or a file\n\t\tif(is_file($filename)){\n\t\t\t// try to list ZIP index, search for $check\n\t\t\t$f = new ZipArchive();\n\t\t\t$res = $f->open($filename);\n\t\t\tif($res === true){\n\t\t\t\tif($f->statName($check)){\n\t\t\t\t\t$result = true;\n\t\t\t\t}\n\t\t\t\t$f->close();\n\t\t\t}\n\t\t} elseif(is_dir($filename)){\n\t\t\t// try a directory\n\t\t\tif(file_exists($filename.\"/\".$check)){\n\t\t\t\t$result = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "f97e57882f3f953e7216d76bedd21dd0", "score": "0.5698932", "text": "public function validateFile();", "title": "" }, { "docid": "9f2e225830b45c5c8367783734d06491", "score": "0.56974566", "text": "protected function parseFile($file)\n {\n $dom = new \\DOMDocument();\n libxml_use_internal_errors(true);\n if (!$dom->load($file, LIBXML_COMPACT)) {\n throw new MappingException(implode(\"\\n\", $this->getXmlErrors()));\n }\n if (!$dom->schemaValidate(__DIR__.'/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd')) {\n throw new MappingException(implode(\"\\n\", $this->getXmlErrors()));\n }\n $dom->validateOnParse = true;\n $dom->normalizeDocument();\n libxml_use_internal_errors(false);\n\n return simplexml_import_dom($dom);\n }", "title": "" }, { "docid": "ca7db33d0b661660d1df9152e5f1c1b0", "score": "0.5686851", "text": "function readXmlFile($name)\r\n{\r\n if (file_exists($name)) {\r\n return file_get_contents($name);\r\n }\r\n\r\n return false;\r\n}", "title": "" }, { "docid": "91f459e79eb07e1e4964d4f4aedcd218", "score": "0.5679234", "text": "public function isFile($file);", "title": "" }, { "docid": "91f459e79eb07e1e4964d4f4aedcd218", "score": "0.5679234", "text": "public function isFile($file);", "title": "" }, { "docid": "2a4fe1c688dba61943f2e20fc2daadda", "score": "0.5675312", "text": "public function exist()\n {\n $xml = simplexml_load_file($this->getFile());\n $target = $xml->xpath(\"//dealer[@ref='\" . $this->_code . \"']\");\n if (!$target) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "9509347ae02923f5215d2371b2686fe8", "score": "0.5616822", "text": "private function lintFile(string $file): bool\n {\n // first try to parse it\n try {\n $this->parser->parse(\\file_get_contents($file));\n } catch (\\Throwable $e) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "6586ae4f3b73083b6a323f21753515d5", "score": "0.55948764", "text": "public function is_file($file);", "title": "" }, { "docid": "5ee6b2f398eb5396fb0cb40b1e43bae0", "score": "0.55945235", "text": "public function isAllowedTranslationFile($file, $fileName)\n {\n // Extension must be 'php'\n if (self::TRANSLATION_FILE_TYPE !== substr($file, -4)) {\n return false;\n }\n\n // Default language is EN, we don't need it\n if (self::INITIAL_LANGUAGE === $fileName) {\n return false;\n }\n\n // We don't take index file\n if (self::INDEX_FILE_NAME === $fileName) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "058fb05f4c15db3fa5e81026d43f440e", "score": "0.55708545", "text": "public function checkFile()\n {\n $fileTypes = ['xls', 'xlsx'];\n\n foreach($fileTypes as $fileType) {\n if (file_exists($this->pathFile.\".\".$fileType)) {\n $this->validFile = true;\n $this->inputFileType = ucfirst($fileType);\n $this->pathFile = $this->pathFile.\".\".$fileType;\n break;\n }\n }\n }", "title": "" }, { "docid": "7dcedb94891b239c6839dc69fc9dd0fe", "score": "0.55628085", "text": "function canLoadFile($file)\n {\n $arr_str = json_encode($this->showedLinks);\n if(strstr($arr_str,$file))\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "5d10c7432fc54f1ccc725b3cab9d144c", "score": "0.55615914", "text": "public function file_validation($filepath){\n\t\t\t\t\n\t\t\t\t$flag = 0;\t\n\t\t\t \n\t\t\t\t$fp = fopen($filepath, 'r');\n\t\t\t\t\n\t\t\t\t// move to the 0th byte\n\t\t\t\tfseek($fp, 0);\n\t\t\t\t$data = fread($fp, 5); // read 5 bytes from byte 0\n\t\t\t\t\n\t\t\t\tif(strcmp($data,\"%DOC-\")==0 || strcmp($data,\"%XLS-\")==0 || strcmp($data,\"%PPT-\")==0 || strcmp($data,\"%PDF-\")==0)\n\t\t\t\t{\n\t\t\t\t\t$flag = 1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo \"Sorry, we only accept correct doc, pdf, ppt and xls file \\n\";\n\t\t\t\t\texit;\n\t\t\t\t} \n\t\t\t\t\n\t\t\t\tfclose($fp);\n\t\t\t\t\n\t\t\t\treturn $flag;\t\n\t\t\t}", "title": "" }, { "docid": "0c7b5ba48ca25b05940b54cb3a66e258", "score": "0.5538849", "text": "function validateFile($file)\n {\n if (file_exists($file)) {\n $this->uploaded_file = $file;\n $this->buildRequest('file');\n if ($this->sendRequest()) {\n return $this->parseSOAP12Response($this->request->getResponseBody());\n } else {\n return false;\n }\n } else {\n // No such file!\n return false;\n }\n }", "title": "" }, { "docid": "1d0fbdd3f136cc7b71bd1963631a86b6", "score": "0.5529286", "text": "public function hasXssInfile( $fileName )\n {\n $fh = fopen( $fileName, 'rb' );\n \n $file_check = fread( $fh, 512 );\n \n fclose( $fh );\n \n if ( ! $file_check )\n {\n return true;\n }\n else if ( preg_match( '#<script|<html|<head|<title|<body|<pre|<table|<a\\s+href|<img|<plaintext|<cross\\-domain\\-policy#si', $file_check ) )\n {\n return true;\n }\n \n return false;\n }", "title": "" }, { "docid": "ca4859944b3b7118598af5fc71210079", "score": "0.55134183", "text": "public function isCorrectFile(){\n\t\t$this->isCorrectFile = true;\n\t\t$this->errors = array();\n\t\t\n\t\tif(!$this->exists()){\n\t\t\t$this->errors[\"-10001\"] = \"Le document \" . $this->path . $this->name . \".\" . $this->extension . \" n'existe pas ou n'est pas situé dans le dossier spécifié\";\n\t\t\t$this->isCorrectFile = false;\n\t\t} else {\n\t\t\tif(!in_array($this->extension, $this->extensionsAllowed)){\n\t\t\t\t$this->isCorrectFile = false;\n\t\t\t\t$this->errors[\"-10002\"] = \"Un document avec une extension \" . $this->extension . \" n'est pas autorisé.\";\n\t\t\t} else {\n\t\t\t\tif($this->size() == 0){\n\t\t\t\t\t$this->isCorrectFile = false;\n\t\t\t\t\t$this->errors[\"-10003\"] = \"Le document \" . $this->path . $this->name . \".\" . $this->extension . \" est vide.\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->isCorrectFile;\n\t}", "title": "" }, { "docid": "23808a28dc04d11b50c8695074c952f2", "score": "0.5507111", "text": "public function is_readable($file);", "title": "" }, { "docid": "d4f383fa6e53a1b77eca8315b398de56", "score": "0.5500556", "text": "private function is_template($file = null)\n {\n if ( null === $file )\n return false;\n return file_exists($this->_template_path . '/' . $file);\n }", "title": "" }, { "docid": "b5288208b219f7e3640c6bc8b9842f50", "score": "0.54747516", "text": "private function isGoogleDocFile($file) {\n\t\treturn $this->getGoogleDocExtension($file->getMimeType()) !== '';\n\t}", "title": "" }, { "docid": "b244b92d93dd30ad1ec1320faa1d5456", "score": "0.5471545", "text": "protected function _checkFileinfo()\n {\n if (extension_loaded('fileinfo') &&\n ($res = @finfo_open())) {\n finfo_close($res);\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "7caa5ce5d9ba0e88e3b607a77c044cda", "score": "0.54471385", "text": "private function isValidFile($file)\n {\n if (!file_exists($this->path.$file)) {\n return false;\n }\n\n // Check permissions?\n\n if ($this->getExtension($file) === $this->extension) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "e8ee50a165c00e7ad063c3e60efa59d1", "score": "0.5439886", "text": "public function hasXml()\n {\n return $this->xml !== null;\n }", "title": "" }, { "docid": "88aa609218ed83f52788fbc1cc95f5dc", "score": "0.5424526", "text": "public static function loadXMLMapping() {\r\n\t\t$args = func_get_args();\r\n\t\tforeach($args as $configname)\r\n\t\t{\r\n\t\t\t$lines = explode('.',$configname);\r\n\t\t\t$config = PhpBURN_Configuration::getConfig($lines[0]);\r\n\t\t\t$basedir = $config->class_path;\r\n\t\t\t\r\n\t\t\t$length = count($lines);\r\n\t\t\t\r\n\t\t\t$newpath = \"\";\r\n\t\t\tforeach($lines as $key => $value) {\r\n\t\t\t\tif($key == ($length-1)) {\r\n\t\t\t\t\t$newpath .= \"_mapping\".DIRECTORY_SEPARATOR.$value.\".xml\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$newpath .= $value . DIRECTORY_SEPARATOR;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$filepath = $basedir . $newpath;\r\n\t\t\tif(file_exists($filepath)) {\r\n\t\t\t\treturn PhpBURN::loadFile($filepath);\r\n\t\t\t} else {\r\n\t\t\t\treturn \"error\";\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "4fcf11cfefcbcfee7b320f0c8c6bfa65", "score": "0.5397562", "text": "public function canProcess(File $file) {\n\t\treturn $file->exists();\n\t}", "title": "" }, { "docid": "6477f419b6cc3018cf5ccffcee399f29", "score": "0.53910154", "text": "function parseXMLFile($xml_file, $xsl, $rng_schema) {\n\n $xml = new \\DOMDocument();\n $xml->load($xml_file);\n\n $class = new \\ReflectionClass($this);\n $namespace = str_replace(\"\\\\\",\"/\",$class->getNamespaceName());\n\n $rng_file = base_path().\"/\".$namespace.\"/schema/\".$rng_schema;\n $xsl_file = base_path().\"/\".$namespace.\"/xsl/\".$xsl;\n\n if (file_exists($rng_file)){\n // validate the xml file against the rng schema\n $valid = $xml->relaxNGValidate($rng_file);\n if (!$valid) {\n return false;\n }\n }\n else $valid = TRUE;\n\n if ($valid) {\n $newXML = new \\DOMDocument();\n $newXML->loadXML(trim(XML_utilities::fixPageBreaks($xml_file)));\n\n $xsl = new \\DOMDocument();\n $xsl->load($xsl_file);\n\n $proc = new \\XSLTProcessor();\n $proc->importStyleSheet($xsl);\n\n // return the xsl output\n return $proc->transformToXML($newXML);\n\n }\n else {\n return false;\n }\n }", "title": "" }, { "docid": "f3102eeeb074ebff1596c7a29304a107", "score": "0.53908855", "text": "protected function _getKnownValidXml()\n {\n return __DIR__ . '/_files/search_engine/valid.xml';\n }", "title": "" }, { "docid": "3ea2be87bcdcf312318fac7b900eaa57", "score": "0.53737634", "text": "public static function validXML($xml) {\n\t\tif(simplexml_load_string($xml)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "3592421cd19945c4a03ffd864c1c0b13", "score": "0.53578854", "text": "public function canRead($pFilename)\n {\n // Check if file exists\n if (!file_exists($pFilename)) {\n throw new PHPExcel_Reader_Exception(\"Could not open \" . $pFilename . \" for reading! File does not exist.\");\n }\n\n $zipClass = PHPExcel_Settings::getZipClass();\n\n // Check if zip class exists\n// if (!class_exists($zipClass, false)) {\n// throw new PHPExcel_Reader_Exception($zipClass . \" library is not enabled\");\n// }\n\n $xl = false;\n // Load file\n $zip = new $zipClass;\n if ($zip->open($pFilename) === true) {\n // check if it is an OOXML archive\n $rels = simplexml_load_string($this->securityScan($this->getFromZipArchive($zip, \"_rels/.rels\")), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions());\n if ($rels !== false) {\n foreach ($rels->Relationship as $rel) {\n switch ($rel[\"Type\"]) {\n case \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\":\n if (basename($rel[\"Target\"]) == 'workbook.xml') {\n $xl = true;\n }\n break;\n\n }\n }\n }\n $zip->close();\n }\n\n return $xl;\n }", "title": "" }, { "docid": "272a6aa2214d462a6911662dfc90c315", "score": "0.5343529", "text": "function isReadable($file){\n $result = false;\n if (is_scalar($file)) {\n $fp = @fopen($file, 'r', true);\n if ($fp) {\n fclose($fp);\n $result = true;\n }\n }\n return $result;\n }", "title": "" }, { "docid": "bdedd3f6e4e2facdbc6b0fd6830d5258", "score": "0.53419864", "text": "protected function _checkFileTypeImport($file_name){\r\n $result = false;\r\n $typesAllow = array('jpg', 'jpeg', 'gif', 'png');\r\n $file_type = pathinfo($file_name, PATHINFO_EXTENSION);\r\n if(in_array(strtolower($file_type), $typesAllow)){\r\n $result = true;\r\n }\r\n return $result;\r\n }", "title": "" }, { "docid": "06a15aa430596e68f41a813ffd61bd77", "score": "0.5339877", "text": "function isFile()\n\t{\n\t\treturn $this->getResourceType() == '';\n\t}", "title": "" }, { "docid": "09366fe89614c7cfe92ad9542443f3e7", "score": "0.53345203", "text": "function loadXML($xml)\n{\n if (@fopen($xml, 'r')) {\n @fclose($xml);\n return simplexml_load_file($xml);\n } else {\n return FALSE;\n }\n}", "title": "" }, { "docid": "3e7a971b451f80972eeeebe581f545e6", "score": "0.53338075", "text": "public function isFile($file)\n\t{\n\t\treturn is_file($file);\n\t}", "title": "" }, { "docid": "3e7a971b451f80972eeeebe581f545e6", "score": "0.53338075", "text": "public function isFile($file)\n\t{\n\t\treturn is_file($file);\n\t}", "title": "" }, { "docid": "9a763ba0e9c714af066de350d3b743e9", "score": "0.5328069", "text": "public function isFile($file)\n {\n return is_file($file);\n }", "title": "" }, { "docid": "9a763ba0e9c714af066de350d3b743e9", "score": "0.5328069", "text": "public function isFile($file)\n {\n return is_file($file);\n }", "title": "" }, { "docid": "0ee17a81db7553dda0b8da780b1b9ec6", "score": "0.53217965", "text": "function check_valid_xml($id, $target_path, $defaultlabels, $apply, $country_code, $language_code, $findline='')\n{\n global $debug_obj, $templates_obj;\n\n $arguments = array($id, $target_path, $defaultlabels, $apply);\n $debug_obj->WriteDebug($class=\"fileupload\", $function=\"check_valid_xml\", $file=$findline['file'], $debug_obj->FindFunctionCalledline('check_valid_xml', $findline['file'], $findline['line']), $arguments);\n\n $xml = new DOMDocument();\n $xml->load($target_path);\n if(!$xml->schemaValidate(\"../data/xml/temp/labels.xsd\")) // validate xml with the pre defined name space \n {\n $message = \"<div class='error' id='0'>There was a problem in the XML uploaded. Reason: XML Tags are missing/mismatch.</div>\";\n }\n else\n {\n $labels = array();\n $lablenames = array();\n $labels = '';\n $xml = simplexml_load_file($target_path);\n foreach ($xml->Home[0]->homelabel as $homelabel) {\n $lablenames[] = (string) $homelabel['for'];\n }\n foreach ($xml->Mobile[0]->mobilelabel as $mobilelabel) {\n $lablenames[] = (string) $mobilelabel['for'];\n }\n foreach ($xml->Anyphone[0]->anyphonelabel as $anyphonelabel) {\n $lablenames[] = (string) $anyphonelabel['for'];\n }\n foreach($lablenames as $child)\n {\n if (in_array($child, $defaultlabels)) {\n $labels[] = 1;\n }\n else {\n $labels[] = 0;\n }\n }\n if (in_array(0, $labels)) { // display error if lables is missing \n $message = \"<div class='error' id='0'>There was a problem in the XML uploaded. Reason: Label attributes changed.</div>\";\n }\n elseif(count($defaultlabels) != count($lablenames)) {\n $message = \"<div class='error' id='0'>There was a problem in the XML uploaded. Reason: Label attributes changed.</div>\";\n }\n else\n {\n $xml = simplexml_load_file($target_path);\n foreach($xml->attributes() as $key => $value)\n {\n if($key == 'country_code') {\n if($value != $country_code) {\n $error = \"<div class='error' id='0'>Select Valid Country XML.\";\n }\n }\n if($key == 'language_code') {\n if($value != $language_code) {\n $error = \"<div class='error' id='0'>Select Valid Language XML.\";\n }\n }\n }\n if($error == '')\n $message = \"<div class='success' id='1'>XML file uploaded successfully.</div>\";\n else\n $message = $error;\n }\n }\n return $message;\n}", "title": "" }, { "docid": "8e20d414d7445d6ea90f6aeb7fdca895", "score": "0.53127575", "text": "public function isFile();", "title": "" }, { "docid": "d5c26583f4698775d64825ad70e397ca", "score": "0.5303972", "text": "public function isFileReadable($file){\n if (is_readable($file)) {\n return true;\n }else{\n\t return false;\n }\n }", "title": "" }, { "docid": "01f3dc0a8150334b7f4bdf2c2f24c8af", "score": "0.53027093", "text": "function checkFile() {\n\t\t// Checke, ob die Datei ein Bild ist (erhöht auch die Sicherheit)\n\t\t// $image_info = getimagesize()\n\t\t\n\t\t\n\t\t// Checke die Dateiendung\n\t\t// pathinfo($target_file,PATHINFO_EXTENSION)\n\t\t\n\t\n\t\t// Checke den MIME-Type der Datei\n\t\t// $filepath = realpath($_FILES['myFile']['tmp_name']);\n\t\t// escape spaces in $filename due to their separating effect \n\t\t// $filepath = str_replace(\" \",\"\\\\ \",$filepath);\n\t\t// $finfo = finfo_open(FILEINFO_MIME_TYPE);\n\t\t// $mime = finfo_file($finfo, $filepath);\n\t\t// finfo_close($finfo);\n\t\t// if (!in_array($mime,$this->allowedMimeTypes)) {\n\t\t\t// $this->feedback .= \"Diese Datei hat keinen erlaubten MIME-Type. Erlaubt sind nur Bilder.<br>\";\n\t\t// }\n\n\t\t// Checke die Dimensionen des Bildes\n\t\t// $image_info[0]\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "11cf2b37f01389f4060d7c2095e4556e", "score": "0.53001803", "text": "private function tryParseXML($filename)\n\t{\n\t\t$xml = new XMLStackReader();\n\t\tif(!$xml->open($filename))\n\t\t\treturn false;\n\n\t\t$parents = array(self::XML_ROOT, self::XML_KEY, self::XML_DATA);\n\t\tif($xml->readUntilParentsBe($parents))\n\t\t{\n\t\t\tif($xml->isTextInside())\n\t\t\t{\n\t\t\t\t$this->hash = base64_decode($xml->r->value);\n\t\t\t\t$xml->close();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t$xml->close();\n\t\treturn false;\n\t}", "title": "" }, { "docid": "35d387e2c5a9248854fef3306da20bc6", "score": "0.5290532", "text": "public function check(File $file)\n {\n $file->rewind();\n\n while ($file->seekTokenType(T_OPEN_TAG)) {\n $token = $file->current();\n\n $tag = trim($token->getLexeme());\n $name = self::$tagMap[$tag];\n\n if (!in_array($name, $this->allowed)) {\n $this->addViolation(\n $file, $token->getLine(), $token->getColumn(),\n sprintf('PHP tag \"%s\" is not allowed', $tag)\n );\n }\n\n $file->next();\n }\n\n if ($this->disallowClosingTag) {\n $file->rewind();\n\n if ($file->seekTokenType(T_CLOSE_TAG)) {\n $this->addViolation(\n $file, $token->getLine(), $token->getColumn(),\n 'Closing PHP tag found'\n );\n }\n }\n }", "title": "" }, { "docid": "64421f40c49c26054ac9273bfd05da3e", "score": "0.5284303", "text": "public function isLoadedFromFile(): bool\n {\n return $this->fileExists;\n }", "title": "" }, { "docid": "c197c579fbae8c1871f953980bb84b79", "score": "0.5282266", "text": "public function isInputValid(): bool\n {\n $fastaFile = $this->model->getParameter('fastaFile');\n $mapFile = $this->model->getParameter('map_file');\n $disk = Storage::disk('public');\n $dir = $this->model->getJobDirectory() . '/';\n if (!$disk->exists($dir . $fastaFile)) {\n return false;\n }\n if ($mapFile && !$disk->exists($dir . $mapFile)) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "fbceb8519a0ea82dcb86812c05225387", "score": "0.5281931", "text": "public function isValid(): bool\n {\n return $this->file->isValid();\n }", "title": "" }, { "docid": "6b59487c9a0b29402bdf4619fdbd0db2", "score": "0.52817094", "text": "function is_valid_excel_type($file_path)\n{\n $valid_types = array('Excel2007', 'Excel5');\n \n foreach($valid_types as $type)\n {\n $reader = PHPExcel_IOFactory::createReader($type);\n if ($reader->canRead($file_path))\n {\n return true;\n }\n }\n \n return false;\n}", "title": "" }, { "docid": "bd1139b2922a6b3bc01693e93a686869", "score": "0.5267562", "text": "public function checkFile() {\n\n\t\t// Support for letsencript https certificates.\n\t\tif (!empty($this->request[2]) && $this->request[2] == 'acme-challenge') {\n\t\t\treadfile('/' . trim($this->dir['docroot'] . implode('/', $this->request), '/'));\n\t\t die();\n\t\t}\n // TODO: redo the whole shit.\n if (strpos($this->request[count($this->request) - 1], '.') > 0) {\n $filename = $this->request[count($this->request) - 1];\n $nodepath = Cache::getStoredNodePath($this, $this->request[1]);\n $file = $nodepath . '/' . urldecode($filename);\n if (is_file($file)) {\n header('Content-Type: ' . mime_content_type($file));\n $mods = array_flip(apache_get_modules());\n if (isset($mods['mod_xsendfile'])) {\n // TODO: support for xsendfile.\n readfile($file);\n }\n else {\n //TODO : slow, insecure...\n readfile($file);\n }\n die();\n }\n elseif ($filename == 'favicon.ico') {\n die(\"No favicon available.\");\n }\n }\n }", "title": "" }, { "docid": "cde003d34122b4f97d886dd4bbcf26bd", "score": "0.52612257", "text": "public function validateFile(Symfony\\Component\\Finder\\SplFileInfo $file) {\r\n $filename = $file->getRelativePathname();\r\n if (substr($filename, 0, 1) == '/') {\r\n $filename = substr($filename, 1);\r\n }\r\n\r\n if (!self::isFirstPartOfStr($filename, 'typo3temp/comvosfilelist')) {\r\n $damfileIsInListAndIndexed = $this->commonQueryBuilder\r\n ->andWhere(\"file_path like :validatefile_path\")\r\n ->andWhere(\"file_name like :file_name\")\r\n ->setParameter('validatefile_path', $file->getRelativePath())\r\n ->setParameter('file_name', $file->getFilename())\r\n ->execute()\r\n ->rowCount();\r\n\r\n if (!$damfileIsInListAndIndexed) {\r\n return false;\r\n }\r\n }\r\n if ((t3lib_div::verifyFilenameAgainstDenyPattern($file->getRealPath())\r\n && t3lib_div::isAllowedAbsPath($file->getRealPath())\r\n && $file->isFile()\r\n && $file->isReadable()\r\n && $this->isWithinAllowedFolders($filename)\r\n )) {\r\n return true;\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "4eedb7edfedcaf4cdcda28be7823f86b", "score": "0.5261076", "text": "public function isValid() {\n // file system\n if (!$this->exists()) {\n return false;\n }\n \n // DB: entry in components or modules\n // DB: entry in backend areas\n // DB: existing page if necessary\n \n // what else?\n \n return true;\n }", "title": "" }, { "docid": "2f572c33ba619dea5eb5b48a14cff5fd", "score": "0.5255423", "text": "protected function load($file) {\n\n if (!($this->handle = fopen($file, 'r'))) {\n throw new Error(\"Could not read file [$file]\");\n }\n\n return ($this->handle !== false);\n\n }", "title": "" }, { "docid": "33a0f95aee55ef847fbd5ac0206e155e", "score": "0.5252585", "text": "function file_readable(){\n \n /*Makes sure the file exists*/\n if($this->file_found()){\n \n if(is_readable($this->file)){\n\treturn true;\n }\n \n /*Returns false if the file is not readable*/\n else{ \n\treturn false;\n }\n }\n\n /*Returns false if the file doesn't exist*/\n else{\n return false;\n }\n \n }", "title": "" }, { "docid": "d08268d17e035fb09836df7e397711fd", "score": "0.5241501", "text": "protected function validate() \r\n\t{\r\n\t\tif(!file_exists($this->data->filePath))\r\n\t\t{\r\n\t\t\tthrow new KalturaBatchException(\"File doesn't exist [{$this->data->filePath}]\", KalturaBatchJobAppErrors::BULK_FILE_NOT_FOUND);\r\n\t\t}\r\n\t\t\r\n\t\tlibxml_use_internal_errors(true);\r\n\t\t\r\n\t\t$this->loadXslt();\r\n\t\t\t\r\n\t\t$xdoc = new KDOMDocument();\r\n\t\t\r\n\t\t$xmlContent = $this->xslTransform($this->data->filePath);\r\n\t\tlibxml_clear_errors();\r\n\t\tif(!$xdoc->loadXML($xmlContent)){\r\n\t\t\t$errorMessage = kXml::getLibXmlErrorDescription($xmlContent);\r\n\t\t\tKalturaLog::debug(\"Could not load xml\");\r\n\t\t\tthrow new KalturaBatchException(\"Could not load xml [{$this->job->id}], $errorMessage\", KalturaBatchJobAppErrors::BULK_VALIDATION_FAILED);\r\n\t\t}\r\n\t\t//Validate the XML file against the schema\r\n\t\tlibxml_clear_errors();\r\n\t\tif(!$xdoc->schemaValidate($this->xsdFilePath)) \r\n\t\t{\r\n\t\t\t$errorMessage = kXml::getLibXmlErrorDescription($xmlContent);\r\n\t\t\tKalturaLog::debug(\"XML is invalid:\\n$errorMessage\");\r\n\t\t\tthrow new KalturaBatchException(\"Validate files failed on job [{$this->job->id}], $errorMessage\", KalturaBatchJobAppErrors::BULK_VALIDATION_FAILED);\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "2a46f7c6ed452c46c5854471a3f1edd9", "score": "0.52309215", "text": "function isFile() {}", "title": "" }, { "docid": "82d9fac85a2bf5ca7e1f54f09deae69d", "score": "0.5226912", "text": "protected function check() {\n\t\tif (!in_array($this->parameters['file'], $this->possibleFiles)) {\n\t\t\tthrow new Exception(\"Exception: unknown file request \\\"{$this->parameters['file']}\\\"\");\n\t\t}\n\t}", "title": "" }, { "docid": "f4ab900142a97bf9770177811b785a24", "score": "0.52236944", "text": "protected function parseFile() {\n\t\t$file = $this->getFile();\n\t\t//\tlibxml_use_internal_errors();\n\t\t$XML = simplexml_load_file(realpath($file));\n\n\t\tif(!$XML) {\n\t\t\t$this->showErrors();\n\t\t\tthrow new BuildException(\"Invalid XML!\");\n\t\t}\n\t\t$XML = $this->resolveManifestVars($XML,$file);\n\t\t\n\t\treturn $XML;\n\t}", "title": "" }, { "docid": "9ec451d369cb1cc8cfd65f4866b21561", "score": "0.52167535", "text": "function is_valid_type($file)\n {\n $valid_types = array(\"image/png\"); /*,\"image/jpg\", \"image/jpeg\", \"image/bmp\", \"image/gif\"*/\n\n if (in_array($file['type'], $valid_types)){\n return 1;\n } else {\n return 0;\n }\n }", "title": "" }, { "docid": "03f983ab5a74ce48ea757c088393897c", "score": "0.5215224", "text": "function isTrustedFile() {\n\t\t#this could be implemented to check a flag in the databas,\n\t\t#look for signatures, etc\n\t\treturn false; \n\t}", "title": "" }, { "docid": "5ab8965747fcbcd0cc72b86aea06d565", "score": "0.52008885", "text": "private function fileCheck() {\n $this->open();\n\n $mimetype = $this->_getFileContentFromZipArchive('mimetype');\n if (strtolower($mimetype) !== 'application/epub+zip') {\n throw new \\Exception('The epub file is not validated');\n }\n\n $this->close();\n }", "title": "" }, { "docid": "46a994a68f56b8b660bb74b89e65a844", "score": "0.5200824", "text": "protected function isXMLOutputFormat()\n {\n return ($this->getOutputFormat() == 'xml') ? true : false;\n }", "title": "" }, { "docid": "035d58a27983d8a2cc0f28021f7c938e", "score": "0.52004015", "text": "function readable($file)\n{\n\treturn (file_exists($file) && is_readable($file));\n}", "title": "" }, { "docid": "93c0825d17db7a19e23351e43d57a0e5", "score": "0.51998854", "text": "public function is_xml($content) {\n\t //Make sure libxml is available\n\t if( ! function_exists( 'libxml_use_internal_errors' ) ){\n\t return false;\n }\n\n\t\t$content = trim( $content );\n\t\tif( empty( $content ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif( stripos( $content, '<!DOCTYPE html>' ) !== false ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tlibxml_use_internal_errors( true );\n\t\tsimplexml_load_string( $content );\n\t\t$errors = libxml_get_errors();\n\t\tlibxml_clear_errors();\n\n\t\treturn empty( $errors );\n\t}", "title": "" }, { "docid": "f9f3298733309ecac2038b25f49533a9", "score": "0.5189833", "text": "function getXMLAsSimpleXML($pathFromRoot = \"container\", $file = \"wsdlStatus.xml\") {\n $basePath = app()->basePath();\n\n $mapObject = simplexml_load_file(\"$basePath/$pathFromRoot/$file\");\n\n if (FALSE === $mapObject) {\n throw new InvalidFileException(\"Loading the WSDL status map failed.\");\n }\n\n return $mapObject;\n}", "title": "" }, { "docid": "3802740c6bd96a003ed94f227b9d1cb8", "score": "0.5181495", "text": "public function getHasFile(){\n\t\tforeach ($this->getAttributes() as $attribute){\n\t\t\tif ($attribute->getType() == 'file'){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "bb9697293a51f889ae1d267e8298f7b0", "score": "0.5178907", "text": "protected static function _isTestCaseFile($file) {\n\t\treturn self::_hasExpectedExtension($file, self::$_testExtension);\n\t}", "title": "" }, { "docid": "fad9bd35c86da9ed6f182b31c0f6c292", "score": "0.51783764", "text": "public function isFile($file)\n\t{\n\t\treturn ($file instanceof File);\n\t}", "title": "" }, { "docid": "ce6c901b662b6599f329e60d0e9fe5a4", "score": "0.5175973", "text": "public function isFile() : bool\n {\n\n return ( file_exists($this->path) && is_file($this->path) );\n }", "title": "" }, { "docid": "5f7c134ff375b363cbe117aca9ea68f8", "score": "0.517288", "text": "private function load($file) {\n\t\tif (file_exists($file))\n\t\t{\n\t\t\tinclude ($file);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "edf4f7ef29168f8fd1a69f2cb301a9a2", "score": "0.51653117", "text": "public function checkUuidTraitsFile()\n {\n return file_exists(getcwd() . '/app/Traits/Uuids.php');\n }", "title": "" }, { "docid": "2dd7d5ab8862c363dc2f3d5e97cbd1b9", "score": "0.51545197", "text": "public function check_file($filename)\n {\n \treturn file_exists($filename);\n }", "title": "" }, { "docid": "a1972014b32952ef9c7901ec47cd3eae", "score": "0.51538527", "text": "public function hasFile()\n {\n return is_file($this->bean->dir.$this->bean->file);\n }", "title": "" }, { "docid": "a468f5ac8ef6dfaa5b960cdae0438b18", "score": "0.5147707", "text": "public function valid()\r\n\r\n {\r\n\r\n if (!empty($this->_directory) || !empty($this->_files)) {\r\n\r\n throw new File_Fortune_Exception('Iteration over directory or multiple files not permitted');\r\n\r\n }\r\n\r\n\r\n\r\n if (empty($this->_file)) {\r\n\r\n $this->_open();\r\n\r\n }\r\n\r\n\r\n\r\n if (is_array($this->_fortunes)) {\r\n\r\n return key($this->_fortunes) !== null;\r\n\r\n }\r\n\r\n\r\n\r\n return array_key_exists($this->_curOffset, $this->offsets);\r\n\r\n }", "title": "" }, { "docid": "985b24edeb3eb2f64ab30276284aef88", "score": "0.51454115", "text": "function loadXMLFromFile($file)\r\n{\r\n $doc = new DomDocument('1.0','UTF-8');\r\n $fileContents = file_get_contents($file);\r\n\r\n libxml_use_internal_errors(true);\r\n\r\n $retval = $doc->loadXML($fileContents, LIBXML_NOERROR);\r\n\r\n if ($retval == false) {\r\n return libxml_get_errors();\r\n } else {\r\n return $doc;\r\n }\r\n}", "title": "" }, { "docid": "4023a2b052a4f0765e74b9d261c15364", "score": "0.5144696", "text": "public static function isAllowed($filename): bool\n {\n $ext = trim(pathinfo($filename, PATHINFO_EXTENSION));\n\n return in_array($ext, static::ALLOWED_EXTENSIONS);\n }", "title": "" }, { "docid": "10ada571083f7ebda1d7bdeb1e007518", "score": "0.5142901", "text": "protected function requireFile($file)\r\n {\r\n if (file_exists($file)) {\r\n require $file;\r\n if(class_exists($this->curClass, false)) {\r\n return true;\r\n }\r\n elseif(interface_exists($this->curClass, false)) {\r\n return true;\r\n }\r\n elseif(function_exists(\"trait_exists\") AND trait_exists($this->curClass, false)) {\r\n return true;\r\n }\r\n else {\r\n trigger_error(\r\n \"Error \" . __METHOD__ . \" : file '$file' not contain class (interface, trait) '\".$this->curClass.\"'\",\r\n E_USER_WARNING\r\n );\r\n return false;\r\n }\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "71b2ee818ca0cf01ea07d2f38b24f4a1", "score": "0.5140117", "text": "public function isFile(): bool;", "title": "" }, { "docid": "71b2ee818ca0cf01ea07d2f38b24f4a1", "score": "0.5140117", "text": "public function isFile(): bool;", "title": "" }, { "docid": "5ba7504c804843a38aa3b91eaccc08d5", "score": "0.51240146", "text": "public static function checkFileIsValidImage($file) { \n if (!file_exists($file)) {\n return false;\n }\n // abrimos la base de datos file info\n $info = finfo_open(FILEINFO_MIME_TYPE);\n // obtenemos el mime del archivo en cuestion\n $mime = finfo_file($info, $file);\n // cerramos la base de datos de file info\n finfo_close($info);\n if ($mime === 'image/png' || $mime === 'image/jpeg') {\n return true;\n } \n return false; \n }", "title": "" }, { "docid": "8b808478ca018b3485312de8bc5f6f07", "score": "0.5108601", "text": "public function validate(): bool\n {\n //$schemaPath = \\Cake\\Core\\Plugin::path('FmLabs/Mpay24') . DS . \"resources\" . DS . \"MDXI.xsd\";\n $schemaPath = dirname(dirname(dirname(__FILE__))) . DS . \"resources\" . DS . \"MDXI.xsd\";\n if (!$this->document->schemaValidate($schemaPath)) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "92f794b906ef60f6d575e6b1f522b722", "score": "0.5096196", "text": "function file_found(){\n \n if(file_exists($this->file)){\n return true;\n }\n \n else{\n return false;\n }\n \n }", "title": "" }, { "docid": "bfc5760e364687111691ee6e05d55cf9", "score": "0.5083692", "text": "abstract public function getAsXMLFile();", "title": "" }, { "docid": "4c4cdd5829ed2b240ead195e079145f6", "score": "0.50786906", "text": "public function isFileValid(?string $param = null): bool;", "title": "" } ]
69c5baff7273ee9283d2465d61554efd
control de acceso a la pagina
[ { "docid": "02101bf87df843eb9f810d2596c754d0", "score": "0.0", "text": "public function armado() {\n $validacion = new Seguridad_UsuarioValidacion();\n $validacion = $validacion->consultaElemento();\n\n // encabezados necesarios para el funcionamiento de los elementos de la pagina\n $this->_armadoPlantillaSet('cabeceras', Armado_Cabeceras::armado('tabla'));\n\n $armado_botonera = new Armado_Botonera();\n\n $parametros = array('kk_generar' => '0', 'accion' => '46');\n $armado_botonera->armar('nuevo', $parametros);\n\n // modificacion de orden de los elementos de la tabla\n if (isset($_GET['orden_act']) && $_GET['orden_act'] != '' && $_GET['id_orden_act'] != ''\n ) {\n if ($_GET['orden_ant'] != '' && $_GET['id_orden_ant'] != ''\n ) {\n Consultas_CambiarOrden::armado('kirke_rol', $_GET['id_orden_ant'], 'orden', $_GET['orden_act'], 'id_rol');\n Consultas_CambiarOrden::armado('kirke_rol', $_GET['id_orden_act'], 'orden', $_GET['orden_ant'], 'id_rol');\n } elseif ($_GET['orden_sig'] != '' && $_GET['id_orden_sig'] != ''\n ) {\n Consultas_CambiarOrden::armado('kirke_rol', $_GET['id_orden_sig'], 'orden', $_GET['orden_act'], 'id_rol');\n Consultas_CambiarOrden::armado('kirke_rol', $_GET['id_orden_act'], 'orden', $_GET['orden_sig'], 'id_rol');\n }\n }\n\n // datos necesarios para armar la tabla:\n // columna 0\n $tabla_columnas[0]['tb_columna_tipo'] = 'texto';\n $tabla_columnas[0]['tb_titulo_idioma'] = '{TR|o_rol}';\n $tabla_columnas[0]['tb_columna_ancho'] = '';\n $tabla_columnas[0]['tb_campo'] = 'rol';\n // columna 1\n $tabla_columnas[1]['tb_columna_tipo'] = 'orden';\n $tabla_columnas[1]['tb_titulo_idioma'] = '{TR|o_orden}';\n $tabla_columnas[1]['tb_campo'] = 'orden';\n $tabla_columnas[1]['tb_campo_id'] = 'id_rol';\n $tabla_columnas[1]['accion'] = '49';\n // columna 2\n $tabla_columnas[2]['tb_columna_tipo'] = 'ver';\n $tabla_columnas[2]['tb_titulo_idioma'] = '{TR|o_ver}';\n $tabla_columnas[2]['tb_campo'] = 'id_rol';\n $tabla_columnas[2]['variable_link'] = 'id_rol';\n $tabla_columnas[2]['accion'] = '52';\n // columna 3\n $tabla_columnas[3]['tb_columna_tipo'] = 'editar';\n $tabla_columnas[3]['tb_titulo_idioma'] = '{TR|o_editar}';\n $tabla_columnas[3]['tb_campo'] = 'id_rol';\n $tabla_columnas[3]['accion'] = '50';\n // columna 4\n $tabla_columnas[4]['tb_columna_tipo'] = 'eliminar';\n $tabla_columnas[4]['tb_titulo_idioma'] = '{TR|o_eliminar}';\n $tabla_columnas[4]['tb_campo'] = 'id_rol';\n $tabla_columnas[4]['accion'] = '48';\n\n // query para armar la consulta\n $tabla = Consultas_MatrizRoles::armado();\n\n // armado de la tabla\n $armar_tabla = new Armado_Tabla();\n $armar_tabla->sinDatosPie();\n return $armar_tabla->armar($tabla_columnas, $tabla);\n }", "title": "" } ]
[ { "docid": "5126c199d3fee0d6fc1c25556b60acec", "score": "0.74015516", "text": "public function index(){\n echo \"Carga el metodo por defecto correspondiente a este controlador\"; \n\t\t\t// echo '<script type=\"text/javascript\">window.location=\"'. RUTA_URL.' \"</script>';\n\t\t\t\n //Se redirije a la pagina \n \theader(\"location:\" . RUTA_URL);\n }", "title": "" }, { "docid": "c78013c495fc38eccfe2feabfdb9cdf4", "score": "0.7074572", "text": "function index(){\n\t\t\t$CI =& get_instance(); \n\t\t\t// obtenemos el nombre del controlador en el que estamos\n\t\t\t$controlador = $CI->router->class;\n\t\t\t$function = $CI->router->fetch_method();\n\t\t\t\n\t\t\t$es_estacion_pedido =(isset($CI->session->userdata['es_estacion_pedido']))?$CI->session->userdata['es_estacion_pedido']:0;\n\t\t\t\n\t\t\tif($es_estacion_pedido==1){\t\n\t\t\t\tif($controlador==\"frontend\"){\n\t\t\t\t\tredirect(\"tomaPedidos\");\n\t\t\t\t}\t\t\t\t\t\t\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "dd68096faeb9a1494b9f48aedb85fde3", "score": "0.6989085", "text": "public function index() {\n\t\t\n\n\t\tif (!empty($this->session -> userdata('user_logado'))) redirect(base_url('dashboard/principal'));\n\t\t\n\t\tset_tema('conteudo', load_modulo_dash('view_dash_login'), FALSE);\n\t\tload_template();\n\t\t\n\t}", "title": "" }, { "docid": "18575213353daf49dfb68ff9d0e54317", "score": "0.69672585", "text": "function home(){\n if(!is_null(Session::get('id_usuario'))){\n header(\"Location: \".URL.\"tarea\");\n //header(\"Location: /A4/tarea\"); para producción\n //header(\"Location: /tarea\"); para desarrollo\n }\n $this->view->show();\n }", "title": "" }, { "docid": "621a71fb8f57cc62334722d3d8d33fdd", "score": "0.69455034", "text": "public function pagina(){\n\t\t//include se utiliza para invocar el archvo que tiene el codigo html\n\t\tinclude \"views/template.php\";\n\t}", "title": "" }, { "docid": "1620c00669681ed287f32b559f314a73", "score": "0.6848972", "text": "public function aportes(){\n \tredirect(\"http://aportes.misiva.com.ec\");\n }", "title": "" }, { "docid": "dcd89834ac2203e4bba0b3a62f96953c", "score": "0.6825511", "text": "function cl_conciliapendcorrente() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"conciliapendcorrente\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "f51197c24738b070d3c9111582c57548", "score": "0.680685", "text": "public function index() {\n $this->getMethod()->checkSession(); //protegendo o painel contra acesso sem autenticação\n $result = [\n 'showButtom' => $this->getMethod()->ShowButton(),\n 'nivel' => $this->getMethod()->getLevel(),\n ];\n\n $this->LoadTemplatePainel('home', $result);\n }", "title": "" }, { "docid": "bafbc3e9c91874eb55cea791058b5bfd", "score": "0.680657", "text": "function cl_rhpessoalmovcontabancaria() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhpessoalmovcontabancaria\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "654c9f013a77a6dd5893275ccbfc1582", "score": "0.68013096", "text": "public function index(){/* Aucune action possible avec cette fonction */}", "title": "" }, { "docid": "43a358eb3cac21706c4a057b5e4b59a1", "score": "0.6797857", "text": "public function pagina(){\t\n\t\t\n\t\tinclude \"views/template.php\";\n\t\n\t}", "title": "" }, { "docid": "4117e071df9674a0b799f24595d74d66", "score": "0.67605275", "text": "function cl_rhconsignadomovimentoservidor() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhconsignadomovimentoservidor\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "5afa92ecc553dbc6c83741bfe333a92d", "score": "0.67581445", "text": "function cl_acidentes() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"acidentes\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "96124d4f230b76aa0076b219d11cbf23", "score": "0.67464685", "text": "public function PermissaoMenu(){\n\t\tif(isset($_SESSION['user_admin_wortex'])){\n\t\t\t\n\t\t\tinclude_once(ROOT_DIR.\"includes/barra_topo.php\");\n\t\t\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "24f09805ce58408a999938ea990420e0", "score": "0.6743084", "text": "public function impostaPagina() {\n\n $CRegistrazione = USingleton::getInstance('CRegistrazione');\n $loggato = $CRegistrazione->checkLogin();\n\n if ($loggato) {\n debug('SEI LOGGATO!');\n $this->setLogged(true);\n $this->setAdmin($loggato->isUserAdmin());\n } else\n debug('NON SEI LOGGATO!');\n\n // Recupera dalla sessione il controller e il task precedenti\n $sessione = USingleton::getInstance('USession');\n $previousController = $sessione->leggi_valore('prevController');\n $previousTask = $sessione->leggi_valore('prevTask');\n\n // Se il controller è REGISTRAZIONE e il task AUTENTICA o LOGOUT, imposto controllori e task precedenti\n if (($this->getController() == 'registrazione') && ($this->getTask() == 'autentica' || $this->getTask() == 'logout')) {\n if (($previousController == 'registrazione') && ($previousTask == 'salva' || $previousTask == 'registra' || $previousTask == 'modulo_attivazione')) {\n if ($this->isLogged() || ($previousTask == 'salva')) {\n $_REQUEST['controller'] = '';\n $_REQUEST['task'] = '';\n } else {\n $_REQUEST['controller'] = $previousController;\n $_REQUEST['task'] = $previousTask;\n }\n } else {\n $_REQUEST['controller'] = $previousController;\n $_REQUEST['task'] = $previousTask;\n }\n }\n\n // Imposta il contenuto della pagina\n $contenuto = $this->smista();\n\n $controller = $this->getController();\n $task = $this->getTask();\n \n //Se non è AJAX risponde la pagina web secondo il flusso normale, altrimenti non risponde niente (pagina bianca)\n if (!$this->isAjax()) {\n $VHome = USingleton::getInstance('VHome');\n $VHome->impostaContenuto($contenuto);\n // Imposta il breadcrumb in modo da far vedere 'controller' e 'task' coinvolti nella richiesta HTTP\n $VHome->assign('breadcrumb', 'Controller: ' . $controller . ' , Task: ' . $task . '******************** Previous Controller: ' . $previousController . ' , Previous Task: ' . $previousTask);\n\n if ($loggato) {\n $CUtente = USingleton::getInstance('CUtente');\n $utente = $CUtente->infoUtente();\n $COrdine = USingleton::getInstance('COrdine');\n $ordine = $COrdine->infoOrdine();\n $VHome->impostaPaginaLoggato($utente, $ordine);\n } else {\n $VHome->impostaPaginaOspite();\n }\n\n $VHome->mostraPagina();\n }\n\n // Salva nella sessione gli attuali controller e task che serviranno poi nella prossima chiamata di impostaPagina()\n if ($this->isAjax()) {\n $sessione->imposta_valore('prevController', $previousController);\n $sessione->imposta_valore('prevTask', $previousTask);\n } else {\n $sessione->imposta_valore('prevController', $controller);\n $sessione->imposta_valore('prevTask', $task);\n }\n }", "title": "" }, { "docid": "d6ac827be2dee198d3bb279ce5a6898c", "score": "0.6722036", "text": "public function inicioSesion()\r\n {\r\n $params=[];\r\n if($_SERVER['REQUEST_METHOD']=='POST')\r\n { $nombre = $_POST['nombre'];\r\n $pass = $_POST['password'];\r\n\r\n if(!empty($nombre) && !empty($pass))\r\n {\r\n $idUsuario= $this->usuarioRepository->findUsuario($nombre, $pass);\r\n if($idUsuario>0)\r\n {\r\n if(isset($_SESSION['carrito'])){\r\n header('Location: /Namespaces/web/index.php?ctl=carrito');\r\n }else{\r\n header('Location: /Namespaces/web/index.php?ctl=inicio');\r\n }\r\n }else\r\n {\r\n $params['error'] = 'Usuario o contraseña erróneos. Si aún no tienes cuenta, <a href=\"index.php?ctl=registrarUsuario\">registrate aquí</a>';\r\n }\r\n }else\r\n {\r\n $params['error'] = 'Son necesarios el Usuario y la Contraseña';\r\n }\r\n }\r\n $this->cargarVista('login', $params);\r\n\r\n }", "title": "" }, { "docid": "242d14972569cb6998a920cd9a6b411a", "score": "0.6715206", "text": "public function publicacioAction()\n {\n $id = (int) $this->getRequest()->getParam(\"id\",0);\n \n //passo page per quedarnos a la pàgina d'on venim\n $page = (int) $this->getRequest()->getParam(\"page\",0);\n \n $valor = (int) $this->getRequest()->getParam(\"val\",0);\n \n //creem objecte menu\n $menuId = new Admin_Model_Menu($id);\n \n $this->_menuDoctrineDao->privacitat($menuId,$valor);\n\n $this->_redirect('/admin/menu/index/page/'.$page); \n }", "title": "" }, { "docid": "80037f116b24dea250603a1815218617", "score": "0.67046136", "text": "public function pagina(){\n //Include se utiliza para invocar el arhivo que contiene el codigo HTML\n include \"views/plantilla.php\";\n }", "title": "" }, { "docid": "f19dad208ffc06927b91f4da6ba420d1", "score": "0.6692751", "text": "function page_index(){\n if( !$this->api->currentUser()->canSeeDashboard() ){\n throw $this->exception('You cannot see this page','Exception_Denied');\n }\n\n $this->add('x_bread_crumb/View_BC',array(\n 'routes' => array(\n 0 => array(\n 'name' => 'Home',\n ),\n 1 => array(\n 'name' => 'Dashboard',\n 'url' => 'dashboard',\n ),\n )\n ));\n\n if (\n !$this->api->currentUser()->isAdmin() &&\n !$this->api->currentUser()->isSystem()\n ) {\n if ($this->api->currentUser()->isClient()) {\n $this->add('H3')->setText('Actions:');\n $b = $this->add('Button')->set('Request For Quotation');\n $b->addStyle('margin-bottom','10px');\n $b->js('click', array(\n $this->js()->univ()->redirect($this->api->url('quotes/rfq'))\n ));\n\n $b = $this->add('Button')->set('Create Task');\n $b->addStyle('margin-bottom','10px');\n $b->js('click', array(\n $this->js()->univ()->redirect($this->api->url('tasks/new'))\n ));\n }\n\n //$this->add('View_Switcher');\n $this->add('View_Dashboard',array(\n 'allow_add'=>false,'allow_edit'=>false,'allow_del'=>true,\n 'edit_fields'=>$this->api->currentUser()->getDashboardFormFields(),\n 'show_fields'=>$this->api->currentUser()->getDashboardGridFields(),\n ));\n }\n /*\n if ($this->api->currentUser()->isSystem()){\n $this->add('View_DashboardSystem');\n }\n */\n\n }", "title": "" }, { "docid": "eeb7e6509463dec5c322aeb29339ee3c", "score": "0.6686212", "text": "function acceso()\n\t{\n\t\t$opt \t\t= $this->uri->segment(1);\n\t\t$op['opt'] \t\t= $this->data_model->cargarOptimizacion($opt);\n\t\t\n\t\t//validacion para identificar tipo de usuario y desglosar info\n\t\t$user\t\t\t\t= $this->session->userdata('user');\n\t\t$op['info']\t\t\t= array();\n\t\t\n\t\t//Carga el javascript para jquery//\n\t\t$this->layouts->add_include('assets/js/jquery-ui.js')\n\t\t\t\t\t ->add_include('assets/js/jquery-datepicker.js')\n\t\t\t\t\t ->add_include('assets/css/dinamicaHp.css')\n\t\t\t\t\t ->add_include('assets/css/tables.css');\n\t\t\t\t\t \n\t\t$op['ciudades'] \t\t= $this->data_model->cargarCiudades();\n\t\t\n\t\tif ($user['uid'] != '') {\n\t\t\t$tipo = 'info_'.$user['tipoUsuario'];\n\t\t\t$op['info']\t= $this->data_model->$tipo($user['uid']);\n\t\t}\n\t\t\n\t\t//Vista//\n\t\t$this->layouts->light('acceso-view' ,$op);\n\t}", "title": "" }, { "docid": "d14a1aa741a4599df171963b4890de9d", "score": "0.6683912", "text": "public function index()\n\t\t{\n\t\t\t$usuarios = $this->loadModel(\"usuario\");\n\t\t\t$this->_view->usuarios=$usuarios->getUsuarios();\n\t\t\t$this->_view->titulo=\"Pagina principal\";\n\t\t\t$this->_view->renderizar(\"index\");\n\t\t}", "title": "" }, { "docid": "e795a308430e19e3a631cfc282f8c213", "score": "0.66613346", "text": "static function carica()\n {\n if ($_SERVER['REQUEST_METHOD'] == 'GET')\n c_prestito::mostraFormCarica();\n \n else if ($_SERVER['REQUEST_METHOD'] == 'POST')\n c_prestito::aggiungiPrestito();\n \n else\n header('Location: HTTP/1.1 405 Invalid HTTP method detected'); \n }", "title": "" }, { "docid": "dd59a59171f3a437b68c3b79f7e3f182", "score": "0.6654421", "text": "static function homepagedef(){\n\n if(static::verificalogin())header('Location: /Progetto/Utente/homelog');\n else{\n session_start();\n if(isset($_SESSION['utente'])){\n if($_SESSION['utente']->getRuolo()=='banned')header('Location: /Progetto/Utente/banned');\n }\n $view = new VUtente();\n $res=FPersistentManager::homepagedef();\n\n if(isset($_SESSION[\"logerror\"])){\n unset($_SESSION[\"logerror\"]);\n $view->showHome($res[0],$res[1],true,false);}\n elseif (isset($_SESSION[\"regerror\"])){\n unset($_SESSION[\"regerror\"]);\n $view->showHome($res[0],$res[1],false,true);}\n else{\n $view->showHome($res[0],$res[1],false,false);}\n }\n\n }", "title": "" }, { "docid": "75977a4825f0325b27a809dce0780711", "score": "0.66493154", "text": "function cl_rhconsignadomotivo() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhconsignadomotivo\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "a8b3311b6ed0edbaaf4ba8874d050bc5", "score": "0.66477776", "text": "function cl_cidadaobeneficio() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"cidadaobeneficio\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "28e24d72e4aa9e6972ae3f270d13b932", "score": "0.6646353", "text": "public function index() \n\t{\n\t\t// If admin is logged in open the pages module\n\t\tif (is_admin())\n\t\t\tredirect('/administration/pages/');\n\t\t// If admin is not logged in open login page\n\t\telse\n\t\t\tredirect('/administration/login/');\n\t}", "title": "" }, { "docid": "a85461bd521a21ed466408feec475fb8", "score": "0.6630427", "text": "public function getPageAdmin()\n {\n $numberArticles = $this->articleManager->countArticles();\n $numberComments = $this->CommentManager->countComments();\n\n if(Securite::verificationAccess()){\n require_once \"views/back/adminAccueil.view.php\";\n } else {\n throw new Exception(\"Vous n'avez pas le droit d'accéder à cette page\");\n }\n\n }", "title": "" }, { "docid": "50706ff57ef3dc8ef5be33a3f115941b", "score": "0.6625798", "text": "function cl_empageconfgera() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empageconfgera\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "a7564ec72bc6c7e426a13248e9419039", "score": "0.66153795", "text": "public function pagina(){\n\t\t\n\t\tinclude \"views/template.php\";\n\t\n\t}", "title": "" }, { "docid": "c17658c65d319a460adaeca50a06a988", "score": "0.66131556", "text": "public function routeur(){\n try{\n if(isset($_GET['action'])){//si le paramètre \"action\" est présent ds l'url\n $this->doAction();\n }\n else{\n $this->_frontend->showHomeView();\n }\n }\n catch(RouteurException $e) { // S'il y a eu une erreur, alors...\n require('view/frontend/errorView.php');\n }\n }", "title": "" }, { "docid": "1f3e7959b60962e500241532f6c76d9d", "score": "0.66037536", "text": "public function index(){\n if($_SESSION[\"authentification\"] == true){\n if($_SESSION[\"type\"] == \"Admin\") {\n $users = $this->userModel->getAll();\n require_once \"GestioneAcquariMarini/models/tankModel.php\";\n require \"GestioneAcquariMarini/views/_templates/header.php\";\n require \"GestioneAcquariMarini/views/_templates/menu.php\";\n require \"GestioneAcquariMarini/views/gestioneAcquari/user/index.php\";\n require \"GestioneAcquariMarini/views/_templates/footer.php\";\n }else{\n header('Location: ' . $_SERVER['HTTP_REFERER']);\n }\n }else{\n header(\"Location:\".URL);\n }\n }", "title": "" }, { "docid": "413a02daa1d2327671471916842ffe66", "score": "0.6594267", "text": "public function index() {\n if(Session::access()){\n Session::redirect();\n }\n $this->_view->renderizar('index');\n }", "title": "" }, { "docid": "52bf180bee03ff0f8d68919b6c4b0b77", "score": "0.65937704", "text": "function cl_empnotaprocesso() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empnotaprocesso\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "7f6be503741fb962fffc48a92222675c", "score": "0.659077", "text": "function cl_autotipo() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"autotipo\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "1d9c61f2a1c8d704e4aad039b105c77a", "score": "0.65901214", "text": "public function page_index() {\n\t\t$this->data->permissions = permissions_model::inst()->select_permissions();\n\t}", "title": "" }, { "docid": "59997c1b73df136ddbd7478c2a9c91c1", "score": "0.6586032", "text": "public function index() {\n echo \"<script>window.history.pushState('string', 'Index', 'http://localhost:8888/gamu/website/?controller=obra&action=index');</script>\";\n //number of records per page and number of pages \n $nr_obra = Obra::count();\n $number_of_records = 20;\n $result_number=ceil($nr_obra/$number_of_records);\n\n //Check page rules (if is set, if not atributes 1 if it's higher or lower the same)\n if(isset($_GET['page']))\n if(($_GET['page']>0) && ($_GET['page']<=$result_number))\n $page=$_GET['page'];\n else\n $page=1;\n else\n $page=1;\n\n // Get\n $obras = Obra::retrieve('id_obra',$page,$number_of_records);\n require_once('views/obra/index.php');\n }", "title": "" }, { "docid": "9b7d4f6141a0819ac157dd4b0e3d4111", "score": "0.65840554", "text": "public function Index(){\n require_once 'vistas/pages/encabezadopagina1.php';\n require_once 'vistas/tablero.php';\n require_once 'vistas/pages/piepagina1.php';\n }", "title": "" }, { "docid": "08dd922a371e14c72def7cfb76281bdd", "score": "0.65794253", "text": "public function pagina(){\n\t\t\t//include se utiliza para invocar el archivo que contiene el codigo HTML!\n\t\t\tinclude('Views/template.php');\n\t\t}", "title": "" }, { "docid": "022f1b71ba79a0e14fceb844b3fee087", "score": "0.6577235", "text": "function cl_integracaohorus() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"integracaohorus\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "d110ff536ffa12aba003f5c4f0fcbfd3", "score": "0.6574993", "text": "public function acte_recu()\n\t{\n\t\t$this->load->view('app/page-imagerie-acte');\n\t}", "title": "" }, { "docid": "f3f1613019413c26b20142ecc12312f7", "score": "0.6570816", "text": "function cl_conlancamval() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"conlancamval\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "f683c692f73f077463842e0b208a682a", "score": "0.65659094", "text": "function accueil(){\n $article = new \\Project\\Models\\ArticleManager();\n $introArticles = $article->getIntroArticles();\n $profileArticle = $article->getProfileArticle();\n $profilArticle = $profileArticle->fetch();\n $lastArticles = $article->getLastArticles();\n require 'app/views/front/accueil.php'; // méthode qui retourne la page accueil\n }", "title": "" }, { "docid": "b81354e929c6ff43e6048c320bddc892", "score": "0.65634024", "text": "public function homepage_caurosel()\n\t{\t\n\t\tif(!isset($_SESSION['user']) && $_SESSION['session'] != 'active'){\n\t \tredirect('Admin');\n\t\t}\n\t\t$this->load->model('Fetch');\n\t\t$dataSend['umap'] = $this->Fetch->fetch_umap();\n\t\t$dataSend['cmap'] = $this->Fetch->fetch_cmap();\n\t\t$dataSend['sliders'] = $this->Fetch->fetch_homepage_caurosel();\n\t\t$dataSend['header'] = 'Homepage Slider';\n\t\t$dataSend['sidebar'] = 'HC';\n\t\t$this->load->view('Admin/homepage_caurosel',$dataSend);\n\t}", "title": "" }, { "docid": "a5a77f0db362046d91fa15da021f1ea4", "score": "0.6561963", "text": "public function Index(){\n unset($_SESSION['authen']);\n $_SESSION['authen'] = 2;\n require_once 'views/layouts/headeauten.php';\n require_once 'views/pages/login/index.php';\n require_once 'views/layouts/footerauten.php';\n }", "title": "" }, { "docid": "a93dd2c5d3d5cb15223adfb22ee08541", "score": "0.6561354", "text": "function main()\t{\n\t\t\t\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t\t\t\t// Access check!\n\t\t\t\t\t// The page will show only if there is a valid page and if this page may be viewed by the user\n\t\t\t\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\n\t\t\t\t\t$access = is_array($this->pageinfo) ? 1 : 0;\n\t\t\t\t\n\t\t\t\t\tif (($this->id && $access) || ($BE_USER->user['admin'] && !$this->id))\t{\n\n\t\t\t\t\t\t\t// Draw the header.\n\t\t\t\t\t\t$this->doc = t3lib_div::makeInstance('mediumDoc');\n\t\t\t\t\t\t$this->doc->backPath = $BACK_PATH;\n\t\t\t\t\t\t$this->doc->form='<form action=\"\" method=\"post\" enctype=\"multipart/form-data\">';\n\n\t\t\t\t\t\t\t// JavaScript\n\t\t\t\t\t\t$this->doc->JScode = '\n\t\t\t\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\t\t\t\tscript_ended = 0;\n\t\t\t\t\t\t\t\tfunction jumpToUrl(URL)\t{\n\t\t\t\t\t\t\t\t\tdocument.location = URL;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfunction confirmURL(text,URL){\n\t\t\t\t\t\t\t\t\tvar agree=confirm(text);\n\t\t\t\t\t\t\t\t\tif (agree) {\n\t\t\t\t\t\t\t\t\t\tjumpToUrl(URL);\n\t\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</script>\n\t\t\t\t\t\t';\n\t\t\t\t\t\t$this->doc->postCode='\n\t\t\t\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\t\t\t\tscript_ended = 1;\n\t\t\t\t\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\n\t\t\t\t\t\t\t</script>\n\t\t\t\t\t\t';\n\n\t\t\t\t\t\t$headerSection = $this->doc->getHeader('pages', $this->pageinfo, $this->pageinfo['_thePath']) . '<br />'\n\t\t\t\t\t\t\t. $LANG->sL('LLL:EXT:lang/locallang_core.xml:labels.path') . ': ' . t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'], -50);\n\n\t\t\t\t\t\t$this->content.=$this->doc->startPage($LANG->getLL('title'));\n\t\t\t\t\t\t$this->content.=$this->doc->header($LANG->getLL('title'));\n\t\t\t\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t\t\t\t$this->content.=$this->doc->section('',$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,'SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function'])));\n\t\t\t\t\t\t$this->content.=$this->doc->divider(5);\n\n\n\t\t\t\t\t\t// Render content:\n\t\t\t\t\t\t$this->moduleContent();\n\n\n\t\t\t\t\t\t// ShortCut\n\t\t\t\t\t\tif ($BE_USER->mayMakeShortcut())\t{\n\t\t\t\t\t\t\t$this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('id',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// If no access or if ID == zero\n\n\t\t\t\t\t\t$this->doc = t3lib_div::makeInstance('mediumDoc');\n\t\t\t\t\t\t$this->doc->backPath = $BACK_PATH;\n\n\t\t\t\t\t\t$this->content.=$this->doc->startPage($LANG->getLL('title'));\n\t\t\t\t\t\t$this->content.=$this->doc->header($LANG->getLL('title'));\n\t\t\t\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}", "title": "" }, { "docid": "822e8767932e94a3a4ac4df247d34676", "score": "0.6561278", "text": "public function index(){\n\t\theader('location:/Exemple_mvc_pdo/index.php?rt=auth');\n\t}", "title": "" }, { "docid": "92466c7c185250c0ed450af2a3e1b437", "score": "0.65580016", "text": "public function getShow($operadora)\n\t{\n // redirect to the frontend\n\t}", "title": "" }, { "docid": "7814d2811b056036c8655e4f6fbeed3f", "score": "0.65548414", "text": "function main()\t{\n\t\t\t\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t\t\t\t// Access check!\n\t\t\t\t\t// The page will show only if there is a valid page and if this page may be viewed by the user\n\t\t\t\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\n\t\t\t\t\t$access = is_array($this->pageinfo) ? 1 : 0;\n\n\t\t\t\t\tif (($this->id && $access) || ($BE_USER->user['admin'] && !$this->id))\t{\n\n\t\t\t\t\t\t\t// Draw the header.\n\t\t\t\t\t\t$this->doc = t3lib_div::makeInstance('mediumDoc');\n\t\t\t\t\t\t$this->doc->backPath = $BACK_PATH;\n\t\t\t\t\t\t$this->doc->form='<form action=\"\" method=\"POST\">';\n\n\t\t\t\t\t\t\t// JavaScript\n\t\t\t\t\t\t$this->doc->JScode = '\n\t\t\t\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\t\t\t\tscript_ended = 0;\n\t\t\t\t\t\t\t\tfunction jumpToUrl(URL)\t{\n\t\t\t\t\t\t\t\t\tdocument.location = URL;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</script>\n\t\t\t\t\t\t';\n\t\t\t\t\t\t$this->doc->postCode='\n\t\t\t\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\t\t\t\tscript_ended = 1;\n\t\t\t\t\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\n\t\t\t\t\t\t\t</script>\n\t\t\t\t\t\t';\n\n\t\t\t\t\t\t$headerSection = $this->doc->getHeader('pages',$this->pageinfo,$this->pageinfo['_thePath']).'<br />'.$LANG->sL('LLL:EXT:lang/locallang_core.xml:labels.path').': '.t3lib_div::fixed_lgd_pre($this->pageinfo['_thePath'],50);\n\n\t\t\t\t\t\t$this->content.=$this->doc->startPage($LANG->getLL('title'));\n\t\t\t\t\t\t$this->content.=$this->doc->header($LANG->getLL('title'));\n\t\t\t\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t\t\t\t$this->content.=$this->doc->section('',$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,'SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function'])));\n\t\t\t\t\t\t$this->content.=$this->doc->divider(5);\n\n\n\t\t\t\t\t\t// Render content:\n\t\t\t\t\t\t$this->moduleContent();\n\n\n\t\t\t\t\t\t// ShortCut\n\t\t\t\t\t\tif ($BE_USER->mayMakeShortcut())\t{\n\t\t\t\t\t\t\t$this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('id',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// If no access or if ID == zero\n\n\t\t\t\t\t\t$this->doc = t3lib_div::makeInstance('mediumDoc');\n\t\t\t\t\t\t$this->doc->backPath = $BACK_PATH;\n\n\t\t\t\t\t\t$this->content.=$this->doc->startPage($LANG->getLL('title'));\n\t\t\t\t\t\t$this->content.=$this->doc->header($LANG->getLL('title'));\n\t\t\t\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t\t\t\t}\n\t\t\t\t}", "title": "" }, { "docid": "e9465c7d381914564e30a6ded4f6d72a", "score": "0.6553584", "text": "static function registrazione() {\n\n if($_SERVER['REQUEST_METHOD'] == \"GET\")\n { header('Location: /Progetto/Utente/homepagedef');\n if(CUtente::verificalogin()){header('Location: /Progetto/Utente/homelog');}\n else{header('Location: /Progetto/Utente/homepagedef');}\n }\n elseif ($_SERVER['REQUEST_METHOD'] == \"POST\") {\n static::verificaRegistrazione();\n }\n }", "title": "" }, { "docid": "295e4163a0ca7c911fcf6d6022a2a103", "score": "0.65507746", "text": "function cl_avaliacaogruporespostacgm() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"avaliacaogruporespostacgm\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "481219ba08e6084709a41653dff4aff0", "score": "0.6538824", "text": "public function preDispatch() {\r\n parent::preDispatch();\r\n $this->initStyles();\r\n $adultos = $this->getRequest()->getModuleName() . '/'\r\n . $this->getRequest()->getControllerName() . '/'\r\n . $this->getRequest()->getActionName();\r\n if (($adultos != 'default/adultos/index') && ($adultos != 'default/busqueda/buscador')) {\r\n $this->session->toPage = $_SERVER['REQUEST_URI'];\r\n }\r\n }", "title": "" }, { "docid": "4b4a70663c2d87d6ebef22debe2d2a9c", "score": "0.6537414", "text": "public function acao(){\n\n $this->validacaoAutenticacao();\n \n //acao\n $acao = isset($_GET['acao']) ? $_GET['acao'] : '';\n $id_usuario_seguindo = isset($_GET['id_usuario']) ? $_GET['id_usuario'] : '';\n\n //id_usuario\n $usuario = Container::getModel('Usuario');\n $usuario->__set('id', $_SESSION['id']);\n\n if($acao == 'seguir'){\n // \n $usuario->seguirUsuario($id_usuario_seguindo);\n //\n }\n else if($acao == 'deixar_de_seguir'){\n\n $usuario->deixarSeguirUsuario($id_usuario_seguindo);\n\n }\n\n header(\"Location: /quem_seguir\");\n \n }", "title": "" }, { "docid": "a5be17b1ebd4e1bea052722a8a8913ae", "score": "0.65340185", "text": "public function connexionPage()\r\n\t{\r\n\t\t$this->load->view('connexion');\r\n\t}", "title": "" }, { "docid": "d5091842f57479a488def11ab012097f", "score": "0.65235007", "text": "public function index()\n {\n $display_landing_page=$this->config->item('display_landing_page');\n if($display_landing_page=='') $display_landing_page='0';\n\n if($display_landing_page=='0')\n $this->login_page();\n else $this->_site_viewcontroller();\n }", "title": "" }, { "docid": "4cd6b75e59ed845b31332858e9a59c84", "score": "0.6521148", "text": "protected abstract function doPageMenu();", "title": "" }, { "docid": "7269b56442f9a8efd0044b2918a9b946", "score": "0.65207", "text": "public function index(){\n\t\t$this->location = \"sucursales\";\n\t\t$this->cargarSucursales();\n\t\t$this->include_theme(\"index\",\"index\");\n\t}", "title": "" }, { "docid": "547c64a981ad080400b6ace55a2ca240", "score": "0.65182287", "text": "function cl_cancdisbanco() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"cancdisbanco\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "ce18d433b45e28aaba36624298c787be", "score": "0.65179056", "text": "function main() {\n\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\t\t// Access check! The page will show only if there is a valid page and if this page may be viewed by the user\n\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\n\t\t$access = is_array($this->pageinfo) ? 1 : 0;\n\t\tif (($this->id && $access) || ($BE_USER->user['admin'] && !$this->id)){\n\t\t\t// Draw the header.\n\t\t\t$this->doc = t3lib_div::makeInstance('mediumDoc');\n\t\t\t$this->doc->backPath = $BACK_PATH;\n\t\t\t// styles\n\t\t\t$this->doc->styleSheetFile2 = $GLOBALS[\"temp_modPath\"].'style.css';\n\t\t\t$this->doc->form='<form action=\"\" method=\"POST\">';\n\t\t\t// JavaScript\n\t\t\t$this->doc->JScode = '<script language=\"javascript\" type=\"text/javascript\">script_ended = 0;function jumpToUrl(URL){document.location = URL;}</script>';\n\t\t\t$this->doc->postCode='<script language=\"javascript\" type=\"text/javascript\">script_ended = 1;if (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;</script>';\n\t\t\t$headerSection = $this->doc->getHeader('pages',$this->pageinfo,$this->pageinfo['_thePath']).'<br />'.$LANG->sL('LLL:EXT:lang/locallang_core.xml:labels.path').': '.t3lib_div::fixed_lgd_pre($this->pageinfo['_thePath'],50);\n\t\t\t$this->content.=$this->doc->startPage($LANG->getLL('title'));\n\t\t\t$this->content.=$this->doc->header($LANG->getLL('title'));\n\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t$this->content.=$this->doc->section('',$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,'SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function'])));\n\t\t\t$this->content.=$this->doc->divider(5);\n\t\t\t// Render content:\n\t\t\t$this->moduleContent();\n\t\t\t// ShortCut\n\t\t\tif ($BE_USER->mayMakeShortcut()) {\n\t\t\t\t$this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('id',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']));\n\t\t\t}\n\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t} else {\n\t\t\t// If no access or if ID == zero\n\t\t\t$this->doc = t3lib_div::makeInstance('mediumDoc');\n\t\t\t$this->doc->backPath = $BACK_PATH;\n\t\t\t$this->content.=$this->doc->startPage($LANG->getLL('title'));\n\t\t\t$this->content.=$this->doc->header($LANG->getLL('title'));\n\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t}\n\t\t$this->content.=$this->doc->endPage();\n\t\techo $this->content;\n\t}", "title": "" }, { "docid": "e90e9175ec6dd4a0422897f06b8e27ca", "score": "0.65120184", "text": "public function index()\n {\n\n $this->iniciar();\n\n $this->vista('datatable/usuarios');\n // if(!isset($_SESSION['autorizado']) || $_SESSION['autorizado'] != 1){\n // redireccionar('/login');\n // } else {\n // }\n }", "title": "" }, { "docid": "ab973fd7a704a4c269ae5e82c7095615", "score": "0.6507695", "text": "public function enlacePaginasController(){\n\t\tif(isset($_GET['action'])){\n\t\t\t$enlace = $_GET['action'];\n\t\t}else{\n\t\t\t$enlace = 'index';\n\t\t}\n\n\t\t//peticion al modelo\n\t\t$peticion = Enlaces::enlacesPaginasModel($enlace);\n //mostrar peticion\n\t\tinclude $peticion;\n\t}", "title": "" }, { "docid": "63a07bce90f2826846d2c18eb2b41118", "score": "0.6502896", "text": "public function index()\n\t{\n\n\t\t\n\t\t$this->data['menuActual'] = 'inicio';\n\n\t\t$this->load->view('admin/template/login_template',$this->data);\n\t\tif (isLogged())\n\t\t\tredirect('admin/inicio/bienvenida');\n\t}", "title": "" }, { "docid": "fea4caefaf8e89f202fb4a9eee8aea2b", "score": "0.65007585", "text": "function openRandomPage(){\n parent::doOpenLink();\n parent::doLogin();\n parent::doAccessRandomPage();\n parent::doEditPage();\n }", "title": "" }, { "docid": "3bef44b7c3eebe62169e53687d8fd1a8", "score": "0.6498382", "text": "public function pagina()\n\t{\t\n\t\tinclude \"views/template.php\";\n\t}", "title": "" }, { "docid": "df98d7a76d8ffb48c3041d18755d4227", "score": "0.6491865", "text": "function cl_convenio() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"convenio\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "c1e30c78dd515b05f3c6243f00277b5e", "score": "0.6490252", "text": "function cl_clientesenvol() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"clientesenvol\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "4b45d91116f9e7a9055086fb0ac6187c", "score": "0.6478004", "text": "public function cursos()\n {\n\n $this->load->view('/plantillas/inicio.inc.php');\n $this->load->view('/plantillas/navbar.inc.php');\n $this->load->view('/plantillas/opciones.inc.php');\n $this->load->view('page-mailbox');\n }", "title": "" }, { "docid": "3c094be3d7268c37f5285ad3f841c6d4", "score": "0.647274", "text": "public function displayPage()\n {\n\n // -------- Display login form.\n if (isset($_SERVER[\"QUERY_STRING\"]) && $this->startswith($_SERVER[\"QUERY_STRING\"],'do=login'))\n {\n if ($GLOBALS['config']['OPEN_RESPAWN']) { header('Location: ?'); exit; } // No need to login for open Respawn\n $token=''; if ($this->ban_canLogin()) $token=$this->getToken(); // Do not waste token generation if not useful.\n \n $this->assign('token',$token);\n $this->assign('do','login');\n $this->renderPage('loginform');\n echo $this->footer();\n exit();\n }\n // -------- User wants to logout.\n if (isset($_SERVER[\"QUERY_STRING\"]) && $this->startswith($_SERVER[\"QUERY_STRING\"],'do=logout'))\n {\n $this->logout();\n header('Location: '.$GLOBALS['ROOT']);\n exit();\n }\n\n // -------- Handle other actions allowed for non-logged in users:\n if (!$this->isLoggedIn() )\n {\n\n $token=''; if ($this->ban_canLogin()) $token = $this->getToken(); // Do not waste token generation if not useful.\n\n // User tries to post new link but is not loggedin:\n // Show login screen, then redirect to ?post=...\n if (isset($_GET['q']))\n {\n $_GET['do'] = 'login';\n $this->assign('q',$_GET['q']);\n (!empty($_GET['source'])? $this->assign('source',$_GET['source']):'');\n }\n $this->assign('token',$token);\n $this->assign('do','login');\n $this->renderPage('loginform');\n echo $this->footer();\n exit();\n } else {\n\n // -------- All other functions are reserved for the registered user:\n\n // -------- Display the Tools menu if requested (import/export/bookmarklet...)\n if (isset($_SERVER[\"QUERY_STRING\"]) && $this->startswith($_SERVER[\"QUERY_STRING\"],'do=tools'))\n {\n $this->renderPage('tools');\n }\n\n // -------- User wants to change his/her password.\n if (isset($_SERVER[\"QUERY_STRING\"]) && $this->startswith($_SERVER[\"QUERY_STRING\"],'do=changepasswd'))\n {\n if ($GLOBALS['config']['OPEN_RESPAWN']) {\n echo '<script language=\"JavaScript\">alert(\"You are not supposed to change a password on an Open Respawn.\");document.location=\\'?do=addlink\\';</script>';\n exit;\n }\n if (!empty($_GET['setpassword']) && !empty($_GET['oldpassword']))\n {\n if (!$this->tokenOk($_GET['token'])) die('Wrong token.'); // Go away !\n\n // Make sure old password is correct.\n $oldhash = sha1($_GET['oldpassword'].$GLOBALS['login'].$GLOBALS['salt']);\n if ($oldhash!=$GLOBALS['hash']) { echo '<script language=\"JavaScript\">alert(\"The old password is not correct.\");document.location=\\'?do=changepasswd\\';</script>'; exit; }\n // Save new password\n $GLOBALS['salt'] = sha1(uniqid('',true).'_'.mt_rand()); // Salt renders rainbow-tables attacks useless.\n $GLOBALS['hash'] = sha1($_GET['setpassword'].$GLOBALS['login'].$GLOBALS['salt']);\n $this->writeConfig();\n echo '<script language=\"JavaScript\">alert(\"Your password has been changed.\");document.location=\\'?do=addlink\\';</script>';\n exit;\n }\n else // show the change password form.\n {\n $this->assign('token',$this->getToken());\n $this->renderPage('changepassword');\n }\n }\n\n // -------- User wants to change configuration\n if (isset($_SERVER[\"QUERY_STRING\"]) && $this->startswith($_SERVER[\"QUERY_STRING\"],'do=configure'))\n {\n if (!empty($_GET['rec']) )\n {\n if (!$this->tokenOk($_GET['token'])) die('Wrong token.'); // Go away !\n $GLOBALS['disablesessionprotection']=!empty($_GET['disablesessionprotection']);\n $this->writeConfig();\n echo '<script language=\"JavaScript\">alert(\"Configuration was saved.\");document.location=\\'?do=addlink\\';</script>';\n exit;\n }\n else // Show the configuration form.\n {\n $this->assign('token',$this->getToken());\n $this->renderPage('configure');\n }\n }\n\n // -------- User wants to add a link without using the bookmarklet: show form.\n if (isset($_SERVER[\"QUERY_STRING\"]) && $this->startswith($_SERVER[\"QUERY_STRING\"],'do=addlink') && $this->isLoggedIn())\n {\n $this->assign('token',$this->getToken());\n $this->renderPage('addlink');\n }\n\n // -------- User wants to add a link without using the bookmarklet: show form.\n if (isset($_SERVER[\"QUERY_STRING\"]) && empty($_SERVER[\"QUERY_STRING\"]) )\n {\n $this->assign('token',$this->getToken());\n $this->renderPage('addlink');\n }\n\n // -------- User clicked the \"Delete\" button \n if (isset($_GET['suppr']) and $torem = $_GET['suppr'] and $torem != '' and $_GET['suppr'] != 'config') {\n if (!$this->tokenOk($_GET['token'])) die('Wrong token.');\n // We do not need to ask for confirmation:\n // - confirmation is handled by javascript\n // - we are protected from XSRF by the token.\n //////\n \n $torem = str_replace('data','',htmlspecialchars($_GET['suppr']));\n\n $this->deleteDir($torem);\n\n header('Location:'.$GLOBALS['ROOT']);\n exit();\n }\n }\n }", "title": "" }, { "docid": "2f0a5e06492baedcc4a986b16aeaaccf", "score": "0.6472224", "text": "function ShowAuthorisation()\n\t{\n\t\t$this->Session->set('expected_destination', Request::get_request_uri(TRUE, TRUE));\n\t\tResponse::redirect('index.php?module=' .CU_AUTH_MODULE . '&message=2&redirect=' . urlencode(Request::server('QUERY_STRING')));\n\t}", "title": "" }, { "docid": "ff1c6ebed78445080a7b4f63ad0e9c40", "score": "0.6471979", "text": "public function index(){\n $menu = Auth::user()->access;\n\t\tif($menu == \"Administrator\"){\n return $this->admin();\n\t\t}elseif($menu == \"Alumni\"){\n return $this->alumni();\n\t\t}elseif($menu == \"Kepala Program Studi\"){\n return $this->kaprodi();\n\t\t} \n }", "title": "" }, { "docid": "5d0e1dd3cbd8e20a115980910d6c4dc3", "score": "0.6471516", "text": "public function inicio(){\n include_once(\"views/paginas/inicio.php\");\n }", "title": "" }, { "docid": "4485b35addd9aedb1c827447c3a0bf3d", "score": "0.64685255", "text": "function cl_censodistrito() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"censodistrito\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "05da089ac9729c441879f039a6779d6d", "score": "0.6463741", "text": "public function enlacesPaginasController(){\n\t\t//comprueba que el action este en la url de la pagina\n\t\tif(isset( $_GET['action'])){\n\t\t\t//almacena el action en una variable\n\t\t\t$enlaces = $_GET['action'];\n\t\t\n\t\t}else{\n\t\t\t//si no hay action se ingresa index\n\t\t\t$enlaces = \"index\";\n\t\t}\n\t\t//se manda a llamar el modelo de enlaces para obtener la url completa a la que se va a dirigir\n\t\t$respuesta = Paginas::enlacesPaginasModel($enlaces);\n\t\t//carga la url\n\t\tinclude $respuesta;\n\t}", "title": "" }, { "docid": "1c75a6adb191b3f2c516f4d0df546e88", "score": "0.64621323", "text": "public function renderizar()\r\n {\r\n \r\n if($this->verificarSession())\r\n {\r\n $this->ejecutar();\r\n }\r\n else\r\n {\r\n $direccion='Location:';\r\n $direccion=$direccion.$this->configuracion->sitename.\"index.html\";\r\n header($direccion);\r\n } \r\n \r\n }", "title": "" }, { "docid": "883d5f468229aa485c201926542e7e15", "score": "0.6458749", "text": "public function execute() {\n\n //Si on veux instaurer un membre pour modifier une BD sans CMS\n\t\t\tif (!empty($_GET[\"logout\"])) {\n\t\t\t\tsession_unset();\n\t\t\t\tsession_destroy();\n\t\t\t\tsession_start();\n\t\t\t}\n\t\t\tif (empty($_SESSION[\"visibility\"])) {\n\t\t\t\t$_SESSION[\"visibility\"] = CommonAction::$VISIBILITY_PUBLIC;\n\t\t\t}\n\t\t\tif ($_SESSION[\"visibility\"] < $this->pageVisibility) {\n\t\t\t\theader(\"location:index.php\");\n\t\t\t\texit;\n }\n \n\t\t\t// Appelle la logique de l'enfant :\n\t\t\t$this->executeAction();\n\t\t}", "title": "" }, { "docid": "6a20d13a4e56324e47c7e26f7f1c29de", "score": "0.6457479", "text": "public function linksController()\n\t{\n\t\tif(isset( $_GET['action'])){ // Se obtiene el valor de la variable action\n\t\t\t$enlaces = $_GET['action'];\t\t\n\t\t}else{ // De lo contrario se le asigna el valor index\n\t\t\t$enlaces = \"index\";\n\t\t}\n\n\t\t// Obtenemos la respuesta del modelo\n\t\t$respuesta = Pages::linksModel($enlaces); \n\n\t\tinclude $respuesta;\n\t}", "title": "" }, { "docid": "bd006e6c9630a75536df229524cc522c", "score": "0.6455121", "text": "function cl_abatimentocorrecao() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"abatimentocorrecao\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "c87a0e0540ff4cb58f5b773365a094b2", "score": "0.6451678", "text": "public function indexAction() {\n\t\t// Landing page mode\n\t\t$this->_helper->content->setNoRender ()->setEnabled ();\n\t}", "title": "" }, { "docid": "a0ec64dfa135829d0707bb97781d463a", "score": "0.64427686", "text": "function main()\t{\r\n\t\t global $AB,$BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$HTTP_GET_VARS,$HTTP_POST_VARS,$CLIENT,$TYPO3_CONF_VARS;\r\n\t\t\r\n\t\t // Access check!\r\n\t\t // The page will show only if there is a valid page and if this page may be viewed by the user\r\n\t\t $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\r\n\t\t $access = is_array($this->pageinfo) ? 1 : 0;\r\n\t\t\r\n\t\t if (($this->id && $access) || ($BE_USER->user['admin'] && !$this->id) || ($BE_USER->user[\"uid\"] && !$this->id))\t{\r\n\t\r\n\t\t\t\t // Draw the header.\r\n\t\t\t $this->doc = t3lib_div::makeInstance('mediumDoc');\r\n $this->doc->backPath = $BACK_PATH;\r\n $this->doc->form='<form action=\"\" method=\"POST\">';\r\n\r\n // JavaScript\r\n $this->doc->JScode = '\r\n <script language=\"javascript\">\r\n script_ended = 0;\r\n function jumpToUrl(URL)\t{\r\n document.location = URL;\r\n }\r\n\t\t\t\t </script>\r\n ';\r\n $this->doc->postCode='\r\n <script language=\"javascript\">\r\n script_ended = 1;\r\n if (top.theMenu) top.theMenu.recentuid = '.intval($this->id).';\r\n </script>\r\n ';\r\n\r\n $headerSection = $this->doc->getHeader('pages',$this->pageinfo,$this->pageinfo['_thePath']).'<br>'.$LANG->php3Lang['labels']['path'].': '.t3lib_div::fixed_lgd_pre($this->pageinfo['_thePath'],50);\r\n\r\n $this->content.=$this->doc->startPage($LANG->getLL('title'));\r\n $this->content.=$this->doc->header($LANG->getLL('title'));\r\n $this->content.=$this->doc->spacer(5);\r\n $this->content.=$this->doc->section('',$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,'SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function'])));\r\n $this->content.=$this->doc->divider(5);\r\n\r\n\t\t\t\r\n // Render content:\r\n $this->moduleContent();\r\n\r\n\t\t\t\r\n // ShortCut\r\n if ($BE_USER->mayMakeShortcut())\t{\r\n $this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('id',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']));\r\n }\r\n\t\t\r\n $this->content.=$this->doc->spacer(10);\r\n \r\n } else {\r\n // If no access or if ID == zero\r\n\t\t\r\n $this->doc = t3lib_div::makeInstance('mediumDoc');\r\n $this->doc->backPath = $BACK_PATH;\r\n\t\t\r\n $this->content.=$this->doc->startPage($LANG->getLL('title'));\r\n $this->content.=$this->doc->header($LANG->getLL('title'));\r\n $this->content.=$this->doc->spacer(5);\r\n $this->content.=$this->doc->spacer(10);\r\n\t\t }\r\n }", "title": "" }, { "docid": "62d5989e10d0e28885a5dba1411d2b2f", "score": "0.6441756", "text": "function cl_veicabast() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"veicabast\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "58c05217b66bb5ab2f8d748dd3ada68d", "score": "0.6439996", "text": "function main() {\n global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n // Access check!\n // The page will show only if there is a valid page and if this page may be viewed by the user\n $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\n $access = is_array($this->pageinfo) ? 1 : 0;\n\n if (($this->id && $access) || ($BE_USER->user['admin'] && !$this->id)) {\n\n // Draw the header.\n $this->doc = t3lib_div::makeInstance('mediumDoc');\n $this->doc->backPath = $BACK_PATH;\n $this->doc->form='<form action=\"\" method=\"POST\">';\n\n // JavaScript\n $this->doc->JScode = '\n <script language=\"javascript\" type=\"text/javascript\">\n script_ended = 0;\n function jumpToUrl(URL) {\n document.location = URL;\n }\n </script>\n ';\n $this->doc->postCode='\n <script language=\"javascript\" type=\"text/javascript\">\n script_ended = 1;\n if (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\n </script>\n ';\n\n $headerSection = $this->doc->getHeader('pages',$this->pageinfo,$this->pageinfo['_thePath']).'<br />'.$LANG->sL('LLL:EXT:lang/locallang_core.xml:labels.path').': '.t3lib_div::fixed_lgd_pre($this->pageinfo['_thePath'],50);\n\n $this->content.=$this->doc->startPage($LANG->getLL('title'));\n $this->content.=$this->doc->header($LANG->getLL('title'));\n $this->content.=$this->doc->spacer(5);\n $this->content.=$this->doc->section('',$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,'SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function'])));\n $this->content.=$this->doc->divider(5);\n\n\n // Render content:\n $this->moduleContent();\n\n\n // ShortCut\n if ($BE_USER->mayMakeShortcut()) {\n $this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('id',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']));\n }\n\n $this->content.=$this->doc->spacer(10);\n } else {\n // If no access or if ID == zero\n\n $this->doc = t3lib_div::makeInstance('mediumDoc');\n $this->doc->backPath = $BACK_PATH;\n\n $this->content.=$this->doc->startPage($LANG->getLL('title'));\n $this->content.=$this->doc->header($LANG->getLL('title'));\n $this->content.=$this->doc->spacer(5);\n $this->content.=$this->doc->spacer(10);\n }\n }", "title": "" }, { "docid": "6fddf51a66004e411e6cb76f133338ad", "score": "0.64350885", "text": "public function impostaPaginaOspite(){\n\t\t\t\n\t\t$this->assign(\"main_content\",$this->fetch(\"home_default.tpl\"));\n\t\t$this->assign(\"cerca\", $this->fetch(\"ricerca_info.tpl\"));\n\t\t$this->assign(\"login\", $this->fetch(\"login_default.tpl\"));\n\t}", "title": "" }, { "docid": "b4f5dfb4150ee0927d182265840b3bd3", "score": "0.64305085", "text": "public function index()\n\t{\n\t\tredirect('User_keluhan/detailtiket/');\n\t}", "title": "" }, { "docid": "e2132bd5a452d6cc452f3367a0a4297c", "score": "0.642827", "text": "public function index(){\n header(\"Location:/Treinamento2020/views/users/admin/index.php\");\n }", "title": "" }, { "docid": "88572de0c91f50d2362b14529cddaaba", "score": "0.64280754", "text": "public function enlacesPaginasController(){\n\t\tif(isset( $_GET['action']))\t\t\n\t\t\t$enlaces = $_GET['action'];\n\t\telse\n\t\t\t$enlaces = \"index\";\n\t\t\t$respuesta = Paginas::enlacesPaginasModel($enlaces);\n\t\tinclude $respuesta;\n\t}", "title": "" }, { "docid": "bf07fb1ece9e5d836e34e9a130a4ef33", "score": "0.64269775", "text": "public function pagina(){\t\n\t\tinclude \"views/template.php\";\n\t}", "title": "" }, { "docid": "76e20c03eb76548e3c6dacefd7a1b08f", "score": "0.642575", "text": "public function index(){\n $vesti = Vest::dohvatiVesti(); \n require_once(\"views/sablon/header_admin.php\");\n require_once(\"views/adminvesti.php\");\n require_once(\"views/sablon/footer.php\");\n }", "title": "" }, { "docid": "5885aaaea8b61950a5430bf5a1cd79cb", "score": "0.64243585", "text": "public function pagina(){\n\t\t\tinclude('Views/template.php');\n\t\t}", "title": "" }, { "docid": "df3591934d0582b8bffdb1b1ca602ff4", "score": "0.64236516", "text": "function cl_requisicaoexameprontuario() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"requisicaoexameprontuario\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "9f7c193c34f45cc71a6e557c83d82d05", "score": "0.6422481", "text": "function cl_criterioavaliacaoperiodoavaliacao() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"criterioavaliacaoperiodoavaliacao\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "455ff195008b00fc43d018c5eadf5e8e", "score": "0.6418061", "text": "public function enlacesPaginasController() {\n\n\n\t\t/*si tiene informacion que lo guarde*/\n\t\tif(isset($_GET[\"p\"])){\n\n\t\t\t$enlacesController = $_GET[\"p\"];\n\n\t\t}else{\n\n\t\t\t$enlacesController = \"index\";\n\t\t}\n\n\t\n\n\t\t/*heredo la clase, la funcion del Modelo y paso el parametro* de la vista a renderizar*/\n\t\t$rpt = EnlacesPaginas::enlacesPaginasModel($enlacesController);\n\n\t\tinclude $rpt;\n\t}", "title": "" }, { "docid": "4ff9676271718450f14f0ad921b49732", "score": "0.64169055", "text": "public function inicioSistemaPrincipal()\n\t{\n\t\t$urlSiguiente='';\n\t\t$nombreUsuario=$this->input->post('idInpUsuario');\n\t\t\n\t\t$isRoles=true;\n\t\t$rolSeleccionado=0;\n\t\tif($isRoles){\n\t\t\techo 'listaRolAsociados';\n\t\t}else{\n\t\t\t/**asociamos rol y redireccionamos a vista del sistema Principal**/\n\t\t\t$this->rolUsuarioSeleccionado($rolSeleccionado);\n\t\t\techo 'inicioVistaGeneral';\n\t\t}\n\t}", "title": "" }, { "docid": "377a572bdbdaf670c01bbe30f15bf858", "score": "0.64105517", "text": "public function adminmahasiswa() {\n\t\t$content = \"ademik/useraccess/useraccess/adminmahasiswa\";\n\t\t$this->load->view('temp/head');\n\t\t$this->load->view($content);\n\t\t$this->load->view('temp/footers');\n\t}", "title": "" }, { "docid": "f37e803b8002816d01b085df16bf28ea", "score": "0.6410513", "text": "public static function set(){//this is main controller\n\t\n\t\t$menu = Config::get('menu');\n\t\tSession::set('page', 'main');//default page value\n\t\tSession::set('params', null);//default params value\n\t\tif(isset($_GET['page']) && $_GET['page']){\n\t\t\t$page = trim($_GET['page']);\n\t\t\tif(isset($menu) && is_object($menu) && isset($menu->{$page})){\n\t\t\t\tSession::set('page', $page);\n\t\t\t\tif(isset($_GET['params']) && $_GET['params'] && strlen(str_replace('/', '', $_GET['params']))>0){\n\t\t\t\t\t$params = (object)explode('/', $_GET['params']);\n\t\t\t\t\tSession::set('params', $params);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$page = Session::get('page');\n\t\tSession::set('menu', (object) $menu->{$page});\n\t\tUser::autologin();//try auto login\n\t\tself::setUrls();\n\t\t\n\t\t/*echo \"<pre>\";\n\t\tprint_r($_SESSION);\n\t\techo \"<hr>\";\n\t\tprint_r($_GET);*/\n\t}", "title": "" }, { "docid": "f43c60d65ddebba7642d5c95c891cbb2", "score": "0.64103687", "text": "public function landingpageAction () {\n\n }", "title": "" }, { "docid": "0cba9d3de8f48447426b048061f0fc5d", "score": "0.64087814", "text": "function cl_benscadlote() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"benscadlote\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "8f834aa74120d5ddbae7462fb699fe93", "score": "0.640781", "text": "public function enlacesPaginasController(){\r\n\t\t//TRABAJAR CON LOS ENLACES DE LAS PAGINAS\r\n\t\t//VALIDAMOS SI LA VARIABLE \"action\" VIENE VACIA, ES DECIR, CUANDO SE ABRE LA PAGINA POR PRIMERA VEZ SE DEBE CARGAR LA VISTA index.php\r\n\r\n\t\tif(isset($_GET[\"action\"])){\r\n\t\t\t//guardar el valor de la variable action en \"views/modules/navegacion.php\" en el cual se recibe mediante el metodo GET esa variable \r\n\t\t\t$enlacesController = $_GET[\"action\"];\r\n\t\t}\r\n\t\telse{\r\n\t\t\t//Si viene vacio inicializo con index\r\n\t\t\t$enlacesController = \"index\";\r\n\t\t}\r\n\t\t//Mostrar los archivos de los enlaces de cada una de las secciones: Inicio, Nosotros, etc\r\n\t\t//PARA ESTO HAY QUE MANDAR AL MODELO PARA QUE HAGA DICHO PROCESO Y MUESTRE LA INFORMACION\r\n\t\t$respuesta = EnlacesPaginas::enlacesPaginasModel($enlacesController);\r\n\t\tinclude $respuesta;\r\n\t}", "title": "" }, { "docid": "b1b403a85bf193ef70b761b21e07edf5", "score": "0.640765", "text": "public function administrador()\n\t{\n\t\tif(!$this->menumodel->VerificarAcceso()) redirect('inicio');\n\n\t\t$this->load->view('header');\n\t\t$this->load->view('mantenimiento/administrador');\n\t\t$this->load->view('footer');\n\t}", "title": "" }, { "docid": "039d89bd89d4285cb8316475626f9e24", "score": "0.6407073", "text": "function cl_custocriteriorateio() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"custocriteriorateio\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "3fb0914c1a1dc92afd8c506a7858e877", "score": "0.64065117", "text": "function mainPage(){\n $controllerFront = new \\GRH56\\Controllers\\ControllerFront();\n header('Location: home');\n }", "title": "" }, { "docid": "f4ae1d9ede3f34bc265ff77dd1376a0a", "score": "0.64064085", "text": "public function enlacesPaginasController(){\n\t\t\t// trabajar con los enlaces de las paginas\n\t\t\t//validamos si la variable \"action\" viene vacia , es decir , cuando se abre la pagina por primera vez se debe cargar la vista index.php\n\n\n\t\t\tif (isset($_GET['action'])) {\n\t\t\t\t//guardar el valor de la variable action en \"Views/modules/navegacion.php en el cual se recibe mediante el metodo GET esa variable \"\n\n\t\t\t\t$enlacesController = $_GET['action'];\n\n\t\t\t}else{\n\t\t\t\t//si viene vacio inicializo con index\n\n\t\t\t\t$enlacesController = \"index\";\n\t\t\t}\n\n\t\t\t//mostrar los archivos de los enlaces de cada una de las secciones: Inicio , nosotros ,etc.\n\t\t\t//PARA ESTO HAY QUE MANDAR AL MODELO PARA QUE SE HAGA DICHO PROCESO Y MUESTRE LA INFORMACION\n\n\t\t\t$respuesta = Paginas::enlacesPaginasModel($enlacesController);\n\t\t\tinclude $respuesta;\n\n\t\t}", "title": "" }, { "docid": "7eb6132844db146598fd8d2b496cc2fd", "score": "0.64062655", "text": "function index()\n {\n\n //profiling\n $this->data['controller_profiling'][] = __function__;\n\n //login check\n $this->__commonAdmin_LoggedInCheck();\n\n //uri - action segment\n $action = $this->uri->segment(4);\n\n //default page title\n $this->data['vars']['main_title'] = $this->data['lang']['lang_settings_company'];\n\n //re-route to correct method\n switch ($action) {\n\t\t\n\t\t\n\t\tcase 'approvecancel':\n $this->__approvecancel();\n \t\t break;\n\t\t\t\t \n default:\n $this->__cancelorderListing();\n }\n\n //css - active tab\n $this->data['vars']['css_menu_anullering'] = 'current';\n\n //load view\n $this->__flmView('admin/main');\n\n }", "title": "" } ]
e153c5c98581a6ff2bfbaf9da4d98974
AJAX Queue get action
[ { "docid": "71fd507da6e4e129eddbd71bb9cb4442", "score": "0.0", "text": "public function removeDecisionAction() {\n if ($currentUserId = (int) $this->getRequest()->request->get('user_id')) {\n if ($webUserId = $this->getSession()->get(Mamba::SESSION_USER_ID_KEY)) {\n $currentUserDecision = $this->getViewedQueueHelper()->get($currentUserId, $webUserId);\n $webUserDecision = $this->getViewedQueueHelper()->get($webUserId, $currentUserId);\n\n if ($currentUserDecision && $webUserDecision && $currentUserDecision['decision'] >=0 && $webUserDecision['decision'] >= 0) {\n $this->getViewedQueueHelper()->put($webUserId, $currentUserId, array(\n 'ts' => time(),\n 'decision' => -1,\n ));\n\n $this->getGearman()->getClient()->doLowBackground(\n EncountersBundle::GEARMAN_DATABASE_DECISIONS_UPDATE_FUNCTION_NAME,\n serialize(\n array(\n 'webUserId' => $webUserId,\n 'currentUserId' => $currentUserId,\n 'decision' => -1,\n 'time' => time(),\n )\n )\n );\n\n /** Обновим счетчики */\n $this->getCountersHelper()->decr($currentUserId, 'mutual');\n $this->json['data']['counters'] = array(\n 'visitors' => $this->getCountersHelper()->get($webUserId, 'visitors'),\n 'mutual' => $this->getCountersHelper()->decr($webUserId, 'mutual'),\n 'mychoice' => $this->getCountersHelper()->get($webUserId, 'mychoice'),\n );\n\n $this->getGearman()->getClient()->doLowBackground(EncountersBundle::GEARMAN_ACHIEVEMENT_SET_FUNCTION_NAME, serialize(array(\n 'webUserId' => $webUserId,\n 'currentUserId' => null,\n 'decision' => null,\n 'time' => time(),\n )));\n\n foreach (range(-1, 1) as $decision) {\n $this->getCountersHelper()->set($webUserId, \"noretry-($decision)\", 0);\n }\n } else {\n list($this->json['status'], $this->json['message']) = array(2, \"Invalid input data\");\n }\n } else {\n list($this->json['status'], $this->json['message']) = array(2, \"Invalid session\");\n }\n } else {\n list($this->json['status'], $this->json['message']) = array(1, \"Invalid params\");\n }\n\n return $this->JSONResponse($this->json);\n }", "title": "" } ]
[ { "docid": "46b974204a538eafeebcdee40b96f86d", "score": "0.6907232", "text": "public function handle_get_content_queue() {\n\n\t\t// nonce check\n\t\tcheck_ajax_referer( 'dlm_legacy_upgrade', 'nonce' );\n\n\t\t// check cap access\n\t\tif ( ! current_user_can( 'manage_downloads' ) ) {\n\t\t\texit;\n\t\t}\n\n\t\t// queue object\n\t\t$queue = new DLM_LU_Content_Queue();\n\n\t\t// build queue\n\t\t$queue->build_queue();\n\n\t\t// send queue as response\n\t\twp_send_json( $queue->get_queue() );\n\n\t\t// bye\n\t\texit;\n\t}", "title": "" }, { "docid": "68ff703cb13b519bff2bdc08a88160f7", "score": "0.6790549", "text": "public function QueueHistory(){\n\n\t\t$result_tmp=ALTLPController::queueHistory();\n\t\t$result = $this->AJAXFetchResponse([['d_queue_history',$result_tmp]]);\n \treturn($result);\n\t\n\t}", "title": "" }, { "docid": "63d6e6b2035d5cec19b2ce8058db0a63", "score": "0.6683123", "text": "public function handle_get_download_queue() {\n\n\t\t// nonce check\n\t\tcheck_ajax_referer( 'dlm_legacy_upgrade', 'nonce' );\n\n\t\t// check cap access\n\t\tif ( ! current_user_can( 'manage_downloads' ) ) {\n\t\t\texit;\n\t\t}\n\n\t\t// queue object\n\t\t$queue = new DLM_LU_Download_Queue();\n\n\t\t// build queue\n\t\t$queue->build_queue();\n\n\t\t// send queue as response\n\t\twp_send_json( $queue->get_queue() );\n\n\t\t// houdoe\n\t\texit;\n\t}", "title": "" }, { "docid": "55a9701eefa21674a5b12342a67ac90b", "score": "0.65043324", "text": "public function getQueue();", "title": "" }, { "docid": "dc20e5f81c3cc7a770b59ce8fac8f6b9", "score": "0.6347524", "text": "public function getQueue()\n {\n }", "title": "" }, { "docid": "68538426ebd9d55f83285cfa2ac51e32", "score": "0.6319298", "text": "public function getqueue() {\n \n return ($this->myaction);\n }", "title": "" }, { "docid": "4bf1cdf62cf01f981641cbabe4e4bf3c", "score": "0.6261854", "text": "public function load_ajax_task(){\n\t\t\n\t}", "title": "" }, { "docid": "78ba23864ebe1678172274b6a6ecc4f7", "score": "0.6260695", "text": "protected function _getqueue() {\t\t \n\t\t \n\t if ((is_array($_SESSION['dacpost'])) && \n\t\t (array_key_exists('FormAction',$_SESSION['dacpost']))) {//POST:formaction by other page redirection\n $ret = $_SESSION['dacpost']['FormAction'];\n\t\t //in next post if dacpost->Formaction not exist go to real post above..\n\t\t unset($_SESSION['dacpost']['FormAction']);\t\t \n\t\t //update post \n\t\t $_POST = array_merge($_POST,$_SESSION['dacpost']);\n\t\t //update request\n\t\t $_REQUEST = array_merge($_REQUEST,$_SESSION['dacpost']);\n\t\t //free session post\n\t\t unset($_SESSION['dacpost']);\t \n\t\t}\t \n\t elseif (array_key_exists('FormAction',$_POST)) {//POST:formaction\n\t\t //if post has & query cut it from post\n\t\t $postq = explode('&',$_POST['FormAction']);\n\t\t $ret = $postq[0];// $_POST['FormAction'];\n\t\t} \n\t\telseif (array_key_exists('t',$_GET)) {//GET:t\n\t //$ret = $cmd;\n\t\t $t = $_GET['t']; //echo $t,'>';\n\t\t \n\t\t if ($t!=null) {//get t\n\t\t $ret = $_GET['t'];\n\t\t }\t\n\t\t else {//redirect to root controller-page\t \n\t\t $current_page = pathinfo($_SERVER['PHP_SELF']);\n\t\t //echo $current_page['dirname'],\">>>>\",$this->file_path;\n\t\t //if is not the root-page-controller\n\t\t\tif ($this->root_page!=$current_page['basename']) {\n\t\t\t //echo \"::::\",$this->file_path.$current_page['basename'];\n\t\t\t //echo \"++++++++<br>\";\n\t\t\t //echo $_SERVER['URL']; print_r($_SERVER);\n\t\t $page = str_replace($this->file_path.\"/\".$current_page['basename'],\n\t\t\t \"/\".$this->root_page,\n\t\t\t\t\t\t\t\t $this->get_server_url());\n\t\t\t //echo $page;\t\t\t\t\t \n\t\t\t //extract '?t=' due to re-queue recursive error \t\t\t\t\t \n\t\t\t $mypage = substr($page,0,strlen($this->root_page)+1);//echo $mypage; die();\n\t\t\t unset($_GET['t']);\t\t\t\n\t\t\t \t \n\t\t $this->redirect($_SERVER['HTTP_HOST'] . $this->inpath . $mypage);\t\t\t\t \n\t\t\t}\n\t\t\telse {\n //echo '<br>',$this->root_page,' ',str_replace(\"/\",\"\",$_SERVER['PHP_SELF']),\"<br>\";\t\t\t\n\t\t\t $ret = 'index';\n\t\t\t} \n\t\t }\t\n\t\t} \n\t\t/*elseif (is_array($_GET)) {//GET:the first element of request\t\t\n\t\t //get the first elemnt of request array\n\t\t $req = array_reverse($_GET,true);//reverse to get the last\n\t\t $ret = array_pop($req); //echo $re;\n\t\t}*/ \n\t\telse {//self name is the standart action \n\t\t $ret = $this->file_name;\n\t\t //die($ret);\n\t\t} \n\t\t//print_r($_GET);print_r($_POST);\n\t\t//print_r($_REQUEST);\n\t\t//print_r($_SESSION['dacpost']);\n\t\t//echo $ret,'<br>';\n\n\t\tif ($ret) {\n\t\t //if action NOT in executed dpc redirect\n\t\t //if is an excluded cmd return basic cmd = page name\n\t\t //cmd is the execuded from some dpc not the default\n\t\t if ($this->get_attribute($this->active($ret),$ret,6)){//exclude cmd\n\t\t //echo \"EXCLUDE.....<br>\";\n\t\t\t$this->my_excluded_action = $ret;//backup cmd\n\t\t $ret = $this->file_name;//default dpc cmd (never exclude main file cmd)\n\t\t\treturn ($ret);\n\t\t }\n\t\t \n\t\t //get the active dpc = this name default\n\t\t $this->myactive = $this->active($this->file_name);\t \t\t \n //if can't handled by standart=filename dpc \n\t\t //print_r($this->get_dpcactions_array($this->myactive));\n\t\t if (!@in_array($ret,$this->get_dpcactions_array($this->myactive))) {\n\t\t \n\t\t //check if ret can't handled also by ret dpc\n\t\t\t if (!@in_array($ret,$this->get_actions_array($ret))) {\n\t\t $this->myactive = $this->active($ret);//update myactive dpc\t\t\t \n\t\t\t //if ret not in this dpc authority redirect...to a page named ret\n\t\t\t\t//echo \"AAAAAAA<br>\"; print_r($_SERVER); echo $this->get_server_url();\n\t\t\t\t//echo $this->get_server_url(); print_r($_SERVER);\n\t\t $page = str_replace($this->file_name.\".\".$this->file_extension,\n\t\t\t\t $ret.\".\".$this->file_extension,\n\t\t\t\t\t\t\t\t\t$this->get_server_url());\n\t\t\t $this->redirect($_SERVER['HTTP_HOST'] . $page);\n\t\t\t }\n\t\t }\t\n\t\t //echo $this->myactive,'>>>>';\t\t \n }\n\t\telse { //goto root page\n\t\t //echo \"BBBBBBB<br>\";\n\t\t //echo $_SERVER['URL']; print_r($_SERVER);\n\t\t $page = str_replace($this->file_info,\n\t\t $this->root_page,\n\t\t\t\t\t\t\t $this->get_server_url());\n\t\t $this->redirect($_SERVER['HTTP_HOST'] . $this->inpath . $page);\t\t \n\t\t} \n\t\t\n\t\treturn ($ret); //final return ret\n }", "title": "" }, { "docid": "5dc5ab5fe19d775a76b586a54ba4f896", "score": "0.60109466", "text": "public function getQueue() : string;", "title": "" }, { "docid": "b0c56c9b9ba7e6e6d19cc4c74822727a", "score": "0.5958087", "text": "public function actionQueue(){\n\n //var_dump($r);\n\n\n $r = DelayTask::instance()->getQueue()->stats();\n\n print_r($r);\n }", "title": "" }, { "docid": "0147a536c4451eb32dd37459cb77b3ae", "score": "0.5934409", "text": "public function enqueue();", "title": "" }, { "docid": "784fc9ce9d263900b71b3b27cfb9ecd3", "score": "0.5912004", "text": "public function searchQueuesAction()\n {\n return $this->searchBase(\n \"queues.queue\",\n array(\"enabled\",\"number\", \"pipe\",\"weight\",\"description\",\"mask\",\"origin\"),\n \"number\"\n );\n }", "title": "" }, { "docid": "3cb048261866a5145e7b5bd536322da8", "score": "0.587344", "text": "public function handleAjaxCall();", "title": "" }, { "docid": "3cb048261866a5145e7b5bd536322da8", "score": "0.587344", "text": "public function handleAjaxCall();", "title": "" }, { "docid": "d248695dd5dcad716821aa1b777bb76c", "score": "0.58621025", "text": "public function getQueues();", "title": "" }, { "docid": "d248695dd5dcad716821aa1b777bb76c", "score": "0.58621025", "text": "public function getQueues();", "title": "" }, { "docid": "d63a62c2303800f3af46935420689a6b", "score": "0.58577573", "text": "function wpdmpp_async_request()\n {\n $CustomActions = new \\WPDMPP\\Libs\\CustomActions();\n if (method_exists($CustomActions, $_POST['execute'])) {\n $method = sanitize_text_field($_POST['execute']);\n echo $CustomActions->$method();\n die();\n } else\n die(\"Function doesn't exist\");\n }", "title": "" }, { "docid": "e95f3fe161846f964fe6622222cb5a0c", "score": "0.58114177", "text": "public function listQueues();", "title": "" }, { "docid": "96b46870850bf31ca2391e130a818dfd", "score": "0.5805235", "text": "public function index(){\n\n BillingJob::dispatch()->onQueue('billing');\n return response(\"Job has been sent to queue\");\n }", "title": "" }, { "docid": "57fa95eb88fb9867efea5f4295fd589f", "score": "0.5760915", "text": "public function ajaxGetAction()\n {\n $this->view->disable();\n $response = new \\Phalcon\\Http\\Response();\n if (!$this->request->isAjax()) {\n echo \"is not Ajax ! \";\n }\n if (!$this->request->isPost()) {\n echo \"is not Post ! \";\n }\n $shouhin_bunrui3 = ShouhinBunrui4Kbns::find(array(\n 'order' => 'cd',\n 'conditions' => ' cd LIKE ?1 ',\n 'bind' => array(1 => $this->request->getPost('cd').'%')\n ));\n $res_flds = [\"id\",\"cd\",\"name\",];\n $resData = array();\n foreach ($shouhin_bunrui4 as $bunrui4) {\n $resAdata = array();\n foreach ($res_flds as $res_fld) {\n $resAdata[$res_fld] = $bunrui4->$res_fld;\n }\n $resData[] = $resAdata;\n }\n $response->setContent(json_encode($resData));\n return $response;\n }", "title": "" }, { "docid": "360458c2a66d091c86af965e90fc7d3a", "score": "0.5730019", "text": "public function handleResponse()\n {\n // Prevent this from getting called twice\n $response = Craft::$app->getResponse();\n $response->off(Response::EVENT_AFTER_PREPARE, [$this, 'handleResponse']);\n\n // Ignore if any jobs are currently reserved\n if ($this->getHasReservedJobs()) {\n return;\n }\n\n // Ignore if this isn't an HTML/XHTML response\n if (!in_array($response->getContentType(), ['text/html', 'application/xhtml+xml'], true)) {\n return;\n }\n\n // Include JS that tells the browser to fire an Ajax request to kick off a new queue runner\n // (Ajax request code adapted from http://www.quirksmode.org/js/xmlhttp.html - thanks ppk!)\n $url = Json::encode(UrlHelper::actionUrl('queue/run'));\n $js = <<<EOD\n<script type=\"text/javascript\">\n/*<![CDATA[*/\n(function(){\n var XMLHttpFactories = [\n function () {return new XMLHttpRequest()},\n function () {return new ActiveXObject(\"Msxml2.XMLHTTP\")},\n function () {return new ActiveXObject(\"Msxml3.XMLHTTP\")},\n function () {return new ActiveXObject(\"Microsoft.XMLHTTP\")}\n ];\n var req = false;\n for (var i = 0; i < XMLHttpFactories.length; i++) {\n try {\n req = XMLHttpFactories[i]();\n }\n catch (e) {\n continue;\n }\n break;\n }\n if (!req) return;\n req.open('GET', $url, true);\n if (req.readyState == 4) return;\n req.send();\n})();\n/*]]>*/\n</script>\nEOD;\n\n if ($response->content === null) {\n $response->content = $js;\n } else {\n $response->content .= $js;\n }\n }", "title": "" }, { "docid": "f3247e86028f87a1cec3290507f37896", "score": "0.57075226", "text": "public function getQueue ()\n {\n return $this->queue;\n }", "title": "" }, { "docid": "f6c4a228a3aa4b3f7079bdda257d6e4c", "score": "0.57059", "text": "function product_queue(){\n\t$query = \"SELECT * FROM product WHERE product.status = 'queued'\";\n\t$result = db_query($query, true);\n\treturn $result;\n}", "title": "" }, { "docid": "418f0ced789810ac8939bf15c9bd0e39", "score": "0.5705058", "text": "public function index_get()\n\t{\n $this->response([\n 'metadata' => [\n 'code' => \"200\",\n 'message' => \"this ajax with get method\"\n ],\n 'status' => 'success'\n ], 200);\n }", "title": "" }, { "docid": "2c86d4ef1f6bd2edff5369c5eb8b1d96", "score": "0.5669863", "text": "public function ajaxAutocompletionJobs()\n {\n if (isset($_POST['searchTerm'])) {\n $requeteJobs = $_POST['searchTerm'];\n $data = $this->model->ajaxFileJobs($requeteJobs);\n echo json_encode($data);\n }\n }", "title": "" }, { "docid": "af6269a0a457dc789ff0e56a38a87995", "score": "0.56685096", "text": "public function get_queue() {\n\t\treturn $this->queue ;\n\t}", "title": "" }, { "docid": "e23eb390c6a13ae69e3a9e2c8603e3dd", "score": "0.56525916", "text": "public function request_index()\n {\n $link = \"http://\" . $_SERVER['HTTP_HOST'] . $this->webroot . 'rest_tasks.json';\n\n $data = null;\n $httpSocket = new HttpSocket();\n $response = $httpSocket->get($link, $data);\n $this->set('response_code', $response->code);\n $this->set('response_body', $response->body);\n\n $this->render('/Client/request_response');\n }", "title": "" }, { "docid": "cd8a156ff964751e03f55685c95c4965", "score": "0.56514806", "text": "abstract public function run_queue();", "title": "" }, { "docid": "64e37c61525999ef3c5c238bc2ed8871", "score": "0.5637869", "text": "protected function getQueue()\n {\n return \\Yii::$app->session->get($this->getSessionKey('queue'));\n }", "title": "" }, { "docid": "3ee9dd251121db64239e74d410e0035b", "score": "0.5626134", "text": "public function getAction() \n\t\t{\n\t\t\t$this->logger->log($this->tableName.\" Get (READ) Action Called: \", Zend_Log::DEBUG);\t\n\t\t\t$this->indexAction();\n\t\t\t$this->getResponse()->setHttpResponseCode(200);\n\t\t\treturn;\n\t\t}", "title": "" }, { "docid": "f476757c07ab516ba9d94a602c6e0061", "score": "0.56215763", "text": "protected function doGet()\n {\n\n // $this->renderView();\n $qString = $_SERVER['QUERY_STRING'];\n if (!empty($qString) && (strpos($qString, 'JSON') !== false)) {\n $this->processJsonGetRequest();\n }\n\n parent::doGet();\n\n }", "title": "" }, { "docid": "76aa085deda979e3dd7d7447b750fbae", "score": "0.56115794", "text": "public function ajax_request()\n {\n ;\n }", "title": "" }, { "docid": "ed1ab1523c95643fd2dceeac8ae2439e", "score": "0.5602305", "text": "public function dequeue();", "title": "" }, { "docid": "ed1ab1523c95643fd2dceeac8ae2439e", "score": "0.5602305", "text": "public function dequeue();", "title": "" }, { "docid": "02cfe62c87fcec7f5ef37de3bc6ba935", "score": "0.5597211", "text": "public function getFinishedRequests () {}", "title": "" }, { "docid": "114a9fa230b648a4e334d9fe71e543ca", "score": "0.5583193", "text": "protected function executeGet()\n {\n return $this->connection->get($this->getRequest());\n }", "title": "" }, { "docid": "e7aab52c59d11a23cf114d757bc6e754", "score": "0.55641085", "text": "public function dequeue()\n {\n }", "title": "" }, { "docid": "a61b978354d9439dadb4b38858558525", "score": "0.5556167", "text": "public function get()\n\t{\n\t\t$msg = null;\n\n\t\ttry\n\t\t{\n\t\t\t$rtime = date( 'Y-m-d H:i:s', time() + $this->rtime );\n\t\t\t$stmt = $this->conn->create( $this->sql['reserve'] );\n\n\t\t\t$stmt->bind( 1, $this->cname );\n\t\t\t$stmt->bind( 2, $rtime );\n\t\t\t$stmt->bind( 3, $this->queue );\n\t\t\t$stmt->bind( 4, $rtime );\n\n\t\t\t$stmt->execute()->finish();\n\n\n\t\t\t$stmt = $this->conn->create( $this->sql['get'] );\n\n\t\t\t$stmt->bind( 1, $this->queue );\n\t\t\t$stmt->bind( 2, $this->cname );\n\t\t\t$stmt->bind( 3, $rtime );\n\n\t\t\t$result = $stmt->execute();\n\n\t\t\tif( ( $row = $result->fetch() ) !== false ) {\n\t\t\t\t$msg = new \\Aimeos\\MW\\MQueue\\Message\\Standard( $row );\n\t\t\t}\n\n\t\t\t$result->finish();\n\t\t}\n\t\tcatch( \\Exception $e )\n\t\t{\n\t\t\tthrow new \\Aimeos\\MW\\MQueue\\Exception( $e->getMessage() );\n\t\t}\n\n\t\treturn $msg;\n\t}", "title": "" }, { "docid": "4dceb963048252be26e3b265c4b9c0fb", "score": "0.5552574", "text": "public function load_ajax_tasks(){\n\t\t$this->get_task_assign();\n\t}", "title": "" }, { "docid": "75fb3c26c1e7b9633e207f61950bf38d", "score": "0.55376035", "text": "public function enqueue()\n {\n //\n }", "title": "" }, { "docid": "75fb3c26c1e7b9633e207f61950bf38d", "score": "0.55376035", "text": "public function enqueue()\n {\n //\n }", "title": "" }, { "docid": "443f9f7ea783851cba678577f7c919f5", "score": "0.5516525", "text": "public function get()\n\t{\n\t\t// $this->plugin->setResponse(\"POST method is not supporter, try GET method\");\n\t\tdie(\"in get funtion\");\n\t}", "title": "" }, { "docid": "f80f02367c684189f532d7f92ebb4b74", "score": "0.55152375", "text": "public function quote_jobs()\r\n {\r\n \t\ttry\r\n\t\t{\r\n\t\t\t$this->i_sub_menu_id\t=\t7;\r\n\t\t\t$this->data['breadcrumb'] = array('Quotes'=>'');\t\r\n\t\t\t$this->data['pathtoclass']=$this->pathtoclass;\r\n\t\t\t\r\n\t\t\tob_start();\r\n\t\t\t$this->quote_jobs_pagination_ajax();\r\n\t\t\t$job_contents = ob_get_contents();\r\n\t\t\tob_end_clean();\r\n\t\t\t//var_dump($job_contents);exit;\r\n\t\t\t$this->data['job_contents'] = $job_contents;\r\n\t\t\t$this->render();\r\n\t\t}\r\n\t\tcatch(Exception $err_obj)\r\n\t\t{\r\n\t\t\tshow_error($err_obj->getMessage());\r\n\t\t}\t\r\n }", "title": "" }, { "docid": "53e00781b9bb557245fb9a4aa51eee47", "score": "0.55143136", "text": "protected function processGetRequest()\n {\n $this->ajaxDie(json_encode([\n 'success' => true,\n 'operation' => 'get',\n 'message' => 'You should not be here',\n ]));\n }", "title": "" }, { "docid": "1b5172a54f899511a7ee930ea5404fb3", "score": "0.5505237", "text": "public function loadAjax() {\n\n\t\t$this->keyFacade->loadAjax($_GET);\n\n\t}", "title": "" }, { "docid": "cfe7aef2e65ef84fa4f61e0a9db63c13", "score": "0.5502573", "text": "public function getAjaxspot($spot_id) \n\t{\n\t\t$seconds = 0; \n\t\t$response = array(); \n\t\t$spot = Spot::find($spot_id); \n\t\t$timestamp = 0;\n\n\t\twhile($seconds < 10) {\n\t\t\t$data = array(); \n\t\t\t\n\t\t\t// Job data\n\t\t\tif($spot->jobs->count()) {\n\t\t\t\tforeach($spot->jobs as $job) {\n\t\t\t\t\t$data[\"#table_\".$spot->id.\"_\".$job->id] = $this->getZonejob($spot->id, $job->id); \n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Loop all data and check for returns\n\t\t\t */\n\t\t\tforeach ($data as $key => $json) {\n\t\t\t\tif($json['data'] != false) {\n\t\t\t\t\t$response[$key] = $json['data']; \n\t\t\t\t\t$timestamp = ($timestamp < $json['timestamp']) ? $json['timestamp'] : $timestamp; \n\t\t\t\t} \n\t\t\t}\n\n\t\t\tif(count($response)) {\n\t\t\t\treturn Response::json(\n\t\t\t\t\tarray(\t'timestamp' => $timestamp, \n\t\t\t\t\t\t\t'html' => $response));\n\t\t\t}\n\t\t\t\n\t\t\tsleep(1); \n\t\t\t$seconds++; \n\n\t\t}\n\n\t\treturn Response::json(array('nodata' => true, 'timestamp' => Input::get('timestamp')));\n\t}", "title": "" }, { "docid": "5386cccad34f1d4aca4d1df562026b76", "score": "0.54987365", "text": "public function actionQueueEnabled($id) {\n echo json_encode(array(\n 'success' => true, \n 'queue' => $this->getStatus($id, 'queue')));\n exit;\n }", "title": "" }, { "docid": "495af56d566cc2a786eedc9e35f6f502", "score": "0.5483458", "text": "public function abPress_ajax_get() {\n\n\t\theader( \"Content-Type: application/json\" );\n\n\t\techo json_encode(ab_press_getAllActiveExperiments());\n\t \t\n\t\t// IMPORTANT: don't forget to \"exit\"\n\t\texit;\n\t}", "title": "" }, { "docid": "d1b2a9c68eb3adf21eca41ab3ee251f0", "score": "0.5465793", "text": "abstract public function request();", "title": "" }, { "docid": "fa2dc8e99f03eeb0dcf0b672363d5906", "score": "0.546006", "text": "private function check_queue( ) {\n\t\t//need to fix this to use arrays instead of what I'm doing now\n\t\t$this->db_result['job-fetch'] = $this->db_slave->select( 'el_archive_queue', '*',\n\t\t\t\tarray( 'delay_time' => ' >=' . time(), 'in_progress' => '0'),\n\t\t\t\t__METHOD__,\n\t\t\t\tarray( 'ORDER BY' => 'queue_id ASC', 'LIMIT' => '1' ));\n\n\t\tif ( $this->db_result['job-fetch']->numRows() > 0 ) {\n\t\t\t$row = $this->db_result['job-fetch']->fetchRow();\n\n\t\t\t//$this->delete_dups( $row['url'] );\n\n\t\t\treturn $row['url'];\n\t\t} else {\n\t\t\t//there are no jobs to do right now\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "0745ba9d022be10316a4db83d22ed256", "score": "0.5442542", "text": "public abstract function doGet();", "title": "" }, { "docid": "65350d74c49f18569cd304f17232a9a1", "score": "0.5442095", "text": "public function listQueues($request);", "title": "" }, { "docid": "98b870f79aefe06ba02f2c1dcaef4fcd", "score": "0.5441406", "text": "function request_handle() {\r\n\t\tif (isset($_GET['btev_recent_event_rss'])) {\r\n\t\t\tif (isset($_GET['btev_access_key'])) {\r\n\t\t\t\t$this->recent_events_rss($_GET['btev_access_key']);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$this->recent_events_rss();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "68488cc4c03c8107cf682cb94573831b", "score": "0.5428249", "text": "public function request()\n {\n //\n }", "title": "" }, { "docid": "9883be53628a0cf519bda40a7f2b613f", "score": "0.54136413", "text": "function command__get_queue(\\Walkthrough\\Connection $connection, \\ArrayAccess $command_line) {\n $connection->login();\n $response = $connection->getScreeningQueue();\n\n var_dump($response);\n}", "title": "" }, { "docid": "e5fffb58b9bf15b1be6cb645fe054ebc", "score": "0.5412894", "text": "public function gettask()\n\t{\n\t\t\t$postdata = $this->striptags($_POST);\n\t\t\textract($postdata);\n\t\t\t\n\t\t\t$cond = array();\n\t\t\t$table = 'tasks';\n\t\t\t\n\t\t\t$cond['TaskId'] = $id;\n\t\t\t\n\t\t\tif($this->commonmodel->checkexists($table,$cond))\n\t\t\t{\n\t\t\t\t$field='Task';\n\t\t\t\t$order_by='';\n\t\t\t\t$order_by_field='';\n\t\t\t\t$limit='';\n\t\t\t\t$task = $this->commonmodel->getAfield($table,$cond,$field,$order_by='',$order_by_field='',$limit='');\n\t\t\t\techo \"<p>\".$task.\"</p>\";\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t\techo \"Sorry invalid request\";\n\t}", "title": "" }, { "docid": "f17409cd4546f56fdd41fa3aac5f0313", "score": "0.5411015", "text": "public function getAnnounceQueue();", "title": "" }, { "docid": "6684f98a38e3e6d3c8121f1ac41a5ef6", "score": "0.5409561", "text": "public function playsong(){\n if($_SERVER['REQUEST_METHOD']== 'GET'){\n if(isset($_GET['isajax'])){\n $song_id = $_GET['song'];\n $data = [\n 'name'=> $this->postModel->getSongLocation($song_id)->name,\n 'location'=>$this->postModel->getSongLocation($song_id)->location\n ];\n $response = json_encode($data);\n echo $response;\n }\n else{\n header('location:all');\n }\n }\n }", "title": "" }, { "docid": "d071a28a31feb7dfc5291d1e2f61f3d0", "score": "0.5399266", "text": "function get_job($request) {\n global $m;\n global $server_id;\n\n debug(basename(__FILE__).\": \".__LINE__.\": \".__FUNCTION__.\"(): \".\"checking incoming request\");\n debug($request);\n if(!isset($server_id)){\n critical_api_error(\"server_id is not set\");\n }\n\n $server_id = $m[\"ro\"]->escape_string($server_id);\n\n $q = \"SELECT \";\n $q .= \" `job_id`,\";\n $q .= \" `type`,\";\n $q .= \" UNIX_TIMESTAMP(`start_scheduled`) AS `start_scheduled`,\";\n $q .= \" `params`\";\n $q .= \" FROM `job`\";\n $q .= \" JOIN `server` USING (`server_id`)\";\n $q .= \" WHERE `job`.`server_id` = '$server_id'\";\n $q .= \" AND `server`.`registered` = 'Yes'\";\n $q .= \" AND `job`.`status` = 'Scheduled'\";\n $q .= \" ORDER BY `job`.`start_scheduled`\";\n $q .= \" LIMIT 1\";\n $r = mysql_rw_execute($q, \"api\");\n\n debug(basename(__FILE__).\": \".__LINE__.\": \".__FUNCTION__.\"(): \".\"found \".$r->num_rows.\" job(s)for $server_id\");\n $job = $r->fetch_assoc();\n debug(basename(__FILE__).\": \".__LINE__.\": \".__FUNCTION__.\"(): \".\"returning job:\");\n debug($job);\n\n $response[\"success\"] = TRUE;\n $response[\"response\"] = response($job, $server_id);\n echo json_encode($response);\n return TRUE;\n}", "title": "" }, { "docid": "07bb5ab70b75ff43e00a46a57eb36d2b", "score": "0.5389108", "text": "public function getFinishedRequests()\n {\n }", "title": "" }, { "docid": "509286ddb0e67f3ca31d7af3b8ee6144", "score": "0.53761035", "text": "public function get_from_queue() {\n $worker_id = text::random('alnum', 16);\n $query = $this->db->query(\"UPDATE backup_queue SET worker_id = ?, worker_timeout = ? WHERE status = 0 AND (worker_id IS NULL OR worker_timeout < ?) ORDER BY created ASC LIMIT 1\", \n array($worker_id, date::to_db('+10 minutes'), date::to_db()));\n if ($query->count()) {\n return $this->where('status', 0)->where('worker_id', $worker_id)->find();\n }\n return FALSE;\n }", "title": "" }, { "docid": "082953130eda0271c6c07e9ebcbe88d0", "score": "0.5359788", "text": "function msg_get_queue($key, $perms) {}", "title": "" }, { "docid": "10ede08be10b331f082f93272abc9864", "score": "0.5356489", "text": "abstract function ajaxAction($data);", "title": "" }, { "docid": "b7ead5c7d0a51407b006822c634199eb", "score": "0.5356409", "text": "private function _fetch_queue()\n\t{\n\t\tif ( ! array_key_exists($this->queue, $this->EE->session->cache['minimee'][$this->type]))\n\t\t{\n\t\t\tthrow new Exception('Could not find a queue of files by the name of \\'' . $this->queue . '\\'.');\n\t\t}\n\n\t\t// clear queue just in case\n\t\t$this->filesdata = array();\n\n\t\t$this->template = $this->EE->session->cache['minimee'][$this->type][$this->queue]['template'];\n\n\t\t// set our Minimee::filesdata array\n\t\t$this->_set_filesdata($this->EE->session->cache['minimee'][$this->type][$this->queue]['files']);\n\n\t\t// No files found?\n\t\tif ( ! is_array($this->filesdata) OR count($this->filesdata) == 0)\n\t\t{\n\t\t\tthrow new Exception('No files found in the queue named \\'' . $this->type . '\\'.');\n\t\t}\n\t}", "title": "" }, { "docid": "9010f5719b50c737f426bda0a77affab", "score": "0.5352334", "text": "public function request();", "title": "" }, { "docid": "0c934ac7c859fa767e6dc454c76750c7", "score": "0.53391695", "text": "public function getjob_get() {\n //get id project\n $id_job = $this->get('id_job');\n if ($id_job) {\n // get the data by id\n $data = $this->Projectmodel->get_job($id_job);\n $result = array();\n if ($data) {\n // data is found \n foreach ($data as $key => $value) {\n $result['status'] = TRUE;\n $result['tugas'] = $value;\n }\n $this->output\n ->set_status_header(REST_Controller::HTTP_OK)\n ->set_header('Cache-Control: no-store, no-cache, must-revalidate')\n ->set_header('Cache-Control: post-check=0, pre-check=0')\n ->set_header('Pragma: no-cache')\n ->set_content_type('application/json', 'utf-8')\n ->set_output(json_encode($result, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES));\n } else {\n // required post params is missing\n $this->set_response([\n 'status' => FALSE,\n 'message' => 'ID tidak ditemukan!'], REST_Controller::HTTP_OK);\n }\n } else {\n // required post params is missing\n $this->set_response([\n 'status' => FALSE,\n 'message' => 'Mohon maaf, server sedang sibuk!'], REST_Controller::HTTP_OK);\n }\n }", "title": "" }, { "docid": "ce55b58723869634bf7c293f326da3cc", "score": "0.53360695", "text": "private function _handle_ajax_requests()\n {\n $task = $_GET['task'] ?? null;\n\n if ($task == 'change_sku')\n {\n $data = $_GET;\n $options = $_GET['selected_info'];\n\n // Get product\n $em = EntityManagerSingleton::getInstance();\n $product = $em->getRepository('Library\\Model\\Product\\Product')->findOneById($data['product_id']);\n\n // Find sku by options if options are there\n if (!empty($options))\n {\n // Get sku from options\n $sku = $em->getRepository('Library\\Model\\Product\\Sku')->findOneByOptions($product, $options);\n\n }\n else\n {\n // Get default sku if product has no options\n $sku = $product->getSkus()[0];\n }\n\n // Return information to jquery regarding sku\n if (($sku instanceof Sku) && !$sku->getIsDefault())\n {\n $image_path = Settings::get('image_path');\n\n // Get correct image\n if ($sku->getImage() instanceof Image)\n {\n $image = $image_path . '/product_images/' . $sku->getImage()->getUrl();\n }\n elseif ($sku->getProduct()->getDefaultImage() instanceof Image)\n {\n $image = $image_path . '/product_images/' . $sku->getProduct()->getDefaultImage()->getUrl();\n }\n else\n {\n $image = $image_path . '/layout_images/no_photo.jpg';\n }\n\n return [\n 'error' => false,\n 'sku_info' => [\n 'id' => $sku->getId(),\n 'number' => $sku->getNumber(),\n 'qty' => $sku->getQuantity(),\n 'status' => is_null($sku->getStatus()) ? null : $sku->getStatus()->getName(),\n 'image_url' => $image,\n 'image_alt' => $sku->getProduct()->getName(),\n 'image_title' => $sku->getProduct()->getName(),\n ]\n ];\n }\n else\n {\n return [\n 'error' => false,\n 'sku_info' => null\n ];\n }\n }\n\n return null;\n }", "title": "" }, { "docid": "5aab86451615ba9b1198bc054994b661", "score": "0.5324418", "text": "protected function queue()\r\n {\r\n\r\n Output::i()->title = 'Generator';\r\n $type = Request::i()->type ?: 'forums';\r\n $limit = Request::i()->limit ?: 10;\r\n $password = Request::i()->password ?: \\null;\r\n $group = Request::i()->group ?: \\null;\r\n $club = Request::i()->club ?: \\null;\r\n\r\n $url = $this->url->setQueryString( [\r\n 'do' => 'queue',\r\n 'type' => $type,\r\n 'limit' => $limit,\r\n 'password' => $password,\r\n 'group' => $group,\r\n 'club' => $club,\r\n ] );\r\n\r\n Output::i()->output = new MultipleRedirect( $url->csrf(), function ( $data )\r\n {\r\n\r\n $offset = 0;\r\n $type = Request::i()->type ?: 'forums';\r\n $limit = Request::i()->limit ?: 10;\r\n $password = Request::i()->password ?: \\null;\r\n $group = Request::i()->group ?: \\null;\r\n $club = Request::i()->club ?: \\null;\r\n $start = Request::i()->start ?: \\null;\r\n $end = Request::i()->end ?: \\null;\r\n\r\n if ( isset( $data[ 'start' ] ) ) {\r\n $start = $data[ 'start' ];\r\n }\r\n else if ( $start === \\null ) {\r\n $start = Settings::i()->getFromConfGlobal( 'board_start' );\r\n }\r\n\r\n if ( isset( $data[ 'end' ] ) ) {\r\n $end = $data[ 'end' ];\r\n }\r\n else if ( $end === \\null ) {\r\n $end = time();\r\n }\r\n\r\n if ( isset( $data[ 'offset' ] ) ) {\r\n $offset = $data[ 'offset' ];\r\n }\r\n\r\n if ( isset( $data[ 'limit' ] ) ) {\r\n $limit = $data[ 'limit' ];\r\n }\r\n\r\n if ( isset( $data[ 'type' ] ) ) {\r\n $type = $data[ 'type' ];\r\n }\r\n\r\n if ( isset( $data[ 'password' ] ) ) {\r\n $password = $data[ 'password' ];\r\n }\r\n\r\n if ( isset( $data[ 'group' ] ) ) {\r\n $group = $data[ 'group' ];\r\n }\r\n\r\n if ( isset( $data[ 'club' ] ) ) {\r\n $club = $data[ 'club' ];\r\n }\r\n\r\n $max = 1;\r\n\r\n if ( $limit < $max ) {\r\n $max = $limit;\r\n }\r\n\r\n if ( $offset >= $limit ) {\r\n return \\null;\r\n }\r\n\r\n for ( $i = 0; $i < $max; $i++ ) {\r\n switch ( $type ) {\r\n case 'member':\r\n $member = new Dtmember;\r\n $member->start = $start;\r\n $member->end = $end;\r\n $member->build( $password, $group );\r\n break;\r\n case 'forum':\r\n ( new Forum )->build();\r\n break;\r\n case 'topic':\r\n $topic = new Topic;\r\n $topic->start = $start;\r\n $topic->end = $end;\r\n $topic->build();\r\n break;\r\n case 'post':\r\n ( new Post )->build();\r\n break;\r\n case 'club':\r\n ( new Club )->build();\r\n break;\r\n }\r\n $offset++;\r\n }\r\n\r\n $progress = ( $offset / $limit ) * 100;\r\n\r\n $language = Member::loggedIn()->language()->addToStack( 'dtcontent_progress', \\false, [\r\n 'sprintf' => [\r\n $offset,\r\n $limit,\r\n ],\r\n ] );\r\n\r\n return [\r\n [\r\n 'type' => $type,\r\n 'limit' => $limit,\r\n 'offset' => $offset,\r\n 'password' => $password,\r\n 'group' => $group,\r\n 'club' => $club,\r\n 'start' => $start,\r\n 'end' => $end,\r\n ],\r\n $language,\r\n $progress,\r\n ];\r\n }, function ()\r\n {\r\n\r\n $url = Url::internal( 'app=toolbox&module=content&controller=generator' );\r\n $lang = Member::loggedIn()->language()->addToStack( 'dtcontent_completed', \\false, [ 'sprintf' => [ mb_ucfirst( Request::i()->type ) ] ] );\r\n Member::loggedIn()->language()->parseOutputForDisplay( $lang );\r\n Output::i()->redirect( $url->csrf(), $lang );\r\n } );\r\n }", "title": "" }, { "docid": "dbf576fedbf3f1416f4f80c67c8ed0f6", "score": "0.53234", "text": "public function jobAction()\n {\n $context = $this->_helper->ajaxContext()->getCurrentContext();\n $request = $this->getRequest();\n if ($request->isPost()) {\n $this->view->status = \"error\";\n\n // get the search data\n $post = $request->getPost();\n\n // search for matching jobs\n //$this->view->categories = $this->Search->job($this->_getSubdomain(), $post['value']);\n $catJobAction = $this->Api->get('/jobs/search/',array('category'=>$post['value'],'perPage'=>'500'));\n $this->view->categories = $catJobAction['data']['results'];\n $this->view->status = \"success\";\n\n var_dump($catJobAction);\n\n echo 'catjobaction to left';\n\n }\n\n // redirect if not using the json context\n if ($context != 'json') {\n $this->_redirect('/');\n }\n }", "title": "" }, { "docid": "2aff62293c318564eda3d568b81bd3af", "score": "0.53233325", "text": "public function watch_list()\r\n {\r\n \t\ttry\r\n\t\t{\r\n\t\t\t$this->i_sub_menu_id\t=\t8;\r\n\t\t\t$this->data['breadcrumb'] = array('Watching Only'=>'');\t\r\n\t\t\t$this->data['pathtoclass']=$this->pathtoclass;\t\t\t\r\n\t\t\tob_start();\r\n\t\t\t$this->watch_list_pagination_ajax();\r\n\t\t\t$job_contents = ob_get_contents();\r\n\t\t\tob_end_clean();\r\n\t\t\t//var_dump($job_contents);exit;\r\n\t\t\t$this->data['job_contents'] = $job_contents;\r\n\t\t\t$this->render();\r\n\t\t}\r\n\t\tcatch(Exception $err_obj)\r\n\t\t{\r\n\t\t\tshow_error($err_obj->getMessage());\r\n\t\t}\t\r\n }", "title": "" }, { "docid": "4fd3266bc99b46cc7a81d6f74e890fed", "score": "0.5321689", "text": "function execute_request() {\n //\n //Trap errors so they they are reported by the remote server\n try {\n //\n $dbase = $this->driver->dbase;\n //\n //Retrieve the requests -- if any\n if (isset($this->arr['request'])) {\n //\n //Yes, there are requests\n $request = $this->arr['request'];\n //\n switch ($request) {\n //\n //Echo to android all the defind jobs\n case \"getjobs\":\n //\n //Retrieve the sql;\n $stmt = $dbase->query(\"\n select\n job.name,\n job.dbname\n from\n job\n \");\n //\n //\n $jresult = $stmt->fetchAll();\n\n //\n $fresult = json_encode($jresult);\n //\n echo $fresult;\n break;\n default:\n die(\"Invalid request $request\");\n }\n } else {\n header(\"location:home.php\");\n }\n } catch (Exception $ex) {\n echo $this->get_error($ex);\n }\n }", "title": "" }, { "docid": "43acd98ec408cbc0a64cfff9e1f2f767", "score": "0.53151286", "text": "function _wc_cs_get_queue( $name ) {\n\tif ( ! _wc_cs_is_queue_available( $name ) ) {\n\t\treturn false ;\n\t}\n\n\treturn _wc_cs()->queue[ $name ] ;\n}", "title": "" }, { "docid": "a6d58648a9b82dc8ab29b0d1975aed23", "score": "0.5305958", "text": "public function actionQueue($id) {\n $questions = $this->queue($id);\n echo $this->json('questions', $questions['questions'], \n 'id, suite_id, student_id, staff_id, title, question, anonymous, ask_timestamp, state, labels, student', \n true);\n exit;\n }", "title": "" }, { "docid": "dfbcb0a7878649908528cc802113b0f2", "score": "0.53033924", "text": "public function ajaxFilter()\n\t{\n\t\t$settings = ee('Encrypt')->decode(\n\t\t\tee('Request')->get('settings'),\n\t\t\tee()->config->item('session_crypt_key')\n\t\t);\n\t\t$settings = json_decode($settings, TRUE);\n\n\t\tif (empty($settings))\n\t\t{\n\t\t\tshow_error(lang('unauthorized_access'), 403);\n\t\t}\n\n\t\t$settings['search'] = ee('Request')->get('search');\n\t\t$settings['channel_id'] = ee('Request')->get('channel_id');\n\t\t$settings['related'] = ee('Request')->get('related');\n\t\t$settings['selected'] = ee('Request')->get('selected');\n\n\t\tif ( ! AJAX_REQUEST OR ! ee()->session->userdata('member_id'))\n\t\t{\n\t\t\tshow_error(lang('unauthorized_access'), 403);\n\t\t}\n\n\t\t$response = array();\n\t\tforeach ($this->query($settings) as $entry)\n\t\t{\n\t\t\t$response[] = [\n\t\t\t\t'value' => $entry->getId(),\n\t\t\t\t'label' => $entry->title,\n\t\t\t\t'instructions' => $entry->Channel->channel_title\n\t\t\t];\n\t\t}\n\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "0ab5c5320593ad9e7965f52c6a0c5b60", "score": "0.5302733", "text": "function printQueue()\n{\n\techo $GLOBALS['queue'];\n}", "title": "" }, { "docid": "2801fba5b0d1fe3e09661d29e8bfb66b", "score": "0.5289973", "text": "public function processQueue()\r\n {\r\n\r\n $apiModel = Mage::getModel('transactionalemail/api');\r\n $queueModel = Mage::getModel('transactionalemail/queue')->getCollection()\r\n ->addFieldToFilter('send_status', $apiModel::SEND_STATUS_FAILED)\r\n ->setPageSize($this->pageSize);\r\n $pages = $queueModel->getLastPageNumber();\r\n $sql = $queueModel->getSelect();\r\n\r\n for ($curPage = 1; $curPage <= $pages; $curPage++) {\r\n\r\n $queueModel->setCurPage($curPage);\r\n $queueModel->load();\r\n if ($queueModel->count() == 0) {\r\n break 1;\r\n }\r\n foreach ($queueModel as $key => $value) {\r\n $apiModel->resendMail($value);\r\n }\r\n $queueModel->clear();\r\n }\r\n\r\n }", "title": "" }, { "docid": "a31b0517e1fb9bfc4b76a048041928fc", "score": "0.52750057", "text": "abstract public function getAJAXMarkup();", "title": "" }, { "docid": "174c74484b9d7cd165001d835cd2edf7", "score": "0.52585864", "text": "public function get_request()\r\n\t{\r\n\t}", "title": "" }, { "docid": "388bd6f73ea2835b499a23bebbbceac0", "score": "0.52444685", "text": "public function ajax_chat(){\r\n $id = $_GET['id']; \r\n $messages = Messages::ajax_chat($id); \r\n echo JSON_encode($messages); \r\n }", "title": "" }, { "docid": "02301620e745f1381b727e9a66bebc33", "score": "0.5238428", "text": "public function ajaxstoptimeregAction() {\n $request = $this->getRequest();\n $post = $request->getPost();\n $id = (int) $post['id'];\n $timereg = $this->getTimeregmapper()->find(array('timeregid' => $id));\n if (!$timereg) {\n //Redirect \n return $this->redirect()->toRoute('mytask');\n }\n $timereg->setTimestop(new DateTime());\n $this->getEntityManager()->persist($timereg);\n $this->getEntityManager()->flush();\n $result['status'] = true;\n return new JsonModel($result);\n }", "title": "" }, { "docid": "cd7ac78d085598ad5b890fedaf7ee8f2", "score": "0.5225899", "text": "public function enqueue($data);", "title": "" }, { "docid": "f0f6b5d3c5a73b3803b78aa0ea204e65", "score": "0.5220417", "text": "function refreshWishCart_get()\n\t{\n\t\t$data = array();\n\t\t$data[ getSysConfig( \"rest_response_field_name\" ) ] = cmn_vw_getrefreshWishCart( );\n\t\t\t\n\t\t$data[ getSysConfig( \"rest_status_field_name\" ) ] = \"success\";\n\t\t$data[ getSysConfig( \"rest_message_field_name\" ) ] = \"\";\n\t\t$this->response( $data, 200 );\n\t}", "title": "" }, { "docid": "511349b99fb8d2ee4a52c915bf6ae812", "score": "0.52117366", "text": "function getOneTask($TKId){\r\n $data1 = array(\r\n 'jsonrpc'=>'2.0',\r\n 'method'=>'getTask',\r\n 'id'=>1,\r\n 'params'=>array('task_id'=>$TKId)\r\n );\r\n $results = askKB($data1);\r\n //print_r($results) ;\r\n return $results;\r\n}", "title": "" }, { "docid": "c40e935174984d54d6eceb8b0e3661e5", "score": "0.5208874", "text": "public function Read()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$pk = $this->GetRouter()->GetUrlParam('id');\n\t\t\t$safworker = $this->Phreezer->Get('SafWorker',$pk);\n\t\t\t$this->RenderJSON($safworker, $this->JSONPCallback(), true, $this->SimpleObjectParams());\n\t\t}\n\t\tcatch (Exception $ex)\n\t\t{\n\t\t\t$this->RenderExceptionJSON($ex);\n\t\t}\n\t}", "title": "" }, { "docid": "a4e8a624bf459737bd6afce387ed8079", "score": "0.5208665", "text": "public function indexAction() \n\t\t{\n\t\t\t$this->requireValidUser();\n\n\t\t\t$this->_smarty->assign('klanten', $this->getQueueItems());\n\t\t\t$this->_smarty->display('index.tpl');\n\t\t}", "title": "" }, { "docid": "d20490f662d73324068a3fce2a6a459f", "score": "0.52067256", "text": "function qrs_get()\n { \n\t $allowed_params=array('userid','hardware_id','format','X-API-KEY');\n\t\t\n\t\tif(count(array_diff(array_keys($this->_get_args),$allowed_params))>0){\n\t\t\t $this->response(array('error' => 'Invalid Request'), 400);exit;\n\t\t} \n\t\t$param=array( \t\t\t\n\t\t\t'uid'=>(int)$this->get('userid'),\n\t\t\t'hwid'=>$this->get('hardware_id')\n\t\t);\n\t\t$this->__output_qrs($param);\n\t\t \n }", "title": "" }, { "docid": "f9c4389f294a9304ea979e015b44c263", "score": "0.5201764", "text": "function ajaxGetJobs($categoryId,$cityId,$adId)\r\n { \r\n \t\r\n\t$this->autoRender = false;\r\n Configure::write('debug', 0);\t\r\n \t$resultSet= $this->Jobsnippet->getJobIDQuery($categoryId,$cityId);\r\n \r\n if(!empty($resultSet))\r\n {\r\n $resultArr= array();\r\n $tempAdSize = explode ( \"=\", $adId);\r\n \r\n \r\n\t$listingCount = $tempAdSize [1];\r\n\t\r\n\r\n\tif (is_array ( $resultSet ) && count ( $resultSet ) > $listingCount) { // select arandom number of jobs from the result set.\r\n\t\t\t\t\t$randResultSet = array_rand ( $resultSet, $listingCount );\r\n\t\t\t\t\r\n\t\t\t\t} elseif (is_array ( $resultSet ) && count ( $resultSet ) > 1) {\r\n\t\t\t\t\t$randResultSet = array_keys ( $resultSet );\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$randResultSet = '';\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (is_array ( $randResultSet ) && count ( $randResultSet ) > 0) {\r\n\t\t\t\t\r\n\t\t\t\t\tforeach ( $randResultSet as $key => $val ) {\r\n\t\t\t\t\t\t$tempArr = array ( );\r\n\t\t\t\t\t\t$results =$resultSet[$val];\r\n\t\t\t\t\t \r\n\t\t\t\t\t\tforeach($results as $result)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t$i=0;\r\n\t\t\t\t\t\t$tempVar = explode ( \" \", strip_tags($results[0]['job_title'] ));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (is_array ( $tempVar ) && count ( $tempVar ) > 0) {\r\n\t\t\t\t\t\t\t$countCheck = count ( $tempVar );\r\n\t\t\t\t\t\t\tfor($i = 0; $i < count ( $tempVar ); $i ++) {\r\n\t\t\t\t\t\t\t\t$countCheck += strlen ( $tempVar [$i] );\r\n\t\t\t\t\t\t\t\tif ($countCheck <= '38') {\r\n\t\t\t\t\t\t\t\t\t$tempArr [$i] = $tempVar [$i];\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$resultArr [$key] ['job_title'] = implode ( \" \", $tempArr );\r\n\t\t\t\t\t\t$resultArr [$key] ['job_listing_id'] = $results[0]['job_listing_id'];\r\n\t\t\t\t\t\t$resultArr [$key] ['simple_id'] = $results[0]['simple_id'];\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t$resultSet = $resultArr;\r\n\r\n }\r\n else\r\n {\r\n \t$resultSet[0][0]='';\r\n }\r\n $jsonArray = json_encode($resultSet); \r\n \r\n echo $jsonArray; \r\n\r\n \r\n }", "title": "" }, { "docid": "22e4aa67a098f6fc9665fd066074a43a", "score": "0.5200584", "text": "public function actionSendToQueue() {\n // make sure id is given\n if (!isset($_POST['id'])) {\n echo json_encode(array('success' => false));\n exit;\n }\n\n // update state of question\n $id = $_POST['id'];\n $question = Question::model()->findByPk($id);\n $question->action_timestamp = date('Y-m-d H:i:s');\n $question->state = self::STATE_IN_QUEUE;\n\n // persist question\n if (!$question->save()) {\n echo json_encode(array('success' => false));\n exit;\n }\n\n // notify live server so student gets update and push server so ipad gets update\n $this->notifyLive(\"questions/toQueue/{$question->suite_id}/$id\");\n $this->notifyPad('queue_suite_id_' . $question->suite_id, '\"alert\":\"New Question!\",\"type\":\"refresh\"');\n\n // invalidate cache since a new question has been added\n //$this->memcache->delete(\"queue?suite_id={$question->suite_id}\");\n\n echo json_encode(array('success' => true));\n exit;\n }", "title": "" }, { "docid": "518140b42b0bb8e863375f92b2a98481", "score": "0.5199069", "text": "public function cron_job_list_get()\n\t{\n\t\tlog_message('debug', 'Setting/cron_job_list_get');\n\t\tlog_message('debug', 'Setting/cron_job_list_get:: [1] phrase='.(!empty($this->get('phrase'))? $this->get('phrase'): ''));\n\t\t\n\t\t$result = $this->_setting->cron_jobs(\n\t\t\t(!empty($this->get('offset'))? $this->get('offset'): '0'),\n\t\t\t(!empty($this->get('limit'))? $this->get('limit'): NUM_OF_ROWS_PER_PAGE),\n\t\t\t(!empty($this->get('phrase'))? $this->get('phrase'): '')\n\t\t);\n\t\t\n\t\tlog_message('debug', 'Setting/cron_job_list_get:: [2] result='.json_encode($result));\n\t\t$this->response($result);\n\t}", "title": "" }, { "docid": "a375c3a1fc5433ca1239b42657834ae4", "score": "0.5198578", "text": "function getQueue() {\n global $link;\n global $userid;\n $sql = \"SELECT COUNT(*) FROM tb_queue_track\" ;\n \t\t \n $rs = mysqli_query($link, $sql);\n $result = mysqli_fetch_array($rs);\n return $result[0];\n}", "title": "" }, { "docid": "14bbaa34ed52b27eed5e9dbe074e33eb", "score": "0.51933306", "text": "public function enqueue() {\n }", "title": "" }, { "docid": "0f74b683dc7ee13e7c69cfcf5d875e5c", "score": "0.5183881", "text": "public function get(){\n $this->layout = 'ajax';\n $content = ':(';\n \n $params = $this->parseGetParamsWithId($this->params);\n if(!empty($params)){\n extract($params);\n \n // lookup the WikiPage or fetch it\n $wikiElement = $this->WikiElement->getElement($title, $elementId);\n if(!empty($wikiElement)){\n // prepare the WikiElement for being delivered \n $content = $wikiElement['WikiElement']['content'];\n }else{\n $content .= ' Das Element mit der ID \"'\n .$elementId\n .'\" wurde innerhalb der Wikiseite nicht gefunden.'\n ;\n }\n }else{\n $content = 'Der Aufruf schlug aufgrund fehlerhafter Eingaben fehl.';\n }\n $this->set('content', $content);\n }", "title": "" }, { "docid": "206de12efd63ccfa86beef113defbf3a", "score": "0.51756763", "text": "private function _getAjaxJobSearchResult()\n {\n if(getValue('do_search', 0))\n $sSearchId = manageSearchHistory($this->csUid, CONST_TA_TYPE_JOB, true);\n else\n {\n if(getValue('searchId'))\n $sSearchId = manageSearchHistory($this->csUid, CONST_TA_TYPE_JOB);\n else\n $sSearchId = reloadLastSearch($this->csUid, CONST_TA_TYPE_JOB);\n }\n\n //Populate the sidebar things\n\n $avResult = $this->_getJobSearchResult('', $sSearchId);\n\n if(empty($avResult) || empty($avResult['nNbResult']) || empty($avResult['oData']))\n {\n $oHTML = CDependency::getComponentByName('display');\n $sMessage = $this->_getSearchMessage($avResult['nNbResult']);\n return array('data' => $oHTML->getBlocMessage($this->casText['TALENT_NO_RESULT']/*.' || '.$avResult['sQuery']*/));\n }\n\n //in ajax, the dummy form should always be hidden\n $sData = $this->_getJobResultList($avResult, $sSearchId, false);\n\n if(empty($sData) || $sData == 'null' || $sData == null)\n return array('data' => $this->casText['TALENT_SORRY_ERROR'], 'action' => '$(\\'.searchTitle\\').html(\\''.addslashes($sMessage).'\\'); searchTitle(\\'\\', false, false); $(\\'body\\').scrollTop();');\n\n $sMessage = $this->_getSearchMessage($avResult['nNbResult'], true);\n $sData = CEncoding::toUTF8($sData);\n\n return array('data' => $sData, 'action' => '$(\\'.searchTitle\\').html(\\''.addslashes($sMessage).'\\'); searchTitle(\\'\\', false, true); $(\\'body\\').scrollTop();');\n }", "title": "" }, { "docid": "27bc139835ee6604cbb4d1c72fcfa472", "score": "0.51743966", "text": "public static function get()\n {\n if ($_SERVER['REQUEST_METHOD'] == 'GET') {\n self::json();\n }\n }", "title": "" }, { "docid": "c016fb0af86adf58319ee06748e71bb4", "score": "0.5173458", "text": "protected function returnAjaxContent()\n {\n $result=\"KO!\".l10n('g002_error_invalid_ajax_call');\n switch($_REQUEST[GPC_AJAX])\n {\n case 'admin.links.get':\n $result=$this->ajax_amm_admin_linksGet($_REQUEST['id']);\n break;\n case 'admin.links.set':\n $result=$this->ajax_amm_admin_linksSet($_REQUEST['id'],$_REQUEST['datas']['label'],$_REQUEST['datas']['url'],$_REQUEST['datas']['mode'],$_REQUEST['datas']['icon'],$_REQUEST['datas']['visible'],$_REQUEST['datas']['accessUsers'],$_REQUEST['datas']['accessGroups']);\n break;\n case 'admin.links.list':\n $result=$this->ajax_amm_admin_linksList();\n break;\n case 'admin.links.order':\n $result=$this->ajax_amm_admin_linksOrder($_REQUEST['datas']['links']);\n break;\n case 'admin.links.delete':\n $result=$this->ajax_amm_admin_linksDelete($_REQUEST['id']);\n break;\n case 'admin.links.setConfig':\n $result=$this->ajax_amm_admin_linksSetConfig($_REQUEST['datas']);\n break;\n\n case 'admin.randomPict.setConfig':\n $result=$this->ajax_amm_admin_randomPictSetConfig($_REQUEST['datas']);\n break;\n\n case 'admin.blocks.get':\n $result=$this->ajax_amm_admin_blocksGet($_REQUEST['id']);\n break;\n case 'admin.blocks.set':\n $result=$this->ajax_amm_admin_blocksSet($_REQUEST['id'],$_REQUEST['datas']['visible'],$_REQUEST['datas']['nfo'],$_REQUEST['datas']['langs']);\n break;\n case 'admin.blocks.list':\n $result=$this->ajax_amm_admin_blocksList();\n break;\n case 'admin.blocks.delete':\n $result=$this->ajax_amm_admin_blocksDelete($_REQUEST['id']);\n break;\n\n case 'admin.coreBlocks.setConfig':\n $result=$this->ajax_amm_admin_coreBlocksSetConfig($_REQUEST['datas']['menuItems'], $_REQUEST['datas']['blocks']);\n break;\n\n case 'admin.album.setConfig':\n $result=$this->ajax_amm_admin_albumSetConfig($_REQUEST['datas']);\n break;\n }\n GPCAjax::returnResult($result);\n }", "title": "" }, { "docid": "96a858b994da249b169ccc7a29c7e530", "score": "0.516654", "text": "public function run()\n {\n Mage::getModel('msp_qapla/queue')->process();\n }", "title": "" }, { "docid": "cde96f9d0b47c5a8d0bb5790a54cad00", "score": "0.5165538", "text": "public function getAjaxEndPoint();", "title": "" }, { "docid": "97b1e9806e65ce5422e1235d26944c54", "score": "0.5163547", "text": "public function loadAjax($get) {\n\n\t\theader(\"Content-Types: application/json\");\n\t\t$keyword = GeneralUtils::handle_input($get['kw']);\n\t\t$keyword = $this->myDB->quote($keyword);\n\n\t\t$sql = \"SELECT distinct business_name\n\t\t\t\tFROM `local_businesses` lb\n\t\t\t\tWHERE lb.business_name like '$keyword%'\n\t\t\t\t OR lb.business_name REGEXP '[[:<:]]$keyword'\n\t\t\t\tLIMIT 0, {$get['limit']}\";\n\n\t\t$bus1_res = $this->myDB->query($sql);\n\t\t\n\t\t$cResults = array_merge($bus1_res);\t\t\n\t\t\n\t\techo \"{\\\"results\\\": [\";\n\t\t$arr = array();\n\t\tfor ($i=0;$i<count($cResults);$i++)\n\t\t{\n\t\t\t$arr[] = \"{\\\"id\\\": \\\"\".$cResults[$i]['business_name'].\"\\\", \\\"value\\\": \\\"\".$cResults[$i]['business_name'].\"\\\", \\\"info\\\": \\\"\\\"}\";\n\t\t}\n\t\techo implode(\", \", $arr);\n\t\techo \"]}\";\n\n\t\t// return $retArray;\n\n\t}", "title": "" }, { "docid": "b86ab327acd0960bd98dbc0aad064d77", "score": "0.5157494", "text": "public function liveSearchAction()\n {\n if (isset($_POST['q'])) {\n\n $query = $_POST['q'];\n\n $result = $this->prepareResult($query);\n\n if (!empty($result)) {\n echo json_encode($result);\n }\n }\n }", "title": "" }, { "docid": "36f19f51e10f76b25d47eaa59365c205", "score": "0.51497656", "text": "private function listen(){\n\n\n\t\t\tadd_action( 'wp_ajax_fetchPostList', function(){\n\n\t\t\t\t$this->setPostGlobal();\n\n\t\t\t\t//query caching\n\t\t\t\tglobal $relatedPostList;\n\t\t\t\tglobal $post;\n\n\t\t\t\tif( !isset( $relatedPostList ) ){\n\t\t\t\t\t\n\t\t\t\t\t$post_types = Settings::relatedPostTypes();\n\t\t\t\t\t$query = new WP_Query( \n\t\t\t\t\t\tarray( \n\t\t\t\t\t\t\t'post_type' => $post_types, \n\t\t\t\t\t\t\t'posts_per_page' => -1, \n\t\t\t\t\t\t\t'post__not_in'=> array( $post->ID ),\n\t\t\t\t\t\t\t'post_status' => 'publish'\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\n\t\t\t\t\t$GLOBALS['relatedPostList'] = $query->posts;\n\t\t\t\t\t$return = $query->posts;\t\t\t\t\n\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t$return = $relatedPostList;\n\t\t\t\t\n\t\t\t\t}\n\n\n\t\t\t\t//return the post-list\n\t\t\t\techo json_encode( $return );\n\t\t\t\tdie();\n\n\t\t\t});\n\n\t\t}", "title": "" }, { "docid": "a1510a4d159da33e940d147a0887c463", "score": "0.5146694", "text": "public function ajax() \r\n {\r\n if(!JSession::checkToken('get')) {\r\n echo new JResponseJson(null, JText::_('JINVALID_TOKEN'), true);\r\n }\r\n else {\r\n parent::display();\r\n }\r\n }", "title": "" } ]
1eaec2b18ea28208eb8ae59cd42a74c0
Method returning the class name
[ { "docid": "fd5a3e667575567526859490cb453cb0", "score": "0.0", "text": "public function __toString()\n {\n return __CLASS__;\n }", "title": "" } ]
[ { "docid": "4d8924e94a8a2d564512afb30b05a3c2", "score": "0.88969415", "text": "public function getClassname()\n {\n return get_class();\n }", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.87522393", "text": "public function getClassName();", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.87522393", "text": "public function getClassName();", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.87522393", "text": "public function getClassName();", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.87522393", "text": "public function getClassName();", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.87522393", "text": "public function getClassName();", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.87522393", "text": "public function getClassName();", "title": "" }, { "docid": "dd0e79d6f93b4f82af290c2713a13b1c", "score": "0.87115014", "text": "public final function getClassname(){\n $reflection = new \\ReflectionClass(get_called_class());\n return $reflection->getShortName();\n }", "title": "" }, { "docid": "10e29d4a39768c4d53d8ac0a04521807", "score": "0.86875963", "text": "public function getClassName() : string\n {\n return $this->class;\n }", "title": "" }, { "docid": "da6d1ae8c871d202d2d6398d1741b7b9", "score": "0.86866045", "text": "public static function getClassName();", "title": "" }, { "docid": "99d7c3aba4181d4c9c814f6b474a3b5a", "score": "0.8659823", "text": "protected abstract function getClassname();", "title": "" }, { "docid": "ad8caa700498859e1a4d7c1bbd635a1c", "score": "0.85842776", "text": "public static function className(): string\n\t{\n\t\treturn get_called_class();\n\t}", "title": "" }, { "docid": "c8d9fb0fcd1629aac26d37ad4aaf83c8", "score": "0.8555002", "text": "public static function getClassName()\n {\n return get_called_class();\n }", "title": "" }, { "docid": "73b6de012e4c14d5e2c8e59cf7e03926", "score": "0.8538814", "text": "public function getClassName()\n {\n return substr(strrchr(static::getClass(), '\\\\'), 1);\n }", "title": "" }, { "docid": "d2a8215bf40685266c440d74fc8969d1", "score": "0.85379285", "text": "public function getClassName()\n {\n return $this->class_name;\n }", "title": "" }, { "docid": "ea96e7453aaa35be13879efdef4d6c40", "score": "0.8533183", "text": "public function getName()\n {\n return __CLASS__;\n }", "title": "" }, { "docid": "9655cfa1e1db3fb165cab725fcaa8ae7", "score": "0.85237026", "text": "public function getClassName()\n {\n return $this->class_name;\n }", "title": "" }, { "docid": "2e7c157208ac60434adec93f27e49ee6", "score": "0.85218894", "text": "final public static function className()\n\t{\n\t\treturn get_called_class();\n\t}", "title": "" }, { "docid": "df5aa21d7debb7e57d4e545cb1c7de10", "score": "0.85109025", "text": "protected static function _getClassName()\n {\n return __CLASS__;\n }", "title": "" }, { "docid": "08bfd1cbe8c2e656c32423fd85d0227e", "score": "0.84847426", "text": "public function getClass()\n {\n $str = get_class($this);\n $name = substr(strrchr($str,'\\\\'),1);\n return $name;\n }", "title": "" }, { "docid": "b86eaf4f8de400601154067466a7d203", "score": "0.8426421", "text": "public static function className()\n {\n return get_called_class();\n }", "title": "" }, { "docid": "b86eaf4f8de400601154067466a7d203", "score": "0.8426421", "text": "public static function className()\n {\n return get_called_class();\n }", "title": "" }, { "docid": "b86eaf4f8de400601154067466a7d203", "score": "0.8426421", "text": "public static function className()\n {\n return get_called_class();\n }", "title": "" }, { "docid": "3a65638bafaf45402e1f5ec25b32b851", "score": "0.84061223", "text": "public function get_class_name()\n {\n return $this->class_name;\n }", "title": "" }, { "docid": "07d414353dc731d150dbfeb21825201f", "score": "0.8399611", "text": "public static function getClassName() {\n return self::$className;\n }", "title": "" }, { "docid": "de976041cee68b13cde39b973ade81bd", "score": "0.83950585", "text": "public function getClassName(): string;", "title": "" }, { "docid": "22646fd24a9767f0a7e584d6e6541489", "score": "0.8378639", "text": "public static function className() {\n return get_called_class();\n }", "title": "" }, { "docid": "172c1bb7a83c7711fcc10aa580d93cfb", "score": "0.8377934", "text": "static function classname()\n {\n return __CLASS__;\n }", "title": "" }, { "docid": "07740a79716099e521cf78bf83935f5b", "score": "0.8355432", "text": "public function getClassName(): string\n {\n return $this->className;\n }", "title": "" }, { "docid": "ccd2a56b05cf16cda769235dbe2ad3d8", "score": "0.8325877", "text": "public function getName()\n\t{\n\t\treturn substr(__CLASS__, 7);\n\t}", "title": "" }, { "docid": "4bcaaa19a9ecd70fcb10f85ea52b5498", "score": "0.8319285", "text": "public function getName()\n {\n $className = get_called_class();\n\n return preg_replace('/[^\\w]/', '', $className);\n }", "title": "" }, { "docid": "c9e898430c810c37c50f12ead9c9bc20", "score": "0.8311007", "text": "public function getClassName() {\r\n\t\treturn $this->className; \r\n\t}", "title": "" }, { "docid": "5db04ca9ba5ad87ba4f32c170b97753c", "score": "0.8287596", "text": "public function getClassName()\n {\n return $this->name;\n }", "title": "" }, { "docid": "e5ccaecbf49dfc3f1cba6fb7ef9d360b", "score": "0.8272631", "text": "public function getClassName()\n {\n return $this->className;\n }", "title": "" }, { "docid": "e5ccaecbf49dfc3f1cba6fb7ef9d360b", "score": "0.8272631", "text": "public function getClassName()\n {\n return $this->className;\n }", "title": "" }, { "docid": "e5ccaecbf49dfc3f1cba6fb7ef9d360b", "score": "0.8272631", "text": "public function getClassName()\n {\n return $this->className;\n }", "title": "" }, { "docid": "e5ccaecbf49dfc3f1cba6fb7ef9d360b", "score": "0.8272631", "text": "public function getClassName()\n {\n return $this->className;\n }", "title": "" }, { "docid": "dcaa502da1b781beb62aae18ab31a04c", "score": "0.82588613", "text": "public function getName(): string\n {\n return get_called_class();\n }", "title": "" }, { "docid": "3f45084730a27b0b1327f9ffe82f66de", "score": "0.82481456", "text": "public function getClassName()\n {\n return $this->className;\n }", "title": "" }, { "docid": "c9a1b5a8b9ba2aef4ea88d98f38c96ee", "score": "0.82474744", "text": "public static function staticGetClassName()\n {\n return __CLASS__;\n }", "title": "" }, { "docid": "e1a263835209aa278160c040fa8125ff", "score": "0.8242934", "text": "public function getClassName() {\n return $this->className;\n }", "title": "" }, { "docid": "3b2743e628ae7853910519e5bf28ee20", "score": "0.82406235", "text": "function getClassName() {\n if ($this->_className == '')\n return get_class($this);\n else\n return $this->_className;\n }", "title": "" }, { "docid": "882d8e42dc92dba29a73aeebb6a460b4", "score": "0.8216719", "text": "public function getClassName()\n {\n trigger_error('Not implemented', E_WARNING);\n\n return '';\n }", "title": "" }, { "docid": "49df58ef0b6394657411dc8662f77ba1", "score": "0.81829107", "text": "public function getClassName() {\n return $this->className;\n }", "title": "" }, { "docid": "6905ea1addccb5d80dda7f383a36451a", "score": "0.8171297", "text": "protected abstract function getClassName(): string;", "title": "" }, { "docid": "1745ebde105a5b2fe47747bbf39bef5d", "score": "0.8168239", "text": "public function getClassName()\n {\n return (new ReflectionClass($this))->getShortName();\n }", "title": "" }, { "docid": "ca622bd6f0493d485bea0e7e4f9d5071", "score": "0.8165575", "text": "protected static function getClassName() {\n\t\t$reflector = new ReflectionClass(static::class);\n\t\treturn $reflector->getShortName();\n\t}", "title": "" }, { "docid": "798697eb217048d0bb1502591d289316", "score": "0.8165239", "text": "public function getClassName()\n {\n $cNamespaceInfo = (array)explode('\\\\', get_called_class());\n return end($cNamespaceInfo);\n }", "title": "" }, { "docid": "9270bfbb19a87094508d3abe1b37d90b", "score": "0.8163649", "text": "public static function className()\n {\n $x = explode('\\\\', get_called_class());\n return end($x);\n }", "title": "" }, { "docid": "76ce6e81d7dfbc91e0f3a03def0e0144", "score": "0.8162077", "text": "public function getClassName()\n\t{\n\t\treturn $this->get('ClassRef FullName');\n\t}", "title": "" }, { "docid": "cfc58e61e706b7891eba32a3fb175797", "score": "0.81329787", "text": "public function className();", "title": "" }, { "docid": "8a09352d9e005be82ef85731d32b56da", "score": "0.8113556", "text": "public static function getClassName()\n {\n return strtolower(array_slice(explode('\\\\', static::class), -1, 1)[0]);\n }", "title": "" }, { "docid": "add7a5345805902bb99cfe5b9ad762b2", "score": "0.80781406", "text": "public function getClassName()\n {\n return stubClassLoader::getFullQualifiedClassName(get_class($this));\n }", "title": "" }, { "docid": "3a540ff98da957fcb0afe8b3362505ec", "score": "0.80777436", "text": "public function className() {\n return $this->reflection()->getName();\n }", "title": "" }, { "docid": "426c9ab0279350bc8424fa44230563eb", "score": "0.80437076", "text": "abstract public function getClassName(): string;", "title": "" }, { "docid": "426c9ab0279350bc8424fa44230563eb", "score": "0.80437076", "text": "abstract public function getClassName(): string;", "title": "" }, { "docid": "44e2f9297117fd9b39f0d727eb71be2c", "score": "0.8019706", "text": "protected static function className(): string\n\t{\n\t\t$reflection = new \\ReflectionClass(static::class);\n\t\treturn mb_strtoupper($reflection->getShortName());\n\t}", "title": "" }, { "docid": "7fbeb26a1f1659079c8551083b53ad94", "score": "0.8009729", "text": "public function getFullClassName()\n {\n return str_replace('\\\\', '', get_called_class());\n }", "title": "" }, { "docid": "f0b4a4c4f5e757fb7ccdddb0968d5957", "score": "0.800853", "text": "public function clazz_name() {\n\t\treturn $this->clazz;\n\t}", "title": "" }, { "docid": "d3ba9d40e288ed33c0e40deced7902cb", "score": "0.79779136", "text": "public function getClass(): string\n {\n return $this->class;\n }", "title": "" }, { "docid": "d3ba9d40e288ed33c0e40deced7902cb", "score": "0.79779136", "text": "public function getClass(): string\n {\n return $this->class;\n }", "title": "" }, { "docid": "9f1730fb3ffcf1683d20a243b9ddfac3", "score": "0.7963045", "text": "public function get_name() { return get_class($this); }", "title": "" }, { "docid": "84e6f495a10d62e9af944e8e2f32a66f", "score": "0.7958586", "text": "public function getName() {\n\t\treturn $this->className;\n\t}", "title": "" }, { "docid": "fee2d8e4baff3427d3afaf74efd7a999", "score": "0.7946468", "text": "abstract protected function getClassName(): string;", "title": "" }, { "docid": "28a0b37f876b3eb7eeeab54386d2fefe", "score": "0.7944759", "text": "public function name()\n {\n $className = class_basename($this);\n\n if (substr($className, -6) === 'Source') {\n $className = substr($className, 0, -6);\n }\n\n return Str::snake($className);\n }", "title": "" }, { "docid": "c6289f909aaaf4788a56bfc53c4aef56", "score": "0.7938708", "text": "public function type()\n\t{\n\t\t$className = get_class($this);\n\t\t$lastSlash = strrpos($className, '\\\\');\n\n\t\tif ($lastSlash)\n\t\t{\n\t\t\t$className = substr($className, $lastSlash + 1);\n\t\t}\n\n\t\treturn strtolower($className);\n\t}", "title": "" }, { "docid": "c55a4cd199f035f6bf933623c4fbc631", "score": "0.7933947", "text": "private function getClassName()\n {\n return (new \\ReflectionClass($this->model))->getShortName();\n }", "title": "" }, { "docid": "ffeba375d5c31ee356ad7ca8ea8b1bcc", "score": "0.79227084", "text": "public function getClass()\n {\n return $this->className;\n }", "title": "" }, { "docid": "0c0567826fca9232476d8b25b303b4e0", "score": "0.79061145", "text": "public function __getClass() : string {\n\t\t\treturn get_called_class();\n\t\t}", "title": "" }, { "docid": "1e28ddcad38c0e6501458bd7f898b89c", "score": "0.78627616", "text": "public function getClassName(): string\n {\n return $this->getWrapped()->{__FUNCTION__}(...func_get_args());\n }", "title": "" }, { "docid": "94bb6bdcb9775a2dfa4480a562dc6374", "score": "0.7858073", "text": "public function name()\n {\n $className = $this->generateClassName();\n\n if (!class_exists($className)) {\n eval($this->code());\n }\n\n return $className;\n }", "title": "" }, { "docid": "c222a795c707024158cd8e04550420cd", "score": "0.7847096", "text": "public static function className()\n\t{\n\t\treturn static::class;\n\t}", "title": "" }, { "docid": "18c484336de2fb419dfd1d3eae97ac54", "score": "0.78039825", "text": "function get_class_name(string $class): string {\n return (new ReflectionClass($class))->getShortName();\n}", "title": "" }, { "docid": "6d962e5db1099644a96a97143411fe18", "score": "0.7797785", "text": "protected function getClassName(){\n\n $modelClass = new ReflectionClass($this);\n\n return strtolower($modelClass->getShortName());\n }", "title": "" }, { "docid": "9121d42897939fbc75e361db85b04215", "score": "0.7793345", "text": "function getClass() {\n return $this->className;\n }", "title": "" }, { "docid": "b3769b5bbb5b6fabf79f15c5e7fc51ec", "score": "0.77821547", "text": "function getName()\n {\n return get_class($this);\n }", "title": "" }, { "docid": "0f1df7487a0505a621d674117677e492", "score": "0.7763269", "text": "private function pullClassName(): string\n {\n return $this->getClassNode()->getAttribute('name');\n }", "title": "" }, { "docid": "4e0c92befa06043241067b8744672557", "score": "0.7759661", "text": "protected static function _name($class) {\n\t\treturn basename(str_replace('\\\\', '/', $class));\n\t}", "title": "" }, { "docid": "de4c93afc00f3db7bdf12e623a2d4f45", "score": "0.7743512", "text": "public function getName()\n {\n return get_class($this);\n }", "title": "" }, { "docid": "8de47f63307e78f5c007d11b06bde44c", "score": "0.7697193", "text": "public function getType(): string\n {\n $fullClassName = get_called_class();\n $classNameParts = explode('\\\\', $fullClassName);\n\n // Return class name without namespace in it (if it's present)\n return isset($classNameParts[count($classNameParts) - 1])\n ? $classNameParts[count($classNameParts) - 1]\n : $fullClassName;\n }", "title": "" }, { "docid": "9e6cf5a0d77f191d01a10711faf5c735", "score": "0.7689811", "text": "public function getName()\n\t{\n\t\treturn get_class($this);\n\t}", "title": "" }, { "docid": "9e6cf5a0d77f191d01a10711faf5c735", "score": "0.7689811", "text": "public function getName()\n\t{\n\t\treturn get_class($this);\n\t}", "title": "" }, { "docid": "b0e9c936a79f12b9bbdac77dce0ef85f", "score": "0.7635929", "text": "public function getClassName(): string\n {\n return $this->namingStrategy->getBeanClassName($this->foreignKey->getForeignTableName());\n }", "title": "" }, { "docid": "a45174ac2abd363590b49021150b8906", "score": "0.7618463", "text": "public function getClass()\n {\n $nsClass = get_class($this);\n\n $class = substr($nsClass, strrpos($nsClass, \"\\\\\") + 1);\n\n return $class;\n }", "title": "" }, { "docid": "9c5e3c60f4f0f2fda992e10058fd1c00", "score": "0.7615602", "text": "public static function getClassName( $class ){\n\t\tif( ARMValidation::isString($class) )\n\t\t\treturn $class;\n\n\t\t$ref = new ReflectionClass($class);\n\t\treturn $ref->getName() ;\n\t}", "title": "" }, { "docid": "bfd7ec16eaec50ea25c73cebdfa1bd5c", "score": "0.7574121", "text": "public function getAMFClassName();", "title": "" }, { "docid": "fa038fbf02ccd696b9fc96eafe79ceae", "score": "0.75686836", "text": "protected function getClassNamePlaceHolder(): string\n {\n return \"{class}\";\n }", "title": "" }, { "docid": "dfd87a71f4624d433eea51a4c814740f", "score": "0.7551047", "text": "public function getClass(){\r\n\t\treturn __CLASS__;\r\n\t}", "title": "" }, { "docid": "154b5109c5d79b53e4e68e3d0f24670e", "score": "0.75481105", "text": "public function getClassName()\n {\n return get_class($this->product);\n }", "title": "" }, { "docid": "7c9fdf07acee5346dea1e5a98086e3f5", "score": "0.75438213", "text": "public function getClass()\n {\n return substr(strrchr($this->type, '\\\\'), 1);\n }", "title": "" }, { "docid": "0bfec24a538c0a0ce2d836ec1ae3221e", "score": "0.7542496", "text": "public function type()\n {\n return __CLASS__;\n }", "title": "" }, { "docid": "c5a6f6ade32ad01eb4d051c551543707", "score": "0.7535508", "text": "function __toString()\n {\n return __CLASS__;\n }", "title": "" }, { "docid": "179a96c1151cad893387a31fde816d3c", "score": "0.7524607", "text": "public static function label()\n {\n return Str::singular(class_basename(get_called_class()));\n }", "title": "" }, { "docid": "179a96c1151cad893387a31fde816d3c", "score": "0.7524607", "text": "public static function label()\n {\n return Str::singular(class_basename(get_called_class()));\n }", "title": "" }, { "docid": "8aa0855d070ad6f41676499ddce49a55", "score": "0.7522257", "text": "public function get_class($class);", "title": "" }, { "docid": "5c064a70e99cd762fd68045011e5bd8d", "score": "0.7516233", "text": "public function getBaseClassName()\n {\n $className = get_class($this);\n $nameSpaces = Core_Model_Loader::getNameSpaces();\n $parts = explode('_', $className);\n\n foreach ($nameSpaces as $nameSpace) {\n if ($parts[0] === $nameSpace) {\n unset($parts[0]);\n break;\n }\n }\n\n return implode('_', $parts);\n }", "title": "" }, { "docid": "00e283ea16e0775e190e0a1de75c7448", "score": "0.7513838", "text": "public function getName()\n {\n return str_replace(\"\\\\\", \"_\", get_class($this));\n }", "title": "" }, { "docid": "704b3bcef2ef98e37feeec6a456b56d6", "score": "0.7494619", "text": "protected function getFileName(): string\n {\n return $this->getClassName() . \".php\";\n }", "title": "" }, { "docid": "e516cf64af508b729275a1fbf3b62828", "score": "0.749133", "text": "public function getClassName()\n\t\t\t\t{\n\t\t\t\t\t\treturn get_class($this->product);\n\t\t\t\t}", "title": "" }, { "docid": "274f8d9c450f6d60e26c405e5c78c379", "score": "0.74821234", "text": "public function getCamelCaseName()\n {\n $class_name = get_class($this);\n $class_name = substr($class_name, 0, -4);\n \n return $class_name;\n }", "title": "" }, { "docid": "ab03b8d5174486f7a07ae7f99df226a9", "score": "0.7474512", "text": "public function __toString()\n {\n return __CLASS__;\n }", "title": "" } ]
28e84471a9c14245972519e632c00d09
/ Function Header Function Name : ActivateLink Function Type : call by value Functionality : Input: nothing Output: Return Value : nothing Note: nothing
[ { "docid": "ee78f930eb243d09fd53fa916730b0d7", "score": "0.6429248", "text": "function ActivateLink() {\n\t\t\t global $_CONF;\n\t\t\t \n\t\t\t $id= $_REQUEST['id'];\n\t\t\t $oEmployer=$this->oModel->CheckActivation($id);\n\t\t\t \n\t\t\t if($oEmployer) {\n\t\t\t\t \n\t\t\t\t//$err= \"This Employer account has been already Activated.\";\n\t\t\t\t//$this->oView->search_field \t= $_REQUEST['search_field'];\n\t\t\t\t//$this->oView->search_text \t= $_REQUEST['search_text'];\n\t\t\t\t\n\t\t\t\t//$this->ListEmployers($err);\n\t\t\t\techo \"<script>location.href='index.php?stage=employer&mode=ListEmployers&msg=2&search_text=$_REQUEST[search_text]&search_field=$_REQUEST[search_field]'</script>\";\n\t\t\t\t\n\t\t\t } else {\n\t\t\t\t\n\t\t\t\t$oEmployer=$this->oModel->getEmployerDetails($id);\n\t\t\t\t$rs=$this->oModel->MakeActivation($id);\n\t\t\t\t\n\t\t\t\tif($rs) {\n\t\t\t\t\t\n\t\t\t\t\t//$err= \"This Employer account has been Successfully Activated.\";\n\t\t\t\t\t//$this->oView->search_field \t= $_REQUEST['search_field'];\n\t\t\t\t // $this->oView->search_text \t= $_REQUEST['search_text'];\n\t\t\t\t\n\t\t\t\t\t//$this->ListEmployers($err);\n\t\t\t\t\techo \"<script>location.href='index.php?stage=employer&mode=ListEmployers&msg=3&search_text=$_REQUEST[search_text]&search_field=$_REQUEST[search_field]'</script>\";\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\t\t\techo \"<script>location.href='index.php?stage=employer&mode=ListEmployers'</script>\";\n\t\t\t }\n\t\t}", "title": "" } ]
[ { "docid": "2c97800a80b21542ab00aa501c42855d", "score": "0.6445005", "text": "public function link();", "title": "" }, { "docid": "2c97800a80b21542ab00aa501c42855d", "score": "0.6445005", "text": "public function link();", "title": "" }, { "docid": "16306ce4d9190e72c3484a71632c7d3c", "score": "0.62410027", "text": "public function getLinkCreate();", "title": "" }, { "docid": "1c7e14e5a653646230b2060a4a40a127", "score": "0.6059799", "text": "function link ($target, $link) {}", "title": "" }, { "docid": "0189fadd5f3e1a8d3a376f54bf649de2", "score": "0.58189714", "text": "Function createhyperlink($sheet=\"Hoja1\",$cell,$hyperl)\n{\nprint \"<br>link = $hyperl <br>\";\n$sheets = $this->ex->Application->Worksheets($sheet);\n$sheets->activate;\n#Select the cell\n$selcell = $sheets->Range($cell);\n$sheets->hyperlinks->add($selcell,$hyperl);\n\nreturn 1;\n}", "title": "" }, { "docid": "2d993600bfc0fd064a057ae2795e23a4", "score": "0.58073026", "text": "function callLinkFunction( $name ) {\n\t\tif ( JET_GRIND_RADIO === $name ) {\n\t\t\tlinks_JGR();\n\t\t} else if ( PHANTASY_STAR_ONLINE_V1 === $name ) {\n\t\t\tlinks_PSO();\n\t\t} else if ( PHANTASY_STAR_ONLINE_V2 === $name ) {\n\t\t\tlinks_PSO();\n\t\t} else if ( SHENMUE === $name ) {\n\t\t\tlinks_shenmue();\n\t\t} else if ( SONIC_ADVENTURE === $name ) {\n\t\t\tlinks_sa1();\n\t\t} else if ( SONIC_ADVENTURE_2 === $name ) {\n\t\t\tlinks_sa2();\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "1bd151a06c68116f20bfe693ea461016", "score": "0.5780958", "text": "private static function single_activate() {\n\t\t// @TODO: Define activation functionality here\n\t}", "title": "" }, { "docid": "2a8eb9fffa1f4d3c4c6cc2f919b2f4ff", "score": "0.57445604", "text": "abstract public function activate();", "title": "" }, { "docid": "9099b09aa8e646580c72572d4a6dd0ed", "score": "0.57286286", "text": "public function Activate()\n {\n }", "title": "" }, { "docid": "1e950960d34782bd5aa6a521454ae579", "score": "0.5726627", "text": "function activation_link($userObj) {\n $site_url=$_SERVER['HTTP_HOST'];\n $id = $userObj->id;\n $cookie = myhash(stripdate($userObj->created));\n $activation_link = \"http://$site_url/home/register.php?id=$id&cookie=$cookie\";\n return html_link($activation_link, phrase('activate', CAPITALIZE));\n}", "title": "" }, { "docid": "73efb3fe9a0db5098f57e2109382bd21", "score": "0.5685668", "text": "function Redirection($link)\n {\n\n }", "title": "" }, { "docid": "94a380b89abede9be7ccc9f1ec6acf10", "score": "0.5675571", "text": "function link( $args = '' ){\n\t\techo bpModFrontend::get_link( $args );\n\t}", "title": "" }, { "docid": "16f9a651901d6e398293e31ae3eecd24", "score": "0.5639243", "text": "public function getLink();", "title": "" }, { "docid": "5babaecd7a8406ee08f71c371064baf1", "score": "0.5636617", "text": "abstract function apiLink();", "title": "" }, { "docid": "4152f1906e98c28e261246e481e9eb77", "score": "0.5629611", "text": "public function activate(): void;", "title": "" }, { "docid": "cf691413dd693fde056b75c9ed45ca6a", "score": "0.5613005", "text": "public function activate();", "title": "" }, { "docid": "c900b12980d067489f45c23d7fbebc38", "score": "0.56023955", "text": "function activate()\n\t{\n\t}", "title": "" }, { "docid": "46898f0ae8829b95bb335601d4223829", "score": "0.55969286", "text": "public function activate() {\n /**\n * This hook is fired when RML gets activated.\n * \n \t * @hook RML/Activate\n \t */\n \tdo_action('RML/Activate');\n }", "title": "" }, { "docid": "f65fd92fdf130ee01a81bd24df8fb773", "score": "0.55954707", "text": "function activate(){\r\n\r\n\t}", "title": "" }, { "docid": "5579451b7720de915070d0e0c4e7445f", "score": "0.556512", "text": "public static function activate(){\r\n\r\n }", "title": "" }, { "docid": "2eecac63942b6df8229e3dfe565158d7", "score": "0.55548847", "text": "private function profile_handleLink($id, $mode) // links char with account\n {\n }", "title": "" }, { "docid": "1869ee4e84aad4600bfe587eac2ff8b8", "score": "0.5523493", "text": "function VC_creative_link()\n\t\t{\n\t\t\tif ( function_exists('vc_map'))\n\t\t\t{\n\t\t\t\tvc_map(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\"name\"\t\t=> __(\"Creative Link\", \"creative-link\"),\n\t\t\t\t\t\t\"base\"\t\t=> \"creativelink\",\n\t\t\t\t\t\t// \"custom_markup\" => \"creative-link\",\n\t\t\t\t\t\t\"icon\"\t\t=> \"vc_creative_link\",\n\t\t\t\t\t\t\"class\"\t => \"creative_link\",\n\t\t\t\t\t\t\"category\" => __('Creative links', \"creative-link\"),\n\t\t\t\t\t\t\"description\" => \"Adds attractive Link\",\n\t\t\t\t\t\t\"controls\" => \"full\",\n\t\t\t\t\t\t\"show_settings_on_create\" => true,\n\t\t\t\t\t\t\"params\" => array(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\" => \"textfield\",\n\t\t\t\t\t\t\t\t\"class\" => \"\",\n\t\t\t\t\t\t\t\t\"admin_label\" => true,\n\t\t\t\t\t\t\t\t\"heading\" => __(\"Title\", \"creative-link\"),\n\t\t\t\t\t\t\t\t\"param_name\" => \"title\",\n\t\t\t\t\t\t\t\t\"value\" => \"\",\n\t\t\t\t\t\t\t\t//\"description\" => __(\"Ran out of options? Need more styles? Write your own CSS and mention the class name here.\", \"creative-link\"),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\" => \"textfield\",\n\t\t\t\t\t\t\t\t\"class\" => \"\",\n\t\t\t\t\t\t\t\t\"admin_label\" => true,\n\t\t\t\t\t\t\t\t\"heading\" => __(\"Tag Line\", \"creative-link\"),\n\t\t\t\t\t\t\t\t\"param_name\" => \"tag_line\",\n\t\t\t\t\t\t\t\t\"value\" => \"\",\n\t\t\t\t\t\t\t\t//\"description\" => __(\"Ran out of options? Need more styles? Write your own CSS and mention the class name here.\", \"creative-link\"),\n\t\t\t\t\t\t\t\t\"dependency\" => Array(\"element\" => \"link_hover_style\",\"value\" => array(\"cl-effect-9\")),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t \t\tarray(\n\t\t\t\t\t\t\t\t\"type\" => \"vc_link\",\n\t\t\t\t\t\t\t\t\"class\" => \"\",\n\t\t\t\t\t\t\t\t\"heading\" => __(\"Link \",\"creative-link\"),\n\t\t\t\t\t\t\t\t\"param_name\" => \"btn_link\",\n\t\t\t\t\t\t\t\t\"value\" => \"\",\n\t\t\t\t\t\t\t\t\"description\" => __(\"Add a custom link or select existing page. You can remove existing link as well.\",\"creative-link\"),\n\t\t\t\t\t\t\t\t//\"group\" => \"Title Setting\",\n\n\t\t\t\t\t\t\t),\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/*-----------general------------*/\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\" => \"dropdown\",\n\t\t\t\t\t\t\t\t\"class\" => \"\",\n\t\t\t\t\t\t\t\t\"admin_label\" => true,\n\t\t\t\t\t\t\t\t\"heading\" => __(\"Link Style\", \"creative-link\"),\n\t\t\t\t\t\t\t\t\"param_name\" => \"link_hover_style\",\n\t\t\t\t\t\t\t\t\"value\" => array(\n\t\t\t\t\t\t\t\t\t\"None\"=> \"\",\n\t\t\t\t\t\t\t\t\t\"Style 1\"=> \"cl-effect-1\",\n\t\t\t\t\t\t\t\t\t\"Style 2\" => \"cl-effect-2\",\n\t\t\t\t\t\t\t\t\t\"Style 3\" => \"cl-effect-3\",\n\t\t\t\t\t\t\t\t\t\"Style 4\"=> \"cl-effect-4\",\n\t\t\t\t\t\t\t\t\t\"Style 5\" => \"cl-effect-5\",\n\t\t\t\t\t\t\t\t\t\"Style 6\" => \"cl-effect-6\",\n\t\t\t\t\t\t\t\t\t\"Style 7\" => \"cl-effect-7\",\n\t\t\t\t\t\t\t\t\t\"Style 8\" => \"cl-effect-8\",\n\t\t\t\t\t\t\t\t\t\"Style 9\" => \"cl-effect-9\",\n\t\t\t\t\t\t\t\t\t\"Style 10\" => \"cl-effect-10\",\n\t\t\t\t\t\t\t\t\t\"Style 11\"=> \"cl-effect-11\",\n\t\t\t\t\t\t\t\t\t\"Style 12\" => \"cl-effect-12\",\n\t\t\t\t\t\t\t\t\t\"Style 13\" => \"cl-effect-13\",\n\t\t\t\t\t\t\t\t\t\"Style 14\"=> \"cl-effect-14\",\n\t\t\t\t\t\t\t\t\t\"Style 15\" => \"cl-effect-15\",\n\t\t\t\t\t\t\t\t\t\"Style 16\" => \"cl-effect-16\",\n\t\t\t\t\t\t\t\t\t\"Style 17\" => \"cl-effect-17\",\n\t\t\t\t\t\t\t\t\t\"Style 18\" => \"cl-effect-18\",\n\t\t\t\t\t\t\t\t\t\"Style 19\" => \"cl-effect-19\",\n\t\t\t\t\t\t\t\t\t\"Style 20\" => \"cl-effect-20\",\n\t\t\t\t\t\t\t\t\t\"Style 21\" => \"cl-effect-21\",\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"description\" => __(\"Select the Hover style for Link.\",\"creative-link\"),\n\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\"type\" => \"ult_param_heading\",\n\t\t\t\t\t\t\t\t\t\"param_name\" => \"button1bg_settng\",\n\t\t\t\t\t\t\t\t\t\"text\" => __(\"Color Settings\", \"creative-link\"),\n\t\t\t\t\t\t\t\t\t\"value\" => \"\",\n\t\t\t\t\t\t\t\t\t\"class\" => \"\",\n\t\t\t\t\t\t\t\t\t'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12',\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\" => \"colorpicker\",\n\t\t\t\t\t\t\t\t\"class\" => \"\",\n\t\t\t\t\t\t\t\t\"heading\" => __(\"Link Color\", \"creative-link\"),\n\t\t\t\t\t\t\t\t\"param_name\" => \"text_color\",\n\t\t\t\t\t\t\t\t\"value\" => \"#333333\",\n\t\t\t\t\t\t\t\t\"description\" => __(\"Select text color for Link.\", \"creative-link\"),\n\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\" => \"colorpicker\",\n\t\t\t\t\t\t\t\t\"class\" => \"\",\n\t\t\t\t\t\t\t\t\"heading\" => __(\"Link Hover Color\", \"creative-link\"),\n\t\t\t\t\t\t\t\t\"param_name\" => \"text_hovercolor\",\n\t\t\t\t\t\t\t\t\"value\" => \"#333333\",\n\t\t\t\t\t\t\t\t\"description\" => __(\"Select text hover color for Link.\", \"creative-link\"),\n\t\t\t\t\t\t\t\t//\"dependency\" => Array(\"element\" => \"link_hover_style\",\"not_empty\" => true),\n\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\" => \"colorpicker\",\n\t\t\t\t\t\t\t\t\"class\" => \"\",\n\t\t\t\t\t\t\t\t\"heading\" => __(\"Link Background Color\", \"creative-link\"),\n\t\t\t\t\t\t\t\t\"param_name\" => \"background_color\",\n\t\t\t\t\t\t\t\t\"value\" => \"#ffffff\",\n\t\t\t\t\t\t\t\t\"description\" => __(\"Select Background Color for link.\", \"creative-link\"),\n\t\t\t\t\t\t\t\t//\"group\" => \"Title Setting\",\n\t\t\t\t\t\t\t\t\"dependency\" => Array(\"element\" => \"link_hover_style\",\"value\" => array(\"cl-effect-2\",\"cl-effect-10\",\"cl-effect-19\",\"cl-effect-20\",\"Style_11\")),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\" => \"colorpicker\",\n\t\t\t\t\t\t\t\t\"class\" => \"\",\n\t\t\t\t\t\t\t\t\"heading\" => __(\"Link Background Hover Color\", \"creative-link\"),\n\t\t\t\t\t\t\t\t\"param_name\" => \"background_hover_color\",\n\t\t\t\t\t\t\t\t\"value\" => \"\",\n\t\t\t\t\t\t\t\t\"description\" => __(\"Select background hover color for link.\", \"creative-link\"),\n\t\t\t\t\t\t\t\t\"dependency\" => Array(\"element\" => \"link_hover_style\",\"value\" => array(\"cl-effect-2\",\"cl-effect-10\",\"cl-effect-19\",\"cl-effect-20\",\"Style_11\")),\n\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\" => \"dropdown\",\n\t\t\t\t\t\t\t\t\"class\" => \"\",\n\t\t\t\t\t\t\t\t\"heading\" => __(\"Border Style\", \"creative-link\"),\n\t\t\t\t\t\t\t\t\"param_name\" => \"border_style\",\n\t\t\t\t\t\t\t\t\"value\" => array(\n\t\t\t\t\t\t\t\t\t/*\"None\"=> \" \",*/\n\t\t\t\t\t\t\t\t\t\"Solid\"=> \"solid\",\n\t\t\t\t\t\t\t\t\t\"Dashed\" => \"dashed\",\n\t\t\t\t\t\t\t\t\t\"Dotted\" => \"dotted\",\n\t\t\t\t\t\t\t\t\t\"Double\" => \"double\",\n\t\t\t\t\t\t\t\t\t\"Inset\" => \"inset\",\n\t\t\t\t\t\t\t\t\t\"Outset\" => \"outset\",\n\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"description\" => __(\"Select the border style for link.\",\"creative-link\"),\n\t\t\t\t\t\t\t\t\"dependency\" => Array(\"element\" => \"link_hover_style\",\"value\" => array(\"cl-effect-3\",\"cl-effect-4\",\"cl-effect-7\",\"cl-effect-8\",\"cl-effect-9\",\"cl-effect-11\",\"cl-effect-14\",\"cl-effect-17\",\"cl-effect-18\",\"cl-effect-21\")),\n\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\" => \"dropdown\",\n\t\t\t\t\t\t\t\t\"class\" => \"\",\n\t\t\t\t\t\t\t\t\"heading\" => __(\"Box Shadow\", \"creative-link\"),\n\t\t\t\t\t\t\t\t\"param_name\" => \"box_shadow_type\",\n\t\t\t\t\t\t\t\t\"value\" => array(\n\t\t\t\t\t\t\t\t\t/*\"None\"=> \" \",*/\n\t\t\t\t\t\t\t\t\t\"Inset\" => \"inset\",\n\t\t\t\t\t\t\t\t\t\"Outset\" => \"outset\",\n\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"description\" => __(\"Select the box shadow type for link.\",\"creative-link\"),\n\t\t\t\t\t\t\t\t\"dependency\" => Array(\"element\" => \"link_hover_style\",\"value\" => array(\"cl-effect-20\")),\n\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\" => \"colorpicker\",\n\t\t\t\t\t\t\t\t\"class\" => \"\",\n\t\t\t\t\t\t\t\t\"heading\" => __(\"Shadow Color\", \"creative-link\"),\n\t\t\t\t\t\t\t\t\"param_name\" => \"shadow_color\",\n\t\t\t\t\t\t\t\t\"value\" => \"#587285\",\n\t\t\t\t\t\t\t\t\"description\" => __(\"Select box shadow color for link.\", \"creative-link\"),\n\t\t\t\t\t\t\t\t//\"dependency\" => Array(\"element\" => \"border_style\", \"not_empty\" => true),\n\t\t\t\t\t\t\t\t\"dependency\" => Array(\"element\" => \"box_shadow_type\", \"value\" => array(\"inset\",\"outset\")),\n\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\" => \"number\",\n\t\t\t\t\t\t\t\t\"class\" => \"\",\n\t\t\t\t\t\t\t\t\"heading\" => __(\"Shadow Width\", \"creative-link\"),\n\t\t\t\t\t\t\t\t\"param_name\" => \"shadow_size\",\n\t\t\t\t\t\t\t\t\"value\" => 1,\n\t\t\t\t\t\t\t\t\"min\" => 1,\n\t\t\t\t\t\t\t\t\"max\" => 10,\n\t\t\t\t\t\t\t\t\"suffix\" => \"px\",\n\t\t\t\t\t\t\t\t\"description\" => __(\"Thickness of the Shadow.\", \"creative-link\"),\n\t\t\t\t\t\t\t\t//\"dependency\" => Array(\"element\" => \"border_style\", \"not_empty\" => true),\n\t\t\t\t\t\t\t\t\"dependency\" => Array(\"element\" => \"box_shadow_type\", \"value\" => array(\"inset\",\"outset\")),\n\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\" => \"colorpicker\",\n\t\t\t\t\t\t\t\t\"class\" => \"\",\n\t\t\t\t\t\t\t\t\"heading\" => __(\"Link Border Color\", \"creative-link\"),\n\t\t\t\t\t\t\t\t\"param_name\" => \"border_color\",\n\t\t\t\t\t\t\t\t\"value\" => \"#333333\",\n\t\t\t\t\t\t\t\t\"description\" => __(\"Select border color for link.\", \"creative-link\"),\n\t\t\t\t\t\t\t\t//\"dependency\" => Array(\"element\" => \"border_style\", \"not_empty\" => true),\n\t\t\t\t\t\t\t\t\"dependency\" => Array(\"element\" => \"border_style\", \"value\" => array(\"solid\",\"dashed\",\"dotted\",\"double\",\"inset\",\"outset\")),\n\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\" => \"colorpicker\",\n\t\t\t\t\t\t\t\t\"class\" => \"\",\n\t\t\t\t\t\t\t\t\"heading\" => __(\"Link Border HoverColor\", \"creative-link\"),\n\t\t\t\t\t\t\t\t\"param_name\" => \"border_hovercolor\",\n\t\t\t\t\t\t\t\t\"value\" => \"#333333\",\n\t\t\t\t\t\t\t\t\"description\" => __(\"Select border hover color for link.\", \"creative-link\"),\n\t\t\t\t\t\t\t\t\"dependency\" => Array(\n\t\t\t\t\t\t\t\t\t\"element\"=>\"link_hover_style\",\"value\" => array(\"cl-effect-8\",\"cl-effect-11\"),\n\t\t\t\t\t\t\t\t\t/*\"element\" => \"border_style\", \"not_empty\" => true*/ ),\n\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\" => \"number\",\n\t\t\t\t\t\t\t\t\"class\" => \"\",\n\t\t\t\t\t\t\t\t\"heading\" => __(\"Link Border Width\", \"creative-link\"),\n\t\t\t\t\t\t\t\t\"param_name\" => \"border_size\",\n\t\t\t\t\t\t\t\t\"value\" => 1,\n\t\t\t\t\t\t\t\t\"min\" => 1,\n\t\t\t\t\t\t\t\t\"max\" => 10,\n\t\t\t\t\t\t\t\t\"suffix\" => \"px\",\n\t\t\t\t\t\t\t\t\"description\" => __(\"Thickness of the border.\", \"creative-link\"),\n\t\t\t\t\t\t\t\t//\"dependency\" => Array(\"element\" => \"border_style\", \"not_empty\" => true),\n\t\t\t\t\t\t\t\t\"dependency\" => Array(\"element\" => \"border_style\", \"value\" => array(\"solid\",\"dashed\",\"dotted\",\"double\",\"inset\",\"outset\")),\n\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\" => \"colorpicker\",\n\t\t\t\t\t\t\t\t\"class\" => \"\",\n\t\t\t\t\t\t\t\t\"heading\" => __(\"Link Dot Color\", \"creative-link\"),\n\t\t\t\t\t\t\t\t\"param_name\" => \"dot_color\",\n\t\t\t\t\t\t\t\t\"value\" => \"#333333\",\n\t\t\t\t\t\t\t\t\"description\" => __(\"Select color for dots.\", \"creative-link\"),\n\t\t\t\t\t\t\t\t\"dependency\" => Array(\"element\"=>\"link_hover_style\",\"value\" => array(\"cl-effect-13\")),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\" => \"dropdown\",\n\t\t\t\t\t\t\t\t\"class\" => \"\",\n\t\t\t\t\t\t\t\t\"heading\" => __(\"Link Alignment\", \"creative-link\"),\n\t\t\t\t\t\t\t\t\"param_name\" => \"text_style\",\n\t\t\t\t\t\t\t\t\"value\" => array(\n\t\t\t\t\t\t\t\t\t\"Center\"=> \" \",\n\t\t\t\t\t\t\t\t\t\"Left\"=> \"left\",\n\t\t\t\t\t\t\t\t\t\"Right\" => \"right\",\n\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"description\" => __(\"Select the text align for link.\",\"creative-link\"),\n\t\t\t\t\t\t\t\t//\"group\" => \"Typography \",\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t// array(\n\t\t\t\t\t\t\t// \t\"type\" => \"textfield\",\n\t\t\t\t\t\t\t// \t\"class\" => \"\",\n\t\t\t\t\t\t\t// \t\"heading\" => __(\"Custom CSS Class\", \"creative-link\"),\n\t\t\t\t\t\t\t// \t\"param_name\" => \"el_class\",\n\t\t\t\t\t\t\t// \t\"value\" => \"\",\n\t\t\t\t\t\t\t// \t\"description\" => __(\"Ran out of options? Need more styles? Write your own CSS and mention the class name here.\", \"creative-link\"),\n\t\t\t\t\t\t\t// ),\n\t\t\t\t\t\t\t// array(\n\t\t\t\t\t // 'type' => 'css_editor',\n\t\t\t\t\t // 'heading' => __( 'Css', 'creative-link' ),\n\t\t\t\t\t // 'param_name' => 'css',\n\t\t\t\t\t // 'group' => __( 'Design ', 'creative-link' ),\n\t\t\t\t\t // 'edit_field_class' => 'vc_col-sm-12 vc_column no-vc-background no-vc-border creative_link_css_editor',\n\t\t\t\t\t // ),\n\t\t\t\t\t\t) // end params array\n\t\t\t\t\t) // end vc_map array\n\t\t\t\t); // end vc_map\n\t\t\t} // end function check 'vc_map'\n\t\t}", "title": "" }, { "docid": "dd8454df6eba71ef8ea5c190eb26a74f", "score": "0.55026907", "text": "function ciniki_customers_linkAdd(&$ciniki) {\n // \n // Find all the required and optional arguments\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'), \n 'customer_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Customer'), \n 'name'=>array('required'=>'no', 'default'=>'', 'blank'=>'yes', 'name'=>'Name'),\n 'url'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'URL'), \n 'webflags'=>array('required'=>'no', 'default'=>'0', 'blank'=>'no', 'name'=>'Webflags'), \n 'description'=>array('required'=>'no', 'default'=>'', 'blank'=>'yes', 'name'=>'Description'), \n )); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n $args = $rc['args'];\n\n // \n // Make sure this module is activated, and\n // check permission to run this function for this tenant\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'customers', 'private', 'checkAccess');\n $rc = ciniki_customers_checkAccess($ciniki, $args['tnid'], 'ciniki.customers.linkAdd', 0); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n\n //\n // Add the link\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectAdd');\n $rc = ciniki_core_objectAdd($ciniki, $args['tnid'], 'ciniki.customers.link', $args, 0x07);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Update the short_description\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'customers', 'private', 'customerUpdateShortDescription');\n $rc = ciniki_customers_customerUpdateShortDescription($ciniki, $args['tnid'], $args['customer_id'], 0x07);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Update the web index if enabled\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'hookExec');\n ciniki_core_hookExec($ciniki, $args['tnid'], 'ciniki', 'web', 'indexObject', array('object'=>'ciniki.customers.customer', 'object_id'=>$args['customer_id']));\n ciniki_core_hookExec($ciniki, $args['tnid'], 'ciniki', 'web', 'indexObject', array('object'=>'ciniki.customers.members', 'object_id'=>$args['customer_id']));\n ciniki_core_hookExec($ciniki, $args['tnid'], 'ciniki', 'web', 'indexObject', array('object'=>'ciniki.customers.dealers', 'object_id'=>$args['customer_id']));\n ciniki_core_hookExec($ciniki, $args['tnid'], 'ciniki', 'web', 'indexObject', array('object'=>'ciniki.customers.distributors', 'object_id'=>$args['customer_id']));\n\n return array('stat'=>'ok');\n}", "title": "" }, { "docid": "58aaaae4f121ef3812888fcfaf102d8c", "score": "0.5498236", "text": "function do_acplink()\n\t{\n\t\t//-----------------------------------------\n\t\t// Update the setting...\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->update_setting( 'security_remove_acp_link', $this->ipsclass->vars['security_remove_acp_link'] ? 0 : 1 );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Done..\n\t\t//-----------------------------------------\n\t\t\n\t\t$lang = $this->ipsclass->vars['security_remove_acp_link'] == 0 ? 'restored' : 'removed';\n\t\t\n\t\t$this->ipsclass->main_msg = \"ACP link display {$lang}\";\n\t\t$this->security_overview();\n\t}", "title": "" }, { "docid": "cb283e438e0cb6ad88f777acf9bf48b9", "score": "0.54870874", "text": "function ssb_activation() {}", "title": "" }, { "docid": "a9a01251cb48490eae2b5c972d42a630", "score": "0.5485101", "text": "public function activate() {\n\t\t\t\n\t\t}", "title": "" }, { "docid": "754dcc6d8061ec1dd845326f32bcc16f", "score": "0.54811347", "text": "public function activate() {\r\n\r\n\t}", "title": "" }, { "docid": "9c093776ba6e4ac3c91c431f3a0a7921", "score": "0.5478905", "text": "public function activate(){\n\n\t}", "title": "" }, { "docid": "c0aa8068c9de29a298e68f7b05a3801c", "score": "0.54672307", "text": "public function defineLinkTypeRequirements();", "title": "" }, { "docid": "30bf2a607445bcaf306be70eae396846", "score": "0.54608583", "text": "function do_acplink()\n\t{\n\t\t//-----------------------------------------\n\t\t// Update the setting...\n\t\t//-----------------------------------------\n\n\t\t$this->update_setting( 'security_remove_acp_link', $this->ipsclass->vars['security_remove_acp_link'] ? 0 : 1 );\n\n\t\t//-----------------------------------------\n\t\t// Done..\n\t\t//-----------------------------------------\n\n\t\t$lang = $this->ipsclass->vars['security_remove_acp_link'] == 0 ? 'восстановлена' : 'удалена';\n\n\t\t$this->ipsclass->main_msg = \"Ссылка на админцентр {$lang}.\";\n\t\t$this->security_overview();\n\t}", "title": "" }, { "docid": "9f7aece3a1521a3cbb0f3ddaa45f66d2", "score": "0.5441836", "text": "function activate($id = null);", "title": "" }, { "docid": "815f739bb101f2f307da5baa7bbf2381", "score": "0.5439401", "text": "public function affiliate_redirect_activation() {\n\t\t\tif ( defined( 'AFFILIATES_CORE_VERSION' ) ) {\n\t\t\t\t$this->affiliate_redirect_init();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "0dac9f727f2dd4adfe84e22acf1c69f9", "score": "0.5434237", "text": "private function linkwhat()\n\t{\n\t\t$iid = 0;\n\t\t$key = '';\n\t\tif(isset($get['iid']))\n {\n $iid = intval($get['iid']);\n }\n\t\tif(isset($get['key']))\n {\n $key = intval($get['key']);\n }\n\n\t\t$identity = new Identity_Model();\n\t\t$identity->Load($iid);\n\t\tif($identity->id != $iid || $identity != $key || $identity->temp != 1)\n\t\t{\n\t\t\t$this->template->content = 'Identity not valid';\n\t\t\treturn;\n\t\t}\n\n\t\t$step = 1;\n\t\tif(isset($get['username']))\n {\n $username = $get['username'];\n\t\t\t//find user\n\t\t\t//if user doesnt exit, add error to view\n\n\t\t\t//link iid with user in pending state\n\n\t\t\t//display success step\n\t\t\t$step = 2;\n }\n\n\t\t$view = new View('auth/link');\n\t\t$view->iid = $iid;\n\t\t$view->key = $key;\n\t\t$view->step = $step;\n\t\t$this->template->content = $view;\n\t}", "title": "" }, { "docid": "0589d71429c49973a87ac4d8d78c620c", "score": "0.54310936", "text": "public function linkAttributes();", "title": "" }, { "docid": "df6cb0d6ae3fad428c1ee75e4b86128e", "score": "0.54012847", "text": "public static function activate() {\n\n\t}", "title": "" }, { "docid": "4788708bd70d51085fa73e5f20278280", "score": "0.53951025", "text": "public function activate() {\n\n\t}", "title": "" }, { "docid": "a2253f2fd1af431f6fb9f6e2c5d11200", "score": "0.538661", "text": "public function propertyLink();", "title": "" }, { "docid": "63667deed950519547ab70b5364b432e", "score": "0.5380698", "text": "function bbp_add_activation_redirect()\n{\n}", "title": "" }, { "docid": "09475eb85f4532d3445cccbc7ecb56b7", "score": "0.53730845", "text": "function get_link( $args = '' ){\n\t\t$_this =& bpModeration::get_istance();\n\t\treturn $_this->generate_link( $args );\n\t}", "title": "" }, { "docid": "71879cfc84c5b61dbfb6ea01a316c6ea", "score": "0.537297", "text": "public function activateByCode($code);", "title": "" }, { "docid": "26abd275e515e43b999092b9e3bcb396", "score": "0.53676844", "text": "public function activations();", "title": "" }, { "docid": "17315280e1e4fa3204cc80b64218a503", "score": "0.5360556", "text": "function VC_creative_link_shortcode($atts)\n\t\t{\n\t\t\twp_enqueue_style('vc-creative-link-css', plugins_url( '/css/component.css' , __FILE__ ));\n\t\t\twp_enqueue_script('vc-creative-link-js', plugins_url( '/js/component.js' , __FILE__ ),false, array( 'jquery' ));\n\t\t\textract(shortcode_atts( array(\n\n\t\t\t\t'btn_link'\t\t\t => '',\n\t\t\t\t'text_color'\t\t => '#333333',\n\t\t\t\t'text_hovercolor' \t => '#555555',\n\t\t\t\t'background_color' => '#ffffff',\n\t\t\t\t'background_hover_color' => '#fefefe',\n\t\t\t\t'font_family' \t\t => '',\n\t\t\t\t'heading_style' \t => '',\n\t\t\t\t'title_font_size' => '',\n\t\t\t\t'title_line_ht'\t\t => '',\n\t\t\t\t'link_hover_style'\t =>'',\n\t\t\t\t'border_style' \t\t => 'solid',\n\t\t\t\t'border_color' \t\t => '#333333',\n\t\t\t\t'border_hovercolor' => '#333333',\n\t\t\t\t'border_size' \t\t => '1',\n\t\t\t\t'el_class' \t\t => '',\n\t\t\t\t'dot_color' \t\t =>'#333333',\n\t\t\t\t'css'\t\t =>'',\n\t\t\t\t'title'\t\t\t\t =>'',\n\t\t\t\t'tag_line'\t\t\t =>'',\n\t\t\t\t'text_style'\t\t =>'center',\n\t\t\t\t'box_shadow_type'\t =>'inset',\n\t\t\t\t'shadow_color'\t\t =>'#587285',\n\t\t\t\t'shadow_size'\t\t =>'1',\t\n\t\t\t),$atts));\n\n\t\t\t$href=$target=$text=$url= $alt_text= $rel = \"\";\n\t\t\tif($btn_link !== ''){\n\t\t\t\t$href = vc_build_link($btn_link);\n\n\t\t\t\t$url \t\t\t= ( isset( $href['url'] ) && $href['url'] !== '' ) ? $href['url'] : '';\n\t\t\t\t$target \t\t= ( isset( $href['target'] ) && $href['target'] !== '' ) ? esc_attr( trim( $href['target'] ) ) : '';\n\t\t\t\t$alt_text \t\t= ( isset( $href['title'] ) && $href['title'] !== '' ) ? esc_attr($href['title']) : '';\n\t\t\t\t$rel \t\t\t= ( isset( $href['rel'] ) && $href['rel'] !== '' ) ? esc_attr($href['rel']) : '';\n\t\t\t\t\n\t\t\t\tif($url==''){\n\t\t\t\t\t$url=\"javascript:void(0);\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$url=\"javascript:void(0);\";\n\t\t\t}\n\n\t\t\t// Text alignment\n\t\t\t$text_alignment = \"\";\n\t\t\t$text_alignment .= ($text_style !== '') ? ' float:'.$text_style.';' : '';\n\n\t\t\t$style = ($text_color !== '') ? ' color:'.$text_color.';' : ' ';\n\t\t\t\n\t\t\t$back_style = ($background_color !== '') ? ' background-color:'.$background_color.';' : ' ';\n\n\t\t\t$data_link = '';\n\t\t\t$data_link .= 'data-textcolor='.esc_attr($text_color);\n\t\t\t$data_link .= ' data-texthover='.esc_attr($text_hovercolor);\n\t\t\t$data_link .= ' data-back-color='.esc_attr($background_color).'';\n\t\t\t$data_link .= ' data-back-hover='.esc_attr($background_hover_color).'';\n\n\t\t\tif('cl-effect-5' == $link_hover_style || 'cl-effect-9' == $link_hover_style || 'cl-effect-11' == $link_hover_style || 'cl-effect-14' == $link_hover_style || 'cl-effect-15' == $link_hover_style || 'cl-effect-16' == $link_hover_style || 'cl-effect-17' == $link_hover_style || 'cl-effect-21' == $link_hover_style){\n\t\t\t\t$data_link_5 = '';\n\t\t\t\t$data_link_5 .= 'data-textcolor='.esc_attr($text_color);\n\t\t\t\t$data_link_5 .= ' data-texthover='.esc_attr($text_hovercolor);\n\t\t\t}\n\n\t\t\tif( 'cl-effect-19' == $link_hover_style ) {\n\t\t\t\t$data_link_19 = '';\n\t\t\t\t$data_link_19 .= 'background:'.esc_attr($background_hover_color);\n\t\t\t}\n\n\t\t\tswitch ( $link_hover_style ) {\n\t\t\t\tcase 'cl-effect-1':\n\t\t\t\t\t$output = '<div class=\"creative_link\" style=\"'.esc_attr( $text_alignment ).'\"><div class=\"'.esc_attr( $link_hover_style ).'\"><a style=\"'.esc_attr($style).'\" '.$this->vc_creative_link_checker($url, $target, $alt_text, $rel ).' '.esc_attr( $data_link ).'>'.esc_attr( $title ).'</a></div></div>';\n\t\t\t\t\treturn $output;\n\t\t\t\tbreak;\n\t\t\t\tcase 'cl-effect-2':\n\t\t\t\t\t// $output ='<style>\n\t\t\t\t\t// .csstransforms3d .cl-effect-2 a:hover span::before, \n\t\t\t\t\t// .csstransforms3d .cl-effect-2 a:focus span::before,\n\t\t\t\t\t// .csstransforms3d .cl-effect-2 a span::before {\n\t\t\t\t\t// \tbackground: '.esc_attr( $background_hover_color ).';\n\t\t\t\t\t// }\n\t\t\t\t\t// </style>';\n\t\t\t\t\t$output = '<div class=\"creative_link csstransforms3d\" style=\"'.esc_attr( $text_alignment ).'\"><div class=\"'.esc_attr( $link_hover_style ).' style=\"'.esc_attr( $style ).'\"><a style=\"'.esc_attr( $style ).'\" '.$this->vc_creative_link_checker($url, $target, $alt_text, $rel ).' '.esc_attr( $data_link ).'><span class=\"style-2-back\" data-hover=\"'.esc_attr( $title ).'\" style=\"'.esc_attr( $back_style ).'\">'.esc_attr( $title ).'</span></a></div></div>';\n\t\t\t\t\treturn $output;\n\t\t\t\tbreak;\n\t\t\t\tcase 'cl-effect-3':\n\t\t\t\t\t$data_border = $borderstyle = $after ='';\n\t\t\t\t\t$data_border .='border-color:'.$border_color.';';\n\t\t\t\t\t$data_border .='border-bottom-width:'.$border_size.'px;';\n\t\t\t\t\t$data_border .='border-style:'.$border_style.';';\n\t\t\t\t\t$borderstyle .=$data_border; //text color for btm border\n\t\t\t\t\t$after .='<span class=\"creative-link-btm3\" style=\"'.esc_attr($borderstyle).'\"></span>';\n\t\t\t\t\t$output = '<div class=\"creative_link\" style=\"'.esc_attr( $text_alignment ).'\"><div class=\"'.esc_attr( $link_hover_style ).'\"><a style=\"'.esc_attr($style).'\" '.$this->vc_creative_link_checker($url, $target, $alt_text, $rel ).' '.esc_attr( $data_link ).'>'.esc_attr( $title ).''.$after.'</a></div></div>';\n\t\t\t\t\treturn $output;\n\t\t\t\tbreak;\n\t\t\t\tcase 'cl-effect-4':\n\t\t\t\t\t$data_border = $borderstyle = $after ='';\n\t\t\t\t\t$data_border .='border-color:'.$border_color.';';\n\t\t\t\t\t$data_border .='border-bottom-width:'.$border_size.'px;';\n\t\t\t\t\t$data_border .='border-style:'.$border_style.';';\n\t\t\t\t\t$borderstyle .=$data_border; //text color for btm border\n\t\t\t\t\t$after .='<span class=\"creative-link-btm4\" style=\"'.esc_attr($borderstyle).'\"></span>';\n\t\t\t\t\t$output = '<div class=\"creative_link\" style=\"'.esc_attr( $text_alignment ).'\"><div class=\"'.esc_attr( $link_hover_style ).'\"><a style=\"'.esc_attr($style).'\" '.$this->vc_creative_link_checker($url, $target, $alt_text, $rel ).' '.esc_attr( $data_link ).'>'.esc_attr( $title ).''.$after.'</a></div></div>';\n\t\t\t\t\treturn $output;\n\t\t\t\tbreak;\n\t\t\t\tcase 'cl-effect-5':\n\t\t\t\t\t$output = '<div class=\"creative_link\" style=\"'.esc_attr( $text_alignment ).'\"><div class=\"'.esc_attr( $link_hover_style ).'\">\n\t\t\t\t\t<a '.$this->vc_creative_link_checker($url, $target, $alt_text, $rel ).' style=\"'.esc_attr( $style ).'\" '.esc_attr( $data_link ).'><span data-hover=\"'.esc_attr( $title ).'\">'.esc_attr( $title ).'</span></a>\n\t\t\t\t</div></div>';\n\t\t\t\t\treturn $output;\n\t\t\t\tbreak;\n\t\t\t\tcase 'cl-effect-6':\n\t\t\t\t\t$output = '<div class=\"creative_link\" style=\"'.esc_attr( $text_alignment ).'\"><div class=\"'.esc_attr( $link_hover_style ).'\">\n\t\t\t\t\t<a '.$this->vc_creative_link_checker($url, $target, $alt_text, $rel ).' style=\"'.esc_attr( $style ).'\" '.esc_attr( $data_link ).'>'.esc_attr( $title ).'</a>\n\t\t\t\t</div></div>';\n\t\t\t\t\treturn $output;\n\t\t\t\tbreak;\n\t\t\t\tcase 'cl-effect-7':\n\t\t\t\t\t$data_border = $borderstyle = $before = $after ='';\n\t\t\t\t\t$data_border .='border-color:'.$border_color.';';\n\t\t\t\t\t$data_border .='border-bottom-width:'.$border_size.'px;';\n\t\t\t\t\t$data_border .='border-style:'.$border_style.';';\n\t\t\t\t\t$borderstyle .=$data_border; //text color for btm border\n\t\t\t\t\t$before ='<span class=\"creative-link-7-top\" style=\"'.esc_attr($borderstyle).'\"></span>';\n\t\t\t\t\t$after .='<span class=\"creative-link-7-bottom\" style=\"'.esc_attr($borderstyle).'\"></span>';\n\t\t\t\t\t$output = '<div class=\"creative_link\" style=\"'.esc_attr( $text_alignment ).'\"><div class=\"'.esc_attr( $link_hover_style ).'\"><a style=\"'.esc_attr($style).'\" '.$this->vc_creative_link_checker($url, $target, $alt_text, $rel ).' '.esc_attr( $data_link ).'>'.$before.''.esc_attr( $title ).''.$after.'</a></div></div>';\n\t\t\t\t\treturn $output;\n\t\t\t\tbreak;\n\t\t\t\tcase 'cl-effect-8':\n\t\t\t\t\t$borderhover = $borderstyle = $before = $after ='';\n\t\t\t\t\t$borderstyle .='outline-color:'.$border_color.';';\n\t\t\t\t\t$borderstyle .='outline-width:'.$border_size.'px;';\n\t\t\t\t\t$borderstyle .='outline-style:'.$border_style.';'; //text color for btm border\n\n\t\t\t\t\t$borderhover .='outline-color:'.$border_hovercolor.';';\n\t\t\t\t\t$borderhover .='outline-width:'.$border_size.'px;';\n\t\t\t\t\t$borderhover .='outline-style:'.$border_style.';'; //text color for btm border\n\t\t\t\t\t$before ='<span class=\"creative-link-8-top\" style=\"'.esc_attr($borderstyle).'\"></span>';\n\t\t\t\t\t$after .='<span class=\"creative-link-8-bottom\" style=\"'.esc_attr($borderhover).'\"></span>';\n\t\t\t\t\t$output = '<div class=\"creative_link\" style=\"'.esc_attr( $text_alignment ).'\"><div class=\"'.esc_attr( $link_hover_style ).'\"><a style=\"'.esc_attr($style).'\" '.$this->vc_creative_link_checker($url, $target, $alt_text, $rel ).' '.esc_attr( $data_link ).'>'.$before.''.esc_attr( $title ).''.$after.'</a></div></div>';\n\t\t\t\t\treturn $output;\n\t\t\t\tbreak;\n\t\t\t\tcase 'cl-effect-9':\n\t\t\t\t\t$output = '<div class=\"creative_link\" style=\"'.esc_attr( $text_alignment ).'\"><div class=\"'.esc_attr( $link_hover_style ).'\">\n\t\t\t\t\t<a '.$this->vc_creative_link_checker($url, $target, $alt_text, $rel ).' style=\"'.esc_attr( $style ).'\" '.esc_attr( $data_link_5 ).'><span>'.esc_attr( $title ).'</span><span>'.esc_attr( $tag_line ).'</span></a>\n\t\t\t\t</div></div>';\n\t\t\t\t\treturn $output;\n\t\t\t\tbreak;\n\t\t\t\tcase 'cl-effect-10':\n\t\t\t\t\t$output ='<style>\n\t\t\t\t\t.cl-effect-10 a:hover span::before, \n\t\t\t\t\t.cl-effect-10 a:focus span::before,\n\t\t\t\t\t.cl-effect-10 a span::before {\n\t\t\t\t\t\tbackground: '.esc_attr( $background_hover_color ).';\n\t\t\t\t\t}\n\t\t\t\t\t</style>';\n\t\t\t\t\t$output .= '<div class=\"creative_link '.esc_attr( $link_hover_style ).' style=\"'.esc_attr( $style ).'\"><a style=\"float:'.esc_attr($text_style).';'.esc_attr( $style ).'\" '.$this->vc_creative_link_checker($url, $target, $alt_text, $rel ).' '.esc_attr( $data_link ).'><span class=\"style-2-back\" data-hover=\"'.esc_attr( $title ).'\" style=\"'.esc_attr( $back_style ).'\">'.esc_attr( $title ).'</span></a></div>';\n\t\t\t\t\treturn $output;\n\t\t\t\tbreak;\n\t\t\t\tcase 'cl-effect-11':\n\t\t\t\t\t$output = '<div class=\"creative_link\" style=\"'.esc_attr( $text_alignment ).'\"><div class=\"'.esc_attr( $link_hover_style ).'\">\n\t\t\t\t\t<a '.$this->vc_creative_link_checker($url, $target, $alt_text, $rel ).' style=\"'.esc_attr( $style ).'\" '.esc_attr( $data_link_5 ).' data-hover=\"'.esc_attr( $title ).'\">'.esc_attr( $title ).'</a>\n\t\t\t\t</div></div>';\n\t\t\t\t\treturn $output;\n\t\t\t\tbreak;\n\t\t\t\tcase 'cl-effect-13':\n\t\t\t\t\t$after ='';\n\t\t\t\t\t$after .='<span class=\"creative-link-13-link-bottom\" data-color=\"'.esc_attr($dot_color).'\">•</span>';\n\t\t\t\t\t$output = '<div class=\"creative_link\" style=\"'.esc_attr( $text_alignment ).'\"><div class=\"'.esc_attr( $link_hover_style ).'\"><a style=\"'.esc_attr($style).'\" '.$this->vc_creative_link_checker($url, $target, $alt_text, $rel ).' '.esc_attr( $data_link ).'>'.esc_attr( $title ).''.$after.'</a></div></div>';\n\t\t\t\t\treturn $output;\n\t\t\t\tbreak;\n\t\t\t\tcase 'cl-effect-14':\n\t\t\t\t\t$output = '<div class=\"creative_link\" style=\"'.esc_attr( $text_alignment ).'\"><div class=\"'.esc_attr( $link_hover_style ).'\">\n\t\t\t\t\t<a '.$this->vc_creative_link_checker($url, $target, $alt_text, $rel ).' style=\"'.esc_attr( $style ).'\" '.esc_attr( $data_link_5 ).'>'.esc_attr( $title ).'</a>\n\t\t\t\t</div></div>';\n\t\t\t\t\treturn $output;\n\t\t\t\tbreak;\n\t\t\t\tcase 'cl-effect-15':\n\t\t\t\t\t$output = '<div class=\"creative_link\" style=\"'.esc_attr( $text_alignment ).'\"><div class=\"'.esc_attr( $link_hover_style ).'\">\n\t\t\t\t\t<a '.$this->vc_creative_link_checker($url, $target, $alt_text, $rel ).' style=\"'.esc_attr( $style ).'\" '.esc_attr( $data_link_5 ).' data-hover=\"'.esc_attr( $title ).'\">'.esc_attr( $title ).'</a>\n\t\t\t\t</div></div>';\n\t\t\t\t\treturn $output;\n\t\t\t\tbreak;\n\t\t\t\tcase 'cl-effect-16':\n\t\t\t\t\t$output = '<div class=\"creative_link\" style=\"'.esc_attr( $text_alignment ).'\"><div class=\"'.esc_attr( $link_hover_style ).'\">\n\t\t\t\t\t<a '.$this->vc_creative_link_checker($url, $target, $alt_text, $rel ).' style=\"'.esc_attr( $style ).'\" '.esc_attr( $data_link_5 ).' data-hover=\"'.esc_attr( $title ).'\">'.esc_attr( $title ).'</a>\n\t\t\t\t</div></div>';\n\t\t\t\t\treturn $output;\n\t\t\t\tbreak;\n\t\t\t\tcase 'cl-effect-17':\n\t\t\t\t\t$output = '<div class=\"creative_link\" style=\"'.esc_attr( $text_alignment ).'\"><div class=\"'.esc_attr( $link_hover_style ).'\">\n\t\t\t\t\t<a '.$this->vc_creative_link_checker($url, $target, $alt_text, $rel ).' style=\"'.esc_attr( $style ).'\" '.esc_attr( $data_link_5 ).' data-hover=\"'.esc_attr( $title ).'\">'.esc_attr( $title ).'</a>\n\t\t\t\t</div></div>';\n\t\t\t\t\treturn $output;\n\t\t\t\tbreak;\n\t\t\t\tcase 'cl-effect-18':\n\t\t\t\t\t$borderstyle = $before = $after ='';\n\t\t\t\t\t$borderstyle .= 'border-top-width:'.$border_size.'px;';\n\t\t\t\t\t$borderstyle .= 'border-top-style:'.$border_style.';';\n\t\t\t\t\t$borderstyle .= 'border-top-color:'.$border_color.';';\n\t\t\t\t\t$before ='<span class=\"creative-link-18-top\" style=\"'.esc_attr($borderstyle).'\"></span>';\n\t\t\t\t\t$after .='<span class=\"creative-link-18-bottom\" style=\"'.esc_attr($borderstyle).'\"></span>';\n\t\t\t\t\t$output = '<div class=\"creative_link\" style=\"'.esc_attr( $text_alignment ).'\"><div class=\"'.esc_attr( $link_hover_style ).'\"><a style=\"'.esc_attr($style).'\" '.$this->vc_creative_link_checker($url, $target, $alt_text, $rel ).' '.esc_attr( $data_link ).'>'.$before.''.esc_attr( $title ).''.$after.'</a></div></div>';\n\t\t\t\t\treturn $output;\n\t\t\t\tbreak;\n\t\t\t\tcase 'cl-effect-19':\n\t\t\t\t\t$output = '<div class=\"creative_link csstransforms3d\" style=\"'.esc_attr( $text_alignment ).'\"><div class=\"'.esc_attr( $link_hover_style ).'\">\n\t\t\t\t\t<a '.$this->vc_creative_link_checker($url, $target, $alt_text, $rel ).' style=\"'.esc_attr( $style ).'\" '.esc_attr( $data_link ).'><span data-hover=\"'.esc_attr( $title ).'\" style=\"'.esc_attr( $data_link_19 ).'\" >'.esc_attr( $title ).'</span></a>\n\t\t\t\t</div></div>';\n\t\t\t\t\treturn $output;\n\t\t\t\tbreak;\n\t\t\t\tcase 'cl-effect-20':\n\t\t\t\t\t$output = '<div class=\"creative_link\" style=\"'.esc_attr( $text_alignment ).'\"><div class=\"'.esc_attr( $link_hover_style ).'\">\n\t\t\t\t\t<a '.$this->vc_creative_link_checker($url, $target, $alt_text, $rel ).' style=\"'.esc_attr( $style ).'\" '.esc_attr( $data_link ).'><span data-hover=\"'.esc_attr( $title ).'\">'.esc_attr( $title ).'</span></a>\n\t\t\t\t</div></div>';\n\t\t\t\t\treturn $output;\n\t\t\t\tbreak;\n\t\t\t\tcase 'cl-effect-21':\n\t\t\t\t\t$output = '<div class=\"creative_link\" style=\"'.esc_attr( $text_alignment ).'\"><div class=\"'.esc_attr( $link_hover_style ).'\">\n\t\t\t\t\t<a '.$this->vc_creative_link_checker($url, $target, $alt_text, $rel ).' style=\"'.esc_attr( $style ).'\" '.esc_attr( $data_link_5 ).'>'.esc_attr( $title ).'</a>\n\t\t\t\t</div></div>';\n\t\t\t\t\treturn $output;\n\t\t\t\tbreak;\n\t\t\t}\n\t \t \t\n\t\t}", "title": "" }, { "docid": "2b87568dd126f7e6c9859bf2c1d7ad5e", "score": "0.53444797", "text": "function smarty_function_link_address($params, &$smarty) {\n //kontrola, jeslti jsou zadany vechny parametry\n if (!isset($params[\"instance\"]) || !isset($params[\"controller\"]))\n\treturn \"\";\n\n //kontrola akce\n if (!isset($params[\"action\"]))\n\t$params[\"action\"] = \"index\";\n \n //sestaveni linku\n $link = \"/\".$params[\"instance\"][\"name\"].\"_\".$params[\"instance\"][\"id\"];\n\n if (isset($params[\"mode\"]))\n\t$link .= \"_\".$params[\"mode\"];\n\n $link .= \"/\".$params[\"controller\"].\"/\".$params[\"action\"];\n\n if (isset($params[\"params\"]))\n\t$queryString = \"?\".$params[\"params\"];\n else\n\t$queryString = \"\";\n\n $retval = \"<a href=\\\"$link$queryString\\\">\".$params[\"legend\"].\"</a>\";\n\n return $retval;\n}", "title": "" }, { "docid": "b91d8120a9ba0d0fdc1b44c039ce66c3", "score": "0.5341923", "text": "function bbp_activation()\n{\n}", "title": "" }, { "docid": "e3f4fc24cff674935a78170126c511b1", "score": "0.53414124", "text": "public function activate() {}", "title": "" }, { "docid": "0510499e13fec0fe4f54c977d259ab34", "score": "0.5332716", "text": "public function getLinkType();", "title": "" }, { "docid": "740c6f1745a6cfe0ce6941cbb19121da", "score": "0.53240293", "text": "public static function activate(){\n }", "title": "" }, { "docid": "0893a04f277cc3c638843ba6a59c0415", "score": "0.53195983", "text": "function bbp_do_activation_redirect()\n{\n}", "title": "" }, { "docid": "d7994309a0489509848a1c7208bd884d", "score": "0.5303975", "text": "function gt_autologin_link($atts, $content = null) {\r\n \textract(shortcode_atts(array('link' => plugins_url('/gt-custom.php?gtlo' , __FILE__ )), $atts));\r\n \treturn '<a class=\"button\" href=\"'.$link.'\"><span>' . do_shortcode($content) . '</span></a>';\r\n }", "title": "" }, { "docid": "3236713c088d2c9525b1e651e614b601", "score": "0.5296336", "text": "function wpn_activelink($link, $segment = 2, $return = ' class=\"active\"')\n {\n $CI =& get_instance();\n if ($CI->uri->segment($segment) == $link)\n return $return;\n }", "title": "" }, { "docid": "8c9e16077c4b31881bfd7323aa0027d9", "score": "0.5292472", "text": "function convertLink (&$link){\n\t$return = getNavMap($link,'link');\n\tif (isset($return)){\n\t\t$link = $return;\n\t}\n}", "title": "" }, { "docid": "e7a5e916e096ef7a519ed345d017be2b", "score": "0.5283164", "text": "function enable_record_link_codes()\n{\n $linkid = \"\" ;\n \n global $wpdb;\n $table_name = $wpdb->prefix.TBL_CODES ;\n\t\t\t\n if( (isset($_GET['linkid'])) && ($_GET['linkid']>0))\n {\n $linkid = trim($_GET['linkid']) ;\n }\n \n \n $sql = \"update \" . $table_name .\" set enable=1 where id=\".$linkid ;\n \n \n $datamsg = \"\" ;\n \n if($wpdb->query($sql))\n {\n\t\t\t\t$datamsg = \" Record Updated successfully \";\n }\n \n show_data_admin_codes($datamsg) ;\n\n}", "title": "" }, { "docid": "4f4791090fa10d98e8e3be845f331b79", "score": "0.5260991", "text": "function xendit_bca_link($params)\n{\n // System parameters\n $companyName = $params['companyname'];\n $systemUrl = $params['systemurl'];\n $langPayNow = $params['langpaynow'];\n\n // Modules parameters\n $modulename = $params['name'];\n $apikey = $params['apikey'];\n $paymentfee = $params['paymentfee'];\n $expired = $params['expired'];\n $sendemail = $params['sendemail'];\n\n // Invoice parameters\n $amount = (int)$params['amount'];\n $invoiceId = $params['invoiceid'];\t\n $currency = $params['currency'];\n $url = $systemUrl . \"viewinvoice.php?id=\" . $invoiceId;\n\n\t// Client Parameters\n $email = $params['clientdetails']['email'];\n \n if(isset($_POST['payurlgenerator']) || !empty($_POST['payurlgenerator'])) {\n // Check Send Email\n if($sendemail) {\n $send_email_to_client = true;\n } else {\n $send_email_to_client = false;\n } \n\n // Xendit Params\n $total = $amount + $paymentfee;\n $description = $companyName . ' - Order: #' . $invoiceId;\n\n // Prepare Parameters\t\n $dataRequest = array(\n 'should_send_email' => $send_email_to_client,\n 'invoice_duration' => $expired,\n 'payment_methods' => ['BCA'],\n 'currency' => $currency,\n 'success_redirect_url' => $url . '&paymentsuccess=true',\n 'failure_redirect_url' => $url . '&paymentfailed=true',\n );\n\n // Api Key For Function\n $options['secret_api_key'] = $apikey;\n\n // Make a Request to Xendit\n $xendit = new XenditPHPClient($options);\n $req = $xendit->createInvoice(\"$invoiceId\", $total, $email, $description, $dataRequest);\n \n // Get and Redirect URL From Response\n $redirUrl = $req['invoice_url'];\n header('Location:' . $redirUrl);\n exit();\n } else {\n // Form For Generate URL XenInvoice\n $img = $systemUrl . \"/modules/gateways/xendit-images/bca.png\"; \n $htmlOutput .= '<img src=\"' . $img . '\"><br>'.$modulename.'<br>';\n $htmlOutput .= '<form method=\"post\" action=\"' . $url . '&payurlgenerator=true\">';\n $htmlOutput .= '<input type=\"hidden\" name=\"payurlgenerator\" value=\"true\" />';\n $htmlOutput .= '<input type=\"submit\" class=\"btn btn-primary\" value=\"'.$langPayNow.'\" />';\n $htmlOutput .= '</form>';\n }\n\n return $htmlOutput; \n}", "title": "" }, { "docid": "8f277a04d193483e42e8f86f72d92a1e", "score": "0.5260201", "text": "function bbp_get_topic_approve_link($args = array())\n{\n}", "title": "" }, { "docid": "9b75e2c5c0b934ac160aaf5532d91c75", "score": "0.5254926", "text": "function smarty_function_conditionalLink( $params, &$this )\r\n{\r\n\textract($params);\r\n\r\n\tif ( !is_null($confirm) )\r\n\t\t$onClickTxt = sprintf( \"onClick=\\\"return confirmLink('%s')\\\"\", $confirm );\r\n\t\r\n\tif ( !empty($onClick) )\r\n\t\t$onClickTxt = sprintf( \"onClick=\\\"%s\\\"\", $onClick);\r\n\r\n\tif ( !isset( $class ) )\r\n\t\t$class = null;\r\n\r\n\tif ( !is_null($href) )\r\n\t\tif ( !isset($spanClass) )\r\n\t\t\treturn sprintf( \"<a href=\\\"%s\\\" class=\\\"%s\\\" %s title=\\\"%s\\\">%s</a>\", $href, $class, $onClickTxt, $title, $text );\r\n\t\telse\r\n\t\t\treturn sprintf( \"<span class=\\\"%s\\\"><a href=\\\"%s\\\" class=\\\"%s\\\" %s title=\\\"%s\\\">%s</a></span>\", $spanClass, $href, $class, $onClickTxt, $title, $text );\r\n\telse\r\n\t\treturn $text;\r\n}", "title": "" }, { "docid": "e281cbc9f56e489620fdd63ba56f6874", "score": "0.5251233", "text": "protected function handleLink($id, $mode) // links char with account\r\n {\r\n }", "title": "" }, { "docid": "bf23ffa7fb97c37e59d9e775bfd23020", "score": "0.52510166", "text": "public static function activate()\n {\n // Do something\n }", "title": "" }, { "docid": "6d4acaa28e725de68079dd529b6b2f9f", "score": "0.52337843", "text": "public static function activate() {\n\t}", "title": "" }, { "docid": "1930dd0b5499fd8cae2e76a6d0fb7f21", "score": "0.5216321", "text": "public function findNextLink();", "title": "" }, { "docid": "c1da7d2a1da969c50d9dccdd059faff0", "score": "0.5209171", "text": "public function activation_link(){\n\n \t\t$key = $this->input->get('key');\n \t\t$this->db->where('email_verify_hash', $key);\n \t\t$rs = $this->db->get('users')->result();\n\n \t\tif(count($rs) == 1 && $key !=\"\"){\n\n \t\t\t$object\t = \tarray('email_verify_hash' => '','status' =>'active');\n \t\t\t$this->db->where('email_verify_hash', $key);\n \t\t\t$this->db->update('users', $object);\n\n \t\t\t$this->load->view('admin/user-activation', $this->data);\n \t\t}else{\n\n \t\t\t$this->load->view('admin/link-expired', $this->data);\n \t\t}\n \t}", "title": "" }, { "docid": "9c4e38274630e9d28bea8218fcf77ad2", "score": "0.5208152", "text": "public function processUsercaseLink($record)\n{\n $record->url = helper::createLink('usercase', 'view', \"id=$record->objectID\");\n}", "title": "" }, { "docid": "8c37a6ed9a42f72221468b998f5534f7", "score": "0.52057886", "text": "public function activate() {\n\n }", "title": "" }, { "docid": "96515283a8850e64b5def8003b375012", "score": "0.51946324", "text": "function autolink($al_url, $al_msg)\n{\n stdhead();\n begin_frame(\"\");\n echo \"\\n<meta http-equiv=\\\"refresh\\\" content=\\\"3; url=$al_url\\\">\\n\";\n echo \"<b>$al_msg</b>\\n\";\n echo \"\\n<b>Redirecting ...</b>\\n\";\n echo \"\\n[ <a href='$al_url'>link</a> ]\\n\";\n end_frame();\n stdfoot();\n exit;\n}", "title": "" }, { "docid": "1d9634ac3d6fbbc3d1a8cd2fb45833ae", "score": "0.5175792", "text": "function convertLink( $link,$type ) {\n switch( $type ) {\n case '1': $result = ( strpos( $link,'http://' ) === false ) ? 'http://'.$link : $link; break;\n case '2': $result = xtc_href_link( FILENAME_PRODUCT_INFO,xtc_product_link( $link ) ); break;\n case '3': $result = xtc_href_link( FILENAME_DEFAULT,xtc_category_link( $link ) ); break;\n case '4': $result = xtc_href_link( FILENAME_CONTENT,'coID='.$link ); break;\n }\n return ( $result ) ? $result : $link; \n}", "title": "" }, { "docid": "f820765f494d781374c0147acc5f15a5", "score": "0.5166157", "text": "function Ir($link)\n\t{\n\t\techo \"<script type='text/javascript'>document.location.href='$link';</script>\";\n\t}", "title": "" }, { "docid": "0a581786d0211a3b30024d93100d6415", "score": "0.5163595", "text": "function getlink($adm_modname,$cdo) {\n\treturn \"<a href=\\\"\".RPATH.(\"index.php?f=\".$adm_modname.\"&do=\".$cdo).\"\\\" info=\\\"\"._GETLINK.\"\\\" onclick=\\\"prompt('\"._GETLINK.\"','\".(\"index.php?f=\".$adm_modname.\"&do=\".$cdo).\"'); return false;\\\"><img border=\\\"0\\\" src=\\\"images/link.png\\\"></a>\";\n}", "title": "" }, { "docid": "ccf10798512b4f72e1db0b725552f772", "score": "0.5156874", "text": "function linkTo ($link_ref, $link_nombre, $link_titulo) {\t\t\t\n\t\t$link_to = \"<a href=\\\"$link_ref\\\" title=\\\"$link_titulo\\\" >$link_nombre</a>\";\n\t\tprint $link_to;\n\t}", "title": "" }, { "docid": "a38b2031cd15e4ba2f5d9e52d5fab956", "score": "0.51548856", "text": "public function link()\n\t{\n\t\treturn \\IPS\\Http\\Url::internal( 'app=core&module=system&controller=upgrade&_new=1', 'admin' );\n\t}", "title": "" }, { "docid": "3d604bd83babbf7f21b646165ff20da4", "score": "0.5151795", "text": "function drupal_add_link($attributes) {\n drupal_set_html_head('<link'. drupal_attributes($attributes) .\" />\\n\");\n}", "title": "" }, { "docid": "8c8f3f62b2deaab9642a891f950db4c5", "score": "0.51489896", "text": "public function provideRegisterLink(): ?bool;", "title": "" }, { "docid": "737904612dce54115db43d525c587ea6", "score": "0.5147861", "text": "protected function _link() {\n\n\t\treturn $this->lastChanges( $this->request()::$url );\n\t}", "title": "" }, { "docid": "737904612dce54115db43d525c587ea6", "score": "0.5147861", "text": "protected function _link() {\n\n\t\treturn $this->lastChanges( $this->request()::$url );\n\t}", "title": "" }, { "docid": "737904612dce54115db43d525c587ea6", "score": "0.5147861", "text": "protected function _link() {\n\n\t\treturn $this->lastChanges( $this->request()::$url );\n\t}", "title": "" }, { "docid": "06018bcf2ca378efe1a88ce5fd06dad9", "score": "0.51465994", "text": "function hslanchor_opencall($cr)\r\n{\r\n\treturn \"<a href='#' onclick='run_hsl_anchor(this)' atype='calldetails' key='\".$cr.\"'>\".$cr.\"</a>\";\r\n}", "title": "" }, { "docid": "69c281ffd39ae491907d164f4d6bd48f", "score": "0.5145832", "text": "public function getLinkProvider(): EvolvableLinkProviderInterface;", "title": "" }, { "docid": "45aa99b2218d530277192ebd683cfbf7", "score": "0.5142674", "text": "public function testLinkFirst()\n\t{\n\t\t$this->markTestIncomplete();\n\t}", "title": "" }, { "docid": "e95f73018b9d8c9201a89f1a18bc19cf", "score": "0.5138465", "text": "function logger_device_activate($code) {\n\n $device_id = logger_device_assign($code);\n\n if (!is_null($device_id)) {\n $device = logger_get_device($device_id);\n\n drupal_set_message(t(\"The device is now associated with your account.\"));\n if (version_compare($device->firmware_version, \"2.2.9\", \">\") &&\n ( $device->type_string == 'flukso2') || ($device->type_string == 'amperix1') ) {\n drupal_goto(\"device/config/$device_id/1\");\n } else {\n drupal_goto('device/mylist');\n }\n } else {\n drupal_set_message(t(\"An error occured during the association. Please try again and contact the support team if the problem persists.\"), 'error');\n drupal_goto('device/mylist');\n }\n}", "title": "" }, { "docid": "3fa58731180e7f14a41ba6e9fa2acc20", "score": "0.5136826", "text": "function tpl_link() {\n\treturn _tpl_view_rewrite(func_get_args(), null, '&amp;');\n}", "title": "" }, { "docid": "ddc9a34bfda0c213928ce8dc337771c8", "score": "0.5134584", "text": "public function anchor();", "title": "" }, { "docid": "900a1f153c34b34caf97c37e20adc920", "score": "0.5130956", "text": "function A2A_SUBSCRIBE_actlinks( $links, $file ){\n\t//Static so we don't call plugin_basename on every plugin row.\n\tstatic $this_plugin;\n\tif ( ! $this_plugin ) $this_plugin = plugin_basename(__FILE__);\n\t\n\tif ( $file == $this_plugin ){\n\t\t$settings_link = '<a href=\"options-general.php?page=add-to-any-subscribe.php\">' . __('Settings') . '</a>';\n\t\t$widgets_link = '<a href=\"widgets.php\">' . __('Widgets') . '</a>';\n\t\tarray_unshift( $links, $settings_link, $widgets_link ); // before other links\n\t}\n\treturn $links;\n}", "title": "" }, { "docid": "99c8801a9bbc8aeb835cc8be9be3a339", "score": "0.51243734", "text": "public function __construct($activation_link)\n {\n $this->activation_link = $activation_link;\n }", "title": "" }, { "docid": "c4f5fcab3146c0fcdf1825d1465eaf59", "score": "0.511474", "text": "public function linkAction() {\n\t\t$request = $this->getRequest ();\n\t\t\n\t\ttry {\n\t\t\t$code = $request->getParam ( 'id' );\n\t\t\t$keypass = $request->getParam ( 'keypass' );\n\t\t\t$link = Fastlinks::findbyCode ( $code );\n\t\t\t\t\n\t\t\t$auth = Zend_Auth::getInstance ();\n\t\t\t\t\n\t\t\tif (! empty ( $link [0] ['controller'] ) && ! empty ( $link [0] ['action'] )) {\n\t\t\t\t$adapter = new Shineisp_Auth_Adapter_Secretkey(Doctrine_Manager::connection()->getTable(\"AdminUser\"), \"email\");\n\t\t\t\t$adapter->setIdentity($keypass);\n\t\t\t\t$adapter->setType('operator');\n\t\t\t\t\n\t\t\t\t$auth->setStorage(new Zend_Auth_Storage_Session('admin'));\n\t\t\t\t$auth->authenticate($adapter);\n\t\t\t\t\n\t\t\t\t// Check if the credentials are set in the Operator profile or the credentials are set in the ISP profile\n\t\t\t\tif ($auth->hasIdentity()) {\n\t\t\t\t\tFastlinks::updateVisits ( $link [0] ['fastlink_id'] );\n\t\t\t\t\tShineisp_Commons_Utilities::log(\"Login: The user has been logged in correctly from \" . $_SERVER['REMOTE_ADDR'], \"login.log\");\n\t\t\t\t\t$this->_helper->redirector ( $link [0] ['action'], $link [0] ['controller'], 'admin', json_decode ( $link [0] ['params'], true ) );\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t// Check if the credentials are set in the Isp profile\n\t\t\t\t\t$adapter->setType('isp');\n\t\t\t\t\t\n\t\t\t\t\t$auth->setStorage(new Zend_Auth_Storage_Session('admin'));\n\t\t\t\t\t$auth->authenticate($adapter);\n\t\t\t\t\tif ($auth->hasIdentity()) {\n\t\t\t\t\t\tFastlinks::updateVisits ( $link [0] ['fastlink_id'] );\n\t\t\t\t\t\tShineisp_Commons_Utilities::log(\"Login: The user has been logged in correctly from \" . $_SERVER['REMOTE_ADDR'], \"login.log\");\n\t\t\t\t\t\t$this->_helper->redirector ( $link [0] ['action'], $link [0] ['controller'], 'admin', json_decode ( $link [0] ['params'], true ) );\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$auth->clearIdentity();\r\n\t\t\t\t\t\theader ( 'location: /admin' );\r\n\t\t\t\t\t\tdie ();\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t} else {\n\t\t\t\t$auth->clearIdentity();\n\t\t\t\theader ( 'location: /admin' );\n\t\t\t\tdie ();\n\t\t\t}\n\t\n\t\t} catch ( Exception $e ) {\n\t\t\techo $e->getMessage ();\n\t\t\tdie ();\n\t\t}\n\t}", "title": "" }, { "docid": "3fe426645996e7c49947201c4f7c73d2", "score": "0.5114392", "text": "function toggle_link($notify) {\n\n if ($notify == TRUE) {\n return FALSE;\n } elseif ($notify == FALSE) {\n return TRUE;\n }\n}", "title": "" }, { "docid": "7599e4e50116f23c0f052148ec2f332b", "score": "0.5111253", "text": "public function enable() {\n\t\tif (!WCF::getUser()->getPermission('mod.linkList.canEnableLink')) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ($this->link != null && $this->link->isDisabled) {\n\t\t\t// enable link\n\t\t\tLinkListLinkEditor::enableAll($this->linkID);\n\t\t\t// refresh category\n\t\t\tLinkListCategoryEditor::refreshAll($this->categoryID);\n\t\t\tLinkListCategoryEditor::resetCache();\n\t\t}\n\t}", "title": "" }, { "docid": "18d68e5099025763deb50a94a12d2d4b", "score": "0.5110784", "text": "public function activationCode();", "title": "" }, { "docid": "8aae97fdb3e839d4ca5a3ca74b308ba2", "score": "0.5107407", "text": "public function activate() {\n\t\t\t// just in case I need to do something to activate\n\t\t\tdo_action('acf-bs4-page-builder/activate');\n\t\t}", "title": "" }, { "docid": "7e8c9c8363acc8b67cdf37babdf977c1", "score": "0.50942725", "text": "function ActivateSubscriber()\n\t\t{\n\t\t\t$_REQUEST['mode'] \t\t= \"ActivateSubscriber\";\n\t\t\t$this->oModel->ActivateSubscriber($_REQUEST['identity']);\n\t\t\t//$this->oModel->ActivateEmployerJobs($_REQUEST['identity']);\n\t\t\t$err=\"Successfully Activated.\";\n\t\t\t$this->ListSubscriber($err);\t\t\t\n\t\t}", "title": "" }, { "docid": "63f9cf2b3d04bbe3340a938e68068790", "score": "0.50921756", "text": "public static function activate() {\n }", "title": "" }, { "docid": "c999456dd723c58a9cf1ee0048addf81", "score": "0.50843", "text": "public function activate()\n {\n if ($this->menu->config->activeElement == 'item') {\n $this->setToActive();\n } else {\n if ($this->link) {\n $this->link->activate();\n }\n }\n\n // If parent activation is enabled:\n if ($this->menu->config->activateParents) {\n // Moving up through the parent nodes, activating them as well.\n if ($this->parent) {\n $this->parent->activate();\n }\n }\n }", "title": "" }, { "docid": "7ece5e81cd165dda2e156ebe424d68f7", "score": "0.5083397", "text": "function bbp_make_clickable($text = '')\n{\n}", "title": "" }, { "docid": "ca5edf5fb9f5897a86d949f4586e81c1", "score": "0.50817716", "text": "function tpl_pagelink($id,$name=NULL){\n print html_wikilink($id,$name);\n}", "title": "" }, { "docid": "3aaeee11498f6505a4241799ae408cea", "score": "0.50756687", "text": "function activate_accapi($networkwide) {\n\trequire_once plugin_dir_path( __FILE__ ) . 'includes/class-accapi-activator.php';\n\t accapiActivator::activate($networkwide);\n}", "title": "" }, { "docid": "0d19a7ead8e95f37a7f5c61282cc9ded", "score": "0.5073728", "text": "public static function on_activate(){\n\n }", "title": "" }, { "docid": "922379471ec820b5db7414aeadb5ea04", "score": "0.50732607", "text": "function add_link($link, $direct){\r\n global $res;\r\n $con = db_connect();\r\n $stm = $con->prepare(Query::ADD_LINK);\r\n $stm->execute(array(\r\n ':link' => $link,\r\n ':direct' => $direct\r\n ));\r\n\r\n if($stm){\r\n $res->success = true;\r\n }else{\r\n $res->success = false;\r\n }\r\n\r\n }", "title": "" }, { "docid": "62c960cbb2c8a84b3f77d741ab5f1616", "score": "0.50704694", "text": "public function setLink() {\n\n\t\t$this->link = \"http://localhost:8081/Practica_2/index.php?controller=encuestas&action=view&idEncuesta=\";\n\t}", "title": "" }, { "docid": "6a346bffa1e8d1123866526b6474d488", "score": "0.5068674", "text": "function cp_redirect_on_activation()\n {\n if (true === get_option('convert_plug_redirect') || '1' === get_option('convert_plug_redirect')) {\n update_option('convert_plug_redirect', false);\n $this->create_default_campaign();\n if (! is_multisite()) :\n wp_redirect(admin_url('admin.php?page=' . CP_PLUS_SLUG));\n endif;\n }\n }", "title": "" }, { "docid": "b0825fb7a73f2ee04bbe26fa7fe2c7c8", "score": "0.50676996", "text": "public function isLink(): bool;", "title": "" }, { "docid": "644454ebf4213162931011b3bae689a7", "score": "0.5066526", "text": "public function checkLink($link);", "title": "" }, { "docid": "7addf64431ab6aef41094f9064377205", "score": "0.50623333", "text": "function hook_flag_link_type_info_alter(array &$link_types) {\n\n}", "title": "" }, { "docid": "ac897e45d5ece3eb19d6458c68bd1fb7", "score": "0.505969", "text": "function instructor_links($val_ins) {\n\techo '<br /><br />You are logged in as ' . $val_ins . '.<br />';\n\t// return to instructor main\n\techo '<a href = \"Instructor_Main.php\">Return to Main Instructor Page</a><br />';\n\t// give the instructor a chance to log out\n\techo '<a href = \"Instructor_Logout.php\">Log Out</a><br />';\n}", "title": "" } ]
d0e61fe7afffbe4dee1944f6e478817f
Creates a query. (queries.createquery)
[ { "docid": "dac2ab53a25b2db0049ca037a678c7f3", "score": "0.6676278", "text": "public function createquery(\\Google\\Service\\DoubleClickBidManager\\Query $postBody, $optParams = array())\n {\n $params = array('postBody' => $postBody);\n $params = array_merge($params, $optParams);\n return $this->call('createquery', array($params), 'Google\\Service\\DoubleClickBidManager\\Query');\n }", "title": "" } ]
[ { "docid": "c7ba86d8a95fda0f726ed820a6480b9c", "score": "0.80372614", "text": "function createQuery() ;", "title": "" }, { "docid": "ab019a7d9a0acb49e576be4b0ca61eac", "score": "0.79355484", "text": "public function createQuery() {}", "title": "" }, { "docid": "ab019a7d9a0acb49e576be4b0ca61eac", "score": "0.79355484", "text": "public function createQuery() {}", "title": "" }, { "docid": "ab019a7d9a0acb49e576be4b0ca61eac", "score": "0.79355484", "text": "public function createQuery() {}", "title": "" }, { "docid": "ab019a7d9a0acb49e576be4b0ca61eac", "score": "0.7934932", "text": "public function createQuery() {}", "title": "" }, { "docid": "b298c752a81f38c02c0083b50bf04aa2", "score": "0.7659569", "text": "public function createQuery() {\n\t\treturn $this->queryFactory->create($this->objectType);\n\t}", "title": "" }, { "docid": "e4a76d4c0aeecaf4a28a4c8de6e58f2b", "score": "0.76474863", "text": "public function createQuery(): QueryInterface;", "title": "" }, { "docid": "7fce0fc4ac5be884ddaf328777364e9a", "score": "0.74936455", "text": "abstract public function newQuery();", "title": "" }, { "docid": "4819adc40115c63afe480e36d567dfc3", "score": "0.7309364", "text": "public function newQuery();", "title": "" }, { "docid": "ac3d215a88f1016851dc324633e67fd3", "score": "0.72655344", "text": "public function createQuery()\n {\n $query = &atknew(\"atk.db.atk{$this->m_current_clusternode->m_type}query\");\n $query->m_db = $this;\n return $query;\n }", "title": "" }, { "docid": "50959345e93d81cb667a170c88ee4e29", "score": "0.7120133", "text": "public static function NewQuery()\r\n\t{\r\n\t\treturn new QSqlQuery();\r\n\t}", "title": "" }, { "docid": "19d1e9a45820ca6a1378d4ee58b54039", "score": "0.6955256", "text": "public function createQuery(): QueryInterface\n {\n /** @var QueryInterface $query */\n $query = $this->objectManager->get(QueryInterface::class);\n $query->setConfiguration($this->getConfiguration());\n\n return $query;\n }", "title": "" }, { "docid": "414e3116a6d45e2edd46d42d4cd2ff1b", "score": "0.6891108", "text": "public function createQuery($data);", "title": "" }, { "docid": "1a8a04f45e73db90347d2759cf581e16", "score": "0.6747873", "text": "public function createQuery() {\n\t\treturn $this->luceneQueryFactory->create($this);\n\t}", "title": "" }, { "docid": "843a8198c8a5e690ecbe9859bd7993a1", "score": "0.65685505", "text": "public static function createQuery()\n\t{\n\t\treturn new ActiveQuery(['modelClass' => get_called_class()]);\n\t}", "title": "" }, { "docid": "5ef12aa1f99bd39b92b80a5b1249c364", "score": "0.65468127", "text": "public function createQuery()\n {\n $query = $this->persistenceManager->createQueryForType($this->objectType);\n if ($this->defaultOrderings !== []) {\n $query->setOrderings($this->defaultOrderings);\n }\n if ($this->defaultQuerySettings !== null) {\n $query->setQuerySettings(clone $this->defaultQuerySettings);\n }\n return $query;\n }", "title": "" }, { "docid": "6ce1d437e1a562c501709dbddced9c9e", "score": "0.65423995", "text": "protected function createQuery()\n {\n return \\PropelQuery::from($this->class);\n }", "title": "" }, { "docid": "87555e719f739bff6f41f995ad46a254", "score": "0.65390944", "text": "public function createQuery(): string\n {\n return 'INSERT INTO products(name,quantity,price,msrp) \n VALUES(:name,:quantity,:price,:msrp)';\n }", "title": "" }, { "docid": "b799efd9be5a0ea35721be7c2ed07d5a", "score": "0.6538853", "text": "public function createQuery()\n\t{\n\t\t$this->tab[] = $this->action;\n\t\t$this->tab[] = !is_array($this->field) ? $this->field : join(', ',$this->field);\n\t\t$this->tab[] = ' FROM '.$this->from;\n\t\tif(!empty($this->where)){$this->tab[] = 'WHERE '.$this->where;}\n\t\tif(!empty($this->and)){$this->tab[] = 'AND '.$this->and;}\n\t\tif(!empty($this->or)){$this->tab[] = 'OR '.$this->or;}\n\t\tif(!empty($this->in)){$this->tab[] = 'IN '.$this->in;}\n\t\tif(!empty($this->beetween)){$this->tab[] = 'BEETWEEN '.$this->beetween;}\n\t\tif(!empty($this->not)){$this->tab[] = 'NOT '.$this->not;}\n\t\tif(!empty($this->like)){$this->tab[] = 'LIKE '.$this->like;}\n\t\tif(!empty($this->order)){$this->tab[] = 'ORDER BY '.$this->order;}\n\t\treturn join(\" \",$this->tab);\n\t}", "title": "" }, { "docid": "f06ea404525d1b6746212114d76d27c2", "score": "0.65288377", "text": "public function create($query, array $options = [])\n\t{\n\t}", "title": "" }, { "docid": "f2a65ee2e7d3b9b28b635f7ad9ac90dd", "score": "0.6527017", "text": "public function create($query, array $options = [])\n {\n }", "title": "" }, { "docid": "1247855c43646003c809460819487b2a", "score": "0.65257275", "text": "public function createQuery(Collection $collection, QueryCreateStruct $queryCreateStruct): Query;", "title": "" }, { "docid": "3f9bfd5a5f246eedef9806af50759680", "score": "0.649955", "text": "public static function query()\n {\n return (new static)->newQuery();\n }", "title": "" }, { "docid": "3f9bfd5a5f246eedef9806af50759680", "score": "0.649955", "text": "public static function query()\n {\n return (new static)->newQuery();\n }", "title": "" }, { "docid": "d7a35a05999455b69afaed5eecc73954", "score": "0.6496733", "text": "function addQuery() {}", "title": "" }, { "docid": "dd7f84a9608629f727a79e8a16ff4eee", "score": "0.6465198", "text": "public function createQuery ($dql = '')\r\n {\r\n $query = parent::createQuery($dql);\r\n\r\n $lifetime = 3600;\r\n // $parameters = $query->getParameters();\r\n // $resultCacheId = md5(HOSTNAME . $query->getDQL() . serialize($parameters));\r\n $query->useResultCache(true, $lifetime)\r\n ->useQueryCache(true)\r\n ->setCacheable(true)\r\n ->setCacheMode(\\Doctrine\\ORM\\Cache::MODE_NORMAL)\r\n ->setLifetime($lifetime);\r\n\r\n return $query;\r\n }", "title": "" }, { "docid": "52ba9ff7812ec047ffd5d93a7f2c7352", "score": "0.64141595", "text": "public function createQuery()\n\t{\n\t\treturn $this->pp->createQuery('modules_blog/post');\n\t}", "title": "" }, { "docid": "7cfd7e6e2cecf31d7527f1cdc1e391c9", "score": "0.6378648", "text": "public function createQuery()\n {\n $query = parent::createQuery();\n $query->getQuerySettings()->setRespectStoragePage(false);\n return $query;\n }", "title": "" }, { "docid": "57bf2632bc52a9872f699f4fb0974598", "score": "0.63276863", "text": "public function newQuery($query = null)\n {\n if ($query === null) {\n $query = app()->make($this->modelClass)->newQuery();\n }\n\n if ($this->trashed === 'only') {\n $query->onlyTrashed();\n } elseif ($this->trashed === 'with') {\n $query->withTrashed();\n }\n\n if (!empty($this->with)) {\n $query->with($this->with);\n }\n\n if (!empty($this->select)) {\n $query->select($this->select);\n }\n\n return $query;\n }", "title": "" }, { "docid": "3d949708055af6921ba072548eb47bf2", "score": "0.6301283", "text": "public function create($query) {\r\n //Se verifica que el query tenga datos\r\n if (is_null($query) || $query == \"\") {\r\n exit(\"La consulta viene vacia\");\r\n return;\r\n }\r\n\r\n //Se concatena el insert\r\n $query = \"INSERT INTO \" . $this->tabla . $query;\r\n\r\n //Se imprime la consulta a ejecutar (SOLO EN PRUEBAS)\r\n// echo '<script type=\"text/javascript\"> console.log(\"' . $query . '\");</script>';\r\n //Se prepara la consulta pasando el query\r\n $sentencia = $this->con->prepare($query);\r\n\r\n //Dependiendo de la inserccion se retorna true o false\r\n return $sentencia->execute();\r\n }", "title": "" }, { "docid": "06cda0c7122a3615e3c39fe536548aba", "score": "0.629931", "text": "public function query(): QueryBuilder;", "title": "" }, { "docid": "9b28d9ef1acf4ddbf75a533b2e288174", "score": "0.6236732", "text": "public function newQuery()\n {\n return new self($this->connection, $this->grammar, $this->getProcessor());\n }", "title": "" }, { "docid": "fae0255a690fd0a74f0accf290d31afd", "score": "0.62349755", "text": "public function newQuery()\n {\n return new self($this->connection, $this->processor);\n }", "title": "" }, { "docid": "e534bb0065e96a9de23c142880f6b850", "score": "0.6195255", "text": "public function createQuery($body = null, $fields = null)\n {\n list($response) = $this->createQueryWithHttpInfo($body, $fields);\n return $response;\n }", "title": "" }, { "docid": "08be894f0296fb80610dc29821a8e2ca", "score": "0.6147973", "text": "protected function createDerivedQuery(): Query\n {\n return (clone $this->baseQuery);\n }", "title": "" }, { "docid": "417ba1e99a7dc59988a9d804633f648d", "score": "0.61418074", "text": "public function query($query);", "title": "" }, { "docid": "417ba1e99a7dc59988a9d804633f648d", "score": "0.61418074", "text": "public function query($query);", "title": "" }, { "docid": "417ba1e99a7dc59988a9d804633f648d", "score": "0.61418074", "text": "public function query($query);", "title": "" }, { "docid": "588c4b61728e56c034e2968952471be7", "score": "0.61392957", "text": "public function newQuery()\n {\n return new Builder($this->connection, $this->grammar, $this->processor);\n }", "title": "" }, { "docid": "51049b7b89a4a1a99fc844ccd900cc22", "score": "0.61338776", "text": "public function createQueryBuilder()\n {\n return new Query\\QueryBuilder($this);\n }", "title": "" }, { "docid": "9dde15f5590ecd702ae22788b8dc0cb3", "score": "0.6126419", "text": "public function createNamedQuery($queryName);", "title": "" }, { "docid": "4128b02610d20f5085924f4adb3d3dae", "score": "0.6091163", "text": "public function createQueryApi(): QueryApi;", "title": "" }, { "docid": "5ad5c1a32c4f2c99cffc608da9332677", "score": "0.6080147", "text": "protected function query() {\n\t\treturn new Query($this);\n\t}", "title": "" }, { "docid": "39e4916fa707b768cdfc336170040d9d", "score": "0.60707426", "text": "public function newQuery()\n {\n return new Builder($this->connection, $this->processor);\n }", "title": "" }, { "docid": "8ca556a00e6c5f8ddc6b79bc8d047b8f", "score": "0.6068553", "text": "static public function create($table = null) {\n $q = new Q();\n if ($table) $q->from($table);\n return $q;\n }", "title": "" }, { "docid": "5ee9adbdbd66898e23d11da7b4fbd19a", "score": "0.6066211", "text": "abstract protected function initQuery(Query $query): Query;", "title": "" }, { "docid": "4c6afeb622e29151e21315dfcf8d07fb", "score": "0.60658336", "text": "public function createQueryBuilder()\n {\n return new QueryBuilder($this->db);\n }", "title": "" }, { "docid": "7059ce40252b741fc1b93e29023c3043", "score": "0.6058352", "text": "protected function getCreatedQuery()\n {\n return $this->createdQuery;\n }", "title": "" }, { "docid": "76b35870a67395b373d3e98102ad8fa7", "score": "0.6053966", "text": "public function createQueryBuilder ()\r\n {\r\n return new QueryBuilder($this);\r\n }", "title": "" }, { "docid": "8970b3260168c57d63f48dd6d9d2fbbd", "score": "0.6045893", "text": "public static function query();", "title": "" }, { "docid": "b8a88ae96272d4ebfa98c24d78c0a0fd", "score": "0.6037675", "text": "public static function query()\n {\n QueryBuilder::$dataSource = true;\n\n return new QueryBuilder();\n }", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.60350287", "text": "public function query();", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.60350287", "text": "public function query();", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.60350287", "text": "public function query();", "title": "" }, { "docid": "0454b4b42b0164bbe3bea7ba2299b09b", "score": "0.60306954", "text": "public function newQuery()\n {\n $datasource = $this->getDatasource();\n\n $query = new Builder($datasource, $datasource->getPostProcessor());\n\n return $query->setModel($this);\n }", "title": "" }, { "docid": "6f915df9bb0d5aef41c80ffdac0a46ac", "score": "0.6012602", "text": "protected function createQueryBuilder()\n {\n $builder = new QueryBuilder();\n return $builder;\n }", "title": "" }, { "docid": "8af628faf8248e872097fd3693d33cd5", "score": "0.6001947", "text": "public function query(): QueryInterface;", "title": "" }, { "docid": "b14073549a9590056313fc75e46ef40c", "score": "0.598466", "text": "public function newModelQuery();", "title": "" }, { "docid": "c964a346294d1bd31d0a8790573c6eeb", "score": "0.59745663", "text": "public function addNewInsertQuery(){\r\n $query = new SQLInsertQuery();\r\n $this->add($query);\r\n return $query;\r\n }", "title": "" }, { "docid": "9ead9b03e73a73d8aa20e2aa458a63a1", "score": "0.597272", "text": "public function newQuery($action,$name=null){\n $name = isset($name) ? $name : count($this->querys);\n $this->querys[$name] = new ECP_DatabaseQuery($action,$this->_conf);\n return $this->querys[$name];\n }", "title": "" }, { "docid": "fe807ce8c569d75b003f93c5823a59a8", "score": "0.596385", "text": "public function toQuery();", "title": "" }, { "docid": "6b28823f1aa91124c90b9ad094c6a911", "score": "0.5949999", "text": "public function query(QueryObject $query);", "title": "" }, { "docid": "df7d16489623cb307caa1031923c67f8", "score": "0.5934791", "text": "function isCreateQuery(&$q) {\n\t\t$m=array();\n\t\t\n\t\tif(preg_match(\"/CREATE[[:space:]]+TABLE[[:space:]]+([a-zA-Z0-9_-]+)/\",$q,$m)) {\n\t\t\treturn $m[1];\n\t\t}\n\t\t\n\t\treturn ''; \n\t}", "title": "" }, { "docid": "7f0eb86f9ab344f332d5a96dafebab7e", "score": "0.5921993", "text": "public function createQuery($queryName, $parentListId, $parentFolderId, $condition, $isPrivate = true)\n {\n $data['Envelope'] = array(\n 'Body' => array(\n 'CreateQuery' => array(\n 'QUERY_NAME' => $queryName,\n 'PARENT_LIST_ID' => $parentListId,\n 'PARENT_FOLDER_ID' => $parentFolderId,\n 'VISIBILITY' => ($isPrivate ? '0' : '1'),\n 'CRITERIA' => array(\n 'TYPE' => 'editable',\n 'EXPRESSION' => $condition,\n ),\n ),\n ),\n );\n\n $response = $this->_request($data);\n $result = $response[\"Envelope\"][\"Body\"][\"RESULT\"];\n\n if($this->_isSuccess($result)) {\n if(isset($result['ListId']))\n return $result['ListId'];\n else {\n throw new Exception('Query created but no query ID was returned from the server.');\n }\n }\n else {\n throw new Exception(\"createQuery Error: \".$this->_getErrorFromResponse($response));\n }\n }", "title": "" }, { "docid": "046ec3bec92c6c1e3cd88e6a199eddd5", "score": "0.5894573", "text": "function Sql_DB_Create_Query($db=\"\")\n {\n if (empty($db)) { $db=$this->DBHash[ \"DB\" ]; }\n \n return \"CREATE DATABASE IF NOT EXISTS \".$db;\n }", "title": "" }, { "docid": "ad9661b1a23758869f664c298a7bf00b", "score": "0.5875437", "text": "public function query()\n {\n return new QueryBuilder(\n $this, $this->getQueryGrammar(), $this->getPostProcessor()\n );\n }", "title": "" }, { "docid": "ad9661b1a23758869f664c298a7bf00b", "score": "0.5875437", "text": "public function query()\n {\n return new QueryBuilder(\n $this, $this->getQueryGrammar(), $this->getPostProcessor()\n );\n }", "title": "" }, { "docid": "69c38d6e04917f9de126c896df537099", "score": "0.5874199", "text": "public static function query($query){\n if(!self::$connection){\n self::initDb();\n }\n\n return self::$connection->query($query);\n }", "title": "" }, { "docid": "1d97790ea621d55c1f3d8711f5890d9b", "score": "0.5870821", "text": "public function create_query($data){\n\n return $this->db->insert('consulta', $data);\n\n }", "title": "" }, { "docid": "d17c74040fb607e677408130ea88a63f", "score": "0.5864189", "text": "public function query() {\n $this->field_alias = $this->real_field;\n if (isset($this->definition['trovequery'])) {\n $this->query->add_where('', $this->definition['trovequery']['arg'], $this->definition['trovequery']['value']);\n }\n }", "title": "" }, { "docid": "30078d968b58f1dd45a14807560db0fe", "score": "0.58459896", "text": "public function testQueryCreation()\n {\n $where = 'id > :min_user_id';\n $limit = 50;\n $offset = 2;\n $orderBy = ['name' => SORT_ASC];\n $indexBy = 'id';\n $select = ['id' => 'id', 'name' => 'name', 'articles_count' => 'count(*)'];\n $selectOption = 'SQL_NO_CACHE';\n $from = 'recent_users';\n $groupBy = 'id';\n $having = ['>', 'articles_count', 0];\n $params = [':min_user_id' => 100];\n list($joinType, $joinTable, $joinOn) = $join = ['INNER', 'articles', 'articles.author_id=users.id'];\n\n $unionQuery = (new Query())\n ->select('id, name, 1000 as articles_count')\n ->from('admins');\n\n $withQuery = (new Query())\n ->select('id, name')\n ->from('users')\n ->where('DATE(registered_at) > \"2020-01-01\"');\n\n // build target query\n $sourceQuery = (new Query())\n ->where($where)\n ->limit($limit)\n ->offset($offset)\n ->orderBy($orderBy)\n ->indexBy($indexBy)\n ->select($select, $selectOption)\n ->distinct()\n ->from($from)\n ->groupBy($groupBy)\n ->having($having)\n ->addParams($params)\n ->join($joinType, $joinTable, $joinOn)\n ->union($unionQuery)\n ->withQuery($withQuery, $from);\n\n $newQuery = Query::create($sourceQuery);\n\n $this->assertEquals($where, $newQuery->where);\n $this->assertEquals($limit, $newQuery->limit);\n $this->assertEquals($offset, $newQuery->offset);\n $this->assertEquals($orderBy, $newQuery->orderBy);\n $this->assertEquals($indexBy, $newQuery->indexBy);\n $this->assertEquals($select, $newQuery->select);\n $this->assertEquals($selectOption, $newQuery->selectOption);\n $this->assertTrue($newQuery->distinct);\n $this->assertEquals([$from], $newQuery->from);\n $this->assertEquals([$groupBy], $newQuery->groupBy);\n $this->assertEquals($having, $newQuery->having);\n $this->assertEquals($params, $newQuery->params);\n $this->assertEquals([$join], $newQuery->join);\n $this->assertEquals([['query' => $unionQuery, 'all' => false]], $newQuery->union);\n $this->assertEquals(\n [['query' => $withQuery, 'alias' => $from, 'recursive' => false]],\n $newQuery->withQueries\n );\n }", "title": "" }, { "docid": "2e755eedd8a0e2904cccf586d0cba5ac", "score": "0.5845162", "text": "public function query() {\n\t\treturn SalesHistoryQuery::create();\n\t}", "title": "" }, { "docid": "36d5f332cb196b7a934c9fc73c06f48f", "score": "0.5841152", "text": "public function newQuery() {\n return new Builder($this->connection);\n }", "title": "" }, { "docid": "13c2ca519f65c8f539b9ef9427d5486a", "score": "0.58231044", "text": "function createTable ($name, $query)\n\t{\n\t\tqueryMysql(\"CREATE TABLE IF NOT EXISTS $name($query)\");\n\t\techo \"Table $name created or already exists.<br>\";\n\t}", "title": "" }, { "docid": "6bb09220f138da60fb7a1b975ce5aa0e", "score": "0.58226067", "text": "public function query(): Query\n {\n return new Query($this->getWebservice(), $this);\n }", "title": "" }, { "docid": "6bcd790c8affa8ebe9c2df47be52272a", "score": "0.5822327", "text": "public function createNamedQuery($queryName)\n {\n return $this->_em->createQuery(\n $this->_class->getNamedQuery($queryName)\n );\n }", "title": "" }, { "docid": "1b62b6409a944ca8215275588f805e3f", "score": "0.5820603", "text": "public function query($query)\n {\n }", "title": "" }, { "docid": "1b62b6409a944ca8215275588f805e3f", "score": "0.5820603", "text": "public function query($query)\n {\n }", "title": "" }, { "docid": "1b62b6409a944ca8215275588f805e3f", "score": "0.5820603", "text": "public function query($query)\n {\n }", "title": "" }, { "docid": "1b62b6409a944ca8215275588f805e3f", "score": "0.5820603", "text": "public function query($query)\n {\n }", "title": "" }, { "docid": "1b62b6409a944ca8215275588f805e3f", "score": "0.5819284", "text": "public function query($query)\n {\n }", "title": "" }, { "docid": "1b62b6409a944ca8215275588f805e3f", "score": "0.5819284", "text": "public function query($query)\n {\n }", "title": "" }, { "docid": "0fd71834d05cdb9da1736b6ffd5158bf", "score": "0.58173966", "text": "private function createTask() {\n $query = $this->createQuery();\n\n\t\techo $query;\n\n $task = $this->database->prepare($query);\n $task->execute($this->queryProperty->getWhereArgs());\n return $task;\n }", "title": "" }, { "docid": "2443686a1e65e24766bec65d01904274", "score": "0.5806226", "text": "abstract protected function initQuery(): void;", "title": "" }, { "docid": "d8d79538c483aabf9b07f8539365e3fa", "score": "0.57870424", "text": "function createTable($name, $query)\n {\n echo \"Creating table '$name' ... \";\n //a fuction included in functions.php\n queryMysql(\"CREATE TABLE IF NOT EXISTS $name($query)\");\n echo \"OK <br>\";\n }", "title": "" }, { "docid": "4977a6ac73e2e6c31eccf9202292a1e5", "score": "0.57771367", "text": "private function buildQuery(): void\n {\n $this->query = self::CREATE_TABLE;\n\n if ($this->ifNotExists) {\n $this->query .= self::IF_NOT_EXISTS;\n }\n\n $this->query .= $this->table . self::OPENING_BRACKET;\n\n $this->query .= join(', ', $this->columns);\n\n if (!empty($this->keys)) {\n $this->query .= ',' . join(',', $this->keys);\n }\n\n $this->query .= self::CLOSING_BRACKET;\n\n if (!empty($this->engine)) {\n $this->query .= self::ENGINE . $this->engine;\n }\n\n if (!empty($this->charset)) {\n $this->query .= self::CHARSET . $this->charset;\n }\n }", "title": "" }, { "docid": "c920dc32f42964909a1eccfdf55fec6e", "score": "0.5771699", "text": "private function _createFolderQuery(): Query\n {\n return (new Query())\n ->select(['id', 'parentId', 'volumeId', 'name', 'path', 'uid'])\n ->from([Table::VOLUMEFOLDERS]);\n }", "title": "" }, { "docid": "99a128098d251de9278b15ac45a54cc0", "score": "0.5752575", "text": "public function query(IQuery $query);", "title": "" }, { "docid": "2c8425d72177e25a69ed666b8ffbbbf4", "score": "0.5750268", "text": "function query() {\n }", "title": "" }, { "docid": "19f7820eaa2168b0e8e449669bc1aaac", "score": "0.57483214", "text": "public function create($query) {\n\t\ttry {\n\n\t\t\n\n\t\t\t$table = mysqli_multi_query($this->conn, $query);\n\t\t\t\n\t\t\t\tif(!$table) {\n\t\t\t\t\tthrow new Exception(_CREATE_TABLE_ERROR . $query);\n\t\t\t\t}\n\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\t$this->error = $e->getMessage();\n\t\t}\n\t}", "title": "" }, { "docid": "1499ea13bd432e1905254c86f4c863e1", "score": "0.57443404", "text": "protected function retrieveOrCreateQueryInstance()\n {\n return $this->queryBuilder ?? $this->queryBuilder = new $this->model();\n }", "title": "" }, { "docid": "adee7e9516e529a8b913f92854d076d9", "score": "0.5742497", "text": "function query() {}", "title": "" }, { "docid": "82bad37d85ee69f9680a866b5df09844", "score": "0.57335204", "text": "public function query(Query $query): QueryResult\n {\n $this->connect();\n\n $generator = new SQL(function ($value) {\n return str_replace(\"'\", \"''\", $value);\n });\n\n $generator->columnEnclosure = \"\";\n $generator->tableEnclosure = \"\";\n\n $queryString = $generator->generate($query);\n\n $rawQueryResult = $this->rawQuery($queryString);\n\n $result = new QueryResult((bool)$rawQueryResult);\n $result->setQueryString($queryString);\n foreach ($rawQueryResult as $resultRow) {\n /** @var class-string<ModelInterface> $modelClass */\n $modelClass = $query->modelClassName;\n $model = $modelClass::getModelFromData($resultRow);\n $result->add($model);\n }\n\n return $result;\n }", "title": "" }, { "docid": "278871b92e07be92ac091d2bc925d383", "score": "0.5731522", "text": "public function createQuery()\n\t{\n\t\treturn $this->pp->createQuery('modules_event/highlight');\n\t}", "title": "" }, { "docid": "bb75a8b0bab3f830f9e85277906a3b95", "score": "0.57210314", "text": "public static function query()\n {\n // Create a new model instance for the query to ensure\n // that the model's initialize() method gets called.\n // Otherwise, the property definitions will be incomplete.\n $model = new static();\n\n return new Query($model);\n }", "title": "" }, { "docid": "f8ebdcefeca897e604e1ba743e2ed205", "score": "0.5716543", "text": "public function createSearchQuery()\n {\n $query = new SearchQuery($this->elastic);\n $query->listeners = $this->listeners;\n return $query;\n }", "title": "" }, { "docid": "d9102fdc1eb19c27188f8fc7b5a26e81", "score": "0.5693548", "text": "abstract public function query();", "title": "" }, { "docid": "5224fa018e1b7b3484cd6f24a5f8e83c", "score": "0.5689255", "text": "public function newQueryWithoutScopes();", "title": "" }, { "docid": "a5ba675630257841b274862989b19084", "score": "0.56854", "text": "public function newQuery(array $queries)\n {\n if (!empty($queries)) {\n $container = new BoolQuery();\n\n foreach ($queries as $query) {\n $container = $this->addQueryToContainer($query, $container);\n }\n\n $query = new ElasticaQuery($container);\n $query->addSort('_score');\n } else {\n $query = new ElasticaQuery();\n }\n\n return $query;\n }", "title": "" }, { "docid": "2a3cf13aee0beddc225b2a1aeb222aad", "score": "0.5681681", "text": "function prepareQuery() {\n\t\t$q = \"SET \n\t\t\t\t\t`template` = '{$this->newIdt}',\n\t\t\t\t\t`description` = '{$this->description}',\n\t\t\t\t\t`PostsHeader` = '{$this->postsHeader}',\n\t\t\t\t\t`PostBody` = '{$this->postBody}',\n\t\t\t\t\t`PostsFooter` = '{$this->postsFooter}',\n\t\t\t\t\t`FormLogged` = '{$this->formLogged}',\n\t\t\t\t\t`Form` = '{$this->form}',\n\t\t\t\t\t`Navigation` = '{$this->navigation}',\n\t\t\t\t\t`Name` = '{$this->name}',\n\t\t\t\t\t`NameLin` = '{$this->nameLin}',\n\t\t\t\t\t`MemberName` = '{$this->memberName}',\n\t\t\t\t\t`Date` = '{$this->date}',\n\t\t\t\t\t`Time` = '{$this->time}',\n\t\t\t\t\t`NextPage` = '{$this->nextPage}',\n\t\t\t\t\t`PreviousPage` = '{$this->previousPage}',\n\t\t\t\t\t`FirstPage` = '{$this->firstPage}',\n\t\t\t\t\t`LastPage` = '{$this->lastPage}',\n\t\t\t\t\t`UrlsToLinks`\t=\t'\".($this->urlToLink ? 'yes' : 'no').\"',\n\t\t\t\t\t`EmoToImg` \t\t=\t'\".($this->emoToImg ? 'yes' : 'no').\"',\n\t\t\t\t\t`GravDefault`\t=\t'{$this->gravDefault}',\n\t\t\t\t\t`GravSize`\t\t=\t{$this->gravSize}\";\n\t\treturn $q;\n\n\t}", "title": "" } ]
21d914072c490a5d78a0768819b46d85
editar registro de la tbla boletin
[ { "docid": "7da723fa6cee81c2e8a50354f1662c52", "score": "0.72512805", "text": "public function editar($idFormatosDian,$titulo,$archivo){\n\n$sql=\"UPDATE formatosdian SET titulo='$titulo', archivo='$archivo' WHERE idFormatosDian='$idFormatosDian'\";\nreturn ejecutarConsulta($sql);\n\n }", "title": "" } ]
[ { "docid": "9259c485ad5627e9efa142e6a7bbd63c", "score": "0.79883", "text": "protected function editar()\n {\n }", "title": "" }, { "docid": "3a1d12be6dc70dbdfe983fb58cb41e42", "score": "0.7963377", "text": "public function editar()\n\t{\n $id = intval(self::get(\"id\"));\n\n $usuario = $this->leerAtributo(\"objeto\")->filtrar(array(\"Usuario.id = '$id'\"));\n $usuario = self::leerArregloEstatico($usuario, 0);\n $this->pasarVariable(\"usuario\", $usuario);\n\n $this->pasarVariable(\"id\", $id);\n\n if(sizeof($_POST) > 0)\n {\n $this->leerAtributo(\"objeto\")->edita($id, $_POST);\n echo json_encode($this->leerAtributo(\"objeto\")->leerAtributo('errores'));\n exit;\n }\n\n\t}", "title": "" }, { "docid": "964be736521c02392a55a9bbf62fa264", "score": "0.79334307", "text": "public function editSalida()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "3066c3301aacfc36bb9428b3f34719df", "score": "0.78523564", "text": "public function edit($empresa)\n {\n //\n }", "title": "" }, { "docid": "22f245f476f1267854b6163d62d180dd", "score": "0.7774277", "text": "public function Editar(){\n\n \t//GUARDA O ID DO CONTATO PASSADO NA VIEW\n\t\t\t$idFuncionario = $_GET['id'];\n\n\t\t\t//INSTANCIA A CLASSE CONTATO\n\t\t\t$funcionario = new Funcionario();\n\n\t\t\t//DEFINE O ID DO CONTATO COM O VALOR DA VARIÁVEL\n\t\t\t$funcionario->id_funcionario = $idFuncionario;\n $funcionario->id_cargo = $_POST['slt_cargo'];\n $funcionario->nome = $_POST['txt_nome'];\n $funcionario->sobrenome = $_POST['txt_sobrenome'];\n $funcionario->dt_nasc = $_POST['txt_dt_nasc'];\n $funcionario->rg = $_POST['txt_rg'];\n $funcionario->cpf = $_POST['txt_cpf'];\n\n $funcionario::update($funcionario);\n\t\t}", "title": "" }, { "docid": "4e0bea10e028e8c50e289d4a7a2aebf9", "score": "0.77382463", "text": "public function edit(TBFormulario $tBFormulario)\n {\n //\n }", "title": "" }, { "docid": "86913f06bbfcfe51069d8a86a1cca977", "score": "0.7722216", "text": "function editar() {\n $data['idCliente'] = $_POST['idCliente'];\n $data['nombre'] = $_POST['txtNombre'];\n $data['apellido'] = $_POST['txtApellido'];\n $data['direccion'] = $_POST['txtDireccion'];\n $data['telefonoCelular'] = $_POST['txtCelular'];\n $data['telefonoCasa'] = $_POST['txtCasa'];\n \n //cargamos el modelo y llamamos a la función update()\n $this->load->model('modeloMantenimientoAdministrador');\n $this->modeloMantenimientoAdministrador->update($data);\n //volvemos a cargar la primera vista\n $this->index();\n }", "title": "" }, { "docid": "ed44bf439d0a4c323b0dc46346ce45d3", "score": "0.76986223", "text": "function editar(){\r\n\r\n $usuario_dao= new usuario_dao();\r\n $ativo=\"\";\r\n $resultado=$usuario_dao::selecionar($_POST[\"id\"],$ativo);\r\n echo \"Editar usuário¨\".$resultado;\r\n\r\n }", "title": "" }, { "docid": "36b4d97511b5d09ddf9495db3529e25b", "score": "0.76574063", "text": "function editarAlumno() \n {\n \t$alumno\t\t= $this->input->post('alumno');\n\t\t$id_alumno\t= $this->input->post('id_alumno');\n\t\t\n\t\t$registro = array(\n\t\t\t'alumno'\t=> $alumno,\n\t\t);\n\t\t\n\t\t$this->model->update($registro, $id_alumno);\n\t\t\t\n\t\techo 'ok';\n \t \n }", "title": "" }, { "docid": "1354f4d285eede0d0bc77fb0aba14a1d", "score": "0.7636982", "text": "public function edit(tratamento $tratamento)\n {\n //\n }", "title": "" }, { "docid": "290162f6eee598845b26949acd1fd53d", "score": "0.7636922", "text": "public function edit();", "title": "" }, { "docid": "a76eb7a9666dc4db3a32b4c998456f5f", "score": "0.76274353", "text": "public function edit($id_inmueble,$anio)\n\t{\n\n\t}", "title": "" }, { "docid": "08d3f678336449305fe6ea9423105573", "score": "0.76242346", "text": "public function edit(Contrato $contrato)\n {\n //\n }", "title": "" }, { "docid": "4ba3074a0066e7effecffc48b49a4541", "score": "0.7623534", "text": "public function edit(tb_transaksi $tb_transaksi)\n {\n //\n }", "title": "" }, { "docid": "81d42d32598b7cfb4c19a4eb6422044a", "score": "0.7610493", "text": "public function actionEditItem()\r\n {\r\n Yii::import('booster.components.TbEditableSaver');\r\n $es = new TbEditableSaver('DetalleOrdenCompra');\r\n $es->update();\r\n }", "title": "" }, { "docid": "17e8986013031b83ed0601d5a91d4cbb", "score": "0.76027995", "text": "public function edit(Bitacora $bitacora)\n {\n //\n }", "title": "" }, { "docid": "47702f0617dd05f396cf7d34090f013a", "score": "0.7593478", "text": "public function editar($id)\n {\n //\n }", "title": "" }, { "docid": "a3ac4e74dad5a8abef276c0de463d907", "score": "0.7591177", "text": "public function edit(Tirada $tirada)\n {\n //\n }", "title": "" }, { "docid": "402963a41f393a89a5480c9c72cd8ee9", "score": "0.75650233", "text": "public function edit(Convidado $convidado)\n {\n }", "title": "" }, { "docid": "132d1304d9c8818f180bc8b6643d1cd9", "score": "0.7564256", "text": "function editar_registro2(){\n $this->accion=\"Editar Registro de Cliente\";\n if (isset($_POST['envio']) && $_POST['envio']==\"Actualizar\"){\n $id=$_GET['id'];\n $this->asignar_valores();\n $this->nacimiento=$this->convertir_fecha($this->nacimiento);\n $sql=\"UPDATE registro SET categoria_reg='$this->categoria', nombre_reg='$this->nombre', apellido_reg='$this->apellido', sexo_reg='$this->sexo', nacimiento_reg='$this->nacimiento', lugar_reg='$this->lugar', tipo_reg='$this->tipo', cedula_reg='$this->cedula', correo_reg='$this->correo', correo2_reg='$this->correo2', telefono_reg='$this->telefono', celular_reg='$this->celular', direccion_reg='$this->direccion', pais_reg='$this->pais', estado_reg='$this->estado', municipio_reg='$this->municipio', website_reg='$this->website' , publicidad_reg='$this->publicidad', medio_reg='$this->medio', catalogo_reg='$this->catalogo' WHERE id_reg='$id'\";\n $consulta=mysql_query($sql) or die(mysql_error());\n $this->mensaje=2;\n //header(\"location:/perfil.php\");\n\n }else{\n $this->mostrar_registro();\n }\n }", "title": "" }, { "docid": "3f5be8d3166f037151a7006e42980ad0", "score": "0.75626725", "text": "function editar(){\n\t\t\n\t\tif($this->Nombre) $this->db->set('Nombre', $this->Nombre);\n\t\tif($this->Cargo) $this->db->set('Cargo', $this->Cargo);\n\t\tif($this->Celular) $this->db->set('Celular', $this->Celular);\n\t\tif($this->Email) $this->db->set('Email', $this->Email);\n\t\tif($this->Email_personal) $this->db->set('Email_personal', $this->Email_personal);\n\t\tif($this->Activo) $this->db->set('Activo', $this->Activo);\n\t\t\n\t\tif($this->ID_contacto){ \n\t\t\t$this->db->where('ID_contacto', $this->ID_contacto);\n\t\t\t$Q = $this->db->update($this->tabla);\n\t\t\n\t\t\tif($Q) return true;\n\t\t\telse return false;\n\t\t}else return false;\n\t}", "title": "" }, { "docid": "164328a65ab0763107ca234810ea5ddc", "score": "0.7549518", "text": "public function edit(Mascota $mascota)\n {\n \n }", "title": "" }, { "docid": "88c8b685b0273f9d9cd0a6b67b97eb4d", "score": "0.75459874", "text": "public function edit()\n {\n if ($this->superAdmin()) {\n if (isset($_POST['id_producto'])) {\n $id = $_POST['id_producto'];\n $productos=$this->model->getProducto($id);\n $this->view->mostraredit($productos);\n }\n }\n }", "title": "" }, { "docid": "6a4d3d96368cfef19b3b7eb13f71b875", "score": "0.7522636", "text": "public function edit(Reserva $reserva)\n {\n //\n }", "title": "" }, { "docid": "4a018125e5fef45fe9e9881cfad9bb4b", "score": "0.7515139", "text": "public function edit(Entrada $entrada)\n {\n //\n }", "title": "" }, { "docid": "4c916f037dc464a2c4a3c03afa393e9f", "score": "0.75122005", "text": "public function edit($medico_Especialidad)\n {\n //\n }", "title": "" }, { "docid": "5f6895620c5fcd56d8328212d371b950", "score": "0.75102335", "text": "public function editar($id) {\r\n\t\t$data_editar = $this->input->post();\r\n\r\n\t\t//eliminado valores del formulario que no se agregaran a la BD\r\n\t\tunset($data_editar['btn_guardar']);\r\n\t\t\r\n\t\t$query = $this->db->where('id_cliente', $id);\r\n\t\t$this->db->update('clientes', $data_editar);\r\n\r\n\t}", "title": "" }, { "docid": "75434006d4c8ff0c24ae91b73d3c08fe", "score": "0.74974626", "text": "public function edit(TrabalhoAcademico $trabalhoAcademico)\n {\n //\n }", "title": "" }, { "docid": "319dc7657e35aed864778cce5465abc6", "score": "0.74838173", "text": "public function editarLibro(){\r\n $datosController = array(\r\n \"ISBN\"=>$_POST[\"inISBN\"],\r\n \"nombre\"=>$_POST[\"innombre\"],\r\n \"autor\"=>$_POST[\"inautor\"],\r\n \"editorial\"=>$_POST[\"ineditorial\"],\r\n \"edición \"=>$_POST[\"inedición\"],\r\n \"ano\"=>$_POST[\"inano\"]\r\n );\r\n //Enviamos al modelo el id para hacer la consulta y obtener sus Datos\r\n $respuesta = Datos::editarLibroModel($datosController, \"usuarios\");\r\n //Recibimos respuesta del modelo e IMPRIMOS UN FORM PARA Editar\r\n echo '<input type=\"hidden\" value=\"'.$respuesta[\"id\"].'\" name=\"idEditar\">\r\n <input type=\"text\" value=\"'.$respuesta[\"ISBN\"].'\" name=\"usuarioEditar\" required>\r\n <input type=\"hidden\" value=\"'.$respuesta[\"nombre\"].'\" name=\"passwordEditar\" required>\r\n <input type=\"hidden\" value=\"'.$respuesta[\"autor\"].'\" name=\"emailEditar\" required>\r\n <input type=\"hidden\" value=\"'.$respuesta[\"editorial\"].'\" name=\"emailEditar\" required>\r\n <input type=\"hidden\" value=\"'.$respuesta[\"edición\"].'\" name=\"emailEditar\" required>\r\n <input type=\"hidden\" value=\"'.$respuesta[\"ano\"].'\" name=\"emailEditar\" required>\r\n <input type=\"submit\" value=\"Actualizar\">';\r\n }", "title": "" }, { "docid": "cb2261367347f353f94c215c0432f927", "score": "0.7483362", "text": "public function edit($depo_sorumlu_id)\n {\n //\n \n }", "title": "" }, { "docid": "fcdc263d1a3b61235d68ac495c991252", "score": "0.7467012", "text": "public function edit(Contato $contato)\n {\n //\n }", "title": "" }, { "docid": "37d54d2c4cdf3b946aebf3a539fc01f2", "score": "0.74644434", "text": "public function edit(Escalacao $escalacao)\n {\n //\n }", "title": "" }, { "docid": "c5ce48b6eb6e3ec40a2370170c7a2de6", "score": "0.74433225", "text": "public function edit(Carrinho $carrinho) {\n //\n }", "title": "" }, { "docid": "ac226cda6305aacde28336b6b5011afe", "score": "0.7402191", "text": "public function Editar($id){\n require_once ('models/receitas_class.php');\n \t\t\t//GUARDA O ID DO CONTATO PASSADO NA VIEW\n \t\t\t$idReceita = $_GET['id'];\n\n \t\t\t//INSTANCIA A CLASSE CONTATO\n \t\t\t$receita = new Receita();\n\n \t\t\t//DEFINE O ID DO CONTATO COM O VALOR DA VARIÁVEL\n \t\t\t$receita->id_receita_medica = $idReceita;\n\n $receita->id_paciente = $_POST['slt_paciente'];\n $receita->id_funcionario = $id;\n $receita->id_remedio=$_POST['slt_remedio'];\n $receita->data = $_POST['data'];\n $receita->tipo = $_POST['tipo'];\n\n \t\t\t//CHAMA O MÉTODO DA MODEL PARA APAGAR O REGISTRO\n \t\t\t$receita::Update($receita);\n\n \t\t}", "title": "" }, { "docid": "13ded6e6e1df244af17537ed7a70a5cb", "score": "0.7392127", "text": "public function edit(venta $venta)\n {\n // \n }", "title": "" }, { "docid": "2eb56b7dfdcd9217d543dcddbb2b2725", "score": "0.7390631", "text": "public function editarUsuario()\r\n { \r\n //Cargamos todos los datos del usuario pasandole el id.\r\n $parametros['datos'] = $this->modelo->perfilCompleto($_GET['usuario']); \r\n $this->view->show(\"editarUsuario\",$parametros);\r\n }", "title": "" }, { "docid": "72b73612cb38a18f37bca57e7ff387e0", "score": "0.73843974", "text": "public function edit(Entrenos $entrenos)\n {\n //\n }", "title": "" }, { "docid": "517d48679a8305a9d342963c84423e0e", "score": "0.73757213", "text": "public function edit(ReciboPago $reciboPago)\n {\n //\n }", "title": "" }, { "docid": "a342d67c2efd1d565df0ea55f5196d8e", "score": "0.7363022", "text": "public function edit($id)\n {\n //Vista del formulario para actualizar un usuario\n }", "title": "" }, { "docid": "ccd36b357b0e0c8d07232e36fcd585af", "score": "0.7350309", "text": "public function edit($id)\n {\n //Goi ra form chinh sua cung voi du lieu\n\n //\n }", "title": "" }, { "docid": "8ba13acf78017323f7c4a315209708b3", "score": "0.7338439", "text": "public function edit(Banniere $banniere)\n {\n //\n }", "title": "" }, { "docid": "53adc442fed1dc21c37a56983fb62ecf", "score": "0.73356956", "text": "public function edit()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cf01723b8dff4fc54232d0189268ea21", "score": "0.7334852", "text": "public function edit()\n {\n \n }", "title": "" }, { "docid": "cf01723b8dff4fc54232d0189268ea21", "score": "0.7334852", "text": "public function edit()\n {\n \n }", "title": "" }, { "docid": "64a826aa456716c3d9201f6c2a75ec33", "score": "0.73303694", "text": "public function edit(Empleado $empleado)\n {\n //\n }", "title": "" }, { "docid": "fbbed183702406d74603c44632050f38", "score": "0.7329552", "text": "public function edit(Produto $produto)\n {\n //\n }", "title": "" }, { "docid": "fbbed183702406d74603c44632050f38", "score": "0.7329552", "text": "public function edit(Produto $produto)\n {\n //\n }", "title": "" }, { "docid": "cb40014d5c0b0e32dad37ab8057befc6", "score": "0.7323729", "text": "public function edit(Seguimientoubucacion $seguimientoubucacion) {\n //\n }", "title": "" }, { "docid": "628945d56066dd8f75ba00d9e9313012", "score": "0.7321167", "text": "public function edit(conico $conico)\n {\n //\n }", "title": "" }, { "docid": "a796efdee3552849140b91b8621db12d", "score": "0.7319051", "text": "public function edit(Reginamaria $reginamaria)\n {\n //\n }", "title": "" }, { "docid": "aafc6eab1dc350389c38a59882362d23", "score": "0.73103285", "text": "public function edit($data)\n {\n $this->c_sed = $data['codice'];\n $this->t_sed = $data['descrizione'];\n $this->save();\n }", "title": "" }, { "docid": "dd61d2adf5e315a7336e6f87de2a6a71", "score": "0.73097974", "text": "public function editarUsuario(){\r\n //solicitar el id del usuario a editar\r\n $datosController = $_GET[\"id\"];\r\n //Enviamos al modelo el id para hacer la consulta y obtener sus Datos\r\n $respuesta = Datos::editarUsuarioModel($datosController, \"usuarios\");\r\n\r\n //Recibimos respuesta del modelo e IMPRIMOS UN FORM PARA Editar\r\n echo '<input type=\"hidden\" value=\"'.$respuesta[\"id\"].'\" name=\"idEditar\">\r\n <input type=\"text\" value=\"'.$respuesta[\"usuario\"].'\" name=\"usuarioEditar\" required>\r\n <input type=\"hidden\" value=\"'.$respuesta[\"password\"].'\" name=\"passwordEditar\" required>\r\n <input type=\"hidden\" value=\"'.$respuesta[\"email\"].'\" name=\"emailEditar\" required>\r\n <input type=\"submit\" value=\"Actualizar\">';\r\n\r\n }", "title": "" }, { "docid": "ee35c9a383462515292541a27c085706", "score": "0.7306373", "text": "function EDIT()\n{\n\n\t$check = $this->comprobar_atributos_EDIT();\n\n\t//si algun atributo no cumple las restricciones\n\tif ($check !== true) return $check;\n\n\t$sql = \"SELECT *\n\t\t\tFROM TITULACION\n\t\t\tWHERE CODTITULACION = '$this->titulacion'\";\n\n\t$response = $this->mysqli->query($sql)->num_rows;\n\tif ($response == 1) {\n\n\t\t$sql = \"UPDATE TITULACION\n\t\t\tSET NOMBRETITULACION = '$this->nombre',\n\t\t\t\tRESPONSABLETITULACION = '$this->responsable'\n\t\t\tWHERE ( CODTITULACION = '$this->titulacion')\";\n\n\t\t$result = $this->mysqli->query($sql);\n\n\t\tif($result = 1) return 'Actualización realizada con éxito';\n\t}\n\treturn 'Error de gestor de base de datos';\n}", "title": "" }, { "docid": "296a9cd2f14c1b1e411a8685636706ce", "score": "0.73024726", "text": "public function editar() {\n $this->modelo = new MProducto();\n $this->modelo->__set('idProducto', $_REQUEST['idProducto']);\n $this->modelo->__set('nombreProd', $_REQUEST['nombreProd']);\n $this->modelo->__set('vencimiento', $_REQUEST['vencimiento']);\n $this->modelo->__set('elaboracion', $_REQUEST['elaboracion']);\n $this->modelo->__set('precio', $_REQUEST['precio']);\n $estado = ($_REQUEST['estado'] == 'on') ? 1 : 0 ;\n $this->modelo->__set('imagen', $_REQUEST['imagen']);\n $this->modelo->__set('estado', $estado);\n\n $this->dao = new ProductoDAO();\n $this->dao->editar($this->modelo);\n header(\"Location:../Vista/ListarProducto.php\");\n }", "title": "" }, { "docid": "b510f3a3bc76abd9ed41e7fe718493e6", "score": "0.72977316", "text": "public function edit(Comentario $comentario)\n {\n //\n }", "title": "" }, { "docid": "b510f3a3bc76abd9ed41e7fe718493e6", "score": "0.72977316", "text": "public function edit(Comentario $comentario)\n {\n //\n }", "title": "" }, { "docid": "b510f3a3bc76abd9ed41e7fe718493e6", "score": "0.72977316", "text": "public function edit(Comentario $comentario)\n {\n //\n }", "title": "" }, { "docid": "f1a338a2650fef4781b43614cb7b222d", "score": "0.72958875", "text": "public function edit() {\n\n\t}", "title": "" }, { "docid": "1357333c8432d1942f20986430c1fb8f", "score": "0.72917867", "text": "public function edit(Tesis $tesis)\n {\n //\n }", "title": "" }, { "docid": "79f69bdf171249ac34d8c4e1dd1a7ceb", "score": "0.7291465", "text": "public function edit(Carrera $carrera)\n {\n //\n }", "title": "" }, { "docid": "95b9b85c02672e6bbfb7fc25a4a9cc3c", "score": "0.7289206", "text": "public function edit(cr $cr)\n {\n\n\n }", "title": "" }, { "docid": "60425bc3a61f570a890eaafb5c08f680", "score": "0.7287938", "text": "public function edit($id){}", "title": "" }, { "docid": "60425bc3a61f570a890eaafb5c08f680", "score": "0.7287938", "text": "public function edit($id){}", "title": "" }, { "docid": "60425bc3a61f570a890eaafb5c08f680", "score": "0.7287938", "text": "public function edit($id){}", "title": "" }, { "docid": "d3e3d79b0b8ba115409ac521305ab52b", "score": "0.7287242", "text": "public function edit(TurmaAluno $turmaAluno)\n {\n //\n }", "title": "" }, { "docid": "d925c509603c92cd18c629d3650a5aa0", "score": "0.72869015", "text": "public function edit(Fondo $fondo)\n {\n //\n }", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.72861964", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.72861964", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.72861964", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.72861964", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.72861964", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.72861964", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.72861964", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.72861964", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "4c478fe50fb32fbad762e7ed320ac75a", "score": "0.7284789", "text": "private function save_edit()\r\n {\r\n }", "title": "" }, { "docid": "76639a07faa51f2b552a9eba215c08ba", "score": "0.7276625", "text": "public function edit()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "5c151d8a66c339105a68907815cde991", "score": "0.7271707", "text": "public function edit(titulo $titulo)\n {\n //\n }", "title": "" }, { "docid": "9d280bad062064fd6839746f7de019e4", "score": "0.72650445", "text": "public function edit(encabezado_imp_renta $id)\n {\n\n }", "title": "" }, { "docid": "75a458afc1701896040fc1ae8b03114f", "score": "0.72650164", "text": "public function edit(BaoCaoBaiViet $baoCaoBaiViet)\n {\n //\n }", "title": "" }, { "docid": "ea8356089c8a1ec64a97f211d943d1a1", "score": "0.72646874", "text": "public function edit(Alumno $alumno)\n {\n //\n }", "title": "" }, { "docid": "c13fcba3e6e60838618544cb92a91e43", "score": "0.72633207", "text": "function edit($id = NULL) {\n $renda = $this->Renda->findAllById($id);\n $this->set('renda', $renda);\n\n // Para pegar o nome do aluno\n $aluno = $this->Renda->Aluno->findById($renda[0]['Renda']['aluno_id']);\n // pr($renda);\n $this->set('aluno', $aluno);\n\n if (empty($this->data)) {\n\n $this->data = $this->Renda->read();\n } else {\n\n if ($this->Renda->save($this->data)) {\n\n $this->Session->setFlash(\"Dado inserido\");\n $aluno_id = $aluno['Aluno']['id'];\n $this->redirect(\"/Rendas/listar/\" . $aluno_id);\n }\n }\n }", "title": "" }, { "docid": "24cac6177cfdce3aa6ed6b09cecdf4cb", "score": "0.7258851", "text": "public function edit(transaksi_beli $transaksi_beli)\n {\n //\n }", "title": "" }, { "docid": "91539cb3fb30523ccf90f2b5e4183af9", "score": "0.7258359", "text": "public function edit(Transaksi $transaksi)\n {\n //\n }", "title": "" }, { "docid": "91539cb3fb30523ccf90f2b5e4183af9", "score": "0.7258359", "text": "public function edit(Transaksi $transaksi)\n {\n //\n }", "title": "" }, { "docid": "91539cb3fb30523ccf90f2b5e4183af9", "score": "0.7258359", "text": "public function edit(Transaksi $transaksi)\n {\n //\n }", "title": "" }, { "docid": "91539cb3fb30523ccf90f2b5e4183af9", "score": "0.7258359", "text": "public function edit(Transaksi $transaksi)\n {\n //\n }", "title": "" }, { "docid": "20a46ce1c3735cea969426284af5ef76", "score": "0.72515905", "text": "public function edit($id){\n \n }", "title": "" }, { "docid": "5ecdbea733583999963e4111ae5cbd5b", "score": "0.7249763", "text": "public function edit($id=null){\n\t\t\t$pagina = page($this->dados['modulo'], 'form');\t\t\t\n\t\t\t//se formulário for submetido\n\t\t\tif($this->input->post()){\n\t\t\t\t//setando os valores a serem enviado ao bd\n\t\t\t\t$data = setData($this->input->post());\n\n\t\t\t\t//senha\n\t\t\t\tif($data['administrador_senha'] != null && $data['administrador_senha'] != ''){\n\t\t\t\t\t$data['administrador_senha'] = md5($data['administrador_senha']);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tunset($data['administrador_senha']);\n\t\t\t\t}\n\n\t\t\t\t//alteracao\n\t\t\t\tif($data['administrador_id']>0){\n\t\t\t\t\t$this->administrador->update($data['administrador_id'], $data);\n\t\t\t\t}\n\t\t\t\t//cadastro\n\t\t\t\telse{\n\t\t\t\t\t$data['administrador_data'] = date('Y-m-d H:i:s');\n\t\t\t\t\t$this->administrador->insert($data);\n\t\t\t\t}\n\t\t\t\tredirect('administrador/select');\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//alteracao\n\t\t\t\tif(!is_null($id)){\n\t\t\t\t\t$this->dados['administrador'] = $this->administrador->getById($id);\n\t\t\t\t}\n\t\t\t\t//pagina do formulário\n\t\t\t\t$this->template->view($pagina, $this->dados);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "316d7143d62a90267055dd651f28cc67", "score": "0.72487134", "text": "public function edit($id)\n {\n //\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n }", "title": "" }, { "docid": "b5c4fed2381643e4339264bf9a59b291", "score": "0.7246969", "text": "public function edit(Documento $documento)\n {\n //\n }", "title": "" }, { "docid": "57d625dd08b98a1b5fdffb0067760d1d", "score": "0.7246537", "text": "public function edit(Resposta $resposta)\n {\n //\n }", "title": "" }, { "docid": "ec073f7109f79178d134456dc6d3603b", "score": "0.72348243", "text": "public function edit(Cotizacion $cotizacion)\n {\n //\n }", "title": "" }, { "docid": "9d536db001f81a13679ca31c8b7918c5", "score": "0.7234022", "text": "public function edit(registroventas $registroventas)\n {\n //\n }", "title": "" }, { "docid": "0d5e600c6b4eb4787f6833e9eb3c059d", "score": "0.7232914", "text": "public function edit(Biblioteca $biblioteca)\n {\n //\n }", "title": "" }, { "docid": "c0fb440839c7e299cb4154ba783709c6", "score": "0.72283095", "text": "function editar_registro(){\n $this->accion=\"Editando Mi Perfil\";\n if (isset($_POST['envio']) && $_POST['envio']==\"Guardar\" && isset($_SESSION['id_temporal']) && $_SESSION['id_temporal']!=\"\"){\n $id=$_SESSION['id_temporal'];\n $this->asignar_valores();\n $this->nacimiento=$this->convertir_fecha($this->nacimiento);\n $sql=\"UPDATE registro SET categoria_reg='$this->categoria', nombre_reg='$this->nombre', apellido_reg='$this->apellido', sexo_reg='$this->sexo', nacimiento_reg='$this->nacimiento', lugar_reg='$this->lugar', tipo_reg='$this->tipo', cedula_reg='$this->cedula', correo_reg='$this->correo', correo2_reg='$this->correo2', telefono_reg='$this->telefono', celular_reg='$this->celular', direccion_reg='$this->direccion', pais_reg='$this->pais', estado_reg='$this->estado', municipio_reg='$this->municipio', website_reg='$this->website' , publicidad_reg='$this->publicidad', medio_reg='$this->medio' WHERE id_reg='$id'\";\n //importante\n $_SESSION['editar_usuario']=\"no\";\n $consulta=mysql_query($sql) or die(mysql_error());\n $this->nacimiento=$this->convertir_fecha($this->nacimiento);\n $this->mensaje=2;\n //header(\"location:/perfil.php\");\n\n }else{\n $this->mostrar_registro();\n }\n }", "title": "" }, { "docid": "33f6cedc6d1ac29e86288849c7a7233c", "score": "0.7227513", "text": "public function edit(Recibo $recibo)\n {\n //\n }", "title": "" }, { "docid": "2ba0eb1354a4ebb4b433b101c3228c1c", "score": "0.72262484", "text": "function editarDB()\n { \n \t\t$idcliente = $this->input->post('idpersona');\n \n \t$this->formValidation();\n\t\t\tif($this->form_validation->run()) \n { \n $params = $this->datos();\n\n $this->Cliente_model->updateCliente($idcliente,$params); \n $data['cliente'] = $this->Cliente_model->getAllCliente(); \n redirect(base_url().'cliente');\n }\n else\n {\n $data['cliente'] = $this->Cliente_model->getCliente($idcliente);\n\t\t \t$this->load->view('layout/header');\n\t\t $this->load->view('cliente/edit',$data);\n\t\t $this->load->view('layout/footer');\n }\n \n }", "title": "" }, { "docid": "c95fd128d62fa8deb269610337f9bc3a", "score": "0.7221576", "text": "public function edit(Horario $horario)\n {\n //\n }", "title": "" }, { "docid": "c95fd128d62fa8deb269610337f9bc3a", "score": "0.7221576", "text": "public function edit(Horario $horario)\n {\n //\n }", "title": "" }, { "docid": "73dee46020a852067daf5e90cd56957a", "score": "0.72177", "text": "public function edit()\n {\n }", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "d53023d2d70782e2efbd7beead2e28dd", "score": "0.0", "text": "public function create()\n {\n return View('fields.create');\n }", "title": "" } ]
[ { "docid": "06ec3b32b9b222f39c5dee97c3ecbb36", "score": "0.79401433", "text": "public function create()\n\t{\n\t\treturn view('admin.resource.create');\n\t}", "title": "" }, { "docid": "1e65cd3b7532e9fb4c8629f59550be03", "score": "0.7735354", "text": "public function create()\n\t{\n\t\treturn view('admin.resources.create');\n\t}", "title": "" }, { "docid": "03bfd9797acc7936efbf149267039e5d", "score": "0.77266353", "text": "public function create()\n {\n return view('resource.create');\n }", "title": "" }, { "docid": "03bfd9797acc7936efbf149267039e5d", "score": "0.77266353", "text": "public function create()\n {\n return view('resource.create');\n }", "title": "" }, { "docid": "ffef4ac93b8831ae51d698379f4d9c1b", "score": "0.7684138", "text": "public function create()\n\t{\n\t\treturn view('resources.create');\n\t}", "title": "" }, { "docid": "63ad7fad99855a56a3b8abf3768cf47e", "score": "0.762254", "text": "public function create()\n {\n return $this->showForm(\"create\");\n }", "title": "" }, { "docid": "139c49a6b5671df4af660eea4515972f", "score": "0.7597668", "text": "public function create()\n {\n return view('resources/form');\n }", "title": "" }, { "docid": "a6c7271eaebfd5b50fc91fc80fb19496", "score": "0.7464358", "text": "public function create()\n\t{\n\t\treturn view('forms.create');\n\t}", "title": "" }, { "docid": "6839a79b61064ed2d6b3c87e3aff015a", "score": "0.74568635", "text": "public function create()\n\t\t{\n\t\t\t\t// redirect to the form for creating a new entry inside the db\n\t\t\t\treturn view('create');\n\t\t}", "title": "" }, { "docid": "c21d88e95f75db4b51a6283406449c62", "score": "0.74487424", "text": "public function create()\n {\n //\n return view('resources.create');\n }", "title": "" }, { "docid": "53d013f46afef2a72260a723badd83b2", "score": "0.73877394", "text": "public function ShowForm() {\n return view('create');\n }", "title": "" }, { "docid": "b8d67d3c176a25f495b53af4d1b3e1a3", "score": "0.73462427", "text": "public function new()\n {\n $this->addBreadcrumb($this->instance, 'new');\n $this->authorize('create', $this->resourceType);\n\n return $this->view('new')\n ->with('type', $this->resourceType)\n ->with('instance', $this->instance)\n ->with('isUpdate', false);\n }", "title": "" }, { "docid": "b02f187b18d57a59d040d78094241c78", "score": "0.73432076", "text": "public function create_new()\n\t{\n\t\treturn View::make('admin.suppliers.create_supplier_form'); \n\t}", "title": "" }, { "docid": "4b843526f491cc00abff867e0dcae2bc", "score": "0.7339345", "text": "public function create()\n {\n $this->authorize('create', $this->getResourceModel());\n\n $class = $this->getResourceModel();\n return view($this->filterCreateView('_resources.create'), $this->filterCreateViewData([\n 'record' => new $class(),\n 'resourceAlias' => $this->getResourceAlias(),\n 'resourceRoutesAlias' => $this->getResourceRoutesAlias(),\n 'resourceTitle' => $this->getResourceTitle(),\n ]));\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.7276815", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "a80df900a28f26c9116cae9aec9ae74b", "score": "0.7247581", "text": "public function create()\n\t{\n\t\treturn view(\"PO.form\");\n\t}", "title": "" }, { "docid": "6e54ebe7445f04b4e2540c09999df2ed", "score": "0.72455984", "text": "public function create()\n\t{\n\t\treturn view(\"retur-pembelian.form\");\n\t}", "title": "" }, { "docid": "7f97efa8cb776b86e66d91838826ac4e", "score": "0.7238121", "text": "public function create()\n\t{\n\t\treturn View::make('forms.create');\n\t}", "title": "" }, { "docid": "8832246a5df8f4c7afcc8e46925833e8", "score": "0.723587", "text": "public function create()\n {\n return view(self::VIEW_PATH_NAME . '.form');\n }", "title": "" }, { "docid": "83219f179e8e94a735c68ba031340531", "score": "0.72352266", "text": "public function create()\n {\n // TODO: return view with form\n }", "title": "" }, { "docid": "6cf89a013084a50bc3817996f9e0c883", "score": "0.7210127", "text": "public function actionCreate()\n {\n $this->renderPartial('form', array('scenario'=>'create'), false, true);\n }", "title": "" }, { "docid": "bff0d963f5957fded51be0c1b9cc5b0d", "score": "0.7157098", "text": "public function actionCreate()\r\n {\r\n $resource = new Resource();\r\n $typeResource = TypeResource::find()->all();\r\n \r\n\r\n if ($resource->load(Yii::$app->request->post()) && $resource->save()) {\r\n\r\n return $this->redirect(['view','id' => $resource->id]);\r\n\r\n }\r\n\r\n return $this->render('create',[\r\n 'resource' => $resource,\r\n 'typeResource' => $typeResource\r\n ]);\r\n }", "title": "" }, { "docid": "f94b74924ee0cca1c87e741d9a20dc31", "score": "0.7131171", "text": "public function create() {\n $viewData = $this->getDefaultViewData();\n $viewData[\"mode\"] = \"ADD\";\n $viewData[\"student\"] = new Student();\n\n return view('pages.students.form', $viewData);\n }", "title": "" }, { "docid": "9736289698140cf16452b76256ddbe3c", "score": "0.7127499", "text": "public function create()\n {\n $permissions = PermissionGroup::get();\n $pageTitle = trans(config('dashboard.trans_file').'add_new');\n $submitFormRoute = route('roles.store');\n $submitFormMethod = 'post';\n return view(config('dashboard.resource_folder').$this->controllerResource.'form', compact('permissions', 'pageTitle', 'submitFormRoute', 'submitFormMethod'));\n }", "title": "" }, { "docid": "1d24e602d0fddfe9bed3a8265b26b901", "score": "0.7126407", "text": "protected function newAction()\n {\n return $this->renderForm('new');\n }", "title": "" }, { "docid": "e1317794bf2d1789fb3df24f34664b93", "score": "0.7126129", "text": "public function create()\n {\n return view('admin.' . $this->obj_name . '.form');\n }", "title": "" }, { "docid": "da898f34b0c52bea25c9b79c320b2dda", "score": "0.71223766", "text": "public function create()\n {\n return view('paperforms.create');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.7112556", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.7112556", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.7112556", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.7112556", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "750adc77c36f18c747b430100ee399b2", "score": "0.71123", "text": "public function create()\n\t{\n\t\treturn view('supir.create');\n\t}", "title": "" }, { "docid": "21b741286121defb618cafb010ad9311", "score": "0.7099154", "text": "public function create()\n {\n return view('admin.crud.edit-new');\n }", "title": "" }, { "docid": "e9b21b0a79fd33b3521e801165da14b6", "score": "0.7097774", "text": "public function create()\n {\n // HTML FORM TO SHOW THE FORM WHERE ROLE CAN BE CREATED\n }", "title": "" }, { "docid": "653c27662115e09b10c289bcc247b0ed", "score": "0.7082534", "text": "public function create()\n {\n return view('backend.Faces.form');\n }", "title": "" }, { "docid": "f95a7ddf5c279983b88920ab48796002", "score": "0.7069786", "text": "public function create()\n {\n return view('asset::Admin/Form');\n }", "title": "" }, { "docid": "44edfc8de23a19733eb2da7dd143c6af", "score": "0.70650345", "text": "public function create()\n {\n return view('backend.pragyansubject.addform');\n }", "title": "" }, { "docid": "aaf039b41e70ea5c5580f174d0a32a5e", "score": "0.7064253", "text": "public function create()\n {\n return view('admin.addnew');\n }", "title": "" }, { "docid": "b5c63b58d384c1cc1e048d0ed39e9059", "score": "0.7058784", "text": "public function create()\n {\n //display the create form of a new item\n return view('items.create_form');\n }", "title": "" }, { "docid": "2564f7e29b410c07eef4654312bbe9bc", "score": "0.70573336", "text": "public function create()\n {\n $data['action'] = 'penjualan.store';\n return view('penjualan.form', $data);\n }", "title": "" }, { "docid": "2a113ccb1bc187d2ab6a5b9b7f32db35", "score": "0.7050432", "text": "public function newAction()\n {\n $this->view->newOrdenForm = new NewOrdenForm(null,array('required'=>''));\n $this->view->clienteForm = new ClienteNewForm(null,array('required'=>''));\n }", "title": "" }, { "docid": "2b3d89889319d795b9c5394468d0ea54", "score": "0.70500946", "text": "public function create()\n {\n return view('frontend.formulir'); \n }", "title": "" }, { "docid": "91cae3ef8fac8cbaf75c5bcaed69ef7a", "score": "0.7047711", "text": "public function create()\n {\n return view('perjadin.create');\n }", "title": "" }, { "docid": "bb6992f3db8b85054e34d06ac94efe13", "score": "0.70463586", "text": "public function create()\n {\n return view('fish-mgmt/create');\n }", "title": "" }, { "docid": "c064473eb86d48e72f7ffb601c196ae9", "score": "0.7015468", "text": "public function create()\n {\n //\n return view('Partners/Admin/form');\n }", "title": "" }, { "docid": "66b746538eaf7a550c7b3a12968b96a6", "score": "0.7013759", "text": "public function create()\n {\n return view('supplier.form');\n }", "title": "" }, { "docid": "66b746538eaf7a550c7b3a12968b96a6", "score": "0.7013759", "text": "public function create()\n {\n return view('supplier.form');\n }", "title": "" }, { "docid": "f61bf3a97df7312aaecce2030ad738da", "score": "0.70064574", "text": "public function create(){\n config(['global.icon_content_title' => 'icon-bookmark']);\n config(['global.text_content_title' => 'Add Supplier']);\n config(['global.parent_text_content_title' => 'Suppliers']);\n\n //set submit route\n config(['global.submit_link' => 'store.supplier']);\n //set index route\n config(['global.index_link' => '/suppliers']);\n\n return view('supplier.create');\n }", "title": "" }, { "docid": "64c776e59f1522c2eaee823d173e2039", "score": "0.7002311", "text": "public function create()\n\t{\n\t\treturn view('product.new');\n\t}", "title": "" }, { "docid": "6d8ac76b2319312ec6d7c116d3c07dd5", "score": "0.6996969", "text": "public function create()\n {\n return view(\"admin.dokter.form\");\n }", "title": "" }, { "docid": "cd66cdfb79b8372ac27d1bcfeebf98ed", "score": "0.6991938", "text": "public function create()\n\t{\n\t\t// return View::make('avverbi.create');\n\t\treturn View::make('avverbi.edit');\n\t}", "title": "" }, { "docid": "12adf4e56f62b6fd6b2be421f733cdb4", "score": "0.6982239", "text": "public function create()\n {\n return view( 'create' );\n }", "title": "" }, { "docid": "9dcc76daa4540b48df51e0c54a0f942e", "score": "0.6979394", "text": "public function create()\n {\n return view('escola.form');\n }", "title": "" }, { "docid": "b9dcd814df4a67ac3130f45aff38f1ee", "score": "0.69653094", "text": "public function create()\n {\n return view('nbform.create');\n }", "title": "" }, { "docid": "a2b4f48997315d69d4a978b07c86041b", "score": "0.6965058", "text": "public function create()\n {\n return view('jamkerja.add');\n }", "title": "" }, { "docid": "3eabc09401aef2dfb0754b7c694a026f", "score": "0.6960763", "text": "public function create()\n\t{\n\t\treturn View::make('phanhois.create');\n\t}", "title": "" }, { "docid": "9cb057d0f77e53e0cce5708d50a6481b", "score": "0.6959774", "text": "public function create()\n {\n return view('new');\n }", "title": "" }, { "docid": "6e09ea0495ecf33b6615199f96a87dd9", "score": "0.69567907", "text": "public function create()\n {\n return view('inventaris.create');\n }", "title": "" }, { "docid": "12098cfc6ac9ec83d75a978a0c5abde4", "score": "0.6955427", "text": "public function showCreateForm()\n {\n return view('posts.new');\n }", "title": "" }, { "docid": "aaad424e12d96a3efd02522d0acdf881", "score": "0.6954566", "text": "public function create()\n {\n return view('actions.create');\n }", "title": "" }, { "docid": "ea30089b05638deecfcdcc640118738c", "score": "0.6954235", "text": "public function create()\n {\n return view('student.add');\n }", "title": "" }, { "docid": "219163df6bc3d5b0129ff62049e525c0", "score": "0.6947085", "text": "public function create()\n {\n return view('example.form');\n }", "title": "" }, { "docid": "0224b799194fa807284fdd74a5365a99", "score": "0.6946361", "text": "public function create()\n {\n return view('anggota.form');\n }", "title": "" }, { "docid": "e9d5ae41977e28632b79e3a6a94d5e87", "score": "0.6945846", "text": "public function create()\n {\n return view('Add');\n }", "title": "" }, { "docid": "bab776a4c16cf35a4a18dc0e698ea074", "score": "0.6943153", "text": "public function create()\n {\n return view(\"users.create_form\");\n }", "title": "" }, { "docid": "1c5fb8d39758b496bbe1461e2d19ee6b", "score": "0.6942776", "text": "public function newAction()\n {\n $entity = new Rio();\n $form = $this->createCreateForm($entity);\n\n return $this->render('AppBundle:Rio:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "14ece53d5ad54ed8cdddb207f598627a", "score": "0.6936803", "text": "public function create()\n {\n //adicionar\n $professores = Professor::all();\n $action = route('disciplinas.store');\n return view('admin.disciplinas.form', compact('action', 'professores'));\n }", "title": "" }, { "docid": "4dd85a7dd2279e41326acf30c85b837f", "score": "0.69270337", "text": "public function create()\n {\n return view('QuanTriVien.form');\n }", "title": "" }, { "docid": "978bcc6315cbc834f3ebe718240ae1d3", "score": "0.6927031", "text": "public function create()\n {\n return view('actions.create');\n }", "title": "" }, { "docid": "f36ee7fce6062ca5f8a13e9136a3aa5f", "score": "0.6924331", "text": "public function create()\n {\n //\n return view('admin.cars.add');\n }", "title": "" }, { "docid": "c4416390a701ec4941a20dc3ab095a2a", "score": "0.6916869", "text": "public function create()\n\t{\n\t\treturn view('create');\n\t}", "title": "" }, { "docid": "a93a79fd5f85cdfcd02d43c4b981bd37", "score": "0.6916042", "text": "public function create()\n {\n return view('admin.rehber.create');\n\n }", "title": "" }, { "docid": "d08acefd41013b35198e14cd32167263", "score": "0.6910301", "text": "public function create()\n {\n //\n return view('hod.hod_form');\n }", "title": "" }, { "docid": "efa6db85e06a4cb8b256acb0956225d4", "score": "0.6905506", "text": "public function create()\n\t{\n\t\treturn View::make('student.create');\n\t}", "title": "" }, { "docid": "2d2afb827796ab149976949e6f7f1657", "score": "0.69001573", "text": "public function create()\n\t{\n\t\treturn View::make('penilaians.create');\n\t}", "title": "" }, { "docid": "aa1b2912cd7ceea8a2b811ee2651b393", "score": "0.68936074", "text": "public function create()\n {\n return view(\"information.create\");\n }", "title": "" }, { "docid": "b026faf0a320028862c1ad2d3bb9025a", "score": "0.6892676", "text": "public function create()\n {\n return view('Libro.create');\n }", "title": "" }, { "docid": "a097895685f56669e51313d103d810e7", "score": "0.68917376", "text": "public function create()\n {\n return view('sale-cow.form');\n }", "title": "" }, { "docid": "732fe73681252d8413ea359a6e09f8bb", "score": "0.68879527", "text": "public function create()\n {\n //\n return view('cars.new');\n }", "title": "" }, { "docid": "6769fe63e35d4f98abe507728065b246", "score": "0.6887902", "text": "public function create()\r\n {\r\n return view('superadmin::create');\r\n }", "title": "" }, { "docid": "db3a97e80baaa42e7f0f5bbe728a3432", "score": "0.6887215", "text": "public function actionCreate()\n {\n $model = $this->findModel();\n\n $this->saveModel($model);\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "145cf1b2c8cc73b6dcddfbab958e798f", "score": "0.68830246", "text": "public function create()\n {\n return view('ovhapi::create');\n }", "title": "" }, { "docid": "862bc40da984894b74df33cb4c0d4659", "score": "0.6882643", "text": "public function create()\n {\n return view ('anggota-new');\n }", "title": "" }, { "docid": "bfb90be64c471e95e334f369a13f5087", "score": "0.68798", "text": "public function create()\n {\n //\n return view('Admin.Recom.add');\n }", "title": "" }, { "docid": "61dcb96ea6324e696f199e33bd9faa7f", "score": "0.6875463", "text": "public function create()\n\t{\n\t\t//add new car\n\t\treturn View::make('cars.create');\n\t}", "title": "" }, { "docid": "de77b116e66ae6b2ef708621f63ada16", "score": "0.6875259", "text": "public function create()\n {\n return view('manager.crud.create');\n }", "title": "" }, { "docid": "14cab6c0f95bbfd3db85915cbf823b72", "score": "0.6873937", "text": "public function create()\n\t{\n\t $config = $this->getFormData();\n\n return view('client.create', $config);\n\t}", "title": "" }, { "docid": "9337b2142bbd4240614c97696097e5e6", "score": "0.68738896", "text": "public function create()\n {\n return view( 'form.product', [\n 'isCreate' => true,\n 'categorys' => Category::all(),\n 'title' => 'New Product',\n 'product' => new Product(),\n 'navActive' => 'addProduct',\n ] );\n }", "title": "" }, { "docid": "f0df442854712f9c3ad7e77a1f7f3a88", "score": "0.6873307", "text": "public function create()\n {\n return view(\"cartera.create\");\n }", "title": "" }, { "docid": "a23b6ed7018a2e2dd2c29907dfbe28e0", "score": "0.68716806", "text": "public function create() {\n\t\treturn view( 'backend.career.create' );\n\t}", "title": "" }, { "docid": "15ba46136d8015267c72f493447d645a", "score": "0.68686604", "text": "public function create()\n {\n return view('materiku::create');\n }", "title": "" }, { "docid": "19bc1da827e1cabb7b0a120ffe2b00ed", "score": "0.68685746", "text": "public function create()\n {\n return view('additive/create');\n }", "title": "" }, { "docid": "e82caa6fdd89369a0306a198d2febd53", "score": "0.6864642", "text": "public function actionCreate()\n {\n $model = new ShowWith;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "354e1ae6b1f6e5a63b1294b3c9b61c1c", "score": "0.68621546", "text": "public function create()\n {\n return view('turno_new');\n }", "title": "" }, { "docid": "2a71d846a803ec0f01b511570f628c2f", "score": "0.6861941", "text": "public function get_create()\n\t{\n\t\t$this->layout->title = 'New Relationship';\n\t\t$this->layout->content = View::make('relationships.create');\n\t}", "title": "" }, { "docid": "46163db00cf7d58cd76418e971c834ad", "score": "0.6860917", "text": "public function create()\n\t{\n\t\treturn view('palestra.create');\n\t}", "title": "" }, { "docid": "d46a9ae5fd9725a20632fb60f3ec32f6", "score": "0.6859611", "text": "public function adminCreate()\n {\n $configuration = $this->getFormFieldData();\n $configuration ['title_name'] = trans('app.file_upload');\n $configuration ['title'] = trans('app.resources');\n $configuration ['back_to_list'] = route('app.resources.index');\n return view('admin.adminForm',$configuration);\n }", "title": "" }, { "docid": "1c0601360736a4b5109044192d5528ed", "score": "0.6857242", "text": "public function create()\n {\n $data = array();\n $data['add'] = trans('main.add');\n return view('service.form', $data);\n }", "title": "" }, { "docid": "c2f03754ef7971403714c63774c1d964", "score": "0.6857131", "text": "public function create()\n {\n return view('modules.products.form');\n }", "title": "" }, { "docid": "68eac3e9797e63312bcbb06b4b9195ef", "score": "0.685505", "text": "public function create()\n {\n return view('mineral.create');\n }", "title": "" }, { "docid": "b6cf76e82d6be800a92287cc947f7fa7", "score": "0.68542165", "text": "public function newAction()\n {\n $entity = new Plancapacitacion();\n $form = $this->createForm(new PlancapacitacionType(), $entity);\n\n // Incluimos camino de migas\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem(\"Inicio\", $this->get(\"router\")->generate(\"hello_page\"));\n $breadcrumbs->addItem(\"Capacitaciones\", $this->get(\"router\")->generate(\"pantalla_modulo\",array('id'=>3)));\n $breadcrumbs->addItem(\"Plan de capacitaciones\", $this->get(\"router\")->generate(\"pantalla_capacitaciones\"));\n $breadcrumbs->addItem(\"Registrar plan\",\"\");\n \n return $this->render('CapacitacionBundle:Plancapacitacion:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "20ad47f74be075399155984cf2b2f7cc", "score": "0.0", "text": "public function edit($id)\n {\n $employee = Employee::findOrFail($id);\n\n return view('employees.edit', compact('employee'));\n }", "title": "" } ]
[ { "docid": "63925fbab89765f6ec514208a03fc871", "score": "0.78354216", "text": "public function edit(Resource $resource)\n {\n return view('resource.edit', compact('resource'));\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.7692893", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "3e4affd8df1c5ef8f2afe9c9c3221248", "score": "0.7487642", "text": "public function edit($id)\n {\n // show form to edit\n }", "title": "" }, { "docid": "e148f1d3d9a48b05d53bc0934e9c8555", "score": "0.74829096", "text": "public function edit(Request $request, $resource)\n {\n $this->authorize('update', $resource);\n\n $this->event('updating', $resource->load($this->with)); \n\n if($this instanceof Compact) {\n $this->editingResource = $resource;\n\n return $this->index($request, app(Builder::class));\n }\n\n return view($this->editView)\n ->withForm($this->form()->setModel($resource))\n ->withName($this->name())\n ->withTitle($this->title())\n ->withActions($this->getActions())\n ->withRouteParameters((array) $this->routeParameters('edit', $resource));\n }", "title": "" }, { "docid": "4de13c28a63d7306cf639907e8ef1d9c", "score": "0.7343273", "text": "public function edit($resource, $resourceId)\n {\n return view('microboard::resource.edit', compact('resource', 'resourceId'));\n }", "title": "" }, { "docid": "4020b0e5a357920b39cf24e715e8cab6", "score": "0.7274648", "text": "public function edit($id) {\n ${$this->resource} = $this->model->findOrFail($id);\n\n App::setLocale(Helpers::getLang());\n\n return view($this->view_path . '.edit', compact($this->resource));\n }", "title": "" }, { "docid": "0cd4d6ca6f0a2017970904abf26fd651", "score": "0.7259789", "text": "public function edit($id)\n {\n return view('resource::edit');\n }", "title": "" }, { "docid": "256cb5b6f36786b11ec44b4af931758b", "score": "0.72310144", "text": "public function edit(Resource $resource)\n {\n\t\t\t\t$Item = $resource; $Actions = Action::all()->toArray();\n\t\t\t\t$Item[\"actions\"] = array_keys(str_split(str_replace(\".\",\"\",$this->floattostr ( $Item->action ))),\"1\");\n return view(\"resource.create\",compact(\"Item\",\"Actions\"))->with([\"update\"=>true]);\n }", "title": "" }, { "docid": "65ada685cf8e833ca627450ccc9d2441", "score": "0.7191711", "text": "public function edit($id)\n {\n $resource = Resource::find($id);\n \n return view('resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "0cf290df710095ca7ea001893658b9e6", "score": "0.71411604", "text": "public function editAction()\n {\n $page = $this->_helper->db->findById();\n $form = $this->_getForm($page);\n $this->view->form = $form;\n $this->_processPageForm($page, $form, 'edit');\n }", "title": "" }, { "docid": "5aefc7fd6a02ad9693185ed9c8d5b8d2", "score": "0.7032755", "text": "public function editAction() \n {\n $id = $this->request->get('id');\n\n // load the recipe from the database\n $recipe = Recipe::findFirst($id);\n\n $this->view->recipe = $recipe;\n $this->view->submit = \"editSubmit\";\n $this->view->title = \"Edit a recipe\";\n $this->view->pick('admin/add');\n }", "title": "" }, { "docid": "9126d463642a49ad64ccc9d4ccaea048", "score": "0.7032053", "text": "public function edit($id)\n {\n // Get the resource\n $object = $this->api()->show($id);\n\n // Get the form options\n $options = method_exists($this, 'formOptions') ? $this->formOptions($object) : [$this->package => $object];\n\n // Render edit view\n return $this->content( 'edit', $options );\n }", "title": "" }, { "docid": "c7274abf6ae2de7d4553b1b4b51a2134", "score": "0.6967485", "text": "public function edit()\n {\n /** @var Request $request */\n $request = app(Request::class);\n $formbuilder = app(FormBuilder::class);\n $args = $request->route()->parameters();\n\n $referer = url()->previous();\n $route = Route::getCurrentRoute()->getName();\n $model = $this->getEditModel($request, $args);\n\n $form_data = $this->getEditFormData($model, $request, $args);\n $form_data = array_merge(['prev_url' => $referer], $form_data);\n\n $url = (empty($this->route_update)) ? route(str_replace('edit', 'update', $route), $args) : $this->route_update;\n\n $form = $formbuilder->create($this->form_class, [\n 'method' => 'PUT',\n 'url' => $url,\n 'data' => $form_data,\n 'model' => $model,\n ]);\n\n $breadcrumb = $this->getEditBreadcrumb($model, $request, $args);\n\n if($request->ajax()) {\n return view($this->form_view, compact('form', 'breadcrumb', 'model', 'args', 'layout', 'section', 'request', 'form_data'));\n } else {\n $layout = $this->layout;\n $section = $this->section;\n $view = $this->form_view;\n return view('cms-package::default-resources.layout-extender', compact('form', 'breadcrumb', 'model', 'args', 'layout', 'section', 'layout', 'section', 'view', 'request', 'form_data'));\n }\n }", "title": "" }, { "docid": "052fcb4be65ef559048af91970a9092c", "score": "0.6962541", "text": "public function edit($id)\n {\n // we don't need this method which shows a form to edit\n }", "title": "" }, { "docid": "a801700662a2deaaefc059a611aa40bd", "score": "0.69617313", "text": "public function editformAction() {\r\n\t\tif (($messages = $this->_messages->getMessages ())) {\r\n\t\t\t$this->view->assign ( 'messages', $messages );\r\n\t\t}\r\n\t\t\r\n\t\t$info = $this->_tree->getNodeInfo ( $this->_request->getParam ( $this->_id_field ) );\r\n\t\t$form = new Bel_Forms_Builder ( $this->_formname, $this->_form_edit_action );\r\n\t\t$form->addElement ( 'hidden', $this->_id_field, array ('value' => $info->{$this->_id_field} ) );\r\n\t\t$form->populateForm ( $info );\r\n\t\t$this->view->assign ( 'form', $form );\r\n\t\t$this->view->display ( $this->_form_template );\r\n\t}", "title": "" }, { "docid": "83b72662162c1c99a4a9ec1b7b4e6edc", "score": "0.69612134", "text": "public function show_editform()\n {\n $this->item_form->display();\n }", "title": "" }, { "docid": "aaf7cccb1997350d3476b1b809c87285", "score": "0.6960807", "text": "public function edit(Resource $resource)\n {\n try {\n $grou = Groups::with([])->get();\n return view('resource.edit')->with(['groups' => $resource, 'op' => $grou]);\n } catch (\\Exception $e) {\n session()->flash('flash_error', 'Something went wrong');\n return Redirect::back();\n }\n }", "title": "" }, { "docid": "f8826a70c4e190274cdb2b9b04638375", "score": "0.6959897", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('FormBundle:Form')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Form entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('FormBundle:Form:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "627cc08a03d861bf43b77f13aa1b356b", "score": "0.6949801", "text": "public function edit($id)\n { \n return $this->showForm($id);\n }", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.6945275", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.6945275", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "167dafd94209f70f38ffcad67381a2e9", "score": "0.69375557", "text": "public function edit() {\n\t\t$this->mode = 'edit';\n\t\t$this->submit();\n\t}", "title": "" }, { "docid": "8c9d1b02602edc2dd288db289ad2a173", "score": "0.69332457", "text": "public function editAction()\n {\n // returning due to validation:\n if (isset($this->view->form)) {\n return;\n }\n \n $this->view->form = $this->_getCarForm();\n \n // Retrieve the record for editing:\n $manager = new Lightman_Managers_Car();\n $carId = $this->getRequest()->getParam('id');\n $data = $manager->fetch($carId);\n $this->view->form->populate($data[0]);\n $this->view->form->setAction('/car/save');\n }", "title": "" }, { "docid": "6eef3a46914dacc1a3123674c081e2a5", "score": "0.69211656", "text": "public function edit($id)\n {\n $model = $this->resourceModel::find($id);\n\n if (!is_null($this->relatedModel)) {\n $model->load($this->relatedModel);\n }\n\n $this->beforeEdit($model);\n\n $this->viewData['resourceData'] = $model;\n\n return view(\n \"{$this->viewBaseDir}.{$this->viewFiles['edit']}\",\n $this->viewData\n );\n }", "title": "" }, { "docid": "7abb5638b8fab40720496e4c8e4e6ee3", "score": "0.69126725", "text": "public function action_edit()\n\t{\n\t\t$id = $this->request->param('id');\n\n\t\tif ($id === null)\n\t\t{\n\t\t\t$this->redirect(Route::url('customer', array('action' => 'new')));\n\t\t} // if\n\n\t\t$model = ORM::factory('Customer')->where('id', '=', $id)->find();\n\n\t\t$this->content = View::factory('customer/form', array(\n\t\t\t'title' => __('Edit customer \":customer\"', array(':customer' => $model->company ?: $model->name)),\n\t\t\t'customer' => $model,\n\t\t\t'properties' => $model->get_properties(),\n\t\t\t'ajax_url' => Route::url('customer', array('action' => 'save', 'id' => $id)),\n\t\t\t'invoices' => $model->invoices->order_by('id', 'DESC')->limit(20)->find_all()\n\t\t));\n\t}", "title": "" }, { "docid": "7e98823aebb6ba9203517ae50d88ad7a", "score": "0.69074184", "text": "function edit(){\n\t\t$id = $this->input->get('id');\n\t\t$data = array();\n\t\t$data['title']\t\t= 'Edit '.$this->title;\n\t\t$data['controller']\t= $this->controller;\n\t\t$data['state']\t\t= 'edit';\n\t\t$data['id'] \t\t= $id;\n\n\t\t// because it's simple index and form, use common form\n\t\t$data['table_field'] = $this->group->table_field;\n\t\t$data['primary_key'] = $this->group->primary_key;\n\t\t$data['content']\t= 'content/common/form';\n\t\t$data['datas'] = $this->group->get(decrypt_id($id));\n\n\t\t$this->template($data);\n\t}", "title": "" }, { "docid": "442f0c0607d600b71f651788512fa4e2", "score": "0.68972987", "text": "public function edit()\n {\n return view('backend::edit');\n }", "title": "" }, { "docid": "9443931fcf9450e4082ea1fcc8f7947f", "score": "0.685467", "text": "public function editAction()\n {\n $category = $this->_helper->db->findById();\n $form = $this->_getForm($category);\n $this->view->form = $form;\n $this->_processPageForm($category, $form, 'edit'); \n }", "title": "" }, { "docid": "572f29a2affec4fc1f0fcd8cf08070ff", "score": "0.68250066", "text": "public function edit($id){\n \n try {\n $resource = Resource::withTrashed()->findOrFail($id); \n }catch (ModelNotFoundException $e){\n $errors = collect(['El recurso con ID '.$id.' no se encuentra.']);\n return back()\n ->withInput()\n ->with('errors', $errors);\n }\n $resourceStatuses = ResourceStatus::orderBy('name', 'ASC')->get();\n $resourceTypes = ResourceType::orderBy('name', 'ASC')->get();\n $dependencies = Dependency::orderBy('name', 'ASC')->get();\n $resourceCategories = ResourceCategory::orderBy('name', 'ASC')->get();\n $physicalStates = PhysicalState::orderBy('name', 'ASC')->get();\n $spaces = Space::orderBy('name', 'ASC')->get();\n\n return view('admin.resources.create_edit')\n ->with('resource', $resource)\n ->with('resourceStatuses', $resourceStatuses)\n ->with('resourceTypes', $resourceTypes)\n ->with('dependencies', $dependencies)\n ->with('resourceCategories', $resourceCategories)\n ->with('physicalStates', $physicalStates)\n ->with('spaces', $spaces)\n ->with('title_page', 'Editar recurso: '.$resource->name)\n ->with('menu_item', $this->menu_item);\n }", "title": "" }, { "docid": "92c9e3a1c5275112cb6b6e51244fca5c", "score": "0.6815314", "text": "public function edit($id)\n {\n $model = static::$model;\n $className = $this->getClass();\n\n $item = $className::find($id);\n\n $formOptions = [\n 'route' => ['admin.' . strtolower($this->getClassNameFromModel()) . '.update', $id],\n 'method' => 'put',\n ];\n\n return view('pilot::admin.' . static::$viewFolder . '.form', compact('item', 'formOptions', 'model'));\n }", "title": "" }, { "docid": "23a4ee1572e6b647de73c414d405951f", "score": "0.68132675", "text": "public function edit($id)\n {\n //\n $form = Form::find($id);\n return view('forms.edit',compact('form','id'));\n\n }", "title": "" }, { "docid": "a3f2b74e4e1ef90e3f2b369f12999507", "score": "0.68113613", "text": "public function edit($id)\n {\n\t\t$params = [\n\t\t\t'data' => $this->repository->findById($id),\n\t\t];\n\n\t\treturn view('admin.pages.material-form-update', ['page' => 'material'])->with($params);\n\t}", "title": "" }, { "docid": "873a08d0f357fca631ccc7259052d9ce", "score": "0.68018645", "text": "public function edit()\n {\n return view('common::edit');\n }", "title": "" }, { "docid": "ea939d247defa384f3c7bb826e339c02", "score": "0.6799606", "text": "public function edit($id)\n {\n $product = Product::findOrFail($id);\n return view('Admin/product/form',compact('product'));\n }", "title": "" }, { "docid": "81e049bcae69bcc2654f7dc4038b4aaf", "score": "0.679763", "text": "public function edit($id)\n {\n $requestform = requestform::findOrFail($id);\n\n return view('RequestForms.requestforms.edit', compact('requestform'));\n }", "title": "" }, { "docid": "e3fad094d4252fd72e2502d403dfc367", "score": "0.67960227", "text": "public function edit()\n {\n return view('product::edit');\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "8566978c055c66cbf8d8ff39c2b4fa99", "score": "0.6789007", "text": "public function getEditForm($id){\n $data = $this->model->findOrFail($id);\n return view('administrator.pages.update_form')->with(compact('data'));\n }", "title": "" }, { "docid": "d8b4457853a470b2a27d3bf2af2f3273", "score": "0.67831767", "text": "public function edit($id)\n {\n return view('operationmanager::edit');\n }", "title": "" }, { "docid": "3e2f2a29164ba9a0158e7b2fd5bd8f61", "score": "0.6764436", "text": "public function edit() {\n\t\tglobal $DIC;\n\t\t$tpl = $DIC['tpl'];\n\n\t\t$this->initForm(\"edit\");\n\t\t$this->getValues();\n\n\t\t$tpl->setContent($this->form->getHTML());\n\t}", "title": "" }, { "docid": "df462f5d85bc8fd7cf9dce14953e8abf", "score": "0.67639047", "text": "public function edit()\n {\n return view('offer::edit');\n }", "title": "" }, { "docid": "418884af8e182e5d20016d3fb1359c7e", "score": "0.67567337", "text": "public function editAction()\n {\n $em = $this->getDoctrine()->getManager();\n\t\t/* Template fields */\n\t\t$GlobalFields = new GlobalFields();\n\t\t$globalfieldsarray = $GlobalFields->getGlobalFields($this, $em);\n\t\t\n\t\t$entity = $globalfieldsarray[\"empleado\"];\n\t\t$entity->setUserName($entity->getUsuario()->getUserName());\n\t\t$entity->setPassword($entity->getUsuario()->getPassword());\n\t\t\n $editForm = $this->createForm(new EmpleadoType(), $entity);\n\n return $this->render('SystemEmpleadoBundle:EditarPerfil:edit.html.twig', array(\n\t\t\t'globalfieldsarray' => $globalfieldsarray,\n 'edit_form' => $editForm->createView(),\n 'error' => NULL,\n ));\n }", "title": "" }, { "docid": "c3a72c58c6b66c9b866217649ddaef6a", "score": "0.67562574", "text": "public function edit()\n {\n return view('sallereservation::edit');\n }", "title": "" }, { "docid": "f9f7f910c8b16a5d918564783761275b", "score": "0.67492944", "text": "public function edit($id, Request $request)\n {\n $resource = MyResource::find($id);\n if ($resource != null) {\n if ($request->user()->id == $resource->user->id || $request->user()->hasRole('Admin')) {\n $modules = Module::getFormModulesArray();\n return view('resources.edit', compact('resource', 'modules'));\n } else {\n return abort(401, 'You\\'re not allowed to edit this resource!');\n }\n }\n }", "title": "" }, { "docid": "06a1955be6e482728e09337f630bb727", "score": "0.67316383", "text": "public function editAction($id)\n {\n $user = $this->getUser();\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('SifoSharedBundle:Program')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Program entity.');\n }\n\n $form = $this->createEditForm($entity);\n\n return $this->render('SifoAdminBundle:edit:layout.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'user' => $user,\n ));\n }", "title": "" }, { "docid": "444f98d0090cda3d8ec6a32c569483fe", "score": "0.6730375", "text": "public function edit()\n {\n return view('item::edit');\n }", "title": "" }, { "docid": "3511b1492265afe62ecb75757f43c811", "score": "0.67264074", "text": "protected function showForm() {\n\t\t// Setup header Data\n\t\t$titleStr = '';\n\t\tswitch ($this->mode) {\n\t\t\tcase 'delete':\n\t\t\t\t$titleStr = 'Delete';\n\t\t\t\tbreak;\n\t\t\tcase 'edit':\n\t\t\t\t$titleStr = 'Edit';\n\t\t\t\tbreak;\n\t\t\tcase 'add':\n\t\t\tdefault:\n\t\t\t\t$titleStr = 'Add';\n\t\t\t\tbreak;\n\t\t}\n\t\tif (!isset($this->data['form']) || empty($this->data['form'])) {\n\t\t\t$this->data['form'] = $this->form->get();\n\t\t}\n\t\t$this->data['subTitle'] = $titleStr.\" \".$this->_NAME;\n\t\t$this->data['thisItem']['id'] = $this->recordId;\n\t\t$this->data['thisItem']['ownerId'] = (isset($this->dataModel->recordOwnerId) ? $this->dataModel->recordOwnerId : -1);\n\t\t$this->data['currUser'] = $this->params['currUser'];\n\t\t$this->params['content'] = $this->load->view($this->views['EDIT'],$this->data,true);\n\t\t$this->params['pageType'] = PAGE_FORM;\n\t\t$this->displayView();\n\t}", "title": "" }, { "docid": "32e951846997ccc0adda9087b6a46d09", "score": "0.6724373", "text": "public function edit($id){\n return $this->form($id);\n }", "title": "" }, { "docid": "3cb809ceeb3604d4bdf66da701d2423d", "score": "0.67104334", "text": "public function showEdit($id)\n {\n return $this->view('edit', [\n 'model' => $this->service->find($id)\n ]);\n }", "title": "" }, { "docid": "56f9be8327c6825b7bab6704e048d9b7", "score": "0.67073035", "text": "public function edit(Request $request, $client, $resource)\n\t{\n\t\t$resource = Resource::findBySlug($client, $resource);\n\n\t\tif (!$resource) {\n\t\t\treturn response(view('resources.404'), 404);\n\t\t}\n\n\t\t$this->authorize('manage', $resource);\n\n\t\t$resource->load('client', 'tags', 'type');\n\n\t\treturn view('resources.edit', ['client' => $resource->client, 'resource' => $resource]);\n\t}", "title": "" }, { "docid": "41b2f68ed73a5cc186c76264c0d17f7a", "score": "0.6706397", "text": "public function edit($id)\n\t{\n\t\t$question = Question::find($id);\n\t \n\t \n $display = Question::$display;\n\n\t\treturn view('admin.question.edit', compact('question', \"display\"));\n\t}", "title": "" }, { "docid": "e825c5f01addbfd2313d771317890d1d", "score": "0.6702575", "text": "public function editAction() {\n\t\t$this->enableLayout();\n\t\t$id\t\t = $this->getRequest()->getParam('id');\n\t\t$product = Object_Abstract::getById($id);\n\n\t\t$user\t\t\t\t = ParagonFramework_Models_User::getUser();\n\t\t$configReader\t\t = ParagonFramework_ConfigReader::getInstance();\n\t\t$configReaderView\t = $this->getView($user, $configReader);\n\n\t\t$templateName = $configReaderView->getTemplate();\n\n\t\t$plugin\t\t\t\t = ParagonFramework_Plugin::getInstance();\n\t\t$templateFilePath\t = $plugin->getDeployPath() . '/templates/' . $templateName;\n\n\t\t$this->view->pathToSnipplet\t = $templateFilePath;\n\t\t$this->view->user\t\t\t = $user;\n\t\t$this->view->product\t\t = $product;\n\t}", "title": "" }, { "docid": "9b1f710040cf008ce0cc39a2446c2e3f", "score": "0.66995674", "text": "public function edit()\n\t{\n\t\t$this->subcontrollers[\"form\"] = new Form\\FormController($this->config, \"Form\", \"index\", array());\n\n\n\t\t// $this->context[\"forms\"] = $this->form_controller->get_forms($this->forms);\n\t\t// var_dump($this->context[\"forms\"]);\n\t}", "title": "" }, { "docid": "281109723855c04252dbc51f84833e23", "score": "0.6693279", "text": "public function editAction()\n\t{\n\t\t// We first retrieve the report ID\n\t\t$id = $this->getRequest()->getParam('id');\n\t\t// Then we generate the report path\n\t\t$path = Mage::getBaseDir('var') . DS . 'report';\n\n\t\t// Load the report\n\t\t$model = Mage::getModel('reportsviewer/report')->load($id, $path);\n\n\t\t// Register the data so we can use it in the form\n\t\tMage::register('report_data', $model);\n\n\t\t// Layout loading / rendering\n\t\t$this->loadLayout();\n\t\t$this->_setActiveMenu('system/tools/reportsviewer');\n\n\t\t$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);\n\n\t\t$this->_addContent($this->getLayout()->createBlock('reportsviewer/adminhtml_reportsviewer_edit'));\n\n\t\t$this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);\n\n\t\t$this->renderLayout();\n\t}", "title": "" }, { "docid": "e229be1f6baba6da610f480a33455c90", "score": "0.6690778", "text": "public function edit($id)\n {\n $resource = $this->findResource($id);\n\n return view($this->getTemplatePath('edit'), compact('resource'));\n }", "title": "" }, { "docid": "ea46a3f45fe3107a2b87f10fd7bb2223", "score": "0.6688617", "text": "public function edit(Record $record)\n {\n $this->authorize('edit', $record);\n\n $fieldChanges = $this->requestProcessor->fromFieldsRequest(\n $record->recordType->fields(), \"field_\");\n $linkChanges = $this->requestProcessor->getLinkChanges(\n $record->recordType);\n $record->updateData($fieldChanges);\n return view('record.edit', [\n \"record\" => $record,\n \"idPrefix\" => \"\",\n \"returnTo\" => $this->requestProcessor->returnURL(),\n \"linkChanges\" => $linkChanges,\n \"nav\" => $this->navigationMaker->recordNavigation($record, \"Edit\")\n ]);\n }", "title": "" }, { "docid": "15c7a9f1bc35a63d24f1c419ea44bb8e", "score": "0.6687803", "text": "public function edit($id)\n {\n $countries = Country::all();\n $roles = Role::all();\n $admin = Admin::find($id);\n $pageTitle = trans(config('dashboard.trans_file').'edit');\n $submitFormRoute = route('admins.update', $id);\n $submitFormMethod = 'put';\n return view(config('dashboard.resource_folder').$this->controllerResource.'form', compact('countries', 'roles', 'admin', 'pageTitle', 'submitFormRoute', 'submitFormMethod'));\n }", "title": "" }, { "docid": "bf49bc8226e13e2862c2259d16e93588", "score": "0.6680715", "text": "public function edit($id)\n {\n $product = Product::find($id);\n return view('products.edit_form')->with('product', $product)->with('manufacturers', Manufacturer::all());\n }", "title": "" }, { "docid": "3e9f248cdce27ef62f9af24dbc0c177d", "score": "0.66793704", "text": "public function edit($id)\n {\n $edit_object = $this->objectRepository->find($id);\n return view('admin.Object.edit-object',compact('edit_object'));\n }", "title": "" }, { "docid": "6d7fd6cc71038b382ce6486ecbf4fe92", "score": "0.6670073", "text": "public function viewEdit()\n {\n if (isset($_GET['id'])) {\n $data['product'] = Product::getById($_GET['id']);\n View::render('Products/edit.php', $data);\n } else {\n echo 'Page not found';\n }\n }", "title": "" }, { "docid": "136c14e90c2ade2a65f234ee3ff6ac85", "score": "0.66696644", "text": "public function edit($id)\n {\n // get the nerd\n $employee = Employee::find($id);\n\n // show the edit form and pass the nerd\n return View::make('employee.edit')\n ->with('employee', $employee);\n }", "title": "" }, { "docid": "419edcb2aed17f9ea1df57d9b28b5be3", "score": "0.6668747", "text": "public static function edit()\r\n {\r\n $record = todos::findOne($_REQUEST['id']);\r\n self::getTemplate('edit_task', $record);\r\n }", "title": "" }, { "docid": "7ab4920df56f35f41b7bed2b83e1e12f", "score": "0.6665399", "text": "public function edit($id)\n\t{\n\t\t$product = Product::findOrFail($id);\n\t\t$show = false;\n\t\treturn View::make('admin.product.new_edit_product', compact('product', 'show'));\n\t}", "title": "" }, { "docid": "261de490d37bf33e08a7b49ebcdbaf10", "score": "0.66629046", "text": "public function edit($id)\n\t{\n\t\tif(Auth::user() && Auth::user()->id == Config::get('laracancan.super_admin')) {\n\t\t\t$resource = Resource::find($id);\n\t\t\treturn view('laracancan::resource.edit')\n\t\t\t\t->with('resource', $resource);\n\t\t}\n\n\t\treturn response(view('laracancan::master.401'), 401);\n\t}", "title": "" }, { "docid": "324456cc428b315bcf53fd80359eafa2", "score": "0.6654099", "text": "public function edit($id)\n {\n $forms = Form::Find($id);\n return view('be/forms/edit', ['forms'=>$forms ]);\n }", "title": "" }, { "docid": "3e646f91bbc9b42ba119ea81f1e01e36", "score": "0.66473585", "text": "public function edit($id)\n {\n\n $formulario = new FormBuilder($this->class::findOrFail($id),$this->formFields);\n $modelo = $this->model;\n return view($this->chooseView('edit'), compact('formulario', 'modelo'));\n }", "title": "" }, { "docid": "7c426795b6ade66a5e5ef6b740010b61", "score": "0.6642236", "text": "public function editAction(){\n if($this->_getParam('id',false)){\n $form = new HelpForm();\n $form->submit->setLabel('Submit changes');\n $form->author->setValue($this->getIdentityForForms());\n $this->view->form = $form;\n if($this->getRequest()->isPost() \n && $form->isValid($this->_request->getPost())){\n if ($form->isValid($form->getValues())) {\n $where = array();\n $where[] = $this->_help->getAdapter()->quoteInto('id = ?', \n $this->_getParam('id'));\n $this->_help->update($form->getValues(),$where);\n $this->getFlash()->addMessage('You updated: <em>' \n . $form->getValue('title')\n . '</em> successfully. It is now available for use.');\n $this->_redirect('admin/help/');\n } else {\n $form->populate($form->getValues());\n }\n } else {\n $form->populate($this->_help->fetchRow('id= ' \n . $this->_getParam('id'))->toArray());\n }\n } else {\n throw new Pas_Exception_Param($this->_missingParameter, 500);\n }\n }", "title": "" }, { "docid": "45821cecfbb5732cd269059f6aad418f", "score": "0.66403663", "text": "function edit()\n\t{\n\t\tJRequest::setVar( 'view', 'editlieux' );\n\t\tJRequest::setVar( 'layout', 'edit_form' );\n\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "ccb8cbed1c0323296fb99a02c5821089", "score": "0.6636548", "text": "public function editAction() {\n \n View::renderTemplate('Settings/edit.html', [\n 'user' => $this->user\n ]);\n }", "title": "" }, { "docid": "0da44488fa19010ad9532838a532cf8a", "score": "0.66324544", "text": "public function edit(FormBuilder $formBuilder, $id)\n {\n $data['title'] = $this->title;\n $tbl = User::find($id);\n $data['form'] = $formBuilder->create('App\\Forms\\UserForm', [\n 'method' => 'PUT',\n 'model' => $tbl,\n 'url' => route($this->uri.'.update', $id)\n ])\n ->modify('role', 'choice', [\n 'selected' => null\n ])\n ->modify('password', 'password', [\n 'value' => '',\n 'attr' => ['data-validation' => '']\n ]);\n $data['back'] = route($this->uri.'.index');\n return view($this->folder.'.create', $data);\n }", "title": "" }, { "docid": "d89d877aeb4e888fc162f4776686a75f", "score": "0.66217417", "text": "public function edit()\n {\n return view('satuan::edit');\n }", "title": "" }, { "docid": "afb09dad84e30958b4252ef05c35ffd3", "score": "0.66183454", "text": "public function editView() {\n $this->edit = true;\n $this->addView();\n }", "title": "" }, { "docid": "da2c7e0272b4f7cc0f2b78554d9864cb", "score": "0.66176736", "text": "public function edit($id)\n {\n return view('employee::edit');\n }", "title": "" }, { "docid": "d6c2c7e0ddbac0b65be0ee74a7fcd796", "score": "0.6614968", "text": "public function edit($id)\n {\n return view('consultas::edit');\n }", "title": "" }, { "docid": "05a97cb5f26b111f1833f8ff3fcfa159", "score": "0.6611799", "text": "public function edit() {\n\n \t\tif (!$this->user || !$_POST)\n \t\tRouter::redirect('/organizations/index');\n\n \t$organization_id = $_POST['organization_id'];\n\n\t\t# Transfer POST data to Organization object\n\t\t$organization = new Organization();\n\t\t$organization->findInDb ($organization_id);\n\n # Setup view\n\t\t$this->template->content = View::instance('v_organizations_edit');\n\t\t$this->template->title = \"Edit Organization\";\n\t\t$this->template->client_files_body = \"<script src='/js/hide-category-navigation.js' type='text/javascript'></script>\";\n\n\t\t$this->template->content->organization = $organization;\n\n \techo $this->template;\n }", "title": "" }, { "docid": "b492e01b8e4a4d95cb491744ad7b75fd", "score": "0.6607943", "text": "public function edit($id)\n {\n abort_if(Gate::denies('user_access'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n $forms = Form::findOrFail($id);\n return view('admin.form.edit', compact('forms'));\n }", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "69349f7253951cb5e1d148a7d1e3929b", "score": "0.6607782", "text": "function edit($request) {\n\t\tif(!$this->currentRecord) {\n\t\t\treturn $this->httpError(404);\n\t\t}\n\t\tif(!$this->currentRecord->canEdit(Member::currentUser())) {\n\t\t\treturn $this->httpError(403);\n\t\t}\n\n\t\treturn $this->render(array(\n\t\t\t'Form' => $this->EditForm(),\n\t\t\t'ExtraForm' => $this->DeleteForm()\n\t\t));\n\t}", "title": "" }, { "docid": "1103d1caa349a1d4f5beb8012d42d974", "score": "0.66074175", "text": "public function edit($id)\n {\n return view('apollo::edit');\n }", "title": "" }, { "docid": "4c41c54cdabcef7aee925039ff148afa", "score": "0.66037405", "text": "public function edit()\n {\n // return view('master::edit');\n }", "title": "" }, { "docid": "18ea739bdb9f6382c60e491e54174aee", "score": "0.6600729", "text": "public function edit($id)\n {\n return view('book.form', compact('id'));\n }", "title": "" }, { "docid": "2a47ad7ce79b806f24d1a15c7fc9c440", "score": "0.6596694", "text": "public function edit($id)\n {\n return view('frontend::edit');\n }", "title": "" }, { "docid": "12259e1dd0f580f13929c361e6808b7f", "score": "0.65930325", "text": "public function edit($id)\n {\n return view('helpcentermodule::edit');\n }", "title": "" }, { "docid": "a6922b424cc81f43c7dfdb03fa2fdd30", "score": "0.6587789", "text": "public function edit($id)\n\t{\n\n\t\t$record=LegalAssistance::find($id);\n\t\t$elements_data=$this->generate_form($record->toArray());\n\t\t$data['elements_data']=$elements_data;\n\t\t$data['can_import']=true;\n\t\t$data['centers']=retrieveField(Center::all(),'name');\n\t\t$data['submit_url']='legalassistance.update';\n\t\t$data['heading']='Legal Assistance';\n\t\t$data['go_back']='legalassistance.index';\n\t\t$data['record_id']=$record['id'];\n\n\t\treturn View::make('layouts.records.edit')->with('data', $data);\n\t}", "title": "" }, { "docid": "c0ed2d04ca6f88da3fdd5ba24182cabd", "score": "0.65859956", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('StalkAdminBundle:Faq')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Faq entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('StalkAdminBundle:Faq:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "69f193cd505298f2c28370b8b0c844c4", "score": "0.65842503", "text": "public function edit($id)\n {\n $especialidade = Especialidade::find($id);\n\n if (is_null($especialidade)) {\n return $this->retornaMensagemNaoEncontrado(false);\n } else {\n return view('especialidade.especialidadeForm')\n ->with('titulo', 'Especialidades - Alteração')\n ->with('especialidade', $especialidade);\n }\n }", "title": "" }, { "docid": "364ca1756970ce6a0c4ca2c96ab66a99", "score": "0.65837765", "text": "function edit() {\n //$this->view->render('Pharmacy/edit');\n }", "title": "" }, { "docid": "b14f129d44d316c72400cd045d6a4e84", "score": "0.65830815", "text": "public function edit($id)\n {\n $formation = Formation::findOrFail($id);\n return view('/formation.update-form', compact('formation'));\n }", "title": "" }, { "docid": "5189a2b2eec4b70ad630efbb5387c44a", "score": "0.6579895", "text": "public function edit(Request $request)\n {\n $id = $request->id;\n if(!$id){\n $request->session()->flash('error', \"Something Went Wrong!.\");\n return redirect(route('manage-contractor-resources'))->withInput();\n }\n $data['chapters'] = Chapter::all();\n $data['info'] = $info = ContractorResource::find($id);\n if(!$info) {\n $request->session()->flash('error', \"Unable to find contractor resource.\");\n return redirect(route('manage-contractor-resources'))->withInput();\n }\n $data['title'] = \"Manage Contractor Resources - Edit\";\n return view('manage_contractor_resources.edit', $data);\n }", "title": "" }, { "docid": "a21034b7eacdbe071c44a2839d5a86e5", "score": "0.6579643", "text": "public function edit()\n\t{\n\t\t$jInput = JFactory::getApplication()->input;\n\t\t$jInput->set('view', 'template');\n\t\t$jInput->set('layout', 'default');\n\t\t$jInput->set('hidemainmenu', 1);\n\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "12c851ca81effd8d08719b4e8d030021", "score": "0.6579554", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('DevPCultBundle:Representation')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Representation entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('DevPCultBundle:Representation:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "82fbbfb6e7f70c57e4866451e08650ae", "score": "0.6572959", "text": "public function edit()\n {\n return view('licenca.edit');\n }", "title": "" }, { "docid": "293e4323f95692bc641e5529b888814d", "score": "0.6572167", "text": "public function edit($id) {\n\n\t\treturn view('balance.entry.edit', \n\t\t\t[\n\t\t\t'title' => 'Editar Registro',\n\t\t\t'action' => [\n\t\t\t'name' => 'edit',\n\t\t\t'value' => 'Editar',\n\t\t\t'route' => '/entry/update/'.$id,\n\t\t\t],\n\t\t\t'concepts' => Concepts::all('name', 'id'),\n\t\t\t'entry' => count(old()) > 0 ? $this->createEntry (old()) : $this->show($id)[0]\n\t\t\t]\n\t\t\t);\n\t}", "title": "" }, { "docid": "f49e849e4d81c6dd329330e95933d929", "score": "0.65693146", "text": "public function showEditForm($jobId) {\n $job = Job::find($jobId);\n return view('jobs/edit', [\n 'job' => $job\n ]);\n }", "title": "" }, { "docid": "87f80527ccf944a69125ffa41418e52d", "score": "0.656931", "text": "public function edit()\n {\n return view('inventory::edit');\n }", "title": "" }, { "docid": "8e54661cceae01836ae81c249aa4446e", "score": "0.6568565", "text": "public function edit($id)\n {\n return view('bodeguero/historial.form', [\n 'historial' => Historial::find($id), \n 'is_editing' => true\n ]);\n }", "title": "" }, { "docid": "544a3a2d2b88694a924ab6829e4dee76", "score": "0.6568338", "text": "public function editAction()\n {\n // returning due to validation:\n if (isset($this->view->form)) {\n return;\n }\n \n $this->view->form = $this->_getTaskForm();\n \n // Get the assignees droplist ready:\n $assignees = $this->_getAssigneesList();\n $this->view->assignees = $assignees;\n \n // Retrieve the record for editing:\n $manager = new Lightman_Managers_Task();\n $taskId = $this->getRequest()->getParam('id');\n $data = $manager->fetch($taskId);\n $this->view->form->populate($data[0]);\n $this->view->form->setAction('/task/save');\n }", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "1b7fd9da0ab889920b059f63dbf4777c", "score": "0.0", "text": "public function show($id)\n\t{\n\t\t$post = Post::find($id);\n\n\t\t$date = $post->created_at;\n\t\tsetlocale(LC_TIME, 'America/New_York');\n\t\t$date = $date->formatlocalized('%A %d %B %Y');\n\n\t\treturn View::make('admin.posts.show')->with('post', $post)\n\t\t\t\t\t\t\t\t\t\t\t ->with('date', $date);\n\t}", "title": "" } ]
[ { "docid": "165e2bbcf8f47c0adbed93548f33d6c1", "score": "0.8019291", "text": "public function show(resource $resource)\n {\n //\n }", "title": "" }, { "docid": "e5e8acc247b28ba8722842dd97070847", "score": "0.74223363", "text": "abstract protected function makeDisplayFromResource();", "title": "" }, { "docid": "cf7a236473d0b19def52419220a82d95", "score": "0.7193305", "text": "public function show(Resource $resource)\n {\n return $resource;\n }", "title": "" }, { "docid": "b8de278532cf1b2d94016c0cd12737fd", "score": "0.7159185", "text": "public function show(Resource $resource)\n {\n $resource = new ResourceResource($resource);\n return $this->success('Resource Detail.', $resource);\n }", "title": "" }, { "docid": "1981d87b70ebb966cb1a7214c5461ecf", "score": "0.7105166", "text": "function display($resource_name) {\n return include $resource_name;\n }", "title": "" }, { "docid": "815f5613a8189df2880c7c0be463594e", "score": "0.69159317", "text": "public function show(Resource $resource)\n {\n return $this->showOne($resource);\n }", "title": "" }, { "docid": "1be3fb8370513aa7e96f7c3e96fdff88", "score": "0.6462615", "text": "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "title": "" }, { "docid": "bf9855687af595254565be84ecf08da3", "score": "0.6460327", "text": "public function show(Request $request, $resource, $id)\n {\n $command = $this->translator->getCommandFromResource($resource, 'show');\n\n $this->runBeforeCommands($command);\n\n $data = $this->dispatchFrom($command, $request, [\n 'modelClass' => $this->translator->getClassFromResource($resource),\n 'id' => $id\n ]);\n\n $this->fireEventForResource($resource, 'show', $data);\n\n return $this->success($data);\n }", "title": "" }, { "docid": "1cff5c8d606548f28e8af3af4e531294", "score": "0.6286817", "text": "protected function showAction()\n {\n $this->showAction\n ->setAccess($this, Access::CAN_SHOW)\n ->execute($this, NULL, NULL, NULL, __METHOD__)\n ->render()\n ->with(\n [\n 'user_log' => $this->userMeta->unserializeData(\n ['user_id' => $this->thisRouteID()],\n [\n 'login', /* array index 0 */\n 'logout', /* array index 1 */\n 'brute_force', /* index 2 */\n 'user_browser' /* index 3 */\n ]\n )\n ]\n )\n ->singular()\n ->end();\n }", "title": "" }, { "docid": "237d3c90b7035170d5fd20572d1e0dbb", "score": "0.6247061", "text": "public function display( Response $response );", "title": "" }, { "docid": "1e1b2e6a47cd86a471b2f6e43a786d4f", "score": "0.6238523", "text": "public function testShowResourceReturnsTheCorrectResource()\n {\n $items = factory(Item::class, 10)->create();\n $item = $items->get(6);\n\n $this->call('GET', sprintf('/api/v1/item/%s', $item->id));\n\n $this->seeJson([\n 'id' => $item->id,\n 'name' => $item->name,\n ]);\n }", "title": "" }, { "docid": "1b943006f882cdea6214d3238f5094bb", "score": "0.61226845", "text": "public function display($id);", "title": "" }, { "docid": "988fc9380f55f5086ebf1ea38e63511d", "score": "0.61054146", "text": "public function operate()\n {\n echo $this->resource.\"\\n\";\n }", "title": "" }, { "docid": "9cd2c7f88d644fa456e7453c3bb610d2", "score": "0.6069253", "text": "function show()\n {\n $this->display();\n }", "title": "" }, { "docid": "31c91777927cb1b0555e264f1cece7a9", "score": "0.6053162", "text": "public function displayAction()\n {\n // set filters and validators for GET input\n $filters = array('id' => array('HtmlEntities', 'StripTags', 'StringTrim')); \n $validators = array('id' => array('NotEmpty', 'Int'));\n\n // test if input is valid retrieve requested record attach to view\n $input = new Zend_Filter_Input($filters, $validators);\n $input->setData($this->getRequest()->getParams()); \n if ($input->isValid()) {\n $q = Doctrine_Query::create()\n ->from('Square_Model_Item i')\n ->leftJoin('i.Square_Model_Country c')\n ->leftJoin('i.Square_Model_Grade g')\n ->leftJoin('i.Square_Model_Type t')\n ->where('i.RecordID = ?', $input->id);\n $result = $q->fetchArray();\n if (count($result) == 1) {\n $this->view->item = $result[0]; \n } else {\n throw new Zend_Controller_Action_Exception('Page not found', 404); \n }\n } else {\n throw new Zend_Controller_Action_Exception('Invalid input'); \n }\n }", "title": "" }, { "docid": "f1919612984d797496fb91a1df6bfc28", "score": "0.60360175", "text": "public function show(Resident $resident)\n {\n //\n }", "title": "" }, { "docid": "9c46cbbf718572f41d5fb18cb85408df", "score": "0.60352117", "text": "public function viewName($resource)\n {\n return $this->name.'::'.$resource;\n }", "title": "" }, { "docid": "4157890d7ce997c99fc951f60a368f8a", "score": "0.6034318", "text": "public function showResource()\n {\n return new ParceiroResource(Parceiro::find(2));\n }", "title": "" }, { "docid": "5f890361bf8d16515c9463c62dee48f3", "score": "0.602238", "text": "protected function showResourceView($id)\n\t{\n\n\t\t$element = $this->getElements($id);\n\t\treturn Response::view('adm/User/element', array('data' => $element));\n\n\t}", "title": "" }, { "docid": "4b6584e73c632121e7d29d1a53288f08", "score": "0.600146", "text": "public function show(Request $request ,$id){\n \n if($request->session()->exists('resources') && isset($request->session()->get('resources')[$id])) {\n $resource = $request->session()->get('resources')[$id];\n $data = [];\n $data['resource'] = $resource;\n $data['enterprise'] = 'Resources Ltd.';\n \n return view('resource.show', $data); \n \n }\n \n return redirect('resource');\n \n }", "title": "" }, { "docid": "f4584c6fbf6732a4cc30c153518eac85", "score": "0.5962682", "text": "function displayResource($file) {\n\tglobal $mosConfig_lang;\n\t$file_lang = migratorBasePath() . '/resources/' . $file . '.' . $mosConfig_lang . '.html';\n\t$file = migratorBasePath() . '/resources/' . $file . '.english.html';\n\tif (file_exists($file_lang)) {\n\t\techo '<div align=\"left\" style=\"border: 1px solid black; padding: 5px; \">';\n\t\tinclude ($file_lang);\n\t\techo '</div>';\n\t} else if (file_exists($file)) {\n\t\techo '<div align=\"left\" style=\"border: 1px solid black; padding: 5px; \">';\n\t\tinclude ($file);\n\t\techo '</div>';\n\t}\n\telse\n\t\tdie(_BBKP_CRITINCLERR . $file);\n\techo __VERSION_STRING;\n}", "title": "" }, { "docid": "78f674e0991329ee80d8bfe522602ce3", "score": "0.59581137", "text": "public function actionShow()\n {\n $this->render('show', array());\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "51df0e59505572a08a6c3c4ea6558bb4", "score": "0.5942475", "text": "public function showAction()\n\t{\n\t\t$this->loadLayout()->renderLayout();\n\t}", "title": "" }, { "docid": "d0d1f283ce410ec0d9c7e82af4062258", "score": "0.59333754", "text": "public function display(WebResource $res) {\n $view = $res->getView() ?: array();\n switch(count($view)) {\n case 0:\n case 1:\n $viewType = Config::get('view.defaultViewType', 'json');\n break;\n default:\n $viewType = $view[0];\n break;\n }\n $viewMappings = Config::get('view.mappings');\n if (!isset($viewMappings[$viewType])) {\n throw new Exception(\n \"Could not render view by type $viewType\",\n Exception::CODE_PRETTY_VIEW_NOTFOUND);\n }\n $viewName = $viewMappings[$viewType];\n $view = $this->classLoader->load($viewName, true);\n if (!$view) {\n throw new Exception(\"Could not render view by $viewName, view class not found.\",\n Exception::CODE_PRETTY_CLASS_NOTFOUND);\n }\n $view->render($res);\n }", "title": "" }, { "docid": "9c9f166dfbd4a1117126f1616068d929", "score": "0.590676", "text": "public function displayAction()\n {\n\n $domainName = GeneralUtility::getIndpEnv('TYPO3_REQUEST_HOST');\n\n $shortenUrl = $this->urlRepository->findShortUrlByPage($this->currentPage);\n\n if (empty($shortenUrl)) {\n $shortenUrl = $this->generateShortUrl();\n }\n\n $this->view\n ->assign('display', $shortenUrl)\n ->assign('domain', $domainName);\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e45bfcde7a17ab2a4f6f9e2caad01271", "score": "0.5883924", "text": "function display()\n\t{\n\t\t// Set a default view if none exists\n\t\tif ( ! JRequest::getCmd( 'view' ) ) {\n\t\t\tJRequest::setVar('view', 'category' );\n\t\t}\n\n\t\t$layout = JRequest::getCmd( 'layout' );\n\n\t\tif ($layout == 'form') {\n\t\t\tJError::raiseError( 404, JText::_(\"Resource Not Found\") );\n\t\t\treturn;\n\t\t}\n\n\t\t$view = JRequest::getVar('view');\n\n\t\tparent::display(true);\n\t}", "title": "" }, { "docid": "6f20a1779e33227cfc4451ace6ab29af", "score": "0.5864878", "text": "public function edit(resource $resource)\n {\n //\n }", "title": "" }, { "docid": "e278522937d7847767c9d2ff92455995", "score": "0.5863409", "text": "public function displayAction()\n {\n // set filters and validators for GET input\n $filters = array(\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\n ); \n $validators = array(\n 'id' => array('NotEmpty', 'Int')\n );\n $input = new Zend_Filter_Input($filters, $validators);\n $input->setData($this->getRequest()->getParams()); \n \n // test if input is valid\n // retrieve requested record\n // attach to view\n if ($input->isValid()) {\n $q = Doctrine_Query::create()\n ->from('Tripjacks_Model_News i')\n ->where('i.newsid = ?', $input->id);\n\n $result = $q->fetchArray();\n if (count($result) == 1) {\n $this->view->news = $result[0]; \n } else {\n throw new Zend_Controller_Action_Exception('Page not found', 404); \n }\n } else {\n throw new Zend_Controller_Action_Exception('Invalid input'); \n }\n }", "title": "" }, { "docid": "8c62873548eaa44202c0ae405fd7d4b3", "score": "0.58593535", "text": "public function resolveForDisplay($resource, $attribute = null)\n {\n $this->prepareLines($resource, $attribute);\n }", "title": "" }, { "docid": "bf80668121276aa95e552b7e16de0410", "score": "0.58592206", "text": "public function display() \n\t{\n\t\t\n\t\tparent::display(); \n\t}", "title": "" }, { "docid": "f0ce504b8c6c28b59b1b83da05a1e7ee", "score": "0.58354145", "text": "public function show($imageResource) {\n\t\theader('Content-type: image/png');\n\t\theader('Content-disposition: inline');\n\t\timagepng($imageResource, null, 0);\n\t}", "title": "" }, { "docid": "1b6934d948dba93be88f01d4f4cde49a", "score": "0.58158535", "text": "public function display($context);", "title": "" }, { "docid": "bcb7bd8aa9f807e36423f26674169bf6", "score": "0.5785241", "text": "public static function resource($resource, $controller, $options) {\n \n }", "title": "" }, { "docid": "06a412168984820a16a8be534a2d85f1", "score": "0.57841134", "text": "public function display()\n\t{\n\t\theader('Content-type: image/png');\n\t\timagepng($this->_imageResource , null , 5 );\n\t}", "title": "" }, { "docid": "55ebb313f26c5900b8cfe594dfa4e5eb", "score": "0.57751614", "text": "public function display() {\n\t\techo $this->render();\n\t}", "title": "" }, { "docid": "2543e47f21a6d16ac7911a7ed2e24588", "score": "0.5771402", "text": "public function showAction()\n {\n //loads the artist\n $artist = $this->_getArtistById($this->_getParam('id'));\n \n //sends it to the view\n $this->view->artist = $artist;\n \n //loads and sends its albums to the view\n $this->view->albums = $artist->findDependentRowset('Model_Album');\n }", "title": "" }, { "docid": "a1ebeebfc498c76d0c8996e04e37ac78", "score": "0.5764601", "text": "public function show(){\n $this->init();\n $this->load(self::class);\n }", "title": "" }, { "docid": "41311b65a90295f931830bf21bc118c5", "score": "0.57608664", "text": "public function DisplayResources($resource_IDs) {\n \n //Variables for the pagination\n $limit_offset = $this->CPagination->limit_offset;\n $limit_maxNumRows = $this->CPagination->limit_maxNumRows;\n \n //Get resources\n $result = $this->MDatabase->GetResources((int) $limit_offset, (int) $limit_maxNumRows, $resource_IDs);\n \n //If nothing is returned, say so and end here\n if(!$result) {\n echo 'No results.';\n return;\n }\n \n //Initiate the variable that will contain all the output\n $output = '';\n \n //Display the resources one by one\n while($row = $result->fetch_array()) {\n $output .= '<div class=\"resource\">';\n \n $title = htmlspecialchars($row['title']);\n $resource_type = htmlspecialchars($row['resource_type']);\n $description = htmlspecialchars($row['description']);\n $publishing_date = htmlspecialchars($row['publishing_date']);\n \n $output .= \"<h3>\" . $title . \"</h3>\";\n $output .= \"<table class='resource_info'><tbody>\";\n $output .= \"<tr>Type: \" . ucwords(strtolower($resource_type)) . '</tr>';\n $output .= ' <tr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"#\" class=\"tooltip\">'\n . '<img src=\"img/information-icon-small.png\">'\n . '<span><img class=\"callout\" src=\"img/callout_black.gif\" />'\n . '<strong>Description</strong><br />' . $this->Parsedown->text($description)\n . '</span></a></tr>';\n \n /* Get and display the URLs */\n $output .= $this->DisplayURLs((int) $row['resource_id']); \n \n //Clear the float\n $output .= '<div class=\"clear\"></div>';\n \n /* Display the publishing date, if it exists */\n $output .= $publishing_date ? \"<tr>Publishing Date: {$publishing_date}</tr>\" : '';\n \n /* Get and display the authors */\n $output .= $this->DisplayAuthors((int) $row['resource_id']);\n\n /* Get and display the keywords */\n $output .= $this->DisplayKeywords((int) $row['resource_id']);\n \n $output .= '</div>'; //close the class=\"resource\" div\n }\n \n echo $output;\n }", "title": "" }, { "docid": "64ca047c763cbf564dd5de6f46e00c8a", "score": "0.5757105", "text": "public function display(){}", "title": "" }, { "docid": "e9b2cd8fa004ddb7b0d9e03744f3126f", "score": "0.57506883", "text": "public function display()\n {\n $return = $this->fetch();\n echo $return;\n }", "title": "" }, { "docid": "2c3490c6d6b2073fd195968f652e07c5", "score": "0.57488596", "text": "public function render()\n {\n $rows = $this->resource->model()::all();\n\n $title = Str::of($this->resource->name())->plural();\n\n return view('moon::resources.index', [\n 'title' => $title,\n 'columns' => $this->resource->columns(),\n 'rows' => $rows\n ])->layout('moon::layouts.app', ['title' => $title]);\n }", "title": "" }, { "docid": "b817fe8afcad697af904cbcdb8688cef", "score": "0.57483834", "text": "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('AVBundle:Reto')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Reto entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('AVBundle:Reto:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "c0a70a08a2849ac13def6ed6304e58da", "score": "0.5743798", "text": "public function show(): UserResource\n {\n return $this->repository->show();\n }", "title": "" }, { "docid": "c952768f11b98a6aed12e59d779b7efa", "score": "0.57387173", "text": "public function display() { echo $this->render(); }", "title": "" }, { "docid": "9aee1654836904270de00365634a70fd", "score": "0.57323885", "text": "protected function show($param) {\n $method = 'show_' . $param;\n if (method_exists($this, $method)) {\n $this->$method();\n } else {\n $this->error('Invalid command argument!');\n $this->help();\n }\n }", "title": "" }, { "docid": "c7ce15d35acae8f764d0adba3a337cb0", "score": "0.57273036", "text": "public function display($file) \n {\n echo $this->fetch($file); \n }", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7fa9265465a0729600bbbce97f9e8303", "score": "0.57220465", "text": "function render(Request $Req, Response $Res, $resource);", "title": "" }, { "docid": "b5e7179ea7c94add1c1af50e9f9b7fdd", "score": "0.57208323", "text": "public function show($id)\n\t{\n\t\n\t}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" }, { "docid": "3635f9e6312e7f3ef2e689432f8a3312", "score": "0.5705637", "text": "public function show( Patient $patient ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "560ae0fd472bad5f1d21beeed5dfbbdd", "score": "0.57012135", "text": "public function show(){}", "title": "" }, { "docid": "7b283ba1c0546a155efc95a44dd0f9cf", "score": "0.56981397", "text": "public function show(Response $response)\n {\n //\n }", "title": "" }, { "docid": "a042815ce2283cc6c3688042abe87a56", "score": "0.56963277", "text": "public function show($id)\n\t{\n\t\t//\n \n \n\t}", "title": "" }, { "docid": "5bc1d8742885bcbc1dc675e2bcd69dd2", "score": "0.56894034", "text": "public function display(midgardmvc_core_request $request);", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
ac093d8259475b9889ec69c28d65b0fb
Register the service provider.
[ { "docid": "0f167df9b004c2198baf176bb127187b", "score": "0.0", "text": "public function register()\n {\n $this->app->bind(\n 'CMSController',\n function ($app) {\n return new CMSController(\n $app->make('PageRepository')\n );\n }\n );\n\n $this->app->bind(\n 'AssetController',\n function ($app) {\n return new AssetController();\n }\n );\n }", "title": "" } ]
[ { "docid": "0d87ee6dd2f23b887ee2d120a1e147dc", "score": "0.7428265", "text": "public function register()\n {\n // Register the service the package provides.\n }", "title": "" }, { "docid": "807f2a70ce4e5464b4231d9e2e94534c", "score": "0.7254595", "text": "public function register()\n {\n $this->providers();\n\n }", "title": "" }, { "docid": "bf07a6ccbc1940e2be8abff91e94a2f6", "score": "0.71774215", "text": "public function register()\n {\n $this->registerServices();\n }", "title": "" }, { "docid": "0f4f84b956928f71f7a16f6acae26024", "score": "0.712882", "text": "public function register()\n {\n $this->registerProviders();\n }", "title": "" }, { "docid": "543587c544fdcb2e13a864150094d736", "score": "0.7053165", "text": "public function register()\n {\n $this->app->register(TelescopeServiceProvider::class);\n }", "title": "" }, { "docid": "58664eeba046725d1a4ca997a0bf8962", "score": "0.6969757", "text": "public function register()\n {\n // $this->app['filemanager'] = $this->app->share(function($app)\n // {\n // return new Datatables($app['request']);\n // });\n }", "title": "" }, { "docid": "d82b920fc78bef25c93915d5b92f3d27", "score": "0.6889005", "text": "public function register()\n\t{\n\t\t$this->registerFacadeAccess();\n\t}", "title": "" }, { "docid": "d9d1059fa02078e28d0dfd2e689a116c", "score": "0.6874101", "text": "public function register()\n {\n // Automatically apply the package configuration\n $this->mergeConfigFrom(__DIR__.'/../config/laravel-twitter-handle-validation.php', 'laravel-twitter-handle-validation');\n\n // Register the main class to use with the facade\n $this->app->singleton('laravel-twitter-handle-validation', function () {\n return resolve(LaravelTwitterHandleValidation::class);\n });\n }", "title": "" }, { "docid": "056fdd5ff79e46612e89a4fed5721c8b", "score": "0.68724096", "text": "public function register()\n {\n $this->registerViewFinder();\n\n $this->registerThemes();\n }", "title": "" }, { "docid": "883b9e435053547c481a49304498f5a4", "score": "0.68684393", "text": "public function register()\n {\n \n // register providers\n $this->registerCustomerAdapter();\n \n //finally call the customer class\n $this->registerCustomer();\n }", "title": "" }, { "docid": "296cfbb8b1217cf6f1b04a268a62feb7", "score": "0.6866025", "text": "public function register()\n {\n $this->loadConfigs(['assets.php', 'permissions.php']);\n $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');\n\n $this->app->singleton(RecentlyViewed::class, function ($app) {\n return new RecentlyViewed(\n $app['session'],\n $app['events'],\n 'compare',\n session()->getId() . '_recently_viewed',\n config('baslat.module.compare.config')\n );\n });\n\n $this->app->alias(RecentlyViewed::class, 'recently_viewed');\n }", "title": "" }, { "docid": "fe26bbb7db29263ec6dd431a01425e2e", "score": "0.68586105", "text": "public function register()\n {\n //...\n }", "title": "" }, { "docid": "1972f1e6119d099f0641547ee996732c", "score": "0.68477494", "text": "public function register() {\n\n /** Theme uploader . */\n $this->app->singleton('theme-manager', function() {\n return new Uploader(\n new Finder\n );\n });\n\n /** Register caching theme . */\n $this->app->singleton('theme-repository', function() {\n return new Repository(\n new Finder\n );\n });\n\n /** Register theme manager service layer . */\n $this->app->singleton('theme-service', function($app) {\n return new ThemeService(\n $app['theme-repository'], $app['theme-manager']\n );\n });\n }", "title": "" }, { "docid": "70f5dc40294e4151c234a2b148148e49", "score": "0.68445903", "text": "public function register() {\n\n }", "title": "" }, { "docid": "bb1ae55924f2c5f142a7121b8c13b4be", "score": "0.6837879", "text": "public function register()\n {\n $this->mergeConfigFrom(__DIR__ . '/../config/permission.php', 'focus-permission');\n $this->app->singleton('focus-permission', function () {\n return new FocusPermission;\n });\n }", "title": "" }, { "docid": "1a91af7a6823db7b54da3db8d14bd0db", "score": "0.6825457", "text": "public function register()\r\n {\r\n $this->mergeConfigFrom(static::DEFAULT_CONFIG_PATH, 'telegrapher');\r\n\r\n $this->registerAuthenticator();\r\n\r\n $this->app->singleton(Stringifier::class, function (Application $application) {\r\n return new JSONStringifier();\r\n });\r\n\r\n $this->app->singleton(Signer::class, function (Application $application) {\r\n return new HMACSigner();\r\n });\r\n\r\n $this->app->singleton(\r\n \\Telegrapher\\Contracts\\Telegrapher::class,\r\n Telegrapher::class\r\n );\r\n }", "title": "" }, { "docid": "31568f2614a35437295bc0406ea65797", "score": "0.68248403", "text": "public function register()\n {\n //绑定单例\n $this->app->singleton('fileinput', function () {\n return new LaravelFileinput();\n });\n }", "title": "" }, { "docid": "4db599a8bbb2df19e85c56decc7874de", "score": "0.682302", "text": "public function register()\n {\n\n $this->registerValidator($this->app);\n\n $this->registerBillplz($this->app);\n\n }", "title": "" }, { "docid": "19dc464bbcbf7b12ae70537cfde7c917", "score": "0.681956", "text": "public function register() {\n //\n }", "title": "" }, { "docid": "19dc464bbcbf7b12ae70537cfde7c917", "score": "0.681956", "text": "public function register() {\n //\n }", "title": "" }, { "docid": "19dc464bbcbf7b12ae70537cfde7c917", "score": "0.681956", "text": "public function register() {\n //\n }", "title": "" }, { "docid": "19dc464bbcbf7b12ae70537cfde7c917", "score": "0.681956", "text": "public function register() {\n //\n }", "title": "" }, { "docid": "19dc464bbcbf7b12ae70537cfde7c917", "score": "0.681956", "text": "public function register() {\n //\n }", "title": "" }, { "docid": "19dc464bbcbf7b12ae70537cfde7c917", "score": "0.681956", "text": "public function register() {\n //\n }", "title": "" }, { "docid": "19dc464bbcbf7b12ae70537cfde7c917", "score": "0.681956", "text": "public function register() {\n //\n }", "title": "" }, { "docid": "19dc464bbcbf7b12ae70537cfde7c917", "score": "0.681956", "text": "public function register() {\n //\n }", "title": "" }, { "docid": "19dc464bbcbf7b12ae70537cfde7c917", "score": "0.681956", "text": "public function register() {\n //\n }", "title": "" }, { "docid": "19dc464bbcbf7b12ae70537cfde7c917", "score": "0.681956", "text": "public function register() {\n //\n }", "title": "" }, { "docid": "19dc464bbcbf7b12ae70537cfde7c917", "score": "0.681956", "text": "public function register() {\n //\n }", "title": "" }, { "docid": "19dc464bbcbf7b12ae70537cfde7c917", "score": "0.681956", "text": "public function register() {\n //\n }", "title": "" }, { "docid": "2ba0b2a799f1b45cc5624264846ff0d1", "score": "0.68139213", "text": "public function register()\n {\n $this->registerBindings();\n $this->registerApiManager();\n $this->registerCommands();\n }", "title": "" }, { "docid": "d398b71f220329dd544aa16db8176a62", "score": "0.6811868", "text": "public function register()\n {\n // merge in df config, https://laravel.com/docs/5.4/packages#resources\n $configPath = __DIR__ . '/../config/config.php';\n $this->mergeConfigFrom($configPath, 'df');\n\n $this->registerServices();\n $this->registerExtensions();\n $this->registerOtherProviders();\n }", "title": "" }, { "docid": "a303d5ea07c1c6911c9ea8b29ca103cf", "score": "0.68095255", "text": "public function register()\n {\n $this->registerAnnotations();\n }", "title": "" }, { "docid": "63d759f7016baa3e0a39f5b196d46f74", "score": "0.68062985", "text": "public function register()\n {\n $this->registerCommands();\n $this->registerSingleton();\n }", "title": "" }, { "docid": "01e14e570f67f8bdf7ffe545b17a2fd1", "score": "0.68010193", "text": "public function register() {\n\n\t\t//\n\t\t// IoC\n\t\t//\n\t\t$this->app->singleton('TippingCanoe\\LaravelOauth\\Service', function (Application $app) {\n\t\t\treturn new Service(\n\t\t\t\t$app['request'],\n\t\t\t\t$app['cache'],\n\t\t\t\t$app['TippingCanoe\\LaravelOauth\\Repository\\AccessToken'],\n\t\t\t\t$app['TippingCanoe\\LaravelOauth\\Repository\\Consumer'],\n\t\t\t\t$app['config']->get('laravel-oauth::nonce_ttl'),\n\t\t\t\t$app['config']->get('app.debug')\n\t\t\t);\n\t\t});\n\n\t\t// Bind our repositories;\n\t\t$this->app->bind('TippingCanoe\\LaravelOauth\\Repository\\AccessToken', 'TippingCanoe\\LaravelOauth\\Repository\\DbAccessToken');\n\t\t$this->app->bind('TippingCanoe\\LaravelOauth\\Repository\\Consumer', 'TippingCanoe\\LaravelOauth\\Repository\\DbConsumer');\n\n\t\t//\n\t\t// Commands\n\t\t//\n\t\t$this->commands(\n\t\t\t'TippingCanoe\\LaravelOauth\\Command\\AddConsumerCommand'\n\t\t);\n\n\t\t//\n\t\t// Filters\n\t\t//\n\t\t$this->app['router']->filter('oauth-consumer', 'TippingCanoe\\LaravelOauth\\Filter\\Consumer');\n\t\t$this->app['router']->filter('oauth-access', 'TippingCanoe\\LaravelOauth\\Filter\\Access');\n\n\t}", "title": "" }, { "docid": "e96fa1ffb98bb04edced1c92d6782a8d", "score": "0.6798643", "text": "public function register() {\n\t\t$this->registerProviders();\n\t\t$this->registerAuthManager();\n\t\t$this->registerFacades();\n\t}", "title": "" }, { "docid": "0e63952d7c49509c477bd6b8a11c8f0c", "score": "0.6795637", "text": "public function register()\n {\n $this->app->register(UploadManagerServiceProvider::class);\n }", "title": "" }, { "docid": "5d6c28e362ca9230d655d8e56d01f374", "score": "0.6794911", "text": "public function register()\n {\n $this->setupRoutes();\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n $loader->alias('AdminPanel', \\Qla\\AdminPanel\\AdminPanelServiceProvider::class);\n\n\n// \\App::singleton(\n//\n// \\Qla\\AdminPanel\\app\\Exceptions\\Handler::class\n// );\n\n\n// $this->app->register('Kodeine\\Acl\\AclServiceProvider');\n }", "title": "" }, { "docid": "135ba98bd73cb6d12da4468607b63fc7", "score": "0.67927927", "text": "public function register()\r\n {\r\n $this->registerConfig();\r\n\r\n $this->app['auth']->provider('modx_user_provider', function($app, array $config) {\r\n return new ModxUserProvider(new ModxHasher, modUser::class);\r\n });\r\n\r\n $this->app->singleton(ModxCMS::class, function ($app) {\r\n return new ModxCMS;\r\n });\r\n }", "title": "" }, { "docid": "e76398f9d310271c3b76018105ff77ac", "score": "0.6791718", "text": "public function register()\n {\n $this->registerClient();\n $this->registerCachingClient();\n }", "title": "" }, { "docid": "a9544c11876c663b2076cb71fa0e29a3", "score": "0.67904466", "text": "public function register()\n {\n $this->registerServices();\n $this->setupStubPath();\n $this->registerProviders();\n }", "title": "" }, { "docid": "6cd0025de4a8201f6e475c42414c2ed5", "score": "0.67874855", "text": "public function register()\n {\n $this->registerWeixin();\n $this->registerFacade();\n //$this->registerBindings();\n }", "title": "" }, { "docid": "c7b7ea75f91ae43bbe1572f56dbd0502", "score": "0.67874634", "text": "public function register()\n {\n \n }", "title": "" }, { "docid": "c7b7ea75f91ae43bbe1572f56dbd0502", "score": "0.67874634", "text": "public function register()\n {\n \n }", "title": "" }, { "docid": "36fd7bf8229cec2d59f40811cb5698ae", "score": "0.6782862", "text": "public function register()\n\t{\n\t\t$this->registerExtensionsFinder();\n\t\t$this->registerExtensions();\n\t}", "title": "" }, { "docid": "e46cf4e5812d9bbc879a8146080ae800", "score": "0.67758876", "text": "public function register()\n {\n //only need when using facade\n $this->app->singleton('optivo', function ($app) {\n return new Optivo(new Client(), $app['config']);\n });\n }", "title": "" }, { "docid": "cb918d8d97b585310f1b375c03e88adb", "score": "0.67712635", "text": "public function register()\n\t{\n $this->package('ecjia/system');\n\n $this->registerNamespaces();\n\n $this->registerProviders();\n\n $this->registerLocalProviders();\n\n $this->registerFacades();\n\n $this->registerMixins();\n\n $this->registerAppService();\n\n $this->registerErrorRender();\n\t}", "title": "" }, { "docid": "e17f9e8b00de710981676d40b5d3c151", "score": "0.67701685", "text": "public function register()\n {\n $this->registerClient();\n }", "title": "" }, { "docid": "7b0b2fdf15b01060e5e75c7fd13e3c23", "score": "0.67689294", "text": "public function register() {\n //\n }", "title": "" }, { "docid": "81093ff516e6fb66bf20039ef51f23f2", "score": "0.6762759", "text": "public function register()\n {\n $this->configure();\n }", "title": "" }, { "docid": "81093ff516e6fb66bf20039ef51f23f2", "score": "0.6762759", "text": "public function register()\n {\n $this->configure();\n }", "title": "" }, { "docid": "b4e4d13cfaeda6f13dadbabf1779f68f", "score": "0.67626166", "text": "public function register()\n {\n $this->registerTidioChat();\n }", "title": "" }, { "docid": "340523f42f61544bcf8e027a97990673", "score": "0.67618024", "text": "public function register()\n {\n //验证签名\n $this->app->singleton('sequence', function ($app) {\n return new Sequence(1);\n });\n\n\n //阿里地图接口\n $this->app->singleton('amap', function ($app) {\n return new Amap($app);\n });\n }", "title": "" }, { "docid": "786a37588fa2ce54f69c03b0aeb93583", "score": "0.67602617", "text": "public function register()\n {\n $this->app->singleton(\n XmlServicesInterface::class,\n XmlServices::class\n );\n }", "title": "" }, { "docid": "8af344f37cede8689b8c74a4a690dae5", "score": "0.6751206", "text": "public function register(): void\n {\n // Automatically apply the package configuration\n $this->mergeConfigFrom(__DIR__ . '/../config/config.php', 'laravel-interface-translation');\n\n // Register the main class to use with the facade\n $this->app->singleton(LaravelInterfaceTranslation::class, function () {\n return new LaravelInterfaceTranslation();\n });\n }", "title": "" }, { "docid": "44e2af131f4429072e6356d53d8aaa2c", "score": "0.67504245", "text": "public function register() {\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" } ]
e36cb73c86fbae95fdb5aec49d542e5b
Retrieve all users guides
[ { "docid": "c0326c526ffe4fbc53004ca9e6c0b7da", "score": "0.77853084", "text": "private function all_users_guides()\n {\n if(request()->has('search')) {\n return Guide::search(request('search'))\n ->paginate(14);\n }\n\n if(request()->has('tag')) {\n return Guide::ofTag(request('tag'))->paginate(14);\n }\n\n return Guide::paginate(14);\n }", "title": "" } ]
[ { "docid": "11330eb18eacde6fc16976ff459f7dd6", "score": "0.7395411", "text": "private function auth_user_guides()\n {\n if(request()->has('search')) {\n return auth()->user()\n ->guides()\n ->search(request('search'))\n ->paginate(14);\n }\n\n if(request()->has('tag')) {\n return auth()->user()\n ->guides()\n ->ofTag(request('tag'))\n ->paginate(14);\n }\n\n return auth()->user()\n ->guides()\n ->paginate(14);\n }", "title": "" }, { "docid": "f89b833674178da63608a9892bf2d5f6", "score": "0.6310888", "text": "public function index(){\n $guides = DB::table('guide')->get();\n\n return response()->json($guides);\n }", "title": "" }, { "docid": "98a617ec2b7849e7a2b1c944447ffba7", "score": "0.6155875", "text": "public function guides() {\n return $this->hasMany('App\\Guide');\n }", "title": "" }, { "docid": "23ab808f896b43dee9590e820d313e35", "score": "0.6078662", "text": "public function favoriteStrategyGuides() {\n return $this->belongsTomany('App\\Models\\StrategyGuide', 'favorites', 'user_id', 'strategy_guide_id');\n }", "title": "" }, { "docid": "9d9c935162a2d46010c2b3a9a201f1a7", "score": "0.6008506", "text": "public function Guide_get(){ \n \n try {\n $this->load->library(\"api/Guide_lib\");\n $s = new Guide_lib;\n $result = $s->User_guide();\n }\n catch(Exception $e)\n {\n $response['result']['status'] = 'error';\n $response['result']['response']\t= $e->getMessage();\n $this->response($response, $e->getCode());\n }\n header(\"Access-Control-Allow-Origin: *\");\n $this->response($result[0], $result[1]);\n }", "title": "" }, { "docid": "1e716f3b82a4067c3ebafe86d17483ee", "score": "0.5930808", "text": "public function index()\n {\n return User::with([\"professions\", \"agency\"])->get();\n }", "title": "" }, { "docid": "346574b6db988f7a4cf05130407ea312", "score": "0.587237", "text": "public function getUsers();", "title": "" }, { "docid": "ba9b2dff05fb61f7878e770401e39341", "score": "0.5789825", "text": "public function all(){\n return $this->user->get();\n }", "title": "" }, { "docid": "159ae3ccc10b6057b6a6dc52079d56b0", "score": "0.57159954", "text": "public function getUsers(){\n\t}", "title": "" }, { "docid": "12d2d0818bb34f248cda01ffa520599e", "score": "0.57019854", "text": "public function getUserAll();", "title": "" }, { "docid": "90e0685343375690488076aacb26cc3e", "score": "0.56692356", "text": "public function strategyGuides() {\n return $this->hasMany('App\\Models\\StrategyGuide');\n }", "title": "" }, { "docid": "9a489475d92775b36ca7930ee036e8ae", "score": "0.55696446", "text": "public function getUsers(): array;", "title": "" }, { "docid": "f9cad9dbc7093178d2901d6f5c073ade", "score": "0.5559298", "text": "public function actionIndex()\n {\n $user = Yii::$app->user->identity;\n\n $searchModel = new GuidelineSectionSearch($user->findGuidelineSectionsQuery());\n $dataProvider = $searchModel->search(Yii::$app->request->get());\n\n return $dataProvider;\n }", "title": "" }, { "docid": "103dc682959ccab9656e52ac50f03d8b", "score": "0.5539403", "text": "public function getGuideLanguages()\n {\n return $this->hasMany(GuideLanguage::className(), ['sid' => 'id']);\n }", "title": "" }, { "docid": "98688eb1f5376ae93080bb20222ec361", "score": "0.55289143", "text": "public function index()\n {\n return User::all($this->showedFields)->load('apples');\n }", "title": "" }, { "docid": "aeb32087ac5bc4329167b016686f2f7d", "score": "0.5524439", "text": "public function getAllUsers();", "title": "" }, { "docid": "7aeee23957a04f71c7d8e6aaaa529596", "score": "0.5489293", "text": "public function all(){\n $users = User::all();\n $usersArray=[];\n $i=0;\n\n $usersTeachers = User::where('role', 'Teacher')->get();\n $usersStudents = User::where('role', 'Student')->get();\n\n foreach ($users as $user) {\n $level = Level::find($user->id_level);\n if($user->role==\"Administrator\"||$user->role==\"Teacher\"){\n $level = \"\";\n }else{\n $level = $level['level_name'].' '.$level['grade'].'° \"'.$level['section'].'\"';\n }\n $usersArray[$i] = [\n 'id'=>$user->id,\n 'name'=>$user->name,\n 'role'=>$user->role,\n 'level'=> $level,\n 'dni'=>$user->dni\n ];\n $i=$i+1;\n }\n return view('admin.users.list', compact('usersArray','usersStudents', 'usersTeachers'));\n }", "title": "" }, { "docid": "6ec8f2c3fa2edb95d1196f06758e7e31", "score": "0.5454366", "text": "public function index()\n {\n return User::whereHas('roles', function($q)\n {\n $q->whereIn('name', ['orientador', 'tutor']);\n \n })->get();\n }", "title": "" }, { "docid": "ca088cac37bedd14758e1c33ed856c49", "score": "0.5445766", "text": "public function getGuideLanguages()\n {\n return $this->hasMany(GuideLanguage::className(), ['lang_code' => 'lang_code']);\n }", "title": "" }, { "docid": "1fee196e85914629e06dc1b53620c4e9", "score": "0.5445235", "text": "public function index()\n {\n $tourguides = Guide::all();\n return view('admin.tourGuide.tourGuide', compact('tourguides'));\n }", "title": "" }, { "docid": "2d0caa111ca9dd7fdf168eac554a82e3", "score": "0.54221165", "text": "public function index()\n {\n return $this->user->get();\n }", "title": "" }, { "docid": "f72e0252259098d7751f5560252ed033", "score": "0.54193807", "text": "public function index()\n {\n return Engagement::with('users')->get();\n }", "title": "" }, { "docid": "4868184fbe7b60ef01f8c3f5c54e37bc", "score": "0.5416983", "text": "public function getUserlist()\n {\n $users = Doctrine::getRepository(\"User\")->findby(array('roolId' => User::USER));\n View::share('users', $users);\n $this->layout->content = View::make('admin.list');\n }", "title": "" }, { "docid": "075cee93d000cd2c803b7937d988e3ed", "score": "0.54026586", "text": "public function UserCourses()\n {\n $userid = Auth::user()->id;\n $user = User::findOrFail($userid);\n //return $user->courses()->get();\n return DB::table('users')\n ->join('user_course', 'users.id', '=', 'user_course.user_id')\n ->join('profile', 'profile.id', '=', 'user_course.profile_id')\n ->join('course', 'course.id', '=', 'user_course.course_id')\n ->join('lesson', 'lesson.id', '=', 'user_course.latest_lesson_id')\n ->where('users.id', $userid)\n ->where('profile.id', 1)\n ->select('course.*', 'lesson.sorting as lesson_sorting','user_course.id as user_course_id', 'user_course.latest_lesson_id', 'user_course.course_progress')\n ->get();\n }", "title": "" }, { "docid": "2d1bfdd1c4a21c73bc2a6369fb1a5e2f", "score": "0.53891176", "text": "public function loadOptions()\n {\n global $current_user;\n\n $dashletDefs = $current_user->getPreference('dashlets', 'Home'); // load user's dashlets config\n if(isset($dashletDefs[$this->id]['options']))\n return $dashletDefs[$this->id]['options'];\n else\n return array();\n }", "title": "" }, { "docid": "6d167d31ea7b770411285fba77347c84", "score": "0.53646183", "text": "public function index()\n {\n $this->authorize('isAdmin');\n return User::latest()->paginate(10);\n }", "title": "" }, { "docid": "f961bd49b65b245218dc7eced41698bf", "score": "0.53608006", "text": "public static function get_all_user(){\n try{\n return User::paginate(config('app.standard_limit'));\n }catch (QueryException $ex){\n //dd($ex->getMessage());\n die('An error occur. Please try later');\n }\n }", "title": "" }, { "docid": "a4fccd030b5132278d30e16d754b663f", "score": "0.5359477", "text": "public function get_users(){\n $user = $this->cm->select('users', [], '', 'id', 'desc');\n echo '<pre>';\n print_r($user);\n }", "title": "" }, { "docid": "0d043bf0c95f31a947f7a359d6328b0b", "score": "0.5358603", "text": "function iss_get_user_option_list() {\n\t$user_id = get_current_user_id ();\n\treturn get_user_meta ( $user_id );\n}", "title": "" }, { "docid": "9c2776c0b389c1dc4417566e74609840", "score": "0.53579116", "text": "public function index()\n {\n return view(\"guardian.pages.users.teachers.index\", [\n \"teachers\" => User::with('assignCourses')->role('teacher')->get()\n ]);\n }", "title": "" }, { "docid": "2b2ff90accb3103a248157584821a651", "score": "0.53517383", "text": "public function getAll($user);", "title": "" }, { "docid": "2b2ff90accb3103a248157584821a651", "score": "0.53517383", "text": "public function getAll($user);", "title": "" }, { "docid": "ffad1e0bb85e691ce263f61969885191", "score": "0.534539", "text": "function getUsers ();", "title": "" }, { "docid": "e88e8c82e489b14908cd720738595b00", "score": "0.53292817", "text": "public function index()\n {\n $userPreferences = User::select(\n \"usersPerPage\",\n \"customersPerPage\",\n \"availableTasksPerPage\",\n \"taskListsPerPage\",\n \"myTasksPerPage\",\n \"announcementsPerPage\",\n \"sentAnnouncementsPerPage\",\n \"sidebarTextColor\",\n \"sidebarTextSelectedColor\"\n )->where(\"id\", Auth::id())->first();\n return response()->json(['status' => 200, 'userPreferences' => $userPreferences]);\n }", "title": "" }, { "docid": "c8875d215a332c9a35738f33dc4193f6", "score": "0.5309376", "text": "public function getAchieveList(){\r\n return $this->_get(3);\r\n }", "title": "" }, { "docid": "50fbb05f2cc4085b7389723c6fcce913", "score": "0.52977175", "text": "public function listing() {\n $this->aConfigs = $this->oUser->select();\n }", "title": "" }, { "docid": "83d4e7f49a8ff5f75ee8595256dbdd6b", "score": "0.5297432", "text": "public function index()\n\t{\n\t\treturn User::all();\n\t}", "title": "" }, { "docid": "83d4e7f49a8ff5f75ee8595256dbdd6b", "score": "0.5297432", "text": "public function index()\n\t{\n\t\treturn User::all();\n\t}", "title": "" }, { "docid": "dc10d526975f5298cb6e8c6d9c3730b8", "score": "0.52914035", "text": "public function index()\n {\n $myuser = Auth::User();\n return view('students.tutors.index') -> with('assignments', $myuser->assignments()->get());\n }", "title": "" }, { "docid": "ac23010fe7236c7e361dcaa7b92dfe43", "score": "0.5283163", "text": "public function indexProfessionals()\n {\n return $this->user\n ->where('type', UserType::PROFESSIONAL)\n ->paginate(15);\n }", "title": "" }, { "docid": "6a695fc0d00b713a6fdd3a5556fe72bb", "score": "0.5281046", "text": "public function getAuthAssignments($userId);", "title": "" }, { "docid": "84dc3ca5218bbc02ea6b4bd6adace145", "score": "0.5278839", "text": "public function index(){\n $admins = Admin::all();\n foreach($admins as $admin){\n $admin->getUser->id;\n }\n return $admins;\n }", "title": "" }, { "docid": "2da2c985cec6dbd85dae5976b3be23b8", "score": "0.52759695", "text": "public function index()\n {\n //Allow only admins to see the list of all users\n $this->authorize('isAdmin');\n\n $users = User::where('role', '<>', 'admin')\n ->withCount('books')\n ->withCount('reviews')\n ->withCount('authors')\n ->orderBy('name', 'ASC')->orderBy('id', 'DESC');\n\n if(request()->has('paginate')){\n $users = $users->paginate(intval(request('paginate')));\n return UserResource::collection($users)->appends(request()->query());\n }else{\n $users = $users->get();\n return UserResource::collection($users);\n } \n }", "title": "" }, { "docid": "5253414ecf6de29f80d404edca661e4b", "score": "0.52618206", "text": "public function all()\n {\n return $this->user->all();\n }", "title": "" }, { "docid": "44328304592912d68075c968dbeaff2e", "score": "0.52616054", "text": "function getAllUsers(){\n return $this->dbcommon->getAll(\"user\");\n }", "title": "" }, { "docid": "823e67d3c1715238cf54f23229b5e832", "score": "0.52588916", "text": "function connects_get()\n {\n $users = array(\n\t\t\tarray('id' => 1, 'name' => 'Some Guy', 'email' => '[email protected]'),\n\t\t\tarray('id' => 2, 'name' => 'Person Face', 'email' => '[email protected]'),\n\t\t\t3 => array('id' => 3, 'name' => 'Scotty', 'email' => '[email protected]', 'fact' => array('hobbies' => array('fartings', 'bikes'))),\n\t\t);\n \n if($users)\n {\n $this->response($users, 200); // 200 being the HTTP response code\n }\n\n else\n {\n $this->response(array('error' => 'Couldn\\'t find any users!'), 404);\n }\n }", "title": "" }, { "docid": "67314b177afc5163c992f8cb7db33baa", "score": "0.5255929", "text": "public function showUsersAction()\n {\n $classId = $this->params()->fromRoute('class_id');\n\n $sql = \"select * from semester_class where grade = $classId\";\n echo $sql;\n $pdo = $this->sm->get(PdoTest::class);\n $arr = $pdo->query($sql)->fetchAll();\n\n print_r($arr);\n\n }", "title": "" }, { "docid": "a662ae94c6bbd02abfda2ab938036d04", "score": "0.5254204", "text": "public function index()\n {\n $user = User::find(Auth::id());\n if($user->isAbleTo('preferences')){\n $data = Preference::join( 'agegroup', 'preference_category.age_group_id', '=', 'agegroup.id')\n ->select('preference_category.*','agegroup.age_group')\n ->where('preference_category.is_deleted',0)\n ->orderBy('id','desc')\n ->get();\n return view('preferences.preferences',compact('data'));\n }else{\n abort(403,\"You don't have permission to access this page\");\n }\n //\n }", "title": "" }, { "docid": "7d80aa63cf1424b55bdb0b2023263e27", "score": "0.5251832", "text": "public function index()\n {\n $Teachers = Teacher::all();\n return TeacherResource::collection($Teachers);\n }", "title": "" }, { "docid": "068d10d64f60c679221aec796981b460", "score": "0.5238149", "text": "public function usersContributees($params = array())\n {\n return $this->get('users/contributees', $params);\n }", "title": "" }, { "docid": "3fa262b47cffacd9f48d7c71ebafb447", "score": "0.523449", "text": "function getInstructors()\n {\n try\n {\n $dbObj = new Database();\n $db = $dbObj->getConnection();\n $query = \"Select UserID, FirstName, LastName , Email \"\n . \"From UserAccount \"\n . \"Where UserRole = 2 OR UserRole = 4\";\n $statement = $db->prepare($query);\n $statement->execute();\n $instructors = $statement->fetchAll();\n $statement->closeCursor();\n\n return $instructors;\n } catch (PDOException $e)\n {\n //$error_message = $e->getMessage();\n //error_log($error_message, (int)0,\"./error.txt\");\n return \"Could not retrieve instructor list\";\n }\n }", "title": "" }, { "docid": "3fa262b47cffacd9f48d7c71ebafb447", "score": "0.523449", "text": "function getInstructors()\n {\n try\n {\n $dbObj = new Database();\n $db = $dbObj->getConnection();\n $query = \"Select UserID, FirstName, LastName , Email \"\n . \"From UserAccount \"\n . \"Where UserRole = 2 OR UserRole = 4\";\n $statement = $db->prepare($query);\n $statement->execute();\n $instructors = $statement->fetchAll();\n $statement->closeCursor();\n\n return $instructors;\n } catch (PDOException $e)\n {\n //$error_message = $e->getMessage();\n //error_log($error_message, (int)0,\"./error.txt\");\n return \"Could not retrieve instructor list\";\n }\n }", "title": "" }, { "docid": "5b3600e1a85e30b30d6630d58ce53ac0", "score": "0.5229806", "text": "public static function getAll()\n {\n $db = static::getDB();\n $stmt = $db->query('SELECT name, title FROM `advertisements` LEFT JOIN `users` ON `userid` = users.id ORDER BY users.name DESC;');\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "0d50da3d552f8b1d983313e54d399bc2", "score": "0.52250916", "text": "public function actionGetByUser() {\n $this->addView('book/list');\n $books = BookDao::get()->findByUserId($this->_auth->GetId());\n foreach ($books as $book) {\n unset($book->Synopsis);\n unset($book->Review);\n unset($book->Tags);\n }\n $this->content->books = $books;\n }", "title": "" }, { "docid": "dfdaeb75cf2d2291acb40af28816653d", "score": "0.5213065", "text": "public function preferences()\n {\n return $this->hasMany( UserPreference::class );\n }", "title": "" }, { "docid": "87d7d7d9bdac79accfa3922d4df4aa5a", "score": "0.5209277", "text": "public function index()\n\t{\n\t\t$userId = $this->auth->user()->id;\n\t\t$user = User::find($userId);\n\t\t$optionRole = Role::lists('title','id');\n\t\t$optionActive = Config::where('group','active')->lists('title','value');\n\t\treturn view('auth.profiles.index',compact('user','optionRole','optionActive'));\n\t}", "title": "" }, { "docid": "9dcb0d5e0a1f7889613cc30259f96378", "score": "0.5204592", "text": "public function lists() {\n $query = $this->Md->query(\"SELECT * FROM user\");\n echo json_encode($query);\n }", "title": "" }, { "docid": "7bc2ddb3ff06a1a6617d7684103c1b58", "score": "0.52039284", "text": "public function index()\n {\n if (!Gate::allows(User::LIST_PERMISSION)) {\n abort(403);\n }\n\n return User::paginate();\n }", "title": "" }, { "docid": "d4a338ce4023dab48e3144f785511205", "score": "0.51970834", "text": "public function index()\n {\n if (Gate::allows('isAdmin') || Gate::allows('isAuthor')) {\n return User::latest()->paginate(10);\n }\n }", "title": "" }, { "docid": "cd40c24621304e704fb5e9e7eda5c27c", "score": "0.51970184", "text": "public function list()\n {\n return User::all();\n }", "title": "" }, { "docid": "de5e262617b42240bab7d946cc9906e1", "score": "0.51886946", "text": "public function index()\n {\n if (\\Gate::allows('isAdmin') || \\Gate::allows('isAuthor')) {\n return User::latest()->with('roles')->paginate(10);\n }\n }", "title": "" }, { "docid": "3d5280056e64f17d50096ee4ca936d1b", "score": "0.5187854", "text": "public function index()\n {\n $proposals = Proposal::all();\n if (Auth::check())\n {\n return response()->json([\n 'proposals' => $proposals,\n 'user_id' => Auth::user()->id,\n ], 200);\n }\n else {\n return response()->json([\n 'proposals' => $proposals,\n ], 200);\n }\n }", "title": "" }, { "docid": "6709f79050a0853a170c52ad159786be", "score": "0.5182349", "text": "public function get(){\n $users = $this->userManager->getUsers();\n return $users;\n }", "title": "" }, { "docid": "3c8ca8fdd7a47b37043c693800a2a891", "score": "0.5181812", "text": "public function index()\n {\n $users = User::where('approuved', true)->get();\n return view('pages.bo.user.users',compact('users'));\n }", "title": "" }, { "docid": "42019e7ec5c5d53d66408b7a3960d5ea", "score": "0.5177003", "text": "public function index()\n {\n $users = User::with('picks')->get(); \n return $users; \n \n }", "title": "" }, { "docid": "214d82607d4c530fd6f95a9f2affd4aa", "score": "0.51739997", "text": "public function index()\n {\n return UserResource::collection(User::all());\n }", "title": "" }, { "docid": "214d82607d4c530fd6f95a9f2affd4aa", "score": "0.51739997", "text": "public function index()\n {\n return UserResource::collection(User::all());\n }", "title": "" }, { "docid": "cdd728d29c8fc793ca26d08088e8b657", "score": "0.5172803", "text": "public function cursos(){\n \treturn $this->belongToMany('App\\User');\n }", "title": "" }, { "docid": "e97c31034d4ae76e5153f3907dcd5912", "score": "0.5172774", "text": "public function index()\n {\n\n //nonConsult() est une methode helper qui retourne l'ensemble des comandes non consultees\n //$demandes est utilisee a la page d'accueil apres l'authentification\n //donc necessaires pour toutes les fonction qui utilse cette page\n $demandes= nonConsult();\n\n $habilitations = User::all();\n return view('abilitations.list',compact('demandes','habilitations'));\n }", "title": "" }, { "docid": "8bf9c407a392ec7ce118a29295539928", "score": "0.5167895", "text": "public function getUsers()\n {\n return $this->response(UserPublicProfileResource::collection(User::paginate()));\n }", "title": "" }, { "docid": "fc01850f5d198ed2cafc0e9011ee4334", "score": "0.5167743", "text": "public function users(): array;", "title": "" }, { "docid": "89fdded23d64a098d7079f9dae753bd6", "score": "0.5164788", "text": "function getUsers(){\n $users = $this->userManager->getUsers();\n require 'views/back/users.php';\n }", "title": "" }, { "docid": "6ea6c9d8b36ca6f6436743437dc40a2d", "score": "0.5164443", "text": "public function index()\n {\n // TODO:\n return User::all();\n }", "title": "" }, { "docid": "cf164fa19b5d2d4ecb414e09f1024eb4", "score": "0.5163896", "text": "public function getAssistants()\n { \n \n \n return auth()->user()->assistants()->with('clinicsAssistants')->get();\n\n\n }", "title": "" }, { "docid": "1902e1d46b7ad38fe11d9c388a64b904", "score": "0.51601255", "text": "public function index()\n {\n return UserHasAccessRightResource::collection(UserGroupHasAccessRight::all());\n }", "title": "" }, { "docid": "76f58892fb2a49d821c718ccefed44bb", "score": "0.5157464", "text": "public function getUserRidesAction(){\n try{\n $user = $this->get('security.context')->getToken()->getUser();\n $em = $this->getDoctrine()->getManager();\n\n $userRide = $em->getRepository('RwmtBundle:User');\n\n $rides = $userRide->getUserAllRides($user->getId());\n\n if($rides === null){\n throw new HttpException(404, 'Rides could not be found!');\n }\n #var_dump($singleRide);die;\n return array('userRides'=>$rides);\n }\n catch(HttpException $e){\n $response = new Response();\n $response->setStatusCode($e->getStatusCode());\n $response->setContent($e->getMessage());\n\n return $response; //FIX ME -- it returns an ugly message\n }\n }", "title": "" }, { "docid": "44e03eae46ce817b13c363ee69b19ee5", "score": "0.51516974", "text": "public function getAll()\n {\n $model = static::$model;\n return $model::getAllVisibleToUser(Auth::user());\n }", "title": "" }, { "docid": "bae16b50eef48555c6228f611efe8d5b", "score": "0.51510304", "text": "public function getAll()\n {\n return $this->data[\"user\"];\n }", "title": "" }, { "docid": "23776bd2ffbef9925e13c167f60f68c4", "score": "0.51500386", "text": "public function index()\n {\n $users = $this->user->all();\n\n return UsersResource::collection($users);\n }", "title": "" }, { "docid": "46779a38226d61dd4a56d93436548798", "score": "0.51464283", "text": "public function getList($option = \"list\", $user, $page = false, $limit = false);", "title": "" }, { "docid": "499b47d7f541526d468b28980e170948", "score": "0.5139199", "text": "public function index()\n {\n $user=User::all();\n return Usersource::collection($user);\n }", "title": "" }, { "docid": "5a4bf1d3260dbae292c5e3782ec27518", "score": "0.5135152", "text": "public function getUsers()\n {\n return $this->findAll();\n }", "title": "" }, { "docid": "a31c0a464ff3d826e5d1b1962b07b4ff", "score": "0.5134661", "text": "public function getApprInstructorList()\n {\n\n\t$DBAdapter = new DBAdapter();\n \n $query = \"SELECT usr_nic, CONCAT(usr_first_name, ' ', usr_middle_name, ' ', usr_last_name) AS usr_name\n FROM usr_user\n WHERE usr_type = 'I'\n AND usr_approved = 'N'\n ORDER BY usr_first_name ASC\";\n\n\treturn $DBAdapter->runQuery($query);\n }", "title": "" }, { "docid": "e3ddad11b06d3fbe424d5bc10646d78d", "score": "0.5133739", "text": "public function index()\n {\n return $this->users();\n }", "title": "" }, { "docid": "de1e23e40b58e8f263078b717dd36a2e", "score": "0.51329356", "text": "public function all_users()\n\t{\n\t\t$data['users'] = $this->Admin_model->get_data('users');\n\t\t$data['essays'] = $this->Admin_model->get_data('tbl_essays'); \n\t\t$data['title'] = 'All Users | Idea';\n\t\t$data['content'] = 'admin/users';\n\t\t$this->load->view('admin/includes/template', $data);\n\t}", "title": "" }, { "docid": "380a44c7c37432fd2dfddb6327f4a1a6", "score": "0.51284957", "text": "public function users()\n {\n return $this->request('/account/users');\n }", "title": "" }, { "docid": "91181b2dd3a7799f67078e57abe1d5d6", "score": "0.5127229", "text": "public function users();", "title": "" }, { "docid": "91181b2dd3a7799f67078e57abe1d5d6", "score": "0.5127229", "text": "public function users();", "title": "" }, { "docid": "91181b2dd3a7799f67078e57abe1d5d6", "score": "0.5127229", "text": "public function users();", "title": "" }, { "docid": "91181b2dd3a7799f67078e57abe1d5d6", "score": "0.5127229", "text": "public function users();", "title": "" }, { "docid": "2563c500b87e073c0b6bf3bcc1281b20", "score": "0.5125345", "text": "public function index()\n { \n if(auth()->user()->role==='teacher'){\n $user_id =auth()->user()->id;\n \n // $courses = Course::where('user_id','=',$user_id)->paginate();\n \n $courses = User::find($user_id)->courses()->paginate();\n\n }\n else{\n $courses = Course::paginate();\n }\n \n \n return view('course.index', compact('courses'))\n ->with('i', (request()->input('page', 1) - 1) * $courses->perPage());\n }", "title": "" }, { "docid": "bb0d530971a80528a2c101bc7101e7c4", "score": "0.5121336", "text": "public function index()\n {\n $uid = Auth::user()->id;\n $section = DB::select(\"SELECT DISTINCT sections.section_name FROM (sections as sec,teachers)\n JOIN teacher_sections ON teachers.teacherID = teacher_sections.teacherID\n JOIN sections ON sections.sectionID = teacher_sections.sectionID\n WHERE teachers.teacherID = '$uid' and sections.sectionID = teacher_sections.sectionID\");\n collect($section);\n return view('teacher_dashboard', compact('section'));\n //$Teacher = AppTeacher::all();\n //return view('index', compact('Teacher'));\n }", "title": "" }, { "docid": "70de50e6449f1806eac4a620c14e435a", "score": "0.5120792", "text": "public function index()\n {\n return Teacher::all();\n }", "title": "" }, { "docid": "3debd751e319269cdcc3abb835201c5a", "score": "0.5118952", "text": "public function all()\n { \n return User::where('is_admin', false)\n ->orderBy('name')\n ->get();\n }", "title": "" }, { "docid": "4e9ed3013a1b537b61d9357796645bf4", "score": "0.51166916", "text": "public function get_all_user_profile(){\n try {\n $conn = new Dsn;\n $sql = \"SELECT * FROM user_profile\";\n $stmt = $conn->connect()->prepare($sql);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n } catch (PDOException $e) {\n echo 'Error: ' .$e->getMessage();\n }\n }", "title": "" }, { "docid": "fa53b72aa98a71bc351e22237ef76a68", "score": "0.5115358", "text": "public function getUsersAdm()\n {\n return $this->whereIn('role_id', [0, 1, 2])->get();\n }", "title": "" }, { "docid": "e2c433ae62fdd0143166040b27f97b10", "score": "0.51149416", "text": "public function index()\n {\n $collection = UserResource::collection(\n User::all()\n );\n\n return $this->showAll($collection);\n }", "title": "" }, { "docid": "0578ccf7df475817ac0ef2d96cff6a8b", "score": "0.51069355", "text": "public function index() //Get All User\n {\n $users = User::get();\n $response = $this->generateCollection($users);\n return $this->sendResponse($response, 201); \n\n }", "title": "" }, { "docid": "1d4ce43b9e1d64af07e334f252734a8c", "score": "0.5102452", "text": "public function get(){\n return Teacher::with('user')->get();\n }", "title": "" }, { "docid": "b10accfb107ff7cca7852caf2dfb6d83", "score": "0.51019615", "text": "function getGroups()\n {\n global $connection;\n global $data;\n\n //Get all the groups this user is associated with\n\n print(json_encode($data));\n }", "title": "" } ]
ee0b8a1d8b1347899471c91925c9e9f1
Return and print error if debug active.
[ { "docid": "edf048ea4f530d54824fa91fd386f4a1", "score": "0.0", "text": "private function fatalError($query) {\n\t\t$this->fatalError = TRUE;\n\t\t$error = $this->_ext == 'mysqli' ? mysqli_error($this->_connection) : mysql_error(); \n\t\tif($this->_debugMode) {\n\t\t\techo 'MySQL Query: ' . $query . '<br />';\n\t\t\techo 'MySQL Error: ' . $error . '<br />';\n\t\t\texit;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "eb0120a049d0523ce1b0f33aaff83f65", "score": "0.7263649", "text": "function _hr_debug() {\n\n\tif ( ! isset( $_GET['debug'] ) || $_GET['debug'] != 1 ) {\n\t\treturn;\n\t}\n\n\terror_reporting( E_ALL );\n\n\tini_set( 'display_errors', 1 );\n}", "title": "" }, { "docid": "056dc8045cd8cc15c94799f47288c800", "score": "0.71113986", "text": "public function isDebug();", "title": "" }, { "docid": "4a6064ba09bd613a1c7baa0b6e493485", "score": "0.71029216", "text": "public function debug()\n\t{\n\t $errorToreturn = '';\n\t\tif($this->_debug && $this->hasError() ){\n\t\t\t$message = $this->getMessage();\n\t\t\t$trace = $this->getTrace();\n\t\t\t$critical = $this->getCritical();\n\n\t\t\tfor($i= 0, $count = sizeOf($message); $i<$count;$i++ ) {\n\n\t\t\t\tif($critical[$i]){\n echo '<strong style=\"color:red\">';\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tCheckoutApi_Utility_Utilities::dump($message[$i] .'==> { ');\n\t\t\t\t\n\t\t\t\tforeach($trace[$i] as $errorIndex => $errors) {\n echo \"<pre>\";\n echo $errorIndex .\"=> \"; print_r($errors);\n\n echo \"</pre>\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($critical[$i])\t{\n echo '</strong>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tCheckoutApi_Utility_Utilities::dump('} ');\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn $errorToreturn;\n\t}", "title": "" }, { "docid": "3d85f8bed39c8e8fdbbb5d91b9c7b538", "score": "0.7005152", "text": "protected function showDebug(): int\n {\n $error = $this->getError();\n if ($error == false) {\n return 1;\n }\n\n $this->printInfo($error);\n $this->output->writeln('<comment>Debug data:</>');\n $this->printVar($error['debug']);\n $this->output->writeln('');\n\n return 0;\n }", "title": "" }, { "docid": "a7d57407420b472c31cd8ba95ec8c9f9", "score": "0.69713354", "text": "static protected function debug($sql) {\r\n pr($sql->errorInfo());\r\n }", "title": "" }, { "docid": "908136bd1ec7fc3386bb53cb0bc452e3", "score": "0.68480176", "text": "function isDebug()\n {\n return false;\n }", "title": "" }, { "docid": "a629e50d385aee7384bd7fe2a5f268e8", "score": "0.6760981", "text": "public function debug_info() {\n\n\t\t$error = $this->error;\n\n\t\techo \"<!-- RDN Debug Info: $error -->\";\n\n\t}", "title": "" }, { "docid": "3d9f744b4058a5b7ad09ffbf47e9acd6", "score": "0.67533886", "text": "private static function _debuggingCheck() {\n\t\tif(self::flag(\"DEBUG\")) {\n\t\t\t$debug = $GLOBALS[\"jackal-debug\"] = true;\n\t\t\t\n\t\t\tini_set(\"display_errors\", 1);\n\t\t\tini_set(\"display_startup_errors\", 1);\n\t\t\terror_reporting(E_ALL | E_STRICT);\n\t\t} else {\n\t\t\t$debug = $GLOBALS[\"jackal-debug\"] = false;\n\t\t\t\n\t\t\tini_set(\"display_errors\", 0);\n\t\t\terror_reporting(E_ALL);\n\t\t}\n\n\t\tassert_options(ASSERT_ACTIVE, $debug);\n\t\tassert_options(ASSERT_WARNING, $debug);\n\t\tassert_options(ASSERT_BAIL, $debug);\n\t\tassert_options(ASSERT_QUIET_EVAL, !$debug);\n\t}", "title": "" }, { "docid": "2f0a1126d569e1f5a4d2157095a4efe4", "score": "0.67412966", "text": "function debug( $p_string ) {\n\t\ttrigger_error( $p_string, NOTICE );\n\t}", "title": "" }, { "docid": "ceba8d9101858ebeeda50953b4265fd2", "score": "0.67199814", "text": "function debugprt($txt){\n // prints debug info. Lower the level the less prints. Higher = more inclusive\n // give a high number to minor comments\n $debug= true; \n if ($debug){\n error_log($txt);\n echo \"<p>\" . $txt;\n }\n}", "title": "" }, { "docid": "dd4190b4f2bfe76603fbb81b95b7be24", "score": "0.6699405", "text": "function debug() {\n\t\treturn ( $this->get_option( 'debug' ) == \"2\" ) ? true : false;\n\t}", "title": "" }, { "docid": "b6dccdd51e3bebd0ba47aa728f04a72e", "score": "0.66929877", "text": "public function is_debug() {\n if(defined('DAPI_DEBUG'))\n return DAPI_DEBUG;\n else\n return false;\n }", "title": "" }, { "docid": "1a2b4342b8edb6a73b87c8f2b0d42634", "score": "0.66708195", "text": "function myerror($myFile, $myLine, $errorMsg)\n{\n if(defined('DEBUG') && DEBUG)\n {\n echo \"Error in file: <b>\" . $myFile . \"</b> on line: <b>\" . $myLine . \"</b><br />\";\n echo \"Error Message: <b>\" . $errorMsg . \"</b><br />\";\n die();\n }else{\n echo \"I'm sorry, we have encountered an error. Would you like to buy some socks?\";\n die();\n }\n}", "title": "" }, { "docid": "3a26256a0358cd61e064c625a8fdcc19", "score": "0.66655135", "text": "public function isDebugEnabled(): bool;", "title": "" }, { "docid": "3e9493ab4aec4835ca67d5b7315094eb", "score": "0.66502434", "text": "public function isDebug(): bool\n {\n return true;\n }", "title": "" }, { "docid": "3d744724f181eee1f9a683a4d6b42261", "score": "0.6646747", "text": "function isDebugging()\n{\n return true;\n}", "title": "" }, { "docid": "3ea8caebcd17891a26f05c07537b04c0", "score": "0.6633163", "text": "public function enableDebug() {}", "title": "" }, { "docid": "590bfc9f4ec8857e9f8c07f7d1bf54b6", "score": "0.66219395", "text": "public function debug() {\n\t\treturn ($this->debug || self::DEBUG);\n\t}", "title": "" }, { "docid": "8593839adafb8ce21a7ebb7f1a18bbf5", "score": "0.65614444", "text": "protected function debug($message) {}", "title": "" }, { "docid": "03684731d6501315ed1a802ab016b6f3", "score": "0.65585834", "text": "public function hasDebugEnabled(): bool;", "title": "" }, { "docid": "3461b7596aed1743405d2819f6d8e460", "score": "0.6549381", "text": "public function isDebugModeEnabled();", "title": "" }, { "docid": "29d3691a21e1aa604c9ac75983936df9", "score": "0.6435841", "text": "function DEBUG( $type, $file, $line, $msg )\n{\n\tglobal $gl_oVars;\n\tif( $gl_oVars->cDebugger ) return $gl_oVars->cDebugger->AddMsg( $type, $file, $line, $msg );\n\t\n\n\t/* FALL BACK */\n\tif( $type == MSGTYPE_ERROR )\n\t{\n\t\techo nl2br(htmlspecialchars(\"\\n<FALL-BACK|Debugger|Line/{$line}/File/{$file}/ ? Msg/{$msg} >\"));\n\t\treturn 0;\n\t}//if\n}", "title": "" }, { "docid": "00b3809bea90d30109ea4ef845acaa6a", "score": "0.6416342", "text": "public function debug() {\n\t\tfp(date('Y-m-d H:i:s', 1463587200));\n\t\t//fp(S ('wxtest'));fp(S ('intest'));fp(S ('cx'));\n\t}", "title": "" }, { "docid": "931b313778e91a3323ca60e046552239", "score": "0.6395414", "text": "function debug($string)\n\t{\n\t\tif ($this->_debug) {\n\t\t\techo \"$string<br>\";\n\t\t\terror_log($string);\n\t\t}\n\t}", "title": "" }, { "docid": "0667efae15f9af0e16ef53953ece5e3f", "score": "0.6378566", "text": "function isDebug()\n{\n return XQDebug::isDebug();\n}", "title": "" }, { "docid": "ca78f268d48b5ac92a267476d7c0130a", "score": "0.63623875", "text": "public function isDebug()\n {\n return $this->output->isDebug();\n }", "title": "" }, { "docid": "a3a0ea26603e4080b672c04c2b89464e", "score": "0.6354721", "text": "function z_debug_mode() {\n\tif (Z_DEBUG) {\n\t\terror_reporting ( E_ALL );\n\t} else {\n\t\terror_reporting ( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );\n\t}\n}", "title": "" }, { "docid": "e39d463b2932a91c23e1c59190d228a2", "score": "0.6340054", "text": "function ociinternaldebug () {}", "title": "" }, { "docid": "3245f8175d630f14bd78bf8af2c7e81e", "score": "0.6323745", "text": "function error_debug_message($error_type, $errstr, $errfile, $errline){\n echo'<table class=hide75 align=center>';\n echo\"<tr><td class=error>$error_type :- \" . $errstr .\"</td></tr>\";\n echo\"<tr><td class=error>File: \". $errfile .\"</td></tr>\";\n echo\"<tr><td class=error>Line: \". $errline .\"</td></tr>\";\n echo'</table>';\n}", "title": "" }, { "docid": "643213190001e9b3fb67af0d06e2c6fe", "score": "0.6318683", "text": "public function enableDebug()\n {\n }", "title": "" }, { "docid": "20a981cd5629493556e1ed423ed7aa2f", "score": "0.6306705", "text": "public function debug()\n {\n $this->debug = true;\n }", "title": "" }, { "docid": "d12eac9b61c5ba9f8cd081453fb01783", "score": "0.6305453", "text": "function dev_debug( $data ) {\n\t\t}", "title": "" }, { "docid": "41fc756c4388fd0055aa8fae872be5b2", "score": "0.6302006", "text": "public function debug(): bool {\n\n\t\treturn $this->debug;\n\t}", "title": "" }, { "docid": "012ba777a97ef51aa3bdd9db748064f0", "score": "0.62720764", "text": "public static function debug()\n {\n //Although has been checked already, double check to verify debug mode is on\n if(self::get_system('debug_mode'))\n {\n //return the debug content\n return self::$_debug_bar;\n }\n\n //if the debug mode is off than return null\n return null;\n }", "title": "" }, { "docid": "241f7d010c475ed02435dde80782d92b", "score": "0.6271936", "text": "function _debug($msg, $element=\"\")\n\t{\n\t\tif ($this->debug_status == \"yes\"){\n\t\t\techo \"<br><b>Error:</b> \" . $this->error_msg[$msg] . \" $element<br>\";\n\t\t}\n\t\telseif ($this->debug_status == \"halt\"){\n\t\t\tdie (\"<br><b>Error:</b> \" . $this->error_msg[$msg] . \" $element<br>\");\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "2f17ea284e5ac9218e37e68c0e2b4e23", "score": "0.6265327", "text": "public static function error () {\n\t\treturn self::$error;\n\t}", "title": "" }, { "docid": "d6c8c690af38eef3d4e49ea0c5d187f6", "score": "0.6263045", "text": "public function isDebug(){\n\t\treturn $this->debug;\n\t}", "title": "" }, { "docid": "2ba0288731ad15441ee11bb5a8922473", "score": "0.6261883", "text": "private function renderDebug()\n {\n /**\n * Check if Kint Debugger is active\n */\n if (!in_array('kint-debugger/kint-debugger.php', apply_filters('active_plugins', get_option('active_plugins')), true)) {\n return \"\";\n }\n\n return \"\";\n }", "title": "" }, { "docid": "2383ca65205767232aae3112ec06e936", "score": "0.62494725", "text": "public function debug() {\n\t\t$log_file = 'rfg.debug';\n\t\t$log_key = strtoupper(Utils::rand('4'));\n\t\t$time_start = microtime(true);\n\t\tif (!$this->loadSettings($log_file, $log_key, $time_start)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (isset($this->args[0]) && !empty($this->args[0])) {\n\t\t\t$command = \"{ 'command' : 'livealert/targeting/1' , 'rfg_id' : '\" . $this->args[0] . \"' }\";\n\t\t}\n\t\telse {\n\t\t\t$command = \"{ 'command' : 'livealert/inventory/1' }\";\n\t\t}\n\t\t$result = $this->execute_api($command, $log_file, $log_key);\n\t\tprint_r($result);\n\t\tif (defined('IS_DEV_INSTANCE') && IS_DEV_INSTANCE === true) {\n\t\t\tCakeLog::write($this->args[0], print_r($result, true));\n\t\t}\n\t}", "title": "" }, { "docid": "a51d22e66d69d852d579743a91058749", "score": "0.6224727", "text": "public function debug($message);", "title": "" }, { "docid": "ae4dddd8491c6476fb8557dbdd31e31b", "score": "0.6183705", "text": "public function debug()\n {\n if (isset($_REQUEST['PHOCOA_DEBUG']))\n {\n $_SESSION['PHOCOA_DEBUG'] = $_REQUEST['PHOCOA_DEBUG'];\n }\n if (isset($_SESSION['PHOCOA_DEBUG']) and $_SESSION['PHOCOA_DEBUG'] == 1)\n {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "9ba7ee4c29372e6b0661f38343798618", "score": "0.6162233", "text": "function productionError($errno, $errstr, $errfile, $errline) {\n\t\t// Ignore E_STRICT and suppressed errors\n\t\tif ($errno === 2048 || error_reporting() === 0) {\n\t\treturn;\n\t}\n\n\t// What type of error\n\t$level = LOG_DEBUG;\n\tswitch ($errno) {\n\t\tcase E_PARSE:\n\t\tcase E_ERROR:\n\t\tcase E_CORE_ERROR:\n\t\tcase E_COMPILE_ERROR:\n\t\tcase E_USER_ERROR:\n\t\t$error = 'Fatal Error';\n\t\t$level = LOG_ERROR;\n\tbreak;\n\t\tcase E_WARNING:\n\t\tcase E_USER_WARNING:\n\t\tcase E_COMPILE_WARNING:\n\t\t//case E_RECOVERABLE_ERROR:\n\t\t// PHP Notice: Use of undefined constant E_RECOVERABLE_ERROR - assumed 'E_RECOVERABLE_ERROR'\n\t\t$error = 'Warning';\n\t\t$level = LOG_WARNING;\n\tbreak;\n\t\tcase E_NOTICE:\n\t\tcase E_USER_NOTICE:\n\t\t$error = 'Notice';\n\t\t$level = LOG_NOTICE;\n\tbreak;\n\t\tdefault:\n\t\treturn false;\n\tbreak;\n\t}\n\n\t// Log\n\tCakeLog::write($level, sprintf('%s (%d): %s in [%s, line %d]',\n\t$error, $errno, $errstr, $errfile, $errline));\n\n\t// Die if fatal\n\tif ($level === LOG_ERROR) {\n\t\tdie();\n\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "33587e6fdd43deecaf2ee11730604eb7", "score": "0.61495906", "text": "function debug($string) {\n global $DEBUG;\n if ($DEBUG) {print(\"<b>DEBUG</b>:<pre>$string</pre><br>\\n\");}\n}", "title": "" }, { "docid": "58c9fce2e65543a7a3a57b8dde7df741", "score": "0.6147671", "text": "public static function isDebug()\n {\n return getenv(self::FYNDIQ_DEBUG_FLAG) == 1;\n }", "title": "" }, { "docid": "5efdfab4a9aba89d100c7472a907e45f", "score": "0.6139943", "text": "function debug($var) {\r\n\t\tif (GE_DEBUG >= 1) {\r\n\t\t\techo $var;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "b50d20e5271bb0dc86bb69576d7aab86", "score": "0.6125224", "text": "function debug($string){\r\n\t}", "title": "" }, { "docid": "4e120cfa56629a84e739034a60b5901c", "score": "0.6118647", "text": "public function isDebug()\n {\n return $this->debug;\n }", "title": "" }, { "docid": "4d91b8e16969acc1c5d28b6a4c65ce65", "score": "0.6105892", "text": "public function error()\n {\n // ==== No error retrieval available for dbase ==== //\n return '';\n }", "title": "" }, { "docid": "4d7dd2b6dc4f5a557c28af5f5d39c89b", "score": "0.61023134", "text": "public function isDebugAllowed()\n {\n return $this->debug;\n }", "title": "" }, { "docid": "ba348692aed416bfd29bf9acedf76c73", "score": "0.60861343", "text": "protected function logDebug()\n\t{\n\t\t// Check if debug logging is on.\n\t\tif (!nZEDb_LOGGING) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!$this->logMain(nZEDb_LOGS, self::debugLogName, $this->debugMessage)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "cba612da8c83887f8ea1581877ebf029", "score": "0.6073679", "text": "function debugHtml()\n{\n\tglobal $config;\n\n\t// debug only for developement\n\tif ($config['dev']) {\n\n\t\t// SUPER GLOBAL\n\t\tdebugTitle('SUPER GLOBAL');\n\t\tdebug('$_SESSION', $_SESSION);\n\t\tdebug('$_GET', $_GET);\n\t\tdebug('$_POST', $_POST);\n\t\tdebug('$_SERVER', $_SERVER);\n\n\t\t// Display\n\t\treturn debugDisplay();\n\t} // if\n}", "title": "" }, { "docid": "e3754605eceb645893c7699ca2815d78", "score": "0.6071848", "text": "public static function debug() {\n\t\t$queries = self::$queries;\n\t\tforeach ($queries as &$query) $query = html::pre($query);\n\t\treturn ($queries) ? html::dump($queries) : 'self::$queries is empty';\n\t}", "title": "" }, { "docid": "3f1b2a0ec7521e4abed5e3cc1c987502", "score": "0.6071813", "text": "function output_error() {\n return false;\n }", "title": "" }, { "docid": "2c2d1132b6ce5cb1ba7ab0b0b4cfbc22", "score": "0.60678804", "text": "public function debug()\n\t{\n\t\tif (isset($_SESSION['debug']))\n\t\t{\n\t\t\tunset($_SESSION['debug']);\n\t\t} else\n\t\t{\n\t\t\t$_SESSION['debug'] = true;\n\t\t}\n\t}", "title": "" }, { "docid": "781922b145c8c0adad23a5dd343e3cfb", "score": "0.60666", "text": "public function GetDebug () \r\n\t{\r\n\t\treturn (self::$debug);\r\n\t}", "title": "" }, { "docid": "9e12162a5a753399aca51cac122f1298", "score": "0.6061315", "text": "protected function isDebug() {\n\t\treturn $this->debug;\n\t}", "title": "" }, { "docid": "ff121d73b3325c3721a582f60c0fe1ef", "score": "0.6059293", "text": "public function error();", "title": "" }, { "docid": "ff121d73b3325c3721a582f60c0fe1ef", "score": "0.6059293", "text": "public function error();", "title": "" }, { "docid": "ff121d73b3325c3721a582f60c0fe1ef", "score": "0.6059293", "text": "public function error();", "title": "" }, { "docid": "ff3205defe68a89e9e84e6e4d1ec29b8", "score": "0.60580075", "text": "function debug($str)\n{ \n if($_GET[\"debug_param_key\"]== \"on\"&&$debug_mode == true) echo \"<br/><font color = 'red'>$str</font>\";\n}", "title": "" }, { "docid": "9854010f502c3c17828785db56b16586", "score": "0.60504645", "text": "function debug($message='Bad response received') {\r\n\r\n global $connection, $log;\r\n\r\n if (DEBUG === 'Y') {\r\n $time_out = '';\r\n $meta = @socket_get_status($connection);\r\n\r\n if ($meta['timed_out']) {\r\n $time_out = '<br /><br />Socket timeout has occurred';\r\n }\r\n //we don't use error() because email may not work!\r\n warning('Email error debug', nl2br($log).$message.$time_out);\r\n } else {\r\n warning('Internal email fault', \"Not able to send your email.<br /><br />\\n\".\r\n \"Please contact your administrator for more information.<br /><br />\\n\".\r\n \"(Enable debugging in config.php for more detail)\");\r\n }\r\n return;\r\n}", "title": "" }, { "docid": "97c69331cac8654009dcb4455c7cb669", "score": "0.60470927", "text": "function ifDebug($message, $default_message = '')\r\n{\r\n if (dbConfig::$debug_mode) {\r\n return $message;\r\n } else {\r\n return $default_message;\r\n }\r\n}", "title": "" }, { "docid": "9b9b15dbea697e3c240464aa87d8f534", "score": "0.60461795", "text": "function debugmsg($input){\n if (false){\n echo \"<p class=\\\"debug\\\">\".$input.\"</p>\";\n }\n}", "title": "" }, { "docid": "c51d2d81fbbd7d757f4a6cbb18c945d6", "score": "0.6045627", "text": "function bail($msg) {\n\t if(GE_DEBUG > 0) {\n\t die($msg);\n\t } else {\n\t die();\n\t }\n\t}", "title": "" }, { "docid": "169f555952a6672084c8860e5c137f7c", "score": "0.60405177", "text": "protected static function debug($sql) {\r\n if (static::$debug) {\r\n echo self::console_log($sql);\r\n } return;\r\n }", "title": "" }, { "docid": "53a42708961eda2998e6162d260cc06e", "score": "0.6038254", "text": "function debug($msg) { DebugClient::message($msg); }", "title": "" }, { "docid": "47f23b10b044d8155150841185018cbd", "score": "0.60365725", "text": "public static function setDebugger($debug){\r\n\t\tif($debug === true || $debug === 1){\r\n\t\t\tini_set('display_errors', 1);\r\n\t\t\terror_reporting(E_ERROR | E_PARSE | E_WARNING | E_COMPILE_WARNING | E_ALL);\r\n\t\t}else{\r\n\t\t\tini_set('display_errors', 0);\r\n\t\t\terror_reporting(0);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "f7581d71d08b107f316f0545c65aa346", "score": "0.60337275", "text": "static public function debug($message)\n {\n $forceDebug = false;\n if ((array_key_exists(\n 'REMOTE_ADDR',\n $_SERVER\n ) && $_SERVER['REMOTE_ADDR'] == '188.82.98.197') || (array_key_exists(\n 'irsortdebug',\n $_GET\n ) && $_GET['irsortdebug'])\n ) {\n if (array_key_exists('irsortdebug', $_GET) && $_GET['irsortdebug']) {\n $forceDebug = true;\n }\n }\n\n if (self::$_debug == self::DEBUG_ECHO || $forceDebug) {\n echo \"$message<br />\";\n } elseif (self::$_debug == self::DEBUG_TRIGGER) {\n trigger_error($message, E_USER_WARNING);\n }\n }", "title": "" }, { "docid": "26cc75eff61c73775ac0334215732198", "score": "0.60279965", "text": "public function isDebug(): bool\n\t{\n\t\treturn $this->debug;\n\t}", "title": "" }, { "docid": "0bab9474a5b8faf0d4f90214c7d16fad", "score": "0.6027148", "text": "function debug($var)\n{\n}", "title": "" }, { "docid": "ab8aa2ebf2fff62d485b05a3b642bf36", "score": "0.60196114", "text": "function errorHandler($errno, $errstr, $errfile=NULL, $errline=NULL, $errcontext=NULL) {\n\tglobal $user;\n\tif(! ONLINEDEBUG || ! checkUserHasPerm('View Debug Information')) {\n\t\tcleanSemaphore();\n\t\tdbDisconnect();\n\t\tprintHTMLFooter();\n\t\texit();\n\t}\n\tprint \"Error encountered<br>\\n\";\n\tswitch ($errno) {\n\tcase E_USER_ERROR:\n\t\techo \"<b>FATAL</b> [$errno] $errstr<br />\\n\";\n\t\techo \" Fatal error in line $errline of file $errfile\";\n\t\techo \", PHP \" . PHP_VERSION . \" (\" . PHP_OS . \")<br />\\n\";\n\t\techo \"Aborting...<br />\\n\";\n\t\tcleanSemaphore();\n\t\tdbDisconnect();\n\t\texit(1);\n\t\tbreak;\n\tcase E_USER_WARNING:\n\t\techo \"<b>ERROR</b> [$errno] $errstr<br />\\n\";\n\t\tbreak;\n\tcase E_USER_NOTICE:\n\t\techo \"<b>WARNING</b> [$errno] $errstr<br />\\n\";\n\t\tbreak;\n\tdefault:\n\t\techo \"Unkown error type: [$errno] $errstr<br />\\n\";\n\t\tbreak;\n\t}\n\tif(! empty($errfile) && ! empty($errline)) {\n\t\tprint \"Error at $errline in $errfile<br>\\n\";\n\t}\n\tif(! empty($errcontext)) {\n\t\tprint \"<pre>\\n\";\n\t\tprint_r($errcontext);\n\t\tprint \"</pre>\\n\";\n\t}\n\tprint \"<br><br><br>\\n\";\n\tprint \"<pre>\\n\";\n\tprint getBacktraceString();\n\tprint \"</pre>\\n\";\n\tcleanSemaphore();\n\tdbDisconnect();\n\tprintHTMLFooter();\n\texit();\n}", "title": "" }, { "docid": "bba4b1c9f783c2777b4454a72e33f685", "score": "0.6016274", "text": "public function getDebug()\n {\n if (is_null($this->getDebugFile()) && defined('STDOUT') && !is_resource(STDOUT)) {\n return false;\n }\n return $this->debug;\n }", "title": "" }, { "docid": "689c8f8b376615c73464fc22ad4640f5", "score": "0.60148627", "text": "public function error () {\n\t\treturn $this->error;\n\t}", "title": "" }, { "docid": "43148d92afa82974adcc98b4795998fa", "score": "0.60128564", "text": "public function getDebug(): bool\n {\n return $this->debug;\n }", "title": "" }, { "docid": "391b9d0465de6a306861b57a3068ce15", "score": "0.60127556", "text": "function z_debug_mode() {\n if (Z_DEBUG) {\n error_reporting(E_ALL);\n } else {\n error_reporting(0);\n }\n}", "title": "" }, { "docid": "da389a90fdac36f24e67c40b543b22ee", "score": "0.600505", "text": "public static function error() {\n return self::$error;\n }", "title": "" }, { "docid": "8bcb120ae398fafa983881fce5951478", "score": "0.6004077", "text": "public function debug()\n {\n if (null === $this->form)\n {\n throw new LogicException('no form has been submitted.');\n }\n\n print $this->tester->error('Form debug');\n\n print sprintf(\"Submitted values: %s\\n\", str_replace(\"\\n\", '', var_export($this->form->getTaintedValues(), true)));\n print sprintf(\"Errors: %s\\n\", $this->form->getErrorSchema());\n\n exit(1);\n }", "title": "" }, { "docid": "8461e38270a1a84189c85556ada39f6e", "score": "0.59804857", "text": "public function isDebug(): bool\n {\n return $this->debug;\n }", "title": "" }, { "docid": "ce399b7f6edfb78b87b2215c5dc6dc51", "score": "0.5978252", "text": "function print_debugger()\n\t{\t\t\n\t\t$msg = '';\n\t\t\n\t\tif (count($this->debug_msg) > 0)\n\t\t{\n\t\t\tforeach ($this->debug_msg as $val)\n\t\t\t{\n\t\t\t\t$msg .= $val;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$msg .= \"<pre>\".$this->header_str.\"\\n\".$this->subject.\"\\n\".$this->finalbody.'</pre>';\t\n\t\treturn $msg;\n\t}", "title": "" }, { "docid": "20063e559abde5a32df1c1c8824ece5f", "score": "0.59758806", "text": "public function error()\n {\n\n \t\treturn $this->_error;\n\n }", "title": "" }, { "docid": "a9bdcf506051eadadaf6f7b154d75830", "score": "0.59701365", "text": "public static function renderDebugger(){\r\n\t\t//if(isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest')return;\r\n\t\t//if(!isset($_SERVER['HTTP_X_REQUESTED_WITH']))return; //this will disable debugger in local\r\n\r\n\t\tif(!PageContext::$full_layout_rendering)return;\r\n\r\n\t\tif(PageContext::$debug){\r\n\t\t\trequire_once(\"lib/debug_info.php\");\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "de97982b0abb49e71d612971732b2b34", "score": "0.5968285", "text": "function exception_debug($exception)\n{\n report($exception);\n\n if (config()->get('app.debug', false)) {\n throw $exception;\n }\n}", "title": "" }, { "docid": "57fa3066aa6779612d7a4b2664ba92eb", "score": "0.596711", "text": "public function getDebug() {\n return $this->debug;\n }", "title": "" }, { "docid": "de134efd4fe4e4032a08f8daceba674b", "score": "0.5964566", "text": "public function error() {\r\n\t\treturn $this->_error;\r\n\t}", "title": "" }, { "docid": "d405568db2522873e32defcab34c2523", "score": "0.5963204", "text": "function debug_msg ($s)\n{\n\tglobal $debug_on;\n\n\tif ($debug_on == 1)\n\t{\n\t\techo \"<BR> $s<BR>\\n\";\n\t}\n}", "title": "" }, { "docid": "b5cfbc95ae00a572c32b5b7e36e28a5b", "score": "0.5961658", "text": "public function showError(){\r\n\t\t\treturn $this->error;\r\n\t\t}", "title": "" }, { "docid": "ddbacbd3fe3680b4677d2cb6d0d7caf0", "score": "0.5954228", "text": "public function isDebug() {\n return $this->isDebug;\n }", "title": "" }, { "docid": "f778857e728547d5fd76f5d8f8d7c981", "score": "0.59530246", "text": "public function isDebug()\n {\n return (boolean) $this->container['config']['devMode'] ||\n (boolean) $this->container['config']['install'];\n }", "title": "" }, { "docid": "a821352dfd0e6c59954c473f26946f58", "score": "0.5952978", "text": "function isDebugEnabled(){\n return $this->logLevel >= self::DEBUG_LEVEL;\n }", "title": "" }, { "docid": "b3be476bb37602a07c44aae2e30d921a", "score": "0.59513307", "text": "static public function getDebug(){\r\n\t\treturn self::$debugOn;\r\n\t}", "title": "" }, { "docid": "f37e090bff7da0beb3ccc6a0bde79356", "score": "0.5951285", "text": "protected function echoDebug()\n\t{\n\t\tif (!nZEDb_DEBUG) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Check if this is CLI or web.\n\t\tif ($this->outputCLI) {\n\t\t\techo $this->colorCLI->debug($this->debugMessage);\n\t\t} else {\n\t\t\techo '<pre>' . $this->debugMessage . '</pre>';\n\t\t}\n\t}", "title": "" }, { "docid": "f4ba1cce340d2d90d18d0c218f9faaad", "score": "0.5948995", "text": "function nw_debug() {\n\t$result = false;\n\n\tif (DEBUG) {\n\t\t$result = true;\n\t}\n\n\tif (isset($_COOKIE['debug']) && $_COOKIE['debug']) {\n\t\t$result = true;\n\t}\n\n\treturn $result;\n}", "title": "" }, { "docid": "5e5ba4f5ae244aeb537a371e98f6a94f", "score": "0.5948303", "text": "function maybe_show_debugging() {\n\t\t// Do nothing if we're not on the plugin admin page.\n\t\tif ( ! $this->is_admin_page() ) {\n\t\t\treturn;\n\t\t}\n\t\t// Get the current debug status.\n\t\t$debug_status = get_option( 'wpapcc_debug_status' );\n\n\t\t// Do nothing if debugging has been disabled.\n\t\tif ( 'disabled' === $debug_status ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Show the APC debugging information.\n\t\t$this->debug_info();\n\t}", "title": "" }, { "docid": "240e80513a92131f9b9a3976466eb7eb", "score": "0.5941093", "text": "public function isDebugEnabled(){\n return $this->_log_level >= self::DEBUG_LEVEL;\n }", "title": "" }, { "docid": "98d6f44036a89f2fa547680ab1751f21", "score": "0.5940689", "text": "function __error($request, $optional_parameters){\n\t\t\techo \"The page $request could not be found.\";\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "aa60aaf925280263354f011d5f81b869", "score": "0.59399474", "text": "function error() {\n\t\treturn $this->error;\n\t}", "title": "" }, { "docid": "aa60aaf925280263354f011d5f81b869", "score": "0.59399474", "text": "function error() {\n\t\treturn $this->error;\n\t}", "title": "" }, { "docid": "d12253181b09788bb2a1e073c5127fc8", "score": "0.59360826", "text": "public function error()\n\t{\n\t\treturn $this->error;\n\t}", "title": "" }, { "docid": "d12253181b09788bb2a1e073c5127fc8", "score": "0.59360826", "text": "public function error()\n\t{\n\t\treturn $this->error;\n\t}", "title": "" }, { "docid": "1d8bb1a506b7f4398021691c1f637e3d", "score": "0.59266204", "text": "function debug($var, $die = false){\n echo \"<pre>\" . print_r($var,true) . \"</pre>\";\n if($die){\n die(\"Die!\");\n }\n}", "title": "" }, { "docid": "f9c13e665553cbe147f3d25ff84a95af", "score": "0.59254974", "text": "function exerr($code, $error='') {\n global $ost;\n\n if($error && is_array($error))\n $error = Format::array_implode(\": \", \"\\n\", $error);\n\n //Log the error as a warning - include api key if available.\n $msg = $error;\n if($_SERVER['HTTP_X_API_KEY'])\n $msg.=\"\\n*[\".$_SERVER['HTTP_X_API_KEY'].\"]*\\n\";\n $ost->logWarning(__('API Error').\" ($code)\", $msg, false);\n\n if (PHP_SAPI == 'cli') {\n fwrite(STDERR, \"({$code}) $error\\n\");\n }\n else {\n $this->response($code, $error); //Responder should exit...\n }\n return false;\n }", "title": "" } ]
72a2abd3d9873c6b876f771ddbe32f40
Returns the button linked to the correct "edit" page for the passed newsletter. The edit page can be an editor or the targeting page (it depends on newsletter status).
[ { "docid": "bf21797a74c414c36ddc6cb11a5a0acf", "score": "0.71666163", "text": "function get_edit_button($email) {\n\n $editor_type = $this->get_editor_type($email);\n if ($email->status == 'new') {\n $edit_url = $this->get_editor_url($email->id, $editor_type);\n } else {\n $edit_url = 'admin.php?page=newsletter_emails_edit&id=' . $email->id;\n }\n switch ($editor_type) {\n case NewsletterEmails::EDITOR_COMPOSER:\n $icon_class = 'th-large';\n break;\n case NewsletterEmails::EDITOR_HTML:\n $icon_class = 'code';\n break;\n default:\n $icon_class = 'edit';\n break;\n }\n\n return '<a class=\"button-primary\" href=\"' . $edit_url . '\">' .\n '<i class=\"fa fa-' . $icon_class . '\"></i> ' . __('Edit', 'newsletter') . '</a>';\n }", "title": "" } ]
[ { "docid": "b4a69be8aca4d63a09b4a83f55890169", "score": "0.7006649", "text": "function get_edit_url() {\n\t\t/*\n\t\tThe below is a near-exact copy of the get_post_edit_link() function.\n\t\tUnfortunately we can't just call that function because it has a hardcoded\n\t\tcaps-check which fails when called from the email notification script\n\t\texecuted by Cron.\n\t\t*/\n\t\t$post = $this->get_wrapped_object();\n\t\tif ( ! $post ) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$context = 'display';\n\t\t$action = '&amp;action=edit';\n\n\t\t$post_type_object = get_post_type_object( $post->post_type );\n\t\tif ( ! $post_type_object ) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn apply_filters( 'get_edit_post_link', admin_url( sprintf( $post_type_object->_edit_link . $action, $post->ID ) ), $post->ID, $context );\n\t}", "title": "" }, { "docid": "3971c05bb277602541ed69daf80b1a55", "score": "0.68364805", "text": "public function get_url_page_edit() {\n\t\treturn admin_url( 'post.php?post=' . $this->get_page_id() . '&action=edit#post' );\n\t}", "title": "" }, { "docid": "589cb548c9730bd7d45b686ad3550e6b", "score": "0.67212176", "text": "public function getEditLink() {\n return \\get_edit_post_link($this->post->ID, '');\n }", "title": "" }, { "docid": "eb41182dd9b4e1b5075bd05402078ef6", "score": "0.652545", "text": "public function edit_button_custom() {\n\n $course = $this->page->course;\n $coursecontext = context_course::instance($course->id);\n\n if ($this->page->user_allowed_editing()) {\n\n if ($this->page->url->compare(new moodle_url('/course/view.php'), URL_MATCH_BASE)) {\n $baseurl = clone($this->page->url);\n $baseurl->param('sesskey', sesskey());\n } else {\n $baseurl = new moodle_url('/course/view.php', array('id'=>$course->id, 'return'=>$this->page->url->out_as_local_url(false), 'sesskey'=>sesskey()));\n }\n\n $editurl = clone($baseurl);\n \n if ($this->page->user_is_editing()) {\n $editurl->param('edit', 'off');\n $editstring = get_string('turneditingoff');\n } else {\n $editurl->param('edit', 'on');\n $editstring = get_string('turneditingon');\n }\n return $this->single_button($editurl, $editstring);\n }\n }", "title": "" }, { "docid": "5fc889d8bc326b60d36fe926d616b6e9", "score": "0.65253764", "text": "public function get_edit_link() {\n\t\treturn admin_url() . '/admin.php?page=wpcf-edit&group_id=' . $this->get_id();\n\t}", "title": "" }, { "docid": "2e06f1e56487812d83f1b4825db287c7", "score": "0.6490551", "text": "public function getEditLink()\n {\n return $this->get('EditLink');\n }", "title": "" }, { "docid": "2e06f1e56487812d83f1b4825db287c7", "score": "0.6489579", "text": "public function getEditLink()\n {\n return $this->get('EditLink');\n }", "title": "" }, { "docid": "2e06f1e56487812d83f1b4825db287c7", "score": "0.6489579", "text": "public function getEditLink()\n {\n return $this->get('EditLink');\n }", "title": "" }, { "docid": "af849e6e6d7909238d3608b6049fca4d", "score": "0.64355594", "text": "public function edit_link() {\n\t\tedit_post_link(\n\t\t\tsprintf(\n\t\t\t\twp_kses(\n\t\t\t\t\t/* translators: %s: Name of current post. Only visible to screen readers */\n\t\t\t\t\t__( 'Edit <span class=\"screen-reader-text\">%s</span>', 'blank' ),\n\t\t\t\t\t[\n\t\t\t\t\t\t'span' => [\n\t\t\t\t\t\t\t'class' => [],\n\t\t\t\t\t\t],\n\t\t\t\t\t]\n\t\t\t\t),\n\t\t\t\tget_the_title()\n\t\t\t),\n\t\t\t'<span class=\"edit-link\">',\n\t\t\t'</span>'\n\t\t);\n\t}", "title": "" }, { "docid": "188b023c23bee2a4c219b1d1fc76d54d", "score": "0.6388651", "text": "public function getEditLink()\n {\n $request = $this->getRequest();\n\n $item = $this->menu->find(array(\n $request->getControllerKey() => $request->getControllerName(),\n $request->getActionKey() => 'edit',\n 'allowed' => true));\n\n if ($item) {\n return $item->toHRefAttribute($request);\n }\n }", "title": "" }, { "docid": "07c42f42de340d99340e90a40d3a0e68", "score": "0.6372025", "text": "public function get_edit_link() {\n return helper::get_edit_tour_link($this->id);\n }", "title": "" }, { "docid": "6bc55f8d00a52c0d2812ff4aa772c001", "score": "0.63681054", "text": "public function get_edit_link() {\n\n if ( is_null( $this->id ) ) {\n return false;\n }\n\n $link = admin_url( 'admin.php?page=huge_forms&task=edit_form&id=' . $this->id );\n\n $link = wp_nonce_url( $link, 'huge_forms_edit_form_' . $this->id );\n\n $link = html_entity_decode( $link );\n\n return $link;\n\n }", "title": "" }, { "docid": "f023159d8f958adfc6d69a0df32990c4", "score": "0.6357903", "text": "function EditLink() {\n\t\tif($this->canEdit()) {\n\t\t\t$url = Controller::join_links($this->Link('editpost'), $this->ID);\n\n\t\t\treturn '<a href=\"' . $url . '\" class=\"editPostLink\">' . _t('Post.EDIT','Edit') . '</a>';\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "6e6059167d3aab3444ab26fce3d35597", "score": "0.63246167", "text": "function cleanyeti_pageeditlink() {\n \n if (current_user_can('edit_posts')) {\n \t $posteditlink = sprintf( '<a href=\"%s\" title=\"%s\">%s</a>' , \n\n\t\t\t \t\t\tget_edit_post_link(),\n\t\t\t \t\t\tesc_attr__('Edit page', 'cleanyeti'),\n\t\t\t\t\t\t\t /* translators: post edit link */\n\t\t\t \t\t\t__('Edit', 'cleanyeti'));\n\t\t\t \n } else {\n $posteditlink = '';\n }\n return apply_filters('cleanyeti_pageeditlink', $posteditlink);\n\t}", "title": "" }, { "docid": "a16a52c43e11f5346d0494f86df29ebc", "score": "0.62727165", "text": "function button_edit($url,$title=\"Edit Record\"){\n\t\t$butt_edit = '<a href=\"'.$url.'\"><img src=\"templates/default/edit_small.png\" title=\"'.$title.'\" border=\"0\" width=\"32\" height=\"32\"/></a> ';\n\t\t$this->menutemplate = str_replace(\"{butt_edit}\", $butt_edit, $this->menutemplate);\t\t \t \n\t}", "title": "" }, { "docid": "f34c4e5820b0e92558096285f6b8ef44", "score": "0.6245508", "text": "function getAboutUsEditButton()\n\t\t{\n\t\t\t$titles = $this->manage_content->getValue('about_us','*');\n\t\t\tforeach ($titles as $title) {\n\t\t\t\techo '<a href=\"editAbout.php?id='.$title['id'].'\" class=\"btn btn-info skills\" >'.$title['title'].'</a>';\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "5ce09302d406e1386f10f925b2e97fb9", "score": "0.6211434", "text": "function button_edit($id = 0) {\n\n\t\t$accessName = 'Edit Franchise';\n\n\t\t$url = 'franchise/add_content/' . $id . '/edit/';\n\n\t\t$string = $this->web_config_lib->button_edit($accessName, $url);\n\n\t\treturn $string;\n\t}", "title": "" }, { "docid": "4918b00249e23f4f41c6410c2b2c5d59", "score": "0.61840886", "text": "public function getEditLink()\n {\n $unique_id = $this->getUniqueId();\n\n $host = $_SERVER['HTTP_HOST'];\n $extra = $_SERVER['PHP_SELF'] . '?module=nomination&view=NominationForm&unique_id=' . $unique_id;\n\n $link = 'http://' . $host . $extra;\n\n return $link;\n }", "title": "" }, { "docid": "b6afb3c8964457e4241a18da10b1959f", "score": "0.61786205", "text": "function buddyblog_get_edit_url( $post_id = 0 ) {\n\n\t$bp = buddypress();\n\n\t$user_id = get_current_user_id();\n\n\tif ( ! $user_id ) {\n\t\treturn '';\n\t}\n\n\tif ( empty( $post_id ) ) {\n\t\t$post_id = get_the_ID();\n\t}\n\t// check if current user can edit the post.\n\t$post = get_post( $post_id );\n\n\t// if the author of the post is same as the loggedin user or the logged in user is admin.\n\tif ( $post->post_type != buddyblog_get_posttype() ) {\n\t\treturn '';\n\t}\n\n\tif ( $post->post_author != $user_id && ! is_super_admin() ) {\n\t\treturn '';\n\t}\n\n\t$action_name = 'edit';\n\n\tif ( current_user_can( buddyblog_get_option( 'dashboard_edit_cap' ) ) ) {\n\t\treturn get_edit_post_link( $post );\n\t}\n\n\t// if we are here, we can allow user to edit the post.\n\treturn bp_core_get_user_domain( $post->post_author ) . $bp->buddyblog->slug . \"/{$action_name}/\" . $post->ID . '/';\n}", "title": "" }, { "docid": "1e1b71e61ffe5782ff1c6af85cb241b6", "score": "0.6177551", "text": "function cleanyeti_postfooter_posteditlink() {\n\n\t $posteditlink = sprintf( '<a href=\"%s\" title=\"%s\" class=\"edit\">%s</a>' , \n\t\t\t \t\t\tget_edit_post_link(),\n\t\t\t \t\t\tesc_attr__('Edit post', 'cleanyeti'),\n\t\t\t\t\t\t\t/* translators: post edit link */\n\t\t\t \t\t\t__('Edit', 'cleanyeti'));\n\n\n\t return apply_filters('cleanyeti_postfooter_posteditlink',$posteditlink); \n\t \n\t}", "title": "" }, { "docid": "0c15afd6401969068ecea328c8ab15c7", "score": "0.61429644", "text": "function getAdvertisementEditButton()\n\t\t {\n\t\t\t$ads = $this->manage_content->getValue('advertisement','*');\n\t\t\tif(!empty($ads[0]))\n\t\t\t{\n\t\t\t\tforeach ($ads as $ad) {\n\t\t\t\t\techo '<a href=\"editAdv.php?id='.$ad['uniqueId'].'\" class=\"btn btn-info skills\" >'.$ad['owner-name'].'</a>';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t }", "title": "" }, { "docid": "10f947228b49ce87fca9a2bdc17ba570", "score": "0.61050546", "text": "function cleanyeti_postheader_posteditlink() {\n\n \t$posteditlink = sprintf( '<a href=\"%s\" title=\"%s\">%s</a>' , \n\n\t\t\t \t\t\tget_edit_post_link(),\n\t\t\t \t\t\tesc_attr__('Edit post', 'cleanyeti'),\n\t\t\t\t\t\t\t/* translators: post edit link */\n\t\t\t \t\t\t__('Edit', 'cleanyeti'));\n\t\t\n\t\treturn apply_filters('cleanyeti_postheader_posteditlink', $posteditlink); \n\n\t}", "title": "" }, { "docid": "da92ba9540882fe49b68ada326e19448", "score": "0.6103068", "text": "function twentyseventeen_edit_link() {\n edit_post_link(\n sprintf(\n /* translators: %s: Name of current post */\n __( 'Edit<span class=\"screen-reader-text\"> \"%s\"</span>', 'twentyseventeen' ),\n get_the_title()\n ),\n '<span class=\"edit-link\">',\n '</span>'\n );\n}", "title": "" }, { "docid": "ec99d4685b52b2ea73979d300e2af5b5", "score": "0.60959136", "text": "function buddyblog_get_edit_link( $id = 0, $label = '' ) {\n\n\tif ( ! buddyblog_get_option( 'allow_edit' ) ) {\n\t\treturn '';\n\t}\n\n\tif ( empty( $label ) ) {\n\t\t$label = __( 'Edit', 'buddyblog' );\n\t}\n\n\t$url = buddyblog_get_edit_url( $id );\n\n\tif ( ! $url ) {\n\t\treturn '';\n\t}\n\n\treturn \"<a href='{$url}'>{$label}</a>\";\n}", "title": "" }, { "docid": "902068bac7371997fe7e15026b80d993", "score": "0.60826844", "text": "public function edit($id)\n {\n $id = Crypt::decryptString($id);\n view()->share('module_action', array(\n \"back\" => array(\"title\" => '<b><i class=\"icon-arrow-left52\"></i></b> ' . trans(\"comman.back\"), \"url\" => route('email-template.index'),\n \"attributes\" => array(\"class\" => \"btn bg-blue btn-labeled heading-btn\", 'title' => 'Back')),\n ));\n $email_template = EmailTemplate::find($id);\n return view('email-template-module.edit', compact('email_template'));\n\n }", "title": "" }, { "docid": "e4d526efd601d1807b36e03da78edd46", "score": "0.60604215", "text": "public function edit($id) {\n\n\n if ($id == '') {\n return $this->InvalidUrl();\n }\n $newsletter_subscriber = NewsletterSubscriber::find($id);\n if (empty($newsletter_subscriber)) {\n return $this->InvalidUrl();\n }\n\n $pageTitle = trans('admin.EDIT_SUBSCRIBERS');\n $title = trans('admin.EDIT_SUBSCRIBERS');\n /* * breadcrumb* */\n $pages[\"<i class='fa fa-dashboard'></i>\" . trans('admin.DASHBOARD')] = 'dashboard';\n $pages[trans('admin.ALL_SUBSCRIBERS')] = 'admin.newsletter-subscriber.index';\n\n\n $breadcrumb = array('pages' => $pages, 'active' => trans('admin.EDIT_SUBSCRIBERS'));\n\n return view('admin.newsletter-subscriber.edit', compact('newsletter_subscriber', 'pageTitle', 'title', 'breadcrumb'));\n }", "title": "" }, { "docid": "48e191c605f767c9ee000a50766ad5b2", "score": "0.6038611", "text": "public function getEditLink($w = 'edit', $m = 'Form'){\n if (!$this->canEdit()) return Html::n('a');\n return Html::n('a', 'javascript:void(0)', $w)->onclick(\"App.prompt('{$this->c}/{$m}/{$this->id}')\");\n }", "title": "" }, { "docid": "c76b293f7968c8981068fe049fb7b11c", "score": "0.6016829", "text": "function get_editor_url($email_id, $editor_type) {\n switch ($editor_type) {\n case NewsletterEmails::EDITOR_COMPOSER: return admin_url(\"admin.php\") . '?page=newsletter_emails_composer&id=' . $email_id;\n case NewsletterEmails::EDITOR_HTML: return admin_url(\"admin.php\") . '?page=newsletter_emails_editorhtml&id=' . $email_id;\n case NewsletterEmails::EDITOR_TINYMCE: return admin_url(\"admin.php\") . '?page=newsletter_emails_editortinymce&id=' . $email_id;\n }\n }", "title": "" }, { "docid": "f0f79c00a5ac2288ba9510482f9547c4", "score": "0.59913206", "text": "public function getEditUrl($entry) {\n\t\treturn sprintf($this->edit, $entry);\n\t}", "title": "" }, { "docid": "c6e2b1984d4ca79e63e298b4932704d8", "score": "0.5986629", "text": "public function show_on_post_edit_screen();", "title": "" }, { "docid": "40e457f81faac6a9bc95e437578de893", "score": "0.5983196", "text": "protected function getEditLink(): ?string\n {\n if (\n !AdminAuthorization::can('admin_admins::view')\n && !AdminAuthorization::can('admin_admins::edit')\n && !AdminAuthorization::can('admin_admins::disable')\n && !AdminAuthorization::can('admin_admins::delete')\n ) {\n return null;\n }\n\n return 'admin_admins::admins_edit';\n }", "title": "" }, { "docid": "a75c7ade23dc95f81eacc434511e3368", "score": "0.595356", "text": "public function EditOrViewLink() {\n\t\tif ($this->canView()) {\n\t\t\treturn Controller::curr()->join_links(\n\t\t\t\t'/',\n\t\t\t\tstrtolower($this()->config()->get('route_part') ?: $this()->class),\n\t\t\t\t$this()->ID,\n\t\t\t\tViewable::ActionName\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "9322a78c50bb5bb0bc685810cdd99edc", "score": "0.5938173", "text": "public function getAdminEditUrl()\n\t{\n\t\treturn self::getAdminUrl('edit', $this->id);\n\t}", "title": "" }, { "docid": "b9b85b687b6fcea5598d424c82d5a92f", "score": "0.5935903", "text": "public function getEditUrl()\n {\n if (empty($this->editRoute)) {\n return;\n }\n\n // Don't show edit link, when content container is space and archived\n if ($this->contentObject->content->container instanceof Space && $this->contentObject->content->container->status == Space::STATUS_ARCHIVED) {\n return \"\";\n }\n\n return $this->contentObject->content->container->createUrl($this->editRoute, ['id' => $this->contentObject->id]);\n }", "title": "" }, { "docid": "5684b39a18960ed54e7af47fb71109d6", "score": "0.59266794", "text": "function button_edit($id = 0) {\n\n\t\t$accessName = 'Edit User';\n\n\t\t$url = 'users/edit/user_id/' . $id;\n\n\t\t$string = $this->web_config_lib->button_edit($accessName, $url);\n\n\t\treturn $string;\n\n\t}", "title": "" }, { "docid": "ccc16ec2bfd5a7f1c1a89fd7bca6e264", "score": "0.59127766", "text": "public function getEdit($post)\n {\n // Title\n $title = Lang::get('admin/blogs/title.blog_update');\n\n // Show the page\n return View::make('admin/blogs/create_edit', compact('post', 'title'));\n }", "title": "" }, { "docid": "4afb86985ba7bb514dc7df9f4dff47df", "score": "0.5909994", "text": "function appthemes_get_edit_post_url( $post_id = 0, $context = 'display' ) {\n\tif ( ! $post = get_post( $post_id ) ) {\n\t\treturn false;\n\t}\n\n\tif ( ! $post_type_object = get_post_type_object( $post->post_type ) ) {\n\t\treturn false;\n\t}\n\n\t$args = array();\n\n\tif ( 'revision' !== $post->post_type ) {\n\t\t$args['action'] = 'edit';\n\t}\n\n\t$edit_link = sprintf( $post_type_object->_edit_link, $post->ID );\n\n\t$url = add_query_arg( $args, admin_url( $edit_link ) );\n\t$url = esc_url( $url, null, $context );\n\n\treturn apply_filters( 'appthemes_get_edit_post_url', $url, $post->ID, $context );\n}", "title": "" }, { "docid": "f62d76cc95361184fbfb72da4cc0af5e", "score": "0.589959", "text": "public function editLink()\n {\n return URL::route('tricks.edit', [$this->wrappedObject->slug]);\n }", "title": "" }, { "docid": "75ddf0490a368b128fd9de5306209e97", "score": "0.58793527", "text": "public function getCpEditUrl()\n\t{\n\t\treturn UrlHelper::getCpUrl('formbuilder/entries/'.$this->id);\n\t}", "title": "" }, { "docid": "df9f7156dad41c6d46206fc3470cce4b", "score": "0.58465433", "text": "public function edit()\n {\n return response()->view( 'pages.mailingtemplate.mailingtemplate-edit');\n }", "title": "" }, { "docid": "a41e5db78fb6647721860efce8e82cf3", "score": "0.5842165", "text": "function cleanyeti_postmeta_editlink() {\n \n\t // Display edit link\n\t if (current_user_can('edit_posts')) {\n\t $editlink = '<span class=\"meta-sep meta-sep-edit\">|</span> ' . \"\\n\\n\\t\\t\\t\\t\\t\\t\" . cleanyeti_postheader_posteditlink();\n\t return apply_filters('cleanyeti_postmeta_editlink', $editlink);\n\t } \n\t}", "title": "" }, { "docid": "a60ab19ddd1c8c745793890a1bacd40e", "score": "0.58215576", "text": "function wct_edit_post_link( $edit_link = '', $post_id = 0 ) {\n\t/**\n\t * using the capability check prevents edit link to display in case current user is the\n\t * author of the talk and don't have the minimal capability to open the talk in WordPress\n\t * Administration edit screen\n\t */\n\tif ( wct_is_talks() && ( 0 === $post_id || ! wct_user_can( 'edit_talks' ) ) ) {\n\t\t/**\n\t\t * @param bool false to be sure the edit link won't show\n\t\t * @param string $edit_link\n\t\t * @param int $post_id\n\t\t */\n\t\treturn apply_filters( 'wct_edit_post_link', false, $edit_link, $post_id );\n\t}\n\n\treturn $edit_link;\n}", "title": "" }, { "docid": "64bf62279a530fe6f9e8e829234977e7", "score": "0.5817219", "text": "function html_button_edit($toggle_show_class = \"edit_form_part\")\n{\n\t// $pen_symbol = html_tag(\"span\", \"\", \"glyphicon glyphicon-pencil\");\n\t$pen_symbol = html_glyph(\"pencil\");\n\t// Button with a pencil that toggles visibility of all elements of class $toggle_show_class\n\t$button = html_button($pen_symbol, \"btn btn-default\", \"showhideByClass('\".$toggle_show_class.\"')\", TRUE);\n\t\n\t$html = $button;\n\n\treturn $html;\n}", "title": "" }, { "docid": "ec2fbbf27ffb7a12aca4321ceb016ab0", "score": "0.58149403", "text": "function printEditLink($params)\n{\n extract($params);\n return \"<a href=\\\"recruitment_edit.php?dataID=\" . $record['id'] . \"\\\">\" . getWords('edit') . \"</a>\";\n}", "title": "" }, { "docid": "15dc7792e298796c97f8e86c6ce3505f", "score": "0.57940227", "text": "function smarty_function_admin_edit($param, &$smarty) {\n if(isset($param['href']) && !empty($param['href'])) {\n $href = $param['href'];\n } else {\n \t$smarty->trigger_error('admin_edit: missing \"href\" parameter');\n }\n if(isset($param['id']) && !empty($param['id'])) {\n $id = $param['id'];\n } else {\n $smarty->trigger_error('admin_edit: missing \"id\" parameter');\n }\n if(strpos($href, '?')>0) {\n \t$href .= '&id=' . $id;\n } else {\n \t$href .= '?id=' . $id;\n }\n $output = '<a href=\"' . $href . '\" onclick=\"loadPage(this.href);return(false)\" title=\"' . $GLOBALS['_LANG']['edit'] . '\"><img src=\"images/icon_edit.gif\" border=\"0\"/></a>';\n return $output;\n\n}", "title": "" }, { "docid": "96884a0d55f36349b743e3d913248156", "score": "0.5790352", "text": "function edit()\n {\n $this->_view_edit('edit');\n }", "title": "" }, { "docid": "a1c796d362a9633685bd6ce42a70b715", "score": "0.57799214", "text": "function atlantis_edit_link($id = null)\n {\n edit_post_link(\n sprintf(\n /* translators: %s: Name of current post */\n __('Edit<span class=\"screen-reader-text\"> \"%s\"</span>', 'atlantis'),\n get_the_title()\n ),\n '<span class=\"wp-edit-link\">',\n '</span>',\n $id\n );\n }", "title": "" }, { "docid": "6e72d9dd90903115d6e7cbf3e25ddd1c", "score": "0.5773411", "text": "function edit_link($title)\n{\n return Parrot::getInstance()->getUrl(\"discussion/\" . discussion::encode_title($title) . \"/edit\");\n}", "title": "" }, { "docid": "84dcf12bb851316524776719ec86b581", "score": "0.5747189", "text": "public function getEditLink()\n {\n return false;\n }", "title": "" }, { "docid": "837a9705cda465c5dfda0b4f42bf73e4", "score": "0.5706087", "text": "public function editProductLink()\n {\n return base_url(\"product/edit/{$this->produceCode}\");\n }", "title": "" }, { "docid": "dcad279fbe532585ee6d6c74d0ce5810", "score": "0.5705853", "text": "protected static function buttons_edit($auth, $args, $tabalias, $options) {\n global $indicia_templates;\n if (!$args['default_input_form']) {\n throw new exception('Please set the default input form path setting before using the [edit button] control');\n }\n self::load_record($auth, $args);\n $record = self::$record;\n if (($user_id = hostsite_get_user_field('indicia_user_id')) && $user_id == $record['created_by_id']\n && $args['website_id'] == $record['website_id']) {\n if (empty($record['input_form'])) {\n $record['input_form'] = $args['default_input_form'];\n }\n $rootFolder = data_entry_helper::getRootFolder(TRUE);\n $paramJoin = strpos($rootFolder, '?') === FALSE ? '?' : '&';\n $url = \"$rootFolder$record[input_form]{$paramJoin}occurrence_id=$record[occurrence_id]\";\n $class = isset($options['classes']['edit']) ? $options['classes']['edit'] : $indicia_templates['buttonDefaultClass'];\n return \"<a class=\\\"$class\\\" href=\\\"$url\\\">\" . lang::get('Edit this record') . '</a>';\n }\n else {\n // No rights to edit, so button omitted.\n return '';\n }\n }", "title": "" }, { "docid": "8cfcc63e99dd19601b08f19f0aab892c", "score": "0.5702541", "text": "public function getUpdateButton() {\n return $this->getStandardButton('fa fa-pencil text-yellow', Yii::t('builder', 'Update'), '#', ['class' => 'btn btn-mini btn-update']);\n }", "title": "" }, { "docid": "c8f8431b1d9e161be28a3750df4e5707", "score": "0.5679934", "text": "function user_instagram_get_content_edit_url( $content_id ) {\n\treturn home_url( 'editer/' . $content_id );\n}", "title": "" }, { "docid": "395c624662b0fd3a77b204841269d9cf", "score": "0.56751144", "text": "public function getMaintenanceFormPageLink()\n {\n return MaintenanceFormPage::get()->first()->Link();\n }", "title": "" }, { "docid": "5e62248dbb0f2a33f11b990a84b43397", "score": "0.5671949", "text": "function getUpdateButton($oDocField) {\n global $default;\n if (!isset($oDocField)) {\n return _(\"Please select a Document Field:\") . \" \";\n } else {\n return \"<td align = right><input type=\\\"image\\\" src =\\\"\" . KTHtml::getUpdateButton() . \"\\\" value=\\\"submit\\\" border=\\\"0\\\"/></td>\\n\";\n }\n}", "title": "" }, { "docid": "29558bd14f3592fc430c265050f6e70e", "score": "0.5662428", "text": "public function getButtonAction()\n {\n return $this->getUrl(\n 'hipay/hashing/synchronize',\n [\n 'store' => $this->getRequest()->getParam('store'),\n 'website' => $this->getRequest()->getParam('website')\n ]\n );\n }", "title": "" }, { "docid": "c99f9f786cf508bfa45b96b50b25f857", "score": "0.5661479", "text": "protected static function buttons_edit($auth, $args, $tabalias, $options) {\n global $indicia_templates;\n if (!$args['default_input_form']) {\n throw new exception('Please set the default input form path setting before using the [edit button] control');\n }\n self::load_record($auth, $args);\n $record = self::$record;\n if (($user_id = hostsite_get_user_field('indicia_user_id')) && $user_id == self::$record['created_by_id']\n && $args['website_id'] == self::$record['website_id']) {\n if (empty($record['input_form'])) {\n $record['input_form'] = $args['default_input_form'];\n }\n $rootFolder = data_entry_helper::getRootFolder(TRUE);\n $paramJoin = strpos($rootFolder, '?') === FALSE ? '?' : '&';\n $url = \"$rootFolder$record[input_form]{$paramJoin}occurrence_id=$record[occurrence_id]\";\n return \"<a class=\\\"$indicia_templates[buttonDefaultClass]\\\" href=\\\"$url\\\">\" . lang::get('Edit this record') . '</a>';\n }\n else {\n // No rights to edit, so button omitted.\n return '';\n }\n }", "title": "" }, { "docid": "e4c5652d5bebe7bacfa0222ed964118f", "score": "0.5659642", "text": "function bibdk_reservation_link($entity, $entity_type) {\n $entity_ids = $entity->getIDs();\n $subtype = $entity->getSubType();\n $subtype_order_ids = $entity->getSubtypeOrderIds();\n $manifestations = explode(',', implode(',', $entity_ids));\n if (count($manifestations) >= 2) {\n $text = t(\"Order\", array(), array('context' => 'bibdk_reservation'));\n $button_id = 'any_edition_' . $manifestations[0];\n }\n else {\n $translated_sub = $subtype;\n $text = ($entity_type == \"bibdkSubwork\") ? $translated_sub : t(\"Order\", array('context' => 'bibdk_reservation'));\n $button_id = 'this_edition_' . current($manifestations);\n }\n $path = 'reservation';\n $query['ids'] = (!empty($entity_ids)) ? implode(',', $entity_ids) : NULL;\n if (!empty($subtype_order_ids)) {\n $query['subtype_order_ids'] = implode(',', $subtype_order_ids);\n }\n\n // This should be moved to the template\n $attributes['id'] = $button_id;\n $attributes['data-rel'] = 'reservation';\n $attributes['class'][] = 'bibdk-popup-link';\n $attributes['class'][] = 'btn';\n $attributes['class'][] = 'btn-blue';\n\n $link = array(\n '#theme' => 'link',\n '#text' => $text,\n '#path' => $path,\n '#options' => array(\n 'query' => $query,\n 'attributes' => $attributes,\n 'html' => FALSE,\n ),\n );\n return drupal_render($link);\n}", "title": "" }, { "docid": "dad33236f8fe756ac7dee50c067bcd4d", "score": "0.565815", "text": "public function buildEditPage($update = false) {\r\n\r\n if (is_array($update)) {\r\n if ($update['success']) {\r\n $message = '\r\n <div class=\"message\">\r\n <h3>Content updated</h3>\r\n <p><a href=\"./\">Back to site</a></p>\r\n </div>\r\n ';\r\n } else {\r\n $message = $update['error'];\r\n }\r\n } else {\r\n $message = \"\";\r\n }\r\n\r\n $latest = $this->db->getLatest();\r\n \r\n // create content\r\n $title = \"Edit\";\r\n $content = '\r\n <aside>\r\n <h1>'.$this->conf['details']['title'].'</h1>\r\n <p><a href=\"./\">Back to site</a></p>\r\n <p><a href=\"./history\">View or restore an older version of this page</a></p>\r\n </aside>\r\n <article>\r\n <h2>Edit</h2>\r\n '.$message.'\r\n <form method=\"post\" action=\"\">\r\n <fieldset>\r\n <legend>Edit page</legend>\r\n <div class=\"input-container clearfix\">\r\n <label for=\"author\">Your name</label>\r\n <input type=\"text\" class=\"text\" id=\"author\" name=\"author\" value=\"\" />\r\n </div>\r\n <div class=\"input-container clearfix\">\r\n <label for=\"comment\">Update description <em>(optional)</em></label>\r\n <textarea name=\"comment\" id=\"comment\" rows=\"3\" cols=\"30\"></textarea>\r\n </div>\r\n <label>Make your changes below</label>\r\n <div class=\"input-container clearfix\">\r\n <!-- <label for=\"content\">Content</label> -->\r\n <textarea name=\"content\" id=\"content\" rows=\"30\" cols=\"40\">'.stripslashes($latest->content).'</textarea>\r\n </div>\r\n <div class=\"input-container clearfix\">\r\n <input class=\"button\" type=\"submit\" name=\"login\" id=\"button\" value=\"Save\" />\r\n <p><a class=\"button\" href=\"./\">Cancel</a></p>\r\n </div>\r\n </fieldset>\r\n </form>\r\n </article>\r\n ';\r\n\r\n // build page\r\n return $this->buildPage($title, $content);\r\n }", "title": "" }, { "docid": "afe5de9c36a5b9bc6f8725ec4eacabcc", "score": "0.5644769", "text": "public function btnEdit()\n {\n return view('viewers.inventory.stock.buttons.edit', ['stock' => $this->entity]);\n }", "title": "" }, { "docid": "82db7603a0948db1f4fe83b10c9910ad", "score": "0.5623168", "text": "public function getEditPostUrl()\n {\n $multipleWishlist = $this->request->getParam(MultipleWishlistInterface::MULTIPLE_WISHLIST_PARAM_NAME);\n\n if ($multipleWishlist) {\n return $this->urlBuilder->getUrl('multiplewishlist/manage/editpost');\n }\n\n return $this->urlBuilder->getUrl('multiplewishlist/manage/create');\n }", "title": "" }, { "docid": "a32ca1094f9745cd0dcc315577c2bec9", "score": "0.5619307", "text": "function edit_link($row)\n{\n\t//\tpager_link(_(\"Edit\"),\n\t//\t\t\"/dimensions/dimension_entry.php?trans_no=\" . $row[\"id\"], ICON_EDIT);\n\treturn pager_link(_(\"Edit\"),\n\t\t\t\"/dimensions/dimension_entry.php?trans_no=\" . $row[\"id\"], ICON_EDIT);\n}", "title": "" }, { "docid": "44bfcdbb8a6277c82a7792696b24b36b", "score": "0.5607373", "text": "public function editButton($edit)\n {\n $this->addElement( 'hidden', 'edit', array('value' => $edit));\n $this->addElement( 'submit', $this->getView()->translate( 'ändern'));\n }", "title": "" }, { "docid": "21b042d09772024554c9b036281c5a6c", "score": "0.558133", "text": "function mypageorder_getTarget() {\n\tglobal $wp_version;\n\tif (version_compare($wp_version, \"2.999\", \">\"))\n\t\treturn \"edit.php?post_type=page&page=mypageorder\";\n\telse\n\t\treturn \"edit-pages.php?page=mypageorder\";\n}", "title": "" }, { "docid": "6342cefdb8bd180de8424d66eba9bea8", "score": "0.5560896", "text": "public function editpage($args)\r\n {\r\n $view = FormUtil::newForm('Content');\r\n return $view->execute('content_edit_editpage.html', new Content_Form_Handler_Edit_Page($args));\r\n }", "title": "" }, { "docid": "df7933c261eead7a190964cb30dfcf11", "score": "0.5558543", "text": "function custom_edit_post_link($output) {\n $output = str_replace('class=\"post-edit-link\"', 'class=\"post-edit-link btn icn edit\"', $output);\n return $output;\n}", "title": "" }, { "docid": "df7933c261eead7a190964cb30dfcf11", "score": "0.5558543", "text": "function custom_edit_post_link($output) {\n $output = str_replace('class=\"post-edit-link\"', 'class=\"post-edit-link btn icn edit\"', $output);\n return $output;\n}", "title": "" }, { "docid": "46397449e85c8dde5d30b595a802f6b5", "score": "0.55582184", "text": "function edit()\n\t{\n\t\t$i = 0;\n\t\t$active_page = !empty($_GET['page']) ? $_GET['page'] : 0;\t\t//Hier kommt die Bl�tterklasse ins Spiel\n\n\t\t$query \t= 'SELECT COUNT(id) FROM modnewsletter';\t\t\t\t\t//Abfragen wieviele Eintr�ge die tabelle hat\n\t\t$result\t= \t@mysql_query($query) OR functions::output_fehler('MySQL-Error: Nr. 175 ');\n\t\tlist($entries) = mysql_fetch_row($result);\n\n\t\t$blaettern=new Blaettern($active_page, $entries);\t\t//Neue Instanz von blaettern erstellen\n\t\t$blaettern->set_Link_Href(\"\");\n\t\t$blaettern->set_Entries_Per_Page(ANZ_SEITEN);\t\t\t\t\t//Anzahl seiten pro seiten festlegen (Konstante wird hier im script gesetzt und steh tin der config.ini)\n\n\t\t$query = \"SELECT id, gId, email FROM modnewsletter ORDER BY gId, email ASC LIMIT \".($blaettern->get_Epp() * $blaettern->get_Active_Page()).', '.$blaettern->get_Epp();\n\t\t$insert\t= @mysql_query($query) OR functions::output_fehler('MySQL-Error: Nr. 174 ');\n\t\twhile($daten = @mysql_fetch_assoc($insert))\n\t\t{\n\t\t\t$newsletter[$i]['id'] \t\t= $daten['id'];\n\t\t\t$newsletter[$i]['i'] \t\t= $i;\n\t\t\t$newsletter[$i]['gruppe'] \t= functions::selector(\"modnewslettergruppe\", \"name\", $daten['gId']);\n\t\t\t$newsletter[$i]['email'] \t= $daten['email'];\n\t\t\t$newsletter[$i]['linkDelete'] \t= functions::GetLink(array('sub' => $_GET['sub'], 'action' => 'del', 'id' => $daten['id']));\n\t\t\t$i++;\n\t\t}\n\n\t\tfunctions::output_var('linkClean' , functions::GetLink(array('sub' => $_GET['sub'], 'action' => 'clean')));\n\t\tfunctions::output_var(\"blaettern\", $blaettern -> create());\n\t\tfunctions::output_var(\"show\", $newsletter);\n\n\n\t}", "title": "" }, { "docid": "8a6731a9c3490334c7c85b8f2fddb6a5", "score": "0.5555803", "text": "protected function getEditMenuItem()\n {\n return $this->findMenuItem($this->request->getControllerName(), 'edit');\n }", "title": "" }, { "docid": "559f0cca7aa78f250428b1017c7a8efd", "score": "0.5551124", "text": "public function getEditRoute();", "title": "" }, { "docid": "f31dc10f8754ae9e0345fe751409adb7", "score": "0.55495447", "text": "function instructions_dashboard_widget() { ?>\n\n<h2>Use the menus on the left to add and edit website content</h2>\n<h1><a class=\"button\" href=\"<?php echo admin_url( 'post.php?post=5&action=edit' ); ?>\">Edit Home Page</a></h1>\n<p>If you need help, please read the instructions below.</p>\n<!-- <a class=\"button\" href=\"<?php bloginfo('stylesheet_directory'); ?>/Website_Instructions.pdf\" target=\"_blank\">Website Instructions</a> -->\n\n<?php }", "title": "" }, { "docid": "6a915b7b6cdbbd1f33181d3c03324f0f", "score": "0.5527341", "text": "public function editAction() {\n $splash = $this->_initSplashPage();\n\n $this->loadLayout();\n $this->_setActiveMenu('landingpage');\n\n $this->_title('Fedobe');\n $this->_title('Landing Page');\n $this->_title($this->__('Page'));\n\n if ($splash) {\n $this->_title($splash->getName());\n }\n //Here to remove the store switcher while adding new landing page\n if (!Mage::registry('splash_page'))\n $this->getLayout()->getBlock('left')->unsetChild('store_switcher');\n\n $this->renderLayout();\n }", "title": "" }, { "docid": "12ba7c1255c8a7e69bed03481aa5f52d", "score": "0.55268806", "text": "public function getCpEditUrl()\n {\n return UrlHelper::cpUrl('simple-forms/forms/edit/'.$this->id);\n }", "title": "" }, { "docid": "fc6c71162588164e521bb822b5f05bbd", "score": "0.5517518", "text": "function edit_post_link($link, $post_id) {\r\n\r\n\t\t// do nothing for theme version.\r\n\t\t\r\n\t\treturn $link;\r\n\t}", "title": "" }, { "docid": "07fde39e737a70995dc3a55183ef8031", "score": "0.55130136", "text": "public function getPreviewButton() {\n return $this->getStandardButton('fa fa-eye text-blue', Yii::t('builder', 'Preview'), '#', ['class' => 'btn btn-mini btn-preview']);\n }", "title": "" }, { "docid": "08315ae2a319b08046a4893bd2299fa4", "score": "0.55076903", "text": "public function getLineItemEditLink(): ?string\n\t\t{\n\t\t\treturn $this->getEditLink();\n\t\t}", "title": "" }, { "docid": "e660d4cbfe49034d315c1f9ccd95f9f5", "score": "0.5506223", "text": "public function getEditMediaLink()\n {\n return $this->get('EditMediaLink');\n }", "title": "" }, { "docid": "14e9375ed33a841b2df4e7d0abe20230", "score": "0.5505436", "text": "public function get_edit_post_link($label=null) {\n $p = get_post($this->ID);\n $label = is_null($label) ? $p->post_title : $label;\n return '<a href=\"post.php?action=edit&post='. $p->ID .'\">'. $label .'</a>';\n }", "title": "" }, { "docid": "935717c088652a8914f9b5ade22888d5", "score": "0.5500652", "text": "public function editUrl()\n {\n return cp_route('taxonomy.edit', $this->path());\n }", "title": "" }, { "docid": "2ba062e56ef5ce20c344d2352a2604c2", "score": "0.5498221", "text": "public function getCpEditUrl()\n {\n $navigation = $this->getNavigation();\n\n if ($navigation)\n {\n return UrlHelper::getCpUrl('navee/node/' . $navigation->handle . '/' . $this->id);\n }\n }", "title": "" }, { "docid": "c5b661095bdb92effa752e064535e065", "score": "0.5493714", "text": "public function getEditUrl()\n {\n return $this->_urlBuilder->getUrl(\n 'csrma/allRma/save', ['_secure' => true]\n );\n }", "title": "" }, { "docid": "52a6cffcb28672f7f5db43561a69af72", "score": "0.5486072", "text": "protected static function switchToEdit( $obj ) {\n\n $refererId = System::getContainer()->get('request_stack')->getCurrentRequest()->get('_contao_referer_id');\n\n return TL_SCRIPT . '?do='.Input::get('do').'&table='.$obj->getTable().'&id='.$obj->id.'&pid='.$obj->pid.'&mode=1&act=edit&rt='.REQUEST_TOKEN.'&ref='.$refererId;\n }", "title": "" }, { "docid": "970e38a036fb24ba8a2cd351b79f9d4a", "score": "0.5483267", "text": "public static function templateUpdateButton($url, $model, $customTitle = '') {\n $title = 'Edit';\n //TO CHECK USER IS THE SAME WHO IS LOGGED IN\n $disabledFlag = self::isItMe($model);\n if ($customTitle != '') {\n $title = $customTitle;\n }\n return Html::a('<i class=\"fa fa-edit\"></i> ' . $title, $url, [\n 'title' => $title,\n 'class' => \"btn btn-primary waves-effect waves-light $disabledFlag\"\n ]);\n }", "title": "" }, { "docid": "37d1118f2eeab42abff724d630627209", "score": "0.5479778", "text": "public function getClientEditURL($id)\r\n\t{\r\n\t\treturn $this->baseURL . \"/action/edit/\" . $id;\r\n\t}", "title": "" }, { "docid": "f730a66c0d27e1e32f95301822e0016a", "score": "0.547867", "text": "protected function getEditUrl()\n {\n return $this->getModelConfiguration()->getEditUrl($this->getModelKey());\n }", "title": "" }, { "docid": "ed655c917f84e36fe7e2b83aceefaf2f", "score": "0.54772717", "text": "public function filter_edit_button($string, $row, $edit_text, $subject)\n {\n $Advance = 'nexo_order_advance';\n $Cash = 'nexo_order_comptant';\n $Estimate = 'nexo_order_devis';\n\n $nexo_order_types = array_flip($this->config->item('nexo_order_types'));\n\n if (in_array( @$nexo_order_types[ $row->TYPE ], $this->events->apply_filters( 'order_type_locked', array( $Cash ) ) ) ) {\n return;\n } elseif (in_array(@$nexo_order_types[ $row->TYPE ], $this->events->apply_filters( 'order_editable', array( $Estimate ) ) ) ) {\n ob_start();\n ?>\n <a href='<?php echo site_url(array( 'dashboard', store_slug(), 'nexo', 'commandes', 'lists', 'v2_checkout', $row->ID ));\n ?>' title='<?php echo $edit_text?> <?php echo $subject?>'>\n <span class='edit-icon fa fa-edit btn-default btn'></span>\n </a>\n <?php\n return ob_get_clean();\n } elseif ( in_array( @$nexo_order_types[ $row->TYPE ], $this->events->apply_filters( 'order_only_payable', array( $Advance ) ) ) ) {\n ob_start();\n ?>\n <a href='<?php echo site_url(array( 'dashboard', store_slug(), 'nexo', 'commandes', 'proceed', $row->ID ));\n ?>' title='<?php _e('Payer une commande', 'nexo');\n ?>'>\n <span class='edit-icon fa fa-money btn-success btn'></span>\n </a>\n <?php\n return ob_get_clean();\n }\n\n return $string;\n }", "title": "" }, { "docid": "31dc3ed0a306f16a1268bf5f85a7b243", "score": "0.5475839", "text": "public function executeEdit() {\n return $this->modules->get(\"KreativanHelper\")->adminPageEdit();\n }", "title": "" }, { "docid": "128e3b9d670e8441359ee0684f44995c", "score": "0.54745406", "text": "public function AdminPage() {\n\t$oPathIn = fcApp::Me()->GetKioskObject()->GetInputObject();\n\t$oFormIn = fcHTTP::Request();\n\n\t$doEdit = $oPathIn->GetBool('edit');\n\t$doSave = $oFormIn->GetBool('btnSave');\n\n\t$oMenu = fcApp::Me()->GetHeaderMenu();\n\t\t\t\t// ($sGroupKey,$sKeyValue=TRUE,$sDispOff=NULL,$sDispOn=NULL,$sPopup=NULL)\n\t$oMenu->SetNode($ol = new fcMenuOptionLink('do','edit',NULL,'cancel','edit the message'));\n\t $doEdit = $ol->GetIsSelected();\n\n\t /* 2017-11-20 old format\n\t$arPath = array();\t// not sure if anything is needed here\n\t$arActs = array(\n\t // (array $iarData,$iLinkKey,$iGroupKey=NULL,$iDispOff=NULL,$iDispOn=NULL,$iDescr=NULL)\n\t new clsActionLink_option($arPath,'edit',NULL,NULL,NULL,'edit the message'),\n\t );\n\t$oPage->PageHeaderWidgets($arActs);\n\t*/\n\t$idMsg = $this->GetKeyValue();\n\t$sOrdNum = $this->OrderRecord()->NameString();\n\t$sTitle = \"msg$idMsg ord#$sOrdNum\";\n//\t$oPage->Skin()->SetPageTitle($sTitle);\n\n\t// save edits before showing events\n\t$frm = $this->PageForm();\n\tif ($doSave) {\n\t $frm->Save();\n\t $sMsgs = $frm->MessagesString();\n\t $this->SelfRedirect(NULL,$sMsgs);\n\t}\n\n\tif ($this->IsNew()) {\n\t $frm->ClearValues();\n\t} else {\n\t $frm->LoadRecord();\n\t}\n\t$oTplt = $this->PageTemplate();\n\t$arCtrls = $frm->RenderControls($doEdit);\n\t$arCtrls['ID'] = $this->SelfLink();\n\t$arCtrls['!Order'] = $this->OrderRecord()->SelfLink_name();\n\t$arCtrls['!Package'] = $this->PackageLink();\n\n\t$out = NULL;\n\n\tif ($doEdit) {\n\t $out .= '<form method=post>';\n\t} else {\n\t $arCtrls['ID_Media']\t= self::TypeText($this->GetFieldValue('ID_Media'));\t// do this right later\n\t}\n/*\n\t$out = NULL;\n\t$out .= \"\\n<table>\";\n\t$out .= \"\\n<tr><td align=right><b>Order</b>:</td><td>\"\t\t.$ctOrd.'</tr>';\n\t$out .= \"\\n<tr><td align=right><b>Package</b>:</td><td>\"\t.$ctPkg.'</tr>';\n\t$out .= \"\\n<tr><td align=right><b>Media</b>:</td><td>\"\t\t.$ctMedia.'</tr>';\n\t$out .= \"\\n<tr><td align=right><b>When Created</b>:</td><td>\"\t.$ctWhenCre.'</tr>';\n\t$out .= \"\\n<tr><td align=right><b>When Entered</b>:</td><td>\"\t.$ctWhenEnt.'</tr>';\n\t$out .= \"\\n<tr><td align=right><b>When Relayed</b>:</td><td>\"\t.$ctWhenRly.'</tr>';\n\t$out .= \"\\n<tr><td align=right><b>Notes</b>:</td><td>\"\t\t.$ctNotes.'</tr>';\n\t$out .= \"\\n<tr><td align=right><b>Message</b>:</td></tr>\";\n\t$out .= \"\\n</table>\";\n\t$out .= \"<table align=center><tr><td><pre>$ctMsg</pre></td></tr></table>\";\n//*/\n\t$oTplt->SetVariableValues($arCtrls);\n\t$out = $oTplt->RenderRecursive();\n\tif ($doEdit) {\n\t $out .= '<input type=submit name=\"btnSave\" value=\"Save\">';\n\t $out .= '<input type=reset value=\"Reset\">';\n\t $out .= '</form>';\n\t}\n\n\treturn $out;\n }", "title": "" }, { "docid": "1927d7edb547841059c9198d03c3c52b", "score": "0.54710555", "text": "public function view_full_calendar_button()\r\n\t{\r\n\t $screen = get_current_screen();\r\n\r\n\t if($screen->id == 'edit-event' || $screen->id == 'event')\r\n\t {\r\n\t \t$options = get_option('events_maker_general');\r\n\r\n\t\t\tif(!isset($options['full_calendar_display']['type']) || !isset($options['full_calendar_display']['page']) || empty($options['full_calendar_display']['page']))\r\n\t\t\t\treturn;\r\n\r\n\t\t\tif($options['full_calendar_display']['type'] === 'page')\r\n\t\t\t{\r\n\t \t?>\r\n\t <script>\r\n\t \tjQuery('.wrap h2 .add-new-h2').after('<a href=\"<?php echo get_permalink($options['full_calendar_display']['page']); ?>\" class=\"add-new-h2\"><?php echo __('View Calendar', 'events-maker'); ?></a>');\r\n\t </script>\r\n\t \t<?php\r\n\t\t\t}\r\n\t }\r\n\t}", "title": "" }, { "docid": "1540632b1044847c145f6e604a79fc16", "score": "0.5458995", "text": "public function edit() {\n if( !$this->uri->segment(2) ) {\n show_error('Campaign token is required');\n return;\n }\n\n $campaign = $this->giving_impact\n ->campaign\n ->fetch($this->uri->segment(2));\n\n $this->load->library('typography');\n\n $this->load->view('campaigns/edit', array(\n 'campaign' => $campaign\n ));\n\n }", "title": "" }, { "docid": "3d3c698aad60ae09de16a923dd6e3e00", "score": "0.5457181", "text": "public function get_url_go_to_page_builder() {\n\t\treturn admin_url( sprintf( '?%1$s=true&widget-id=%2$s', self::$key_request, $this->widget_id ) );\n\t}", "title": "" }, { "docid": "d081152160553439d3ea1b26be453420", "score": "0.5451051", "text": "public function getCpEditUrl()\n\t{\n\t\treturn \"\";\n\t}", "title": "" }, { "docid": "2eb131b0c95810243aaa7753666abf4c", "score": "0.54497594", "text": "public function edit()\n {\n $id = $this->uri->segment(5);\n if (empty($id)) {\n Template::set_message(lang('checkout_invalid_id'), 'error');\n\n redirect(SITE_AREA . '/content/checkout');\n }\n \n \n \n\n Template::set('toolbar_title', lang('checkout_edit_heading'));\n Template::render();\n }", "title": "" }, { "docid": "e5d7cd18b18a70aa04571b8d5c044101", "score": "0.54410326", "text": "public function edit(Mailer $mailer)\n\t{\n\t\treturn view('mailer.edit', compact('mailer'));\n\t}", "title": "" }, { "docid": "c19526cf1a634dffee5affa0dc4c7a67", "score": "0.54371154", "text": "public function add_page_edit_link( $wp_admin_bar ) {\n\t\t$object = get_queried_object();\n\n\t\tif ( empty( $object )\n\t\t\t|| ! $object instanceof \\WP_Post_Type\n\t\t\t|| $object->name !== $this->post_type\n\t\t\t|| ! $object->show_in_admin_bar\n\t\t\t|| ! current_user_can( 'edit_pages', $this->post_id )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t$wp_admin_bar->add_menu( [\n\t\t\t'id' => 'edit',\n\t\t\t/* translators: Plural name of the post type */\n\t\t\t'title' => sprintf( __( 'Edit page for %s', 'mind/types' ), $object->labels->name ),\n\t\t\t'href' => get_edit_post_link( $this->post_id ),\n\t\t] );\n\t}", "title": "" }, { "docid": "741fa5df65ad5fad171d32707f26a6ff", "score": "0.54352075", "text": "public function edit($id)\n {\n return \"edit\";\n }", "title": "" }, { "docid": "0ac449955cdecf917632987ec468ea81", "score": "0.54246277", "text": "public function editAction()\n {\n return $this->render();\n }", "title": "" }, { "docid": "ebac9751adfd932b7b0e03028d25e7aa", "score": "0.54146475", "text": "protected abstract function actionEdit();", "title": "" }, { "docid": "396919fe8d3101c9d632216b7812c721", "score": "0.54130214", "text": "function is_edit_page( $post_type = '' ){\n\n //make sure we are on the backend\n if( !is_admin() ) return false;\n\n $screen = get_current_screen();\n\n $is_edit_page = $screen->base === 'post';\n\n if( !empty( $post_type ) ) {\n\n $is_post_type = $screen->post_type === $post_type;\n\n return $is_edit_page && $is_post_type;\n } else {\n\n return $is_edit_page;\n }\n}", "title": "" }, { "docid": "219dcedd731665337d4912c0c43d0cb6", "score": "0.54065955", "text": "public function displaysEditForm();", "title": "" } ]
dac58edf3806306860371ede031cdfbf
Apply a function to the an array's values to generate a new array. Keys are preserved.
[ { "docid": "8b1ad0bbbf4a19ae7a9b3d7de2edf695", "score": "0.5822065", "text": "public static function map($array, $callback) {\n\t\treturn array_map($callback, $array);\n\t}", "title": "" } ]
[ { "docid": "9275e49c53bd1652efb65c40468fe545", "score": "0.62755024", "text": "protected function map(array &$array, callable $fn): array\n {\n $result = [];\n $length = count($array);\n while ($length--) {\n $result[$length] = $fn($array[$length]);\n }\n ksort($result);\n return $result;\n }", "title": "" }, { "docid": "79c517ec7c16a8a5bc85c4df64f3c731", "score": "0.62677866", "text": "protected static function map(array $array, callable $callback): array\n {\n $newArray = [];\n\n foreach ($array as $key => $item) {\n $result = $callback($item, $key);\n\n $newArray = \\array_merge_recursive($array, (array) $result);\n }\n\n return $newArray;\n }", "title": "" }, { "docid": "841228bfa82ee5c0e06bb47e1a019f4a", "score": "0.6093024", "text": "public static function map(array $array, $method)\n {\n //used to make sure the method is valid\n if (gettype($method)==='object') {\n foreach ($array as $key=>$value) {\n //assign return values to value of the array\n $array[$key] = call_user_func_array($method, [$key,$value]);\n }\n //return the modified array\n return $array;\n } else {\n //send error messages if the method is not valid\n system::add_error('ary::map()', 'missing_function', 'second parameter must be a function object');\n }\n }", "title": "" }, { "docid": "ecc328ac9858c56f27325b14197a0001", "score": "0.59155035", "text": "function array_values2($arr) {\n foreach (array_keys($arr) as $k)\n $ret[] = $arr[$k];\n\n return $ret;\n}", "title": "" }, { "docid": "dcc1335e83e23d1c4332900396c66e23", "score": "0.58675945", "text": "public static function apply(&$array, $callback) {\n\t\tarray_walk($array, $callback);\n\t}", "title": "" }, { "docid": "09c812786a34808cf3fe531be4ed9b5f", "score": "0.58668506", "text": "private function convertArray(array $array, callable $method, FieldInterface $field)\n {\n array_walk(\n $array,\n function (&$value) use ($method, $field) {\n $value = $method($value, $field, $field->getElementType());\n }\n );\n\n return $array;\n }", "title": "" }, { "docid": "741020ffb938071e4ba76a8333c89226", "score": "0.5857927", "text": "public function transform ( $array, $key_name, $value_name ){\n $result = array();\n foreach( $array as $val )\n $result[$val[$key_name]] = $val[$value_name];\n return $result;\n }", "title": "" }, { "docid": "98e99112ad14dcca3c88124ce0f35cbb", "score": "0.58521706", "text": "function array_map_recursive( $func, $array ) {\n $newArray = array();\n foreach ( $array as $key => $value ) {\n $newArray[$key] = is_array($value)\n ? array_map_recursive($func, $value) : $func($value);\n }\n return $newArray;\n}", "title": "" }, { "docid": "f5a2cc27e122b839cea7f1925605afd0", "score": "0.5837985", "text": "public static function map_assoc($array, $function = NULL) {\r\n\t\t$result = array();\n\t\tif ($function === null) {\n\t\t\tforeach ($array as $value) {\n\t\t\t\t$result[$value] = $value;\n\t\t\t}\n\t\t} elseif (is_callable($function)) {\n\t\t\tforeach ($array as $value) {\n\t\t\t\t$result[$value] = $function($value);\n\t\t\t}\n\t\t}else{\r\n\t\t\tthrow new \\Exception('$funcion must be a valid callback (must be callable)');\r\n\t\t}\r\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "8de0967a72daae3e2609050d78c108e2", "score": "0.5790998", "text": "public static function map($callback, $array)\r\n\t{\r\n\t\tif(is_object($array)){\r\n\t\t\tif($array instanceof \\Iterator || $array instanceof \\IteratorAggregate){\r\n\t\t\t\t$array = iterator_to_array($array);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(is_array($callback) && $callback[0] == '*'){\r\n\t\t\t$c = $callback[1];\r\n\t\t\tforeach($array as $k=>$v){\r\n\t\t\t\t$array[$k] = $v::$c();\r\n\t\t\t}\r\n\t\t\treturn $array;\r\n\t\t}\r\n\t\treturn array_map($callback,$array);\r\n\t}", "title": "" }, { "docid": "cdbec061a398e5b54626ea2725a805c3", "score": "0.5782306", "text": "function setValuesAsArray($newValue, $values, &$array) {\n $attributesArray = array();\n foreach($values as $value){\n $attributesArray[$value] = $array[$value];\n unset($array[$value]);\n }\n $array[$newValue] = $attributesArray;\n}", "title": "" }, { "docid": "186928254faf2a7bf0a727e53c65729e", "score": "0.5771715", "text": "public function apply(array &$data);", "title": "" }, { "docid": "c915b13ce636f6c53d63a2327ced68ef", "score": "0.56952775", "text": "public static function map(array $array, callable $callable): array\n {\n $inx = 0;\n return \\array_map(function ($value) use ($array, $callable, &$inx) {\n return $callable($value, $inx++, $array);\n }, $array);\n }", "title": "" }, { "docid": "e98420b08d88eb8cebbfa1f348254c90", "score": "0.5691524", "text": "public function map(callable $callback)\n {\n return array_map($callback, $this->array);\n }", "title": "" }, { "docid": "4725f42313736ff60b6f4b2b63ccc456", "score": "0.56700677", "text": "protected function applyArray($datas)\n {\n foreach ($datas as $key=>$value) {\n $datas[$key] = $this->apply($value);\n }\n return $datas;\n\n }", "title": "" }, { "docid": "6e05662313cdf58c0db032fed84199f0", "score": "0.5623008", "text": "function array_build($array, Closure $callback) {\n return Arr::build($array, $callback);\n }", "title": "" }, { "docid": "b72ac6f863e723607a19a61b71d32cf2", "score": "0.55818945", "text": "function array_map_deep(&$in_array, $in_func, $in_args = array(), $in_index = 1)\n {\n // fix people from messing up the index of the value\n if ($in_index < 1) {\n $in_index = 1;\n }\n foreach (array_keys($in_array) as $key) {\n // we need a reference, not a copy, normal foreach won't do\n $value =& $in_array[$key];\n // we need to copy args because we are doing\n // manipulation on it farther down\n $args = $in_args;\n if (is_array($value)) {\n Misc::array_map_deep($value, $in_func, $in_args, $in_index);\n } else {\n array_splice($args, $in_index - 1, $in_index - 1, $value);\n $value = call_user_func_array($in_func, $args);\n }\n }\n return $in_array;\n }", "title": "" }, { "docid": "82fd8dc3a02e6d5683a95bd4a706a922", "score": "0.5575992", "text": "protected function mapValues(array $values) {\n $output = [];\n foreach ($this->map() as $key => $value) {\n if (empty($values[$key])) {\n continue;\n }\n $output[$value] = $values[$key];\n }\n return $output;\n }", "title": "" }, { "docid": "2ef204e5354e6000e020cc84790400a5", "score": "0.5563231", "text": "function array_unique_by($array, $callback)\n{\n $result = [];\n foreach($array as $value) {\n $key = $callback($value);\n $result[$key] = $value;\n }\n return array_values($result);\n}", "title": "" }, { "docid": "beff1d60e25895d4b1b8d808e8d5a1eb", "score": "0.5563128", "text": "public function map ($callback, $mythis = NULL) {\n $len = $this->length;\n $n = 0;\n $r = new PHECMA_Array ();\n\n while ($n < $len) {\n $v = $this->value[$n];\n if (! is_null($v)) {\n array_push($r->value, $callback($v, $n, $this));\n }\n ++$n;\n }\n\n return $r;\n }", "title": "" }, { "docid": "b41e0e75df456c411e20f348e4c5c543", "score": "0.5529217", "text": "public static function map($array, $from, $to, $group = null)\n {\n $result = [];\n foreach ($array as $element) {\n $key = static::getValue($element, $from);\n $value = static::getValue($element, $to);\n if ($group !== null) {\n $result[static::getValue($element, $group)][$key] = $value;\n } else {\n $result[$key] = $value;\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "965fb021c393374440d0e4502478cc6b", "score": "0.5525358", "text": "function polje_kvadrata($array1){\n for($i=0;$i<count($array1);$i++){\n $array1[$i]=$array1[$i]*$array1[$i];\n \n }\n return $array1;\n}", "title": "" }, { "docid": "9571c189d9a6a9b13201500cb325ed03", "score": "0.5452649", "text": "public function mapKeys(array $array): array;", "title": "" }, { "docid": "56e9426ce3dc5f049711ff9141333dbb", "score": "0.54488856", "text": "public function transform(array &$dataSet);", "title": "" }, { "docid": "177a4fbd42b33ddbaa12a2dce2fea111", "score": "0.543361", "text": "public static function map_recursive($callback, $array, $keys = NULL)\r\n\t{\r\n\t\tforeach ($array as $key => $val)\r\n\t\t{\r\n\t\t\tif (self::is_array($val))\r\n\t\t\t{\r\n\t\t\t\t$array[$key] = Arr::map($callback, $array[$key]);\r\n\t\t\t}\r\n\t\t\telseif ( ! is_array($keys) or in_array($key, $keys))\r\n\t\t\t{\r\n\t\t\t\t//Removed kohana array of callback support, its stupid... use closures\r\n\t\t\t\t$array[$key] = call_user_func($callback, $array[$key]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $array;\r\n\t}", "title": "" }, { "docid": "a7e458370c347eaf612465be04d598ff", "score": "0.5431359", "text": "public static function map($callbacks, $array, $keys = NULL)\n\t{\n\t\tforeach ($array AS $key => $val)\n\t\t{\n\t\t\tif (is_array($val))\n\t\t\t{\n\t\t\t\t$array[$key] = Helper_Array::map($callbacks, $array[$key]);\n\t\t\t}\n\t\t\telseif ( ! is_array($keys) OR in_array($key, $keys))\n\t\t\t{\n\t\t\t\tif (is_array($callbacks))\n\t\t\t\t{\n\t\t\t\t\tforeach ($callbacks AS $cb)\n\t\t\t\t\t{\n\t\t\t\t\t\t$array[$key] = call_user_func($cb, $array[$key]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$array[$key] = call_user_func($callbacks, $array[$key]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "d899aa59e19bef953c7df0868bfc6e83", "score": "0.5417866", "text": "protected function recursiveChangeKey(array $array, $function = self::CAMEL_CASE)\n {\n $changedArray = [];\n foreach ($array as $key => $value) {\n if (is_array($value)) {\n $changedArray[$function($key)] = $this->recursiveChangeKey($value, $function);\n } else {\n $changedArray[$function($key)] = $value;\n }\n }\n return $changedArray;\n }", "title": "" }, { "docid": "6e1ec18843371d46ff30cd491a285df8", "score": "0.53816885", "text": "function array_fill_keys($keys, $value)\n\t{\n\t\t$array = array();\n\n\t\tforeach ($keys as $key)\n\t\t{\n\t\t\t$array[$key] = $value;\n\t\t}\n\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "1ee63794d92fdac61da4e9f7c691f3bf", "score": "0.537803", "text": "function array_fill_keys($keys, $value) {\n\t\t$res = array();\n\t\tforeach($keys as $k) {\n\t\t\t$res[$k] = $value;\n\t\t}\n\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "e79dd394f184f8c5a6ef04ada61bb7ab", "score": "0.53739244", "text": "function flatten_array($array) {\n\t\t$output = array(); \n\n\t\t// Push all $val onto $output. \n\t\tarray_walk_recursive($array, create_function('$val, $key, $obj', 'array_push($obj, $val);'), &$output); \n\n\t\t// Printing \n\t\t// print_r($output); \n\t\treturn $output;\n}", "title": "" }, { "docid": "daee1cab291e4a2f93e8a769bf2ceb0d", "score": "0.5346137", "text": "function arraySelect(array $arr, callable $cb) {\n\t$newArr = [];\n\tforeach ($arr as $k => $v) {\n\t\tif( $cb($v, $k, $arr) ) {\n\t\t\t$newArr[$k] = $v;\n\t\t}\n\t}\n\treturn $newArr;\n}", "title": "" }, { "docid": "79ba6e652d4ffd2035309e738b385dad", "score": "0.530646", "text": "public static function arrayFilterRecursive(array $source, $fn)\n {\n $result = [];\n foreach ($source as $key => $value) {\n if (is_array($value)) {\n $result[$key] = static::arrayFilterRecursive($value, $fn);\n continue;\n }\n if ($fn($key, $value)) {\n $result[$key] = $value; // KEEP\n continue;\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "177049bd50518edb7a1f97160173805c", "score": "0.53017724", "text": "public function map(callable $mapper): self{\n //return new MagicalArray( array_map($mapper, $this->array) );\n $arr = [];\n $is_assoc = ArrayHelper::is_assoc($this->array);\n foreach($this as $key=>$value) {\n if($is_assoc)\n $arr[$key] = $mapper($value, $key);\n else\n $arr[] = $mapper($value, $key);\n }\n\n return new MagicalArray($arr, $this->default);\n }", "title": "" }, { "docid": "194a92133403bc8802770ec31e7f23a2", "score": "0.5295985", "text": "function indexedMap(object $f2, array $arr): array\n\t{\n\t\t$results = [];\n\t\tforeach ($arr as $key => $val) {\n\t\t\t$results[$key] = $f2($val, $key); // argument order according to JavaScript's `Array.prototype.map`\n\t\t}\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "0af26d55356626389aeaeb24fb4bdcd9", "score": "0.52926", "text": "function a_t($array)\r\n{\r\n $r=array();\r\n foreach($array as $k1=>$ia) {\r\n foreach($ia as $k2=>$v) {\r\n $r[$k2][$k1]=$v;\r\n }\r\n }\r\n return $r;\r\n}", "title": "" }, { "docid": "a063c1cfe8849241189082f1902b7615", "score": "0.5285694", "text": "function ArrayWrap ($arr, $prefix, $suffix) {\n\tarray_walk ($arr, 'PrefixItem', $prefix);\n\tarray_walk ($arr, 'SuffixItem', $suffix);\n\treturn $arr;\n}", "title": "" }, { "docid": "c8417203e75e5cc56b0a06275441a770", "score": "0.52853465", "text": "function rearrange($arr){\n foreach($arr as $key => $all){\n foreach($all as $i => $val){\n $new[$i][$key] = $val; \n } \n }\n return $new;\n }", "title": "" }, { "docid": "e79e12888d9c3f898c6579d696ed26f8", "score": "0.52724665", "text": "function push_(array $array, array $values): array\n{\n foreach ($values as $value) {\n $array[] = $value;\n }\n\n return $array;\n}", "title": "" }, { "docid": "47fd7f50a1c1f268f76a651d8147a46a", "score": "0.5261856", "text": "public function arrayValues()\n {\n $oldArray = $this->value;\n $this->setValue(array());\n array_walk_recursive($oldArray,\n function($value, $key)\n {\n $this->value[] = $value;\n }\n );\n return $this;\n }", "title": "" }, { "docid": "d41fd63e7512bf42e8269143b83faf77", "score": "0.52599335", "text": "private function convertArrayKeyCaseRecursively($array, $callback)\n\t{\n\t\tforeach ($array as $key => $value) {\n\t\t\tif (is_array($value)) {\n\t\t\t\t//\tSearch for next depth\n\t\t\t\t$array[$key] = $this->convertArrayKeyCaseRecursively($value, $callback);\n\t\t\t}\n\n\t\t\tif (is_string($key)) {\n\t\t\t\t$converted_key = $callback($key);\n\n\t\t\t\tif ($key != $converted_key) {\n\t\t\t\t\t$array[$converted_key] = $array[$key];\n\t\t\t\t\tunset($array[$key]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "da6538b3b91a10dd3f15d5b427ffbc2b", "score": "0.52524656", "text": "function ilib_recursive_array_map($func, $arr)\n{\n $result = array();\n do {\n $key = key($arr);\n if (empty($arr)) {\n $result = $arr;\n } elseif (is_array(current($arr))) {\n $result[$key] = ilib_recursive_array_map($func, $arr[$key]);\n } else {\n $result[$key] = $func(current($arr));\n }\n } while (next($arr) !== false);\n return $result;\n}", "title": "" }, { "docid": "44514a7c11ea17ce57ffa283ad0f86a2", "score": "0.5230788", "text": "protected function mutateAttributeForArray($key, $value)\n {\n $value = $this->mutateAttribute($key, $value);\n\n return $value instanceof Arrayable ? $value->toArray() : $value;\n }", "title": "" }, { "docid": "d9d2fa0a9154095d068bd00196bb0504", "score": "0.52284366", "text": "function filter(array $source, $fn) {\n\t$result = array();\n\tforeach ($source as $key => $value) {\n\t\tif ($fn($value)) {\n\t\t\t$result[$key] = $value; //keep item if true\n\t\t}\n\t}\n\treturn $result;\n}", "title": "" }, { "docid": "981baf685ef119dfdb6b71eeb04398d9", "score": "0.522166", "text": "public function transform($value): array;", "title": "" }, { "docid": "46f40152d75579df80126c325118b6b6", "score": "0.5217522", "text": "public function newarr($key, $value=array()) {\n\t\t$this->arrs[$key] = new Attributer;\n\t\tforeach($value as $k=>$v)\n\t\t\t$this->arrs[$key]->put($k,$v);\n\t}", "title": "" }, { "docid": "f7e0f03532085d351abd6e3f1052ccea", "score": "0.5207299", "text": "function a_t($array)\n{\n $r=array();\n foreach($array as $k1=>$ia) {\n foreach($ia as $k2=>$v) {\n $r[$k2][$k1]=$v;\n }\n }\n return $r;\n}", "title": "" }, { "docid": "b35e69a0f9adf808592d9c30e93a9c07", "score": "0.5190719", "text": "public static function map(array $array, $columnValue, $columnKey=null) {\n\t\t$newArray = array();\n\n\t\tforeach($array as $value) {\n\t\t\tif(array_key_exists($columnValue, $value)) {\n\t\t\t\t$val = $value[$columnValue];\n\n\t\t\t\tif(is_null($columnKey)) {\n\t\t\t\t\t$newArray[] = $val;\n\t\t\t\t} elseif(array_key_exists($columnKey, $value)) {\n\t\t\t\t\t$key = $value[$columnKey];\n\t\t\t\t\t$newArray[$key] = $val;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $newArray;\n\t}", "title": "" }, { "docid": "8dd78eaddfac2bae0cab68a2310b881d", "score": "0.5182747", "text": "public static function array_reduce(array $array, string $function, $initial = null)\n {\n $accumulator = $initial;\n foreach ($array as $value) {\n $accumulator = $function($accumulator, $value);\n }\n return $accumulator;\n }", "title": "" }, { "docid": "7a31b52c3388a4007981da6e2ed3b48c", "score": "0.5180105", "text": "public static function mergeReplace() {\n\t\t$args = func_get_args();\n\n\t\t$array = $args[0];\n\t\tfor ($i = 1; $i < count($args); $i++) {\n\t\t\tforeach ($args[$i] as $key => $value) {\n\t\t\t\tif (is_array($value) && isset($array[$key])) {\n\t\t\t\t\t$array[$key] = self::mergeReplace($array[$key], $value);\n\t\t\t\t} else {\n\t\t\t\t\t$array[$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "eb07fc4b8fcf3eab7061077a81757c99", "score": "0.51667327", "text": "protected function convert_array($array_elements){\n return array_map(function($object){\n return $object;\n },$array_elements->toArray());\n \n\n }", "title": "" }, { "docid": "bbb6a299a472dca2e985d0eb41ea7f17", "score": "0.51562464", "text": "protected function recurse(array $array, callable $callback) {\n foreach ($array as $key => $value) {\n if (is_array($array[$key])) {\n $array[$key] = $this->recurse($array[$key], $callback);\n } else {\n $array[$key] = call_user_func($callback, $array[$key]);\n }\n }\n return $array;\n }", "title": "" }, { "docid": "3ef9cb71eaed5c97daf9f54c6a48d658", "score": "0.5154532", "text": "function stk_array_walk_keys(&$array, $callback)\n{\n\tif (!is_callable($callback))\n\t{\n\t\treturn;\n\t}\n\n\t$tmp_array = array();\n\tforeach ($array as $key => $null)\n\t{\n\t\t$walked_key = call_user_func($callback, $key);\n\t\t$tmp_array[$walked_key] = $array[$key];\n\t\tunset($array[$key]);\n\t}\n\t$array = $tmp_array;\n}", "title": "" }, { "docid": "2573aadd00feab44e906657703f02669", "score": "0.5154176", "text": "public static function unshift( array & $array, $key, $val)\r\n\t{\r\n\t\t$array = array_reverse($array, TRUE);\r\n\t\t$array[$key] = $val;\r\n\t\t$array = array_reverse($array, TRUE);\r\n\r\n\t\treturn $array;\r\n\t}", "title": "" }, { "docid": "16a404869bea6d9b4aaf378d36317944", "score": "0.5151741", "text": "function mixup($arr) {\n\t$length = count($arr) - 1;\n\tforeach($arr as $key => $value) {\n\t\t$switch_with = numBetween(1,$length);\n\t\t$temp = $arr[$switch_with];\n\t\t$arr[$switch_with] = $arr[$key];\n\t\t$arr[$key] = $temp;\n\t}\n\treturn $arr;\n}", "title": "" }, { "docid": "52850db1575d2862e7e324d815530bb6", "score": "0.5133446", "text": "function array_collapse($array)\n {\n $results = array();\n\n foreach ($array as $values) {\n if (!is_array($values)) {\n continue;\n }\n\n $results = array_merge($results, $values);\n }\n\n return $results;\n }", "title": "" }, { "docid": "3b387179a0f480e772adb20f89b87d07", "score": "0.5131651", "text": "function array_divide($array)\n{\n\treturn array(array_keys($array), array_values($array));\n}", "title": "" }, { "docid": "c3d4c835e3aa7603f4c544cd08df437a", "score": "0.5127949", "text": "function array_divide($array)\n {\n return array(array_keys($array), array_values($array));\n }", "title": "" }, { "docid": "275667b9b3ad1e1c8196fd12b917ca31", "score": "0.5127218", "text": "private static function multiArrayKeyReset($array)\n {\n $array = array_values($array);\n foreach ($array as $key => $array_2) {\n $array[$key] = array_values($array_2);\n }\n return $array;\n }", "title": "" }, { "docid": "957da90d611f5f6dd9473d6332fc2469", "score": "0.51237655", "text": "public static function tapArray( Closure $callback, array $args = [] )\n\t{\n\t\treturn $callback( ... $args );\n\t}", "title": "" }, { "docid": "49dc764646c9151cc8e68a0dff3b0b97", "score": "0.5121255", "text": "function aurum_hook_merge_array_value( $value, $key = '' ) {\n\t$returnable = new Aurum_WP_Hook_Value();\n\t$returnable->array_value = $value;\n\t$returnable->array_key = $key;\n\t\n\treturn array( $returnable, 'mergeArrayValue' );\n}", "title": "" }, { "docid": "892330eb8ad0909d553ea30ef2110638", "score": "0.51160836", "text": "public static function unshift( array & $array, $key, $val)\n\t{\n\t\t$array = array_reverse($array, TRUE);\n\t\t$array[$key] = $val;\n\t\t$array = array_reverse($array, TRUE);\n\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "5845950e42908aa94558f0f6bbdd6025", "score": "0.51138544", "text": "public function map(callable $callback)\n {\n return static::factory(array_map($callback, $this->data));\n }", "title": "" }, { "docid": "27a3ed2d7ad934301c45528715443523", "score": "0.5108043", "text": "protected static function arrayFromKeys(array $keys, $value)\n {\n $result = [];\n\n if (empty($keys)) {\n return $result;\n }\n\n $idx = array_shift($keys);\n\n if (empty($keys)) {\n $result[$idx] = $value;\n } else { \n $result[$idx] = self::arrayFromKeys($keys, $value); \n }\n\n return $result;\n }", "title": "" }, { "docid": "3de4da5d7811dc6598676e36bad923ef", "score": "0.50964856", "text": "public static function values($array) {\n\t\treturn array_values($array);\n\t}", "title": "" }, { "docid": "ac1364549a08094bbb6f988ea8249ff8", "score": "0.5069313", "text": "function getMaps(&$arrayToPopulate, $dataArray) \n{\n foreach ($dataArray as $key => $value) {\n $mapSum = 0;\n foreach ($dataArray[$key] as $subKey => $subValue) {\n $mapSum = $mapSum + $subValue[9];\n }\n $mapSum = $mapSum / 50;\n $arrayToPopulate[] = array($key, $mapSum);\n }\n}", "title": "" }, { "docid": "9ce0ec05625b118a1460fe58d9395d8d", "score": "0.50584126", "text": "public static function to_plain_array($array)\n\t\t{\n\t\t\t$result = array();\n\t\t\t\n\t\t\t$array = self::to_array($array, true);\n\t\t\t\n\t\t\tforeach($array as $key => $value) {\n\t\t\t\t$item = self::to_array($value, true);\n\t\t\t\t\n\t\t\t\tif(is_array($item))\n\t\t\t\t\t$result = array_merge($result, $item);\n\t\t\t\telse\n\t\t\t\t\t$result[$key] = $value;\n\t\t\t}\n\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "0f8134d68b6e59d215bc861d40740701", "score": "0.5056799", "text": "public function filter(callable $predicate): self{\n //return new MagicalArray( array_filter($this->array, $predicate) );\n $arr = [];\n $is_assoc = ArrayHelper::is_assoc($this->array);\n foreach ($this as $key=>$value) {\n if ($predicate($value, $key)) {\n if($is_assoc)\n $arr[$key] = $value;\n else\n $arr[] = $value;\n }\n }\n\n return new MagicalArray($arr, $this->default);\n }", "title": "" }, { "docid": "b2db4a880334a4236f8a47425c16cb86", "score": "0.5053516", "text": "function array_set(&$array, $key, $value) {\n return Arr::set($array, $key, $value);\n }", "title": "" }, { "docid": "92c0298341c360a42509532b7a029286", "score": "0.5051777", "text": "protected function wrapValuesForDataProvider(array $values)\n {\n return array_map(function($value) { return [$value]; }, $values);\n }", "title": "" }, { "docid": "7ff838fe3d10df6198e4ef4bc62880ad", "score": "0.5042607", "text": "public static function filter(array $array, $method)\n {\n //if the method is valid\n if (gettype($method)==='object') {\n $out = [];\n foreach ($array as $key=>$value) {\n //true if key and value satisfy the method\n if (call_user_func_array($method, [$key,$value])) {\n $out[$key] = $value;\n }\n }\n return $out;\n } else {\n //send error message if the given method is not valid\n system::add_error('ary::filter()', 'missing_function', 'second parameter must be a function object');\n }\n }", "title": "" }, { "docid": "2b851f4d939d943c74d4887d32bd4af3", "score": "0.50409645", "text": "protected function array_before($key, array $array, $new_key, $new_value)\n {\n if( !array_key_exists($key, $array) )\n {\n $array[$new_key] = $new_value;\n\n return $array;\n }\n\n $new = array();\n\n foreach ($array as $k => $v)\n {\n if ($k === $key)\n {\n $new[$new_key] = $new_value;\n }\n\n $new[$k] = $v;\n }\n\n return $new;\n }", "title": "" }, { "docid": "58ea903abc429f85cc6c006cdaea66ef", "score": "0.50334036", "text": "public function processArray($array, $key_name) {\n\t\tif (!is_array($array)) return false;\n\n\t\t$processed_array = [];\n\t\tforeach($array as $val) {\n\t\t\tif (isset($val[$key_name])) {\n\t\t\t\t$processed_array[$val[$key_name]] = $val;\n\t\t\t\tunset($processed_array[$val[$key_name]][$key_name]);\n\t\t\t}\n\t\t}\n\t\treturn $processed_array;\n\t}", "title": "" }, { "docid": "d5d58564725771f08ed7d7a95097734b", "score": "0.5033097", "text": "public function getArrayCopy()\n\t{\n\t\treturn array_map( array( $this, 'base_filter' ), parent::getArrayCopy() );\n\t}", "title": "" }, { "docid": "8ea36c448f80c90e0143114a0f4e430a", "score": "0.5031811", "text": "public abstract function getArrayCopy();", "title": "" }, { "docid": "3ecba9aac04be203218b90c8a9160aa0", "score": "0.50310963", "text": "public function getArrayCopy();", "title": "" }, { "docid": "3ecba9aac04be203218b90c8a9160aa0", "score": "0.50310963", "text": "public function getArrayCopy();", "title": "" }, { "docid": "a28b8abe28728b4ed9a7746baab19272", "score": "0.50233465", "text": "function acf_sanitize_files_value_array( $array, $sanitize_function ) {\n\tif ( ! function_exists( $sanitize_function ) ) {\n\t\treturn $array;\n\t}\n\n\tif ( ! is_array( $array ) ) {\n\t\treturn $sanitize_function( $array );\n\t}\n\n\tforeach ( $array as $key => $value ) {\n\t\tif ( is_array( $value ) ) {\n\t\t\t$array[ $key ] = acf_sanitize_files_value_array( $value, $sanitize_function );\n\t\t} else {\n\t\t\t$array[ $key ] = $sanitize_function( $value );\n\t\t}\n\t}\n\n\treturn $array;\n}", "title": "" }, { "docid": "048099198890f4d7072f3b075f1cf31d", "score": "0.49937093", "text": "function array_entries( array $arr ): array\n {\n $new_array = [];\n \n foreach( $arr as $key => $value ) {\n $new_array[] = [$key, $value];\n }\n \n return $new_array;\n }", "title": "" }, { "docid": "a540821dd528e0f1817442a99a70fd58", "score": "0.4984002", "text": "function array_add($array, $key, $value) {\n return Arr::add($array, $key, $value);\n }", "title": "" }, { "docid": "067d8ff897346efcc18e41af0d11c16d", "score": "0.49839336", "text": "function array_from_entries( array $arr ): array\n {\n $new_array = [];\n \n foreach( $arr as $entry ) {\n [$key, $value] = $entry;\n $new_array[$key] = $value;\n }\n \n return $new_array;\n }", "title": "" }, { "docid": "b87a0424cd1fb2e861c8d767c06acc37", "score": "0.49807847", "text": "function array_value($array, $key) {\n if (func_num_args() == 2) {\n return @$array[$key];\n }\n else {\n $keys = func_get_args();\n array_shift($keys); // get rid of the first element\n foreach ($keys as $key) {\n $array = @$array[$key];\n }\n return $array;\n }\n}", "title": "" }, { "docid": "1ebd524b8c528eb7ce3287e0dbab9e3f", "score": "0.49791905", "text": "protected function array_after($key, array $array, $new_key, $new_value)\n {\n if( !array_key_exists($key, $array) )\n {\n $array[$new_key] = $new_value;\n\n return $array;\n }\n\n $new = array();\n\n foreach ($array as $k => $value)\n {\n $new[$k] = $value;\n\n if ($k === $key) {\n $new[$new_key] = $new_value;\n }\n }\n\n return $new;\n }", "title": "" }, { "docid": "408a04f9cc1e7e2669566111de94de91", "score": "0.4978027", "text": "function array_only_clean($array, $keys)\n{\n $keys = is_array($keys) ? $keys : func_get_args();\n\n $results = [];\n\n foreach ($keys as $key) {\n $value = data_get($array, $key);\n if (!is_null($value))\n Arr::set($results, $key, $value);\n }\n\n return $results;\n}", "title": "" }, { "docid": "b221b710f6d5d48f85d5dc025b2b8285", "score": "0.49679807", "text": "public static function values(array $array): array\n {\n return \\array_values($array);\n }", "title": "" }, { "docid": "e3ae49025047af822321f7b744fbfbb9", "score": "0.49662888", "text": "function _bpt_array_column($array, $field){\r\n $new_arr = array();\r\n\r\n foreach($array as $value){\r\n $new_arr[] = $value[$field];\r\n }\r\n\r\n return $new_arr;\r\n }", "title": "" }, { "docid": "23b8c03662d4fcbeaa817458948fe3c1", "score": "0.49657497", "text": "protected function mutateAttributeForArray(string $key, $value)\n {\n $value = $this->mutateAttribute($key, $value);\n\n return $value instanceof Arrayable ? $value->toArray() : $value;\n }", "title": "" }, { "docid": "bbd51537591d6d31b2330444eaa34f05", "score": "0.49651405", "text": "public static function mapRecursive(callable $func, array $array)\n {\n return filter_var($array, \\FILTER_CALLBACK, ['options' => $func]);\n }", "title": "" }, { "docid": "5ab1918cc9d9e5e9a95063545e0e291c", "score": "0.49537182", "text": "function array_inflate($result, $names, $value)\n\t{\n\t\tif (empty($names)) return $value;\n\t\t\n\t\tif (!array_key_exists($names[0], $result))\n\t\t\t$result[$names[0]] = $this->array_inflate(array(), array_slice($names, 1), $value);\n\t\telse\n\t\t\t$result[$names[0]] = $this->array_inflate($result[$names[0]], array_slice($names, 1), $value);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "ab6873a721f486d63a1c6f915c300db7", "score": "0.4944821", "text": "protected function swapFunctional($array, $firstKey, $secondKey)\n {\n $temp = $array[$firstKey];\n $array[$firstKey] = $array[$secondKey];\n $array[$secondKey] = $temp;\n\n return $array;\n }", "title": "" }, { "docid": "7c4f0a9cd3c55754e6c492bbde5b9a34", "score": "0.49439317", "text": "public static function map(array $data, string $path, callable $function): array\n {\n $values = (array)static::extract($data, $path);\n\n return array_map($function, $values);\n }", "title": "" }, { "docid": "7b36c121638a5c3fd2c487219b515d0e", "score": "0.49436173", "text": "function map(callable $fn)\n{\n return function (array $list) use ($fn) {\n return \\array_map($fn, $list);\n };\n}", "title": "" }, { "docid": "742c964b6d0f581968ee06a58eb467cc", "score": "0.49431008", "text": "function array_normalize(array $array): array\n{\n $normalizer = function($inbound) use (&$normalizer)\n {\n if ( ! is_array($inbound) ) {\n return $inbound;\n }\n\n $outbound = [];\n\n foreach ( $inbound as $key => $value ) {\n if ( false !== strpos($key, '.') ) {\n $outbound = array_extend($outbound, $key, $value);\n continue;\n }\n\n $outbound[$key] = $normalizer($value);\n }\n\n return $outbound;\n };\n\n return $normalizer($array);\n}", "title": "" }, { "docid": "8ce62de6788da433b7fb10db1a8e7a5c", "score": "0.49423665", "text": "private function expand(array $values): array\n {\n $primaryKey = $this->reducePrimaryKey($values);\n\n foreach ($this->properties as $key => $callback) {\n // Do not overwrite fetched results.\n // @todo should we raise an error here?\n if (!\\array_key_exists($key, $values)) {\n\n // In theory, this should be checked prior to getting in here.\n // @todo this should be done prior to iteration.\n if ($callback instanceof LazyProperty) {\n $value = $callback;\n } else if ($this->callableNeedsWrapper($callback)) {\n if (!\\is_callable($callback)) {\n throw new \\InvalidArgumentException(\\sprintf(\n \"Lazy collection initializer for property '%s' must be a callable, '%s' given\",\n $key, \\gettype($callback)\n ));\n }\n $value = new DefaultLazyCollection(static function () use ($callback, $primaryKey): iterable {\n return \\call_user_func($callback, $primaryKey);\n });\n } else {\n $value = \\call_user_func($callback, $primaryKey);\n }\n $values[$key] = $value;\n }\n }\n\n return $values;\n }", "title": "" }, { "docid": "7096050cfc029f4a872fd1d812e1ac81", "score": "0.49422136", "text": "function rem_array_filter($array)\n{\n $array2 = array();\n $array2_counter = 0;\n for($j=0;$j<count($array);$j++) {\n $row = each($array);\n if (odd($row[\"key\"])) {\n $array2[$array2_counter] = $row[\"value\"];\n $array2_counter++;\n } // if\n } // for\n return $array2;\n}", "title": "" }, { "docid": "759576c80876ada0ff412f103883865e", "score": "0.49268207", "text": "function array_add($array, $key, $value)\n {\n if (is_null(array_get($array, $key))) {\n array_set($array, $key, $value);\n }\n\n return $array;\n }", "title": "" }, { "docid": "99f21e1ea3d821635b11b36e9bc694e0", "score": "0.49238014", "text": "function array_change_key_case_rec( $input, $case=CASE_LOWER ) {\n if (!is_array($input))\n return $input;\n\n $newArray = array_change_key_case($input, $case);\n\n foreach ($newArray as $key => $array){\n if (is_array($array)){\n $newArray[$key] = array_change_key_case_rec($array, $case);\n }\n }\n return $newArray;\n }", "title": "" }, { "docid": "c1eacbfd64974f527d2e88643d1d4ddf", "score": "0.49212587", "text": "function array_pair($array,$value,$key = null)\n\t{\n\t\tif($array instanceof \\Illuminate\\Database\\Eloquent\\Collection )\n\t\t{\n\t\t\t$array = $array->toArray();\n\t\t}\n\n\t\t// Convert objects to array\n\t\t$array = (array) $array;\n\n\t\tif(empty($array)) return $array;\n\n\t\t$values = array_fetch($array,$value);\n\n\t\tif(!is_null($key))\n\t\t{\n\t\t\t$keys = array_fetch($array,$key);\n\t\t\t\n\t\t\treturn array_combine($keys,$values);\n\t\t}\n\n\t\treturn $values;\n\t}", "title": "" }, { "docid": "75e3927eedb07d10a3f3c0f65c79aaf0", "score": "0.49141777", "text": "function array_pick($array, $keys)\n{\n $keys = is_array($keys) ? $keys : func_get_args();\n\n $results = [];\n\n foreach ($keys as $key) {\n Arr::set($results, $key, data_get($array, $key));\n }\n\n return $results;\n}", "title": "" }, { "docid": "10b3b9efd2603517abb7b72ee8fa3729", "score": "0.49124864", "text": "protected function mutateAttributeForArray($key, $value)\n {\n if ($this->isClassCastable($key)) {\n $value = $this->getClassCastableAttributeValue($key, $value);\n } elseif (isset(static::$getAttributeMutatorCache[get_class($this)][$key]) &&\n static::$getAttributeMutatorCache[get_class($this)][$key] === true) {\n $value = $this->mutateAttributeMarkedAttribute($key, $value);\n\n $value = $value instanceof DateTimeInterface\n ? $this->serializeDate($value)\n : $value;\n } else {\n $value = $this->mutateAttribute($key, $value);\n }\n\n return $value instanceof Arrayable ? $value->toArray() : $value;\n }", "title": "" }, { "docid": "7839dce4c6185b79b04b365988f9a5d1", "score": "0.49111012", "text": "public function doRange( $arr ) {\n\t\t\t$newarr = array();\n\t\t\tif ( is_array($arr) && count($arr)>0 ) {\n\t\t\t\tforeach ($arr as $k => $v) {\n\t\t\t\t\t$newarr[ $v ] = $v;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $newarr;\n\t\t}", "title": "" } ]
1fc09ca56a5ba6249e7cb58825c0bf80
Gets Object Instance with Json data filled in
[ { "docid": "e816dd8d8ad2d43b629895811367ea32", "score": "0.60136914", "text": "public static function getObject()\n {\n return new ItemList(self::getJson());\n }", "title": "" } ]
[ { "docid": "9aa769093642a84804490803e9ac096a", "score": "0.6844628", "text": "public function __construct() {\n $this->json= JsonFactory::create();\n }", "title": "" }, { "docid": "d300bc965a744b278929c41f344a8a3c", "score": "0.66437626", "text": "public function getData(): object\n {\n // Mock data so init.php can run\n if (defined('RUN_GAME') && constant('RUN_GAME') === 1) {\n $this->data = '{\"some\": \"Example JSON\"}';\n }\n\n return json_decode($this->data);\n }", "title": "" }, { "docid": "9bc893079bb94498ad20dab49b318cbd", "score": "0.6619898", "text": "public function fromJson($data);", "title": "" }, { "docid": "47d9961d35d293e1d7e0e42c63143e7a", "score": "0.6540338", "text": "public function getData(){\n\t\t$object = new stdClass();\n\t\t$object->id = $this->id;\n\t\t$object->name = $this->name;\n\t\t$object->description = $this->description;\n\t\treturn $object;\n\t}", "title": "" }, { "docid": "40856791621281ff18cd47790658e503", "score": "0.64814436", "text": "public function __construct($obj){\n JsonResource::__construct($obj);\n }", "title": "" }, { "docid": "fc51cad83d42682b1ec94d28f01d13b8", "score": "0.6318278", "text": "public function getObject();", "title": "" }, { "docid": "a0d0c6b54aadf94d39d594bf68a83789", "score": "0.62237495", "text": "abstract public function jsonInstantiationDataProvider();", "title": "" }, { "docid": "a35dd6b5aaccac993f9e07cfc42af9c7", "score": "0.62151206", "text": "public function createJson() \n {\n $object = new \\stdClass;\n\n foreach ($this->createKeys as $key) {\n if (!empty($this->$key)) {\n $object->$key = $this->$key;\n }\n }\n \n if (!empty($this->metadata)) {\n $object->metadata = new \\stdClass;\n foreach ($this->metadata as $key => $value) {\n $object->metadata->$key = $value;\n }\n }\n\n return $object;\n }", "title": "" }, { "docid": "dab42f8a9c91669e9944862feed7df88", "score": "0.61746454", "text": "private function asObject() {\n\t\t$data = new stdClass();\n\n\t\t$headObj = new stdClass();\n\t\tforeach ($this->head as $key => $value) \n\t\t{\n\t\t\t$headObj->$key = $value;\n\t\t}\n\t\t$data->head = $headObj;\n\n\t\t$bodyObj = new stdClass();\n\t\tforeach ($this->body as $key => $value) \n\t\t{\n\t\t\t$bodyObj->$key = $value;\n\t\t}\n\t\t$data->body = $bodyObj;\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "480d892b8ced164954929446861922e5", "score": "0.6143258", "text": "public static function getObject()\n {\n return new \\stdClass;\n }", "title": "" }, { "docid": "4a31cfd8ccce0efb29ad3517c3687f2b", "score": "0.60981786", "text": "function __construct($json = null){\n $this->loadFromJson($json);\n }", "title": "" }, { "docid": "3df75446fec22d581bb3da57164fda26", "score": "0.6077869", "text": "function useJsonClass()\n\t{\n $this->_json = new JSON;\n\t}", "title": "" }, { "docid": "3586dbcf31f2128a54185609cb817792", "score": "0.6057356", "text": "public function getJsonObject(): \\stdClass {\n return json_decode($this->getJson());\n }", "title": "" }, { "docid": "c5a8350088132bd7356b6b1da1c38423", "score": "0.5995899", "text": "public function get() {\n\n // Only get if there is a type and an id.\n if ($this->type && $this->id) {\n\n // Get the object from the server.\n $this->server->get($this->endpoint('get'), NULL, FALSE);\n\n // Get the response from the server.\n if ($resp = $this->getResponse()) {\n $this->update($resp);\n }\n else {\n\n // Set to NULL since this object doesn't exist.\n $this->id = NULL;\n }\n }\n\n // Allow chaining.\n return $this;\n }", "title": "" }, { "docid": "16aa80df06b80cc60d026bab4282b890", "score": "0.5994737", "text": "public function getObj();", "title": "" }, { "docid": "dbf96a913be8083e196a99b016e2f397", "score": "0.59915435", "text": "public static function get_singleton() \r\n { \r\n if (!self::$instance) \r\n { \r\n self::$instance = new json(); \r\n } \r\n\r\n return self::$instance; \r\n }", "title": "" }, { "docid": "23a93edcc03c0f0900a692b1c84a8357", "score": "0.59552085", "text": "public function getObject(){\n $obj = [];\n $fields = $this->fields();\n\n foreach($fields as $field){\n $obj[$field] = $this->$field;\n\n }//end foreach\n\n return (object)$obj;\n }", "title": "" }, { "docid": "22c944415604e68b988c1af5242c29e4", "score": "0.59507614", "text": "function getObject() {\n\t\treturn $this->obj;\n\t}", "title": "" }, { "docid": "e7201b4159320ddf1b50d1d0b27a5b7a", "score": "0.59477025", "text": "abstract public function getObject();", "title": "" }, { "docid": "775035e3080bd1df71558614875cb3c4", "score": "0.59446627", "text": "public static function constructFromJson(object $json) : IDBConn;", "title": "" }, { "docid": "400ba15ca203c90edcad20ff684aac11", "score": "0.5917948", "text": "public function __construct($jsonData) {\n $petObj = parent::assignValues($this, $jsonData);\n $petObj->stats = $this->getPetStats($petObj->stats);\n\n return $petObj;\n }", "title": "" }, { "docid": "0d6e76bad7c450eb628fed8f350a62ce", "score": "0.5909853", "text": "public function __construct($jsonData) {\n $itemObj = parent::assignValues($this, $jsonData, null, $default = 'remove');\n if (isset($itemObj->itemSpells)) $itemObj->itemSpells = $this->getItemSpells($itemObj->itemSpells);\n if (isset($itemObj->itemSource)) $itemObj->itemSource = $this->getItemSource($itemObj->itemSource);\n if (isset($itemObj->bonusSummary)) $itemObj->bonusSummary = $this->getBonusSummary($itemObj->bonusSummary);\n\n return $itemObj;\n }", "title": "" }, { "docid": "d5d6186d3ccd527348dd559991ad9d40", "score": "0.5904827", "text": "static function fromJson(object $json): self {\n\t\treturn new self(\n\t\t\tlimit: isset($json->limit) && is_int($json->limit) ? $json->limit : -1,\n\t\t\tpercentage: isset($json->percentage) && (is_float($json->percentage) || is_int($json->percentage)) ? $json->percentage : 0,\n\t\t\tthrottled: isset($json->throttled) && is_bool($json->throttled) ? $json->throttled : false,\n\t\t\tusage: isset($json->usage) && is_int($json->usage) ? $json->usage : 0\n\t\t);\n\t}", "title": "" }, { "docid": "4c699b2e9fcf3984cf556cbb12c5ff4c", "score": "0.5873009", "text": "protected function CreateObject() {\n return new stdClass();\n }", "title": "" }, { "docid": "f5efa774937a850ef8a1bc4cb56d268e", "score": "0.58612597", "text": "public function create($data) {\r\n\t\t$string = $data ['content'];\r\n\t\t\r\n\t\treturn new JsonModel ( array (\r\n\t\t\t\t\"content\" => $string \r\n\t\t) );\r\n\t}", "title": "" }, { "docid": "6432b19328ca61cb84e7a1049fb6dd64", "score": "0.58448815", "text": "protected function getJsonResponseAsObject()\n {\n return $this->getJsonResponse(false);\n }", "title": "" }, { "docid": "5f03e6379bb9b8a79e14393ff4cdb798", "score": "0.58425957", "text": "public static function getObject()\n {\n return new Invoice(self::getJson());\n }", "title": "" }, { "docid": "af00f86786e38c86c0d41d0153694199", "score": "0.58363616", "text": "public static function getObject()\n {\n return new CustomerInfo(self::getJson());\n }", "title": "" }, { "docid": "bf1c7d7c721f702670084631a151beb9", "score": "0.58354825", "text": "public function getItem() \r\n\t{\t\t\t\r\n\t\tstatic $instance;\r\n\t\tif($instance) return $instance; \r\n\t $item = $this->getTable();\r\n\t\t$params = json_decode($item->params);\t \t\t\t\t\r\n\t\t$item->load($this->_id);\t\t\t\r\n\t\t$item->params = new JObject();\r\n\t\t$item->params ->setProperties(JArrayHelper::fromObject($params));\r\n\t\t$instance = $item;\r\n\t\treturn $instance;\r\n\t}", "title": "" }, { "docid": "adf4eb314e3ee788f0df586e9c5bdb31", "score": "0.5831865", "text": "static function fromJson(object $json): self {\n\t\treturn new self(\n\t\t\tblockNumber: isset($json->blockNumber) && is_int($json->blockNumber) ? $json->blockNumber : 0,\n\t\t\tbranchNumber: isset($json->branchNumber) && is_int($json->branchNumber) ? $json->branchNumber : 0,\n\t\t\tlineNumber: isset($json->lineNumber) && is_int($json->lineNumber) ? $json->lineNumber : 0,\n\t\t\ttaken: isset($json->taken) && is_int($json->taken) ? $json->taken : 0,\n\t\t);\n\t}", "title": "" }, { "docid": "7aac56bcce7da99f1d3a058abfe3ad23", "score": "0.5823507", "text": "public function getObj()\n {\n return $this->obj instanceof QuoteRequestBuilder ? $this->obj->build() : $this->obj;\n }", "title": "" }, { "docid": "e160bcd5f4a25494e533e6758eb7ec7b", "score": "0.5816486", "text": "public function toObject(): \\stdClass\n {\n return json_decode($this->toJson());\n }", "title": "" }, { "docid": "4a7f4c399a68fb6e931410edd533015d", "score": "0.5809917", "text": "function getObject() {\n return $this->object;\n }", "title": "" }, { "docid": "4632defe74d8c4326c69de2cd09ffce2", "score": "0.5809813", "text": "public function getObject()\n {\n return $this;\n }", "title": "" }, { "docid": "6c1bccdf4cd559f3f7a037c223ee878a", "score": "0.579874", "text": "public function __construct(\\stdClass $json)\n {\n $this->json = $json;\n }", "title": "" }, { "docid": "07c835f00226b55871097719b9392f1c", "score": "0.5764196", "text": "public static function fromJson($json);", "title": "" }, { "docid": "a9ff8e26d7bd7febab7491691d21c763", "score": "0.57552904", "text": "public function jsonSerialize()\n {\n return $this->object;\n }", "title": "" }, { "docid": "87d728cabdb9892a07c9dfe49dcbf4b1", "score": "0.5741773", "text": "public function __construct($jsonData) {\n return parent::assignValues($this, $jsonData);\n }", "title": "" }, { "docid": "87d728cabdb9892a07c9dfe49dcbf4b1", "score": "0.5741773", "text": "public function __construct($jsonData) {\n return parent::assignValues($this, $jsonData);\n }", "title": "" }, { "docid": "0d035ed2982d510c2723518b9e526500", "score": "0.5740686", "text": "public static function from_json($json){\n\t\t$api_response = json_decode($json);\n\t\tif ( empty($api_response) || !is_object($api_response) ){\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t//Very, very basic validation.\n\t\t$valid = isset($api_response->version) && !empty($api_response->version) && isset($api_response->details_url) && !empty($api_response->details_url);\n\t\tif ( !$valid ){\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t$update = new self();\n\t\tforeach(get_object_vars($api_response) as $key => $value){\n\t\t\t$update->$key = $value;\n\t\t}\n\t\t\n\t\treturn $update;\n\t}", "title": "" }, { "docid": "9a23c01d54b4088e4ac920e1a45e90c2", "score": "0.5740236", "text": "public function __construct($json)\n {\n // Set JSON\n $this->json = $json;\n \n // Parse JSON into an associative array\n $this->result = json_decode($json, true);\n }", "title": "" }, { "docid": "920291ffeac5cfada5b4da5aff9246e8", "score": "0.5728441", "text": "function fromJSON($json)\n {\n }", "title": "" }, { "docid": "1380be08d96250469f2f2001c4625998", "score": "0.57240945", "text": "public function createJson()\n\t{\n\t\t$mockObject = $this->create($test, ['getRaw']);\n\n\t\t$this->assignMockCallbacks(\n\t\t\t$test,\n\t\t\t$mockObject,\n\t\t\t['getRaw' => [(is_callable([$test, 'mockInputGetRaw']) ? $test : $this), 'mockInputGetRaw']]\n\t\t);\n\n\t\treturn $mockObject;\n\t}", "title": "" }, { "docid": "52a37ad0c4e08efc1f53c6325b71a6c8", "score": "0.571639", "text": "function createDefaultJson() {\r\n $retObject = json_decode('{}');\r\n return $retObject;\r\n }", "title": "" }, { "docid": "812e4924917f177e20204d911b302128", "score": "0.5710911", "text": "protected abstract function make_object( \\stdClass $data );", "title": "" }, { "docid": "56a3d342ac9625a3ad676a3ea0723f75", "score": "0.5708182", "text": "public function load_json_object($t) {\n\n $this->id = $t->id;\n $this->in_reply_to_status_id = (isset($t->in_reply_to_status_id)) ? $t->in_reply_to_status_id : null;\n $this->in_reply_to_user_id = (isset($t->in_reply_to_user_id)) ? $t->in_reply_to_user_id : null;\n $this->retweeted_status_id = (isset($t->retweeted_status)) ? $t->retweeted_status->id : null;\n $this->retweeted_status_user_id = (isset($t->retweeted_status)) ? $t->retweeted_status->user->id : null;\n $this->created_at = date('Y-m-d H:i:s', strtotime($t->created_at));\n $this->source = $t->source;\n $this->tweet = $this->format_tweet($t);\n $this->user_id = $t->user->id;\n // Not included in JSON\n $this->favorited = 0;\n $this->truncated = 0;\n\n }", "title": "" }, { "docid": "cdb2bf61bce8bf8c912fdcf68d746a77", "score": "0.56889397", "text": "protected function getObject () {\n\t\treturn $this->object;\n\t}", "title": "" }, { "docid": "fd159aca37949d6473cfa5583a2aaaa4", "score": "0.5686963", "text": "function getObject()\n {\n return $this->object;\n }", "title": "" }, { "docid": "bf0d8e3b5f131dcbbd54c2cdd471e1e8", "score": "0.5685481", "text": "public function jsonSerialize()\n {\n $ret = new stdClass();\n\n $ret->content = $this->content;\n $ret->context = $this->context;\n\n return $ret;\n }", "title": "" }, { "docid": "9198b1f6e701d395aacff7e445e81575", "score": "0.5684184", "text": "public function jsonSerialize(): stdClass;", "title": "" }, { "docid": "b69b35228d2e6f3b5c1754d738735d8e", "score": "0.5669424", "text": "public function __construct()\n {\n $this->apikey = \"YOUR-API\";\n $this->server = \"http://api.fanart.tv/webservice/\";\n $this->type = \"JSON\";\n\n\n $this->_obj = & get_instance();\n // Cache need to be fixed\n $this->_obj->load->driver('cache');\n }", "title": "" }, { "docid": "c98caa1829a72c3001878ec4437a13ee", "score": "0.56656796", "text": "public static function get(): object\n {\n return json_decode(file_get_contents(QUOTE_API_ENDPOINT));\n }", "title": "" }, { "docid": "6b66c53eb03e7f18cd3001233fd41e3f", "score": "0.5630092", "text": "protected function setUp() {\n $this->object = new JsonData(\"nome\", null);\n }", "title": "" }, { "docid": "7de8007631f117350ea6dfb80da557ab", "score": "0.5623868", "text": "private function loadJson() {\n\t\tif (!isset($this->Json) || !($this->Json instanceof Json))\n\t\t\tLoader::loadComponents($this, array(\"Json\"));\n\t}", "title": "" }, { "docid": "a3875063aa3ee795ba47227bdb9eee78", "score": "0.56130856", "text": "#[Test]\n\t#[TestDox(\"fromJson()\")]\n\tfunction fromJson(): void {\n\t\t$report = Report::fromJson(new \\stdClass);\n\t\tassertThat($report->sourceFiles, isEmpty());\n\t\tassertThat($report->testName, isEmpty());\n\n\t\t// It should return an initialized instance for a non-empty map.\n\t\t$report = Report::fromJson((object) [\"sourceFiles\" => [new \\stdClass], \"testName\" => \"LcovTest\"]);\n\t\tassertThat($report->sourceFiles, countOf(1));\n\t\tassertThat($report->sourceFiles[0], isInstanceOf(SourceFile::class));\n\t\tassertThat($report->testName, equalTo(\"LcovTest\"));\n\t}", "title": "" }, { "docid": "c02f55b76f2cb5f3b837eebd24610d03", "score": "0.560651", "text": "public function getObject()\n {\n return $this->object;\n }", "title": "" }, { "docid": "9bfb84aaeec952d86fb1c080f3c280c0", "score": "0.5600697", "text": "protected function getObject(\\stdClass $data)\n {\n switch ($data->type) {\n case 'account_type':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'PublicApi\\Entity\\AccountType';\n } elseif ($this->entity != 'PublicApi\\Entity\\AccountType') {\n throw new \\Exception(500);\n }\n\n $object = new AccountType((array)$data->attributes);\n $res = [$object->getIdType(), $object];\n break;\n case 'media_type':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'PublicApi\\Entity\\MediaType';\n } elseif ($this->entity != 'PublicApi\\Entity\\MediaType') {\n throw new \\Exception(500);\n }\n\n $object = new MediaType((array)$data->attributes);\n $res = [$object->getIdType(), $object];\n break;\n case 'users':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'PublicApi\\Entity\\User';\n } elseif ($this->entity != 'PublicApi\\Entity\\User') {\n throw new \\Exception(500);\n }\n\n $object = new User((array)$data->attributes);\n $res = [$object->getIdUser(), $object];\n break;\n case 'user_identities':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'PublicApi\\Entity\\UserIdentity';\n } elseif ($this->entity != 'PublicApi\\Entity\\UserIdentity') {\n throw new \\Exception(500);\n }\n\n $object = new UserIdentity((array)$data->attributes);\n $res = [$object->getIdIdentity(), $object];\n break;\n case 'oauth_clients':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'PublicApi\\Entity\\OAuthClient';\n } elseif ($this->entity != 'PublicApi\\Entity\\OAuthClient') {\n throw new \\Exception(500);\n }\n\n $object = new OAuthClient((array)$data->attributes);\n $res = [$object->getIdClient(), $object];\n break;\n case 'oauth_tokens':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'PublicApi\\Entity\\OAuthToken';\n } elseif ($this->entity != 'PublicApi\\Entity\\OAuthToken') {\n throw new \\Exception(500);\n }\n\n $object = new OAuthToken((array)$data->attributes);\n $res = [$object->getToken(), $object];\n break;\n case 'bulk_transactions':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'PublicApi\\Entity\\BulkTransaction';\n } elseif ($this->entity != 'PublicApi\\Entity\\BulkTransaction') {\n throw new \\Exception(500);\n }\n\n $object = new BulkTransaction((array)$data->attributes);\n $res = [$object->getIdBulkTransaction(), $object];\n break;\n case 'bulk_types':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'PublicApi\\Entity\\BulkType';\n } elseif ($this->entity != 'PublicApi\\Entity\\BulkType') {\n throw new \\Exception(500);\n }\n\n $object = new BulkType((array)$data->attributes);\n $res = [$object->getType(), $object];\n break;\n case 'files':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'PublicApi\\Entity\\File';\n } elseif ($this->entity != 'PublicApi\\Entity\\File') {\n throw new \\Exception(500);\n }\n\n $object = new File((array)$data->attributes);\n $res = [$object->getIdFile(), $object];\n break;\n default:\n throw new \\Exception(500);\n }\n\n return $res;\n }", "title": "" }, { "docid": "1848ec95472a7fd0f2d79731dec9d474", "score": "0.5582777", "text": "public function __construct() {\n\n\t\t$this->_view = new JSONView();\n\n\t}", "title": "" }, { "docid": "d78f5bfd27e419fe575c3846d8dd8dbe", "score": "0.55716187", "text": "protected function getObject()\n\t{\n\t\treturn $this->object;\n\t}", "title": "" }, { "docid": "72746b971ac980398fdeb2ac55c30940", "score": "0.5569539", "text": "public function getObject()\r\n {\r\n return $this->object;\r\n }", "title": "" }, { "docid": "4bec5b8b00ad3fc409620c79e6fa6715", "score": "0.55676585", "text": "public function getResponseObject()\n\t{\n\t\t$object = new StdClass;\n\t\t$response = $this->getResponse();\n\t\tforeach ($response as $key => $value)\n\t\t{\n\t\t\t$property = camel_case(strtolower($key));\n\t\t\t$object->$property = $value;\n\t\t}\n\t\tif (empty($object->amount) && !is_null($this->getField('AMOUNT')))\n\t\t{\n\t\t\t$object->amount = $this->getField('AMOUNT');\n\t\t}\n\t\treturn $object;\n\t}", "title": "" }, { "docid": "55b016edf21c4cc691f32086306acc7d", "score": "0.55636966", "text": "protected function getObject(\\stdClass $data)\n {\n switch ($data->type) {\n case 'users':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'AppBundle\\Entity\\User';\n } elseif ($this->entity != 'AppBundle\\Entity\\User') {\n throw new HttpException(500);\n }\n\n $object = new User((array)$data->attributes);\n $res = [$object->getIdUser(), $object];\n break;\n case 'user_identities':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'AppBundle\\Entity\\UserIdentity';\n } elseif ($this->entity != 'AppBundle\\Entity\\UserIdentity') {\n throw new HttpException(500);\n }\n\n $object = new UserIdentity((array)$data->attributes);\n $res = [$object->getIdIdentity(), $object];\n break;\n case 'files':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'AppBundle\\Entity\\File';\n } elseif ($this->entity != 'AppBundle\\Entity\\File') {\n throw new HttpException(500);\n }\n\n $object = new File((array)$data->attributes);\n $res = [$object->getIdFile(), $object];\n break;\n case 'blockchain':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'AppBundle\\Entity\\BlockChain';\n } elseif ($this->entity != 'AppBundle\\Entity\\BlockChain') {\n throw new HttpException(500);\n }\n\n $object = new BlockChain((array)$data->attributes);\n $res = [$object->getTransaction(), $object];\n break;\n case 'account_type':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'AppBundle\\Entity\\AccountType';\n } elseif ($this->entity != 'AppBundle\\Entity\\AccountType') {\n throw new HttpException(500);\n }\n\n $object = new AccountType((array)$data->attributes);\n $res = [$object->getIdType(), $object];\n break;\n case 'media_type':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'AppBundle\\Entity\\MediaType';\n } elseif ($this->entity != 'AppBundle\\Entity\\MediaType') {\n throw new HttpException(500);\n }\n\n $object = new MediaType((array)$data->attributes);\n $res = [$object->getIdType(), $object];\n break;\n case 'processes_status':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'AppBundle\\Entity\\ProcessStatus';\n } elseif ($this->entity != 'AppBundle\\Entity\\ProcessStatus') {\n throw new HttpException(500);\n }\n\n $object = new ProcessStatus((array)$data->attributes);\n $res = [$object->getType().'_'.$object->getIdStatus(), $object];\n break;\n case 'processes':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'AppBundle\\Entity\\Processes';\n } elseif ($this->entity != 'AppBundle\\Entity\\Processes') {\n throw new HttpException(500);\n }\n\n $object = new Process((array)$data->attributes);\n $res = [null, $object];\n break;\n case 'bulk_transactions':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'AppBundle\\Entity\\BulkTransaction';\n } elseif ($this->entity != 'AppBundle\\Entity\\BulkTransaction') {\n throw new HttpException(500);\n }\n\n $object = new BulkTransaction((array)$data->attributes);\n $res = [$object->getIdBulkTransaction(), $object];\n break;\n case 'bulk_files':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'AppBundle\\Entity\\BulkFile';\n } elseif ($this->entity != 'AppBundle\\Entity\\BulkFile') {\n throw new HttpException(500);\n }\n\n $object = new BulkFile((array)$data->attributes);\n $res = [$object->getIdBulkFile(), $object];\n break;\n case 'signers':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'AppBundle\\Entity\\Signer';\n } elseif ($this->entity != 'AppBundle\\Entity\\Signer') {\n throw new HttpException(500);\n }\n\n $object = new Signer((array)$data->attributes);\n $res = [$object->getEmail(), $object];\n break;\n case 'oauth_clients':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'AppBundle\\Entity\\OAuthClient';\n } elseif ($this->entity != 'AppBundle\\Entity\\OAuthClient') {\n throw new HttpException(500);\n }\n\n $object = new OAuthClient((array)$data->attributes);\n $res = [$object->getEmail(), $object];\n break;\n case 'signatures':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'AppBundle\\Entity\\DocsSignature';\n } elseif ($this->entity != 'AppBundle\\Entity\\DocsSignature') {\n throw new HttpException(500);\n }\n\n $object = new DocsSignature((array)$data->attributes);\n $res = [0, $object];\n break;\n default:\n throw new HttpException(500);\n }\n\n return $res;\n }", "title": "" }, { "docid": "3d863680a2b8428c94ea8621310049ec", "score": "0.55557173", "text": "public function getObject()\n {\n return $this->object;\n }", "title": "" }, { "docid": "3d863680a2b8428c94ea8621310049ec", "score": "0.55557173", "text": "public function getObject()\n {\n return $this->object;\n }", "title": "" }, { "docid": "3d863680a2b8428c94ea8621310049ec", "score": "0.55557173", "text": "public function getObject()\n {\n return $this->object;\n }", "title": "" }, { "docid": "13552020dc1675640d10aef4747adfd0", "score": "0.5543716", "text": "public function getObject()\n {\n return $this->_object;\n }", "title": "" }, { "docid": "13552020dc1675640d10aef4747adfd0", "score": "0.5543716", "text": "public function getObject()\n {\n return $this->_object;\n }", "title": "" }, { "docid": "d581d14d664f3521325b25c30f284898", "score": "0.55181694", "text": "public function toObject()\n {\n $ob = clone $this->_data;\n $ob->cacheid = $this->cacheid;\n $ob->view = $this->view;\n\n if (!empty($this->_metadata)) {\n $ob->metadata = $this->metadata;\n }\n\n return $ob;\n }", "title": "" }, { "docid": "763cda109fa1f1ac0496dba10f3ab6f6", "score": "0.55161834", "text": "public function jsonDeserialize($data) {\n\t\tforeach ($data AS $key => $value) {\t\n\t\t\t$this->{$key} = $value;\n\t\t}\t\t\n }", "title": "" }, { "docid": "720bc5b684c8b474cc9833177eb4ac76", "score": "0.5509452", "text": "public function getParams(): object\n {\n $this->name = $this->getfield(\"name\");\n $this->phone= $this->getfield(\"phone\");\n return (object)['name' => $this->getName(), 'phone' => $this->getPhone()];\n }", "title": "" }, { "docid": "6bbe2deceb4ae951e6d0558e31dcc241", "score": "0.5508083", "text": "function getObj() {\n\t\treturn $this->obj;\n\t}", "title": "" }, { "docid": "66823f22260723d2de39ceb9f67bd2c7", "score": "0.5506114", "text": "private function populateFromJson($json)\n {\n $reflectionObject = new \\ReflectionObject($this);\n $properties = $reflectionObject->getProperties();\n $data = json_decode($json, true);\n foreach ($properties as $property){\n $property->setAccessible(true);\n $property->setValue($this, $data[$property->getName()]);\n $property->setAccessible(false);\n }\n }", "title": "" }, { "docid": "d03f9274f7062bc6d54978bfdcd42cc7", "score": "0.5499872", "text": "public static function getObject()\n {\n return new CarrierAccount(self::getJson());\n }", "title": "" }, { "docid": "d3f4227410cb381970602c8fecf63116", "score": "0.54996043", "text": "function jsonSerialize()\n {\n return (object)get_object_vars($this);\n }", "title": "" }, { "docid": "e57cd30fa5f3ec4c2669e8c4c36f1df1", "score": "0.54983693", "text": "private function loadFromJson($json){\n if(isset($json[\"uuid\"])){\n $this->uuid = $json[\"uuid\"];\n }\n if(isset($json[\"url\"])){\n $this->url = $json[\"url\"];\n }\n if(isset($json[\"river\"])){\n $this->river = $json[\"river\"];\n }\n if(isset($json[\"state\"])){\n $this->state = (object) $json[\"state\"];\n if(isset($json[\"state\"][\"source\"][\"value\"])){\n $this->eaLevel = $json[\"state\"][\"source\"][\"value\"];\n }\n }\n\n }", "title": "" }, { "docid": "8c9837ce5e9c2afaae02833d859c0c91", "score": "0.5493877", "text": "public function fromJson(string $json, $type)\n {\n $isObject = \\is_object($type);\n $typeToken = $isObject ? new TypeToken(\\get_class($type)) : new TypeToken($type);\n $typeAdapter = $this->typeAdapterProvider->getAdapter($typeToken);\n\n if ($isObject && $typeAdapter instanceof ObjectConstructorAware) {\n $typeAdapter->setObjectConstructor(new CreateFromInstance($type));\n }\n\n return $typeAdapter->readFromJson($json);\n }", "title": "" }, { "docid": "31792e65e999217c768d66e8c5b091e3", "score": "0.54886454", "text": "function jsonSerialize()\n {\n $vars = clone $this;\n $vars->dob = $vars->dob->format(\"y/m/d\");\n return get_object_vars($vars);\n }", "title": "" }, { "docid": "755c2cce6947a587649c590c7cf1ef3b", "score": "0.5487775", "text": "public function createFromJson($json);", "title": "" }, { "docid": "1e2a32be6c5858090c5997b042bc2959", "score": "0.54870874", "text": "public function toObject()\r\n {\r\n return json_decode(json_encode($this->_jsonArray));\r\n }", "title": "" }, { "docid": "1a765816a241dd5b9eeb896c96413ab5", "score": "0.5480621", "text": "function __construct()\n\t{\n\t\t$this->data = $this->leerJsonFile();\n\n\t}", "title": "" }, { "docid": "7dfcc33843ebe2ae7067a6de858870a6", "score": "0.54780763", "text": "protected function getJsonFromPqrBackup(): object\n {\n return $this->getPqrBackup()->getDataJson();\n }", "title": "" }, { "docid": "e8337bb4cd805165a390f3133b3a1e0e", "score": "0.54550713", "text": "public static function create() {\n return new JsonApiClient(\n new Client(),\n new ResponseParser(),\n new BodyStreamFactory()\n );\n }", "title": "" }, { "docid": "dbe90a8ec77a70fbfc26bd0efe9454c7", "score": "0.5447634", "text": "public function jsonDeserialize($data) {\n\t\tforeach ($data AS $key => $value) {\t\n\t\t\t$this->{$key} = $value;\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "5dbadf12d2335af204eaf559c97c06bf", "score": "0.5442131", "text": "public function testSerializationDeserialization()\n {\n $obj = new Merchant(self::getJson());\n $this->assertNotNull($obj);\n $this->assertNotNull($obj->getEmail());\n $this->assertNotNull($obj->getMerchantId());\n $this->assertNotNull($obj->getFirstName());\n $this->assertNotNull($obj->getLastName());\n $this->assertNotNull($obj->getAccountNumber());\n $this->assertNotNull($obj->getPhone());\n $this->assertEquals(self::getJson(), $obj->toJson());\n return $obj;\n }", "title": "" }, { "docid": "a9017af5f23d77251664db34d281b109", "score": "0.54407215", "text": "function jsonSerialize()\n {\n return $this;\n }", "title": "" }, { "docid": "f3b3a103a536241e14b2a862bafa81df", "score": "0.54360914", "text": "public function getObj()\n {\n return $this->obj;\n }", "title": "" }, { "docid": "f11b9c52a72869c80405b5c0294679af", "score": "0.54316735", "text": "public static function getJSON($object){\n // not implemented\n }", "title": "" }, { "docid": "dc9428388af1ad0de161c860a12e1999", "score": "0.5424516", "text": "private function load()\n {\n if($this->reader->exist())\n {\n $this->data()->set(json_decode($this->reader->content(), true));\n }\n }", "title": "" }, { "docid": "e52a6c2b1dfe5784d7771a7782f622dd", "score": "0.5423032", "text": "public function asJson()\n {\n $this->is_json = true;\n return $this;\n }", "title": "" }, { "docid": "1dacd01abc96190c587e756241d3a075", "score": "0.5422308", "text": "protected function getObject()\n {\n return new $this->className( 'namespace', 'name' );\n }", "title": "" }, { "docid": "b744055657697802da94ea87e4b91373", "score": "0.54130214", "text": "protected function getObject()\n {\n return $this->serviceObject->getObject();\n }", "title": "" }, { "docid": "35c8d4b158a89332602995a9081f23b4", "score": "0.5409439", "text": "public function load() : \\stdClass\n {\n $this->checkAndThrow();\n\n return $this->load;\n\n }", "title": "" }, { "docid": "6ec9f4984a32692252e8e9ad8907f68c", "score": "0.54020905", "text": "public static function getObject()\n {\n return new Merchant(self::getJson());\n }", "title": "" }, { "docid": "43729fe59d4a324a31dc0a6a8b7151d3", "score": "0.5401382", "text": "public function getData(){\n\n $summoner = $this->getSummoner($this->data->region, $this->data->name);\n\n self::$version = $summoner->latestVer = $this->getLatestVersion();\n self::$id = $summoner->id;\n\n $summoner->league = $this->getLeague();\n $summoner->history = $this->getHistory();\n $summoner->championList = $this->getChampionList();\n $summoner->summonerSpells = $this->getSummonerSpells();\n\n return $summoner;\n }", "title": "" }, { "docid": "b3992b8734d0d99e3d9fbb8dcaf961ae", "score": "0.5398695", "text": "public function fromJson( $json )\n {\n return $this->fromArray( json_decode($json, true) );\n }", "title": "" }, { "docid": "f9615a64d5ab14f6432c6e5b2c5a8e7b", "score": "0.53946805", "text": "public function testSerializationDeserialization()\n {\n $obj = new CustomerInfo(self::getJson());\n $this->assertNotNull($obj);\n $this->assertNotNull($obj->getEmail());\n $this->assertNotNull($obj->getAccountNumber());\n $this->assertNotNull($obj->getFirstName());\n $this->assertNotNull($obj->getLastName());\n $this->assertNotNull($obj->getCustomerId());\n $this->assertNotNull($obj->getPhone());\n $this->assertNotNull($obj->getCountryCode());\n $this->assertNotNull($obj->getCountryOfResidence());\n $this->assertNotNull($obj->getBillingAddress());\n $this->assertEquals(self::getJson(), $obj->toJson());\n return $obj;\n }", "title": "" }, { "docid": "ca3a36374fa3f4405f5c218920ac5362", "score": "0.5394072", "text": "public function __construct($data)\n {\n parent::hydrate($data, $this);\n }", "title": "" }, { "docid": "8a4068453fc052c198da2382831b91a9", "score": "0.5393035", "text": "public static function fromJson(array $data)\n {\n $result = new self();\n\n $result->id = $data['id'];\n $result->name = $data['name'];\n $result->createdOn = DateTimeImmutable::createFromFormat(DateTime::ISO8601, $data['created_on']);\n\n return $result;\n }", "title": "" }, { "docid": "e22a542e2ef6a9f42b06c7ea8acd2a49", "score": "0.5392856", "text": "public function asObject() {\n return (object)$this->decode();\n }", "title": "" }, { "docid": "82a1348be81ec1243a94d032ae1d5da7", "score": "0.5392224", "text": "function getData(){ \n return json_decode($this->data); \n }", "title": "" } ]
7813dc11b0c53f2bd0dc84b6f1c808a8
add to iax table
[ { "docid": "43fe128468879d8fff24523adddf2d68", "score": "0.0", "text": "function core_devices_addiax2($account)\n{\n global $db;\n global $amp_conf;\n\n $flag = 2;\n foreach ($_REQUEST as $req => $data) {\n if (substr($req, 0, 8) == 'devinfo_') {\n $keyword = substr($req, 8);\n if ($keyword == 'dial' && $data == '') {\n $iaxfields[] = array($account, $keyword, 'IAX2/' . $account, $flag++);\n } elseif ($keyword == 'mailbox' && $data == '') {\n $iaxfields[] = array($account, 'mailbox', $account . '@device', $flag++);\n } else {\n $iaxfields[] = array($account, $keyword, $data, $flag++);\n }\n }\n }\n\n if (!is_array($iaxfields)) { // left for compatibilty....lord knows why !\n $iaxfields = array(\n array($account, 'secret', $db->escapeSimple(($_REQUEST['secret']) ? $_REQUEST['secret'] : ''), $flag++),\n array($account, 'transfer', $db->escapeSimple(($_REQUEST['transfer']) ? $_REQUEST['transfer'] : 'yes'), $flag++),\n array($account, 'context', $db->escapeSimple(($_REQUEST['context']) ? $_REQUEST['context'] : 'from-internal'), $flag++),\n array($account, 'host', $db->escapeSimple(($_REQUEST['host']) ? $_REQUEST['host'] : 'dynamic'), $flag++),\n array($account, 'type', $db->escapeSimple(($_REQUEST['type']) ? $_REQUEST['type'] : 'friend'), $flag++),\n array($account, 'mailbox', $db->escapeSimple(($_REQUEST['mailbox']) ? $_REQUEST['mailbox'] : $account . '@device'), $flag++),\n array($account, 'username', $db->escapeSimple(($_REQUEST['username']) ? $_REQUEST['username'] : $account), $flag++),\n array($account, 'port', $db->escapeSimple(($_REQUEST['port']) ? $_REQUEST['port'] : '4569'), $flag++),\n array($account, 'qualify', $db->escapeSimple(($_REQUEST['qualify']) ? $_REQUEST['qualify'] : $amp_conf['DEVICE_QUALIFY']), $flag++),\n array($account, 'deny', $db->escapeSimple((isset($_REQUEST['deny'])) ? $_REQUEST['deny'] : ''), $flag++),\n array($account, 'permit', $db->escapeSimple((isset($_REQUEST['permit'])) ? $_REQUEST['permit'] : ''), $flag++),\n array($account, 'disallow', $db->escapeSimple(($_REQUEST['disallow']) ? $_REQUEST['disallow'] : $amp_conf['DEVICE_DISALLOW']), $flag++),\n array($account, 'allow', $db->escapeSimple(($_REQUEST['allow']) ? $_REQUEST['allow'] : $amp_conf['DEVICE_ALLOW']), $flag++),\n array($account, 'accountcode', $db->escapeSimple(($_REQUEST['accountcode']) ? $_REQUEST['accountcode'] : ''), $flag++),\n array($account, 'requirecalltoken', $db->escapeSimple(($_REQUEST['requirecalltoken']) ? $_REQUEST['requirecalltoken'] : ''), $flag++)\n );\n }\n\n // Very bad\n $iaxfields[] = array($account, 'account', $db->escapeSimple($account), $flag++);\n $iaxfields[] = array($account, 'callerid', $db->escapeSimple((isset($_REQUEST['description']) && $_REQUEST['description'] != '') ? $_REQUEST['description'] . \" <\" . $account . '>' : 'device' . \" <\" . $account . '>'), $flag++);\n // Asterisk treats no CallerID from an IAX device as 'hide CallerID', and ignores the CallerID\n // set in iax.conf. As we rely on this for pretty much everything, we need to specify the\n // CallerID as a variable which gets picked up in macro-callerid.\n // Ref - http://bugs.digium.com/view.php?id=456\n $iaxfields[] = array($account, 'setvar', $db->escapeSimple(\"REALCALLERIDNUM=$account\"), $flag++);\n\n $compiled = $db->prepare('INSERT INTO iax (id, keyword, data, flags) values (?,?,?,?)');\n $result = $db->executeMultiple($compiled, $iaxfields);\n if (DB::IsError($result)) {\n die_freepbx($result->getMessage() . \"<br><br>error adding to IAX table\");\n }\n}", "title": "" } ]
[ { "docid": "9a0f79a53c05521d1630b399517631c3", "score": "0.66470826", "text": "protected function manipulateTable() : void {}", "title": "" }, { "docid": "24a28c0cb67bdfc0d573974a658de0ad", "score": "0.65433735", "text": "public function addTable(Datatable $table);", "title": "" }, { "docid": "fc24702e740c3879c8e08f1fd83e2a01", "score": "0.6470288", "text": "public function addRow($row);", "title": "" }, { "docid": "993277d846f341700b913fddf5a52d27", "score": "0.63852125", "text": "private function insertRows ()\n {\n \n }", "title": "" }, { "docid": "858b94463586cc8286150fbacf35aee4", "score": "0.6312445", "text": "private function add()\n {\n for ($i = 0; $i < count($this->data); $i += 1) {\n $this->data[$i] = $this->formula->calculate($this->data[$i]);\n }\n\n $this->columnHeadings[] = $this->columnName;\n }", "title": "" }, { "docid": "78f65e7fe8df39b0f2f96e6ec92cf291", "score": "0.6250646", "text": "public function addCells();", "title": "" }, { "docid": "15e87b5487870bb715b430a5693df4cc", "score": "0.6147891", "text": "public function addRow()\n {\n $this->pdf->Ln();\n if($this->flagFormat == 'T') {\n $this->colcounter = 0;\n }\n else {\n $this->colcounterTemp = 0;\n }\n }", "title": "" }, { "docid": "8c623d29ceaa76cb051feaebea67251a", "score": "0.61130553", "text": "function AddCol($value)\n {\n $this->Table[$this->ypointer][$this->xpointer]=$value;\n $this->xpointer++;\n }", "title": "" }, { "docid": "b9202082dfbcd734edbb1360d236af4c", "score": "0.60303885", "text": "function addTable($tableid){\r\n\t\t$this->tables[]=$tableid;\r\n\t}", "title": "" }, { "docid": "2fc68c759d1285eddaf68616d95af996", "score": "0.60053253", "text": "function addTable($table) {\n\t\t$this->tables[] = $table;\n\t}", "title": "" }, { "docid": "fca98dd6db188ac069313a299909d8a2", "score": "0.6003984", "text": "protected function addHeader(){\n\t\t\t$row = array(\"Equipment:\", \"Function:\", \"Room:\");\n\t\t\t$this->addRow($row);\n\t\t}", "title": "" }, { "docid": "32ba6141ce22c0cd06c6b60d57f3b241", "score": "0.59869814", "text": "function NewRow()\n {\n if(count($this->Table)==0)\n {\n $this->xpointer=0;\n $this->ypointer=0;\n }\n else \n {\n $this->xpointer=0;\n $this->ypointer++;\n }\n }", "title": "" }, { "docid": "0dd5faba775af80986de945be8449101", "score": "0.59142184", "text": "function addRow($id, $name, $uname) {\n\t\t$this->rowcontent .= \"<tr>\n\t\t\t\t\t<td align=center width=10% height=57><input type=checkbox name=slist[] value=$id />\n\t\t\t\t\t<td>$name </td>\n\t\t\t\t\t<td>$uname</td></tr>\";\t\t\n\t}", "title": "" }, { "docid": "a30acccfa88985078368e4983413ae36", "score": "0.5892679", "text": "public function addrows()\n\t{\n\t\t$this->writePostData(true);\n\t\t$position = key($_POST['cmd']['addrows']);\n\t\t$this->object->addRowAtPosition(\"\", false, $position+1);\n\t\t$this->editQuestion();\n\t}", "title": "" }, { "docid": "36f23dc38ca8c85d8d724046320b719c", "score": "0.5828948", "text": "function add_table($table){\n $td = ($table->find('th', 0))?0:1; //deal with the different types of table\n foreach ($table->find('tr') as $row){\n $info_found = false;\n if ($td == 0){\n //print $row;\n if ($row->find('th', 0) and $row->find('td', 0)){\n $param = strtolower($this->get_inner_text($row->find('th',0)));\n $value = $this->get_inner_text($row->find('td', 0));\n $info_found = true;\n } \n }else{\n //print $row;\n if ($row->find('td', 0) and $row->find('td', 1)){\n $param = strtolower($this->get_inner_text($row->find('td',0)));\n $value = $this->get_inner_text($row->find('td', 1));\n $info_found = true;\n }\n \n }\n\n if ($info_found){\n $this->table_array[$param] = $value;\n }\n\n }\n\n }", "title": "" }, { "docid": "36f23dc38ca8c85d8d724046320b719c", "score": "0.5828948", "text": "function add_table($table){\n $td = ($table->find('th', 0))?0:1; //deal with the different types of table\n foreach ($table->find('tr') as $row){\n $info_found = false;\n if ($td == 0){\n //print $row;\n if ($row->find('th', 0) and $row->find('td', 0)){\n $param = strtolower($this->get_inner_text($row->find('th',0)));\n $value = $this->get_inner_text($row->find('td', 0));\n $info_found = true;\n } \n }else{\n //print $row;\n if ($row->find('td', 0) and $row->find('td', 1)){\n $param = strtolower($this->get_inner_text($row->find('td',0)));\n $value = $this->get_inner_text($row->find('td', 1));\n $info_found = true;\n }\n \n }\n\n if ($info_found){\n $this->table_array[$param] = $value;\n }\n\n }\n\n }", "title": "" }, { "docid": "b07f37d3d95da5726e55897177b9c946", "score": "0.57944214", "text": "function add_to_table($id, $name, $type, $fee, $sex, $desexed, $user_logged_in) {\n echo \"<tr>\";\n echo \"<td>$name</td>\";\n echo \"<td>$type</td>\";\n echo \"<td>$fee</td>\";\n echo \"<td>$sex</td>\";\n echo \"<td>$desexed</td>\";\n\n // check if user is logged in\n if ($user_logged_in == true) {\n create_column_button(\"animalid\", $id, \"Edit\", \"edit_animal.php\");\n create_column_button(\"animalid\", $id, \"Delete\", \"delete_animal.php\");\n } \n\n // finish table row\n echo \"</tr>\";\n }", "title": "" }, { "docid": "3b9a6c14777151b374654cc325da7cdb", "score": "0.5791062", "text": "function tableColumnAdd( $table ,$input )\n{\n//bar is the temporary table\n$columnNameNew= \"\";\n$columnNameValue= \"1\";\n\n\tif( array_key_exists( 'columnNameNew' ,$input ) )\n\t\t$columnNameNew= $input['columnNameNew'] ;\n\telse \n\t\treturn $this->restDie( -9 ,\"tableColumnAdd: columnNameNew deve essere valorizzato\" );\n\n\tif( array_key_exists( 'columnNameValue' ,$input ) )\n\t\t$columnNameValue= $input['columnNameValue'] ;\n\n\n$schema= `echo .schema $table |sqlite3 .model.sqlite3`;\n$r= $schema .\"\\n\\n\";\n\n$renameTableToBar= `ALTER TABLE $table RENAME TO bar`;\n$r.= \"ALTER TABLE $table RENAME TO bar\\n\\n\";\n\n// non funzica perche non ho ricreato la tabella aggiungendo il nuovo attributo allo schema,\n//bisogna inserire la nuova colonna prima dell ultimo ')' ed esguire;\n\n\n//return schema\n\n$copyRowsFromBarToNewTable= `INSERT INTO $table SELECT *,$columnNameValue as $columnNameNew FROM bar`;\n$r.= \"INSERT INTO $table SELECT *,$columnNameValue as $columnNameNew FROM bar\\n\\n\";\n\n$removeTableBar= `DROP TABLE bar;`;\n$r.= \"DROP TABLE bar;\\n\\n\";\n\n\nreturn $r;\n\nreturn \"1\";\n}", "title": "" }, { "docid": "8acfde7b9459b7c6f7b666381ff90aa7", "score": "0.57900965", "text": "public function insert($tblHinhanh);", "title": "" }, { "docid": "a5360322759975646b805175e5af57e4", "score": "0.574591", "text": "protected function setTableTagged()\n {\n $ID_Inserate = $this->table_inserat->getLastTaggedID_Inserate($this->view->num_column);\n if (!empty($ID_Inserate)) {\n include_once('Intern/Image/Editing.php');\n $this->image = new Image_Editing();\n $i = 0;\n foreach ($ID_Inserate as $id_inserat) {\n $table[$id_inserat] = $this->table_inserat->getInseratTagged($id_inserat);\n $image = $this->image->orientationImageThumbnail($id_inserat);\n $table[$id_inserat][0]['width'] = $image['width'];\n $table[$id_inserat][0]['height'] = $image['height'];\n $table[$id_inserat][0]['image'] = $image['image'];\n $table['ids'][$i++] = $id_inserat;\n $table['tooltips'] = $this->tooltipTagged($table);\n }\n } else {\n $table = array();\n }\n \n return $table;\n }", "title": "" }, { "docid": "29c0b212d06fa0e87d74488dd2c572ef", "score": "0.57292503", "text": "function add_payroll_tax_table_data($table_id, $value_from, $value_to, $tax_amount, $variable_from, $fixed_tax_percent, $variable, $variable_tax_percent) {\n // SC: TODO: something relevant here\n}", "title": "" }, { "docid": "af2c89bebcb447080384ea0fb591fc68", "score": "0.57259065", "text": "function addTable() {\n $property = requestBody();\n $sql = \"INSERT INTO camTable(TAB_Field)\n VALUES(:field)\";\n $structure = array();\n $params = array(\n 'field' => trim($property->field),\n );\n echo changeQueryIntoJSON('campa', $structure, getConnection(), $sql, $params, 1, PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "dbddeeb314e4a70029c9e307c0732a0d", "score": "0.5718168", "text": "public function tableModify()\n {\n }", "title": "" }, { "docid": "dbddeeb314e4a70029c9e307c0732a0d", "score": "0.5718168", "text": "public function tableModify()\n {\n }", "title": "" }, { "docid": "dbddeeb314e4a70029c9e307c0732a0d", "score": "0.5718168", "text": "public function tableModify()\n {\n }", "title": "" }, { "docid": "723043e29950cf0a46962383177a2487", "score": "0.5716659", "text": "public function add(string $alias, DatatableInterface $datatable): void;", "title": "" }, { "docid": "f4e3699ddb0d23e405c5703113d466cb", "score": "0.57003397", "text": "public function insCol()\n {\n foreach ( $_POST as $k => $v ) {\n if ( $v == \"on\" ) $cols[mb_substr($k, mb_strpos($k, \"#\") + 1)] = $_POST[$k.\"_col\"];\n }\n \n foreach ( $cols as $col => $que ) {\n $this->conn[$this->d1]->dotaz(array(\n 'dotaz' => \"ALTER TABLE `\" . $this->tab . \"` ADD $que\"\n ));\n $sloupce[] = $col;\n }\n \n if ( count($sloupce) > 1 ) return \"Do tabulky: <b>\".$this->tab.\"</b> byly vloženy sloupce:<br /><b>\" . implode(\"<br />\", $sloupce);\n else return \"Do tabulky: <b>\".$this->tab.\"</b> byl vložen sloupec: <b>$sloupce[0]</b>.\";\n }", "title": "" }, { "docid": "c107bea0430b313e7f7df5829a075b15", "score": "0.5688597", "text": "function Add() \n\t{\n\t\tglobal $conn,$dal_info;\n\t\t$insertFields=\"\";\n\t\t$insertValues=\"\";\n\t\t$tableinfo = &$dal_info[$this->m_TableName];\n\t\t$blobs = array();\n//\tprepare parameters\t\t\n\t\tforeach($tableinfo as $fieldname=>$fld)\n\t\t{\n\t\t\tif(isset($this->{$fld['varname']}))\n\t\t\t{\n\t\t\t\t$this->Value[$fieldname] = $this->{$fld['varname']};\n\t\t\t}\n\t\t\tforeach($this->Value as $field=>$value)\n\t\t\t{\n\t\t\t\tif (strtoupper($field)!=strtoupper($fieldname))\n\t\t\t\t\tcontinue;\n\t\t\t\t$insertFields.= AddFieldWrappers($fieldname).\",\";\n\t\t\t\t$insertValues.= $this->PrepareValue($value,$fld[\"type\"]) . \",\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n//\tprepare and exec SQL\n\t\tif ($insertFields!=\"\" && $insertValues!=\"\")\t\t\n\t\t{\n\t\t\t$insertFields = substr($insertFields,0,-1);\n\t\t\t$insertValues = substr($insertValues,0,-1);\n\t\t\t$dalSQL = \"insert into \".AddTableWrappers($this->m_TableName).\" (\".$insertFields.\") values (\".$insertValues.\")\";\n\t\t\t$this->Execute_Query($blobs,$dalSQL,$tableinfo);\n\t\t}\n//\tcleanup\t\t\n\t $this->Reset();\n\t}", "title": "" }, { "docid": "5916256e0bf7eadb0ebea38d6b3821bb", "score": "0.5686105", "text": "public function iniciaTablero()\n {\n\n }", "title": "" }, { "docid": "7000986a17ddff8a9d23ba4d0109f39c", "score": "0.568162", "text": "public function addTimetable()\n {\n\n global $conn;\n\n $tempTimetableId = Timetable::getTimetableId();\n\n //sql statement\n $sql = \"INSERT INTO timetable(timetable_id,hall_name) VALUES('$tempTimetableId','$tempTimetableId');\";\n $conn->query($sql);\n\n }", "title": "" }, { "docid": "3141ae50c831e7b718e0007f44be6eea", "score": "0.5681605", "text": "function add() {\n\t\t// if didn't pass a set param, just add a new row\n\t\tif(empty($this->set)) {\n\t\t\tmysql_query(\"INSERT INTO {$this->table} VALUES ()\");\n\t\t\n\t\t// if you passed a set param then use that in the insert\n\t\t} else {\n\t\t\tmysql_query(\"INSERT INTO {$this->table} SET {$this->set}\");\n\t\t}\n\t\t\n\t\t// we return the primary key so that we can order by it in the jS\n\t\techo $this->getPrimaryKey();\n\t}", "title": "" }, { "docid": "8a87a392df04a0257525c46899b6806c", "score": "0.5674337", "text": "function updateTable(){\n\n }", "title": "" }, { "docid": "76352f6fc1554156b06b386f5dea1b36", "score": "0.5643442", "text": "abstract protected function buildTable();", "title": "" }, { "docid": "cf208b07e55086584d0ec96aa6db12ae", "score": "0.56426084", "text": "public function addTable( $tablename ) {\n\n\t\t\t$db = $this->db;\n\n\t\t\t$tablename = $db->escape( $tablename );\n\n\t\t\t$db->exec($this->writer->getQuery(\"register_table\",array(\"table\"=>$tablename)));\n\n\t\t}", "title": "" }, { "docid": "5b59b7043d4feb7d890971ae1205243e", "score": "0.5642531", "text": "function addItem($table, $data) {\n\t$expanse = new Expanse($table);\n\tforeach($data as $k => $v) {\n\t\tif(array_key_exists($k, get_object_vars($expanse))) {\n\t\t\t$expanse->{$k} = $v;\n\t\t}\n\t}\n\treturn $expanse->SaveNew() ? true : false;\n}", "title": "" }, { "docid": "0d48d20c389ef834474f0301f928174d", "score": "0.5641665", "text": "function addLogTable(){\r\n $addLogTable = $this->databaseType.'AddLogTable';\r\n $this->$addLogTable();\r\n }", "title": "" }, { "docid": "975faf42c1384f2b933bb4053db28f06", "score": "0.56352425", "text": "function add_row(&$file_handle, $data, $row_count, $field_titles) {\n }", "title": "" }, { "docid": "295d3b8b703fc70b2bd0fb85ddf9d3e2", "score": "0.56338173", "text": "function table(TableInterface &$table);", "title": "" }, { "docid": "051680c90a17b98dbf5c7593dc181218", "score": "0.5602325", "text": "public function add()\n { // metodo add, complementar\n $str = \"insert into \" . self::$tablename . \"(nitDni, nroPisos, desGeneral1, desGeneral2, idCiudad, nombOrg, dirbOrg, noTelf1, noTelf2, emailOrg, nroHabXpiso, aforoPersonas, rutaImagen, status, admon, admontel)\";\n $str .= \" values ('$this->nitDni', $this->nroPisos, '$this->desGeneral1', '$this->desGeneral2', $this->idCiudad, '$this->nombOrg', '$this->dirbOrg', '$this->noTelf1', '$this->noTelf2', '$this->emailOrg', $this->nroHabXpiso, $this->aforoPersonas, '$this->rutaImagen', $this->status, '$this->admon', '$this->admontel');\";\n $this->uc=Executor::doit($str);\n }", "title": "" }, { "docid": "7d7373a43c63974ca54c392209b50ada", "score": "0.56012446", "text": "function setTable($conn,$n_r,$n_p,$n_icon){\n\t\t$ide = 0;\n\t\t$q= \"INSERT INTO app_dashboard_tables (name,publico,icono) VALUES ('$n_r','$n_p','$n_icon')\";\n\t\t//dd($q);\n\t\tif ($r = $conn->query($q) ) {\n\t\t $ide= $conn->insert_id;\n\t\t setOrder($conn,$ide,$ide);\n\t\t}\n\t\treturn $ide;\n\t}", "title": "" }, { "docid": "19d5af89765c5bdc32d6b6381302a4fd", "score": "0.56010056", "text": "protected function addPatientNumberColumns()\n {\n\n }", "title": "" }, { "docid": "b6e2b0269fae3367aba41cc60f72347f", "score": "0.5597496", "text": "function add_to_enhanced_table ($image) {\n\t\t\t\tglobal $wpdb;\n\t\t\t\t$copy = strftime ($this -> options ['default_copyright']);\n\t\t\t\t$sql = $wpdb->prepare(\"INSERT INTO \". $this -> table_name. \" (id, pid, copyright) VALUES (null, %s, %s)\", $image['id'], $copy);\n\t\t\t\t$wpdb->query($sql);\n\t\t\t}", "title": "" }, { "docid": "9f0b580968b20ae26e2917d7ec0116c0", "score": "0.5583199", "text": "protected function startTable() {}", "title": "" }, { "docid": "0efeaa55a110be82ade27e6fc728e4b2", "score": "0.558128", "text": "public function addRow(array $values);", "title": "" }, { "docid": "a8cad5990d010ca0267593812cc754f0", "score": "0.55728173", "text": "public function get_add($table)\n\t{\n\t\t$fields = Directus\\Table::fields($table);\n\n\t\t$this->layout->nest('content', 'directus::tables.add', compact('table', 'fields'));\n\t}", "title": "" }, { "docid": "c3b75c3c26397782cbd004aa46b6c718", "score": "0.5561974", "text": "public function addRows(array $dataRows);", "title": "" }, { "docid": "b3d4fa3150098f48cda713aa5d60d8ce", "score": "0.55486846", "text": "private function declareTableColumn()\n {\n $this->crud->addColumn([\n 'name' => 'name',\n 'label' => 'Name',\n ]);\n $this->crud->addColumn([\n 'name' => 'email',\n 'label' => 'Email Address',\n ]);\n $this->crud->addColumn([\n 'name' => 'points',\n 'label' => 'Points',\n ]);\n $this->crud->addColumn([\n 'name' => 'level',\n 'label' => 'Level',\n ]);\n $this->crud->addColumn([\n 'name' => 'episode',\n 'label' => 'Episode',\n ]);\n }", "title": "" }, { "docid": "9be451602d415164dbc4e3a5f3f8b172", "score": "0.5544429", "text": "public function insert($tblInfo);", "title": "" }, { "docid": "dc2f84b48450ea5f05c0fa98f01aeb5c", "score": "0.5541269", "text": "public function testEditDocumentDocxInsertTableRow()\n {\n }", "title": "" }, { "docid": "e485e2a553f45bacbeee7ac4e8b75472", "score": "0.55345356", "text": "public function insertRowInSummaryDML()\n {\n\t\t$sql = $this->getQueryContent('insertRowInSummaryDML');\n\t\t$this->db->fireSqlQuery($sql);\n\t}", "title": "" }, { "docid": "6f7cdb1382faf9a931c91a8e6b90e538", "score": "0.55165696", "text": "private function set_table_data()\n {\n\n $legend_items_args = array(\n 'calendar_id' => (!empty($_GET['calendar_id']) ? absint($_GET['calendar_id']) : 0),\n );\n\n $legend_items = wpbs_get_legend_items($legend_items_args);\n\n if (empty($legend_items)) {\n return;\n }\n\n foreach ($legend_items as $legend_item) {\n\n $row_data = $legend_item->to_array();\n\n /**\n * Filter the legend item row data\n *\n * @param array $row_data\n * @param WPBS_Legend_Item $legend_item\n *\n */\n $row_data = apply_filters('wpbs_list_table_legend_items_row_data', $row_data, $legend_item);\n\n $this->data[] = $row_data;\n\n }\n\n }", "title": "" }, { "docid": "ec5eaa7c0f8cabe9df32539f4cd2523b", "score": "0.55032694", "text": "public function addRow($row)\r\n\t{\r\n\t\t$this->rows[] = $row; \r\n\t}", "title": "" }, { "docid": "6c366a5e5edb365253ee1532b9aa2b14", "score": "0.5483883", "text": "public function action_add_table(){\n\n\t\tSession::put('href.previous', URL::full());\n\n\t\t$data \t\t\t\t= \tarray();\n\t\t$data[\"edit\"] \t\t= \tfalse;\n\t\t$data[\"columns\"][1] =\tarray('name' => 'id', 'default' => '1');\n\t\t$data[\"columns\"][2] =\tarray('name' => 'created_at', 'default' => '');\n\t\t$data[\"columns\"][3] =\tarray('name' => 'updated_at', 'default' => '');\n\t\t$data[\"columns\"][4] =\tarray('name' => '', 'default' => '');\n\t\t$data[\"page\"] \t\t= \t'admin.filedb.new_table';\n\n\t\t$data[\"table_name\"] = '';\n\t\t$data[\"json_save\"][\"table_name\"] = 'encodeURI($(\\'#table_name_\\').val())';\n\t\t$data[\"json_save\"][\"encrypt\"] = 'encodeURI($(\\'#encrypt\\').val())';\n\t\t$data[\"encrypt\"] = false;\n\n\t\t$qty = 0;\n\n\t\tforeach($data[\"columns\"] as $key => $val){\n\n\t\t\t$data[\"json_save\"][\"data_arr\"][\"names\"][$key] = 'encodeURI($(\\'#'.$key.'_name\\').val())'; \n\t\t\t$data[\"json_save\"][\"data_arr\"][\"values\"][$key] = 'encodeURI($(\\'#'.$key.'_default\\').val())';\n\t\t\t$data[\"json_save\"][\"data_arr\"][\"qty\"] = ++$qty; \n\t\t}\n\n\t\tforeach($data[\"columns\"] as $key => $val){\n\n\t\t\t$data[\"json_delete_\".$key] = Utilites::json_with_js_encode(array_merge($data[\"json_save\"], array('id' => $key)));\n\t\t}\n\n\t\t$data[\"json_save\"] = Utilites::json_with_js_encode($data[\"json_save\"]);\n\n\t\treturn (Request::ajax()) ? View::make($data[\"page\"], $data) : View::make('admin.assets.no_ajax', $data);\n\t}", "title": "" }, { "docid": "e5cd29b6ed4ce127dbbf4dcc641509ae", "score": "0.5477942", "text": "public function AddCell($v) {\n\t\t//echo count($this->extra_cell);\n\t\t$this->extra_cell[]=$v;\n\t}", "title": "" }, { "docid": "288fe5b9935349e4f1f9730175eba770", "score": "0.547047", "text": "protected function addTable(Table $table)\r\n {\r\n $this->tables[$table->getName()] = $table;\r\n }", "title": "" }, { "docid": "57323480c670f7e45e958ea605f184c1", "score": "0.5468797", "text": "public function change()\n {\n $table = $this->table('INDICATORS');\n $table ->addColumn('RIESGOS','decimal',['precision'=>10,'scale'=>2])\n ->addColumn('SPI_EXTERNO','decimal',['precision'=>10,'scale'=>1])\n ->create();\n }", "title": "" }, { "docid": "96a872119a3701cd19b2d1a483e294a0", "score": "0.5451201", "text": "public function addEmptyRow();", "title": "" }, { "docid": "ab665a68deed8b9aece2878ccd724fcb", "score": "0.544573", "text": "public function createAppealTable() {\n $filePointer = fopen(dirname(__FILE__).'/../../data/appealTable.csv', 'r');\n if (!$filePointer) {\n throw new Exception(_('Could not open the Appeal table file'));\n }\n while (($data = fgetcsv($filePointer, 0, \";\")) !== FALSE) {\n $this->appealTable[$data[0]] = array('votes' => $data[1] , 'special' => (isset($data[2]) ? $data[2] : NULL));\n }\n fclose($filePointer);\n }", "title": "" }, { "docid": "7113ace15b992d21361d44527480aa0b", "score": "0.54319555", "text": "function addRow($q)\n {\n $this->connection->exec($q);\n }", "title": "" }, { "docid": "b3240b2d3a5f2641092ce56490724991", "score": "0.5425073", "text": "public function add(string $table, string $id, array $column, string $where = null): void\n {\n $this->table[] = [\n 'table' => $table,\n 'id' => $id,\n 'column' => $column,\n 'where' => $where,\n ];\n }", "title": "" }, { "docid": "222e8596758b62386b48af564b9f31a0", "score": "0.5423072", "text": "public function action_add_row($table){\n\n\t\tSession::put('href.previous', URL::full());\n\n\t\t$data \t\t\t\t= \tarray();\n\t\t$data[\"table_name\"] = \t$table;\n\t\t$data[\"table\"] \t\t= \t$table::get_model(false, true);\n\t\t$data[\"page\"] \t\t= \t'admin.filedb.new_row';\n\n\t\t$data[\"no_json\"]['created_at'] \t= \n\t\t$data[\"no_json\"]['updated_at'] \t= \n\t\t$data[\"no_json\"]['id'] \t\t\t= '';\n\t\t$data[\"json_save\"][\"table\"] \t= $table;\n\n\t\t$data[\"table\"] \t\t= \tFiledb::array_to_object(array_diff_key($data[\"table\"], $data[\"no_json\"]));\n\t\n\t\treturn (Request::ajax()) ? View::make($data[\"page\"], $data) : View::make('admin.assets.no_ajax', $data);\n\t}", "title": "" }, { "docid": "2d4a22257aed4faea97dd1177e7d1da6", "score": "0.5418891", "text": "public function add($table, $data)\n {\n $columns = implode(',', array_keys($data));\n $newValues = array_map(function($values){\n return \"'\" . $values . \"'\";\n }, array_values($data));\n\n $newValues = implode(',', $newValues);\n\n $sql = \"INSERT INTO ${table}(${columns}) VALUES (${newValues})\";\n $this->_query($sql);\n }", "title": "" }, { "docid": "c0ebb36bca49fc5b241a1a94aed48577", "score": "0.54151785", "text": "public function testEditDocumentXlsxAppendRow()\n {\n }", "title": "" }, { "docid": "a2363cc0ef8595d6df6e0079bfe27481", "score": "0.54055166", "text": "public function criaTabela()\n {\n $this->execute('alter table avaliacaoperguntaopcao add column db104_identificadorcampo varchar(255);');\n }", "title": "" }, { "docid": "692512a0b89074f2f50a27e71d04271d", "score": "0.5403628", "text": "public function addToTable ( $table, $val ){ \n\t\t\t$sqlQuery = $this->config;\n\t\t\tif ( $val == null ) {\n\t\t\t\techo \"Log: insert values not defined;\"; \n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$query = $sqlQuery->getValue( \"table\", $table, \"insert\" );\n\t\t\t$i=1;\n\t\t\t$query =str_replace( \"table\", $table, $query );\n\t\t\tforeach ( $val as $value ) {\n\t\t\t\t$query =str_replace( \"val\".$i.\"\", $value, $query );\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\tmysql_query($query) or die ( \"Failed to add content!\" );\n\t\t}", "title": "" }, { "docid": "916660fe2156f99a8d69c0e2dc6bec03", "score": "0.5399569", "text": "public function addRow($id, $key, $value, $row) {\n \n //$this->db->simple_update(\"experiments\", \"num_rows\", $row[0]['num_rows']++, $id);\n //$value = $this->db->real_escape_string($value);\n $this->db->insert(\"exp_rows\", \"exp_id, col, data, exp_row\", \"$id, '$key', '$value', $row\");\n }", "title": "" }, { "docid": "9139a4df4e1b80258c8fa3ad4767f152", "score": "0.5399558", "text": "public function insert_table_Relation(array $dataForm): int ;", "title": "" }, { "docid": "2e6db01ea4414a1427b2c2b98486349a", "score": "0.5394207", "text": "public function install(){\n $table = new $this->xmldb_table( $this->tablename );\n $set_attributes = method_exists($this->xmldb_key, 'set_attributes') ? 'set_attributes' : 'setAttributes';\n\n $table_id = new $this->xmldb_field('id');\n $table_id->$set_attributes(XMLDB_TYPE_INTEGER, 10, XMLDB_UNSIGNED, XMLDB_NOTNULL, XMLDB_SEQUENCE);\n $table->addField($table_id);\n\n $table_report = new $this->xmldb_field('reportfield_id');\n $table_report->$set_attributes(XMLDB_TYPE_INTEGER, 10, XMLDB_UNSIGNED, null);\n $table->addField($table_report);\n\n //1=single, 2=multi cf blocks/ilp/constants.php\n $table_optiontype = new $this->xmldb_field('selecttype');\n $table_optiontype->$set_attributes(XMLDB_TYPE_INTEGER, 1, XMLDB_UNSIGNED, null);\n $table->addField($table_optiontype);\n\n //0= save to sts_ent, 2= save to userstatus (update user status)\n $table_optiontype = new $this->xmldb_field('savetype');\n $table_optiontype->$set_attributes(XMLDB_TYPE_INTEGER, 1, XMLDB_UNSIGNED, null);\n $table->addField($table_optiontype);\n\n $table_timemodified = new $this->xmldb_field('timemodified');\n $table_timemodified->$set_attributes(XMLDB_TYPE_INTEGER, 10, XMLDB_UNSIGNED, XMLDB_NOTNULL);\n $table->addField($table_timemodified);\n\n $table_timecreated = new $this->xmldb_field('timecreated');\n $table_timecreated->$set_attributes(XMLDB_TYPE_INTEGER, 10, XMLDB_UNSIGNED, XMLDB_NOTNULL);\n $table->addField($table_timecreated);\n\n $table_key = new $this->xmldb_key('primary');\n $table_key->$set_attributes(XMLDB_KEY_PRIMARY, array('id'));\n $table->addKey($table_key);\n\n $table_key = new $this->xmldb_key('textplugin_unique_reportfield');\n $table_key->$set_attributes(XMLDB_KEY_FOREIGN_UNIQUE, array('reportfield_id'),'block_ilp_report_field','id');\n $table->addKey($table_key);\n\n\n if(!$this->dbman->table_exists($table)) {\n $this->dbman->create_table($table);\n }\n\n $table = new $this->xmldb_table( $this->items_tablename );\n\n $table_id = new $this->xmldb_field('id');\n $table_id->$set_attributes(XMLDB_TYPE_INTEGER, 10, XMLDB_UNSIGNED, XMLDB_NOTNULL, XMLDB_SEQUENCE);\n $table->addField($table_id);\n\n $table_textfieldid = new $this->xmldb_field('parent_id');\n $table_textfieldid->$set_attributes(XMLDB_TYPE_INTEGER, 10, XMLDB_UNSIGNED, XMLDB_NOTNULL);\n $table->addField($table_textfieldid);\n\n $table_itemvalue = new $this->xmldb_field('value');\n $table_itemvalue->$set_attributes(XMLDB_TYPE_CHAR, 255, null, null);\n $table->addField($table_itemvalue);\n\n $table_itemname = new $this->xmldb_field('name');\n $table_itemname->$set_attributes(XMLDB_TYPE_CHAR, 255, null, XMLDB_NOTNULL);\n $table->addField($table_itemname);\n\n $table_hexcolour = new $this->xmldb_field('hexcolour');\n $table_hexcolour->$set_attributes(XMLDB_TYPE_CHAR, 255, null);\n $table->addField($table_hexcolour);\n\n $table_icon = new $this->xmldb_field('icon');\n $table_icon->$set_attributes(XMLDB_TYPE_CHAR, 45, null);\n $table->addField($table_icon);\n\n $table_display_option = new $this->xmldb_field('display_option');\n $table_display_option->$set_attributes(XMLDB_TYPE_CHAR, 4, null);\n $table->addField($table_display_option);\n\n $table_description = new $this->xmldb_field('description');\n $table_description->$set_attributes(XMLDB_TYPE_CHAR, 255, null);\n $table->addField($table_description);\n\n $table_bg_colour = new $this->xmldb_field('bg_colour');\n $table_bg_colour->$set_attributes(XMLDB_TYPE_CHAR, 45, null);\n $table->addField($table_bg_colour);\n\n //special field to categorise states as pass or fail\n //0=unset,1=fail,2=pass\n $table_itempassfail = new $this->xmldb_field( 'passfail' );\n $table_itempassfail->$set_attributes( XMLDB_TYPE_INTEGER, 1, XMLDB_UNSIGNED, XMLDB_NOTNULL, '0', null, null, '0' );\n $table->addField( $table_itempassfail );\n\n $table_timemodified = new $this->xmldb_field('timemodified');\n $table_timemodified->$set_attributes(XMLDB_TYPE_INTEGER, 10, XMLDB_UNSIGNED, XMLDB_NOTNULL);\n $table->addField($table_timemodified);\n\n $table_timecreated = new $this->xmldb_field('timecreated');\n $table_timecreated->$set_attributes(XMLDB_TYPE_INTEGER, 10, XMLDB_UNSIGNED, XMLDB_NOTNULL);\n $table->addField($table_timecreated);\n\n $table_key = new $this->xmldb_key('primary');\n $table_key->$set_attributes(XMLDB_KEY_PRIMARY, array('id'));\n $table->addKey($table_key);\n\n $table_key = new $this->xmldb_key('listplugin_unique_fk');\n $table_key->$set_attributes(XMLDB_KEY_FOREIGN, array('parent_id'), $this->tablename, 'id');\n $table->addKey($table_key);\n\n if(!$this->dbman->table_exists($table)) {\n $this->dbman->create_table($table);\n }\n\n // create the new table to store responses to fields\n $table = new $this->xmldb_table( $this->data_entry_tablename );\n\n $table_id = new $this->xmldb_field('id');\n $table_id->$set_attributes(XMLDB_TYPE_INTEGER, 10, XMLDB_UNSIGNED, XMLDB_NOTNULL, XMLDB_SEQUENCE);\n $table->addField($table_id);\n\n $table_maxlength = new $this->xmldb_field('parent_id');\n $table_maxlength->$set_attributes(XMLDB_TYPE_INTEGER, 10, XMLDB_UNSIGNED, XMLDB_NOTNULL);\n $table->addField($table_maxlength);\n\n $table_item_id = new $this->xmldb_field('value');\t//foreign key -> $this->items_tablename\n $table_item_id->$set_attributes(XMLDB_TYPE_CHAR, 255, XMLDB_UNSIGNED, XMLDB_NOTNULL);\n $table->addField($table_item_id);\n\n $table_report = new $this->xmldb_field('entry_id');\n $table_report->$set_attributes(XMLDB_TYPE_INTEGER, 10, XMLDB_UNSIGNED, XMLDB_NOTNULL);\n $table->addField($table_report);\n\n $table_timemodified = new $this->xmldb_field('timemodified');\n $table_timemodified->$set_attributes(XMLDB_TYPE_INTEGER, 10, XMLDB_UNSIGNED, XMLDB_NOTNULL);\n $table->addField($table_timemodified);\n\n $table_timecreated = new $this->xmldb_field('timecreated');\n $table_timecreated->$set_attributes(XMLDB_TYPE_INTEGER, 10, XMLDB_UNSIGNED, XMLDB_NOTNULL);\n $table->addField($table_timecreated);\n\n $table_key = new $this->xmldb_key('primary');\n $table_key->$set_attributes(XMLDB_KEY_PRIMARY, array('id'));\n $table->addKey($table_key);\n\n $table_key = new $this->xmldb_key('listpluginentry_unique_fk');\n $table_key->$set_attributes(XMLDB_KEY_FOREIGN, array('parent_id'), $this->tablename, 'id');\n $table->addKey($table_key);\n\n if(!$this->dbman->table_exists($table)) {\n $this->dbman->create_table($table);\n }\n\n }", "title": "" }, { "docid": "19b59e93d5d3e8fd9cb6ee2bce334763", "score": "0.5388437", "text": "function append($newRows) { \n\t\t$rslt = new STable($this->_keys);\n\t\t$rslt->_rows = $this->_rows;\n\t\tforeach ($newRows as $row){\n\t\t\tif ($this->_keys != array_keys($row))\n\t\t\t\tthrow new Exception('STable::append: Not all rows have correct column names.');\n\t\t\t$rslt->_rows[] = $row;\n\t\t}\n return $rslt;\n }", "title": "" }, { "docid": "6f544c9bed06d38630b7b6cc03eae577", "score": "0.5383551", "text": "function aliivaInsert($newValue) {\r\n $table = 'aliiva';\r\n $columns = array('codice', 'tipiva', 'operation_type', 'aliquo', 'fae_natura', 'descri', 'status', 'annota', 'adminid');\r\n $newValue['adminid'] = $_SESSION[\"user_name\"];\r\n tableInsert($table, $columns, $newValue);\r\n}", "title": "" }, { "docid": "9ef32fa0fe3413c6c75b5c19d514a3ef", "score": "0.53772944", "text": "function serie_tableplus ($type, $qte) {\n\t\t\t\t\n\t\t\t\t// création de la série\n\t\t\t\t$tab_exo = array (\"\"); $operation = \"\";\n\t\t\t\tfor ($i=0;$i<$qte;$i++) {\n\t\t\t\t\twhile (in_array($operation,$tab_exo)) { \n\t\t\t\t\t\t$nombre = rand(1,10);\n\t\t\t\t\t\t$operation = \"$type + $nombre = ?\";\n\t\t\t\t\t}\n\t\t\t\t\t$tab_exo[$i] = $operation;\n\t\t\t\t\t$tab_resultat[$i] = ((int)$type + $nombre);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// retour\n\t\t\t\t$tab_serie = array ($tab_exo,$tab_resultat); \n\t\t\t\treturn $tab_serie;\n\t\t\t}", "title": "" }, { "docid": "d3a709510d914d7d9726b25ae79eb204", "score": "0.53748035", "text": "public function insert($table);", "title": "" }, { "docid": "d6eb8ba4943ebc266fccf5656e5153e5", "score": "0.5369541", "text": "function AddIndex($table, $type, $name)\r\n{\r\n\t// Clean parameters\r\n\t$table = trim(strval($table));\r\n\t$type = trim(strval($type));\r\n\t$name = trim(strval($name));\r\n\tif ($table == '') return false;\r\n\tif ($type == '') return false;\r\n\tif ($name == '') return false;\r\n\r\n\t$table = $this->tblprefix . $table;\r\n\tif (!is_array($name)) $name = array($name);\r\n\t$fields = '';\r\n\tforeach ($name as $n)\r\n\t{\r\n\t\t$fields .= ($fields ? ', ' : '') . '`' . $n . '`';\r\n\t}\r\n\treturn $this->Exec('ALTER TABLE `' . $table . '` ADD ' . $type . ' (' . $fields . ')');\r\n}", "title": "" }, { "docid": "ffa1bd423a8218eb35e97acc8b680342", "score": "0.5357034", "text": "public function addTableRow($data) {\n $offset = $this->_tableParams['offset'];\n\n foreach ($data as $d)\n $this->_xls->getActiveSheet()->setCellValueByColumnAndRow($offset++, $this->_row, $d);\n\n $this->_row++;\n $this->_tableParams['row_count']++;\n\n return $this;\n }", "title": "" }, { "docid": "442145845030481b7cf3353987c5ee02", "score": "0.53560984", "text": "public function insert(){}", "title": "" }, { "docid": "9bcb82edb8802e1d799f3be6412ee94b", "score": "0.53554696", "text": "function insert()\n\t{\n\t\t$this->edit(true);\n\t}", "title": "" }, { "docid": "7a650a1b80a97a53b0405df1f453902b", "score": "0.5352214", "text": "public function register_table() {\n\t\tglobal $wpdb;\n\t\t$wpdb->affiliatemeta = $this->table_name;\n\t}", "title": "" }, { "docid": "5e79d93a9a11d103434c4f91314072a9", "score": "0.5350114", "text": "public function testEditDocumentDocxUpdateTableCell()\n {\n }", "title": "" }, { "docid": "8189cfcd3834c5bef0ec864c3feff6f7", "score": "0.5344643", "text": "function add_to_table($table, $champ, $value){\r\n $query = \"INSERT INTO $table($champ) VALUES($value)\";\r\n $result = pg_query($query);\r\n }", "title": "" }, { "docid": "cf7e53aa471632e6c4ee507536ef5147", "score": "0.5337794", "text": "public abstract function into($table);", "title": "" }, { "docid": "7b8dda9b6b11a80e6bacb38c1679a76e", "score": "0.53316915", "text": "public function addRow($row)\r\n\t{\r\n\t\t$rowClass = $this->table->getRowClass();\r\n\t\t$rowObject = new $rowClass($this, $row);\r\n\t\t$this->rows[] = $rowObject;\r\n\t\t$this->append($rowObject);\r\n\t}", "title": "" }, { "docid": "e44f0f7fa6eb0904c67afebb62f90471", "score": "0.5331637", "text": "function ImprovedTable($header, $data)\r\n{\r\n // Column widths\r\n $w = array(10,35,90,120);\r\n // Header\r\n for($i=0;$i<count($header);$i++)\r\n $this->Cell($w[$i],7,$header[$i],1,0,'C');\r\n $this->Ln();\r\n // Data\r\n foreach($data as $row)\r\n {\r\n $this->Cell($w[0],6,$row[0],'LR');\r\n $this->Cell($w[1],6,$row[1],'LR');\r\n $this->Cell($w[2],6,$row[2],'LR');\r\n $this->Cell($w[3],6,$row[3],'LR');\r\n $this->Ln();\r\n }\r\n // Closing line\r\n $this->Cell(array_sum($w),0,'','T');\r\n}", "title": "" }, { "docid": "8db623a2c2e2acd9fb399017979386a0", "score": "0.5327448", "text": "public function addcolumns()\n\t{\n\t\t$this->writePostData(true);\n\t\t$position = key($_POST['cmd']['addcolumns']);\n\t\t$this->object->getColumns()->addCategoryAtPosition(\"\", $position+1);\n\t\t$this->editQuestion();\n\t}", "title": "" }, { "docid": "a194fb0050626b3a78cdc0c3f123a3cd", "score": "0.5325024", "text": "function addadsmodel() {\n\t\t$rs_ads = JTable::getInstance('hdflvplayerads', 'Table');\n\t\t$add = array('rs_ads' => $rs_ads);\n\t\treturn $add;\n\t}", "title": "" }, { "docid": "fd23c75f0aeb23fc8d3ab61149943748", "score": "0.53139585", "text": "public function testEditDocumentDocxInsertTable()\n {\n }", "title": "" }, { "docid": "05044de8b1127d969f038e522899036a", "score": "0.5312265", "text": "protected function processCurrentTable()\n\t{\n\t\t$firstRow = $this->table['rows'][0];\n\t\t$lastRow = end($this->table['rows']);\n\t\t$this->createTableTags($firstRow['pos'], $lastRow['pos'] + strlen($lastRow['line']));\n\n\t\t$this->addTableHead();\n\t\t$this->createSeparatorTag($this->table['rows'][1]);\n\t\t$this->addTableBody();\n\t}", "title": "" }, { "docid": "8ab52206fbc1c6963292c01d270775ec", "score": "0.5311357", "text": "public function add_to_table($tablename,$array)\n {\n $this->db->insert($tablename,$array);\n return $this->db->insert_id();\n }", "title": "" }, { "docid": "0545649a7eedbc04f7e341b1d5cb3919", "score": "0.5294771", "text": "protected function addTableHead()\n\t{\n\t\t$this->addTableRow('TH', $this->table['rows'][0]);\n\t\t$this->createHeadTags($this->table['rows'][0]['pos'], $this->pos);\n\t}", "title": "" }, { "docid": "84cf17fa6948f4dc34d68e99e99f293e", "score": "0.52894247", "text": "public function insertRowInDetailDML()\n {\n\t\t$sql = $this->getQueryContent('insertRowInDetailDML');\n\t\t$this->db->fireSqlQuery($sql);\n\t}", "title": "" }, { "docid": "2309a374c60c9393c659ea376a1e7670", "score": "0.52851695", "text": "public function insertRow()\n {\n $row = new HTMLTableRow();\n //armazena no array de linhas\n parent::appendChild($row);\n return $row;\n }", "title": "" }, { "docid": "d87fb6fc22a79532a8b459042045b3d2", "score": "0.52768254", "text": "function open_table(invoice $invoice){\n //\n //Save teh invoive for further references\n $this->invoice=$invoice;\n //\n //Open the table tag; the invoice can be used to supply data for setting\n //any attributes that are needed\n echo \"<$this->table_tag>\";\n }", "title": "" }, { "docid": "18da3c40f054738e46c14a7a54e1169e", "score": "0.52768046", "text": "public function add_row_to_table ($table_name, $to_insert)\n\t{\n\t\tglobal $wpdb;\n\t\t\n\t\t$format = $this->_take_each_string_and_return_format_array_for_row_insertion($to_insert);\n\n\t\t$wpdb->insert( \"$wpdb->prefix$table_name\", $to_insert, $format );\n\t}", "title": "" }, { "docid": "5d0b8f700a258eb5f4744cd38261a18d", "score": "0.5276569", "text": "function tableInsert( $table ,$input ) \n{\n\n//se id=0 allora eliminiamo id, e proseguiamo rompendo i coglioni il meno possibile\n\nif( array_key_exists( 'id' ,$input ) )\n{\n\tif( 0 == intval( $input['id'] ) )\n\t\tunset($input['id'] );\n}\n\n\n\n//tra gli attributi mettiamo anche il rowid\n$attributes_k= //array_merge( array( 'rowid' ),array_values( $this->tableDescribe( $table ) ) );\n\t\t\t\tarray_values( $this->tableDescribe( $table ) );\n\n$n= sizeof( $attributes_k ); \n\n$attributes_default= array_pad( array(),$n,null);\n$attributes= array_combine($attributes_k ,$attributes_default);\n\n$input= array_intersect_key($input,$attributes );\n$input= array_merge( $attributes,$input );\n\n//print_r( $input );\n\n$aAttributi= array();\n$aAttributi2= array();\nforeach( $input as $k => $v )\n{\n\t$aAttributi[]= $k;\n\t$aAttributi2[]= ':'.$k;\n}\n$sAttributi= implode(',', $aAttributi);\n$sAttributi2= implode(',', $aAttributi2);\n\n\t$sql= \"INSERT INTO $table ($sAttributi) VALUES ($sAttributi2)\";\t\n\n\t$stmt = $this->prepare( $sql );\n\nforeach( $input as $k => $v )\n{\n\t$stmt->bindValue(':'.$k, $v, PDO::PARAM_STR);\n\t//fixme, qui potrebbe bindare col parm_int parm_bool http://php.net/manual/en/pdo.constants.php\n}\n\n\t$result = $stmt->execute();\n\nreturn $this->lastInsertId();\n}", "title": "" }, { "docid": "d1d99060f0330423e7f8b4534e16e866", "score": "0.5270355", "text": "public function dataTable();", "title": "" }, { "docid": "1abf8255fcc3a90c61c88a1283410573", "score": "0.5268104", "text": "public function Add()\n\t{\n\t\t$this->_processInsert();\n\t}", "title": "" }, { "docid": "c74b7bbee79a757bf377d1f402e0c7fe", "score": "0.5257273", "text": "abstract public function createRow();", "title": "" }, { "docid": "70066e6499652276f10fb66098b491d4", "score": "0.52565634", "text": "public function add(){\n\t\t$sql = \"insert into \".self::$tablename.\" (NOMBRE,NOMBRE_CORTO,ES_PUBLICO) \";\n\t\t$sql .= \"value (\\\"$this->name\\\",\\\"$this->short_name\\\",$this->is_public)\";\n\t\tExecutor::doit($sql);\n\t}", "title": "" }, { "docid": "d05e6565bffcf4a5b19ee5a41fd8f855", "score": "0.5256438", "text": "public function table();", "title": "" }, { "docid": "d05e6565bffcf4a5b19ee5a41fd8f855", "score": "0.5256438", "text": "public function table();", "title": "" }, { "docid": "0b1d48d949bf3083375ffa9689873baa", "score": "0.525575", "text": "public function insertar(){\n\t\t\n Articulo::insertarBD();\n call('articulo', 'index',null);\n\n\n\t}", "title": "" }, { "docid": "ab95789824ffc2cc858ad838acde500c", "score": "0.5255547", "text": "function hook_tapir_table_alter(&$table, $table_id) {\n if ($table_id == 'uc_product_table') {\n foreach (element_children($table) as $key) {\n $node = node_load($table['#parameters'][1][$key]);\n\n $table[$key]['designer'] = array(\n '#value' => l($node->designer, 'collections/'.$node->designer_tid),\n '#cell_attributes' => array(\n 'nowrap' => 'nowrap',\n ),\n );\n }\n }\n}", "title": "" } ]
047a38c3a08278a36176a9eb84668627
Test case for updateFinancialStatementUsingPut Update an financialStatement.
[ { "docid": "10c0eef4168d2ae7a7461060b00bb5b5", "score": "0.8807804", "text": "public function testUpdateFinancialStatementUsingPut()\n {\n }", "title": "" } ]
[ { "docid": "d7c9ec527b87c662c847803cb84bca33", "score": "0.6219634", "text": "public function testUpdate()\n {\n $data = array(\n 'foo' => 'baz'\n );\n\n $transaction = $this->client->transaction()->Update(654, $data);\n\n $this->assertEquals($data, get_object_vars($transaction->put), 'Passed variables are not correct');\n $this->assertEquals('PUT', $transaction->request_method, 'The PHP Verb Is Incorrect');\n $this->assertEquals('/transactions/654', $transaction->path, 'The path is incorrect');\n\n }", "title": "" }, { "docid": "e713d49b5d169aef1f7a966864d38dc9", "score": "0.59683245", "text": "public function testCreateFinancialStatementUsingPost()\n {\n }", "title": "" }, { "docid": "8bb00ffed451601262691864485695bc", "score": "0.56798416", "text": "public function testGetFinancialStatementUsingGet()\n {\n }", "title": "" }, { "docid": "90cec2e0050ecd5971be612c49157c4a", "score": "0.56244624", "text": "public function testUpdateSupplierUsingPUT()\n {\n }", "title": "" }, { "docid": "36d6fada0c02d7dcd7a5edbe00b5cf8d", "score": "0.5564877", "text": "public function testUpdateCategoryUsingPUT()\n {\n }", "title": "" }, { "docid": "5ef46f178a20f4ff26a807c153de2e2d", "score": "0.537018", "text": "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 }", "title": "" }, { "docid": "f73bdb8f29b7522a34cdce4dd6640eab", "score": "0.5354768", "text": "public function testUpdateSuperfund()\n {\n }", "title": "" }, { "docid": "3ce624463b5cfcf3a9a87d2e51065be7", "score": "0.5348585", "text": "function doPUT (HttpRequest $request, HttpResponse $response) {\n throw new Exception(\"PUT method not supported\");\n }", "title": "" }, { "docid": "822e477ad189062a5405029e4ddeff6c", "score": "0.5329324", "text": "public function testUpdateMetadata3UsingPUT()\n {\n }", "title": "" }, { "docid": "1d78478eb4b350aef199895330d533df", "score": "0.53237534", "text": "public function testUpdatePayrun()\n {\n }", "title": "" }, { "docid": "7680e535ddc097a7c7467f63a1aaeab1", "score": "0.5270163", "text": "public function testUpdateMetadata1UsingPUT()\n {\n }", "title": "" }, { "docid": "79a6650932bb266821c208dd1ecda947", "score": "0.5256743", "text": "public function testShouldUpdateAPayoutWithSave()\n {\n $data = [\n 'customer' => ['id' => 1],\n 'currency' => ['iso' => 'XOF'],\n 'amount' => 1000,\n ];\n\n $body = [\n 'v1/payout' => [\n 'id' => 1,\n 'klass' => 'v1/payout',\n 'reference' => '109329828',\n 'amount' => 1000,\n 'status' => 'pending',\n 'customer' => [\n 'id' => 1,\n 'klass' => 'v1/customer',\n ],\n 'currency' => [\n 'id' => 1,\n 'klass' => 'v1/currency',\n 'iso' => 'XOF'\n ],\n 'mode' => 'mtn',\n 'created_at' => '2018-03-12T09:09:03.969Z',\n 'updated_at' => '2018-03-12T09:09:03.969Z',\n ]\n ];\n\n $this->mockRequest('post', '/v1/payouts', $data, $body);\n\n $payout = \\FedaPay\\Payout::create($data);\n $payout->amount = 5000;\n\n $updateData = [\n 'klass' => 'v1/payout',\n 'reference' => '109329828',\n 'amount' => 5000,\n 'status' => 'pending',\n 'customer' => [\n 'klass' => 'v1/customer',\n ],\n 'currency' => [\n 'klass' => 'v1/currency',\n 'iso' => 'XOF'\n ],\n 'mode' => 'mtn',\n 'created_at' => '2018-03-12T09:09:03.969Z',\n 'updated_at' => '2018-03-12T09:09:03.969Z',\n ];\n\n $this->mockRequest('put', '/v1/payouts/1', $updateData, $body);\n $payout->save();\n }", "title": "" }, { "docid": "555062fe99f0341f8ea462dd3543450d", "score": "0.5239986", "text": "public function testGetFinancialStatementAllUsingGet()\n {\n }", "title": "" }, { "docid": "baf42bb6454307d6da79fafb759d1e66", "score": "0.5237995", "text": "function update_price($symbol = null) {\n\n $whereCondition = \"WHERE user_id = \".$this->user->user_id.\" AND symbol = '\".$symbol.\"';\";\n DB::instance(DB_NAME)->update(\"transactions\", $_POST, $whereCondition);\n\n }", "title": "" }, { "docid": "9658aec15807bac2660d5085afd02ae7", "score": "0.5235063", "text": "public function testPutValue() : void {\n\t\t$this->assertEquals('PUT', HttpMethod::Put->value);\n\t}", "title": "" }, { "docid": "ea9cd2f4e980d4ba14af1ed31e4a38bc", "score": "0.5228651", "text": "public function executePut()\n {\n throw new Frapi_Error('NO_PUT');\n }", "title": "" }, { "docid": "c687d00d622a64952f694a6286e1250b", "score": "0.52282226", "text": "public function testUpdateExternalShipment()\n {\n }", "title": "" }, { "docid": "9eb34cda0241bee4e008e9814a16682c", "score": "0.5222236", "text": "public function testUpdateMetadata2UsingPUT()\n {\n }", "title": "" }, { "docid": "cf4933d857ddbbff276113ba516a6e61", "score": "0.5220715", "text": "public function testExampleUpdateRequestShouldSucceed()\n {\n $example = Example::factory()->create();\n $response = $this->put(route('example.update', $example->id), [\n 'param1' => 100,\n 'param2' => 'Hello World',\n ]);\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "d7e65ed3895c81d0ba083f8b10a7535a", "score": "0.52040786", "text": "public function testShouldUpdateAPayout()\n {\n $data = [\n 'customer' => ['id' => 1],\n 'currency' => ['iso' => 'XOF'],\n 'amount' => 1000\n ];\n $body = [\n 'v1/payout' => [\n 'id' => 1,\n 'klass' => 'v1/payout',\n 'reference' => '109329828',\n 'amount' => 1000,\n 'status' => 'pending',\n 'customer' => [\n 'id' => 1,\n 'klass' => 'v1/customer',\n ],\n 'currency' => [\n 'id' => 1,\n 'klass' => 'v1/currency',\n 'iso' => 'XOF'\n ],\n 'mode' => null,\n 'created_at' => '2018-03-12T09:09:03.969Z',\n 'updated_at' => '2018-03-12T09:09:03.969Z',\n ]\n ];\n\n $this->mockRequest('put', '/v1/payouts/1', $data, $body);\n\n $payout = \\FedaPay\\Payout::update(1, $data);\n\n $this->assertInstanceOf(\\FedaPay\\Payout::class, $payout);\n $this->assertEquals(1, $payout->id);\n $this->assertEquals('109329828', $payout->reference);\n $this->assertEquals(1000, $payout->amount);\n $this->assertEquals('pending', $payout->status);\n $this->assertInstanceOf(\\FedaPay\\Customer::class, $payout->customer);\n $this->assertEquals(1, $payout->customer->id);\n $this->assertInstanceOf(\\FedaPay\\Currency::class, $payout->currency);\n $this->assertEquals(1, $payout->currency->id);\n $this->assertEquals(null, $payout->mode);\n }", "title": "" }, { "docid": "e849015693a86dbe921e3ae1098a2cab", "score": "0.5203972", "text": "public function update($updateDescriptor, $bulkOperationProgressKey = \"\"){\n $expectedExceptions = array();\n $expectedExceptions[\"\\\\Kinikit\\\\MVC\\\\Exception\\\\RateLimitExceededException\"] = \"\\Netistrar\\ClientAPI\\Exception\\RateLimitExceededException\";\n return parent::callMethod(\"\", \"PATCH\", array(\"bulkOperationProgressKey\" => $bulkOperationProgressKey),$updateDescriptor,\"\\Netistrar\\ClientAPI\\Objects\\Transaction\\Transaction\",$expectedExceptions);\n }", "title": "" }, { "docid": "e849015693a86dbe921e3ae1098a2cab", "score": "0.5203972", "text": "public function update($updateDescriptor, $bulkOperationProgressKey = \"\"){\n $expectedExceptions = array();\n $expectedExceptions[\"\\\\Kinikit\\\\MVC\\\\Exception\\\\RateLimitExceededException\"] = \"\\Netistrar\\ClientAPI\\Exception\\RateLimitExceededException\";\n return parent::callMethod(\"\", \"PATCH\", array(\"bulkOperationProgressKey\" => $bulkOperationProgressKey),$updateDescriptor,\"\\Netistrar\\ClientAPI\\Objects\\Transaction\\Transaction\",$expectedExceptions);\n }", "title": "" }, { "docid": "2bb7d5c3016049e75c990a1afb2804e8", "score": "0.5169471", "text": "protected function updateFinancialOfferUsingPutRequest($financial_offer, $financial_offer_id)\n {\n // verify the required parameter 'financial_offer' is set\n if ($financial_offer === null || (is_array($financial_offer) && count($financial_offer) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $financial_offer when calling updateFinancialOfferUsingPut'\n );\n }\n // verify the required parameter 'financial_offer_id' is set\n if ($financial_offer_id === null || (is_array($financial_offer_id) && count($financial_offer_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $financial_offer_id when calling updateFinancialOfferUsingPut'\n );\n }\n\n $resourcePath = '/financial_offer/{financial_offer_id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($financial_offer_id !== null) {\n $resourcePath = str_replace(\n '{' . 'financial_offer_id' . '}',\n ObjectSerializer::toPathValue($financial_offer_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($financial_offer)) {\n $_tempBody = $financial_offer;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\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 \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 // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\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 }", "title": "" }, { "docid": "4821f7756edb6754b0fb0be1304c87e6", "score": "0.51630527", "text": "public function testUpdate(): void { }", "title": "" }, { "docid": "ecf9c6e9f4e39844dc8c0326afad3dc7", "score": "0.51263225", "text": "function handlePut($isValid, $update)\n{\n $isSuccess = false;\n\n try {\n # extract the id portion of the URL\n $id = substr($_SERVER['PATH_INFO'], 1);\n # get the JSON format body and decode it\n $put = trim(file_get_contents(\"php://input\"));\n $data = json_decode($put, true);\n // var_dump($data);\n $isSuccess = $update($data, $id);\n } catch (Exception $e) {\n}\n\n $resp = new stdClass();\n $resp->success = $isSuccess;\n\n echo json_encode($resp);\n}", "title": "" }, { "docid": "d53cd52a7f76b5d11d667ef5077ff12a", "score": "0.5117802", "text": "public function testUpdateBrandUsingPUT()\n {\n }", "title": "" }, { "docid": "d17cd37d7d652596cc0e0f81677f337f", "score": "0.51103276", "text": "public function testDeleteFinancialStatementUsingDelete()\n {\n }", "title": "" }, { "docid": "16f68e9f43d0dc9a8aa72c96a758c7ee", "score": "0.51058525", "text": "public function testUpdateChangesInputInDatabase()\n {\n $transaction = factory(Transaction::class)->states('with_account')->create();\n $transactionArray = $transaction->toArray();\n $transactionArray['amount'] = 155.49;\n\n $updatedTransaction = $this->repository->update($transactionArray, $transaction->id);\n\n $this->assertEquals($transaction->id, $updatedTransaction->id);\n $this->assertDatabaseHas('transactions', array_add($transactionArray, 'id', $updatedTransaction->id));\n }", "title": "" }, { "docid": "09fa38cc87b7b3490b30eb2d5d57dc7c", "score": "0.5077947", "text": "public function update(stubObject $entity);", "title": "" }, { "docid": "f4d265a2c85830cf88ef2a5959e4f65b", "score": "0.50635856", "text": "public function putAction()\n {\n try\n {\n $trackingReq = $this->_helper->TrackingRequest($this->_request->getRawBody());\n }\n catch (\\InvalidArgumentException $e)\n {\n $this->sendAlteredResponse(400, 'Malformed APP Envelope');\n }\n\n try\n {\n $this->trackingService->changeFulfillmentStatus($trackingReq);\n }\n catch (\\InvalidArgumentException $e)\n {\n $this->sendAlteredResponse(400, 'No ID passed in content');\n }\n catch (SE\\Infrastructure\\Tracking\\Exception $e)\n {\n $this->sendAlteredResponse(403, 'No Tracking Request Resource With This ID');\n }\n }", "title": "" }, { "docid": "c302dda225bafaae62186e285e777d81", "score": "0.5029415", "text": "public function testWorkflowsWorkflowIdPut()\n {\n }", "title": "" }, { "docid": "f118a5407d68bb44fd931fc137f470e2", "score": "0.5015684", "text": "function update(IContract $entity);", "title": "" }, { "docid": "fa0e3fe4cbc220b7d517d563ee973208", "score": "0.50131315", "text": "public function update(Request $request, ShareOfAssortment $shareOfAssortment)\n {\n //\n }", "title": "" }, { "docid": "f4417cb32e5625a903db8a6c53c1b4ab", "score": "0.4984158", "text": "public function put()\n {\n #HTTP method in uppercase (ie: GET, POST, PUT, DELETE)\n $sMethod = 'PUT';\n $sTimeStamp = gmdate('c');\n\n #Creating the hash\n\t\t$oHash = new Hash($this->getSecretKey());\n\t\t$oHash->addData($this->getPublicKey());\n\t\t$oHash->addData($sMethod);\n\t\t$oHash->addData($this->getApiResource());\n\t\t$oHash->addData($this->getData());\n\t\t$oHash->addData($sTimeStamp);\n\n\t\t$sHash = $oHash->hash();\n\n $rCurlHandler = curl_init();\n curl_setopt($rCurlHandler, CURLOPT_URL, $this->getApiRoot() . $this->getApiResource());\n curl_setopt($rCurlHandler, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($rCurlHandler, CURLOPT_POSTFIELDS, $this->getData());\n curl_setopt($rCurlHandler, CURLOPT_CUSTOMREQUEST, $sMethod);\n curl_setopt($rCurlHandler, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($rCurlHandler, CURLOPT_SSL_VERIFYHOST, 0);\n\n curl_setopt($rCurlHandler, CURLOPT_HTTPHEADER, [\n \"accept-language: \" . $this->getAcceptLanguage(),\n \"x-date: \" . $sTimeStamp,\n \"x-hash: \" . $sHash,\n \"x-public: \" . $this->getPublicKey(),\n \"Content-Type: text/json\",\n ]);\n $sOutput = curl_exec($rCurlHandler);\n $iHTTPCode = curl_getinfo($rCurlHandler, CURLINFO_HTTP_CODE);\n curl_close($rCurlHandler);\n\n Log::write('WebRequest', 'PUT::REQUEST', $this->getApiRoot() . $this->getApiResource());\n Log::write('WebRequest', 'PUT::DATA', $this->getData());\n Log::write('WebRequest', 'PUT::HTTPCODE', $iHTTPCode);\n Log::write('WebRequest', 'PUT::RESPONSE', $sOutput);\n\n $this->setData('');\n\n if ($iHTTPCode !== 204) {\n print_r($sOutput);\n throw new InvalidApiResponse('HttpCode was ' . $iHTTPCode . '. Expected 204');\n }\n return $sOutput;\n }", "title": "" }, { "docid": "6c1a7fca5b00106039e16ff84e8a7c95", "score": "0.49832156", "text": "public function putAction()\n {\n Extra_ErrorREST::setInvalidHTTPMethod($this->getResponse());\n }", "title": "" }, { "docid": "1a474ba1733a23dcec3c4ae69fab6ab8", "score": "0.49778575", "text": "public function update(Request $request, IntentionToPay $intentionToPay)\n {\n //\n }", "title": "" }, { "docid": "60f287bbae23d981ed4d814573c2161f", "score": "0.4964892", "text": "public function update(Request $request, StudentPayment $studentPayment)\n {\n //\n }", "title": "" }, { "docid": "7b3e39abb71195b9d884f000336c321c", "score": "0.49609753", "text": "public function update(Request $request, BusinessPaymentMethod $businessPaymentMethod)\n {\n //\n }", "title": "" }, { "docid": "4b0701f3928e8fecfc8cb0abc53c243f", "score": "0.4943724", "text": "public function test_update_an_id_that_does_exist()\n {\n\n $presentContent = '{\n \"student\": {\n \"is_present\": true\n }\n }';\n\n $absentContent = '{\n \"student\": {\n \"is_present\": false\n }\n }';\n \n // valid student id in database\n $response = $this->put('api/student/1651092040799', json_decode($presentContent, true));\n $response\n ->assertStatus(200)\n ->assertJson(['first_name'=> 'Chadwick', 'is_present'=> '1']);\n\n $response = $this->put('api/student/1651092040799', json_decode($absentContent, true));\n $response\n ->assertStatus(200)\n ->assertJson(['first_name'=> 'Chadwick', 'is_present'=> '0']);\n\n }", "title": "" }, { "docid": "a729e94db298ec8dc51bac640c45aac2", "score": "0.49411407", "text": "public function method_PUT( &$headers, $member ) {\n throw new DAV_Status( DAV_Request::$PARANOID ? REST::HTTP_CONFLICT : REST::HTTP_FORBIDDEN );\n}", "title": "" }, { "docid": "731d287623a2fed14dd2458324a1e99d", "score": "0.4916406", "text": "function update_portfolio($connection, $id, $symbol, $amount){\n $result = get_portfolio($connection, $id, $symbol);\n $newAmount = $result['amount'] + $amount;\n if ($newAmount < 1){\n remove_portfolio($connection, $id, $symbol);\n }\n else{\n try {\n $sql = \"UPDATE portfolio Set amount = ? WHERE userId = ? AND symbol = ?\";\n $result = runQuery($connection, $sql, array($newAmount, $id, $symbol));\n return $result;\n }\n catch (PDOException $e) {\n die( $e->getMessage() );\n }\n }\n}", "title": "" }, { "docid": "efa58e3621cddcd02a6e0ed99e0a9a6a", "score": "0.49015644", "text": "public function isPut()\n\t{\n\t\treturn $this->httpMethod() == self::MethodPut;\n\t}", "title": "" }, { "docid": "fcdf27852dd64a30a65de2b1ab871074", "score": "0.49010718", "text": "public function isPut()\n {\n return $this->_getMethod() === \\Yana\\Http\\Requests\\MethodEnumeration::PUT;\n }", "title": "" }, { "docid": "97a4cd4e13328331b6b74e9b8cc6d137", "score": "0.48889238", "text": "public function updateInTable(string $tableName, string $updateStatementWithValues, string $whereStatement):bool {\r\n // slozim dotaz\r\n $q = \"UPDATE $tableName SET $updateStatementWithValues WHERE $whereStatement\";\r\n // provedu ho a vratim vysledek\r\n $obj = $this->executeQuery($q);\r\n if($obj == null){\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }", "title": "" }, { "docid": "486ee2ac0fde2081d382d1006bf9e696", "score": "0.4872848", "text": "public function update(Request $request, Salary $salary)\n {\n //\n }", "title": "" }, { "docid": "486ee2ac0fde2081d382d1006bf9e696", "score": "0.4872848", "text": "public function update(Request $request, Salary $salary)\n {\n //\n }", "title": "" }, { "docid": "9b202d0c337e2fd005edec3ee908e0ba", "score": "0.48687828", "text": "public function put(string $url, array $input = [], $headers = null);", "title": "" }, { "docid": "bce0b0aaab4a3c69707745623590378e", "score": "0.4861804", "text": "public function putAction() {\n\t\t$this->_notImplemented();\n\t}", "title": "" }, { "docid": "81b4767a5891ce609047ae8896b4917a", "score": "0.48544437", "text": "function put() \n {\n \n }", "title": "" }, { "docid": "21af5b21beb6ee41b0b131a890107999", "score": "0.4850474", "text": "public function testUpdateEmployee()\n {\n }", "title": "" }, { "docid": "4e386e67b2f97c57227e21cd17b1a0a2", "score": "0.4839461", "text": "public function update(Request $request, ManualPay $manualPay)\n {\n //\n }", "title": "" }, { "docid": "54bb3f27a04b1d9a60c7344d3db9bfce", "score": "0.48328602", "text": "public function update( int $expenseId, array $parameters );", "title": "" }, { "docid": "114c137b8d194f7d3ff79d3e7ef95649", "score": "0.48286903", "text": "public function testUpdate()\n {\n $response = $this->action('PUT', '\\Modules\\Admin\\Http\\Controllers\\FaqCategoryController@update', ['id' => '1', 'name' => 'Specific', 'position' => '4', 'status' => '1']);\n\n $this->assertResponseStatus(200 || 302, $response->status());\n\n if ($response->status() == 302) {\n $this->assertInstanceOf('Illuminate\\Http\\RedirectResponse', $response);\n } else if ($response->status() == 200) {\n $this->assertInstanceOf('Illuminate\\Http\\JsonResponse', $response);\n }\n }", "title": "" }, { "docid": "7b5eac2eff48d735e500fdd32a556e0e", "score": "0.4827189", "text": "public function testPutAuthorizationDivision()\n {\n }", "title": "" }, { "docid": "95ad84942e6b8cb9993f0f1c9784be8f", "score": "0.48225597", "text": "public function update(Request $request, TransferAmount $transferAmount)\n {\n //\n }", "title": "" }, { "docid": "e439bbc30d7c663aa6f0f164fa2f5ab3", "score": "0.48223326", "text": "public function testUpdate()\n {\n $model = $this->makeFactory();\n $model->save();\n\n $newModel = $this->makeFactory();\n\n $this->json('PUT', static::ROUTE . '/' . $model->id, $newModel->toArray(), [\n 'Authorization' => 'Token ' . self::getToken()\n ])\n ->seeStatusCode(JsonResponse::HTTP_OK) \n ->seeJson($newModel->toArray());\n }", "title": "" }, { "docid": "c121f37b609a83660f101185599eabc0", "score": "0.48209321", "text": "public function Put( $sUrl, $vRequestBody, $bJsonEncode = false );", "title": "" }, { "docid": "72714f470bcab3c5bf289793e6c73b07", "score": "0.48044506", "text": "public function saveAcademicUpdateUnderRequest(AcademicUpdateDto $academicUpdateDto, $loggedInPerson)\n {\n $loggedInPersonId = $loggedInPerson->getId();\n $organization = $loggedInPerson->getOrganization();\n $organizationId = $organization->getId();\n $requestDetails = $academicUpdateDto->getRequestDetails();\n\n //Set the current date time, get whether or not students should be notified,\n $currentDateTime = new \\DateTime();\n $notifyStudent = $organization->getSendToStudent();\n\n //For all of the year / term / course combinations\n foreach ($requestDetails as $requestDetail) {\n\n //Get the student's academic update details within that course\n $updateDetails = $requestDetail->getstudentDetails();\n //For each student within that course\n foreach ($updateDetails as $updateDetail) {\n // If send_to_student flag is true in organization and student_send flag is also true in academic update request json\n // then only send email to student\n if ($notifyStudent == $updateDetail->getStudentSend()) {\n $notifyStudent = $updateDetail->getStudentSend();\n } else {\n $notifyStudent = false;\n }\n //Get the academic update ID of the request to be updated\n $academicUpdateId = $updateDetail->getAcademicUpdateId();\n //student ID of the updated student\n $studentId = $updateDetail->getStudentId();\n\n $studentObject = $this->personRepository->find(\n $studentId,\n new SynapseValidationException(\"Student ID {$studentId} is not valid at the organization.\")\n );\n\n // validate academic update\n $academicUpdate = $this->academicUpdateRepository->find(\n $academicUpdateId,\n new SynapseValidationException(\"Academic Update ID {$academicUpdateId} is not valid at the organization.\")\n );\n\n //CourseId of the academic update to be updated\n $academicUpdateOrgCourses = $academicUpdate->getOrgCourses();\n $courseId = $academicUpdateOrgCourses->getId();\n $courseName = $academicUpdateOrgCourses->getCourseName();\n\n //AcademicUpdateRequest Entity of associated request\n $academicUpdateRequest = $academicUpdate->getAcademicUpdateRequest();\n\n //If the academic update request exists, set the id value. Otherwise, set the variable to NULL.\n //TODO: Figure out why adhoc updates have some links to requests.\n if ($academicUpdateRequest) {\n $academicUpdateRequestId = $academicUpdateRequest->getId();\n } else {\n $academicUpdateRequestId = null;\n }\n\n //Get any academic updates and requests associated with the course, organization, and student. Add the academic update and associated request to the array returned from the repository function.\n $academicUpdatesWithinAssociatedRequests = $this->academicUpdateRequestRepository->getAcademicUpdatesInOpenRequestsForStudent($courseId, $organizationId, $studentId, $currentDateTime->format(SynapseConstant::DEFAULT_DATETIME_FORMAT), $loggedInPersonId);\n $academicUpdatesWithinAssociatedRequests[] = ['academic_update_id' => $academicUpdateId, 'academic_update_request_id' => $academicUpdateRequestId];\n // making sure that the array is unique , else it would end up in sending multiple mails.\n $academicUpdatesWithinAssociatedRequests = array_unique($academicUpdatesWithinAssociatedRequests, SORT_REGULAR);\n\n $dataProcessingExceptionHandler = new DataProcessingExceptionHandler();\n //For each update/request pair\n foreach ($academicUpdatesWithinAssociatedRequests as $academicUpdateWithinAssociatedRequest) {\n //Set the ID values of each to a variable\n $academicUpdateId = $academicUpdateWithinAssociatedRequest['academic_update_id'];\n $academicUpdateRequestId = $academicUpdateWithinAssociatedRequest['academic_update_request_id'];\n\n //Get the entities associated with those IDs\n $academicUpdate = $this->academicUpdateRepository->find(\n $academicUpdateId,\n new SynapseValidationException(\"Academic Update ID {$academicUpdateId} is not valid at the organization.\")\n );\n\n if ($academicUpdateRequestId) {\n $academicUpdateRequest = $this->academicUpdateRequestRepository->find(\n $academicUpdateRequestId,\n new SynapseValidationException(\"Academic Update Request ID {$academicUpdateRequestId} is not valid at the organization.\")\n );\n } else {\n $academicUpdateRequest = null;\n }\n\n\n //Check to see if the logged in user has access to update the academic update or request.\n //TODO: Make sure if there's a case of this failing to update academic updates that it does not fail silently. Right now it will fail silently.\n $hasUpdateAccess = $this->canUserUpdateAcademicUpdate($academicUpdateId, $loggedInPersonId, $academicUpdateRequest);\n\n //If the logged in user has update access\n if ($hasUpdateAccess) {\n //Update the academic update.\n $this->setAcademicUpdate($academicUpdate, $updateDetail, $currentDateTime, $loggedInPerson);\n\n // Validate entity\n $this->entityValidationService->validateDoctrineEntity($academicUpdate, $dataProcessingExceptionHandler, \"Default\", false);\n\n $academicUpdateEntityError = $dataProcessingExceptionHandler->getPlainErrors();\n if (count($academicUpdateEntityError) > 0) {\n throw new SynapseValidationException($academicUpdateEntityError);\n }\n\n //Flush the academic update repository\n $this->academicUpdateRepository->flush();\n } else {\n $studentName = $studentObject->getFirstname() . \" \" . $studentObject->getLastname();\n throw new AccessDeniedException(\"You are not the faculty assigned to the academic update on student {$studentName} and course {$courseName}.\");\n }\n }\n }\n }\n\n $this->academicUpdateRepository->flush();\n $this->updateAcademicUpdateDataFile($organizationId);\n return true;\n }", "title": "" }, { "docid": "51a3f9545d9dc7732a9ff75b434f8900", "score": "0.48018515", "text": "public function testUpdatePerson()\n {\n }", "title": "" }, { "docid": "e712071ddfc5eb315b9f7072fb5c4189", "score": "0.47997034", "text": "public function isPut();", "title": "" }, { "docid": "37a783343e7efd0a8396b260e4e55153", "score": "0.4799244", "text": "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 }", "title": "" }, { "docid": "13548ad759353b89503b3616ddb71cf9", "score": "0.47991577", "text": "public function testMakePutRequest()\n {\n $body = ['teacher' => 'Charles Xavier', 'job' => 'Professor'];\n $client = new MockClient('https://api.xavierinstitute.edu', [\n new JsonResponse($body),\n ]);\n\n $this->assertEquals($client->put('teachers/1', ['job' => 'Professor']), $body);\n }", "title": "" }, { "docid": "34dc7de08d38f160448e62904def01a1", "score": "0.47874078", "text": "public function update(Request $request, AccountBank $accountBank)\n {\n //\n }", "title": "" }, { "docid": "cd1262f7e8c0f400c98ace3133632ff9", "score": "0.4786081", "text": "public function put($url, $body = array(), $query = array(), $headers = array());", "title": "" }, { "docid": "54cb7bd18b2f0a27757ae23b90d4fca3", "score": "0.47823206", "text": "public function testValidPut() {\n\t\t//create a new organization, and insert into the database\n\t\t$organization = new Organization(null, $this->VALID_ADDRESS1, $this->VALID_ADDRESS2, $this->VALID_CITY, $this->VALID_DESCRIPTION,\n\t\t\t\t$this->VALID_HOURS, $this->VALID_NAME, $this->VALID_PHONE, $this->VALID_STATE, $this->VALID_TYPE, $this->VALID_ZIP);\n\t\t$organization->insert($this->getPDO());\n\n\t\t//update the organization\n\t\t$organization->setOrgName($this->VALID_NAME_ALT);\n\n\t\t//send the info to update to the API\n\t\t$response = $this->guzzle->put('https://bootcamp-coders.cnm.edu/~bbrown52/bread-basket/public_html/php/api/organization/' . $organization->getOrgId(), [\n\t\t\t\t'allow-redirects' => ['strict' => true],\n\t\t\t\t'json' => $organization,\n\t\t\t\t'headers' => ['X-XSRF-TOKEN' => $this->token]\n\t\t]);\n\n\t\t//ensure the response was sent, and the api returned a positive status\n\t\t$this->assertSame($response->getStatusCode(), 200);\n\t\t$body = $response->getBody();\n\t\t$retrievedOrg = json_decode($body);\n\t\t$this->assertSame(200, $retrievedOrg->status);\n\n\t\t//pull the value from the DB, and make sure it was properly updated\n\t\t$neworg = Organization::getOrganizationByOrgId($this->getPDO(), $organization->getOrgId());\n\t\t$this->assertSame($neworg->getOrgName(), $this->VALID_NAME_ALT);\n\t}", "title": "" }, { "docid": "6cac5769b4737dce46c196f7a0efa1f6", "score": "0.47822726", "text": "public function test_updateExternalShipment() {\n\n }", "title": "" }, { "docid": "57ef52070fa6c0dfc3b7e2247e96583c", "score": "0.47798184", "text": "public function testUpdateCar()\n {\n $id = 1;\n $car = Cars::find($id);\n $year = $car->year;\n $yearUpdate = 2000;\n //Test for user before update\n $this->assertNotEquals($yearUpdate, $year,\"Before update\");\n $statement = \"The year before updating is \" .$year. \" . \";\n ExampleTest::validate($this,$statement);\n DB::table('cars')\n ->where('id', $id)\n ->update(['year'=>$yearUpdate]);\n $newCar = Cars::find($id);\n $newYear = $newCar->year;\n $this->assertEquals($yearUpdate, $newYear,\"After Update\");\n $statement = \"The car year after updating is \".$newYear.\". \";\n ExampleTest::validate($this,$statement);\n }", "title": "" }, { "docid": "8df02b7d05686125bce7a258a286edef", "score": "0.47751525", "text": "public function update(Request $request, Income $income)\n {\n //\n }", "title": "" }, { "docid": "d15779ee97667c9083dce30a9cfdf6b1", "score": "0.47738728", "text": "function make_put_call($mid_url, $put_values) {\n global $base_url, $end_url;\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $base_url . $mid_url . $end_url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($put_values));\n \n $output = curl_exec($curl);\n curl_close($curl);\n \n return $output;\n }", "title": "" }, { "docid": "d07fe4404ba0a62ea00a965262979348", "score": "0.47657457", "text": "public function update(Request $request, balacetransaction $balacetransaction)\n {\n //\n }", "title": "" }, { "docid": "7069c63fabbce76109458898669c1ef1", "score": "0.476504", "text": "public function testD_update() {\n\n $fname = self::$generator->firstName();\n $lname = self::$generator->lastName;\n\n $resp = $this->wrapper->update( self::$randomEmail, [\n 'FNAME' => $fname,\n 'LNAME' => $lname\n ]);\n\n $this->assertObjectHasAttribute('id', $resp);\n $this->assertObjectHasAttribute('merge_fields', $resp);\n\n $updated = $resp->merge_fields;\n\n $this->assertEquals($lname, $updated->LNAME);\n\n }", "title": "" }, { "docid": "1be39296ceecbe479b49898a117f123d", "score": "0.47499144", "text": "public static function put(bool $put)\n {\n static::$put = $put;\n static::$repository = static::$vars = null;\n }", "title": "" }, { "docid": "9db246511e1e4bc49e7279232872085c", "score": "0.47473058", "text": "public function update(Request $request, Transaction $transaction)\n {\n\n }", "title": "" }, { "docid": "51e7a2787cd9d702c8756e1b078bc175", "score": "0.4743907", "text": "public function update(Request $request, OtherIncome $otherIncome)\n {\n //\n }", "title": "" }, { "docid": "6a95f1699d58a76965e685250d357aba", "score": "0.47425246", "text": "public function testUpdateStmt()\n {\n $update = $this->getConnection()\n ->update()\n ('dummy_posts')\n ('blog_title = :title');\n return $this->assertEquals($update, \"UPDATE dummy_posts SET blog_title = :title\");\n }", "title": "" }, { "docid": "16770e72f983ab22db9d910877ab1107", "score": "0.47409096", "text": "public function update(Request $request, Sales $sales)\n {\n //\n }", "title": "" }, { "docid": "d267fa6d2f885379819bf3194d5e6f39", "score": "0.47402456", "text": "abstract public function put(Request $request);", "title": "" }, { "docid": "a10124a4c3824fb42e04dc995c482c47", "score": "0.47332498", "text": "public function update_put(){\n $response = $this->PersonM->update_person(\n $this->put('id'),\n $this->put('name'),\n $this->put('hp'),\n $this->put('email'),\n $this->put('message')\n );\n $this->response($response);\n }", "title": "" }, { "docid": "01b9e7c04e688c386666517938d90e69", "score": "0.47323623", "text": "public function updatefunding($idFundingSource,$value){\n\t\t$connection=Database::getConnection();\n\t\t$query=\"UPDATE fundingsource SET \";\n\t\t$query.=\"fundingamount='\".$value['funding'].\"', \";\n\t\t$query.=\"spent='\".$value['spent'].\"', \";\n\t\t$query.=\"obligation='\".$value['obligation'].\"', \";\n\t\tif ($value['impactfee']==\"\"){\n\t\t\t$query.=\"impactfee=NULL \";\n\t\t}else{\n\t\t\t$query.=\"impactfee='\".$value['impactfee'].\"' \";\n\t\t}\n\t\t$query .= \"WHERE idFundingSource = '\".$idFundingSource.\"'\";\n\t\t$result_obj='';\n\t\t$result_obj=$connection->query($query);\n\t\tif (!$connection->query($query)){\n\t\t\techo \"Error :\" .$query . \"<br>\" . $connection->error;\n\t\t}else{\n\t\t\techo \"Funding updated successfully.<br>\\n\";\n\t\t}\n\t}", "title": "" }, { "docid": "b72fd701ba5f94681c7aa98d159ba941", "score": "0.4728967", "text": "public function testPut()\n\t{\n\t\t$rider = $this->riders[0];\n\t\t$horse = $this->horses[0];\n\n\t\t$data = [\n\t\t\t'rider_id' => $rider->id,\n\t\t\t'horse_id' => $horse->id,\n\t\t\t'brand_id' => $this->styles[0]->brand->id,\n\t\t\t'style_id' => $this->styles[0]->id,\n\t\t\t'name' => 'TestSaddle',\n\t\t\t'price' => '100',\n\t\t\t'serial_number' => '1234',\n\t\t\t'size' => '234',\n\t\t\t'type' => 'All Purpose',\n\t\t\t'gullet_size' => 'n',\n\t\t\t'panel_type' => 'Flock',\n\t\t\t'seat_style' => 'Deep seat',\n\t\t\t'purchased_at' => '11/11/2015',\n\t\t\t'warranty_period' => '5',\n\t\t];\n\n\t\t$saddle = $this->saddles[0];\n\n\t\t$this->actingAs($this->admin, 'api')\n\t\t\t ->put('/api/v1/admin/saddles/' . $saddle->id, $data)\n\t\t\t ->assertStatus(200)\n\t\t\t ->assertJsonStructure([\n\t\t\t\t 'id',\n\t\t\t ]);\n\n\t\t$this->assertDatabaseHas('saddles', ['name' => $data['name']]);\n\t}", "title": "" }, { "docid": "ee4d2bd57156bb18cbedbc7cec5a79c5", "score": "0.4728008", "text": "public function testUpdateValue()\n {\n $response = $this->json('PATCH', '/api/values');\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "678d6b5bc5ef04060e0c0bc14e75947c", "score": "0.47267714", "text": "public function testEmailCampaignPut()\n {\n }", "title": "" }, { "docid": "7eadcfb85ba91176d7fd49850ece1723", "score": "0.4726068", "text": "public function update(Request $request, FeeGroup $feeGroup)\n {\n //\n }", "title": "" }, { "docid": "7c2111a7eb21fd5b2a5327a9a30e3689", "score": "0.4725532", "text": "public function testUpdatePet()\n {\n // initialize the API client\n $config = (new Configuration())->setHost('http://petstore.swagger.io/v2');\n $api_client = new ApiClient($config);\n $pet_id = 10001; // ID of pet that needs to be fetched\n $pet_api = new Api\\PetApi($api_client);\n // create updated pet object\n $updated_pet = new Model\\Pet;\n $updated_pet->setId($pet_id);\n $updated_pet->setName('updatePet'); // new name\n $updated_pet->setStatus('pending'); // new status\n // update Pet (model/json)\n $update_response = $pet_api->updatePet($updated_pet);\n // return nothing (void)\n $this->assertSame($update_response, null);\n // verify updated Pet\n $response = $pet_api->getPetById($pet_id);\n $this->assertSame($response->getId(), $pet_id);\n $this->assertSame($response->getStatus(), 'pending');\n $this->assertSame($response->getName(), 'updatePet');\n }", "title": "" }, { "docid": "169fc5e4e7e6d0b28a007277da20dca3", "score": "0.47243896", "text": "function test_update($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($table_name, $values, \"$column_name = $column_value\");\n}", "title": "" }, { "docid": "6f6fffe18c4fbb1d5e103143c6d965b1", "score": "0.47240052", "text": "public function transactionTypeput($transaction_type_id)\r\n {\r\n\r\n $input = Request::all();\r\n $transaction_type = TransactionType::findOrFail($transaction_type_id)\r\n ->update([\r\n \"name\" => $input['name'],\r\n \"effect\" => $input['effect']\r\n ]);\r\n if($transaction_type){\r\n return response()->json(['msg' => 'Updated transaction type'], 201);\r\n }else{\r\n return response()->json(['msg' => 'Could not update record'], 405);\r\n }\r\n }", "title": "" }, { "docid": "fdda57a1dc7fc8245925a33d47e6867c", "score": "0.4716251", "text": "public function testDmlGettingStartedUpdate()\n {\n $db = self::$instance->database(self::$databaseId);\n $db->runTransaction(function (Transaction $t) {\n $t->executeUpdateBatch([\n [\n 'sql' => 'INSERT INTO Albums (SingerId, AlbumId, MarketingBudget) VALUES($1, $2, $3)',\n 'parameters' => [\n 'p1' => 1,\n 'p2' => 1,\n 'p3' => 0\n ]\n ],\n [\n 'sql' => 'INSERT INTO Albums (SingerId, AlbumId, MarketingBudget) VALUES($1, $2, $3)',\n 'parameters' => [\n 'p1' => 2,\n 'p2' => 2,\n 'p3' => 200001\n ]\n ]\n ]);\n\n $t->commit();\n });\n\n $output = $this->runFunctionSnippet('pg_dml_getting_started_update');\n $this->assertStringContainsString('Marketing budget updated.', $output);\n }", "title": "" }, { "docid": "f68835b72344ad1f23755a1880f2ebc8", "score": "0.4715077", "text": "public function test_it_updates_a_user()\n {\n $user = User::create(['email' => '[email protected]', 'given_name' => 'Andrew', 'family_name' => 'Hook']);\n\n $update = ['email' => '[email protected]', 'given_name' => 'A', 'family_name' => 'H'];\n\n $this->json('PUT', sprintf('/users/%d', $user->id), $update)\n ->seeJson($update);\n }", "title": "" }, { "docid": "79f652f1ccf18da16a0a14b12eeec1a2", "score": "0.4713797", "text": "public function update(Request $request)\n {\n //dd($request->all());\n //\n //TODO: Validation required\n $member_id = $request->id;\n $installment_id = $request->installment_id;\n //Finding instance of the installment to be updated\n $installmentInDb = Installment::where('id',$installment_id)->first();\n //Storing the previous amount of the installment DB instance before changing\n $previous_amount =$installmentInDb->amount ;\n\n $installmentInDb->amount = $request->amount;\n $installmentInDb->installment_date = $request->installment_date;\n\n if($request->has('late_fee') && $installmentInDb->late_fee===0){\n $installmentInDb->late_fee = 1;\n $installmentInDb->save();\n\n //Adding 50 tk from Reserve Fund because of Late Fee removal\n $fund = Fund::where('name','=','Reserve Fund')->first();\n $fund->balance += 50;\n $fund->save();\n }\n else if($installmentInDb->late_fee===1){\n $installmentInDb->late_fee = 0;\n $installmentInDb->save();\n\n //Deducting 50 tk from Reserve Fund because of Late Fee removal\n $fund = Fund::where('name','=','Reserve Fund')->first();\n $fund->balance -= 50;\n $fund->save();\n }\n else{\n $installmentInDb->save();\n }\n //Checking if installment amount is changed\n if($previous_amount !== $request->amount){\n //Since Amount is changed, the `member_accounts` table's balance and `funds`\n //table's balance need to be updated.\n\n $member_acc = MemberAccount::where('member_id', $member_id)->first();\n $fund = Fund::where('name','=','Saving Fund')->first();\n\n //Checking whether new instance of installment amount is greater than the\n // installment instance in the DB.\n\n if($request->amount >$previous_amount){\n //`member_accounts` table's balance is updated to the increase in\n // installment amount.\n $member_acc->balance += ($request->amount - $previous_amount);\n //`funds` table's balance is updated to the increase in\n // installment amount\n $fund->balance += ($request->amount - $previous_amount);\n }\n else{\n //`member_accounts` table's balance is updated to the decrease in\n // installment amount\n $member_acc->balance -= ($previous_amount - $request->amount );\n //`funds` table's balance is updated to the decrease in\n // installment amount\n $fund->balance -= ($previous_amount - $request->amount );\n }\n //Saving the `member_accounts` and `funds` instances.\n $member_acc->save();\n $fund->save();\n }\n\n return redirect('/admin/installments');\n }", "title": "" }, { "docid": "598c15d8917fd78c040d61fec0fdf235", "score": "0.47070476", "text": "public function isPut(): bool {}", "title": "" }, { "docid": "a2faa0769010a1b2b2ee3e5ef0f55989", "score": "0.47044945", "text": "public function test__GetPut()\n\t{\n\t\t$this->assertThat(\n\t\t\t$this->object->objects->put,\n\t\t\t$this->isInstanceOf('JAmazons3OperationsObjectsPut')\n\t\t);\n\t}", "title": "" }, { "docid": "b3d8abec86ebbd8bf61bddeb5110ba38", "score": "0.4703859", "text": "abstract public function put($data);", "title": "" }, { "docid": "6ca580dde73e125cbadcbf501b1d1f3b", "score": "0.47024316", "text": "public function Do_update_Example1(){\n\n\t}", "title": "" }, { "docid": "f2fb19defdcd098dd212de41de965dac", "score": "0.46882102", "text": "public function test_executeUpdate()\n\t{\n\t}", "title": "" }, { "docid": "92d19a4bb218f546a6a9c622f97364ee", "score": "0.46872512", "text": "public function update(Request $request, ContinuousAssessment $continuousAssessment)\n {\n //\n }", "title": "" }, { "docid": "b71f3db37b2f0786e7c0a5fc0482a874", "score": "0.4686105", "text": "public function methodPut() {\n return $this->methodPost();\n }", "title": "" }, { "docid": "4ec6c2089536990f65a742bd89efcb94", "score": "0.46852696", "text": "public function update(Structure $structure = null)\n {\n\n }", "title": "" }, { "docid": "55a893779927923f3e8452b922f5fdff", "score": "0.46683288", "text": "public function update(Request $request, Transaction $transaction)\n {\n //\n }", "title": "" }, { "docid": "55a893779927923f3e8452b922f5fdff", "score": "0.46683288", "text": "public function update(Request $request, Transaction $transaction)\n {\n //\n }", "title": "" }, { "docid": "55a893779927923f3e8452b922f5fdff", "score": "0.46683288", "text": "public function update(Request $request, Transaction $transaction)\n {\n //\n }", "title": "" } ]
b12ae2cd0dcb0a3194dc2030715089a7
Add css class "nodeNODETYPEVIEWMODE" to nodes
[ { "docid": "5627241dafa968c347bac2201e0274f6", "score": "0.7090666", "text": "function cvsan_preprocess_node(&$vars) {\r\n $vars['classes_array'][] = 'node--' . $vars['type'] . '--' . $vars['view_mode'];\r\n \r\n // Make \"node--NODETYPE--VIEWMODE.tpl.php\" templates available for nodes \r\n $vars['theme_hook_suggestions'][] = 'node__' . $vars['type'] . '__' . $vars['view_mode'];\r\n}", "title": "" } ]
[ { "docid": "83e97047be4ca1eddd54d60887b59291", "score": "0.6534852", "text": "function jordifuite_preprocess_node(&$variables) {\n if ($variables['view_mode'] == 'full' && node_is_page($variables['node'])) {\n $variables['classes_array'][] = 'node-full';\n }\n}", "title": "" }, { "docid": "3eb7c8cf0108adace8135363c9739b2b", "score": "0.64591795", "text": "function opencharity_preprocess_node(&$variables) {\n if ($variables['view_mode'] == 'full' && node_is_page($variables['node'])) {\n $variables['classes_array'][] = 'node-full';\n }\n}", "title": "" }, { "docid": "5e6add1fd5caf15415479b213bac31ad", "score": "0.60023016", "text": "function hook_entity_view_mode_alter(&$view_mode, \\Drupal\\Core\\Entity\\EntityInterface $entity) {\n // For nodes, change the view mode when it is teaser.\n if ($entity->getEntityTypeId() == 'node' && $view_mode == 'teaser') {\n $view_mode = 'my_custom_view_mode';\n }\n}", "title": "" }, { "docid": "9c830623c0e24ff395bcb76a61b0f2e5", "score": "0.5610746", "text": "function half_preprocess_node(&$variables) {\n if ($variables['view_mode'] == 'full' && node_is_page($variables['node'])) {\n $variables['classes_array'][] = 'node-full';\n }\n}", "title": "" }, { "docid": "4af44786ec2b1337cb0e96b0feda1a1b", "score": "0.5562054", "text": "function the_zero_preprocess_node(&$variables) {\n\t//$variables['classes_array'][] = 'node--' . $variables['type'] . '--' . $variables['view_mode'];\n\t// Make \"node--NODETYPE--VIEWMODE.tpl.php\" templates available for nodes\n\t$variables['theme_hook_suggestions'][] = 'node__' . $variables['view_mode'];\n\t$variables['theme_hook_suggestions'][] = 'node__' . $variables['type'] . '__' . $variables['view_mode'];\n\tif (isset($variables['content']['links'])) {\n\t\t$variables['content']['links']['#attributes']['class'][] = 'uk-list';\n\t}\n\n\tif (isset($variables['content']['links']['node']['#links']['node-readmore']['attributes']['title'])) {\n\t\t$variables['content']['links']['node']['#links']['node-readmore']['attributes']['class'] = 'uk-button uk-button-primary uk-margin-bottom';\n\t}\n\n\tif (isset($variables['content']['body'][0]['#markup']) && $variables['teaser']) {\n\t\t$variables['content']['body'][0]['#markup'] = _the_zero_truncate_html($variables['content']['body'][0]['#markup'], theme_get_setting('teaser_len'));\n\t}\n//\t$variables['submitted'] = t($submitted_by, array('!username' => $variables['name'], '!datetime' => $variables['date']));\n\t$variables['share_social_title'] = _t('_share_on_social_', t('Share on...'));\n\t$variables['share_social'] = _the_zero_get_social_links('node', $variables['nid'], $variables['page']);\n}", "title": "" }, { "docid": "eca91533e2debcc1b8d93b1d79d17e31", "score": "0.551435", "text": "function origins_preprocess_node(&$variables) {\n\t// Output a class on the node title\n\t$variables['title_attributes_array']['class'][] = 'node-title';\n}", "title": "" }, { "docid": "754c557e1b46b4eb28122a690b5040db", "score": "0.5507342", "text": "function getNodeStyleClass($a_id, $a_type)\n\t{\n\t\tif ($a_id == $this->highlighted)\n\t\t{\n\t\t\treturn \"il_HighlightedNode\";\n\t\t}\n\t\treturn \"\";\n\t}", "title": "" }, { "docid": "f195f87da77ce85f3c0cb745f2eebab0", "score": "0.54455906", "text": "function casabienestar_preprocess_node(&$variables) {\n\n if ($variables['view_mode'] == 'full' && node_is_page($variables['node'])) {\n $variables['classes_array'][] = 'node-full';\n }\n\n /* $comment = new stdClass;\n $comment->nid = $row->nid;\n $formComent = drupal_get_form('comment_form', $comment);\n //print_r($formComent);\n $variables['hoola'] = $formComent;*/\n}", "title": "" }, { "docid": "73a79611d462b6801152b1cae60277b3", "score": "0.54133976", "text": "function omega_preprocess_node(&$variables) {\n // Add article ARIA role.\n $variables['attributes_array']['role'] = 'article';\n $variables['content_attributes_array']['class'][] = 'content';\n}", "title": "" }, { "docid": "8535fc64d01e8dadca552905d075bc70", "score": "0.5384466", "text": "function pruvo_preprocess_node(&$variables) {\n $suggestions = $variables['theme_hook_suggestions'];\n $variables['theme_hook_suggestions'] = array();\n $variables['theme_hook_suggestions'][] = 'node__' . $variables['view_mode'];\n foreach ($suggestions as $suggestion) {\n $variables['theme_hook_suggestions'][] = $suggestion;\n $variables['theme_hook_suggestions'][] = $suggestion . '__' . $variables['view_mode'];\n }\n}", "title": "" }, { "docid": "da58673b184d73091c5027b4e834ee80", "score": "0.5345779", "text": "public function isNode() {}", "title": "" }, { "docid": "cc57b7bcff2884216b3210353ffdc826", "score": "0.5336348", "text": "function ds_switch_view_mode_inline() {\n\n $content = '';\n $status = TRUE;\n $error = FALSE;\n\n $id = $_REQUEST['id'];\n $view_mode = $_REQUEST['view_mode'];\n $entity_type = $_REQUEST['entity_type'];\n $entity = entity_load($entity_type, array($id));\n\n if (!isset($entity[$id])) {\n $status = FALSE;\n $error = t('Content was not found.');\n }\n else {\n if (node_access('view', $entity[$id])) {\n $content = drupal_render(node_view($entity[$id], $view_mode));\n }\n else {\n $error = t('Access denied');\n }\n }\n\n drupal_add_http_header('Content-Type', 'text/javascript; charset=utf-8');\n print drupal_json_encode(array(\n 'status' => $status,\n 'content' => $content,\n 'errorMessage' => $error,\n ));\n exit();\n}", "title": "" }, { "docid": "0d5144a23c845cddc3cc9363a499d6e1", "score": "0.532103", "text": "public function nodeType($nodeType);", "title": "" }, { "docid": "44ee5f254da7b3987f0e59b5ce12cdc3", "score": "0.5273155", "text": "public function isNode();", "title": "" }, { "docid": "3aec29186b2cab9ff2a39f880c91333f", "score": "0.5261878", "text": "function _tap_features_views_default_views() {\n $views = array();\n\n // Exported view: node_reference_stop_groups\n$view = new view;\n$view->name = 'node_reference_stop_groups';\n$view->description = '';\n$view->tag = '';\n$view->view_php = '';\n$view->base_table = 'node';\n$view->is_cacheable = FALSE;\n$view->api_version = 2;\n$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */\n$handler = $view->new_display('default', 'Defaults', 'default');\n$handler->override_option('fields', array(\n 'field_code_value' => array(\n 'label' => '',\n 'alter' => array(\n 'alter_text' => 0,\n 'text' => '',\n 'make_link' => 0,\n 'path' => '',\n 'link_class' => '',\n 'alt' => '',\n 'prefix' => '',\n 'suffix' => '',\n 'target' => '',\n 'help' => '',\n 'trim' => 0,\n 'max_length' => '',\n 'word_boundary' => 1,\n 'ellipsis' => 1,\n 'strip_tags' => 0,\n 'html' => 0,\n ),\n 'empty' => '---',\n 'hide_empty' => 0,\n 'empty_zero' => 1,\n 'link_to_node' => 0,\n 'label_type' => 'none',\n 'format' => 'default',\n 'multiple' => array(\n 'group' => TRUE,\n 'multiple_number' => '',\n 'multiple_from' => '',\n 'multiple_reversed' => FALSE,\n ),\n 'exclude' => 0,\n 'id' => 'field_code_value',\n 'table' => 'node_data_field_code',\n 'field' => 'field_code_value',\n 'relationship' => 'none',\n ),\n 'title' => array(\n 'label' => '',\n 'alter' => array(\n 'alter_text' => 0,\n 'text' => '',\n 'make_link' => 0,\n 'path' => '',\n 'link_class' => '',\n 'alt' => '',\n 'prefix' => '',\n 'suffix' => '',\n 'target' => '',\n 'help' => '',\n 'trim' => 0,\n 'max_length' => '',\n 'word_boundary' => 1,\n 'ellipsis' => 1,\n 'strip_tags' => 0,\n 'html' => 0,\n ),\n 'empty' => '',\n 'hide_empty' => 0,\n 'empty_zero' => 0,\n 'link_to_node' => 0,\n 'exclude' => 0,\n 'id' => 'title',\n 'table' => 'node',\n 'field' => 'title',\n 'relationship' => 'none',\n ),\n 'field_tour_nid' => array(\n 'label' => 'Tour',\n 'alter' => array(\n 'alter_text' => 0,\n 'text' => '',\n 'make_link' => 0,\n 'path' => '',\n 'link_class' => '',\n 'alt' => '',\n 'prefix' => '',\n 'suffix' => '',\n 'target' => '',\n 'help' => '',\n 'trim' => 0,\n 'max_length' => '',\n 'word_boundary' => 1,\n 'ellipsis' => 1,\n 'strip_tags' => 0,\n 'html' => 0,\n ),\n 'empty' => 'none',\n 'hide_empty' => 0,\n 'empty_zero' => 0,\n 'link_to_node' => 0,\n 'label_type' => 'widget',\n 'format' => 'plain',\n 'multiple' => array(\n 'group' => TRUE,\n 'multiple_number' => '',\n 'multiple_from' => '',\n 'multiple_reversed' => FALSE,\n ),\n 'exclude' => 0,\n 'id' => 'field_tour_nid',\n 'table' => 'node_data_field_tour',\n 'field' => 'field_tour_nid',\n 'relationship' => 'none',\n ),\n));\n$handler->override_option('sorts', array(\n 'created' => array(\n 'order' => 'DESC',\n 'granularity' => 'second',\n 'id' => 'created',\n 'table' => 'node',\n 'field' => 'created',\n 'relationship' => 'none',\n ),\n));\n$handler->override_option('arguments', array(\n 'field_tour_nid' => array(\n 'default_action' => 'ignore',\n 'style_plugin' => 'default_summary',\n 'style_options' => array(),\n 'wildcard' => 'all',\n 'wildcard_substitution' => 'All',\n 'title' => '',\n 'breadcrumb' => '',\n 'default_argument_type' => 'fixed',\n 'default_argument' => '',\n 'validate_type' => 'node',\n 'validate_fail' => 'not found',\n 'break_phrase' => 0,\n 'not' => 0,\n 'id' => 'field_tour_nid',\n 'table' => 'node_data_field_tour',\n 'field' => 'field_tour_nid',\n 'validate_user_argument_type' => 'uid',\n 'validate_user_roles' => array(\n '2' => 0,\n '6' => 0,\n '11' => 0,\n '3' => 0,\n '9' => 0,\n '16' => 0,\n '7' => 0,\n '15' => 0,\n '12' => 0,\n '10' => 0,\n '8' => 0,\n '5' => 0,\n '14' => 0,\n '4' => 0,\n '13' => 0,\n ),\n 'relationship' => 'none',\n 'default_options_div_prefix' => '',\n 'default_argument_user' => 0,\n 'default_argument_fixed' => '',\n 'default_argument_php' => '',\n 'validate_argument_node_type' => array(\n 'audio_stop' => 0,\n 'image_stop' => 0,\n 'page' => 0,\n 'poll_stop' => 0,\n 'stop_group' => 0,\n 'tour' => 0,\n 'video_stop' => 0,\n 'web_stop' => 0,\n ),\n 'validate_argument_node_access' => 1,\n 'validate_argument_nid_type' => 'nid',\n 'validate_user_restrict_roles' => 0,\n 'validate_argument_php' => '',\n ),\n));\n$handler->override_option('filters', array(\n 'type' => array(\n 'operator' => 'in',\n 'value' => array(\n 'audio_stop' => 'audio_stop',\n 'image_stop' => 'image_stop',\n 'poll_stop' => 'poll_stop',\n 'stop_group' => 'stop_group',\n 'video_stop' => 'video_stop',\n 'web_stop' => 'web_stop',\n ),\n 'group' => '0',\n 'exposed' => FALSE,\n 'expose' => array(\n 'operator' => FALSE,\n 'label' => '',\n ),\n 'id' => 'type',\n 'table' => 'node',\n 'field' => 'type',\n 'relationship' => 'none',\n ),\n));\n$handler->override_option('access', array(\n 'type' => 'none',\n));\n$handler->override_option('cache', array(\n 'type' => 'none',\n));\n$handler->override_option('style_plugin', 'table');\n$handler->override_option('style_options', array(\n 'grouping' => '',\n 'override' => 1,\n 'sticky' => 0,\n 'order' => 'asc',\n 'columns' => array(\n 'field_code_value' => 'field_code_value',\n 'title' => 'title',\n 'field_tour_nid' => 'field_tour_nid',\n ),\n 'info' => array(\n 'field_code_value' => array(\n 'sortable' => 0,\n 'separator' => '',\n ),\n 'title' => array(\n 'sortable' => 0,\n 'separator' => '',\n ),\n 'field_tour_nid' => array(\n 'separator' => '',\n ),\n ),\n 'default' => '-1',\n));\n\n $views[$view->name] = $view;\n\n // Exported view: tour_images\n $view = new view;\n $view->name = 'tour_images';\n $view->description = '';\n $view->tag = '';\n $view->view_php = '';\n $view->base_table = 'node';\n $view->is_cacheable = FALSE;\n $view->api_version = 2;\n $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */\n $handler = $view->new_display('default', 'Defaults', 'default');\n $handler->override_option('fields', array(\n 'field_image_fid' => array(\n 'label' => '',\n 'alter' => array(\n 'alter_text' => 0,\n 'text' => '',\n 'make_link' => 0,\n 'path' => '',\n 'link_class' => '',\n 'alt' => '',\n 'prefix' => '',\n 'suffix' => '',\n 'target' => '',\n 'help' => '',\n 'trim' => 0,\n 'max_length' => '',\n 'word_boundary' => 1,\n 'ellipsis' => 1,\n 'strip_tags' => 0,\n 'html' => 0,\n ),\n 'empty' => '',\n 'hide_empty' => 0,\n 'empty_zero' => 0,\n 'link_to_node' => 0,\n 'label_type' => 'none',\n 'format' => 'thumbnail_sq_default',\n 'multiple' => array(\n 'group' => TRUE,\n 'multiple_number' => '',\n 'multiple_from' => '',\n 'multiple_reversed' => FALSE,\n ),\n 'exclude' => 0,\n 'id' => 'field_image_fid',\n 'table' => 'node_data_field_image',\n 'field' => 'field_image_fid',\n 'relationship' => 'none',\n ),\n ));\n $handler->override_option('sorts', array(\n 'random' => array(\n 'order' => 'ASC',\n 'id' => 'random',\n 'table' => 'views',\n 'field' => 'random',\n 'relationship' => 'none',\n ),\n ));\n $handler->override_option('arguments', array(\n 'field_tour_nid' => array(\n 'default_action' => 'ignore',\n 'style_plugin' => 'default_summary',\n 'style_options' => array(),\n 'wildcard' => 'all',\n 'wildcard_substitution' => 'All',\n 'title' => '',\n 'breadcrumb' => '',\n 'default_argument_type' => 'fixed',\n 'default_argument' => '',\n 'validate_type' => 'none',\n 'validate_fail' => 'not found',\n 'break_phrase' => 0,\n 'not' => 0,\n 'id' => 'field_tour_nid',\n 'table' => 'node_data_field_tour',\n 'field' => 'field_tour_nid',\n 'validate_user_argument_type' => 'uid',\n 'validate_user_roles' => array(\n '2' => 0,\n '6' => 0,\n '11' => 0,\n '3' => 0,\n '9' => 0,\n '16' => 0,\n '7' => 0,\n '15' => 0,\n '12' => 0,\n '10' => 0,\n '8' => 0,\n '5' => 0,\n '14' => 0,\n '4' => 0,\n '13' => 0,\n ),\n 'relationship' => 'none',\n 'default_options_div_prefix' => '',\n 'default_argument_user' => 0,\n 'default_argument_fixed' => '',\n 'validate_argument_node_type' => array(\n 'audio_stop' => 0,\n 'image_stop' => 0,\n 'page' => 0,\n 'poll_stop' => 0,\n 'stop_group' => 0,\n 'tour' => 0,\n 'video_stop' => 0,\n 'web_stop' => 0,\n ),\n 'validate_argument_node_access' => 0,\n 'validate_argument_nid_type' => 'nid',\n 'validate_user_restrict_roles' => 0,\n ),\n ));\n $handler->override_option('filters', array(\n 'type' => array(\n 'operator' => 'in',\n 'value' => array(\n 'image_stop' => 'image_stop',\n ),\n 'group' => '0',\n 'exposed' => FALSE,\n 'expose' => array(\n 'operator' => FALSE,\n 'label' => '',\n ),\n 'id' => 'type',\n 'table' => 'node',\n 'field' => 'type',\n 'relationship' => 'none',\n ),\n ));\n $handler->override_option('access', array(\n 'type' => 'none',\n ));\n $handler->override_option('cache', array(\n 'type' => 'none',\n ));\n $handler->override_option('items_per_page', 5);\n\n $views[$view->name] = $view;\n\n // Exported view: tour_stop_groups\n $view = new view;\n $view->name = 'tour_stop_groups';\n $view->description = 'Returns a list of stop groups per tour';\n $view->tag = '';\n $view->view_php = '';\n $view->base_table = 'node';\n $view->is_cacheable = FALSE;\n $view->api_version = 2;\n $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */\n $handler = $view->new_display('default', 'Defaults', 'default');\n $handler->override_option('fields', array(\n 'type' => array(\n 'label' => 'Type',\n 'alter' => array(\n 'alter_text' => 0,\n 'text' => '',\n 'make_link' => 0,\n 'path' => '',\n 'link_class' => '',\n 'alt' => '',\n 'prefix' => '',\n 'suffix' => '',\n 'target' => '',\n 'help' => '',\n 'trim' => 0,\n 'max_length' => '',\n 'word_boundary' => 1,\n 'ellipsis' => 1,\n 'strip_tags' => 0,\n 'html' => 0,\n ),\n 'empty' => '',\n 'hide_empty' => 0,\n 'empty_zero' => 0,\n 'link_to_node' => 0,\n 'exclude' => 0,\n 'id' => 'type',\n 'table' => 'node',\n 'field' => 'type',\n 'relationship' => 'none',\n ),\n 'field_image_fid' => array(\n 'label' => 'Image',\n 'alter' => array(\n 'alter_text' => 0,\n 'text' => '',\n 'make_link' => 0,\n 'path' => '',\n 'link_class' => '',\n 'alt' => '',\n 'prefix' => '',\n 'suffix' => '',\n 'target' => '',\n 'help' => '',\n 'trim' => 0,\n 'max_length' => '',\n 'word_boundary' => 1,\n 'ellipsis' => 1,\n 'strip_tags' => 0,\n 'html' => 0,\n ),\n 'empty' => '',\n 'hide_empty' => 0,\n 'empty_zero' => 0,\n 'link_to_node' => 0,\n 'label_type' => 'widget',\n 'format' => 'thumbnail_default',\n 'multiple' => array(\n 'group' => TRUE,\n 'multiple_number' => '',\n 'multiple_from' => '',\n 'multiple_reversed' => FALSE,\n ),\n 'exclude' => 0,\n 'id' => 'field_image_fid',\n 'table' => 'node_data_field_image',\n 'field' => 'field_image_fid',\n 'relationship' => 'none',\n ),\n 'field_code_value' => array(\n 'label' => 'Code',\n 'alter' => array(\n 'alter_text' => 0,\n 'text' => '',\n 'make_link' => 0,\n 'path' => '',\n 'link_class' => '',\n 'alt' => '',\n 'prefix' => '',\n 'suffix' => '',\n 'target' => '',\n 'help' => '',\n 'trim' => 0,\n 'max_length' => '',\n 'word_boundary' => 1,\n 'ellipsis' => 1,\n 'strip_tags' => 0,\n 'html' => 0,\n ),\n 'empty' => '',\n 'hide_empty' => 0,\n 'empty_zero' => 0,\n 'link_to_node' => 0,\n 'label_type' => 'widget',\n 'format' => 'default',\n 'multiple' => array(\n 'group' => TRUE,\n 'multiple_number' => '',\n 'multiple_from' => '',\n 'multiple_reversed' => FALSE,\n ),\n 'exclude' => 0,\n 'id' => 'field_code_value',\n 'table' => 'node_data_field_code',\n 'field' => 'field_code_value',\n 'relationship' => 'none',\n ),\n 'title' => array(\n 'label' => 'Title',\n 'alter' => array(\n 'alter_text' => 0,\n 'text' => '',\n 'make_link' => 0,\n 'path' => '',\n 'link_class' => '',\n 'alt' => '',\n 'prefix' => '',\n 'suffix' => '',\n 'target' => '',\n 'help' => '',\n 'trim' => 0,\n 'max_length' => '',\n 'word_boundary' => 1,\n 'ellipsis' => 1,\n 'strip_tags' => 0,\n 'html' => 0,\n ),\n 'empty' => '',\n 'hide_empty' => 0,\n 'empty_zero' => 0,\n 'link_to_node' => 1,\n 'exclude' => 0,\n 'id' => 'title',\n 'table' => 'node',\n 'field' => 'title',\n 'relationship' => 'none',\n ),\n 'field_stops_nid' => array(\n 'label' => 'Stops',\n 'alter' => array(\n 'alter_text' => 0,\n 'text' => '',\n 'make_link' => 0,\n 'path' => '',\n 'link_class' => '',\n 'alt' => '',\n 'prefix' => '',\n 'suffix' => '',\n 'target' => '',\n 'help' => '',\n 'trim' => 0,\n 'max_length' => '',\n 'word_boundary' => 1,\n 'ellipsis' => 1,\n 'strip_tags' => 0,\n 'html' => 0,\n ),\n 'empty' => '',\n 'hide_empty' => 0,\n 'empty_zero' => 0,\n 'link_to_node' => 0,\n 'label_type' => 'widget',\n 'format' => 'default',\n 'multiple' => array(\n 'group' => 1,\n 'multiple_number' => '',\n 'multiple_from' => '',\n 'multiple_reversed' => 0,\n ),\n 'exclude' => 0,\n 'id' => 'field_stops_nid',\n 'table' => 'node_data_field_stops',\n 'field' => 'field_stops_nid',\n 'relationship' => 'none',\n ),\n 'edit_node' => array(\n 'label' => '',\n 'alter' => array(\n 'alter_text' => 0,\n 'text' => '',\n 'make_link' => 0,\n 'path' => '[edit_node]',\n 'link_class' => 'popups-form popups-processed',\n 'alt' => '',\n 'prefix' => '',\n 'suffix' => '',\n 'target' => '',\n 'help' => '',\n 'trim' => 0,\n 'max_length' => '',\n 'word_boundary' => 1,\n 'ellipsis' => 1,\n 'strip_tags' => 0,\n 'html' => 0,\n ),\n 'empty' => '',\n 'hide_empty' => 0,\n 'empty_zero' => 0,\n 'text' => '',\n 'exclude' => 0,\n 'id' => 'edit_node',\n 'table' => 'node',\n 'field' => 'edit_node',\n 'relationship' => 'none',\n ),\n 'delete_node' => array(\n 'label' => 'Delete link',\n 'alter' => array(\n 'alter_text' => 0,\n 'text' => '',\n 'make_link' => 0,\n 'path' => '',\n 'link_class' => '',\n 'alt' => '',\n 'prefix' => '',\n 'suffix' => '',\n 'target' => '',\n 'help' => '',\n 'trim' => 0,\n 'max_length' => '',\n 'word_boundary' => 1,\n 'ellipsis' => 1,\n 'strip_tags' => 0,\n 'html' => 0,\n ),\n 'empty' => '',\n 'hide_empty' => 0,\n 'empty_zero' => 0,\n 'text' => '',\n 'exclude' => 0,\n 'id' => 'delete_node',\n 'table' => 'node',\n 'field' => 'delete_node',\n 'relationship' => 'none',\n ),\n ));\n $handler->override_option('sorts', array(\n 'field_code_value' => array(\n 'order' => 'ASC',\n 'delta' => -1,\n 'id' => 'field_code_value',\n 'table' => 'node_data_field_code',\n 'field' => 'field_code_value',\n 'relationship' => 'none',\n ),\n ));\n $handler->override_option('arguments', array(\n 'field_tour_nid' => array(\n 'default_action' => 'ignore',\n 'style_plugin' => 'default_summary',\n 'style_options' => array(),\n 'wildcard' => 'all',\n 'wildcard_substitution' => 'All',\n 'title' => 'Stops',\n 'breadcrumb' => '',\n 'default_argument_type' => 'fixed',\n 'default_argument' => '',\n 'validate_type' => 'node',\n 'validate_fail' => 'ignore',\n 'break_phrase' => 0,\n 'not' => 0,\n 'id' => 'field_tour_nid',\n 'table' => 'node_data_field_tour',\n 'field' => 'field_tour_nid',\n 'validate_user_argument_type' => 'uid',\n 'validate_user_roles' => array(\n '2' => 0,\n '6' => 0,\n '11' => 0,\n '3' => 0,\n '9' => 0,\n '16' => 0,\n '7' => 0,\n '15' => 0,\n '12' => 0,\n '10' => 0,\n '8' => 0,\n '5' => 0,\n '14' => 0,\n '4' => 0,\n '13' => 0,\n ),\n 'relationship' => 'none',\n 'default_options_div_prefix' => '',\n 'default_argument_user' => 0,\n 'default_argument_fixed' => '',\n 'default_argument_php' => '',\n 'validate_argument_node_type' => array(\n 'audio_stop' => 0,\n 'image_stop' => 0,\n 'page' => 0,\n 'poll_stop' => 0,\n 'stop_group' => 0,\n 'tour' => 0,\n 'video_stop' => 0,\n 'web_stop' => 0,\n ),\n 'validate_argument_node_access' => 0,\n 'validate_argument_nid_type' => 'nid',\n 'validate_user_restrict_roles' => 0,\n 'validate_argument_php' => '',\n 'override' => array(\n 'button' => 'Override',\n ),\n ),\n ));\n $handler->override_option('filters', array(\n 'type' => array(\n 'operator' => 'in',\n 'value' => array(\n 'audio_stop' => 'audio_stop',\n 'image_stop' => 'image_stop',\n 'poll_stop' => 'poll_stop',\n 'stop_group' => 'stop_group',\n 'video_stop' => 'video_stop',\n 'web_stop' => 'web_stop',\n ),\n 'group' => '0',\n 'exposed' => TRUE,\n 'expose' => array(\n 'use_operator' => 0,\n 'operator' => 'type_op',\n 'identifier' => 'type',\n 'label' => 'Stop Type',\n 'optional' => 1,\n 'single' => 1,\n 'remember' => 0,\n 'reduce' => 1,\n ),\n 'id' => 'type',\n 'table' => 'node',\n 'field' => 'type',\n 'relationship' => 'none',\n ),\n 'field_code_value' => array(\n 'operator' => '=',\n 'value' => '',\n 'group' => '0',\n 'exposed' => TRUE,\n 'expose' => array(\n 'use_operator' => 0,\n 'operator' => 'field_code_value_op',\n 'identifier' => 'field_code_value',\n 'label' => 'Code',\n 'optional' => 1,\n 'remember' => 0,\n ),\n 'case' => 1,\n 'id' => 'field_code_value',\n 'table' => 'node_data_field_code',\n 'field' => 'field_code_value',\n 'relationship' => 'none',\n ),\n ));\n $handler->override_option('access', array(\n 'type' => 'none',\n ));\n $handler->override_option('cache', array(\n 'type' => 'none',\n ));\n $handler->override_option('empty', 'Sorry, there are no stops');\n $handler->override_option('empty_format', '1');\n $handler->override_option('use_pager', '1');\n $handler->override_option('style_plugin', 'table');\n $handler->override_option('style_options', array(\n 'grouping' => '',\n 'override' => 1,\n 'sticky' => 0,\n 'order' => 'asc',\n 'columns' => array(\n 'type' => 'type',\n 'field_code_value' => 'field_code_value',\n 'title' => 'title',\n 'field_stops_nid' => 'field_stops_nid',\n 'edit_node' => 'edit_node',\n ),\n 'info' => array(\n 'type' => array(\n 'sortable' => 0,\n 'separator' => '',\n ),\n 'field_code_value' => array(\n 'sortable' => 0,\n 'separator' => '',\n ),\n 'title' => array(\n 'sortable' => 0,\n 'separator' => '',\n ),\n 'field_stops_nid' => array(\n 'separator' => '',\n ),\n 'edit_node' => array(\n 'separator' => '',\n ),\n ),\n 'default' => '-1',\n ));\n\n $views[$view->name] = $view;\n\n // Exported view: tours\n $view = new view;\n $view->name = 'tours';\n $view->description = '';\n $view->tag = '';\n $view->view_php = '';\n $view->base_table = 'node';\n $view->is_cacheable = FALSE;\n $view->api_version = 2;\n $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */\n $handler = $view->new_display('default', 'Defaults', 'default');\n $handler->override_option('sorts', array(\n 'created' => array(\n 'order' => 'DESC',\n 'granularity' => 'second',\n 'id' => 'created',\n 'table' => 'node',\n 'field' => 'created',\n 'relationship' => 'none',\n ),\n ));\n $handler->override_option('filters', array(\n 'type' => array(\n 'operator' => 'in',\n 'value' => array(\n 'tour' => 'tour',\n ),\n 'group' => '0',\n 'exposed' => FALSE,\n 'expose' => array(\n 'operator' => FALSE,\n 'label' => '',\n ),\n 'id' => 'type',\n 'table' => 'node',\n 'field' => 'type',\n 'relationship' => 'none',\n ),\n ));\n $handler->override_option('access', array(\n 'type' => 'none',\n ));\n $handler->override_option('cache', array(\n 'type' => 'none',\n ));\n $handler->override_option('title', 'Tours');\n $handler->override_option('empty', 'There are currently no tours');\n $handler->override_option('empty_format', '1');\n $handler->override_option('use_pager', '1');\n $handler->override_option('row_plugin', 'node');\n $handler = $view->new_display('page', 'Page', 'page_1');\n $handler->override_option('path', 'tours');\n $handler->override_option('menu', array(\n 'type' => 'none',\n 'title' => '',\n 'description' => '',\n 'weight' => 0,\n 'name' => 'navigation',\n ));\n $handler->override_option('tab_options', array(\n 'type' => 'none',\n 'title' => '',\n 'description' => '',\n 'weight' => 0,\n ));\n\n $views[$view->name] = $view;\n\n return $views;\n}", "title": "" }, { "docid": "63b530f528e839cf9da2b8fb7756d4e5", "score": "0.52274084", "text": "public function getNodeKind() {}", "title": "" }, { "docid": "331063a07faa57092df78518714db6e1", "score": "0.5206186", "text": "function groom2015_preprocess_node(&$vars) {\n if ($vars[\"is_front\"]) {\n $vars[\"theme_hook_suggestions\"][] = \"node__front\";\n }\n}", "title": "" }, { "docid": "cf60006e858dc21893a5229a28955393", "score": "0.5205355", "text": "function gdstheme_preprocess_node(&$vars) {\n // suggest node--[type|nid]--teaser.tpl.php template for node teasers.\n if ($vars['view_mode'] == 'teaser') {\n $vars['theme_hook_suggestions'][] = 'node__' . $vars['node']->type . '__teaser';\n $vars['theme_hook_suggestions'][] = 'node__' . $vars['node']->nid . '__teaser';\n }\n\n // Remove the horrid inline class, it does wanky things like display:inline on the UL, whack eh?\n $vars['content']['links']['#attributes']['class'] = 'links';\n\n // Clearfix node content wrapper\n $vars['content_attributes_array']['class'][] = 'clearfix';\n\n // Theming for node in block\n if (theme_get_setting('show_slideshow') == TRUE) {\n if (isset($vars['node']->nodesinblock)) {\n $vars['classes_array'][] = 'flexible-slideshow';\n $vars['title_attributes_array']['class'][] = 'element-invisible';\n }\n }\n\n // Content grids - nuke links off teasers if in a content_display\n if ($vars['view_mode'] == 'teaser') {\n $show_frontpage_grid = theme_get_setting('content_display_grids_frontpage') == 1 ? TRUE : FALSE;\n $show_taxopage_grid = theme_get_setting('content_display_grids_taxonomy_pages') == 1 ? TRUE : FALSE;\n if ($show_frontpage_grid == TRUE || $show_taxopage_grid == TRUE) {\n unset($vars['content']['links']);\n }\n }\n\n $vars['unpublished'] = '';\n if (!$vars['status']) {\n $vars['unpublished'] = '<div class=\"unpublished\">' . t('Unpublished') . '</div>';\n }\n\n unset($vars['content']['links']['comment']);\n\n}", "title": "" }, { "docid": "20a53397c64c19faa39e64bec241958c", "score": "0.5205235", "text": "public function getNodeClass()\n {\n return 'Ibec\\Ecommerce\\Database\\ProductCategoryNode';\n }", "title": "" }, { "docid": "ed31cece96799b6d279121ca7c3ee448", "score": "0.51965064", "text": "public function getNodeTypes($nodeTypes = array());", "title": "" }, { "docid": "eb322471794941c7b9486ce1d5146556", "score": "0.5182165", "text": "function flat_node_view_alter( &$build ) {\n $build['#contextual_links']['node'] = array('node', array($build['#node']->nid));\n}", "title": "" }, { "docid": "e1c905ce26c16df40645e2b31f2e7881", "score": "0.51763153", "text": "function state_alpha_preprocess_node(&$variables) {\n\n // Remove node titles for certain custom view modes.\n if($variables['type'] == 'image_record') {\n if (\n $variables['view_mode'] == 'photo_banner'\n || $variables['view_mode'] == 'photo_display'\n || $variables['view_mode'] == 'photo_thumbnail'\n ) {\n // Hide the node elements before the node is getting rendered.\n $variables['title'] = NULL;\n }\n }\n\n if($variables['type'] == 'article' && $variables['view_mode'] == 'teaser') {\n $variables['attributes_array']['class'][] = 'sharethis-abbreviated';\n }\n\n // Add a span to the first word of node titles\n // $node_words = explode(' ', $variables['title']);\n // $node_words[0] = '<span class=\"first\">' . $node_words[0] . '</span>';\n // $variables['title'] = implode(' ', $node_words);\n\n // Format date\n $variables['date'] = t('@date', array('@date' => date(\"F j, Y\", $variables['created'])));\n\n // Turn off submission line (author and date) in teasers.\n if($variables['view_mode'] == 'teaser') {\n $variables['display_submitted'] = FALSE;\n }\n\n // Add a CSS class with the name of the view mode, if not a teaser \n if ($variables['view_mode'] != 'teaser') {\n $variables['attributes_array']['class'][] = 'node-' . $variables['view_mode'];\n }\n\n // Author display name instead of username on nodes\n $node = $variables['node'];\n $author = user_load($node->uid);\n\n $display_names = field_get_items('user', $author, 'field_display_name'); \n $variables['display_name'] = !empty($display_names[0]['value']) ? check_plain($display_names[0]['value']) : '';\n\n $userpath = field_get_items('user', $author, 'uid');\n $variables['user_path'] = 'user/' . $userpath;\n \n // Hiding 'add new comment' from links array\n if (isset($variables['content']['links'])) {\n unset($variables['content']['links']['comment']['#links']['comment-add']);\n }\n\n // Hiding \"x new comment(s)\" from links array in article teasers\n if($variables['type'] == 'article' && $variables['view_mode'] == 'teaser') {\n unset($variables['content']['links']['comment-new-comments']['#links']['title']);\n }\n\n}", "title": "" }, { "docid": "cade3fb96b6649f0ca8f2ef90e9b0ba8", "score": "0.5166482", "text": "function orgright_client_default_node_types() {\n // Insert default user-defined node types into the database.\n $types = array(\n array(\n 'type' => 'page',\n 'name' => st('Page'),\n 'module' => 'node',\n 'description' => st(\"A <em>page</em>, similar in form to a <em>story</em>, is a simple method for creating and displaying information that rarely changes, such as an \\\"About us\\\" section of a website. By default, a <em>page</em> entry does not allow visitor comments and is not featured on the site's initial home page.\"),\n 'custom' => TRUE,\n 'modified' => TRUE,\n 'locked' => FALSE,\n 'help' => '',\n 'min_word_count' => '',\n ),\n array(\n 'type' => 'story',\n 'name' => st('Story'),\n 'module' => 'node',\n 'description' => st(\"A <em>story</em>, similar in form to a <em>page</em>, is ideal for creating and displaying content that informs or engages website visitors. Press releases, site announcements, and informal blog-like entries may all be created with a <em>story</em> entry. By default, a <em>story</em> entry is automatically featured on the site's initial home page, and provides the ability to post comments.\"),\n 'custom' => TRUE,\n 'modified' => TRUE,\n 'locked' => FALSE,\n 'help' => '',\n 'min_word_count' => '',\n ),\n );\n\n foreach ($types as $type) {\n $type = (object)_node_type_set_defaults($type);\n node_type_save($type);\n }\n\n // Update the table of node types\n node_types_rebuild();\n\n // Default page to not be promoted and have comments disabled.\n variable_set('node_options_page', array('status'));\n variable_set('comment_page', COMMENT_NODE_DISABLED);\n\n // Don't display date and author information for page nodes by default.\n $theme_settings = variable_get('theme_settings', array());\n $theme_settings['toggle_node_info_page'] = FALSE;\n variable_set('theme_settings', $theme_settings);\n\n // Update the menu router information.\n menu_rebuild();\n}", "title": "" }, { "docid": "4bd5bd88dc0da5a831ddb1e924a563dc", "score": "0.51635027", "text": "function bartik_preprocess_node(&$variables) {\n if ($variables['view_mode'] == 'full' && node_is_page($variables['node'])) {\n $variables['classes_array'][] = 'node-full';\n }\n if($variables['type']=='blog'){\n $variables['content']['comments']['comment_form']['actions']['submit']['#value'] = 'Отправить';\n $variables['content']['comments']['comment_form']['comment_body']['und'][0]['value']['#title'] = 'Добавить комментарий';\n $variables['comments'] = array();\n for($i=1;$i<=$variables['comment_count'];$i++){\n $variables['comments'][$i]['author'] = $variables['content']['comments']['comments'][$i]['#comment']->name;\n $variables['comments'][$i]['date'] = date('h:m d/m/Y', $variables['content']['comments']['comments'][$i]['#comment']->created);\n $variables['comments'][$i]['body'] = $variables['content']['comments']['comments'][$i]['comment_body'][0]['#markup'];\n }\n $variables['label'] = l($variables['title'], 'http://' . $_SERVER['SERVER_NAME'] . $variables['node_url']);\n $variables['clear_label'] = $variables['title'];\n $temp = user_load($variables['uid']);\n $variables['author'] = t('Добавил ' . $temp->field_account_nick['und'][0]['value']);\n }\n drupal_add_js(array('node_type' => $variables['type']), 'setting');\n//////////////////////////////////////////////////////////////////////////////// \n if($variables['type']=='request_defile'){\n if($variables['field_request_state'][0]['value']==\"На рассмотрении\"){\n drupal_add_js(array('reques_status_color' => '#FADB61'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Отклонена\"){\n drupal_add_js(array('reques_status_color' => '#FE4F58'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Принята\"){\n drupal_add_js(array('reques_status_color' => '#3CEC1B'), 'setting');\n }\n if(empty($variables['content']['field_request_pers_image'])){\n drupal_add_js(array('defile_photo_pers_none' => TRUE), 'setting');\n }else{\n drupal_add_js(array('defile_photo_pers_none' => FALSE), 'setting');\n }\n if(empty($variables['content']['field_request_music'])){\n drupal_add_js(array('defile_music_none' => TRUE), 'setting');\n }else{\n drupal_add_js(array('defile_music_none' => FALSE), 'setting');\n }\n $flag = false;\n if(!empty($variables['content']['field_request_foto'])){\n $temp = $variables['content']['field_request_foto'];\n foreach($temp as $key => $photo){\n if($key[0]!='#'){\n $variables['content']['field_request_foto'][$key]['#path']['options'] = array('attributes' => array('rel' => 'photo'));\n $flag = true;\n }\n }\n }\n if($flag == false){\n drupal_add_js(array('defile_photo_none' => TRUE), 'setting');\n }else{\n drupal_add_js(array('defile_photo_none' => FALSE), 'setting');\n }\n $flag = false;\n if(!empty($variables['content']['field_request_foto_suit'])){\n $temp = $variables['content']['field_request_foto_suit'];\n foreach($temp as $key => $photo){\n if($key[0]!='#'){\n $variables['content']['field_request_foto_suit'][$key]['#path']['options'] = array('attributes' => array('rel' => 'photo_suit'));\n $flag = true;\n }\n }\n }\n if($flag == false){\n drupal_add_js(array('defile_photo_suit_none' => TRUE), 'setting');\n }else{\n drupal_add_js(array('defile_photo_suit_none' => FALSE), 'setting');\n }\n }\n//////////////////////////////////////////////////////////////////////////////// \n if($variables['type']=='request_scene'){\n if($variables['field_request_state'][0]['value']==\"На рассмотрении\"){\n drupal_add_js(array('reques_status_color' => '#FADB61'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Отклонена\"){\n drupal_add_js(array('reques_status_color' => '#FE4F58'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Принята\"){\n drupal_add_js(array('reques_status_color' => '#3CEC1B'), 'setting');\n }\n if(empty($variables['content']['field_request_scene_print'])){\n drupal_add_js(array('scene_print_none' => TRUE), 'setting');\n }else{\n drupal_add_js(array('scene_print_none' => FALSE), 'setting');\n }\n if(empty($variables['content']['field_request_scene_sound'])){\n drupal_add_js(array('scene_sound_none' => TRUE), 'setting');\n }else{\n drupal_add_js(array('scene_sound_none' => FALSE), 'setting');\n }\n if(empty($variables['content']['field_request_scene_video'])){\n drupal_add_js(array('scene_video_none' => TRUE), 'setting');\n if(!empty($variables['content']['field_request_scene_video_link'])){\n drupal_add_js(array('scene_video_link' => $variables['field_request_scene_video_link'][0]['value']), 'setting');\n }else{\n drupal_add_js(array('scene_video_link' => FALSE), 'setting');\n }\n }else{\n drupal_add_js(array('scene_video_none' => FALSE), 'setting');\n }\n if(empty($variables['content']['field_request_scene_rep'])){\n drupal_add_js(array('scene_rep_none' => TRUE), 'setting');\n if(!empty($variables['content']['field_request_scene_rep_link'])){\n drupal_add_js(array('scene_rep_link' => $variables['field_request_scene_rep_link'][0]['value']), 'setting');\n }else{\n drupal_add_js(array('scene_rep_link' => FALSE), 'setting');\n }\n }else{\n drupal_add_js(array('scene_rep_none' => FALSE), 'setting');\n }\n }\n//////////////////////////////////////////////////////////////////////////////// \n if($variables['type']=='request_dance'){\n if($variables['field_request_state'][0]['value']==\"На рассмотрении\"){\n drupal_add_js(array('reques_status_color' => '#FADB61'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Отклонена\"){\n drupal_add_js(array('reques_status_color' => '#FE4F58'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Принята\"){\n drupal_add_js(array('reques_status_color' => '#3CEC1B'), 'setting');\n }\n \n if(empty($variables['content']['field_request_dance_video_rep'])){\n drupal_add_js(array('dance_rep_none' => TRUE), 'setting');\n if(!empty($variables['content']['field_request_dance_video_r_link'])){\n drupal_add_js(array('dance_rep_link' => $variables['field_request_dance_video_r_link'][0]['value']), 'setting');\n }else{\n drupal_add_js(array('dance_rep_link' => FALSE), 'setting');\n }\n }else{\n drupal_add_js(array('dance_rep_none' => FALSE), 'setting');\n }\n if(empty($variables['content']['field_request_dance_video'])){\n drupal_add_js(array('dance_video_none' => TRUE), 'setting');\n if(!empty($variables['content']['field_request_dance_video_link'])){\n drupal_add_js(array('dance_video_link' => $variables['field_request_dance_video_link'][0]['value']), 'setting');\n }else{\n drupal_add_js(array('dance_video_link' => FALSE), 'setting');\n }\n }else{\n drupal_add_js(array('dance_video_none' => FALSE), 'setting');\n }\n if(empty($variables['content']['field_request_dance_music'])){\n drupal_add_js(array('dance_music_none' => TRUE), 'setting');\n }else{\n drupal_add_js(array('dance_music_none' => FALSE), 'setting');\n }\n $flag = false;\n if(!empty($variables['content']['field_request_dance_foto'])){\n $temp = $variables['content']['field_request_dance_foto'];\n foreach($temp as $key => $photo){\n if($key[0]!='#'){\n $variables['content']['field_request_dance_foto'][$key]['#path']['options'] = array('attributes' => array('rel' => 'photo'));\n $flag = true;\n }\n }\n }\n if($flag == false){\n drupal_add_js(array('dance_foto_none' => TRUE), 'setting');\n }else{\n drupal_add_js(array('dance_foto_none' => FALSE), 'setting');\n }\n }\n//////////////////////////////////////////////////////////////////////////////// \n if($variables['type']=='request_karaoke'){\n if($variables['field_request_state'][0]['value']==\"На рассмотрении\"){\n drupal_add_js(array('reques_status_color' => '#FADB61'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Отклонена\"){\n drupal_add_js(array('reques_status_color' => '#FE4F58'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Принята\"){\n drupal_add_js(array('reques_status_color' => '#3CEC1B'), 'setting');\n }\n \n if(empty($variables['content']['field_request_karaoke_demo'])){\n drupal_add_js(array('karaoke_demo_none' => TRUE), 'setting');\n }else{\n drupal_add_js(array('karaoke_demo_none' => FALSE), 'setting');\n }\n if(empty($variables['content']['field_request_karaoke_text'])){\n drupal_add_js(array('karaoke_text_none' => TRUE), 'setting');\n }else{\n drupal_add_js(array('karaoke_text_none' => FALSE), 'setting');\n }\n if(empty($variables['content']['field_request_karaoke_minus'])){\n drupal_add_js(array('karaoke_minus_none' => TRUE), 'setting');\n }else{\n drupal_add_js(array('karaoke_minus_none' => FALSE), 'setting');\n }\n if(empty($variables['content']['field_request_karaoke_doc'])){\n drupal_add_js(array('karaoke_doc_none' => TRUE), 'setting');\n }else{\n drupal_add_js(array('karaoke_doc_none' => FALSE), 'setting');\n }\n if(empty($variables['content']['field_request_karaoke_video'])){\n drupal_add_js(array('karaoke_video_none' => TRUE), 'setting');\n if(!empty($variables['content']['field_request_karaoke_video_link'])){\n drupal_add_js(array('karaoke_video_link' => $variables['field_request_karaoke_video_link'][0]['value']), 'setting');\n }else{\n drupal_add_js(array('karaoke_video_link' => FALSE), 'setting');\n }\n }else{\n drupal_add_js(array('karaoke_video_none' => FALSE), 'setting');\n }\n }\n////////////////////////////////////////////////////////////////////////////////\n if($variables['type']=='request_amv'){\n if($variables['field_request_state'][0]['value']==\"На рассмотрении\"){\n drupal_add_js(array('reques_status_color' => '#FADB61'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Отклонена\"){\n drupal_add_js(array('reques_status_color' => '#FE4F58'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Принята\"){\n drupal_add_js(array('reques_status_color' => '#3CEC1B'), 'setting');\n }\n if(empty($variables['content']['field_request_amv_video'])){\n drupal_add_js(array('amv_video_none' => TRUE), 'setting');\n if(!empty($variables['content']['field_request_amv_video_link'])){\n drupal_add_js(array('amv_video_link' => $variables['field_request_amv_video_link'][0]['value']), 'setting');\n }else{\n drupal_add_js(array('amv_video_link' => FALSE), 'setting');\n }\n }else{\n drupal_add_js(array('amv_video_none' => FALSE), 'setting');\n }\n }\n////////////////////////////////////////////////////////////////////////////////\n if($variables['type']=='request_write'){\n if($variables['field_request_state'][0]['value']==\"На рассмотрении\"){\n drupal_add_js(array('reques_status_color' => '#FADB61'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Отклонена\"){\n drupal_add_js(array('reques_status_color' => '#FE4F58'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Принята\"){\n drupal_add_js(array('reques_status_color' => '#3CEC1B'), 'setting');\n }\n if(empty($variables['content']['field_request_fanfic_text'])){\n drupal_add_js(array('fanfic_text_none' => TRUE), 'setting');\n }else{\n drupal_add_js(array('fanfic_text_none' => FALSE), 'setting');\n }\n }\n////////////////////////////////////////////////////////////////////////////////\n if($variables['type']=='request_master'){\n if($variables['field_request_state'][0]['value']==\"На рассмотрении\"){\n drupal_add_js(array('reques_status_color' => '#FADB61'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Отклонена\"){\n drupal_add_js(array('reques_status_color' => '#FE4F58'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Принята\"){\n drupal_add_js(array('reques_status_color' => '#3CEC1B'), 'setting');\n }\n }\n////////////////////////////////////////////////////////////////////////////////\n if($variables['type']=='request_handmade'){\n if($variables['field_request_state'][0]['value']==\"На рассмотрении\"){\n drupal_add_js(array('reques_status_color' => '#FADB61'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Отклонена\"){\n drupal_add_js(array('reques_status_color' => '#FE4F58'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Принята\"){\n drupal_add_js(array('reques_status_color' => '#3CEC1B'), 'setting');\n }\n $flag = false;\n if(!empty($variables['content']['field_request_handmade_foto'])){\n $temp = $variables['content']['field_request_handmade_foto'];\n foreach($temp as $key => $photo){\n if($key[0]!='#'){\n $variables['content']['field_request_handmade_foto'][$key]['#path']['options'] = array('attributes' => array('rel' => 'photo'));\n $flag = true;\n }\n }\n }\n if($flag == false){\n drupal_add_js(array('handmade_foto_none' => TRUE), 'setting');\n }else{\n drupal_add_js(array('handmade_foto_none' => FALSE), 'setting');\n }\n }\n////////////////////////////////////////////////////////////////////////////////\n if($variables['type']=='request_foto'){\n if($variables['field_request_state'][0]['value']==\"На рассмотрении\"){\n drupal_add_js(array('reques_status_color' => '#FADB61'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Отклонена\"){\n drupal_add_js(array('reques_status_color' => '#FE4F58'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Принята\"){\n drupal_add_js(array('reques_status_color' => '#3CEC1B'), 'setting');\n }\n $flag = false;\n if(!empty($variables['content']['field_request_foto_foto'])){\n $temp = $variables['content']['field_request_foto_foto'];\n foreach($temp as $key => $photo){\n if($key[0]!='#'){\n $variables['content']['field_request_foto_foto'][$key]['#path']['options'] = array('attributes' => array('rel' => 'photo'));\n $flag = true;\n }\n }\n }\n if($flag == false){\n drupal_add_js(array('foto_foto_none' => TRUE), 'setting');\n }else{\n drupal_add_js(array('foto_foto_none' => FALSE), 'setting');\n }\n }\n////////////////////////////////////////////////////////////////////////////////\n if($variables['type']=='request_market'){\n if($variables['field_request_state'][0]['value']==\"На рассмотрении\"){\n drupal_add_js(array('reques_status_color' => '#FADB61'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Отклонена\"){\n drupal_add_js(array('reques_status_color' => '#FE4F58'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Принята\"){\n drupal_add_js(array('reques_status_color' => '#3CEC1B'), 'setting');\n }\n }\n}", "title": "" }, { "docid": "9fe68861500961ebeb4c2e4a6ae97ed7", "score": "0.51497114", "text": "public function supports($node);", "title": "" }, { "docid": "9e63d8be4e8c47b5f8535c0463569be5", "score": "0.512068", "text": "function ninesixtyrobots_preprocess_node(&$variables) {\n\t\t if($variables['type'] == 'article') {\n\t\t\t$node = $variables['node'];\n\t\t\t//kpr($node); \n\t\t\t}\n }", "title": "" }, { "docid": "0fe9533250478d1927c73ebf09dc4a65", "score": "0.511562", "text": "private function registerNodeClasses() {\n $this->registerNodeClass('DOMDocument', get_called_class());\n $this->registerNodeClass('DOMNode', 'TheSeer\\fDOM\\fDOMNode');\n $this->registerNodeClass('DOMElement', 'TheSeer\\fDOM\\fDOMElement');\n $this->registerNodeClass('DOMDocumentFragment', 'TheSeer\\fDOM\\fDOMDocumentFragment');\n }", "title": "" }, { "docid": "e6c510eb650f5dcb48c47a59e23b9490", "score": "0.51064414", "text": "public function node($type, string $name, $options = []);", "title": "" }, { "docid": "2ab49417bc44bcdc71e032013a1ff8a4", "score": "0.508958", "text": "function county_clerk_bootstrap_preprocess_node(&$vars) {\n if (isset($vars['node']) && $vars['node']->type == 'agency') {\n if (isset($vars['field_agency_display'][0]) && $vars['field_agency_display'][0]['entity']->name == 'Landing Page') {\n $vars['theme_hook_suggestions'][] = 'node__agency__landing'; //overriding node agency template for just landing pages\n }\n }\n elseif ($vars['node']->type == 'location' && $vars['view_mode'] == 'full') {\n $vars['theme_hook_suggestions'][] = 'node__location__landing'; //template for default view mode only to keep from adding to other content types\n }\n}", "title": "" }, { "docid": "de04d403b0b4817b0c96461cd07e150a", "score": "0.50864935", "text": "function orgright_client_config_tidy_node_links() {\n $theme = variable_get('theme_default', 'garland');\n if ($theme == 'orgright_client_origins') {\n drupal_install_modules(array('tidy_node_links'));\n }\n}", "title": "" }, { "docid": "4f88ee022f1b1d8ec520edf94de7fa66", "score": "0.5080829", "text": "function mediacommons_preprocess_node(&$variables) {\n // Node Object\n $node = $variables['node'];\n // Entity API\n $wrapper = entity_metadata_wrapper('node', $node);\n // Unified way of getting $node->type\n $bundle = $wrapper->getBundle();\n // Check for a PJAX request\n $is_pjax = mediacommons_is_pjax();\n // give project names as classes to the items on the umbrella site front page\n if ($bundle == 'front_page_post') {\n // name used for Fieldguide channel needs to be standardized \n $projNameUsedSitewide = ($wrapper->field_project->value() == 'fg') ? 'fieldguide' : $wrapper->field_project->value();\n $variables['classes_array'][] = 'node-' . $projNameUsedSitewide;\n }\n if ($is_pjax) {\n $variables['theme_hook_suggestions'][] = 'node__pjax';\n }\n}", "title": "" }, { "docid": "974cc1a61b058771d09f2ce84701314c", "score": "0.50795436", "text": "public function isNode()\n\t{\n\t\treturn (bool) $this->_v('node.enable', false);\n\t}", "title": "" }, { "docid": "c9e42616475750c46150a7fdf467625d", "score": "0.5006111", "text": "function sarxos_preprocess_node(&$vars) {\n\tstatic $first;\n\t$vars['classes'] = array('post');\n\t$vars['classes'][] = 'post-' . str_replace('_', '-', $vars['node']->type);\n\tif (!isset($first)) {\n\t\t$first = TRUE;\n\t\t$vars['classes'][] = 'first';\n\t}\n\tif ($vars['sticky']) {\n\t\t$vars['classes'][] = 'sticky';\n\t}\n\tif ($vars['status']) {\n\t\t$vars['classes'][] = 'post-unpublished';\n\t}\n\t$vars['classes'] = implode(' ', $vars['classes']);\n\n\t// Populate more granular submitted-by information.\n\t$vars['postdate'] = format_date($vars['node']->created, 'custom', 'd F Y');\n\t$vars['author'] = theme('username', $vars['node']);\n\n\t$vars['comments_link'] = l(\n\t\t$vars['comment_count'], 'node/' . $vars['node']->nid,\n\t\tarray(\n\t\t\t'fragment' => 'comment',\n\t\t\t'title' => t('Comment on !title', array('!title' => $vars['node']->title))\n\t\t)\n\t);\n\t\n\t$vars['links'] =\n\t\t'<div class=\"btn-toolbar\">' .\n\t\t'<div class=\"btn-group\">';\n\n\tforeach ($vars['node']->links as $link) {\n\t\t$path = $link['href'];\n\t\t$text = $link['title'];\n\t\t$title = $link['attributes']['title'];\n\t\tif (strlen($text) > 0 && strlen($path) > 0) {\n\t\t\t$vars['links'] .= \"<a href='$path' title='$title' class='btn'>$text</a>\";\n\t\t}\n\t}\n\t\n\t$vars['links'] .= '</div></div>';\n}", "title": "" }, { "docid": "88703a067db882dffd907ca49b0e98c4", "score": "0.49961713", "text": "function bootstrap_multilect_preprocess_node (&$variables) {\n /*$node = $variables[\"node\"];\n\n if (isset($node->field_age_bracket[\"und\"][0][\"taxonomy_term\"])) {\n foreach ($node->field_age_bracket[\"und\"] as $foo) {\n $term = $foo[\"taxonomy_term\"];\n $variables[\"classes_array\"][] = \"term-\" . str_replace(\" \", \"-\", strtolower($term->name));\n }\n }*/\n if ($variables['node'] == 'article') {\n $field_items = field_get_items('node', $variables['node'], 'field_age_bracket');\n $first_item = array_shift($field_items);\n\n $value = $first_item['value'];\n\n/* If you want to write <div class=\"<?php echo $extra_class; ?>\">... in your template file:\n $vars['extra_class'] = $value;*/\n\n /* Or if you want to add this to the classes on the main node <div>:*/\n $vars['classes_array'][] = $value;\n }\n}", "title": "" }, { "docid": "5fbff6e6859ec6eb8133720282b21d9c", "score": "0.49593392", "text": "public function registerNodeType($ntdNewType, $bAllowUpdate = TRUE) {\r\n\t\t\r\n\t}", "title": "" }, { "docid": "b2b9595d4633e94074a6fe9df3fd7d42", "score": "0.4954625", "text": "public function setNodeFlags($flags)\n {\n $this->m_nodeFlags = $flags;\n }", "title": "" }, { "docid": "b017fe83c757d53bf0b873f5e26ea708", "score": "0.49506703", "text": "function _unodered_view_mode_options() {\n $view_modes = [];\n $entity_info = entity_get_info('node');\n foreach ($entity_info['view modes'] as $view_mode => $view_mode_info) {\n $view_modes[$view_mode] = $view_mode_info['label'];\n }\n return $view_modes;\n}", "title": "" }, { "docid": "2022593566ce0ed3d21f8b6637480c06", "score": "0.49248663", "text": "function ninesixtyrobots_preprocess_node(&$variables) {\n\t\t //\tkpr($variables); - to see what variables avaiblabe for node\n }", "title": "" }, { "docid": "1176fc5f5a613f7b4c3701208cf12c0a", "score": "0.48978698", "text": "public function getUserNodeClass($nodeName)\n {\n // TODO\n return false;\n }", "title": "" }, { "docid": "d8cc2b4753a190cd68c6e510e3301b31", "score": "0.48942277", "text": "function gdstheme_preprocess_region(&$variables) {\n //only on 'Track progress' page\n if($variables['region'] == 'content' && current_path() == 'node/132'){\n $variables['classes_array'][] = 'two-50';\n $variables['classes_array'][] = 'gpanel';\n $variables['classes_array'][] = 'clearfix';\n $variables['classes_array'][] = 'no-padding';\n $variables['classes_array'][] = 'no-margin';\n }\n}", "title": "" }, { "docid": "9f7c928fd684f009b9b3b67a43ebb8cc", "score": "0.48396242", "text": "function hook_entity_type_alter(array &$entity_types) {\n /** @var \\Drupal\\Core\\Entity\\EntityTypeInterface[] $entity_types */\n // Set the controller class for nodes to an alternate implementation of the\n // Drupal\\Core\\Entity\\EntityStorageInterface interface.\n $entity_types['node']->setStorageClass('Drupal\\mymodule\\MyCustomNodeStorage');\n}", "title": "" }, { "docid": "f6d90c158d0a7297c1ba2da7619909c6", "score": "0.48267475", "text": "function setTreeView($use) \r\n {\r\n if($use == 1){\r\n $this->treeView = true;\r\n }\r\n }", "title": "" }, { "docid": "b50e73d0082f09aa75456c467bf4cade", "score": "0.48164707", "text": "function pi_activity_get_sorted_node_type($node_type)\r\n{\r\n\t$generated_node_type = null;\r\n\t// Then get the type of data that activity content module provides\r\n\t$info_function_name = $node_type . '_node_info';\r\n\tif(function_exists($info_function_name))\r\n\t{\r\n\t\t$node_info = $info_function_name();\r\n\t\tif(isset($node_info[$node_type]['add_node_type']))\r\n\t\t{\r\n\t\t\t$generated_node_type = $node_info[$node_type]['add_node_type'];\r\n\t\t}\r\n\t}\r\n\treturn $generated_node_type;\r\n}", "title": "" }, { "docid": "8fd3547fa6af1f212f476bd005dd537c", "score": "0.48106524", "text": "public static function setNode($node);", "title": "" }, { "docid": "0b48d612a35bea7e61166ae558a66368", "score": "0.47813186", "text": "public function setNodeType($nodeTypeName) {\n\t\t$this->nodeTypeName = $nodeTypeName;\n\t}", "title": "" }, { "docid": "bb15ffe885ff2a918d2a46d7cef20ee1", "score": "0.47763848", "text": "function uottawa_lang_editor_view_revision($nodes) {\r\n foreach ($nodes as $node) {\r\n node_tag_new($node);\r\n }\r\n return node_view_multiple($nodes, 'full');\r\n}", "title": "" }, { "docid": "ac9ead72e1092cd8f2062e2ba1059e2a", "score": "0.476763", "text": "function hook_entity_view_mode_info_alter(&$view_modes) {\n $view_modes['user']['full']['status'] = TRUE;\n}", "title": "" }, { "docid": "d3bfc8646d2696ab43220a7bcfb6c569", "score": "0.47664273", "text": "static function getNodesFromType($type) {\n\n return \\Drupal::entityQuery('node')->condition('type',$type)->condition('status', 1)->execute();\n }", "title": "" }, { "docid": "1c8b528cf3c27865d9cba64d2ecc1345", "score": "0.47621286", "text": "function blink_node_selected_for_markup($node) {\n $deselected_types = variable_get('blink_exclude_types', array());\n if (is_array($deselected_types) && in_array($node->type, $deselected_types)) return FALSE;\n \n // TODO: return FALSE if path matches exclusion path list\n\n //drupal_set_message(\"This '{$node->type}' node is being marked up\");\n return TRUE;\n}", "title": "" }, { "docid": "aed3ff1f2d3d9725d56957ad74fb159b", "score": "0.47596154", "text": "function tb_preprocess_node(&$vars, $hook) {\r\n\t\t\r\n // Optionally, run node-type-specific preprocess functions, like\r\n // tb_preprocess_node_page() or tb_preprocess_node_story().\r\n $function = __FUNCTION__ . '_' . $vars['node']->type;\r\n if (function_exists($function)) {\r\n $function($vars, $hook);\r\n }\r\n}", "title": "" }, { "docid": "0db3664830fe406905371b08b3829e11", "score": "0.4746855", "text": "public function getViewMode();", "title": "" }, { "docid": "268ef2ca04655091193c304d3210b62d", "score": "0.47389698", "text": "function pewc_add_quickview_field_class( $classes, $item ) {\n\tif( pewc_child_product_quickview() == 'yes' ) {\n\t\t$classes[] = 'pewc-has-quickview';\n\t}\n\treturn $classes;\n}", "title": "" }, { "docid": "d2c90aab9e5df4a73942231b333ba1dc", "score": "0.47277832", "text": "function modules_overview_types() {\n $types = modules_types_build()->types;\n $names = node_type_get_names();\n $field_ui = module_exists('field_ui');\n $header = array(t('Name'), array('data' => t('Operations'), 'colspan' => $field_ui ? '5' : '2'));\n $rows = array();\n foreach ($names as $key => $name) {\n $type = $types[$key];\n if (node_hook($type->type, 'form')) {\n $type_url_str = str_replace('_', '-', $type->type);\n $options = array(\n 'query' => array('name' => $type->type),\n 'attributes' => array('id' => $type->type, 'target' => '_blank'),\n );\n $row = array(theme('node_admin_overview', array('name' => $name, 'type' => $type)));\n // Set the list content column.\n $row[] = array('data' => l(t('list'), 'admin/module-content', $options));\n\n // Set the edit column.\n $row[] = array('data' => l(t('edit'), 'admin/structure/types/manage/' . $type_url_str, $options));\n\n if ($field_ui) {\n // Manage fields.\n $row[] = array('data' => l(t('manage fields'), 'admin/structure/types/manage/' . $type_url_str . '/fields', $options));\n\n // Display fields.\n $row[] = array('data' => l(t('manage display'), 'admin/structure/types/manage/' . $type_url_str . '/display', $options));\n }\n\n // Set the delete column.\n if ($type->custom) {\n $row[] = array('data' => l(t('delete'), 'admin/structure/types/manage/' . $type_url_str . '/delete', $options));\n }\n else {\n $row[] = array('data' => '');\n }\n\n $rows[] = $row;\n }\n }\n\n $build['node_table'] = array(\n '#theme' => 'table',\n '#header' => $header,\n '#rows' => $rows,\n '#empty' => t('No content types available. <a href=\"@link\">Add content type</a>.', array('@link' => url('admin/structure/types/add'))),\n );\n\n return $build;\n}", "title": "" }, { "docid": "7e43080889118a3ba63814b4cd93ee93", "score": "0.47183064", "text": "function theme_io_checkbox_tree_level($variables) {\n $element = $variables['element'];\n $depth = $element['#depth'];\n $sm = '';\n if (array_key_exists('#level_start_minimized', $element) && $element['#level_start_minimized']) {\n $sm = \"style='display: none;'\";\n }\n\n $output = \"<ul class='islandora-object-tree-level islandora-object-tree-level-$depth clearfix' $sm>\";\n $children = element_children($element);\n foreach ($children as $child) {\n $output .= '<li>';\n $output .= drupal_render($element[$child]);\n $output .= '</li>';\n }\n\n $output .= '</ul>';\n\n return $output;\n}", "title": "" }, { "docid": "f91259bbca856265c2502823d5e5d0ad", "score": "0.47094446", "text": "public function parseNode(RedView_Event $event) {\n\n /**\n * @var RedView_Core_Parser\n */\n $parser = $event->sender;\n $node = $parser->currentNode;\n $class = null;\n $tag = null;\n\n // make tags xhtml-friendly\n\n if ($node->nodeName == 'html') {\n if (!$node->getAttribute('xmlns')) {\n $node->setAttribute('xmlns', 'http://www.w3.org/1999/xhtml');\n }\n }\n elseif ($node->nodeName == 'img') {\n if (!$node->getAttribute('alt')) {\n $node->setAttribute('alt', '');\n }\n }\n\n }", "title": "" }, { "docid": "f7558af486570489f6333c06ac15d775", "score": "0.46988857", "text": "public function nodeView($node, $view_mode = 'full')\n {\n if (empty($node)) {\n return '';\n }\n\n if (is_array($node)) {\n $build = node_view_multiple($node, $view_mode);\n }\n else {\n $build = node_view($node, $view_mode);\n }\n return drupal_render($build);\n }", "title": "" }, { "docid": "baa8b0768694af3f30e0947bcb8418a9", "score": "0.46905932", "text": "function _kala_migrate_css_class($info, $type) {\n $class = $class_apply = '';\n if (isset($info['drupal8status']) && $type == 'Contrib') {\n // Lets check whats up\n switch ($info['drupal8status']) {\n case 'IN CORE':\n $class_apply = 'core';\n break;\n\n case 'NOT PORTED YET':\n $class_apply = 'not-ported';\n break;\n\n case 'RENAMED OR DEPRECIATED':\n $class_apply = 'removed';\n break;\n\n case 'IN PROGRESS':\n $class_apply = 'inprogress';\n break;\n\n case 'PORTED':\n $class_apply = 'ported';\n break;\n }\n // Set up the css fun.\n if (!empty($class_apply)) {\n $class = ' class=\"' . $class_apply . '\"';\n }\n }\n elseif (isset($info['submodule'])) {\n $class = ' class=\"submodule\"';\n }\n elseif ($type == 'Core') {\n if (!isset($info['drupal8status'])) {\n $class = ' class=\"core\"';\n }\n else {\n $class = ' class=\"not-ported\"';\n }\n }\n // Send back class or empty for fun styling.\n return $class;\n}", "title": "" }, { "docid": "0aed7f6b9a670df0cf343e5f04cfcf16", "score": "0.46882793", "text": "protected function isNodeElementAware($class_name)\n\t{\n\t\t$node_element_aware_interface = 'aik099\\\\QATools\\\\PageObject\\\\Element\\\\INodeElementAware';\n\n\t\tif ( class_exists($class_name) ) {\n\t\t\treturn in_array($node_element_aware_interface, class_implements($class_name));\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "fdd87da494748601b46d6df32bcd3288", "score": "0.46857935", "text": "function hook_ENTITY_TYPE_view_alter(array &$build, \\Drupal\\Core\\Entity\\EntityInterface $entity, \\Drupal\\Core\\Entity\\Display\\EntityViewDisplayInterface $display) {\n if ($build['#view_mode'] == 'full' && isset($build['an_additional_field'])) {\n // Change its weight.\n $build['an_additional_field']['#weight'] = -10;\n\n // Add a #post_render callback to act on the rendered HTML of the entity.\n $build['#post_render'][] = 'my_module_node_post_render';\n }\n}", "title": "" }, { "docid": "1395639ae0f4a091a48f50213fc1686d", "score": "0.4668079", "text": "function ctheme_preprocess_node(&$variables) {\n if (isset($variables['content']['links']['comment']['#links']['comment-add']['title'])) {\n $variables['content']['links']['comment']['#links']['comment-add']['title'] = t('Comment');\n }\n}", "title": "" }, { "docid": "06609cd5e10dccb33e459a9ea16ff557", "score": "0.46672994", "text": "function bt_module_preprocess_module_type(&$variables) {\n if ($variables['view_mode'] == 'full') {\n drupal_add_css(drupal_get_path('module', 'bt_core') . '/css/module/bt_module.css');\n $image = render($variables['content']['field_module_image']);\n $body = render($variables['content']['body']);\n $created_date = date('F j, Y', $variables['created']);\n $sub_heading = render($variables['content']['field_sub_heading']);\n $tags = array();\n foreach ($variables['field_tags'] as $tag) {\n $tags[$tag['tid']]['name'] = $tag['taxonomy_term']->name;\n $tags[$tag['tid']]['url'] = 'taxonomy/term/' . $tag['tid'];\n }\n\n $variables['module_content']['image'] = $image;\n $variables['module_content']['body'] = $body;\n $variables['module_content']['sub_heading'] = $sub_heading;\n $variables['module_content']['created_date'] = $created_date;\n $variables['module_content']['tags'] = $tags;\n $variables['module_content']['author'] = 'Brandon Tate';\n }\n\n if ($variables['view_mode'] == 'teaser') {\n $body = render($variables['content']['body']);\n $created_date = date('F j, Y', $variables['created']);\n $variables['module_content']['body'] = $body;\n $variables['module_content']['created_date'] = $created_date;\n $variables['module_content']['author'] = 'Brandon Tate';\n }\n}", "title": "" }, { "docid": "da979a208c9e71dcc54ecfd70f3016c0", "score": "0.4665648", "text": "function initialize_post_class_view($classes) {\n\t\t$class = is_single() ? 'single-view' : 'list-view';\n\t\t$classes[] = $class;\n\t\treturn $classes;\n\t}", "title": "" }, { "docid": "d378b58e9c90747bfe81dc75fc31a26e", "score": "0.46645296", "text": "private function _getNodeType($nodeURL)\n {\n phpCAS::traceBegin();\n if (preg_match(\"/^(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$/\", $nodeURL)) {\n phpCAS::traceEnd(self::IP);\n return self::IP;\n } else {\n phpCAS::traceEnd(self::HOSTNAME);\n return self::HOSTNAME;\n }\n }", "title": "" }, { "docid": "caefdd1316e28a141b6b32f4b9195a9b", "score": "0.4663591", "text": "function hook_entity_type_build(array &$entity_types) {\n /** @var \\Drupal\\Core\\Entity\\EntityTypeInterface[] $entity_types */\n // Add a form for a custom node form without overriding the default\n // node form. To override the default node form, use hook_entity_type_alter().\n $entity_types['node']->setFormClass('mymodule_foo', 'Drupal\\mymodule\\NodeFooForm');\n}", "title": "" }, { "docid": "d67d407d53b85eb271f70441dd45d099", "score": "0.46590576", "text": "function theme_io_checkbox_tree_item($variables) {\n $element = $variables['element'];\n $children = element_children($element);\n $output = '';\n\n $sm = $element['#level_start_minimized'] ? ' islandora-object-tree-collapsed' : '';\n\n if (is_array($children) && count($children) > 1) {\n $output .= \"<div class='islandora-object-tree-button$sm'></div>\";\n }\n elseif (!$element['#leaves_only']) {\n $output .= \"<div class='no-islandora-object-tree-button'></div>\";\n }\n\n foreach ($children as $child) {\n $output .= drupal_render($element[$child]);\n }\n\n return $output;\n}", "title": "" }, { "docid": "355f85a6376b1a06855015f762d794c4", "score": "0.4658816", "text": "public function setNode(Node $node);", "title": "" }, { "docid": "1f0cbcc9ed1875d88e7cef02b4bca78b", "score": "0.46574727", "text": "function &AddRootNode($text,$class=\"folder\")\n\t{\n\t\t$this->Tag = \"ul\";\n\t\t$res = new uiTreeNode($text);\n\t\t$this->content($res);\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "96982bc228115c30f174e437ca96cd9b", "score": "0.46259797", "text": "public function executeAdd_node() {\n\t\tif ($this->getNodeType () == \"\") {\n\t\t\treturn $this->onError ( \"Il faut un NodeType.\" );\n\t\t}\n\t\tif (! $this->valide_ParentNode ()) {\n\t\t\treturn $this->onError ( \"Il faut un Parent Node valide.\" );\n\t\t}\n\t\t\n\t\tswitch ($this->getNodeType ()) {\n\t\t\tcase 'header' :\n\t\t\t\t// Blank out the graphId, rra_id, hostID and host_grouping_style fields\n\t\t\t\t$this->setGraphId ( 0 );\n\t\t\t\t$this->setRraId ( 'none' );\n\t\t\t\t$this->setHostId ( 0 );\n\t\t\t\t$this->setHostGroupStyle ( 1 );\n\t\t\t\t// Header --name must be given\n\t\t\t\tif ($this->getName () == \"\") {\n\t\t\t\t\treturn $this->onError ( \"Il faut un Nom.\" );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'graph' :\n\t\t\t\t// Blank out name, hostID, host_grouping_style\n\t\t\t\t$this->setName ( 'ND' );\n\t\t\t\t$this->setHostId ( 0 );\n\t\t\t\t$this->setHostGroupStyle ( 1 );\n\t\t\t\t// verify rra-id\n\t\t\t\tif ($this->getRraId () === 0) {\n\t\t\t\t\treturn $this->onError ( \"Il faut un rra-id > 0.\" );\n\t\t\t\t}\n\t\t\t\tif (! $this->getGraphsData ()\n\t\t\t\t\t->valide_graph_by_id ( $this->getGraphId () )) {\n\t\t\t\t\treturn $this->onError ( \"Le graph Id n'est pas valide.\" );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'host' :\n\t\t\t\t// Blank out graphId, rra_id, name fields\n\t\t\t\t$this->setGraphId ( 0 );\n\t\t\t\t$this->setRraId ( 'none' );\n\t\t\t\t$this->setName ( 'ND' );\n\t\t\t\tif (! $this->getHostData ()\n\t\t\t\t\t->valide_host_by_id ( $this->getHostId () )) {\n\t\t\t\t\treturn $this->onError ( \"Il faut un host Id valide.\" );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t// $nodeId could be a Header Node, a Graph Node, or a Host node.\n\t\t$nodeId = api_tree_item_save ( 0, $this->getTreeId (), $this->getNodeType (), $this->getParentNode (), $this->getName (), $this->getGraphId (), $this->getRraId (), $this->getHostId (), $this->getHostGroupStyle (), $this->getSortMethod (), false );\n\t\t$this->setNodeId ( $nodeId );\n\t\t$this->onDebug ( \"Node-id : \" . $nodeId, 1 );\n\t\t\n\t\treturn $nodeId;\n\t}", "title": "" }, { "docid": "da0c4c8c80a8ef86129a77fa0e6869af", "score": "0.46242183", "text": "public function __construct() {\n//\n// ));\n\n $this->objects['node'] = new Object_Map('node', array(\n 'nid' => 'int',\n 'created' => 'int',\n 'changed' => 'int',\n 'uid' => 'int',\n ));\n \n $this->objects['node']->is_root = true;\n $this->add_join(\"LEFT JOIN node_revisions ON node.vid = node_revisions.vid\\n\");\n $this->add_join(\"LEFT JOIN users ON node.uid = users.uid\\n\");\n \n $this->add_field('node.title AS title');\n $this->add_field('node_revisions.body AS body');\n $this->add_field('node.type AS type');\n $this->add_field('users.name AS user_name');\n }", "title": "" }, { "docid": "457d598915f4e4890c2411c515d11313", "score": "0.46169794", "text": "function orgrightB_preprocess_node_role($node) {\n // and a bottom full width region\n $header = '<div class=\"content-orgright content-role\">';\n $footer = '</div>';\n // Prepare the upper left panel\n $lupper = '<div class=\"panel-lupper\">';\n $lupper .= $node->content['role']['#value'];\n $lupper .= $node->content['committee']['#value'];\n $lupper .= '</div>';\n // Prepare the upper right panel\n $rupper = '<div class=\"panel-rupper\">';\n $rupper .= $node->content['multiperson']['#value'];\n $rupper .= $node->content['allowvacant']['#value'];\n $rupper .= '</div>';\n // Prepare the middle panel\n $middle = '<div class=\"panel-middle\">';\n $middle .= $node->content['body']['#value'];\n $middle .= '</div>';\n // Done if a teaser view is all that is required\n // will be more if a full page is being generated\n if (isset($node->body)) {\n // Prepare the bottom panel\n $bottom = '<div class=\"panel-bottom\">';\n $bottom .= '<div class=\"role rule-off\"></div>';\n $bottom .= orgrightB_content_cck_fields($node, 'role');\n $bottom .= $node->content['notes']['#value'];\n $bottom .= '<div class=\"role rule-off\"></div>';\n if (isset($node->content['terms'])) {\n $bottom .= $node->content['terms'];\n $bottom .= '<div class=\"role rule-off\"></div>';\n }\n if (isset($node->content['assignments'])) {\n $bottom .= $node->content['assignments']['#value'];\n $bottom .= $node->content['assignments']['#children'];\n }\n $bottom .= $node->content['add-assignment']['#value'];\n $bottom .= '<div class=\"role rule-off\"></div>';\n if (isset($node->content['doclinks'])) {\n $bottom .= $node->content['doclinks']['#value'];\n $bottom .= $node->content['doclinks']['#children'];\n }\n if (isset($node->content['add-doclink'])) {\n $bottom .= $node->content['add-doclink']['#value'];\n $bottom .= '<div class=\"role rule-off\"></div>';\n }\n $bottom .= '</div>';\n }\n else {\n $bottom = '';\n }\n // all done\n return $header . $lupper . $rupper . $middle . $bottom . $footer;\n}", "title": "" }, { "docid": "e4710c9cfc08db7c288933501c49b050", "score": "0.46052003", "text": "function og_rules_action_add_group_node($node, $settings) {\n if (og_is_group_type($node->type)) {\n // Add og keys to the node.\n foreach ($settings['og_fieldset']['og_settings'] as $key => $value){\n $node->$key = $value;\n }\n return array('node' => $node);\n }\n}", "title": "" }, { "docid": "2d89099d7ab113daefb5b7898ca975a3", "score": "0.4601497", "text": "public function setNode($nodeId)\n {\n if (!($node = Core_Model_DiFactory::getNodeManager()->getNode($nodeId))) {\n return false;\n }\n \n $data['id'] = $node->getId();\n $data['search'] = $node->getName() . ' ' . $node->getData('ipAddress');\n $data['headline'] = $node->getName();\n $data['teaser'] = $node->getName();\n $data['link'] = $this->_getUrlHelper()->url(array($node->getName()), 'nodedetail');\n $data['categoryLink'] = $this->_getUrlHelper()->url(array(), 'nodes');\n $data['pictureLeft'] = self::SEARCH_CATEGORY_NODE_IMG;\n \n return $this->_getSearchIndex()->setSearchIndex(self::SEARCH_CATEGORY_NODE, $nodeId, $data);\n }", "title": "" }, { "docid": "bd935b96183eb294d42c39b272482eab", "score": "0.46010134", "text": "function _voipextension_change_extension_main_field_status($node_type, $status = 1) {\n db_query(\"UPDATE {\". content_field_tablename() .\"} SET active = %d WHERE field_name = '%s' AND module = '%s'\", $status, VOIPEXTENSION_EXTENSION_MAIN_FIELD, 'voipextension');\n db_query(\"UPDATE {\". content_instance_tablename() .\"} SET widget_active = %d WHERE field_name = '%s' AND type_name = '%s' AND widget_module = '%s'\", $status, VOIPEXTENSION_EXTENSION_MAIN_FIELD, $node_type, 'voipextension');\n content_clear_type_cache(TRUE);\n}", "title": "" }, { "docid": "03a9bdffe48e3897a2052e92724f112f", "score": "0.45985577", "text": "protected function _node($data) {\n\t}", "title": "" }, { "docid": "a4580ce24fb071b4c59b140bc8ad4cd3", "score": "0.45980692", "text": "public function nodeTypehint($label);", "title": "" }, { "docid": "7589afde5e2342d9c725da9350815f3b", "score": "0.4582939", "text": "function pps_theme_base_menu_local_task($vars) {\n $mappings = array(\n 'node/%/view' => 'icon-eye',\n 'node/%/edit' => 'icon-pencil',\n 'node/%/devel' => 'icon-wrench',\n );\n $path = !empty($vars['element']['#link']['path']) ? $vars['element']['#link']['path'] : NULL;\n if (array_key_exists($path, $mappings)) {\n $vars['element']['#link']['localized_options']['attributes']['class'][] = $mappings[$path];\n }\n return theme_menu_local_task($vars);\n}", "title": "" }, { "docid": "48be7db58e8b516bfedeb9575bbfabdc", "score": "0.4580386", "text": "function p2pu10_preprocess_node($vars = array()) {\n\n if($vars['teaser']) {\n $vars['template_files'] = array(\n 'node-teaser', \n 'node-'.$vars['node']->type.'-teaser',\n );\n }\n if ($vars['type'] == 'forum' && !empty($vars['og_forum_nid'])) {\n // We're using our own node-forum.tpl.php so set up some variables to use\n $vars['p2pu_forum_author'] = isset($vars['node']->uid) ? theme('username', $vars['node']) : '';\n $vars['p2pu_forum_time'] = isset($vars['node']->created) ? format_interval(time() - $vars['node']->created) : '';\n \n $course_name = array_values($vars['og_groups_both']);\n $tid = p2pu_get_discussion_forum_tid($vars['og_forum_nid']);\n $forum = taxonomy_get_term($tid);\n $vars['back_to_forum_link'] = l(t('Go back to: ') . $forum->name, 'node/' . $vars['og_forum_nid'] . '/forums');\n }\n return $vars;\n}", "title": "" }, { "docid": "7fe62263d9410d88a4603e95f53c82cf", "score": "0.45801753", "text": "function media_nstree_li($item){\n $class='media level'.$item['level'];\n if($item['open']){\n $class .= ' open';\n $img = DOKU_BASE.'lib/images/minus.gif';\n $alt = '&minus;';\n }else{\n $class .= ' closed';\n $img = DOKU_BASE.'lib/images/plus.gif';\n $alt = '+';\n }\n return '<li class=\"'.$class.'\">'.\n '<img src=\"'.$img.'\" alt=\"'.$alt.'\" />';\n}", "title": "" }, { "docid": "54b0fb2a6f3a65a927c80690aa822b9b", "score": "0.45747015", "text": "function bootstrapstyle_preprocess_node(&$vars) {\n $node = $vars['node'];\n $links = $node->links;\n if ($links) {\n foreach ($links as $key => $link) {\n _bootstrapstyle_icon_link($links[$key], $key);\n }\n $vars['links'] = !empty($links) ? theme('links', $links, array('class' => 'links inline')) : '';\n }\n\n //teaser template\n if ($vars['teaser']) {\n $vars['template_files'][] = 'node-teaser';\n $vars['template_files'][] = 'node-teaser-'. $vars['type'];\n }\n \n //wookmark\n $items = array();\n if ($vars['page'] && $node->field_image && $node->field_show_images && $node->field_show_images[0]['value'] == 1) {\n foreach($node->field_image as $image) {\n $items[] = $image['view'];\n }\n if ($items) {\n drupal_add_js(drupal_get_path('theme', 'bootstrapstyle'). '/lib/jquery.wookmark.min.js');\n drupal_add_js('\n $(window).load(function(){\n $(\"#wookmark li\").wookmark({\n autoResize:true, itemWidth:265, container:$(\"#wookmark-container\"),\n offset:2, outerOffset:3\n });\n });\n ', 'inline');\n $attributes = array('id' => 'wookmark');\n $vars['wookmark'] = theme('item_list', $items, NULL, 'ul', $attributes);\n }\n }\n \n //zrssfeed\n if (isset($node->field_zrssfeed)) {\n $zrssfeed = '';\n $items = array();\n drupal_add_js(drupal_get_path('theme', 'bootstrapstyle'). '/lib/jquery.zrssfeed.js');\n foreach($node->field_zrssfeed as $key => $val) {\n $id = 'zrssfeed'. $node->nid. '-'. $key;\n $zrssfeed .= '<div id=\"'. $id. '\"></div>';\n $items[$id] = $val['value'];\n }\n $vars['zrssfeed'] .= $zrssfeed;\n \n $settings = array('zrssfeed' => array(\n 'node'. $node->nid => array(\n 'items' => $items,\n 'teaser' => $vars['teaser'],\n ),\n ));\n drupal_add_js($settings, 'setting');\n }\n \n}", "title": "" }, { "docid": "a8ef1e6bd91dc3cb3012e46e18b2d139", "score": "0.45674932", "text": "function frontend_node_activity_view_alter_forCityChannel(&$node, $city){\n \n}", "title": "" }, { "docid": "a1ca974ba09a3b9dc110f26d71708434", "score": "0.4559925", "text": "public function doFlagNode() {\n $node = $this->drupalCreateNode(['type' => $this->nodeType]);\n $node_id = $node->id();\n $flag_id = $this->flag->id();\n\n // Grant the flag permissions to the authenticated role, so that both\n // users have the same roles and share the render cache. ???? TODO\n $this->grantFlagPermissions($this->flag);\n\n // Create and login a new user.\n $user_1 = $this->drupalCreateUser();\n $this->drupalLogin($user_1);\n\n // Click the flag link.\n $this->drupalGet('node/' . $node_id);\n // Find the marked-up flag short text in the raw HTML.\n $this->assertRaw(Xss::filterAdmin($this->flag->getShortText('flag')));\n // Xss::filter() is used to strip all HTML tags from the short text\n // because clickLink() looks for text as it appears in the brower, and that\n // does not include the unescaped HTML tags. Note that the stripped tags\n // could either be at the ends (we added the italics tags above) OR they\n // could be in the middle as a result of a randomly-generated valid tag\n // in the flag text.\n $this->clickLink(Html::decodeEntities(Xss::filter($this->flag->getShortText('flag'), [/* no tags allowed */])));\n\n // Check that the node is flagged.\n $this->drupalGet('node/' . $node_id);\n $this->assertRaw(Xss::filterAdmin($this->flag->getShortText('unflag')));\n\n // Unflag the node.\n $this->drupalGet('node/' . $node_id);\n $this->clickLink(Html::decodeEntities(Xss::filter($this->flag->getShortText('unflag'), [/* no tags allowed */])));\n\n // Check that the node is no longer flagged.\n $this->drupalGet('node/' . $node_id);\n $this->assertRaw(Xss::filterAdmin($this->flag->getShortText('flag')));\n }", "title": "" }, { "docid": "630ca2097c321880cf9e8ee65a2de897", "score": "0.45579016", "text": "function orgrightB_preprocess_node_folder($node) {\n // and a lower full width region\n $header = '<div class=\"content-orgright content-folder\">';\n $footer = '</div>';\n // Prepare the upper left panel\n $lupper = '<div class=\"panel-lupper\">';\n $lupper .= $node->content['folder']['#value'];\n $lupper .= $node->content['parent']['#value'];\n $lupper .= $node->content['drawer']['#value'];\n $lupper .= $node->content['folderstatus']['#value'];\n $lupper .= '</div>';\n // Prepare the upper right panel\n $rupper = '<div class=\"panel-rupper\">';\n $rupper .= $node->content['body-label']['#value'];\n $rupper .= $node->content['body']['#value'];\n $rupper .= '</div>';\n // Done if a teaser view is all that is required\n // will be more if a full page is being generated\n if (isset($node->body)) {\n // Prepare the bottom panel\n $bottom = '<div class=\"panel-bottom\">';\n $bottom .= '<div class=\"folder rule-off\"></div>';\n $bottom .= orgrightB_content_cck_fields($node, 'folder');\n $bottom .= $node->content['notes']['#value'];\n $bottom .= '<div class=\"folder rule-off\"></div>';\n if (isset($node->content['terms'])) {\n $bottom .= $node->content['terms'];\n $bottom .= '<div class=\"folder rule-off\"></div>';\n }\n $bottom .= $node->content['add-folder']['#value'];\n $bottom .= '<div class=\"folder rule-off\"></div>';\n if (isset($node->content['subfolders'])) {\n $bottom .= $node->content['subfolders']['#value'];\n $bottom .= $node->content['subfolders']['#children'];\n }\n $bottom .= $node->content['add-subfolder']['#value'];\n $bottom .= '<div class=\"folder rule-off\"></div>';\n if (isset($node->content['documents'])) {\n $bottom .= $node->content['documents']['#value'];\n $bottom .= $node->content['documents']['#children'];\n }\n $bottom .= $node->content['add-document']['#value'];\n $bottom .= '<div class=\"folder rule-off\"></div>';\n if (isset($node->content['doclinks'])) {\n $bottom .= $node->content['doclinks']['#value'];\n $bottom .= $node->content['doclinks']['#children'];\n }\n if (isset($node->content['add-doclink'])) {\n $bottom .= $node->content['add-doclink']['#value'];\n $bottom .= '<div class=\"folder rule-off\"></div>';\n }\n $bottom .= '</div>';\n }\n else {\n $bottom = '';\n }\n // all done\n return $header . $lupper . $rupper . $bottom . $footer;\n}", "title": "" }, { "docid": "2223aa3956093f874755097574dd5f08", "score": "0.45556644", "text": "public function review_class() {\n\t\t echo 'class=\"' . join( ' ', $this->get_review_class() ) . '\"';\n\t}", "title": "" }, { "docid": "f85f08f5c91fd334c31bd59e7ed65c4c", "score": "0.4554907", "text": "public function canAccessNode($node_id, $type = 'node_id')\n\t{\n\t\tif (!empty($this->navigation->navigation[$node_id][$type])) {\n\t\t\treturn $this->navigation->navigation[$node_id][$type];\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "e083aa7a19fe8efd194b97f5495d1d14", "score": "0.45496792", "text": "function opening_times_body_classes( $classes ) {\n\tif ( 'reading' == get_post_type() && is_singular( 'reading' ) ) {\n\t\t$classes[] = 'post-type-archive-reading';\n\t}\n\t\n\tif ( get_background_image() ) {\n\t\t$classes[] = 'custom-background-active';\n\t}\n\n\t$classes[] = 'sceneElement site';\n\t\n\treturn $classes;\n}", "title": "" }, { "docid": "9c3a30c59995b7541b9e3fe105978a1a", "score": "0.45481434", "text": "public function callback_commentsInitType($class='discussion') {\n \t$type = $this->Session->read(\"comments.viewType.{$class}\");\n\t\tif (empty($type)) {\n\t \tswitch ($class) {\n\t\t\t\tcase 'discussion': $type = 'tree'; break;\n\t\t\t\tcase 'help': $type = 'flat'; break;\n\t\t\t\tdefault: $type = 'flat'; break;\n\t \t}\n\t\t}\n\t\treturn $type;\n }", "title": "" }, { "docid": "4c0b4bb6e2d8da8fdef6ef5759eda3e4", "score": "0.45469922", "text": "function hook_nodeapi_TYPE_OP(&$node, $a3, $a4) {\n // From hosting_nodeapi_client_delete_revision().\n db_query('DELETE FROM {hosting_client} WHERE vid = %d', $node->vid);\n}", "title": "" }, { "docid": "2d0105d55ccadac9afb89102e27f0c66", "score": "0.45426694", "text": "public function registerNodeTypes($types, $allowUpdate);", "title": "" }, { "docid": "11b11f0210e75a1c3b2eb02f8de82ad5", "score": "0.45386252", "text": "function juraport_theme_preprocess_node(&$variables, $hook) {\n // Optionally, run node-type-specific preprocess functions, like\n // juraport_preprocess_node_page() or juraport_preprocess_node_story().\n $function = __FUNCTION__ . '_' . $variables['node']->type;\n if (function_exists($function)) {\n $function($variables, $hook);\n }\n}", "title": "" }, { "docid": "4a181f62c4d58178d1727c1731871552", "score": "0.45233467", "text": "public function registerNodeTypesCnd($cnd, $allowUpdate);", "title": "" }, { "docid": "0d97a7addfbf3dbd002bc48ac1a7311d", "score": "0.45211264", "text": "protected function createNodeType() {\n $node_type = NodeType::create([\n 'type' => 'page',\n 'label' => 'Page',\n ]);\n $node_type->save();\n $workflow = $this->createEditorialWorkflow();\n $workflow->getTypePlugin()->addEntityTypeAndBundle('node', 'page');\n $workflow->save();\n }", "title": "" }, { "docid": "4edbb045ac70e131fad60347b5349a28", "score": "0.451496", "text": "private function write_node($node_attributes) {\n $this -> xmlw -> startElement('node');\n $this -> xmlw -> writeAttribute('type', $node_attributes['type']);\n $this -> xmlw -> writeAttribute('cidr', $node_attributes['cidr']);\n $this -> xmlw -> endElement();\n }", "title": "" }, { "docid": "c30a3d109c83bd2b0002e3135b792f93", "score": "0.45129094", "text": "abstract function getNodeContent($a_node);", "title": "" }, { "docid": "cbaa4052037fb160b7a9b238bc47e610", "score": "0.4507325", "text": "public function vxBoardView($board_id) {\n\t\tglobal $GOOGLE_AD_LEGAL;\n\t\t\n\t\t$Node = new Node($board_id, $this->db);\n\t\t$Section = $Node->vxGetNodeInfo($Node->nod_sid);\n\t\tif ($this->User->vxIsLogin()) {\n\t\t\t$sql = \"SELECT fav_id FROM babel_favorite WHERE fav_uid = {$this->User->usr_id} AND fav_type = 1 AND fav_res = {$Node->nod_id}\";\n\t\t\t$rs = mysql_query($sql, $this->db);\n\t\t\tif (mysql_num_rows($rs) == 1) {\n\t\t\t\t$Fav = mysql_result($rs, 0, 0);\n\t\t\t} else {\n\t\t\t\t$Fav = 0;\n\t\t\t}\n\t\t\tmysql_free_result($rs);\n\t\t} else {\n\t\t\t$Fav = 0;\n\t\t}\n\t\techo('<div id=\"main\">');\n\t\techo('<div class=\"blank\" align=\"left\">你当前位于 <a href=\"/\">' . Vocabulary::site_name . '</a> &gt; <a href=\"/go/' . $Section->nod_name . '\" target=\"_self\">' . $Section->nod_title . '</a> &gt; ' . $Node->nod_title);\n\t\techo('</div>');\n\t\techo('<div class=\"blank\" align=\"left\">');\n\t\techo('<span class=\"text_large\">');\n\t\tif ($Fav > 0) {\n\t\t\t$nod_ico = 'star';\n\t\t} else {\n\t\t\t$nod_ico = 'board';\n\t\t}\n\t\techo('<img src=\"/img/ico_' . $nod_ico . '.gif\" align=\"absmiddle\" class=\"home\" />' . $Node->nod_title);\n\t\t/* S: add to favorite */\n\t\tif ($this->User->vxIsLogin()) {\n\t\t\tif ($Fav > 0) {\n\t\t\t\techo('<div id=\"nodFav\" style=\"font-size: 12px; display: inline; margin-left: 10px;\"><input type=\"image\" onclick=\"removeFavoriteNode(' . $Fav . ')\" src=\"/img/tico_minus.gif\" align=\"absmiddle\" /></div>');\n\t\t\t} else {\n\t\t\t\techo('<div id=\"nodFav\" style=\"font-size: 12px; display: inline; margin-left: 10px;\"><input type=\"image\" onclick=\"addFavoriteNode(' . $Node->nod_id . ')\" src=\"/img/tico_add.gif\" align=\"absmiddle\" /></div>');\n\t\t\t}\n\t\t}\n\t\techo('&nbsp;<a href=\"/remix/' . $Node->nod_name . '\"><img src=\"/img/tico_fw.gif\" border=\"0\" align=\"absmiddle\" /></a>');\n\t\t/* E: add to favorite */\n\t\techo('</span>');\n\t\techo('<br />本讨论区中共有 ' . $Node->nod_topics . ' 个主题');\n\t\t/* S: how many favs */\n\t\techo $Node->nod_favs ? ',' . $Node->nod_favs . ' 人收藏了此讨论区' : ',无人收藏此讨论区';\n\t\techo(',<a href=\"/go/' . $Node->nod_name . '\" class=\"var\"><img src=\"/img/pico_fw.gif\" align=\"absmiddle\" border=\"0\" /></a>&nbsp;<a href=\"/remix/' . $Node->nod_name . '\" class=\"t\">切换到 REMIX 模式</a>');\n\t\t/* E: how many favs */\n\t\tif (!$Node->vxDrawChannels()) {\n\t\t\techo(',无相关频道');\n\t\t}\n\t\t\n\t\techo('</div>');\n\t\techo('<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"2\" class=\"board\">');\n\t\tif (strlen($Node->nod_header) > 0) {\n\t\t\techo('<tr><td align=\"left\" class=\"hf\" colspan=\"3\">' . $Node->nod_header . '</td><td class=\"hf\" align=\"right\"><a href=\"/topic/new/' . $Node->nod_id . '.vx\" target=\"_self\" class=\"img\"><img src=\"/img/silver/btn_topic_new.gif\" alt=\"创建新主题\" border=\"0\" /></a></td></tr>');\n\t\t} else {\n\t\t\techo('<tr><td align=\"left\" class=\"hf\" colspan=\"3\"></td><td class=\"hf\" align=\"right\"><a href=\"/topic/new/' . $Node->nod_id . '.vx\" target=\"_self\" class=\"img\"><img src=\"/img/silver/btn_topic_new.gif\" alt=\"创建新主题\" border=\"0\" /></a></td></tr>');\n\t\t}\n\t\t$p = array();\n\t\t$p['base'] = '/board/view/' . $board_id . '/';\n\t\t$p['ext'] = '.html';\n\t\t$sql = \"SELECT COUNT(tpc_id) FROM babel_topic WHERE tpc_pid = {$board_id}\";\n\t\t$rs = mysql_query($sql, $this->db);\n\t\t$p['items'] = mysql_result($rs, 0, 0);\n\t\tmysql_free_result($rs);\n\t\tif ($p['items'] > 0) {\n\t\t\t$p['size'] = BABEL_NOD_PAGE;\n\t\t\t$p['span'] = BABEL_PG_SPAN;\n\t\t\tif (($p['items'] % $p['size']) == 0) {\n\t\t\t\t$p['total'] = $p['items'] / $p['size'];\n\t\t\t} else {\n\t\t\t\t$p['total'] = floor($p['items'] / $p['size']) + 1;\n\t\t\t}\n\t\t\tif (isset($_GET['p'])) {\n\t\t\t\t$p['cur'] = intval($_GET['p']);\n\t\t\t} else {\n\t\t\t\t$p['cur'] = 1;\n\t\t\t}\n\t\t\tif ($p['cur'] < 1) {\n\t\t\t\t$p['cur'] = 1;\n\t\t\t}\n\t\t\tif ($p['cur'] > $p['total']) {\n\t\t\t\t$p['cur'] = $p['total'];\n\t\t\t}\n\t\t\tif (($p['cur'] - $p['span']) >= 1) {\n\t\t\t\t$p['start'] = $p['cur'] - $p['span'];\n\t\t\t} else {\n\t\t\t\t$p['start'] = 1;\n\t\t\t}\n\t\t\tif (($p['cur'] + $p['span']) <= $p['total']) {\n\t\t\t\t$p['end'] = $p['cur'] + $p['span'];\n\t\t\t} else {\n\t\t\t\t$p['end'] = $p['total'];\n\t\t\t}\n\t\t\t\t$p['sql'] = ($p['cur'] - 1) * $p['size'];\n\t\t\tif ($p['total'] > 1) {\n\t\t\t\techo('<tr><td align=\"left\" class=\"hf\" colspan=\"4\">');\n\t\t\t\t$this->vxDrawPages($p);\n\t\t\t\techo('</td></tr>');\n\t\t\t}\n\t\t\t\n\t\t\t// sticky topics\n\t\t\t$sql = \"SELECT tpc_id, tpc_pid, tpc_uid, tpc_title, tpc_hits, tpc_posts, tpc_created, tpc_lastupdated, tpc_lasttouched, usr_id, usr_nick, usr_gender, usr_portrait FROM babel_topic, babel_user WHERE tpc_uid = usr_id AND tpc_pid = {$Node->nod_id} AND tpc_flag = 2 ORDER BY tpc_lasttouched DESC, tpc_created DESC\";\n\t\t\t$rs = mysql_query($sql, $this->db);\n\t\t\t$i = 0;\n\t\t\twhile ($Topic = mysql_fetch_object($rs)) {\n\t\t\t\t$img_p = $Topic->usr_portrait ? '/img/p/' . $Topic->usr_portrait . '_n.jpg' : '/img/p_' . $Topic->usr_gender . '_n.gif';\n\t\t\t\t$i++;\n\t\t\t\techo('<tr>');\n\t\t\t\techo('<td width=\"24\" height=\"30\" align=\"center\" valign=\"middle\" class=\"star\"><img src=\"/img/star_sticky.gif\" /></td>');\n\t\t\t\tif ($i % 2 == 0) {\n\t\t\t\t\t$css_class = 'even';\n\t\t\t\t} else {\n\t\t\t\t\t$css_class = 'odd';\n\t\t\t\t}\n\t\t\t\techo('<td class=\"' . $css_class . '\" height=\"30\" align=\"left\"><span class=\"tip\">[置顶]</span> <a href=\"/topic/view/' . $Topic->tpc_id . '.html\" target=\"_self\">' . make_plaintext($Topic->tpc_title) . '</a>&nbsp;');\n\t\t\t\tif ($Topic->tpc_posts > 0) {\n\t\t\t\t\techo('<span class=\"tip_i\"><small class=\"aqua\">... ' . $Topic->tpc_posts . ' replies</small> <small>... viewed ' . $Topic->tpc_hits . ' times</small></span>');\n\t\t\t\t} else {\n\t\t\t\t\techo('<span class=\"tip_i\"><small>... no reply ... viewed ' . $Topic->tpc_hits . ' times</small></span>');\n\t\t\t\t}\n\t\t\t\techo('</td>');\n\t\t\t\techo('<td class=\"' . $css_class . '\" width=\"120\" height=\"30\" align=\"left\"><a href=\"/u/' . $Topic->usr_nick . '\"><img src=\"' . $img_p . '\" class=\"portrait\" align=\"absmiddle\" /> ' . $Topic->usr_nick . '</a></td>');\n\t\t\t\tif ($Topic->tpc_lasttouched > $Topic->tpc_created) {\n\t\t\t\t\techo('<td class=\"' . $css_class . '\" width=\"120\" height=\"30\" align=\"left\"><small class=\"time\">' . make_descriptive_time($Topic->tpc_lasttouched) . '</small></td>');\n\t\t\t\t} else {\n\t\t\t\t\techo('<td class=\"' . $css_class . '\" width=\"120\" height=\"30\" align=\"left\"><small class=\"time\">' . make_descriptive_time($Topic->tpc_created) . '</small></td>');\n\t\t\t\t}\n\t\t\t\techo('</tr>');\n\t\t\t}\n\t\t\tmysql_free_result($rs);\n\t\t\t\n\t\t\t// normal topics\n\t\t\t$sql = \"SELECT tpc_id, tpc_pid, tpc_uid, tpc_title, tpc_hits, tpc_posts, tpc_created, tpc_lastupdated, tpc_lasttouched, usr_id, usr_nick, usr_gender, usr_portrait FROM babel_topic, babel_user WHERE tpc_uid = usr_id AND tpc_pid = {$Node->nod_id} AND tpc_flag = 0 ORDER BY tpc_lasttouched DESC, tpc_created DESC LIMIT {$p['sql']},{$p['size']}\";\n\t\t\t$rs = mysql_query($sql, $this->db);\n\t\t\twhile ($Topic = mysql_fetch_object($rs)) {\n\t\t\t\t$img_p = $Topic->usr_portrait ? '/img/p/' . $Topic->usr_portrait . '_n.jpg' : '/img/p_' . $Topic->usr_gender . '_n.gif';\n\t\t\t\t$i++;\n\t\t\t\techo('<tr>');\n\t\t\t\tif ($Topic->usr_id == $this->User->usr_id) {\n\t\t\t\t\techo('<td width=\"24\" height=\"30\" align=\"center\" valign=\"middle\" class=\"star\"><img src=\"/img/star_active.png\" /></td>');\n\t\t\t\t} else {\n\t\t\t\t\techo('<td width=\"24\" height=\"30\" align=\"center\" valign=\"middle\" class=\"star\"><img src=\"/img/star_inactive.png\" /></td>');\n\t\t\t\t}\n\t\t\t\tif ($i % 2 == 0) {\n\t\t\t\t\t$css_class = 'even';\n\t\t\t\t} else {\n\t\t\t\t\t$css_class = 'odd';\n\t\t\t\t}\n\t\t\t\techo('<td class=\"' . $css_class . '\" height=\"30\" align=\"left\"><a href=\"/topic/view/' . $Topic->tpc_id . '.html\" target=\"_self\">' . make_plaintext($Topic->tpc_title) . '</a>&nbsp;');\n\t\t\t\tif ($Topic->tpc_posts > 0) {\n\t\t\t\t\t$plural_posts = $Topic->tpc_posts > 1 ? 'replies' : 'reply';\n\t\t\t\t\techo('<span class=\"tip_i\"><small class=\"aqua\">... ' . $Topic->tpc_posts . ' ' . $plural_posts . '</small> <small>... viewed ' . $Topic->tpc_hits . ' times</small></span>');\n\t\t\t\t} else {\n\t\t\t\t\techo('<span class=\"tip_i\"><small>... no reply ... viewed ' . $Topic->tpc_hits . ' times</small></span>');\n\t\t\t\t}\n\t\t\t\techo('</td>');\n\t\t\t\techo('<td class=\"' . $css_class . '\" width=\"120\" height=\"30\" align=\"left\"><a href=\"/u/' . $Topic->usr_nick . '\"><img src=\"' . $img_p . '\" class=\"portrait\" align=\"absmiddle\" /> ' . $Topic->usr_nick . '</a></td>');\n\t\t\t\tif ($Topic->tpc_lasttouched > $Topic->tpc_created) {\n\t\t\t\t\techo('<td class=\"' . $css_class . '\" width=\"120\" height=\"30\" align=\"left\"><small class=\"time\">' . make_descriptive_time($Topic->tpc_lasttouched) . '</small></td>');\n\t\t\t\t} else {\n\t\t\t\t\techo('<td class=\"' . $css_class . '\" width=\"120\" height=\"30\" align=\"left\"><small class=\"time\">' . make_descriptive_time($Topic->tpc_created) . '</small></td>');\n\t\t\t\t}\n\t\t\t\techo('</tr>');\n\t\t\t}\n\t\t\tmysql_free_result($rs);\n\t\t\tif ($p['total'] > 1) {\n\t\t\t\techo('<tr><td align=\"left\" class=\"hf\" colspan=\"4\">');\n\t\t\t\t$this->vxDrawPages($p);\n\t\t\t\techo('</td></tr>');\n\t\t\t}\n\t\t}\n\t\tif (strlen($Node->nod_footer) > 0) {\n\t\t\techo('<tr><td align=\"left\" class=\"hf\" colspan=\"4\">' . $Node->nod_footer . '</td></tr>');\n\t\t}\n\t\t\n\t\t/* S ultimate cool flickr */\n\t\t$tag = $Node->nod_name;\n\t\tif ($this->User->usr_id == 1) {\n\t\t\t$f = Image::vxFlickrBoardBlock($tag, $this->User->usr_width, 4);\n\t\t\techo $f;\n\t\t\t$this->cl->save($f, 'board_flickr_' . $tag);\n\t\t} else {\n\t\t\tif ($f = $this->cl->get('board_flickr_' . $tag)) {\n\t\t\t\techo $f;\n\t\t\t} else {\n\t\t\t\t$f = Image::vxFlickrBoardBlock($tag, $this->User->usr_width, 4);\n\t\t\t\techo $f;\n\t\t\t\t$this->cl->save($f, 'board_flickr_' . $tag);\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* E ultimate cool flickr */\n\t\t\n\t\t/* S ultimate cool technorati */\n\t\t\n\t\tif (TN_API_ENABLED) {\n\t\t\t$tn = TN_PREFIX . $Node->nod_name;\n\t\t\t\n\t\t\t$T = fetch_rss($tn);\n\t\t\techo('<tr><td align=\"left\" class=\"hf\" colspan=\"4\" style=\"border-top: 1px solid #CCC;\">');\n\t\t\techo('<a href=\"http://www.technorati.com/tags/' . $Node->nod_name . '\"><img src=\"/img/tn_logo.gif\" align=\"absmiddle\" border=\"0\" /></a>&nbsp;&nbsp;&nbsp;<span class=\"tip_i\">以下条目链接到外部的与本讨论主题 [ ' . $Node->nod_title . ' ] 有关的 Blog。</span>');\n\t\t\techo('</td></tr>');\n\t\t\t$b = count($T->items) > 6 ? 6 : count($T->items);\n\t\t\tfor ($i = 0; $i < $b; $i++) {\n\t\t\t\t$Related = $T->items[$i];\n\t\t\t\t$css_class = $i % 2 ? 'odd' : 'even';\n\t\t\t\t$css_color = rand_color();\n\t\t\t\t@$count = $Related['tapi']['inboundlinks'] + $Related['tapi']['inboundblogs'];\n\t\t\t\t$css_font_size = '12';\n\t\t\t\techo('<tr><td width=\"24\" height=\"22\" align=\"center\"><a href=\"' . $Related['comments'] . '\" target=\"_blank\" rel=\"nofollow external\"><img src=\"/img/tnico_cosmos.gif\" align=\"absmiddle\" border=\"0\" /></a></td>');\n\t\t\t\techo('<td class=\"' . $css_class . '\" height=\"22\" align=\"left\">');\n\t\t\t\tif (isset($Related['title'])) {\n\t\t\t\t\techo '<a href=\"' . $Related['link'] . '\" target=\"_blank\" rel=\"external nofollow\" class=\"var\" style=\"color: ' . $css_color . '; font-size: ' . $css_font_size . 'px;\">' . $Related['title'] . '</a>';\n\t\t\t\t} else {\n\t\t\t\t\techo '<a href=\"' . $Related['link'] . '\" target=\"_blank\" rel=\"external nofollow\">' . $Related['link'] . '</a>';\n\t\t\t\t}\n\t\t\t\techo('</td>');\n\t\t\t\t\n\t\t\t\techo('<td class=\"' . $css_class . '\" width=\"120\" height=\"22\" align=\"left\">');\n\t\t\t\tif (isset($Related['tapi']['inboundlinks'])) {\n\t\t\t\t\techo('<span class=\"tip_i\"><small>' . $Related['tapi']['inboundlinks'] . ' inbound links</small></span>');\n\t\t\t\t}\n\t\t\t\techo('</td>');\n\t\t\t\techo('<td class=\"' . $css_class . '\" width=\"120\" height=\"22\" align=\"left\"><small class=\"time\">' . make_descriptive_time($Related['date_timestamp']) . '</small></td>');\n\t\t\t\techo('</tr>');\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* E ultimate cool technorati */\n\n\t\tif (GOOGLE_AD_ENABLED && $GOOGLE_AD_LEGAL && ($this->User->usr_width > 800)) {\n\t\t\techo('<tr>');\n\t\t\techo('<td align=\"center\" class=\"odd\" colspan=\"4\" style=\"border-top: 1px solid #CCC; padding-top: 10px; padding-bottom: 10px;\">');\n\t\t\techo('<iframe src=\"/cts/728x90.html\" width=\"728\" height=\"90\" frameborder=\"0\" marginheight=\"0\" marginwidth=\"0\" scrolling=\"no\"></iframe>');\n\t\t\techo('</td>');\n\t\t\techo('</tr>');\n\t\t}\n\t\techo('</table>');\n\t\techo('</div>');\n\t}", "title": "" }, { "docid": "050edfdaf912e8d2790eda955b410edb", "score": "0.45030043", "text": "public function setSourceNode($node) {}", "title": "" }, { "docid": "8cddb5443ec594eaeeb6bb733e6d4d52", "score": "0.4498142", "text": "public function getAllNodeTypes() {\r\n\t\tthrow new UnsupportedRepositoryOperationException();\r\n\t\treturn (array_merge($this->aPrimaryNodeTypes, $this->aMixinNodeTypes));\r\n\t}", "title": "" }, { "docid": "bd4abc2a010c7c575ef62b731eba5abe", "score": "0.44954693", "text": "public function setNodeTypeManager(NodeTypeManager $nodeTypeManager);", "title": "" }, { "docid": "e31bd5aaa380aed87eb5c342183c2f26", "score": "0.44947204", "text": "public function __construct($node)\n {\n }", "title": "" }, { "docid": "7203bb419142df887d3532a5429964e6", "score": "0.44933733", "text": "public function testEntityViewModeUI() {\n // Test the listing page.\n $this->drupalGet('admin/structure/display-modes/view');\n $this->assertSession()->statusCodeEquals(403);\n $this->drupalLogin($this->drupalCreateUser(['administer display modes']));\n $this->drupalGet('admin/structure/display-modes/view');\n $this->assertSession()->statusCodeEquals(200);\n $this->assertSession()->pageTextContains('Add view mode');\n $this->assertSession()->linkByHrefExists('admin/structure/display-modes/view/add');\n $this->assertSession()->linkByHrefExists('admin/structure/display-modes/view/add/entity_test');\n\n $this->drupalGet('admin/structure/display-modes/view/add/entity_test_mulrev');\n $this->assertSession()->statusCodeEquals(404);\n\n $this->drupalGet('admin/structure/display-modes/view/add');\n $this->assertSession()->linkNotExists('Test entity - revisions and data table', 'An entity type with no view builder cannot have view modes.');\n\n // Test adding a view mode including dots in machine_name.\n $this->clickLink('Test entity');\n $edit = [\n 'id' => strtolower($this->randomMachineName()) . '.' . strtolower($this->randomMachineName()),\n 'label' => $this->randomString(),\n ];\n $this->submitForm($edit, 'Save');\n $this->assertSession()->pageTextContains('The machine-readable name must contain only lowercase letters, numbers, and underscores.');\n\n // Test adding a view mode.\n $edit = [\n 'id' => strtolower($this->randomMachineName()),\n 'label' => $this->randomString(),\n ];\n $this->submitForm($edit, 'Save');\n $this->assertSession()->pageTextContains(\"Saved the {$edit['label']} view mode.\");\n\n // Test editing the view mode.\n $this->drupalGet('admin/structure/display-modes/view/manage/entity_test.' . $edit['id']);\n\n // Test that the link templates added by field_ui_entity_type_build() are\n // generating valid routes.\n $view_mode = EntityViewMode::load('entity_test.' . $edit['id']);\n $this->assertEquals(Url::fromRoute('entity.entity_view_mode.collection')->toString(), $view_mode->toUrl('collection')->toString());\n $this->assertEquals(Url::fromRoute('entity.entity_view_mode.add_form', ['entity_type_id' => $view_mode->getTargetType()])->toString(), $view_mode->toUrl('add-form')->toString());\n $this->assertEquals(Url::fromRoute('entity.entity_view_mode.edit_form', ['entity_view_mode' => $view_mode->id()])->toString(), $view_mode->toUrl('edit-form')->toString());\n $this->assertEquals(Url::fromRoute('entity.entity_view_mode.delete_form', ['entity_view_mode' => $view_mode->id()])->toString(), $view_mode->toUrl('delete-form')->toString());\n\n // Test deleting the view mode.\n $this->clickLink('Delete');\n $this->assertSession()->pageTextContains(\"Are you sure you want to delete the view mode {$edit['label']}?\");\n $this->submitForm([], 'Delete');\n $this->assertSession()->pageTextContains(\"The view mode {$edit['label']} has been deleted.\");\n }", "title": "" }, { "docid": "884c54af695f928650bc457dab9bfe97", "score": "0.44907877", "text": "function kfn_preprocess_node(&$vars, $hook) {\n\t$vars['node_original_url'] = $vars['node_url'];\n\tif (property_exists($vars['node'], 'path')) {\n\t\t$vars['node_url'] = url($vars['node']->path);\n\t}\n\t$date_array = explode(' ', $vars['date']);\n\t$vars['short_date'] = $date_array[1];\n\n\t$vars['block'] = false;\n\tif (array_key_exists('view', $vars) && $vars['view']->current_display == 'block'){\n\t\t$vars['block'] = true;\n\t}\n\n}", "title": "" } ]
aa694d5cef3a5bbb7b68415bf36c9884
Returns a record count for the query
[ { "docid": "eeb4cc06b9a4bb92835ab5c9409a9545", "score": "0.0", "text": "protected function _getListCount($query)\n\t{\n\t\treturn $this->getTotal();\n\t}", "title": "" } ]
[ { "docid": "fec5483196f87796fc1f44c97b61baf4", "score": "0.81269485", "text": "function getRecordCount() {\n $result = $GLOBALS['db']->query( 'SELECT COUNT(1) AS count FROM ' . $this->bean->table_name );\n $row = $GLOBALS['db']->fetchByAssoc( $result );\n return isset( $row['count'] ) ? $row['count'] : 0;\n\n }", "title": "" }, { "docid": "bf9663a0b2943b8817cb3911a7c7d304", "score": "0.8051948", "text": "public function CountOfRecords()\n {\n $database = new Base();\n\n return $database->Count_of_records();\n }", "title": "" }, { "docid": "3d2530c1df235ccedef4407172e8d25b", "score": "0.80120605", "text": "public function record_count() {\r\n return $this->db->count_all(\"tipomaquina\");\r\n }", "title": "" }, { "docid": "97ee435e822822e3b2920533a66b6112", "score": "0.80015874", "text": "public function count_records()\n {\n $sql = \"SELECT COUNT(*) AS num FROM \".$this->table;\n $rows = $this->fetch($sql, array());\n $total_rows = $rows[0]['num'];\n\n return $total_rows;\n }", "title": "" }, { "docid": "ab46cbf322369da45178cd1d6c9308c5", "score": "0.79850036", "text": "public function count()\n {\n $this->initQuery();\n return $this->count;\n }", "title": "" }, { "docid": "01f9f8fe6bf53cf8672ba72150f2c59c", "score": "0.7939395", "text": "public function record_count()\n {\n global $wpdb;\n $sql = \"SELECT COUNT(*) FROM {$wpdb->prefix}\" . self::$tablename;\n return $wpdb->get_var($sql);\n }", "title": "" }, { "docid": "349b43b78f64bf02641c182e6ac4341f", "score": "0.7901722", "text": "public function getRecordsCount(): int;", "title": "" }, { "docid": "192f6a7361ee4b344e0fdb585482fe14", "score": "0.78868955", "text": "function count( ) {\n $this->initialize();\n $sql = $this->all( );\n $dao = CRM_Core_DAO::executeQuery($sql, CRM_Core_DAO::$_nullArray);\n return $dao->N;\n }", "title": "" }, { "docid": "286f1b97afed67a1eabcab97ee6f3ab5", "score": "0.7841272", "text": "function SelectRecordCount() {\n\t\t$sSql = $this->SelectSQL();\n\t\t$cnt = $this->TryGetRecordCount($sSql);\n\t\tif ($cnt == -1) {\n\t\t\t$conn = &$this->Connection();\n\t\t\tif ($rs = $conn->Execute($sSql)) {\n\t\t\t\t$cnt = $rs->RecordCount();\n\t\t\t\t$rs->Close();\n\t\t\t}\n\t\t}\n\t\treturn intval($cnt);\n\t}", "title": "" }, { "docid": "286f1b97afed67a1eabcab97ee6f3ab5", "score": "0.7841272", "text": "function SelectRecordCount() {\n\t\t$sSql = $this->SelectSQL();\n\t\t$cnt = $this->TryGetRecordCount($sSql);\n\t\tif ($cnt == -1) {\n\t\t\t$conn = &$this->Connection();\n\t\t\tif ($rs = $conn->Execute($sSql)) {\n\t\t\t\t$cnt = $rs->RecordCount();\n\t\t\t\t$rs->Close();\n\t\t\t}\n\t\t}\n\t\treturn intval($cnt);\n\t}", "title": "" }, { "docid": "286f1b97afed67a1eabcab97ee6f3ab5", "score": "0.7841272", "text": "function SelectRecordCount() {\n\t\t$sSql = $this->SelectSQL();\n\t\t$cnt = $this->TryGetRecordCount($sSql);\n\t\tif ($cnt == -1) {\n\t\t\t$conn = &$this->Connection();\n\t\t\tif ($rs = $conn->Execute($sSql)) {\n\t\t\t\t$cnt = $rs->RecordCount();\n\t\t\t\t$rs->Close();\n\t\t\t}\n\t\t}\n\t\treturn intval($cnt);\n\t}", "title": "" }, { "docid": "286f1b97afed67a1eabcab97ee6f3ab5", "score": "0.7841272", "text": "function SelectRecordCount() {\n\t\t$sSql = $this->SelectSQL();\n\t\t$cnt = $this->TryGetRecordCount($sSql);\n\t\tif ($cnt == -1) {\n\t\t\t$conn = &$this->Connection();\n\t\t\tif ($rs = $conn->Execute($sSql)) {\n\t\t\t\t$cnt = $rs->RecordCount();\n\t\t\t\t$rs->Close();\n\t\t\t}\n\t\t}\n\t\treturn intval($cnt);\n\t}", "title": "" }, { "docid": "286f1b97afed67a1eabcab97ee6f3ab5", "score": "0.7841272", "text": "function SelectRecordCount() {\n\t\t$sSql = $this->SelectSQL();\n\t\t$cnt = $this->TryGetRecordCount($sSql);\n\t\tif ($cnt == -1) {\n\t\t\t$conn = &$this->Connection();\n\t\t\tif ($rs = $conn->Execute($sSql)) {\n\t\t\t\t$cnt = $rs->RecordCount();\n\t\t\t\t$rs->Close();\n\t\t\t}\n\t\t}\n\t\treturn intval($cnt);\n\t}", "title": "" }, { "docid": "af28bc446e36da3bfed730304d63f701", "score": "0.78145427", "text": "protected function _count()\n\t{\n\t\t$select = $this->_supportsAsAlias ?\n\t\t\t'SELECT COUNT(' . $this->_build_field() . ') as ' . $this->_protect_identifiers('cnt') :\n\t\t\t'SELECT COUNT(' . $this->_build_field() . ') ' . $this->_protect_identifiers('cnt');\n\n\t\t$this->_prepare(\n\t\t\t$select\n\t\t\t. ' FROM ' . $this->_build_table()\n\t\t\t. $this->_build_join()\n\t\t\t. $this->_build_where()\n\t\t\t. $this->_build_limit()\n\t\t);\n\n\t\treturn $this->_exec();\n\t}", "title": "" }, { "docid": "50ae6f1f0d85404c7b4a68a14f34ffe2", "score": "0.78059846", "text": "public function record_count() {\r\n return $this->db->count_all(\"filial\");\r\n }", "title": "" }, { "docid": "8ce318696889bdd12101016322343bae", "score": "0.7803394", "text": "public function record_count() {\n\t\tglobal $wpdb;\n\n\n\t\t$sql = \"SELECT COUNT(*) FROM {$wpdb->prefix}\" . MOF_TABLE_NAME;\n\t\t$sql = $this->date_filter($sql);\n\n\n\t\treturn $wpdb->get_var($sql);\n\t}", "title": "" }, { "docid": "aea189be8b12ca50be671f316f1b4581", "score": "0.77800304", "text": "public function recordsCount()\n {\n return $this->sendGetRequest($this->getRequestUrl('recordsCount'));\n }", "title": "" }, { "docid": "da3bf1bb59286cd5b611baea68383b94", "score": "0.77753717", "text": "public static function record_count() {\n\t\tglobal $wpdb;\n\n\t\t$sql = \"SELECT COUNT(*) as ticket_count FROM {$wpdb->prefix}calisia_ticket_system_ticket\";\n\t\t$where_clause = self::where_clause();\n\t\tif(empty($where_clause['params'])){\n\t\t\treturn $wpdb->get_var( $sql . $where_clause['sql'] );\n\t\t}else{\n\t\t\t$result = $wpdb->get_results( \n\t\t\t\t$wpdb->prepare(\n\t\t\t\t\t$sql . $where_clause['sql'],\n\t\t\t\t\t$where_clause['params']\n\t\t\t\t)\n\t\t\t);\n\t\t\treturn $result[0]->ticket_count;\n\t\t}\n\t}", "title": "" }, { "docid": "c0140bbf277095612649ef1eb902be80", "score": "0.7762934", "text": "public function countRecords() {\n $total = $this->find('count');\n\n return $total;\n }", "title": "" }, { "docid": "fc957a852a74b9f74903d2a90002b293", "score": "0.7737884", "text": "public function count(){\n\t\t$stmt = $this->getDbConnection()->query(\"SELECT count(*) AS count FROM `\".$this->tableName().\"`\");\n\t\t$record = $stmt->fetch();\n\t\treturn $record['count'];\n\t}", "title": "" }, { "docid": "58db8e33a57f3d79b3e2bf6d18a3e37d", "score": "0.7723542", "text": "function RecordCount(){\r\n\t\treturn $this->recordset->fetchColumn();\r\n\t}", "title": "" }, { "docid": "0291441afaff2f1636fb1d50a023b659", "score": "0.7722386", "text": "function SelectRecordCount() {\n\t\tglobal $conn;\n\t\t$origFilter = $this->CurrentFilter;\n\t\t$this->Recordset_Selecting($this->CurrentFilter);\n\t\t$sSql = $this->SelectSQL();\n\t\t$cnt = $this->TryGetRecordCount($sSql);\n\t\tif ($cnt == -1) {\n\t\t\tif ($rs = $conn->Execute($this->SelectSQL())) {\n\t\t\t\t$cnt = $rs->RecordCount();\n\t\t\t\t$rs->Close();\n\t\t\t}\n\t\t}\n\t\t$this->CurrentFilter = $origFilter;\n\t\treturn intval($cnt);\n\t}", "title": "" }, { "docid": "0291441afaff2f1636fb1d50a023b659", "score": "0.7722386", "text": "function SelectRecordCount() {\n\t\tglobal $conn;\n\t\t$origFilter = $this->CurrentFilter;\n\t\t$this->Recordset_Selecting($this->CurrentFilter);\n\t\t$sSql = $this->SelectSQL();\n\t\t$cnt = $this->TryGetRecordCount($sSql);\n\t\tif ($cnt == -1) {\n\t\t\tif ($rs = $conn->Execute($this->SelectSQL())) {\n\t\t\t\t$cnt = $rs->RecordCount();\n\t\t\t\t$rs->Close();\n\t\t\t}\n\t\t}\n\t\t$this->CurrentFilter = $origFilter;\n\t\treturn intval($cnt);\n\t}", "title": "" }, { "docid": "e28e6483985f7b9da2daef3f758d8b20", "score": "0.77043855", "text": "public function count()\r\n\t{\r\n\t\t//get the limit clause value\r\n\t\t$limit = $this->limits;\r\n\r\n\t\t//get the offset value\r\n\t\t$limitOffset = $this->offset;\r\n\r\n\t\t//get the fields clause\r\n\t\t$fields = $this->fields;\r\n\r\n\t\t//compose the fields array\r\n\t\t$this->fields = array($this->froms => array(\"COUNT(1)\" => \"rows\"));\r\n\r\n\t\t//set limit to 1\r\n\t\t$this->limit(1);\r\n\r\n\t\t//get the first row\r\n\t\t$row = $this->first();\r\n\r\n\t\t//set the value of the fields\r\n\t\t$this->fields = $fields;\r\n\r\n\t\t//check if fields is defined\r\n\t\tif ( $fields ) \r\n\t\t{\r\n\t\t\t//set the value o fields\r\n\t\t\t$this->fields = $fields;\r\n\r\n\t\t}\r\n\r\n\t\t//check if the limit value is set\r\n\t\tif ( $limit ) \r\n\t\t{\r\n\t\t\t//set the value of limit\r\n\t\t\t$this->limits = $limit;\r\n\r\n\t\t}\r\n\r\n\t\t//check if the limit offset value is defined\r\n\t\tif ( $limitOffset ) \r\n\t\t{\r\n\t\t\t//set the offset value\r\n\t\t\t$this->offset = $limitOffset;\r\n\r\n\t\t}\r\n\r\n\t\t//return the rows count\r\n\t\treturn $row[0]['rows'];\r\n\r\n\t}", "title": "" }, { "docid": "1c6d4088c70500467c08aee389d50ac7", "score": "0.7701958", "text": "function ListRecordCount() {\n\t\t$filter = $this->getSessionWhere();\n\t\tew_AddFilter($filter, $this->CurrentFilter);\n\t\t$filter = $this->ApplyUserIDFilters($filter);\n\t\t$this->Recordset_Selecting($filter);\n\t\t$select = $this->TableType == 'CUSTOMVIEW' ? $this->getSqlSelect() : \"SELECT * FROM \" . $this->getSqlFrom();\n\t\t$groupBy = $this->TableType == 'CUSTOMVIEW' ? $this->getSqlGroupBy() : \"\";\n\t\t$having = $this->TableType == 'CUSTOMVIEW' ? $this->getSqlHaving() : \"\";\n\t\t$sql = ew_BuildSelectSql($select, $this->getSqlWhere(), $groupBy, $having, \"\", $filter, \"\");\n\t\t$cnt = $this->TryGetRecordCount($sql);\n\t\tif ($cnt == -1) {\n\t\t\t$conn = &$this->Connection();\n\t\t\tif ($rs = $conn->Execute($sql)) {\n\t\t\t\t$cnt = $rs->RecordCount();\n\t\t\t\t$rs->Close();\n\t\t\t}\n\t\t}\n\t\treturn intval($cnt);\n\t}", "title": "" }, { "docid": "52a164d10648e952d063b68641b7cd5c", "score": "0.76936835", "text": "public function record_count() {\n\t\treturn $this->db->count_all(\"products\");\n\t}", "title": "" }, { "docid": "5b0b881421cffed1a9a197e6b03a36cf", "score": "0.76621497", "text": "function count(){\n\t\t$this->check_query();\n\t\treturn (int) $this->length;\n\t}", "title": "" }, { "docid": "1daecc79f3ea3afb61d8638d73439580", "score": "0.76462495", "text": "public function record_count()\r\r\n {\r\r\n\r\r\n global $wpdb;\r\r\n $sql = $this->filter_sql(\"SELECT COUNT(*) FROM {$wpdb->prefix}wpsearchconsole_todo\");\r\r\n return $wpdb->get_var($sql);\r\r\n }", "title": "" }, { "docid": "18f1356bb4d2ee7567384a96980699af", "score": "0.76395", "text": "public function record_count() {\n return $this->db->count_all(USERS_ICO);\n }", "title": "" }, { "docid": "311c051ef442c2034249a8e2531ec277", "score": "0.76303613", "text": "function getQueryCount() {\n\t\treturn $this->result_count;\n\t}", "title": "" }, { "docid": "4563dce156262ecac627e63acc539d8c", "score": "0.7586734", "text": "public function count()\n {\n return $this->result->count();\n }", "title": "" }, { "docid": "0bb82f54006b01211c36f4ee997a5693", "score": "0.7568723", "text": "public static function record_count() {\n\t\tglobal $wpdb;\n\t\t$sql = \"SELECT COUNT(*) FROM {$wpdb->prefix}leilabidad_crm\";\n\t\treturn $wpdb->get_var( $sql );\n\t}", "title": "" }, { "docid": "269398c9357797cefcf231e12f24fbf5", "score": "0.7568017", "text": "public function count ()\n {\n $limit = $this->_limit;\n $this->_limit = NULL;\n $sql=$this->_generateSql();\n if($sql&&stripos($sql, '*')>0){\n $sql=str_ireplace('*', 'COUNT(*)', $sql);\n }\n $this->_limit = $limit;\n if (is_array($this->_result_array)) {\n// Afx_Debug_Helper::print_r(($this->_result_array));\n return count($this->_result_array);\n }\n if(!$sql)\n $sql = sprintf('SELECT COUNT(*) FROM `%s`', $this->_tablename);\n $ret = $this->getAdapter()->execute($sql, $this->_tablename);\n\n return isset($ret['0']['COUNT(*)']) ? $ret['0']['COUNT(*)'] : 0;\n }", "title": "" }, { "docid": "714b99d0ffa67871c62bf94f3cabecc5", "score": "0.7557687", "text": "public function Count( )\n {\n return $this->_db->Count( );\n }", "title": "" }, { "docid": "31a4cda24eb9de46cd57fcacb05dde55", "score": "0.75531", "text": "public function count() {\n return $this->db->count_all_results($this->table);\n }", "title": "" }, { "docid": "ad1917c5cc691160c892c541bf1c4fe1", "score": "0.75332797", "text": "public function count()\n {\n return $this->db->count_all_results($this->table);\n }", "title": "" }, { "docid": "c0d3ecc89f32d7b51438c1de17a24e70", "score": "0.75281733", "text": "public static function count() {\n return (new static())->query()->count();\n }", "title": "" }, { "docid": "3c8c9792ba562f7c26f72eb3fa808eb9", "score": "0.7526549", "text": "public function count()\n {\n return $this->totalRecords;\n }", "title": "" }, { "docid": "2d0750df06365f7ba6fc7793beb5445c", "score": "0.75173074", "text": "public function getNumRecords();", "title": "" }, { "docid": "35dd3998e94b41567d4ad4a7cc46f45b", "score": "0.75028056", "text": "public function count(){\n $query = \"SELECT COUNT(*) as total_rows FROM \" . $this->table_name . \"\";\n \n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n \n return $row['total_rows'];\n }", "title": "" }, { "docid": "302ec67dfdce0b41e830939e6ef0633f", "score": "0.7501446", "text": "public function getQuerycount() : int;", "title": "" }, { "docid": "582773ed2b964cb3313599e3402c80f4", "score": "0.7500669", "text": "public function count()\n {\n $results = $this->execute();\n return $results ? count($results) : 0;\n }", "title": "" }, { "docid": "5632ddb926983677b815ce7603992f3f", "score": "0.7499422", "text": "public function get_found_records_count() {\n\t\treturn $this->found_records_count;\n\t}", "title": "" }, { "docid": "3b5c800f580a2a12405e3e4a79d58d14", "score": "0.7496759", "text": "public function getRecordsTotalCount(): int;", "title": "" }, { "docid": "87540e32664c9582578c38be6240c519", "score": "0.7490561", "text": "public static function record_count() {\r\n global $wpdb;\r\n\r\n $query = \"SELECT COUNT(*) FROM {$wpdb->prefix}wbls_lineup\";\r\n\r\n return $wpdb->get_var($query);\r\n }", "title": "" }, { "docid": "86daedd9cef86c00f30b9cb83f3f1ca6", "score": "0.74836504", "text": "public function getCount()\n {\n// $query = clone $this->query;\n// $result = $query\n// ->select(array('COUNT(tbl.id)'))\n// ->setFirstResult(null)\n// ->setMaxResults(null)\n// ->getQuery()\n// ->getOneOrNullResult();\n//\n// return $result?current($result):0;\n }", "title": "" }, { "docid": "0e9da7abd02010be1f4b3a9044e19928", "score": "0.74818784", "text": "public function count(){\n $query = \"SELECT COUNT(*) as total_rows FROM \" . $this->table_name . \"\";\n \n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n \n return $row['total_rows'];\n }", "title": "" }, { "docid": "5720bad75a48dd5fa4505ac86a3aefec", "score": "0.74757534", "text": "public function count(): int\n {\n if (!in_array($this->method, [self::SEARCH, self::SEARCH_READ])) {\n throw new QueryException(sprintf('You can count results with method \"%s\" and \"%s\" only.', self::SEARCH, self::SEARCH_READ));\n }\n\n $query = new self($this->recordManager, $this->name, self::SEARCH_COUNT);\n $query->setParameters($this->parameters);\n\n return (int) $query->execute();\n }", "title": "" }, { "docid": "06655233191d5eade73701241fb56bb6", "score": "0.7464357", "text": "public function record_count() \n {\n return $this->db->count_all(\"halqa_type\");\n }", "title": "" }, { "docid": "52502c006030ddea8f4f2082b61ea225", "score": "0.7458672", "text": "public function count($query);", "title": "" }, { "docid": "e95ededabd76971489f5ae0e5a81198b", "score": "0.7435656", "text": "public function count(){\n $query = \"SELECT COUNT(*) as total_rows FROM \" . $this->table_name;\n\n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n return $row['total_rows'];\n }", "title": "" }, { "docid": "579cbe2ae898e57a8aa3d84472f0db4b", "score": "0.742591", "text": "public function count()\n\t{\n\t\treturn $this->db->get($this->_table)->num_rows();\n\t}", "title": "" }, { "docid": "cfc1dc15d72acb2458c62c44fe17abed", "score": "0.741687", "text": "protected function getNumRows()\n {\n $result = Database::getDbResult( $this->countSql );\n return $result->rowCount();\n }", "title": "" }, { "docid": "ce10511d544435e71526d08574cb3be6", "score": "0.7415454", "text": "public function count()\n {\n return (int)$this->db->fetchColumn($this->getSqlForCount(), $this->params);\n }", "title": "" }, { "docid": "df2753e01b05878a7439876aeb78fb95", "score": "0.7413365", "text": "function m_GetRecordCount($table, $where='')\n\t{\t\t\t\t\t\t\n\t\t$stQuery = \"SELECT COUNT(iId) as cnt FROM $table $where\";\n\t\t$rsResult = $this->obDbase->Execute($stQuery);\n\t\tif (!$rsResult)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $rsResult->fields['cnt'];\n\t\t}\t\t\t\t\n\t}", "title": "" }, { "docid": "aefb512598f16a262af58160d8686430", "score": "0.74133366", "text": "function queryRecordCount($sql) {\n if ($countSql = $this->getCountQuerySql($sql)) {\n if ($res = $this->executeQuery($countSql)) {\n if ($row = pg_fetch_row($res)) {\n $result = $row[0];\n } else {\n $result = 0;\n }\n pg_free_result($res);\n return $result;\n }\n }\n return FALSE;\n }", "title": "" }, { "docid": "5bd99dd5c57a7f5fb3b15b5742bb56ed", "score": "0.7410285", "text": "public function getRowsCount()\n {\n $query = $this->db->select('COUNT(*) as Num')->from('T_PHONE_RECORDS')->get();\n \n $count = $query->row()->Num;\n \n return $count;\n }", "title": "" }, { "docid": "688fa342265f73ba54eeb8f57faead15", "score": "0.74079645", "text": "public function count() {\n $query = \"SELECT COUNT(*) as total_rows FROM \" . $this->table . \"\";\n \n // prepare query statement\n $stmt = $this->conn->prepare($query);\n // execute query\n $stmt->execute();\n // retrieve our table contents\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n \n return $row['total_rows'];\n }", "title": "" }, { "docid": "3323e05e2b84f7047e197bc737bd1980", "score": "0.7406328", "text": "public function count(): int\n {\n return $this\n ->select\n ->getCountQuery()\n ->execute()\n ->fetchField()\n ;\n }", "title": "" }, { "docid": "bbb2fd2e83328c46f151f5fc98375fcd", "score": "0.73980737", "text": "public function count()\n {\n $query = \"SELECT COUNT(*) as total_rows FROM \" . $this->table_name . \"\";\n\n $stmt = $this->conn->prepare($query);\n $stmt->execute();\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n return $row['total_rows'];\n }", "title": "" }, { "docid": "1bc5eecb3809be1d7c1dd25ca91db858", "score": "0.7397704", "text": "public function countAction()\n {\n $query = $this->params('query');\n $query = $this->canonizeQuery($query);\n $where = $this->canonizeCondition($query);\n $count = $this->model($this->modelName)->count($where);\n $response = [\n 'status' => 1,\n 'data' => $count,\n ];\n\n return $response;\n }", "title": "" }, { "docid": "8af98f1d8a24f135ec0af5db585f72dc", "score": "0.73940986", "text": "public function count()\n {\n $query = clone $this;\n $query->select = 'count(*)';\n return (int)$query->execute()->fetch(PDO::FETCH_NUM)[0];\n }", "title": "" }, { "docid": "6c5bbe9aa9fbeac2bb30bf88aaad232c", "score": "0.7390487", "text": "public function getRecordCount()\n {\n $objResult = $this->objDatabase->Execute('SELECT count(`id`) as `count` FROM `'.DBPREFIX.'module_checkout_transactions`');\n\n if ($objResult) {\n return intval($objResult->fields['count']);\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "861ed0cc76e98857eb5ad29dd81e26f4", "score": "0.737969", "text": "function getLiveRecordCount() {\n $query = 'SELECT COUNT(1) AS count FROM ' . $this->bean->table_name;\n if( !empty( $this->bean->field_defs['deleted'] ) ) {\n $query .= ' WHERE deleted = 0';\n }\n $result = $GLOBALS['db']->query( $query );\n $row = $GLOBALS['db']->fetchByAssoc( $result );\n return isset( $row['count'] ) ? $row['count'] : 0;\n\n }", "title": "" }, { "docid": "ca10bb820343bb605dfb62d523645f8c", "score": "0.73772967", "text": "public function listRecordCount()\n\t{\n\t\t$filter = $this->getSessionWhere();\n\t\tAddFilter($filter, $this->CurrentFilter);\n\t\t$filter = $this->applyUserIDFilters($filter);\n\t\t$this->Recordset_Selecting($filter);\n\t\t$select = $this->TableType == 'CUSTOMVIEW' ? $this->getSqlSelect() : \"SELECT * FROM \" . $this->getSqlFrom();\n\t\t$groupBy = $this->TableType == 'CUSTOMVIEW' ? $this->getSqlGroupBy() : \"\";\n\t\t$having = $this->TableType == 'CUSTOMVIEW' ? $this->getSqlHaving() : \"\";\n\t\t$sql = BuildSelectSql($select, $this->getSqlWhere(), $groupBy, $having, \"\", $filter, \"\");\n\t\t$cnt = $this->getRecordCount($sql);\n\t\treturn $cnt;\n\t}", "title": "" }, { "docid": "ca10bb820343bb605dfb62d523645f8c", "score": "0.73772967", "text": "public function listRecordCount()\n\t{\n\t\t$filter = $this->getSessionWhere();\n\t\tAddFilter($filter, $this->CurrentFilter);\n\t\t$filter = $this->applyUserIDFilters($filter);\n\t\t$this->Recordset_Selecting($filter);\n\t\t$select = $this->TableType == 'CUSTOMVIEW' ? $this->getSqlSelect() : \"SELECT * FROM \" . $this->getSqlFrom();\n\t\t$groupBy = $this->TableType == 'CUSTOMVIEW' ? $this->getSqlGroupBy() : \"\";\n\t\t$having = $this->TableType == 'CUSTOMVIEW' ? $this->getSqlHaving() : \"\";\n\t\t$sql = BuildSelectSql($select, $this->getSqlWhere(), $groupBy, $having, \"\", $filter, \"\");\n\t\t$cnt = $this->getRecordCount($sql);\n\t\treturn $cnt;\n\t}", "title": "" }, { "docid": "e7659e8f1529ca06a10f5a68ac36a8f4", "score": "0.7367777", "text": "public static function count()\n {\n $count = self::select(['COUNT(*) as nbrec'])->first();\n return $count->nbrec;\n }", "title": "" }, { "docid": "c80a2e89e7f21072fe23785959627474", "score": "0.73628837", "text": "public function getCount() {\n $this->_prepare();\n return $this->count;\n }", "title": "" }, { "docid": "fb68afdfc2dde31728ca8e76a7740f3d", "score": "0.7362283", "text": "public function countResults(): int\n {\n return $this->sendQuery()->countRows();\n }", "title": "" }, { "docid": "cbec7a4f7b03b9a780b8ce9d0cbf2c30", "score": "0.73553", "text": "public function count() : int {\n $query = $this->buildQuery('count');\n return intval($this->db->run($query[0], $query[1])->first->count);\n }", "title": "" }, { "docid": "757459c12518895675546476e03579da", "score": "0.73451436", "text": "function getRecordCount($where = '') {\n\n if ($this->db_table == '') {\n return '0';\n }\n\n if ($where != '') {\n $where = \"AND \" . $where;\n }\n\n $filter = '';\n if ($this->db_filter != '') {\n $filter = $this->db_filter;\n }\n\n $sSQL = sprintf(\"SELECT count(*) as totalCount FROM %s WHERE 1 = 1 %s %s\",$this->db_table,$where,$filter);\n $getCount = $this->getDBResults($sSQL);\n\n return $getCount[0]['totalCount'];\n\n }", "title": "" }, { "docid": "bb570ca98c3ea6ff4505928c33e9a2ba", "score": "0.7339478", "text": "public function getNbResults()\n {\n return $this->query->count();\n }", "title": "" }, { "docid": "f0362c0470c58338dbf67d54c0b23628", "score": "0.7336761", "text": "public function count()\n\t{\n\t\treturn $this->_results->count();\n\t}", "title": "" }, { "docid": "6b84e96c594e22d87006e177d2bd043d", "score": "0.7334678", "text": "function getRecordCount() {\n\t\treturn ( int ) $this->recordCount;\n\t}", "title": "" }, { "docid": "7313f808f834d781624af9c9ca5909c8", "score": "0.73303026", "text": "public static function count()\n {\n $obj = isset($this) ? $this : new static();\n return (int) $obj->new_query(['where' => func_get_args()])->count();\n }", "title": "" }, { "docid": "d56ceb45ca5be0a0e22d0047f41fb63e", "score": "0.73224634", "text": "public function count()\n {\n $databaseManager = Rbac::getInstance()->getDatabaseManager();\n \n $Res = $databaseManager->request(\n \"SELECT COUNT(*) FROM {$databaseManager->getTablePrefix()}{$this->type}\"\n );\n return (int)$Res[0]['COUNT(*)'];\n }", "title": "" }, { "docid": "801a1243e7b1047a9bf0b1b59e35c309", "score": "0.73143435", "text": "public function getCount()\n {\n return count($this->queries);\n }", "title": "" }, { "docid": "dbfadaafa439294ca20661593cf997ee", "score": "0.7306171", "text": "function count_records()\r\n {\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->from('participants');\r\n\t\t$query = $this->db->get();\r\n\t\treturn $query->num_rows(); \r\n }", "title": "" }, { "docid": "4b18e577d402d130ddae298066dd474a", "score": "0.72947586", "text": "public function get_record_count() {\n $this->db->select('COUNT(id) AS cnt');\n $query = $this->db->get('coupons_used')->row_array();\n return $query['cnt'];\n }", "title": "" }, { "docid": "5bed662e88e54d0399e5113f58945b0d", "score": "0.7291961", "text": "public function count() {\n global $wpdb;\n\n return $wpdb->get_var( \"SELECT COUNT({$this->primary_key}) FROM {$this->table_name};\" );\n }", "title": "" }, { "docid": "563641999db9dcc5166a41ad2a52a92d", "score": "0.728883", "text": "public function getcount()\n {\n return $this->db->count_all($this->table);\n }", "title": "" }, { "docid": "58dd615f781c63491c49aa0bddc28b35", "score": "0.7277885", "text": "public final function getCount() {\n return $this->db->query('select count(id) from '.static::TABLE_NAME)->fetch()['count'];\n }", "title": "" }, { "docid": "192e0bca9e36c49ea65af31078a85fcd", "score": "0.7261009", "text": "protected function _count()\n {\n $sql = <<<SQL\nSELECT COUNT(*) AS cnt\nFROM\n %PREFIX%cards_properties AS p_email\n JOIN %PREFIX%cards_properties AS p_name\n ON p_name.cardid = p_email.cardid\n AND p_name.name = \"FN\"\nWHERE\n p_email.addressbookid = ?\n AND p_email.name = \"EMAIL\"\n %FILTER%\nSQL;\n \n $sql = str_replace(\n '%FILTER%',\n $this->filter ? ' AND ' . $this->filter : '',\n $this->replaceTablePrefix($sql)\n );\n\n $stmt = $this->db->query($sql, $this->abId);\n $row = $this->db->fetch_assoc($stmt);\n\n $this->cache['count'] = (int) $row['cnt'];\n return $this->cache['count'];\n }", "title": "" }, { "docid": "f824f0e14cb84834e339de8573a89d68", "score": "0.7260233", "text": "public function count()\n {\n return $this->db->count_all($this->table);\n }", "title": "" }, { "docid": "184d7c817e33629d59ba56ad7cfa07f9", "score": "0.725783", "text": "function CountResult () {\n\n // Pull the results from the database.\n $rows = mysql_num_rows($this->Result);\n\n return ($rows);\n\n }", "title": "" }, { "docid": "90ff875c1e023f5a75faf892a24a1366", "score": "0.72500277", "text": "public function count()\n {\n return $this->num_rows;\n }", "title": "" }, { "docid": "c49ba27d0fbcaffa96a8008d4a3d9ba5", "score": "0.7247262", "text": "public function count()\n {\n\n switch ($this->mode) {\n\n case \"mysql\":\n $rows = $this->result->num_rows;\n break;\n\n case \"postgres\":\n case \"redshift\":\n $rows = pg_num_rows($this->result);\n break;\n\n case \"odbc\":\n $rows = odbc_num_rows($this->result);\n\n # The above function is unreliable, so if we got a zero count then double check it\n if ($rows < 1) {\n $rows = 0;\n\n /**\n * If it is an update/delete then we just have to trust the odbc_num_rows() result,\n * however it is some kind of select, then we can manually count the rows returned.\n */\n if (odbc_num_fields($this->result) > 0) {\n $position = $this->position;\n $this->seek(0);\n while ($this->getNextRow()) {\n ++$rows;\n }\n $this->seek($position);\n }\n }\n break;\n\n case \"sqlite\":\n $rows = 0;\n while ($this->result->fetchArray()) {\n $rows++;\n }\n $this->seek($this->position);\n break;\n\n case \"mssql\":\n $rows = mssql_num_rows($this->result);\n break;\n\n case \"mssqlsrv\":\n $rows = sqlsrv_num_rows($this->result);\n break;\n }\n\n if ($rows === false || $rows < 0) {\n throw new \\Exception(\"Failed to get the row count from the result set\");\n }\n\n return $rows;\n }", "title": "" }, { "docid": "0a1ff0de8d49ef1ba11847acbeb201aa", "score": "0.7245751", "text": "public function getCount() {\n $table_name = $this->getTableName();\n $count = $this->connection->query(\"SELECT COUNT(*) FROM $table_name\");\n\n return $count;\n }", "title": "" }, { "docid": "9aa5064b5bd00b379d84f8f1646af121", "score": "0.7242695", "text": "public function count() {\n\t\treturn mysqli_num_rows($this->result_handle);\n\t}", "title": "" }, { "docid": "acfd189348eb86cdfe05fb6fb19698e8", "score": "0.72418916", "text": "public static function record_count() {\n\t\treturn \\WP_Rest_Cache_Plugin\\Includes\\Caching\\Caching::get_instance()->get_record_count( self::$api_type );\n\t}", "title": "" }, { "docid": "38107918e69f7433a650252c6c57856e", "score": "0.72418517", "text": "public function count() {\n\t\tlist($result, $statement) = $this->connection->ask($this->build_select_count(), $this->bind);\n\n\t\treturn $statement->fetchColumn();\n\t}", "title": "" }, { "docid": "278f5f0ec5dd16ce75f41bbcbfdbc5a8", "score": "0.72317594", "text": "public function totalRecords(Query $query);", "title": "" }, { "docid": "9119c4c32d5dad0031956da49c7dd2e4", "score": "0.72302383", "text": "public function count()\n {\n $mapper = $this->getQuery()->getMapper();\n\n return $mapper->count($this->getQuery()->getWhere());\n }", "title": "" }, { "docid": "961976fe5159dd538969a7f21efbd351", "score": "0.7225784", "text": "abstract function numRecords();", "title": "" }, { "docid": "3374cadc3927cb9cd56425ba38ad41f2", "score": "0.7224418", "text": "public function count()\n {\n $this->fetchArray();\n $num = $this->_results['response']['numFound'];\n \n return $num;\n }", "title": "" }, { "docid": "2a3b5e060e4c82a56855d245c169f817", "score": "0.7219902", "text": "public function recordCount() \n {\n return $this->db->count_all('userprofile');\n }", "title": "" }, { "docid": "b7ecba19e6485f3b6de3011593672cbb", "score": "0.71985406", "text": "public function count() {\n\t\treturn @ldap_count_entries($this->conn, $this->result);\n\t}", "title": "" }, { "docid": "70cca838ac8d811421b33834d516f2a7", "score": "0.7190559", "text": "public function count() {\n\n $col = $this->getPrimaryName();\n $class = get_class($this);\n $item = new $class;\n $item->columns('count(' . $col . ') as count');\n// $item->_joins = array();\n $item->_whereSelect = $this->_whereSelect;\n $count = $item->fetchAll($item->getSelect())->toArray();\n\n return $count[0]['count'];\n }", "title": "" }, { "docid": "42be5a4fd5779ba57bc36b59514ff3de", "score": "0.71905535", "text": "public function count() {\n\t\t$where = $this->model->get_where()?' WHERE '.$this->model->get_where():'';\n\t\t$sql = $this->query;\n\t\tif (stripos($sql, 'GROUP BY')) {\n\t\t\t$sql = str_ireplace('GROUP BY', ' GROUP BY id, ', $sql);\n\t\t} else {\n\t\t\tif (stripos($sql, 'ORDER BY')) {\n\t\t\t\t$sql = str_ireplace('ORDER BY', ' GROUP BY id ORDER BY', $sql);\n\t\t\t} else {\n\t\t\t\t$sql .= ' GROUP BY id';\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\t$unique_result = $this->db->query($sql);\n\t\treturn count($unique_result);\n\t}", "title": "" }, { "docid": "1555e451b5cd692c9c3761197a1af8cc", "score": "0.7180228", "text": "function count_record($condition, $table = '') {\n if ($table == '')\n $table = $this->_table;\n\n $query = $this->db->get_where($table, $condition);\n return $query->num_rows();\n }", "title": "" }, { "docid": "1fff7173d2b3540e52489aebdde869c0", "score": "0.717226", "text": "public function num_rows($query_id = -1);", "title": "" } ]
a6a3e57b82cc5990af3755b88aa62b51
Gets the environment's HOME directory if available.
[ { "docid": "48ffaca1ba6e668ed7e3c56d79fe1640", "score": "0.8108655", "text": "private static function getHomeDir()\n {\n // On Linux/Unix-like systems, use the HOME environment variable\n if (getenv('HOME')) {\n return getenv('HOME');\n }\n\n // Get the HOMEDRIVE and HOMEPATH values for Windows hosts\n $homeDrive = getenv('HOMEDRIVE');\n $homePath = getenv('HOMEPATH');\n\n return ($homeDrive && $homePath) ? sprintf('%s%s', $homeDrive, $homePath) : null;\n }", "title": "" } ]
[ { "docid": "cf81a455b32a5e9dd3994a5ed3fbedaa", "score": "0.8503641", "text": "private static function getHomeDirectory()\n {\n if (getenv('HOME')) {\n return getenv('HOME');\n }\n\n return (getenv('HOMEDRIVE') && getenv('HOMEPATH'))\n ? getenv('HOMEDRIVE') . getenv('HOMEPATH')\n : null;\n }", "title": "" }, { "docid": "3660782e39ad0323cfbfec5f08a192b4", "score": "0.8364557", "text": "public function getUserHomeDir()\n {\n return rtrim(getenv('HOME') ?: getenv('USERPROFILE'), '/\\\\');\n }", "title": "" }, { "docid": "93cf6e109e496b700c935a47a9935e84", "score": "0.7958923", "text": "private function getHomeDir()\n {\n // Cannot use $_SERVER superglobal since that's empty during UnitUnishTestCase\n // getenv('HOME') isn't set on Windows and generates a Notice.\n $home = getenv('HOME');\n if (!empty($home)) {\n // home should never end with a trailing slash.\n $home = rtrim($home, '/');\n }\n elseif (!empty($_SERVER['HOMEDRIVE']) && !empty($_SERVER['HOMEPATH'])) {\n // home on windows\n $home = $_SERVER['HOMEDRIVE'] . $_SERVER['HOMEPATH'];\n // If HOMEPATH is a root directory the path can end with a slash. Make sure\n // that doesn't happen.\n $home = rtrim($home, '\\\\/');\n }\n return empty($home) ? NULL : $home;\n }", "title": "" }, { "docid": "a6959792e1ac28eb15311a69e822f52b", "score": "0.791444", "text": "private static function home_dir()\n\t{\n\t\tif(function_exists(\"posix_getpwnam\"))\n\t\t{\n\t\t\t// using posix\n\t\t\t$user_info = posix_getpwnam(self::whoami());\n\t\t\t$home_dir = $user_info['dir'].\"/\";\n\t\t\t//print_r($user_info);\n\t\t} else\n\t\t{\n\t\t\t// Looking for Windows environment variables\n\t\t\t$home_dir = getenv('HOMEDRIVE').getenv('HOMEPATH').'\\\\';\n\t\t\tif($home_dir == \"\\\\\")\n\t\t\t{\n\t\t\t\t// Looking for *nix environment variables\n\t\t\t\t$home_dir = getenv('HOME').\"/\";\n\t\t\t}\n\t\t}\n\n\treturn $home_dir;\n\n\t}", "title": "" }, { "docid": "5067c04fc14b76d17791bb11b8c12572", "score": "0.7905884", "text": "public function getUserHomePath()\n {\n return $this->serverBag->get('HOME') ?? $this->serverBag->get('HOMEDRIVE').$this->serverBag->get('HOMEPATH');\n }", "title": "" }, { "docid": "f51240e8d47b30151e2bd54c2f4e5bc2", "score": "0.7876746", "text": "public static function homeDir()\n {\n // getenv('HOME') isn't set on Windows and generates a Notice.\n $home = getenv('HOME');\n if (!empty($home)) {\n // home should never end with a trailing slash.\n $home = rtrim($home, '/');\n } elseif (!empty($_SERVER['HOMEDRIVE']) && !empty($_SERVER['HOMEPATH'])) {\n // home on windows\n $home = $_SERVER['HOMEDRIVE'].$_SERVER['HOMEPATH'];\n // If HOMEPATH is a root directory the path can end with a slash. Make sure\n // that doesn't happen.\n $home = rtrim($home, '\\\\/');\n }\n\n if (empty($home) && function_exists('posix_getpwuid')) {\n $data = posix_getpwuid(posix_getuid());\n $home = $data['dir'];\n }\n\n return empty($home) ? null : $home;\n }", "title": "" }, { "docid": "29572508a1b5ecdd5a4eae15094c0fd9", "score": "0.78289086", "text": "function home_dir()\n {\n // We are in testing environment.\n if (getenv('APP_ENV') === 'testing') {\n return realpath(__DIR__ . '/../../tests/fixtures/home_dir');\n }\n\n // Cannot use $_SERVER superglobal since that's empty during UnitUnishTestCase\n // getenv('HOME') isn't set on Windows and generates a Notice.\n $home = getenv('HOME');\n\n if (!empty($home)) {\n // home should never end with a trailing slash.\n $home = rtrim($home, '/');\n } elseif (!empty($_SERVER['HOMEDRIVE']) && !empty($_SERVER['HOMEPATH'])) {\n // home on windows\n $home = $_SERVER['HOMEDRIVE'] . $_SERVER['HOMEPATH'];\n // If HOMEPATH is a root directory the path can end with a slash. Make sure\n // that doesn't happen.\n $home = rtrim($home, '\\\\/');\n }\n\n return empty($home) ? null : $home . DIRECTORY_SEPARATOR . '.dcompose';\n }", "title": "" }, { "docid": "6b5b10d7a7cba54ca70e8033fa8aaa0d", "score": "0.7728846", "text": "public static function getHomeDir() :?string\n {\n $home = getenv('HOME');\n\n if (!empty($home))\n {\n // home should never end with a trailing slash.\n return rtrim($home, '/');\n }\n\n if (!empty($_SERVER['HOMEDRIVE']) && !empty($_SERVER['HOMEPATH']))\n {\n // home on windows\n $home = $_SERVER['HOMEDRIVE'] . $_SERVER['HOMEPATH'];\n // If HOMEPATH is a root directory the path can end with a slash. Make sure\n // that doesn't happen.\n $home = rtrim($home, '\\\\/');\n }\n\n return empty($home) ? null : $home;\n }", "title": "" }, { "docid": "9cf42b6a44b63c80a8a4d5a33b08b47f", "score": "0.7659615", "text": "public function getUserHomePath()\n {\n return $this->serverBag->get('HOME');\n }", "title": "" }, { "docid": "396995f00d45f45d2ed448e07c38c242", "score": "0.7642667", "text": "public static function home(): string\n {\n return $_SERVER['HOME'] ?? $_SERVER['USERPROFILE'];\n }", "title": "" }, { "docid": "c2a8b52dc26dbf0c47a5cea3fa772a9c", "score": "0.76098347", "text": "function drush_server_home() {\n // Cannot use $_SERVER superglobal since that's empty during UnitUnishTestCase\n // getenv('HOME') isn't set on Windows and generates a Notice.\n $home = getenv('HOME');\n if (!empty($home)) {\n // home should never end with a trailing slash.\n $home = rtrim($home, '/');\n }\n elseif (!empty($_SERVER['HOMEDRIVE']) && !empty($_SERVER['HOMEPATH'])) {\n // home on windows\n $home = $_SERVER['HOMEDRIVE'] . $_SERVER['HOMEPATH'];\n // If HOMEPATH is a root directory the path can end with a slash. Make sure\n // that doesn't happen.\n $home = rtrim($home, '\\\\/');\n }\n return empty($home) ? NULL : $home;\n}", "title": "" }, { "docid": "2b4e4a4d6bd7c25f804b51405dd8b758", "score": "0.755514", "text": "private static function getHomeDir(): string\n {\n $home = getenv('HOME');\n if (!$home) {\n throw new \\RuntimeException('The HOME environment variable must be set for releaser to run correctly');\n }\n\n return rtrim(strtr($home, '\\\\', '/'), '/');\n }", "title": "" }, { "docid": "d8485d72ba6adee7a784fe70dfd7ebe3", "score": "0.74074215", "text": "function mash_server_home() {\n // Cannot use $_SERVER superglobal since that's empty during Mash_UnitTestCase\n // getenv('HOME') isn't set on windows and generates a Notice.\n $home = getenv('HOME');\n if (empty($home)) {\n if (!empty($_SERVER['HOMEDRIVE']) && !empty($_SERVER['HOMEPATH'])) {\n // home on windows\n $home = $_SERVER['HOMEDRIVE'] . $_SERVER['HOMEPATH'];\n }\n }\n return empty($home) ? NULL : $home;\n}", "title": "" }, { "docid": "07e927383ac4027e426344811f0e96d1", "score": "0.72726285", "text": "protected function homePath() : string\n {\n if (!empty($_SERVER['HOME'])) {\n return $_SERVER['HOME'];\n }\n\n return $_SERVER['HOMEDRIVE'] . $_SERVER['HOMEPATH'];\n }", "title": "" }, { "docid": "0cea7db16209f26d655d4c8b888e30fc", "score": "0.6985931", "text": "private function identifyRootDirectoryFromEnvironmentHome()\n {\n if ( ! $homePath = getenv('HOME') )\n {\n if ( ! $homePath = getenv('HOMEPATH') )\n {\n return false;\n }\n }\n\n try{\n Dotenv::load( $homePath, '.svnIdentifyCommand' );\n\n $this->writeDebug('Using environment file in <comment>['. $homePath . DIRECTORY_SEPARATOR .'.svnIdentifyCommand]</comment>');\n return getenv('SVN_PATH');\n }\n catch( \\InvalidArgumentException $err )\n {\n\n return false;\n }\n }", "title": "" }, { "docid": "4747918d35b06a0139cd2a995a6bfcb1", "score": "0.6923451", "text": "public function homeDirectory(): string;", "title": "" }, { "docid": "fe45a8699a6b1db78604a2b4d92a7aeb", "score": "0.65727884", "text": "public function getHomePath() {\n\t\tif (!isset($this->homePath)) {\n\t\t\t$this->fetchDetails();\n\t\t}\n\t\treturn $this->homePath;\n\t}", "title": "" }, { "docid": "e5e1e3a998ed98affaeec9153c975f66", "score": "0.65211207", "text": "function expandHomeDirectory(string $path): string {\n $homeDirectory = getenv('HOME');\n if (empty($homeDirectory)) {\n $homeDirectory = getenv('HOMEDRIVE') . getenv('HOMEPATH');\n }\n return str_replace('~', realpath($homeDirectory), $path);\n}", "title": "" }, { "docid": "c03a7c1601e00974b5ef6536c1cfd02b", "score": "0.6417169", "text": "protected function ensureDirectory() {\n $dir_parts = static::PLATFORM_LOCATION;\n array_unshift($dir_parts, getenv('HOME'));\n $directory = implode(DIRECTORY_SEPARATOR, $dir_parts);\n if (!$this->filesystem->exists($directory)) {\n $this->filesystem->mkdir($directory);\n }\n return $directory;\n }", "title": "" }, { "docid": "b38c398c55b91888c519be3afde302e4", "score": "0.64105976", "text": "function expandHomeDirectory($path)\n{\n $homeDirectory = getenv('HOME');\n if (empty($homeDirectory)) {\n $homeDirectory = getenv('HOMEDRIVE') . getenv('HOMEPATH');\n }\n return str_replace('~', realpath($homeDirectory), $path);\n}", "title": "" }, { "docid": "b38c398c55b91888c519be3afde302e4", "score": "0.64105976", "text": "function expandHomeDirectory($path)\n{\n $homeDirectory = getenv('HOME');\n if (empty($homeDirectory)) {\n $homeDirectory = getenv('HOMEDRIVE') . getenv('HOMEPATH');\n }\n return str_replace('~', realpath($homeDirectory), $path);\n}", "title": "" }, { "docid": "196ffa1c477dd2de6641752b1feaee41", "score": "0.63957095", "text": "function expandHomeDirectory($path) {\n $homeDirectory = getenv('HOME');\n if (empty($homeDirectory)) {\n $homeDirectory = getenv('HOMEDRIVE') . getenv('HOMEPATH');\n }\n return str_replace('~', realpath($homeDirectory), $path);\n}", "title": "" }, { "docid": "ebb93f2f694ce53179674eb02b309bd4", "score": "0.63928425", "text": "function expandHomeDirectory($path) {\n $homeDirectory = getenv('HOME');\n if (empty($homeDirectory)) {\n $homeDirectory = getenv(\"HOMEDRIVE\") . getenv(\"HOMEPATH\");\n }\n return str_replace('~', realpath($homeDirectory), $path);\n}", "title": "" }, { "docid": "c412dca7ea3cfe4ca27317e2967717d3", "score": "0.6330212", "text": "function expandHomeDirectory($path) \n\t{\n\t $homeDirectory = getenv('HOME');\n\t if (empty($homeDirectory)) {\n\t\t$homeDirectory = getenv('HOMEDRIVE') . getenv('HOMEPATH');\n\t }\n\t return str_replace('~', realpath($homeDirectory), $path);\n\t}", "title": "" }, { "docid": "c51b598110f1998fdd85d18ab0773d64", "score": "0.6302921", "text": "function expandHomeDirectory($path) {\n $homeDirectory = getenv('HOME');\n if (empty($homeDirectory)) {\n $homeDirectory = getenv(\"HOMEDRIVE\") . getenv(\"HOMEPATH\");\n }\n return str_replace('~', realpath($homeDirectory), $path);\n }", "title": "" }, { "docid": "70df635f29320b6716f1f553e1fbeb28", "score": "0.625872", "text": "function expandHomeDirectory($path) {\n\t\t$homeDirectory = getenv('HOME');\n\t\tif (empty($homeDirectory)) {\n\t\t\t$homeDirectory = getenv(\"HOMEDRIVE\") . getenv(\"HOMEPATH\");\n\t\t}\n\t\treturn str_replace('~', realpath($homeDirectory), $path);\n\t}", "title": "" }, { "docid": "ebae518d66ac50d7eae24d74c8d3c6d0", "score": "0.60785985", "text": "function expand_home($filename) {\n // Note: could probably be implemented using `pwd`\n if (! empty($filename) && $filename[0] == '~')\n $filename = exec('echo $HOME').'/'.substr($filename,1);\n return $filename;\n}", "title": "" }, { "docid": "7a2b7e52f798314747dc9c686379496f", "score": "0.6063599", "text": "function site_url()\n {\n return getenv('ROOT');\n }", "title": "" }, { "docid": "64fe679d9e5ec5e752a710faf393b9fe", "score": "0.60552216", "text": "public function setHome()\n {\n if($this->os == 'win')\n {\n $this->home = $this->temp;\n }\n else\n {\n $this->home = getenv('HOME') . DS;\n }\n }", "title": "" }, { "docid": "422d3b5a23e901f016bea7150511e1d6", "score": "0.6042962", "text": "public function get_home_host() {\n\n\t\tstatic $cache = null;\n\n\t\tif ( isset( $cache ) )\n\t\t\treturn $cache;\n\n\t\t$parsed_url = parse_url( \\get_home_url() );\n\n\t\t$host = isset( $parsed_url['host'] ) ? $parsed_url['host'] : '';\n\n\t\tif ( $host && isset( $parsed_url['port'] ) )\n\t\t\t$host .= ':' . $parsed_url['port'];\n\n\t\treturn $cache = $host;\n\t}", "title": "" }, { "docid": "2af10e103113432a232d639a316a48aa", "score": "0.59432757", "text": "public static function parseHomeDir($path)\n {\n if (filter_has_var(INPUT_SERVER, 'HOME')) {\n $path = str_replace('~', filter_input(INPUT_SERVER, 'HOME', FILTER_SANITIZE_STRING), $path);\n } elseif (filter_has_var(INPUT_SERVER, 'HOMEDRIVE') && filter_has_var(INPUT_SERVER, 'HOMEPATH')) {\n $path = str_replace('~', filter_input(INPUT_SERVER, 'HOMEDRIVE', FILTER_SANITIZE_STRING) . filter_input(INPUT_SERVER, 'HOMEPATH', FILTER_SANITIZE_STRING), $path);\n }\n\n return $path;\n }", "title": "" }, { "docid": "ced1aadc377e658046535afaaf37b5e6", "score": "0.59419423", "text": "private static function getConfigDir(): string\n {\n $home = self::getHomeDir();\n if (is_dir($home . '/.releaser')) {\n return $home . '/.releaser';\n }\n\n if (self::useXdg()) {\n // XDG Base Directory Specifications\n $xdgConfig = getenv('XDG_CONFIG_HOME') ?: $home . '/.config';\n return $xdgConfig . '/releaser';\n }\n\n return null;\n }", "title": "" }, { "docid": "1cd67034a571fc86bb17a468966f5ed9", "score": "0.59287924", "text": "function get_home_path() {\n\t$home = set_url_scheme( get_option( 'home' ), 'http' );\n\t$siteurl = set_url_scheme( get_option( 'siteurl' ), 'http' );\n\n\tif ( ! empty( $home ) && 0 !== strcasecmp( $home, $siteurl ) ) {\n\t\t$wp_path_rel_to_home = str_ireplace( $home, '', $siteurl ); /* $siteurl - $home */\n\t\t$pos = strripos( str_replace( '\\\\', '/', $_SERVER['SCRIPT_FILENAME'] ), trailingslashit( $wp_path_rel_to_home ) );\n\t\t$home_path = substr( $_SERVER['SCRIPT_FILENAME'], 0, $pos );\n\t\t$home_path = trailingslashit( $home_path );\n\t} else {\n\t\t$home_path = ABSPATH;\n\t}\n\n\treturn str_replace( '\\\\', '/', $home_path );\n}", "title": "" }, { "docid": "5059383f31e5e50018ac01d696ad837b", "score": "0.5890533", "text": "public function getCustomDir(): string\n {\n $home = PHP_OS_FAMILY !== 'Windows' ? getenv('HOME') : $_SERVER['HOMEDRIVE'] . $_SERVER['HOMEPATH'];\n\n if (\\is_string($home) && $home !== '') {\n $home = rtrim($home, \\DIRECTORY_SEPARATOR);\n } else {\n throw new InvalidConfigurationException('Unable to determine the home directory.');\n }\n\n return \"{$home}/.magephi\";\n }", "title": "" }, { "docid": "469d3ebcec0bb3265e82e30ec9425c63", "score": "0.5881729", "text": "public function getEnvPath()\n {\n return $this->envPath;\n }", "title": "" }, { "docid": "d459bfa3e578dcf94140bb14f10bd2db", "score": "0.58291423", "text": "static public function ez_home_path() {\n\t\t\treturn str_replace( str_replace( home_url(), '', site_url() ), '', ABSPATH );\n\t\t}", "title": "" }, { "docid": "32ac0f0e210b972e925faed5b7822a72", "score": "0.5729164", "text": "function getHome()\n {\n return $this->getCachedValue('Home');\n }", "title": "" }, { "docid": "81ef1f8ef3db92668868e0f7bea37d92", "score": "0.5697356", "text": "public static function expandHomeDirectory($path)\n {\n $homeDirectory = getenv('HOME');\n if (empty($homeDirectory)) {\n $homeDirectory = getenv('HOMEDRIVE') . getenv('HOMEPATH');\n }\n return str_replace('~', realpath($homeDirectory), $path);\n }", "title": "" }, { "docid": "01c0546fc21bca1b522d62c4f6f5b18d", "score": "0.5673235", "text": "public function get() {\n\t\tif ( static::$home_url === null ) {\n\t\t\tstatic::$home_url = \\home_url();\n\t\t}\n\n\t\treturn static::$home_url;\n\t}", "title": "" }, { "docid": "9c8996ff7d7cce639314698411d5066c", "score": "0.5668693", "text": "public function getHomeUrl()\n {\n return isset($this->homeUrl) ? $this->homeUrl : Reaction::$app->urlManager->getHomeUrl();\n }", "title": "" }, { "docid": "cd80cb55a186ffc986b6ae2aa484055e", "score": "0.56088954", "text": "private function getEnvFilePath()\n {\n if (!file_exists($this->env_path)) {\n mkdir($this->env_path, 0766, true);\n }\n return sprintf(\n '%s/%s',\n rtrim($this->env_path, '/'),\n ltrim($this->env, '/')\n );\n }", "title": "" }, { "docid": "d63b6778cdadf3ee3b6867d98eb9c057", "score": "0.55877614", "text": "public function getLessonsHomePath(): string\n {\n return $this->lessonsHomePath;\n }", "title": "" }, { "docid": "d02c040bdfb57abdedae3b5de883e482", "score": "0.5579438", "text": "public function getSitesDirectory()\n {\n return sprintf(\n '%s/.console/sites',\n $this->getUserHomeDir()\n );\n }", "title": "" }, { "docid": "e1732be520839ad0a23c15b15f453145", "score": "0.5578641", "text": "public static function getHomeURL () {}", "title": "" }, { "docid": "d935d77ac23704438f3e438611fda31f", "score": "0.557724", "text": "protected static function getGlobalConfigPath()\n {\n return PIWIK_USER_PATH . self::DEFAULT_GLOBAL_CONFIG_PATH;\n }", "title": "" }, { "docid": "4618aeb28710e9bc62abb527d6d38b99", "score": "0.557723", "text": "public static function getRootDir(): string\n {\n return '/usr/local/share/universe/Ling/Light_PlanetInstaller';\n }", "title": "" }, { "docid": "e6a8639b6f68f38b8b628425721acd6e", "score": "0.55741537", "text": "public function CacheStorageEnvPath()\n {\n\t\treturn TIPUI_APP_PATH . Core::STORAGE_FOLDER . DIRECTORY_SEPARATOR . Core::CONF_FOLDER_ENV . DIRECTORY_SEPARATOR;\n\t}", "title": "" }, { "docid": "0392e6964b832a467621636f35893e69", "score": "0.55696094", "text": "function get_HOME(){\n // Get the components of the current url.\n $protocol = @( $_SERVER[\"HTTPS\"] != 'on') ? 'http://' : 'https://';\n $domain = $_SERVER[\"SERVER_NAME\"];\n $port = $_SERVER[\"SERVER_PORT\"];\n $path = $_SERVER[\"REQUEST_URI\"];\n // Check if running on alternate port.\n if ($protocol === \"https://\") {\n if ($port === 443)\n $currentpage = $protocol . $domain;\n else\n $currentpage = $protocol . $domain . \":\" . $port;\n } elseif ($protocol === \"http://\") {\n if ($port === 80)\n $currentpage = $protocol . $domain;\n else\n $currentpage = $protocol . $domain . \":\" . $port;\n }\n $currentpage .= $path;\n\treturn $currentpage;\t\n}", "title": "" }, { "docid": "487f95214220f47e6d7e5e3b0783a0e5", "score": "0.55621356", "text": "protected function envPath()\n {\n if (method_exists($this->laravel, 'environmentFilePath')) {\n return $this->laravel->environmentFilePath();\n }\n return $this->laravel->basePath('.env');\n }", "title": "" }, { "docid": "a923fee694a07e35da790746eb858c53", "score": "0.5551119", "text": "private function homeUrl($path = '')\n {\n $url = home_url($path);\n\n /**\n * If the global --url is passed it will set the HTTP_HOST.\n * Here we replace the hostname in the default home URL with the one set by the command.\n * This preserves compatibility with sites installed as a subdirectory.\n */\n if (! empty($_SERVER['HTTP_HOST'])) {\n return preg_replace('#//[^/]+#', '//'. $_SERVER['HTTP_HOST'], $url, 1);\n }\n\n return $url;\n }", "title": "" }, { "docid": "0309b570406c51327bd80ae86869e068", "score": "0.5528901", "text": "public static function getGlobalConfigPath()\n {\n return PIWIK_USER_PATH . self::DEFAULT_GLOBAL_CONFIG_PATH;\n }", "title": "" }, { "docid": "1519154ac7b87d567992d1fcdcd2813b", "score": "0.55279565", "text": "function getTempDir() {\n\n\t\tif ( function_exists('sys_get_temp_dir') ) {\n\t\t\treturn sys_get_temp_dir();\n\t\t}\n\n\t\t// Try to get from environment variable\n\t\tif ( !empty($_ENV['GCONF_TMPDIR']) )\n\t\t{\n\t\t\t\t\treturn $_ENV['GCONF_TMPDIR'];\n\t\t}\n\t\tif ( !empty($_ENV['TMP']) )\n\t\t{\n\t\t\treturn realpath( $_ENV['TMP'] );\n\t\t}\n\t\telse if ( !empty($_ENV['TMPDIR']) )\n\t\t{\n\t\t\treturn realpath( $_ENV['TMPDIR'] );\n\t\t}\n\t\telse if ( !empty($_ENV['TEMP']) )\n\t\t{\n\t\t\treturn realpath( $_ENV['TEMP'] );\n\t\t}\n\n\t\t// Detect by creating a temporary file\n\t\telse {\n\t\t\t// Try to use system's temporary directory\n\t\t\t// as random name shouldn't exist\n\t\t\t$temp_file = tempnam( md5(uniqid(rand(), TRUE)), '' );\n\t\t\tif ( $temp_file ) {\n\t\t\t\t$temp_dir = realpath( dirname($temp_file) );\n\t\t\t\tunlink( $temp_file );\n\t\t\t\treturn $temp_dir;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "bd81f62fe0eee73dab88e5e924f35084", "score": "0.5523703", "text": "public function getSystemEnvironment()\n {\n //Calculate the environment\n $env = getenv(static::_ENV_VAR);\n if(($env === null || !$env) && isset($_ENV[static::_ENV_VAR]))\n {\n $env = (string)$_ENV[static::_ENV_VAR];\n }\n if($env === null || !$env)//If there is no environment available, assume local\n {\n $env = self::ENV_LOCAL;\n }\n return $env;\n }", "title": "" }, { "docid": "2a18bea67e4afedf4dde45527b40dffc", "score": "0.55218565", "text": "public function getCoursesHomePath(): string\n {\n return $this->coursesHomePath;\n }", "title": "" }, { "docid": "c1d7b255a4f8b6584b1032c8a3ea8c11", "score": "0.5501561", "text": "protected function getConfigDir() : string\n {\n return $this->homePath() . '/.larakits';\n }", "title": "" }, { "docid": "a246edf4a20951d005194655480aa60c", "score": "0.54930663", "text": "function getBasePath() {\r\n\t\treturn getcwd();\r\n\t}", "title": "" }, { "docid": "2127e1dd76c1013f462db875b00f3774", "score": "0.5489183", "text": "public function getEnvironment(): string\n {\n if (isset($this->env)) {\n return $this->env;\n }\n\n // Check for hostname overrides:\n if (array_key_exists('HTTP_HOST', $_SERVER)) {\n foreach ($this->hostnames as $env => $hostnames) {\n if (in_array($_SERVER['HTTP_HOST'], $hostnames)) {\n return $env;\n }\n }\n }\n\n // Now read component config if present:\n if (isset($this->componentConfig)) {\n return $this->componentConfig->getEnvironment();\n }\n\n // Final check: let's see about environment variables:\n return $this->readEnv('APP_ENV')?: self::ENV_LIVE;\n }", "title": "" }, { "docid": "0bbb65a5b44084106ebcdfa85cc1be5c", "score": "0.5463957", "text": "public function getCurrentDirectory(): ?string;", "title": "" }, { "docid": "d12d12990e88c9f4973d2b7e554f9989", "score": "0.5443202", "text": "protected function getDrupalProfile() {\n $profile = getenv('SHEPHERD_INSTALL_PROFILE');\n if (empty($profile)) {\n $this->say(\"Install profile environment variable is not set.\\n\");\n exit(1);\n }\n return $profile;\n }", "title": "" }, { "docid": "2314867dfcd9e3660f588938e497b1f8", "score": "0.54401195", "text": "public function getCurrentDirectory();", "title": "" }, { "docid": "7be1c15aff2743f0cba9872539977073", "score": "0.5401383", "text": "public function getHomeUrl()\n {\n $homeUrl = $this->getProxy()->getOption('home');\n\n // Include blog prefix if needed.\n if ($this->getProxy()->isMultisite()\n && $this->getProxy()->isSubdomainInstall()\n && $this->getProxy()->isMainSite()\n ) {\n $homeUrl .= \"/blog\";\n }\n\n return $homeUrl . '/';\n }", "title": "" }, { "docid": "17f5611ec9c25c486c609342dbe4fe78", "score": "0.5393169", "text": "public static function getInitialCwd()\n {\n if (self::$initialCwd === null) {\n self::$initialCwd = \\getcwd();\n }\n\n return self::$initialCwd;\n }", "title": "" }, { "docid": "75f1166472e196e310149a03330930c2", "score": "0.5392991", "text": "function set_home_url(){\n if(defined('HOME_URL')) return null;\n\n\n // Set Current directory\n $dir = __DIR__;\n\n\n // Current Directory URI - Get currently executing directory\n $dir_uri = str_replace('\\\\', '/', realpath($dir));\n\n\n // Get the current domain\n $domain = CURR_DOMAIN;\n\n\n // Check if server contest prefix is available\n if(!empty($_SERVER['CONTEXT_PREFIX'])) {\n $domain .= $_SERVER['CONTEXT_PREFIX'];\n $domain .= substr($dir_uri, (strlen($_SERVER['CONTEXT_DOCUMENT_ROOT']) - 1));\n }\n\n\n // If not\n else $domain .= substr($dir_uri, (strlen($_SERVER['DOCUMENT_ROOT']) - 1));\n\n\n // Removing extra sub directories\n $path_array = array_reverse(explode('/', $domain));\n $path_array = array_reverse(array_slice($path_array, 3));\n\n\n // Empty variable\n $home_url = '';\n\n\n // Convert array to string\n foreach($path_array as $slug) $home_url .= $slug.'/';\n\n\n // Define home URL\n define('HOME_URL', $home_url);\n}", "title": "" }, { "docid": "c6e0e4539d1919f0786c62e4e078cdf1", "score": "0.53844655", "text": "function wpml_get_home_url() {\n\tif ( function_exists( 'icl_get_home_url' ) ) {\n\t\treturn icl_get_home_url();\n\t} else {\n\t\treturn rtrim( get_bloginfo( 'url' ), '/' ) . '/';\n\t}\n}", "title": "" }, { "docid": "0fbc1ef8d8b7084b70f86ed61ee2a7a9", "score": "0.5373226", "text": "public function getApplicationBaseDir()\n {\n $this->getEventManager()->trigger(__FUNCTION__, $this, ['envname' => 'ZS_APPLICATION_BASE_DIR']);\n\n return $this->getParam('ZS_APPLICATION_BASE_DIR');\n }", "title": "" }, { "docid": "4ec798815fd43502320c7d6662a4907d", "score": "0.53710055", "text": "protected function getBaseUrl()\n {\n if (!isset($this->baseurl)) {\n $this->baseurl = $_ENV['BASE_URL'];\n }\n return $this->baseurl;\n }", "title": "" }, { "docid": "bc9b93057ef8bb79493e8029a49f4b52", "score": "0.5363151", "text": "private function findGitRoot()\n {\n if (is_null($this->m_cGitRoot))\n {\n $this->m_cGitRoot = system('git rev-parse --show-toplevel');\n }\n return $this->m_cGitRoot;\n }", "title": "" }, { "docid": "eb36cbe5acce00b3dd18dfcec4852142", "score": "0.5363057", "text": "function home_data_path($path = ''): string\n{\n return (new Xdg())->getHomeDataDir().\n DIRECTORY_SEPARATOR.config('app.name').\n ($path ? DIRECTORY_SEPARATOR.$path : $path);\n}", "title": "" }, { "docid": "eb81d58b177f63f106c4ad67144a232f", "score": "0.5357848", "text": "private function domain()\n {\n return parse_url(home_url(), PHP_URL_HOST);\n }", "title": "" }, { "docid": "64315fd05a437f25d2dd9bbe6bf6136b", "score": "0.53572214", "text": "public static function envPath() {\n return static::appDir() . '/norma/app/config/env.php';\n }", "title": "" }, { "docid": "11712f2cce3293bd40b0b7833be88695", "score": "0.5351213", "text": "private function getTempDir() {\n\t\tif ( !function_exists('sys_get_temp_dir')) {\n\t\t\tfunction sys_get_temp_dir() {\n\t\t\t\tif ($temp = getenv('TMP')) {\n\t\t\t\t\treturn $temp;\n\t\t\t\t}\n\t\t\t\tif ($temp = getenv('TEMP')) {\n\t\t\t\t\treturn $temp;\n\t\t\t\t}\n\t\t\t\tif ($temp = getenv('TMPDIR')) {\n\t\t\t\t\treturn $temp;\n\t\t\t\t}\n\t\t\t\t$temp = tempnam(__FILE__,'');\n\t\t\t\tif (file_exists($temp)) {\n\t\t\t\t\tunlink($temp);\n\t\t\t\t\treturn dirname($temp);\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} else {\n\t\t\treturn sys_get_temp_dir();\n\t\t}\n\t}", "title": "" }, { "docid": "7e0cbd8eeeb02a06cdc81969be0a5837", "score": "0.5349604", "text": "function getSiteDir(): string\n{\n return Constant::IS_DEVELOPMENT_MODE ? Constant::DEVELOPMENT_SITE_DIR : SITE_DIR;\n}", "title": "" }, { "docid": "5de5d27586b6e49c94dfac0927f7cee2", "score": "0.53461295", "text": "function getEnvironment() {\n\t$templatePath;\n\n if ($_SERVER['HTTP_HOST'] == \"localhost\" || $_SERVER['HTTP_HOST'] == \"127.0.0.1\") {\n $templatePath = 'dev';\n } else {\n $templatePath = 'assets';\n }\n\n return $templatePath;\n\n}", "title": "" }, { "docid": "5ab29656478ac664d66899fb069e6d3b", "score": "0.5329696", "text": "public function pwd()\r\n {\r\n return getcwd() . DS;\r\n }", "title": "" }, { "docid": "7112d6f718bed3d9aa6d17dea4689a3c", "score": "0.5327094", "text": "public function getEnvExamplePath()\n {\n return $this->envExamplePath;\n }", "title": "" }, { "docid": "44183719dbc482006af62975eb52b116", "score": "0.5323651", "text": "function getUserDir() {\n\t global $config;\n\t $dir = $config['userDirs'] . \"/\" . $this->name;\n\t if(!is_dir($dir)) {\n\t\t if(!mkdir($dir, 0775))\n\t\t\traiseError(\"Could not create directory for user\");\n }\n\t return $dir;\n\t}", "title": "" }, { "docid": "08d951b74b75ae92c186ce6e385048d4", "score": "0.5316719", "text": "public function env()\n {\n if($this->_env !== null)\n {\n return $this->_env;\n }\n\n $this->_env = getenv('CUBEX_ENV'); // Apache Config\n\n if(($this->_env === null || !$this->_env) && isset($_ENV['CUBEX_ENV']))\n {\n $this->_env = $_ENV['CUBEX_ENV'];\n }\n\n if($this->_env === null || !$this->_env)\n {\n //If there is no environment available, assume local\n $this->_env = 'local';\n }\n\n return $this->_env;\n }", "title": "" }, { "docid": "e6a0cc010c5b075f12b0d53fb1f78785", "score": "0.53113467", "text": "function get_root() {\n\t\t// a) The 'ADD_FROM_SERVER' constant.\n\t\t// b) Their home directory.\n\t\t// c) The parent directory of the current install or wp-content directory.\n\n\t\tif ( defined( 'ADD_FROM_SERVER' ) ) {\n\t\t\t$root = ADD_FROM_SERVER;\n\t\t} elseif ( str_starts_with( __FILE__, '/home/' ) ) {\n\t\t\t$root = implode( '/', array_slice( explode( '/', __FILE__ ), 0, 3 ) );\n\t\t} else {\n\t\t\tif ( str_starts_with( WP_CONTENT_DIR, ABSPATH ) ) {\n\t\t\t\t$root = dirname( ABSPATH );\n\t\t\t} else {\n\t\t\t\t$root = dirname( WP_CONTENT_DIR );\n\t\t\t}\n\t\t}\n\n\t\t// Precautions. The user is using the folder placeholder code. Abort for lower-privledge users.\n\t\tif (\n\t\t\tstr_contains( get_option( 'frmsvr_root', '%' ), '%' )\n\t\t\t&&\n\t\t\t! defined( 'ADD_FROM_SERVER' )\n\t\t\t&&\n\t\t\t! current_user_can( 'unfiltered_html' )\n\t\t) {\n\t\t\t$root = false;\n\t\t}\n\n\t\treturn $root;\n\t}", "title": "" }, { "docid": "78f75ab3b177de7b8ae48b6ee82b40c9", "score": "0.53105575", "text": "public static function getRoot(): string\n {\n // If environment doesn't have constant ROOT with root dir, we find it \n // manualy with debug_backtrace;\n if (defined(\"ROOT\")) {\n $root_dir = ROOT;\n } else {\n $backtrace = debug_backtrace();\n $i = count($backtrace)-1;\n if (array_key_exists($i, $backtrace) && array_key_exists(\"file\", $backtrace[$i])) {\n $root_dir = dirname($backtrace[$i][\"file\"]);\n } else {\n $root_dir = __DIR__;\n }\n }\n \n if (substr($root_dir, -1) == \"/\") {\n $root_dir = substr($root_dir, 0, -1);\n }\n \n return $root_dir;\n }", "title": "" }, { "docid": "e766993703ba96a0637e23bd5835fff6", "score": "0.5305432", "text": "private function get_temp_dir()\n {\n if(function_exists('sys_get_temp_dir'))\n return $this->make_temp_dir(sys_get_temp_dir());\n foreach(array('TMP', 'TMPDIR', 'TEMP') as $value)\n if(!empty($_ENV[$value]) && is_writable($_ENV[$value]))\n return $this->make_temp_dir($_ENV[$value]);\n // Ok this is hackish, but it works\n $tmpfile = tempnam(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'not-there', '');\n unlink($tmpfile);\n return $this->make_temp_dir(dirname($tmpfile));\n }", "title": "" }, { "docid": "c15108e94f708dc9ab740022b67289c8", "score": "0.5303317", "text": "function s3MVC_GetCurrentAppEnvironment() {\n\n static $current_env;\n\n if( !$current_env ) {\n\n $root_dir = dirname(dirname(__FILE__)). DIRECTORY_SEPARATOR;\n $current_env = include $root_dir.'config'. DIRECTORY_SEPARATOR.'env.php';\n }\n\n return $current_env;\n}", "title": "" }, { "docid": "c776b35a24ff20fdd92a25be23a5e11c", "score": "0.5292276", "text": "public function getEnv();", "title": "" }, { "docid": "cae03e854324d39d2f3c3d704854363f", "score": "0.5288981", "text": "public function getBaseDir()\n {\n return WFUtility::makePath(JPATH_SITE, $this->getRootDir());\n }", "title": "" }, { "docid": "4cfe91dfefc1e1e3d64b09cfe91a9a60", "score": "0.52689797", "text": "public function getEnvironment();", "title": "" }, { "docid": "b9b5fd7a0958489acfdbbd986e625964", "score": "0.5255609", "text": "static function getEnvironment() {\n if(file_exists(APP_PATH.'/configs/current'))\n return 'development';\n return 'live';\n }", "title": "" }, { "docid": "cac15c8c9b3ea04c8914a96f98d6ded5", "score": "0.5252267", "text": "public function getAppsDir(): string\n {\n return $this->getZendServerBaseDir() . '/var/apps';\n }", "title": "" }, { "docid": "4e834389b6193390a5954e448ba0efb4", "score": "0.52491087", "text": "public static function environment() {\n static $environment = null;\n if (is_null($environment)) {\n if (file_exists(static::appDir() . '/norma/environment.private.php')) {\n $environment = require static::appDir() . '/norma/environment.private.php';\n }\n else {\n $environment = require static::appDir() . '/norma/environment.php';\n }\n }\n return $environment;\n }", "title": "" }, { "docid": "dfe208370153eeadf4d21cb9d6bc4785", "score": "0.52453035", "text": "private function getRootDir()\n {\n if (null !== $this->rootDir) {\n return $this->rootDir;\n }\n\n return $this->rootDir = realpath($this->getKernel()->getRootDir() . '/..');\n }", "title": "" }, { "docid": "11803e19b15051f9632c1b82502efbdf", "score": "0.52446055", "text": "protected function envPath()\n {\n if (method_exists($this->laravel, 'environmentFilePath')) {\n return $this->laravel->environmentFilePath();\n }\n\n // check if laravel version Less than 5.4.17\n if (version_compare($this->laravel->version(), '5.4.17', '<')) {\n return $this->laravel->basePath() . DIRECTORY_SEPARATOR . '.env';\n }\n\n return $this->laravel->basePath('.env');\n }", "title": "" }, { "docid": "14d89a48a716643021b81e9ac885f356", "score": "0.5239859", "text": "protected function envPath()\n {\n if (method_exists($this->laravel, 'environmentFilePath')) {\n return $this->laravel->environmentFilePath();\n }\n // check if laravel version Less than 5.4.17\n if (version_compare($this->laravel->version(), '5.4.17', '<')) {\n return $this->laravel->basePath().DIRECTORY_SEPARATOR.'.env';\n }\n return $this->laravel->basePath('.env');\n }", "title": "" }, { "docid": "9d71311307e70624c0b647c53c208e2f", "score": "0.5237586", "text": "function sys_get_temp_directory() {\n\t$is_cpanel = file_exists('/usr/local/cpanel/version');\n\tif ($is_cpanel) {\n\t\t$tmp_dir = '/home/'. get_current_user() . '/tmp';\n\t\tif(is_writable($tmp_dir)) {\n\t\t\treturn $tmp_dir;\n\t\t}\n\t}\n\t\n\t$tmp_dir = sys_get_temp_dir();\n\tif (is_writable($tmp_dir)) {\n\t\treturn $tmp_dir;\n\t}\n\t\n\tdie('Please contact Simple360 for further support, you\\'r temp directory is inaccessible');\n}", "title": "" }, { "docid": "62780501b00d17d668743c7906866b46", "score": "0.5223238", "text": "public function getRootDirPath()\r\n {\r\n return $_SERVER['DOCUMENT_ROOT'];\r\n }", "title": "" }, { "docid": "a64f17fdfb7ba350a9abef6cb21a8ea4", "score": "0.5222819", "text": "function get_path() {\n\t\tglobal $_CONFIG;\n\n\t\t$var = '_PATH'.(isset($_CONFIG['site']['application']) ? '_'.$_CONFIG['site']['application'] : '');\n\n\t\tif (isset($_SESSION[$var])) {\n\t\t\treturn $_SESSION[$var];\n\t\t}\n\t}", "title": "" }, { "docid": "ff606a8902a58f915ca32aa5280bd9eb", "score": "0.52080804", "text": "public static function htdocsPath ()\n {\n return ESys_Application::get('config')->get('htdocsPath');\n }", "title": "" }, { "docid": "a468817699a769ebbb410fa945a163ac", "score": "0.5200051", "text": "private function getBaseConfigDir() {\n\t\treturn $this->conf['base_conf_dir'];\n\t}", "title": "" }, { "docid": "0fa13bc6897b0cf8cf76e3b995adcdba", "score": "0.5198213", "text": "function get_tcsanitized_home_path() {\n\t//then get_home_path will return '/' and cause issues.\n\t$home_path = WPTC_ABSPATH;\n\t// if ($home_path == '/') {\n\t// \t$home_path = WPTC_ABSPATH;\n\t// }\n\tif (WPTC_DEBUG_SIMPLE) {\n\t\t$home_path = WPTC_ABSPATH . WPTC_WP_CONTENT_DIR .'/plugins/dark/';\n\t}\n\treturn rtrim(wp_normalize_path($home_path), '/');\n}", "title": "" }, { "docid": "f65401bab957d0023678c4f7dd82f6b4", "score": "0.51941144", "text": "public function getRootDir()\n {\n $bPath = realpath('bootstrap.php');\n $rootDir = dirname($bPath);\n\n return $rootDir;\n }", "title": "" }, { "docid": "e3f9a713b02e1d59d4f69f011415e9e9", "score": "0.51932484", "text": "public function getHome()\n {\n return $this->home;\n }", "title": "" }, { "docid": "c4855b69e9bdfceb3e948828b3dc61f6", "score": "0.517386", "text": "function mash_cwd() {\n if ($path = mash_get_context('MASH_OLDCWD')) {\n return $path;\n }\n // We use PWD if available because getcwd() resolves symlinks, which\n // could take us outside of the Magento root, making it impossible to find.\n // $_SERVER['PWD'] isn't set on windows and generates a Notice.\n $path = isset($_SERVER['PWD']) ? $_SERVER['PWD'] : '';\n if (empty($path)) {\n $path = getcwd();\n }\n\n // Convert windows paths.\n $path = _mash_convert_path($path);\n\n // Save original working dir case some command wants it.\n mash_set_context('MASH_OLDCWD', $path);\n\n return $path;\n}", "title": "" }, { "docid": "aca06b967ea629ca7331b74676c54962", "score": "0.51676416", "text": "public function getBaseRootDir()\n {\n return $this->paths['base_root_dir'];\n }", "title": "" } ]
b789daa3313c42daa2ca15e9127276ab
Purge the specified files in the cache for the specified zone
[ { "docid": "bcced4f0befc0b8197e369b67ade30e8", "score": "0.7089468", "text": "public function purgeCacheFiles($zoneID, $files) {\n\t\t$requestData = array(\"files\" => $files);\n\t\t\n\t\t$response = $this->request(\"zones/\".$zoneID.\"/purge_cache\", $requestData, \"DELETE\");\n\t\t\n\t\treturn $response;\n\t}", "title": "" } ]
[ { "docid": "1e9919fa2107092aa0139bb4e63e87ae", "score": "0.6754907", "text": "function purge() {\n if (is_dir($this->cachedir)) {\n $thisdir = dir($this->cachedir);\n $now = time();\n while( $file=$thisdir->read() ) {\n if ($file!=\".\" && $file!=\"..\") {\n $fname = $this->cachedir . $file;\n $mod = filemtime($fname);\n if ($mod && ($now - $mod > $this->cache_expire)) unlink($fname);\n }\n }\n }\n }", "title": "" }, { "docid": "30efb2e42c01f9e0bc274ca2e0f6101f", "score": "0.6655266", "text": "protected function zone_file_purge(array $parameters) {\n\t\t$args = array(\n\t\t\t'a' => 'zone_file_purge',\n\t\t\t'z' => $parameters['z'],\n\t\t\t'url' => $parameters['url'],\n\t\t);\n\t\treturn $this->POST($args);\n\t}", "title": "" }, { "docid": "471db21b39c0c276b32c190e4e82f6b2", "score": "0.6645269", "text": "public function cloudflare_purgeFiles() {\r\n\r\n\r\n\t\t$cloudflare_key = esc_attr( get_option(\"cloudflare_key\"));\r\n\t\t$cloudflare_email = esc_attr( get_option('cloudflare_email'));\r\n\t\t$files = esc_attr( $_POST['files']);\r\n\t\t$zoneid = esc_attr( $_POST['purgeZoneID']);\r\n\t\t$list = explode(\",\", $files);\r\n\t\t$cf = new cloudflare_api();\r\n\t\t//$res = $cf->getZoneList($cloudflare_email, $cloudflare_key);\r\n\t\t$res = $cf->purgeFiles($cloudflare_email, $cloudflare_key, $list, $zoneid);\r\n\t\techo json_encode($res);\r\n\t\texit;\r\n\t}", "title": "" }, { "docid": "e6e758d006c44011b5803369c52b97d9", "score": "0.6632851", "text": "public function purgeEverything () {\n\t\t\t$zoneId = $this->_configurationModel->getZoneId ();\n\t\t\t$endpoint = sprintf ( \"zones/%s/purge_cache\", $zoneId );\n\t\t\t$this->_requestModel->setType ( Request::REQUEST_DELETE );\n\t\t\t$this->_requestModel->setData ( array ( \"purge_everything\" => true ) );\n\t\t\treturn $this->_requestModel->resolve ( $endpoint );\n\t\t}", "title": "" }, { "docid": "b7c6d6ce9861f38326dba3a15ff795ac", "score": "0.66298753", "text": "public static function deleteCache(){\r\n\t\t\r\n\t\tif ( @$handle = opendir( GALAXY_ZOO_CACHE_FOLDER ) ) {\r\n\t\t\twhile ( FALSE !== ( $file = readdir( $handle ) ) ) {\r\n\t\t\t\tif( $file != \".\" && $file != \"..\") {\r\n\t\t\t\t\t$file = GALAXY_ZOO_CACHE_FOLDER . '/' . $file;\r\n\t\t\t\t\t$fp = fopen( $file, 'w+' );\r\n\t\t\t\t\tfwrite( $fp, '' );\r\n\t\t\t\t\tfclose( $fp );\r\n\t\t\t\t};\r\n\t\t\t};\r\n\t\t\tclosedir( $handle );\r\n\t\t}\t\t\r\n\t\t\r\n\t}", "title": "" }, { "docid": "b68111438191401385c1beae80243af6", "score": "0.6562818", "text": "public function purgeAllCache($zoneID) {\n\t\t$requestData = array(\"purge_everything\" => true);\n\t\t\n\t\t$response = $this->request(\"zones/\".$zoneID.\"/purge_cache\", $requestData, \"DELETE\");\n\t\t\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "9097f4681a1c666e13aa910e4fdc0ee2", "score": "0.62786084", "text": "public function purgeUrls ( $items ) {\n\t\t\t$zoneId = $this->_configurationModel->getZoneId ();\n\t\t\t$endpoint = sprintf ( \"zones/%s/purge_cache\", $zoneId );\n\t\t\t$this->_requestModel->setType ( Request::REQUEST_DELETE );\n\t\t\t$this->_requestModel->setData ( array ( \"files\" => $items ) );\n\t\t\treturn $this->_requestModel->resolve ( $endpoint );\n\t\t}", "title": "" }, { "docid": "639b2eb7b92099b2a5eebe64cecbbc23", "score": "0.62683827", "text": "function _clearCache()\n {\n $dir = atkconfig(\"atktempdir\").\"holidays\";\n if ($handle = opendir($dir)) {\n while (false !== ($file = readdir($handle))) {\n if ($file != \".\" && $file != \"..\") {\n unlink($dir.\"/\".$file);\n }\n }\n closedir($handle);\n }\n }", "title": "" }, { "docid": "e7028120f1b02f7fe96964dfdd81b344", "score": "0.6206768", "text": "function clearCache(){\n foreach(glob('../cache/'.'*.*') as $v)\n unlink($v);\n foreach(glob('../temp/'.'*.*') as $v)\n unlink($v);\n echo 'The Cache has been Cleared';\n}", "title": "" }, { "docid": "ffabae672d8102d8173a10da67d46d9b", "score": "0.6202952", "text": "public function purgeCachedFiles($cacheKey) {\n // Get directory and filename\n list($directory, $filename) = $this->getDirectoryAndFilenameFromKey($cacheKey);\n\n // Remove the directory\n passthru(\"rm -rf \" . $directory . \"/\" . $filename);\n\n }", "title": "" }, { "docid": "da56079a5632cdb7909f3d6f18652f49", "score": "0.61496824", "text": "protected function cache_garbage_collect() {\n self::list_cached_files();\n if (count($this->_cachedFiles) > 1)\n {\n foreach ($this->_cachedFiles as $filename)\n {\n if (!strpos($filename, $this->_currentSha1))\n {\n unlink($filename);\n }\n }\n }\n }", "title": "" }, { "docid": "9ca59451b29c5a3d29a75c6308a83a37", "score": "0.613747", "text": "private function cleanCache()\n\t{\n\t\t$week_seconds = 7 * 24 * 60 * 60;\n\t\t$files = scandir($this->cache_dir);\n\t\t$fc = count($files);\n\n\t\tfor ($i = 0; $i < $fc; $i++)\n\t\t{\n\t\t\t$file = $this->cache_dir . '/' . $files[$i];\n\t\t\t$lm = filemtime($file); // Get the last-modified timestamp\n\n\t\t\tif (is_file($file) && $lm < time() - $week_seconds) // Older than a week\n\t\t\t\tunlink($file);\n\t\t}\n\t}", "title": "" }, { "docid": "35cb889608f8704f0e88e1da21f4e074", "score": "0.61238277", "text": "public static function purgeCache()\n {\n if (is_dir($GLOBALS['config']['PAGECACHE']))\n {\n $handler = opendir($GLOBALS['config']['PAGECACHE']);\n if ($handler!==false)\n {\n while (($filename = readdir($handler))!==false) \n {\n if (endsWith($filename,'.cache')) { unlink($GLOBALS['config']['PAGECACHE'].'/'.$filename); }\n }\n closedir($handler);\n }\n }\n }", "title": "" }, { "docid": "a8fb25804815ba91258d27a41630ae3f", "score": "0.6117354", "text": "function clear_all_cache()\r\n {\r\n $pattern = sprintf('%s/%s', $this->get_upload_dir(), '*/*');\r\n $glob = glob($pattern);\r\n if(is_array($glob) && !empty($glob))\r\n {\r\n foreach($glob as $file)\r\n unlink($file);\r\n }\r\n }", "title": "" }, { "docid": "fb7b50cea5054fb69c1fd01636320b9a", "score": "0.6097574", "text": "public function cloudflare_purgeAll() {\r\n\r\n\r\n\t\t$cloudflare_key = esc_attr( get_option(\"cloudflare_key\"));\r\n\t\t$cloudflare_email = esc_attr( get_option('cloudflare_email'));\r\n\t\t\r\n\t\t$zoneid = esc_attr( $_POST['purgeZoneID']);\r\n\t\r\n\r\n\t\t $cf = new cloudflare_api();\r\n\t\t $res = $cf->purgeAll($cloudflare_email, $cloudflare_key, $zoneid);\r\n\t\techo json_encode($res);\r\n\t\texit;\r\n\t}", "title": "" }, { "docid": "57e2c08157507dced86f581b4d485f48", "score": "0.6046066", "text": "public function purge();", "title": "" }, { "docid": "8eeb04a2e92e273ba95b77cc107cc936", "score": "0.6018443", "text": "public static function clearCache(): void\n {\n $glob = glob(__DIR__ . '/data/*.cache');\n foreach ($glob as $file) {\n unlink($file);\n }\n }", "title": "" }, { "docid": "2fe5c9b0a475be870b6b1b9163a03f63", "score": "0.5992922", "text": "public function clearExpiredCacheEntries();", "title": "" }, { "docid": "8ca21ef057dffe8e2d57d90569d0e98e", "score": "0.5928695", "text": "private static function removeCacheFiles($paths): void\n {\n $paths = (is_array($paths) ? $paths : [$paths]);\n foreach ($paths as $path) {\n if (file_exists($path)) {\n unlink($path);\n }\n }\n }", "title": "" }, { "docid": "8c23e5d582288e5d5094524b2821f282", "score": "0.5911384", "text": "function purgeCaches() {\n if ($this->_cachePath) {\n $files = glob(\"{$this->_cachePath}*.tmp\");\n foreach($files as $file) {\n unlink($file);\n }\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "ae3db11d9f4b03faacdd1412a9613bb0", "score": "0.5889244", "text": "public function cleanCache() {\n $maxTTL = 24*60*60;\n\n $cacheDir = scandir(__DIR__.'/cache/');\n unset($cacheDir[0]);\n unset($cacheDir[1]);\n foreach ($cacheDir as $dir) {\n // skip .htacces, .gitignore and other .xxx\n if (preg_match(\"/^\\./ius\", $dir)) {\n continue;\n }\n $path2 = scandir(__DIR__.'/cache/'.$dir);\n unset($path2[0]);\n unset($path2[1]);\n foreach ($path2 as $dir2) {\n $path3 = scandir(__DIR__.'/cache/'.$dir.'/'.$dir2);\n unset($path3[0]);\n unset($path3[1]);\n\n foreach ($path3 as $file) {\n // skip no-MD5 files\n if (strlen($file) != 32) {\n continue;\n }\n $f = __DIR__.'/cache/'.$dir.'/'.$dir2.'/'.$file;\n $time = filemtime($f);\n // remove old files\n if ($time < time() - $maxTTL) {\n @unlink($f);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "8ee09a361045b574a11bfa5c86f573a5", "score": "0.58892345", "text": "public function clearCache();", "title": "" }, { "docid": "8ee09a361045b574a11bfa5c86f573a5", "score": "0.58892345", "text": "public function clearCache();", "title": "" }, { "docid": "8ee09a361045b574a11bfa5c86f573a5", "score": "0.58892345", "text": "public function clearCache();", "title": "" }, { "docid": "93a5c57702d960df5c897fa7bf1924bb", "score": "0.5885859", "text": "public function clearCache()\n {\n if($list = File::files($this->storage_path)){\n foreach($list as $cache){\n unlink($cache);\n }\n }\n }", "title": "" }, { "docid": "800bc63f089ae60a11b0c1c537a73b5c", "score": "0.58664805", "text": "public function clearCache(){\n\t\tif($this->fn != \"\" && is_file($this->fn)){\n\t\t\tunlink($this->fn);\n\t\t}\n\t}", "title": "" }, { "docid": "4bb21740e27ad70f7c211ebfbf45ff93", "score": "0.58476305", "text": "public function purgeCache()\n\t{\n\t\tif(xcache_isset($this->prefixArr))\n\t\t{\n\t\t\t$tmp = xcache_get($this->prefixArr);\n\t\t\t\n\t\t\tforeach($tmp as $key)\n\t\t\t{\n\t\t\t\txcache_unset($key);\n\t\t\t}\n\t\t\t\n\t\t\txcache_unset($this->prefixArr);\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "21fc6de6bf04cf69df8212dc2fb04fdb", "score": "0.58192736", "text": "function atozsitesVarnishPurgeAll() {\n $this->atozsitesVarnishPurgeObject('/.*');\n }", "title": "" }, { "docid": "94585e64b41545526ba9f7edbfd86997", "score": "0.5812653", "text": "function fCleanupFiles($d) {\n\tglobal $file_expiry;\n\t//$expires=strtotime('-1 day', time());\n\tforeach (listdir($d) as $entry) {\n\t\t// run the cleanup\n\t\t// if file is more than 24 hours old, delete it\n\t\tif (is_dir($d.$entry) || is_file($d.$entry)) $fileage=filemtime($d.$entry);\n\t\tif (($file_expiry-$fileage)>0) { // delete!\n\t\t\t// DEBUG echo '<!-- deleting '.$d.$entry.' -->';\n\t\t\tdeltree($d.$entry);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "d80926d722b68fb7d81bba0c8dfadc38", "score": "0.58118486", "text": "public function purgeAll()\n {\n // Clear all of CloudFront's caches\n $this->invalidateCdnPath('/*');\n }", "title": "" }, { "docid": "13bfb1e2a3071ea48c854d2187a5df19", "score": "0.58016336", "text": "public function gc()\n {\n $this->_deleteFile($this->_cache_dir, true, false, true);\n }", "title": "" }, { "docid": "2b714e4ccdde5095c465a8497a7b9e43", "score": "0.57788515", "text": "public function clearExpired()\n {\n $options = $this->getOptions();\n $namespace = $options->getNamespace();\n $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();\n\n $flags = GlobIterator::SKIP_DOTS | GlobIterator::CURRENT_AS_FILEINFO;\n $path = $options->getCacheDir()\n . str_repeat(DIRECTORY_SEPARATOR . $prefix . '*', $options->getDirLevel())\n . DIRECTORY_SEPARATOR . $prefix . '*.dat';\n $glob = new GlobIterator($path, $flags);\n $time = time();\n $ttl = $options->getTtl();\n\n ErrorHandler::start();\n foreach ($glob as $entry) {\n $mtime = $entry->getMTime();\n if ($time >= $mtime + $ttl) {\n $pathname = $entry->getPathname();\n unlink($pathname);\n\n $tagPathname = substr($pathname, 0, -4) . '.tag';\n if (file_exists($tagPathname)) {\n unlink($tagPathname);\n }\n }\n }\n $error = ErrorHandler::stop();\n if ($error) {\n $result = false;\n return $this->triggerException(\n __FUNCTION__,\n new ArrayObject(),\n $result,\n new Exception\\RuntimeException('Failed to clear expired items', 0, $error)\n );\n }\n\n return true;\n }", "title": "" }, { "docid": "6752ea4fb53d599238c51fa40c240b60", "score": "0.5775294", "text": "public static function cleanup()\n\t{\n\t\t$path = self::cache_dir();\n\t\t\n\t\t// only delete files\n\t\treturn self::_delete_all($path, true);\n\t}", "title": "" }, { "docid": "822b56c37c5cf4c64bacc6677155d74d", "score": "0.5760271", "text": "public function clearAllCache();", "title": "" }, { "docid": "a0077c0202c770ee81e855b786c47dd7", "score": "0.5747904", "text": "function purgeAll();", "title": "" }, { "docid": "d3223b0f345e96149fc5e55d521fd0bb", "score": "0.56970745", "text": "public function purgeHosts ( $items ) {\n\t\t\t$zoneId = $this->_configurationModel->getZoneId ();\n\t\t\t$endpoint = sprintf ( \"zones/%s/purge_cache\", $zoneId );\n\t\t\t$this->_requestModel->setType ( Request::REQUEST_DELETE );\n\t\t\t$this->_requestModel->setData ( array ( \"hosts\" => $items ) );\n\t\t\treturn $this->_requestModel->resolve ( $endpoint );\n\t\t}", "title": "" }, { "docid": "b26f626f17ec3f033b582ea7773cf255", "score": "0.56748134", "text": "public function execute() {\r\n\t\t$repository = t3lib_div::makeInstance('Tx_Purge_Repository'); /* @var $repository Tx_Purge_Repository */\r\n\t\t$paths = $repository->getAndRemovePathsInCacheQueue();\r\n\r\n\t\t$cacheMgm = t3lib_div::makeInstance('Tx_Purge_Cachemgr'); /* @var $cacheMgm Tx_Purge_Cachemgr */\r\n\t\t$cacheMgm->addClearQueuePaths($paths);\r\n\t\t$cacheMgm->execute();\r\n\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "8c0a783771ee5192c25690664b8772e8", "score": "0.5661472", "text": "function clear_cache() {\n global $g_image_cache;\n\n foreach ($g_image_cache as $key => $value) {\n unlink($value);\n };\n }", "title": "" }, { "docid": "1dc5765136603d4fc56b28adb28078c2", "score": "0.5646416", "text": "function drush_cache_tools_purge() {\n\n drush_print(dt('Preparing to truncate persistent cache tables... '));\n\n // Clear all caches to purge expired objects first.\n drupal_flush_all_caches();\n drush_log(dt('Cleared caches.'), 'ok');\n\n // Trigger a rebuild of router paths to discover changes.\n \\Drupal::service(\"router.builder\")->rebuild();\n\n // Persistent cache bin stores to truncate.\n $bins = [\n 'bootstrap',\n 'config',\n 'data',\n 'default',\n 'discovery',\n 'dynamic_page_cache',\n 'entity',\n 'menu',\n 'migrate',\n 'render',\n 'rest',\n 'toolbar',\n ];\n foreach ($bins as $bin) {\n if (\\Drupal::hasService(\"cache.$bin\")) {\n \\Drupal::cache($bin)->deleteAll();\n }\n }\n}", "title": "" }, { "docid": "fd5e4203a5b5b1b121f0cba702fd2777", "score": "0.56450844", "text": "function cache_gc(){\n\t\t# just deleting entries that are expired\n\t\ttep_db_query(\"DELETE FROM cache WHERE cache_expires <= '\" . date(\"Y-m-d h:i:s\") . \"'\" );\n\t}", "title": "" }, { "docid": "f083aa500d6702ad00ecf6073146cac1", "score": "0.5639096", "text": "public function purgeTags ( $items ) {\n\t\t\t$zoneId = $this->_configurationModel->getZoneId ();\n\t\t\t$endpoint = sprintf ( \"zones/%s/purge_cache\", $zoneId );\n\t\t\t$this->_requestModel->setType ( Request::REQUEST_DELETE );\n\t\t\t$this->_requestModel->setData ( array ( \"tags\" => $items ) );\n\t\t\treturn $this->_requestModel->resolve ( $endpoint );\n\t\t}", "title": "" }, { "docid": "1714d4dceefd2c26f7f100b9ec290b69", "score": "0.56300163", "text": "function deleteCache()\r\n {\r\n $user =& eZUser::currentUser();\r\n\r\n $files =& eZCacheFile::files( \"ezquiz/cache/\",\r\n array( \"quizlist\", \"quizfuture\", \"quizpast\", \"quizopen\", \"quizscore\", \"quizscores\", NULL ), \"cache\", \",\" );\r\n foreach ( $files as $file )\r\n {\r\n $file->delete();\r\n }\r\n\r\n }", "title": "" }, { "docid": "36669a17f1d2e542174060659a4ac040", "score": "0.56133515", "text": "function clear_cache($path, $max_minutes=60) {\r\n\t\tif (is_dir($path) ) {\r\n\t\t\t$handle = opendir($path);\r\n\t\t\twhile (false !== ($file = readdir($handle))) {\r\n\t\t\t\tif ($file != '.' && $file != '..' && pathinfo($file, PATHINFO_EXTENSION) == 'spc') {\r\n\t\t\t\t\t$diff = (time() - filemtime(\"$path/$file\"))/60;\r\n\t\t\t\t\tif ($diff > $max_minutes) unlink(\"$path/$file\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tclosedir($handle);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "5c825c4a5e28623280f0d07258c09e57", "score": "0.5607927", "text": "protected function invalidateCaches()\n {\n $assemblyLineClass = \\iveeCore\\Config::getIveeClassName('SolarSystem');\n $assemblyLineClass::getInstancePool()->deleteFromCache($this->updatedIDs);\n }", "title": "" }, { "docid": "0aec8176349afc5739ab8a3b24a92fb2", "score": "0.56027466", "text": "function clear_cache($force = false)\n{\n clearstatcache();\n \n foreach (new \\DirectoryIterator(CACHE_PATH) as $fileinfo)\n {\n if ($fileinfo->isDot() || ! $fileinfo->isFile())\n continue;\n \n if ((time() - $fileinfo->getATime()) <= CACHE_TTL)\n continue;\n \n $file = CACHE_PATH . $fileinfo->getFilename();\n writelf('Expired: %s', $file);\n \n if (! unlink($file))\n writelf('Failed to delete file: %s', $file);\n }\n}", "title": "" }, { "docid": "f0d2bc5dd3c44ffe2f48b845cfd5069a", "score": "0.56004775", "text": "function cache_gc() {\n $MODULE_CACHE_DIR=MODULE_CACHE_DIR;\n cache_debug(\"Running gc\");\n $dp=opendir($MODULE_CACHE_DIR);\n if (!$dp) {\n cache_debug(\"Error opening $MODULE_CACHE_DIR for cleanup\");\n return FALSE;\n }\n while (!(($de=readdir($dp))===FALSE)) {\n // To get around strange php-strpos, add additional char\n if (strpos(\" $de\", \"wm-\")==1) {\n $absfile=$MODULE_CACHE_DIR . \"/\" . $de;\n $cachestuff=cache_read($absfile);\n $thecache=unserialize($cachestuff);\n if (is_array($thecache)) {\n if ($thecache[\"cachetime\"]!=\"0\" && $thecache[\"expire\"]<=time()) {\n\t\t\t\t\t\tcache_lock($absfile, TRUE); \n if (@unlink($absfile)) {\n cache_debug(\"Deleted $absfile\");\n } else {\n cache_debug(\"Failed to delete $absfile\");\n }\n\t\t\t\t\t\tcache_lock($absfile, FALSE); \n } else {\n cache_debug(\"$absfile expires in \" . ($thecache[\"expire\"]-time()));\n }\n } else {\n cache_debug(\"$absfile is empty, being processed in another process?\");\n }\n }\n }\n }", "title": "" }, { "docid": "c8e0e34e94f37aef4cfb7a5bec1a1916", "score": "0.5597529", "text": "public function purge(): void;", "title": "" }, { "docid": "9760b0d079e10e457f737aab25efdb41", "score": "0.5597361", "text": "function cacheClear ()\n {\n $target = $this->kernelSettings->storagePath . DIRECTORY_SEPARATOR . $this->cachingSettings->cachePath;\n (new CleanDir($target))->run ();\n }", "title": "" }, { "docid": "a1dc6476a9650e4931f4e31f6ea2a936", "score": "0.55944157", "text": "public function clearCache() {\n if (file_exists($this->cacheFolderPath) && is_dir($this->cacheFolderPath)) {\n // clear files from folder\n $files = glob($this->cacheFolderPath . '/*'); // get all file names\n echo \"<h2 class='feedrefresh'>Feed cache will be refreshed</h2>\";\n foreach ($files as $file) { // iterate files\n if (is_file($file)) {\n unlink($file); // delete file}\n }\n }\n }\n }", "title": "" }, { "docid": "8290856d727d242cc79a7e4667412d5b", "score": "0.5575656", "text": "protected function gc()\n {\n if (!mt_rand(0, 100) > 80) {\n return;\n }\n\n $expireTime = time() - (1 * 24 * 3600);\n foreach (glob(\"{$this->dataDir}/*.json\") as $filename) {\n if (filectime($filename) < $expireTime) {\n @unlink($filename);\n }\n }\n }", "title": "" }, { "docid": "4eaa2107812461aa39fb0970d698f7c6", "score": "0.5565101", "text": "public function purgePrefixes ( $items ) {\n\t\t\t$zoneId = $this->_configurationModel->getZoneId ();\n\t\t\t$endpoint = sprintf ( \"zones/%s/purge_cache\", $zoneId );\n\t\t\t$this->_requestModel->setType ( Request::REQUEST_DELETE );\n\t\t\t$this->_requestModel->setData ( array ( \"prefixes\" => $items ) );\n\t\t\treturn $this->_requestModel->resolve ( $endpoint );\n\t\t}", "title": "" }, { "docid": "69d073b47d0127a19233634f2b9255c2", "score": "0.555168", "text": "public function cleanUpDiskCache()\n {\n $cacheKeys = $this->keyValue->getAdapter()->getKeys(DataTable::INSTANCE_PREFIX);\n\n foreach ($cacheKeys as $cacheKey) {\n $newIdsCache = $this->keyValue->get($cacheKey);\n\n // invalid entry, delete and skip\n if( ! $newIdsCache instanceof SubDataTableNewIdsCache){\n $this->keyValue->delete($cacheKey);\n continue;\n }\n\n // entry must be older than 1 day\n if ($newIdsCache->getDate()->modify(\"+1 day\") < new DateTime) {\n $this->removeUnsavedTemporaryRecords($newIdsCache);\n $this->keyValue->delete($cacheKey);\n }\n }\n\n // remove expired password reset tokens\n $passwordResetDir = $this->keyValue->getAdapter()->getStoragePath() . PassResetConfig::PREFIX;\n\n if(is_dir($passwordResetDir)) {\n $passwordResetTokenDir = new RecursiveDirectoryIterator($passwordResetDir);\n\n foreach (new RecursiveIteratorIterator($passwordResetTokenDir) as $filename => $cur) {\n if (date('U') - filemtime($filename) > PassResetConfig::LIFETIME) {\n unlink($filename);\n }\n }\n }\n }", "title": "" }, { "docid": "1b89aa36c75f66ff771375fbbb7ae536", "score": "0.55420655", "text": "function garbageCollect() {\n $now = time();\n $numDeleted = 0;\n Tht::module('*File')->u_for_files(Tht::path('kvCache'), function($f) use ($now, $numDeleted){\n if (filemtime($f['fullPath']) <= $now) {\n unlink($f['fullPath']);\n $numDeleted += 1;\n if ($numDeleted == 100) {\n return true;\n }\n }\n });\n return $numDeleted;\n }", "title": "" }, { "docid": "75c2862a4438ace0a73a925abb945f70", "score": "0.5508307", "text": "function fastcgi_purge($cache_dir, $purge_url) {\n\t\t$cache_dir = rtrim($cache_dir, '/');\n\t\tif (!is_dir($cache_dir)) {\n\t\t\treturn 0;\n\t\t}\n\t\t// just an extra check\n\t\tif (strpos($cache_dir, '/cache') === FALSE) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tif (empty($purge_url)) {\n\t\t\t$to_remove = glob($cache_dir . \"/*/*/*\");\n\t\t\tarray_map('unlink', $to_remove);\n\t\t\treturn count($to_remove);\n\t\t}\n\t\telse {\n\t\t\t$hash = md5($purge_url);\n\t\t\t$cache_file = realpath($cache_dir . '/' . substr($hash, -1) . '/' . substr($hash,-3,2) . '/' . $hash);\n\t\t\t// make sure the canonicalized cache directory is still the same\n\t\t\tif (strpos($cache_file, $cache_dir) === 0 && file_exists($cache_file)) {\n\t\t\t\tunlink($cache_file);\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "cff358a24679be10976541d52e42a1d9", "score": "0.5499621", "text": "function delete_files_in_data_storage_if_expired(): void\n {\n $files = $this->get_data_storage_files_recursive();\n $index = $this->get_data_storage_index();\n\n foreach ($files as $file) {\n if (in_array($file, $index))\n {\n $metadata = $index[$file];\n $date = new DateTime();\n\n // If difference between NOW and CREATED is bigger than the time when file expires\n // delete it from disk, but keep it in index, so we can show \"file deleted\" message\n if ($date->getTimestamp() - $metadata[\"created\"]->getTimestamp() >= $metadata[\"expires\"]->getTimestamp())\n unlink($file);\n }\n }\n }", "title": "" }, { "docid": "310b90b9318e4187a384abe1c33229ea", "score": "0.54979783", "text": "public function clearCache($hours = 4) {\n $cache = opendir($this->config['cachePath']);\n while (false !== ($file = readdir($cache))) {\n if (in_array($file, array('.', '..'))) {\n continue;\n }\n if (is_dir($this->config['cachePath'] . $file)) {\n $filelastmodified = filemtime($this->config['cachePath'] . $file . '/.');\n if (((time() - $filelastmodified) > ($hours * 3600))) {\n $this->removeDir($this->config['cachePath'] . $file . '/');\n }\n }\n if (is_file($this->config['cachePath'] . $file)) {\n $filelastmodified = filemtime($this->config['cachePath'] . $file);\n if (((time() - $filelastmodified) > ($hours * 3600))) {\n @unlink($this->config['cachePath'] . $file);\n }\n }\n\n }\n closedir($cache);\n }", "title": "" }, { "docid": "aa0217b71c5ce6e7033cf1ff483e4fc4", "score": "0.5482027", "text": "private function _clearCachedConfig()\n\t{\n // Suffixes of cache files.\n\t $aFileSuffixes = array(\n\t\t 'adisabledmodules',\n 'amodulepaths',\n 'amodulefiles',\n 'amodules'\n );\n\n\t\t$compileDir = oxRegistry::getConfig()->getConfigParam('sCompileDir');\n\t\t\n\t\tforeach ($aFileSuffixes as $sFileSuffix){\n\t\t\t$sFileName = 'config.'.$this->sShopId.'.'.$sFileSuffix.'.txt';\t// Naming shape of cache files.\n\t\t\n\t\t\tif (file_exists($compileDir.$sFileName))\n\t\t\t{\n\t\t\t\t@unlink($compileDir.$sFileName);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "6971a39227e4bdb485c08bd42e40efba", "score": "0.5469043", "text": "public function purge() {\n\t\t//\n\t}", "title": "" }, { "docid": "53c968b6ae5ce52c2e0fa91c172062ab", "score": "0.54660165", "text": "public static function clean_files() {\n\t\t$container = self::init();\n\n\t\t$files = $container->objectList();\n\n\t\tforeach ($files as $file) {\n\t\t\t$last_modified = $file->getLastModified();\n\t\t\tif ( strtotime( $last_modified ) < strtotime('-1 min') ) {\n\t\t\t\t$file->delete();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "8687e5c14fe3c1c755e5d47296277395", "score": "0.5445548", "text": "public static function cacheClean($minutes){\r\n if (!Utils::isNullOrEmptyString(self::$wcpCacheFolder)){\r\n $cacheDir = (Utils::strEndsWith(self::$wcpCacheFolder, '/')?self::$wcpCacheFolder:self::$wcpCacheFolder.'/');\r\n if ($handle = opendir($cacheDir)) {\r\n while (false !== ($file = readdir($handle))) {\r\n if ($file!='.' && $file!='..' && (time()-filectime($cacheDir.$file)) > (60*$minutes)) {\r\n unlink($cacheDir.$file);\r\n }\r\n }\r\n closedir($handle);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "eba8af4c7194b263715208d94c9e58f3", "score": "0.544134", "text": "public static function cleanup()\n {\n foreach (\\File::glob(static::storagePath('/*')) as $file)\n {\n \\File::delete($file);\n }\n }", "title": "" }, { "docid": "5dd26210903090edd2493c47abd209f1", "score": "0.54398686", "text": "public function clearCache($template, $cache_id);", "title": "" }, { "docid": "980abcdae245a8197dfd0edf7d22e24d", "score": "0.54059345", "text": "public function cache_delete_all()\n {\n }", "title": "" }, { "docid": "aca32ffec5d805846aa705afd354478e", "score": "0.54025906", "text": "function _delete_expired_files()\n {\n $directory = dir($this->_basedir.'data/common/captcha');\n \n while (false != ($filename = $directory->read()))\n {\n if ( ( $filename == \".\" ) || ( $filename == \"..\" ) || ( FALSE == strstr( $filename, '.jpg') ) )\n {\n continue;\n } \n $file = $this->_basedir.'data/common/captcha/'.$filename;\n\n if(TRUE == is_file($file))\n {\n if((time()-$this->captcha_picture_expire) > filemtime($file))\n {\n @unlink($file);\n } \n } \n }\n\n $directory->close(); \n }", "title": "" }, { "docid": "a7b8cffab9e65070585189f25d8e99e6", "score": "0.5390146", "text": "public function cloudflare_purge_domain_code(){\r\n\t\t\t\r\n\t\t\t\t\t\r\n\t?>\r\n\t<div class=\"wrap\">\r\n\t<div id=\"loading\"></div>\r\n\t<h1>Clear Cache Section(Purge)</h1>\r\n\r\n\t<form method=\"post\" action=\"\" id=\"purge_form\" name=\"settings_form\">\r\n\t\t<?php settings_fields( 'cloudflare-plugin-purge-group' ); ?>\r\n\t\t<?php do_settings_sections( 'cloudflare-plugin-purge-group' ); ?>\r\n\t \r\n\t\t<table class=\"form-table\">\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t<th scope=\"row\">File Path</th>\r\n\t\t\t<td><input type=\"text\" name=\"purge_file\" id=\"purge_file\" value=\"\" /><button class=\"primary\" id=\"purgeFile\" >Purge Files</button></td>\r\n\t\t\t</tr>\r\n\t\t\t \r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t<th scope=\"row\">Domain</th>\r\n\t\t\t<td>\r\n\t\t\t<select name=\"zones\" id=\"zones\">\r\n\t\t\t\r\n\t\t\t</select></td>\r\n\t\t\t</tr>\r\n\t\t\r\n\t\t \r\n\t\t</table>\r\n\t\t<script type=\"text/javascript\">\r\n\t\tgetZoneList();\r\n\t\t</script>\r\n\t<button class=\"primary\" id=\"purgeAll\">Purge All</button>\r\n\t\r\n\r\n\t</form>\r\n\t</div>\r\n\t<?php\r\n\t}", "title": "" }, { "docid": "491e587337dddd79014a67c26b945708", "score": "0.5383548", "text": "public function removeCacheFilesFlushesSystemCaches()\n {\n /** @var CacheManager|\\PHPUnit_Framework_MockObject_MockObject $mockCacheManager */\n $mockCacheManager = $this->getMockBuilder(CacheManager::class)\n ->setMethods(['flushCachesInGroup'])\n ->getMock();\n $mockCacheManager->expects($this->once())->method('flushCachesInGroup')->with('system');\n ExtensionManagementUtilityAccessibleProxy::setCacheManager($mockCacheManager);\n ExtensionManagementUtility::removeCacheFiles();\n }", "title": "" }, { "docid": "d604a6a98472b532371ecff69b6df9e9", "score": "0.5383445", "text": "private function _cleanupOldFiles()\n {\n foreach (\\File::glob(static::storagePath() . '/' . $this->prefix . '_*') as $file)\n {\n \\File::delete($file);\n }\n }", "title": "" }, { "docid": "499882e8af9db726220483161f19aeaf", "score": "0.5383413", "text": "function cleanProfileFileCache() {\r\n foreach (['usm', 'csl'] as $apiType) {\r\n array_map('unlink', glob(PROFILE_CACHE_PATH.\"/$apiType/*\"));\r\n }\r\n\r\n return true;\r\n }", "title": "" }, { "docid": "5ecc546529f3617e6582ca848aab5010", "score": "0.53761095", "text": "public static function clear_expired_groups() {\r\n\t\t$maybe_clear_page_cache = false;\r\n\r\n\t\t$groups = Minify_Group::get_minify_groups();\r\n\t\tforeach ( $groups as $group ) {\r\n\t\t\t$instance = Minify_Group::get_instance_by_post_id( $group->ID );\r\n\t\t\tif ( ( $instance instanceof Minify_Group ) && $instance->is_expired() && $instance->file_id ) {\r\n\t\t\t\t$instance->delete_file();\r\n\t\t\t\twp_delete_post( $instance->file_id, true );\r\n\t\t\t\t$maybe_clear_page_cache = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( $maybe_clear_page_cache ) {\r\n\t\t\tself::maybe_clear_page_cache();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "71a0f0579ce34ec9858284c89ddddd39", "score": "0.5371698", "text": "public function clearCache() {\n if ($this->file->exists()) {\n $this->file->delete();\n }\n\n $this->needsWrite = true;\n }", "title": "" }, { "docid": "92193017bef0e4480d17adc5f9b85a77", "score": "0.5371675", "text": "public static function deleteCache($paths=array('')) {\n\t\tif(!is_array($paths)) $paths = array($paths);\n\t\tforeach($paths as $path) {\t\t\t\n\t\t\t$shell_path = escapeshellarg(rtrim(self::$cache_dir.$path, '/'));\n\t\t\tif(is_dir(self::$cache_dir.$path))\n\t\t\t\texec(\"rm $shell_path/*\");\n\t\t\telse if(is_file(self::$cache_dir.$path))\n\t\t\t\texec(\"rm $shell_path\");\n\t\t\telse\n\t\t\t\tself::error(\"deleteCache: file or directory does not exist: \".self::$cache_dir.$path);\n\t\t}\n\t}", "title": "" }, { "docid": "4604a52b401b8a37190aaabe9864c11a", "score": "0.5370118", "text": "abstract function purge($all);", "title": "" }, { "docid": "4979d0bc8ab04d74d50f635b4410c128", "score": "0.53685117", "text": "public function ClearCache() {\n\t\tif ($handle = opendir ( $this->CacheFolder )) {\n\t\t\twhile ( false !== ($file = readdir ( $handle )) ) {\n\t\t\t\tif ($file != \".\" && $file != \"..\")\n\t\t\t\t\tunlink ( $this->CacheFolder . $file );\n\t\t\t}\n\t\t\tclosedir ( $handle );\n\t\t}\n\t}", "title": "" }, { "docid": "387412f095c54ca4fb0a2ae1fab6ad7b", "score": "0.5354252", "text": "function purge($key);", "title": "" }, { "docid": "b6b7423ee2839fd1ec9c1f76b621f9e1", "score": "0.53476655", "text": "private function _cleanCaches(){\n\t\t//clear stash cache\n\t\t$stashFileSystem = new StashFileSystem(array('path' => STASH_PATH));\n\t\t$stash = new Stash($stashFileSystem);\n\n\t\t$toClean = array('album', 'band', 'storage', 'loan');\n\t\tforeach( $toClean as $t ){\n\t\t\t$stash->setupKey($t);\n\t\t\t$stash->clear();\n\n\t\t\tif( isset($_SESSION[$t.'s']) ) unset($_SESSION[$t.'s']['list']);\n\t\t}\n\t}", "title": "" }, { "docid": "c7a5b8701e6103e803ccb29d10c66a57", "score": "0.53450507", "text": "public function clearOldFiles()\n {\n if(Storage::disk('storage')->exists($this->getZipFilePath()))\n {\n Storage::disk('storage')->delete($this->getZipFilePath());\n }\n }", "title": "" }, { "docid": "a87d39083c5a06db1b5542c0242a032e", "score": "0.5344973", "text": "public static function cleanCacheFile($_f) {\n\t\tif (is_dir(ICALENDAR_CACHE_PATH.$_f)) {\n\t\t\tif (!rrmdir(ICALENDAR_CACHE_PATH.$_f)) {\n\t\t\t\tlog::add('iCalendar', 'info', '[iCalendarTools] cleanCacheFile(): ERROR: '.__('Echec lors de la suppression du répertoire', __FILE__) . ': '. $_f);\n\t\t\t} else {\n\t\t\t\tlog::add('iCalendar', 'info', '[iCalendarTools] cleanCacheFile(): '.__('Réperoire supprimé', __FILE__) . ': '. $_f);\n\t\t\t}\n\t\t} else {\n\t\t\tif (!unlink(ICALENDAR_CACHE_PATH.$_f)) {\n\t\t\t\tlog::add('iCalendar', 'info', '[iCalendarTools] cleanCacheFile(): ERROR: '.__('Echec lors de la suppression du fichier', __FILE__) . ': '. $_f);\n\t\t\t} else {\n\t\t\t\tlog::add('iCalendar', 'info', '[iCalendarTools] cleanCacheFile(): '.__('Fichier supprimé', __FILE__) . ': '. $_f);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "2851d765788e5977c2373182291d29b3", "score": "0.5342896", "text": "public function purgeAll() {\n if (!$this->enabled) {\n return;\n }\n\n if (!empty($this->errors)) {\n return;\n }\n\n try {\n $response = $this->processRequest(['purge_everything' => true]);\n\n if ($response === TRUE) {\n \\Drupal::logger('cf_purge')->notice('Purged everything from cache');\n }\n else {\n \\Drupal::logger('cf_purge')->error('Unable to purge everything from cache');\n }\n }\n catch (\\Exception $e) {\n \\Drupal::logger('cf_purge')->error('Unable to purge everything from cache');\n }\n }", "title": "" }, { "docid": "bd0fd5d501a41673cb65d4bcc4a15440", "score": "0.53362286", "text": "public function clear_filesize_cache() {\n\t\tdelete_transient( 'hmbkp_schedule_' . $this->get_id() . '_filesize' );\n\t}", "title": "" }, { "docid": "413d29bb127efcfd61bda4e449b1173c", "score": "0.5323872", "text": "public function clearCacheForReport ()\n {\n $path = $this->_fullCachePath;\n try\n {\n $fileDeleteDate = strtotime(\"-1 hour\");\n $files = [];\n\n // Get all files to delete\n if (false !== ($handle = @opendir($path)))\n {\n // Get rid of cache to ensure we have proper information on the\n // files we want to delete.\n clearstatcache();\n while (false !== ($file = readdir($handle)))\n {\n if ($file != \".\" && $file != \"..\")\n {\n // Only select the file if it is older than\n // $fileDeleteDate\n if (filemtime(\"$path/$file\") < $fileDeleteDate)\n {\n $files [] = \"$path/$file\";\n }\n }\n }\n closedir($handle);\n }\n\n // Delete all files that we found\n foreach ($files as $file)\n {\n @unlink($file);\n }\n }\n catch (Exception $e)\n {\n throw new Exception(\"Error while cleaning the cache for the report\");\n }\n\n return count($files);\n }", "title": "" }, { "docid": "c70df2bc24826da4443e794be67d20ea", "score": "0.5321984", "text": "private function deleteCachedFeed() {\n unlink(CACHE . CalendarCtrl::$feedFile);\n }", "title": "" }, { "docid": "4db732d96db27024649518e8884e2dd0", "score": "0.5315684", "text": "private function purge_wp_cache(){\n global $wp_object_cache;\n if( function_exists('wp_cache_delete') && method_exists($wp_object_cache,'delete') ){\n wp_cache_delete('plugins','loco');\n }\n }", "title": "" }, { "docid": "eb76d086ae361f07a860ad30b7458397", "score": "0.5315557", "text": "protected function _clearAPCCache()\n {\n if ( function_exists('clean_apc_with_prefix') )\n {\n $prefix = md5(JFactory::getApplication()->getCfg('secret')).'-cache-koowa';\n clean_apc_with_prefix($prefix);\n clean_apc_with_prefix('cache_system');\n clean_apc_with_prefix('cache__system');\n }\n }", "title": "" }, { "docid": "827cde95f101f128a42c7befbc49fbee", "score": "0.5314949", "text": "public static function purge()\n\t{\n\t\tLiteSpeed_Cache_API::purge( LiteSpeed_Cache_Tag::TYPE_ESI . 'yith-wcwl-add' ) ;\n\t}", "title": "" }, { "docid": "8e7c91d8181b6a71b95ec32c89b19822", "score": "0.5310959", "text": "function clearFiles() {\n\t\t$this->clearRequests();\n\t\t$this->clearBuilds();\n\t}", "title": "" }, { "docid": "101a0f8a7a3b6d35abbd00c2e0180e8f", "score": "0.53082955", "text": "public function purgeSpool(): void\n {\n if (is_dir($this->getSpoolDir())) {\n $filesystem = new Filesystem();\n $finder = $this->getSpooledEmails();\n\n /** @var File $file */\n foreach ($finder as $file) {\n $filesystem->remove($file->getRealPath());\n }\n }\n }", "title": "" }, { "docid": "0c3b526c104b9059ed6d54159787088d", "score": "0.52964544", "text": "public static function clear()\n {\n $dir = TMPPATH.'cache';\n if($dh = @opendir($dir)){\n while($obj = readdir($dh))\n {\n if($obj =='.' || $obj=='..')continue;\n unlink($dir.'/'.$obj);\n }\n }\n }", "title": "" }, { "docid": "923e86f459613bbcce2db4ee2efaf89c", "score": "0.528094", "text": "function WPVarnishPurgerPurgeObject($wpv_url) {\n do_action('WPVarnishPurger_purgeobject',$wpv_url,null); \n }", "title": "" }, { "docid": "d299c7e03f1b0bbd0b16c7d76895dd8c", "score": "0.5271579", "text": "function clear_cache() {\n $cache_dir = WPP_Path . 'cache/';\n if(file_exists($cache_dir)) {\n wpp_recursive_unlink($cache_dir);\n }\n return __('Cache was successfully cleared','wpp');\n }", "title": "" }, { "docid": "3fbff2fb84031441e682f6e42ee881c1", "score": "0.52602786", "text": "public function purge_cache() {\n\t\t$config = bestwebsite_Config::factory()->get();\n\n\t\t// Do nothing, caching is turned off.\n\t\tif ( empty( $config['enable_page_caching'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Do nothing if we are using the object cache.\n\t\tif ( ! empty( $config['advanced_mode'] ) && ! empty( $config['enable_in_memory_object_caching'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( bestwebsite_IS_NETWORK ) {\n\t\t\tbestwebsite_cache_flush( true );\n\t\t} else {\n\t\t\tbestwebsite_cache_flush();\n\t\t}\n\t}", "title": "" }, { "docid": "449ca4bd9d1ab5a42cb1039696d480a5", "score": "0.52435565", "text": "public function purge(): void {\n foreach ($_SESSION[self::SESSION_VAR] as $uri => $data) {\n if(isset($_SESSION[self::SESSION_VAR][$uri]['FILES'])) {\n foreach ($_SESSION[self::SESSION_VAR][$uri]['FILES'] as $f) {\n unlink($f['tmp_name']);\n }\n unset($_SESSION[self::SESSION_VAR][$uri]['FILES']);\n }\n if (empty($_SESSION[self::SESSION_VAR][$uri])) unset($_SESSION[self::SESSION_VAR][$uri]);\n }\n }", "title": "" }, { "docid": "a0abfe44a8135570385f05c036e381cb", "score": "0.5240452", "text": "public function clearGenerateFiles() {\n\t\t$files = glob($this->getFullTemporaryPath() . '/*');\n\t\tforeach($files as $file) {\n\t\t\tif(is_file($file)) {\n\t\t\t\tFileService::delete($file);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "2decb67c0338b912cb977ffceca061a6", "score": "0.5237396", "text": "public function removeTempFiles();", "title": "" }, { "docid": "affd5e7a39f29b885e03d409120e2ade", "score": "0.5233881", "text": "public function purgeCache($force = FALSE) {\n\n\t\tif(($path = $this->getCachePath($force))) {\n\t\t\tforeach(glob($path. '*') as $f) {\n\t\t\t\tif(!unlink($f)) {\n\t\t\t\t\tthrow new FilesystemFolderException(sprintf('Cache folder %s could not be purged!', $this->path . self::CACHE_PATH));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "ea08804ceef3197db766fa3b2e2bda7c", "score": "0.52199197", "text": "public static function clearCache()\n {\n self::$countries = null;\n }", "title": "" }, { "docid": "6cac2b93d6e85f50fa7ab7074b9a74eb", "score": "0.52126104", "text": "public function __destruct()\n {\n foreach(glob(__DIR__.'/cache/*.*') as $file){\n unlink($file);\n }\n @unlink(__DIR__.'/cache/.webassets.cacheinf');\n }", "title": "" }, { "docid": "a681e70c1daea362d8744350306a1632", "score": "0.5208779", "text": "protected function purge()\n {\n $this->memcached->flush();\n }", "title": "" }, { "docid": "a21aeff79f2e942bf64675afb222c117", "score": "0.52082396", "text": "function deleteFile() {\n\t\tglobal $wpdb, $ela_cache_root;\n\t\t$del_cache_path = $ela_cache_root . \"*.dat\";\n\t\tif ( ($filelist=glob($del_cache_path)) === false ) return false;\n\t\tforeach ($filelist as $filename) {\n\t\t\tif (!@unlink($filename)) return false;\t// delete it\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "6d193a1117abb7c55a86cbe8b013baef", "score": "0.5205698", "text": "function devshop_drush_process_cache_clear($alias) {\n\n // Clear all caches.\n if (drush_drupal_major_version(d()->root) == 8) {\n provision_process(\"drush {$alias} cache-rebuild\", NULL, dt('Clear all Caches'));\n }\n else {\n provision_process(\"drush {$alias} cache-clear all\", NULL, dt('Clear all Caches'));\n }\n}", "title": "" }, { "docid": "4d3330532ecd60cdb0ed7b12e0ef68cb", "score": "0.52043134", "text": "function flushcache($f, $debug=false) {\r\n\t\tif (!@unlink($f)) {\r\n\t\t\tif ($debug) {\r\n\t\t\t\tADOConnection::outp( \"flushcache: failed for $f\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "73314244718fc6f96a3f4ee367830203", "score": "0.0", "text": "public function handleUserAddPlayerToMatch(Request $request){\n \n if(auth()->user()->organizer==1){\n \n\n $playerMatch = new PlayerMatch;\n $playerMatch->organizerId = auth()->user()->id;\n $playerMatch->playerId= $request->input('playerId');\n $playerMatch->tournamentId = $request->input('tournamentId');\n $playerMatch->treeLevel =$request->input('treeLevel');\n $playerMatch->matchNumber=$request->input('matchNumber');\n $playerMatch->idOrganizer=auth()->user()->id;\n\n \n $playerMatch->save();\n return redirect('tournament/show');\n \n }\n else{\n return redirect('tournament');\n }\n}", "title": "" } ]
[ { "docid": "75600e5d65c2156987ff7cb140e14a4b", "score": "0.6621582", "text": "public function store() {\n $fileService = $this->getFileService();\n $filename = $this->getCacheDirectory() . $this->generateCacheablefilename();\n $fileService->saveFile($filename, $this->resource->getContent());\n }", "title": "" }, { "docid": "f1bd5867e87bbf56aefbfc6de8693786", "score": "0.66209733", "text": "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "title": "" }, { "docid": "0c03c39e441c2fe392d76d6370ae3ce2", "score": "0.65685713", "text": "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "title": "" }, { "docid": "0f8c1fe3e3b0c6572457ef33c35c6488", "score": "0.65095705", "text": "function storeAndNew() {\n $this->store();\n }", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.637569", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
b3e60fb14c1060b79aea096060e52184
Returns the static model of the specified AR class.
[ { "docid": "bd39d0ae0ef089ed0d3c49ca92ff5862", "score": "0.0", "text": "public static function model($className=__CLASS__)\n\t{\n\t\treturn parent::model($className);\n\t}", "title": "" } ]
[ { "docid": "627135ae253b7c59f1ff26a128d3a5d9", "score": "0.79820436", "text": "public function staticModel()\n {\n $modelClass = $this->getModelClass();\n return $modelClass::model();\n }", "title": "" }, { "docid": "5a7f805635f42dd01be9d117cb910bb5", "score": "0.74533117", "text": "public function getStaticModel()\n\t{\n\t\t$singular_model = str_singular($this->getControllerName());\n\t\treturn ($this->model) ? $this->model : $singular_model;\n\t}", "title": "" }, { "docid": "de8f8e3f52ad1b4fcfe9524c3acb99d7", "score": "0.71265703", "text": "public static function model($class=__class__){\n return parent::model($class);\n }", "title": "" }, { "docid": "de8f8e3f52ad1b4fcfe9524c3acb99d7", "score": "0.71265703", "text": "public static function model($class=__class__){\n return parent::model($class);\n }", "title": "" }, { "docid": "1aaeaa2ae4df9beb47e73797f1fef5f7", "score": "0.7102224", "text": "static public function model($className = __CLASS__)\n {\n return parent::model($className);\n }", "title": "" }, { "docid": "9816d7bf330a9e21d8b3599d73f2e74c", "score": "0.703232", "text": "public static function model($className=__CLASS__) { return parent::model($className); }", "title": "" }, { "docid": "9816d7bf330a9e21d8b3599d73f2e74c", "score": "0.703232", "text": "public static function model($className=__CLASS__) { return parent::model($className); }", "title": "" }, { "docid": "dcbec403d2e049d81725199ab37c97ba", "score": "0.7029715", "text": "public static function model($class = __CLASS__)\n\t{\n\t\treturn parent::model($class);\n\t}", "title": "" }, { "docid": "dcbec403d2e049d81725199ab37c97ba", "score": "0.7029715", "text": "public static function model($class = __CLASS__)\n\t{\n\t\treturn parent::model($class);\n\t}", "title": "" }, { "docid": "b2648ecb0f3f14967f39a88eb38a45ad", "score": "0.69966143", "text": "abstract public static function modelClass(): string;", "title": "" }, { "docid": "dcc94930c420b9cb71a1e5571ef57fba", "score": "0.6959026", "text": "static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "ed2f419ac31ca0239077f167b618e992", "score": "0.69285315", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "ed2f419ac31ca0239077f167b618e992", "score": "0.69285315", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "ed2f419ac31ca0239077f167b618e992", "score": "0.69285315", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "c378cfbf1054a3a303582e3b55b6cc59", "score": "0.69273007", "text": "private static function getModelInstance()\r\n {\r\n $obj = get_called_class();\r\n return new $obj;\r\n }", "title": "" }, { "docid": "b89513e64e5fcdd2618d48b9a2356e70", "score": "0.6902751", "text": "public static function model($className=__CLASS__)\n {\n return CActiveRecord::model($className);\n }", "title": "" }, { "docid": "6546adf8eef733a1d3ddb03561e229ad", "score": "0.6894916", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "14fb23887a36c60aaaf4599f4a3a9aaf", "score": "0.68900806", "text": "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "title": "" }, { "docid": "14fb23887a36c60aaaf4599f4a3a9aaf", "score": "0.68900806", "text": "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "title": "" }, { "docid": "14fb23887a36c60aaaf4599f4a3a9aaf", "score": "0.68900806", "text": "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "title": "" }, { "docid": "14fb23887a36c60aaaf4599f4a3a9aaf", "score": "0.68900806", "text": "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "41223b8bed747916950f588ced495542", "score": "0.0", "text": "public function store(Request $request)\n {\n $request->validate([\n 'name' => 'required|max:30'\n ]);\n\n $result = DB::table('product_categories')\n ->where('name', $request->input('name'))\n ->get();\n\n $res = json_decode($result, true);\n print_r($res);\n\n if (sizeof($res) == 0) {\n $data = $request->input();\n $category = new ProductCategory();\n $category->name = ucwords($data['name']);\n $category->slug = \\Str::slug($data['name']);\n $slugs = ProductCategory::whereRaw(\"slug RLIKE '^{$category->slug}(-[0-9]+)?$'\")->latest('id')->value('slug');\n if($slugs){\n $piece = explode('-', $slugs);\n $num = intval(end($piece));\n $category->slug .= '-' .($num + 1);\n }\n $category->save();\n\n return redirect()->back()->with('success', 'Category added successfully');\n }\n return redirect()->back()->with('error', 'Category Already Exists!');\n }", "title": "" } ]
[ { "docid": "70f839d67344487e3780c8ca780ec59c", "score": "0.78113544", "text": "public function store(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "df5c676a539300d5a45f989e772221a5", "score": "0.70093644", "text": "public function store()\n {\n return $this->storeResource();\n }", "title": "" }, { "docid": "56a1d1d00b789bcc32f6ce99932cc19b", "score": "0.65499157", "text": "public function store(Request $request)\n {\n //Validate request\n $this->validate($request, [\n 'name' => 'required|max:255|unique:resources',\n 'url' => 'required|max:255|unique:resources|active_url',\n 'description' => 'required|max:10000',\n 'tags.*' => 'exists:tags,id'\n ]);\n //Create the resource\n $newResourceData = [\n 'name' => $request->name,\n 'url' => $request->url,\n 'description' => $request->description,\n 'is_published' => Auth::user() && Auth::user()->isAdmin()\n ];\n if (Auth::user()){\n $resource = Auth::user()->resources()->create($newResourceData);\n }\n else{\n $resource = Resource::create($newResourceData);\n }\n //Add the tags for this resource to the pivot table\n $resource->tags()->attach($request->tags);\n $responseText = 'Resource created';\n $responseText .= Auth::user() && Auth::user()->isAdmin() ? ' and published!' : ' and awaiting review.';\n //Take them back to the resource form so they can add more resources\n return redirect('/resources/create')->with('success', $responseText);\n }", "title": "" }, { "docid": "d5deceebf787a137745e10078f88a17c", "score": "0.6420354", "text": "public function store(StorageRequest $request)\n {\n try {\n $this->service->addStorage($request);\n return $this->Created('Successfully added new storage');\n } catch (\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch (Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.637569", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
3ee20b2ba9b9ebc5cf3929b5ae6ec813
We're not using a style
[ { "docid": "43ac1d7921f306395eb002162d4efddc", "score": "0.65532386", "text": "function get_style_name($instance) {\n\t\treturn false;\n\t}", "title": "" } ]
[ { "docid": "4d236a6dd17d8b760adb9144e4fd1456", "score": "0.7364188", "text": "function hook_style() {\n\t\treturn null;\n\t}", "title": "" }, { "docid": "199d837e46cea34a8b7506bc43801845", "score": "0.6982293", "text": "static function _style_on() {\n\t\treturn self::style( true );\n\t}", "title": "" }, { "docid": "532a0217b1ea782c0642b8db1807f80d", "score": "0.69605726", "text": "public function style(){\n\t\treturn '';\n\t}", "title": "" }, { "docid": "226ef02d137a34f24c3a27da21403c22", "score": "0.6847375", "text": "function getStyle() {return $this->readstyle();}", "title": "" }, { "docid": "8ef91823d191865cb087ea1b8eedf2b4", "score": "0.676525", "text": "public function _replyToGetStyles() { return ''; }", "title": "" }, { "docid": "04019661e3a0ba51f6240595e146e7b6", "score": "0.67202187", "text": "public function loadStyle(){\n \t\treturn null;\n \t}", "title": "" }, { "docid": "40b488b020b9a4a7240406c7186f50a9", "score": "0.6586934", "text": "static function style( $style ) {\n\t\t$previous_style = self::$style;\n\t\tself::$style = (bool) $style;\n\t\treturn $previous_style;\n\t}", "title": "" }, { "docid": "0092049c67691463ae9688551c9b1a31", "score": "0.6485813", "text": "public function getStyle(): string\n {\n return 'display:none';\n }", "title": "" }, { "docid": "01b0d50af6e1204f4caaee544990e961", "score": "0.6402958", "text": "function _style_fix()\n {\n }", "title": "" }, { "docid": "7bc6adc6c6f97b4441a071e87095cf04", "score": "0.63886166", "text": "protected function getStyles() {\r\n\t\treturn \"\";\r\n\t}", "title": "" }, { "docid": "f5f925c836114d8e1b03c4991985a0dd", "score": "0.63173664", "text": "public function maybe_disable_style_notice() {\n\n\t\tif ( get_option( 'yourfitness_compile_all_styles' ) && yourfitness_tt_is_compiler_dev_mode() )\n\t\t\techo '<br /><span>' . esc_html__( 'Styles are not compiled in development mode.', 'your-fitness' ) . '</span>';\n\n\t}", "title": "" }, { "docid": "78d6cc64fa8815ffc3cb454d6ea82d0d", "score": "0.6245004", "text": "function getStyle()\n\t{\n\t\treturn $this->style;\n\t}", "title": "" }, { "docid": "d26419ac159d0d2fac9e20b9a44b36d8", "score": "0.61984605", "text": "public function getStyleMarkup(){ return $this->styles_markup; }", "title": "" }, { "docid": "1389496e01809359a344fd73157f4548", "score": "0.61743444", "text": "public function getStyle(){\n\t\treturn $this->style;\n\t}", "title": "" }, { "docid": "53e419fc65cd742b5028e7bc6d545402", "score": "0.6171279", "text": "public function style()\n {\n return $this->style;\n }", "title": "" }, { "docid": "c18e3ffb1ebb39eab92b3bb6fb9c8c6a", "score": "0.616513", "text": "function wp_style_is($handle, $status = 'enqueued')\n {\n }", "title": "" }, { "docid": "7242a407e4922590d87930c78d93b4ce", "score": "0.6103604", "text": "protected function get_block_type_style()\n {\n }", "title": "" }, { "docid": "7242a407e4922590d87930c78d93b4ce", "score": "0.6103604", "text": "protected function get_block_type_style()\n {\n }", "title": "" }, { "docid": "7242a407e4922590d87930c78d93b4ce", "score": "0.6103604", "text": "protected function get_block_type_style()\n {\n }", "title": "" }, { "docid": "7242a407e4922590d87930c78d93b4ce", "score": "0.6103604", "text": "protected function get_block_type_style()\n {\n }", "title": "" }, { "docid": "7242a407e4922590d87930c78d93b4ce", "score": "0.6103604", "text": "protected function get_block_type_style()\n {\n }", "title": "" }, { "docid": "7242a407e4922590d87930c78d93b4ce", "score": "0.6103604", "text": "protected function get_block_type_style()\n {\n }", "title": "" }, { "docid": "7242a407e4922590d87930c78d93b4ce", "score": "0.6103604", "text": "protected function get_block_type_style()\n {\n }", "title": "" }, { "docid": "7242a407e4922590d87930c78d93b4ce", "score": "0.6103604", "text": "protected function get_block_type_style()\n {\n }", "title": "" }, { "docid": "7242a407e4922590d87930c78d93b4ce", "score": "0.6103604", "text": "protected function get_block_type_style()\n {\n }", "title": "" }, { "docid": "7242a407e4922590d87930c78d93b4ce", "score": "0.6103604", "text": "protected function get_block_type_style()\n {\n }", "title": "" }, { "docid": "7242a407e4922590d87930c78d93b4ce", "score": "0.6103604", "text": "protected function get_block_type_style()\n {\n }", "title": "" }, { "docid": "7242a407e4922590d87930c78d93b4ce", "score": "0.6102431", "text": "protected function get_block_type_style()\n {\n }", "title": "" }, { "docid": "7242a407e4922590d87930c78d93b4ce", "score": "0.6102431", "text": "protected function get_block_type_style()\n {\n }", "title": "" }, { "docid": "7242a407e4922590d87930c78d93b4ce", "score": "0.6102431", "text": "protected function get_block_type_style()\n {\n }", "title": "" }, { "docid": "7242a407e4922590d87930c78d93b4ce", "score": "0.6102431", "text": "protected function get_block_type_style()\n {\n }", "title": "" }, { "docid": "7242a407e4922590d87930c78d93b4ce", "score": "0.6102431", "text": "protected function get_block_type_style()\n {\n }", "title": "" }, { "docid": "7242a407e4922590d87930c78d93b4ce", "score": "0.6102431", "text": "protected function get_block_type_style()\n {\n }", "title": "" }, { "docid": "7242a407e4922590d87930c78d93b4ce", "score": "0.6102431", "text": "protected function get_block_type_style()\n {\n }", "title": "" }, { "docid": "7242a407e4922590d87930c78d93b4ce", "score": "0.6102431", "text": "protected function get_block_type_style()\n {\n }", "title": "" }, { "docid": "7242a407e4922590d87930c78d93b4ce", "score": "0.6102431", "text": "protected function get_block_type_style()\n {\n }", "title": "" }, { "docid": "e2a4acc7779f9c34dfb47baf61851af6", "score": "0.609806", "text": "function getStyles () {\r\n }", "title": "" }, { "docid": "a716d388fec9025efe6b30465f602238", "score": "0.6058538", "text": "public static function getStyle ()\n {\n return self::$_style;\n }", "title": "" }, { "docid": "67ce8f31fe6d6fc2bd2cf6e55b82d139", "score": "0.6039806", "text": "public function builder_additional_styles() {}", "title": "" }, { "docid": "0801f92911784842e361f997f20f1c44", "score": "0.6035581", "text": "function get_style_name( $instance ) {\r\n\t\treturn 'default';\r\n\t}", "title": "" }, { "docid": "77a7c381c420d06083f9dda18f7329b6", "score": "0.59818345", "text": "public function admin_style()\n\t{\n\t\treturn '';\n\t}", "title": "" }, { "docid": "f7e935036a3d71db7bbfb69d2c70ebb0", "score": "0.5966421", "text": "function spr_section_exclude_style() {\n\techo\n\t\t'<style type=\"text/css\">\n\t\t\th2 { font-weight:bold }\n\t\t\t.spr_exclude_form { margin-top:2em; }\n\t\t\t.spr_exclude_form div { margin-top:2em }\n\t\t\t#page-spr_section_exclude .txp-list { width: auto;}\n\t\t</style>';\n}", "title": "" }, { "docid": "c444f6a2e74695e32041995e02c06067", "score": "0.5961383", "text": "function wp_deregister_style($handle)\n {\n }", "title": "" }, { "docid": "1145489aa6a79a4cde464fa23a5357e1", "score": "0.59387654", "text": "function pudla_customizer_style() {\n\techo '<style>\n\t\t.kirki-customizer-loading-wrapper {\n\t\t\tbackground-image: none !important;\n\t\t}\n\t\t</style>';\n}", "title": "" }, { "docid": "5342133c8ee1bba8ead6965b78e4f566", "score": "0.59377533", "text": "protected function getIEStyles() { return ''; }", "title": "" }, { "docid": "5342133c8ee1bba8ead6965b78e4f566", "score": "0.59377533", "text": "protected function getIEStyles() { return ''; }", "title": "" }, { "docid": "1f741242a185b27440b1ed28d81fd8aa", "score": "0.5934334", "text": "function wp_maybe_inline_styles()\n {\n }", "title": "" }, { "docid": "2e36e0d11dc84707f9255545183baf87", "score": "0.5932038", "text": "function print_late_styles()\n {\n }", "title": "" }, { "docid": "96f1c76085b6c7d200396d92a4d04647", "score": "0.5908559", "text": "public function getStyle() {\n return $this->style;\n }", "title": "" }, { "docid": "13e9c957bcb517abd9718cc7150b3673", "score": "0.5860396", "text": "public function recent_comments_style()\n {\n }", "title": "" }, { "docid": "8938959cdb9956587799cdc1eabbd73f", "score": "0.58575994", "text": "function register_style() {\n}", "title": "" }, { "docid": "e23710081037ed6d4591444c4c1a55c6", "score": "0.58459264", "text": "public function style(): ?string {\n\t\treturn $this->m_attributes[\"style\"];\n\t}", "title": "" }, { "docid": "c00bd40ed3acdd75c4dc32e1dcf46bc2", "score": "0.58292323", "text": "public function theme() {\n // Do nothing by default\n }", "title": "" }, { "docid": "4f8be89c4065ec6bf3fa1c920e82f273", "score": "0.5822278", "text": "function add_ordin_widget_style() {\n if( ! apply_filters( 'add_ordin_widget_style', true, $this->id_base ) )\n return;\n ?>\n <style type=\"text/css\">\n \n </style>\n <?php\n }", "title": "" }, { "docid": "6e2ba47f47b6fa4858fe7f3b20fcd0a9", "score": "0.58110166", "text": "public function getStyle() {\n\t\treturn $this->style;\n\t}", "title": "" }, { "docid": "bea54080564099ade4c0e446a3011ee0", "score": "0.5807803", "text": "public function remove_unwanted_css(){\n }", "title": "" }, { "docid": "817d6afc728b041fd2797b6bc104207c", "score": "0.57880366", "text": "function _print_styles()\n {\n }", "title": "" }, { "docid": "d324bace9610f339ceaf0f9f5aca670b", "score": "0.5736157", "text": "public function appendStyles()\n {\n return '';\n }", "title": "" }, { "docid": "ee23f8a885ac3021237571c69e65b023", "score": "0.5709206", "text": "function wp_filter_global_styles_post($data)\n {\n }", "title": "" }, { "docid": "bedbec9519badba42af8b07db0795c8d", "score": "0.57074684", "text": "public function getStyle() : ItemStyle;", "title": "" }, { "docid": "bc625d3ae4392b34ccea92705ff446ab", "score": "0.57026625", "text": "abstract public function register_style();", "title": "" }, { "docid": "8414dbdf3b70e7ed555f3719cb29338b", "score": "0.5697324", "text": "function get_broken_themes()\n {\n }", "title": "" }, { "docid": "31d2616569e195181d9b919c62fe7ef4", "score": "0.56841546", "text": "public function print_styles()\n {\n }", "title": "" }, { "docid": "f00be52ad34f0eaac4b19679f9750c3c", "score": "0.5677146", "text": "public static function style_set() {\n\t\t global $I2_USER;\n\t\t if (self::$style == NULL) {\n\t\t\t if (isset($I2_USER)) {\n\t\t\t\t\t self::$style = ($I2_USER->style);\n\t\t\t }\n\t\t\t else {\n\t\t\t\t\t self::$style = 'default';\n\t\t\t }\n\t\t\t d('Style set to '.self::$style,7);\n\t\t }\n\t }", "title": "" }, { "docid": "beab44b2d781b27b6f8190d301520de8", "score": "0.56737876", "text": "public function template_redirect__determineIfLoadingCustomCSS()\n\t\t{\n\n\t\t\t// We always load the UBC-Style comments sheet\n\t\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts__load_ssc_default_theme_css' ) );\n\n\t\t\t$hideCommentsOption = get_studiorum_option( 'side_comments_options', 'studiorum_side_comments_hide_standard_comments' );\n\n\t\t\tif( $hideCommentsOption && $hideCommentsOption == 'true' ){\n\t\t\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts__loadSideCommentsCSS' ) );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// We'll also add a filter, so other pluigins can determine if we're hiding the standard comments or not\n\t\t\t$hideCommentsFilter = apply_filters( 'studiorum_side_comments_hide_standard_comments', false );\n\n\t\t\tif( !$hideCommentsFilter ){\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts__loadSideCommentsCSS' ) );\n\n\t\t}", "title": "" }, { "docid": "21753b0ada8d3681776135273d2ecf5e", "score": "0.565811", "text": "public function _replyToGetInputIEStyles() { return ''; }", "title": "" }, { "docid": "b6f0fe61af6319124089ff6d0eba9e93", "score": "0.56388336", "text": "protected function get_block_type_editor_style()\n {\n }", "title": "" }, { "docid": "b6f0fe61af6319124089ff6d0eba9e93", "score": "0.56377953", "text": "protected function get_block_type_editor_style()\n {\n }", "title": "" }, { "docid": "eadeab7b669030a9c72abefafd86a50b", "score": "0.5634112", "text": "public function loadStyle(){\n \t\treturn null;\n \t\treturn \"css/{$this->widgetController}.css\";\n \t}", "title": "" }, { "docid": "caf884ef576ca52fbbb810e938c38e77", "score": "0.5623046", "text": "public function initStyle()\n {\n $this->value['id_tag'] = 'body'; // tag name\n $this->value['id_name'] = null; // tag - attribute name\n $this->value['id_id'] = null; // tag - attribute id\n $this->value['id_class'] = null; // tag - attribute class\n $this->value['id_lst'] = array('*'); // tag - list of legacy\n $this->value['mini-size'] = 1.; // specific size report for sup, sub\n $this->value['mini-decal'] = 0; // specific position report for sup, sub\n $this->value['font-family'] = 'Arial';\n $this->value['font-bold'] = false;\n $this->value['font-italic'] = false;\n $this->value['font-underline'] = false;\n $this->value['font-overline'] = false;\n $this->value['font-linethrough'] = false;\n $this->value['text-transform'] = 'none';\n $this->value['font-size'] = $this->convertToMM('10pt');\n $this->value['text-indent'] = 0;\n $this->value['text-align'] = 'left';\n $this->value['vertical-align'] = 'middle';\n $this->value['line-height'] = 'normal';\n\n $this->value['position'] = null;\n $this->value['x'] = null;\n $this->value['y'] = null;\n $this->value['width'] = 0;\n $this->value['height'] = 0;\n $this->value['top'] = null;\n $this->value['right'] = null;\n $this->value['bottom'] = null;\n $this->value['left'] = null;\n $this->value['float'] = null;\n $this->value['display'] = null;\n $this->value['rotate'] = null;\n $this->value['overflow'] = 'visible';\n\n $this->value['color'] = array(0, 0, 0);\n $this->value['background'] = array('color' => null, 'image' => null, 'position' => null, 'repeat' => null);\n $this->value['border'] = array();\n $this->value['padding'] = array();\n $this->value['margin'] = array();\n $this->value['margin-auto'] = false;\n\n $this->value['list-style-type'] = '';\n $this->value['list-style-image'] = '';\n\n $this->value['xc'] = null;\n $this->value['yc'] = null;\n }", "title": "" }, { "docid": "5190c83e6483a9808154139f8bf10193", "score": "0.5604715", "text": "function vb_is_view_style( $file ) {\n\t$data = get_file_data( $file, array(\n\t\t'name' => 'View Style'\n\t) );\n\n\t$style_name = trim( $data['name'] );\n\n\tif ( empty( $style_name ) )\n\t\treturn;\n\n\treturn $style_name;\n\n}", "title": "" }, { "docid": "aa71828de377580b60a085aed2b19dfe", "score": "0.5598504", "text": "public function has_withStyleNameThatDoesNotExistInStyles_returnsFalse ( )\n\t{\n\t\t$style = Mockery::mock ( Style::class );\n\t\t$style->name = 'inexistent style';\n\n\t\tassertThat ( $this->styles->has ( $style ), is ( identicalTo ( false ) ) );\n\t}", "title": "" }, { "docid": "d02b828157053beee5cacd42c9fe7ead", "score": "0.55959886", "text": "public function css();", "title": "" }, { "docid": "5371cc22a1142efb66c87bbf70b52cce", "score": "0.55951405", "text": "public function composer_additional_styles() {}", "title": "" }, { "docid": "05bd622890ce0a836461e1ce4f6f720a", "score": "0.5594856", "text": "public function customize_preview_loading_style()\n {\n }", "title": "" }, { "docid": "7a7e2aa30b3d055844bc6a17199c3d7b", "score": "0.55882084", "text": "function gogreen_add_body_style( $handle, $src ){\n if( function_exists('wyde_add_body_style' ) ){\n wyde_add_body_style( $handle, $src );\n } \n}", "title": "" }, { "docid": "e6b0e2f5f83922079626662ed0f3e934", "score": "0.5576746", "text": "function dequeue_parent_style()\n{\n wp_dequeue_style('tna-styles');\n wp_deregister_style('tna-styles');\n}", "title": "" }, { "docid": "4a3a352e9f7057a57d619aad139754ba", "score": "0.557476", "text": "static function nix_styles() {\n\t\t\n\t\t// get all styles data\n\t\tglobal $wp_styles;\n\n\t\t// create an array of stylesheet \"handles\" to allow to remain\n\t\t$styles_to_keep = array( 'bpthm' );\n\t\t\n\t\t// loop over all of the registered scripts\n\t\tforeach ( $wp_styles->registered as $handle => $data ) {\n\t\t\t\n\t\t\t// if we want to keep it, skip it\n\t\t\tif ( in_array( $handle, $styles_to_keep ) ) continue;\n\t\t\t\n\t\t\t\t// otherwise remove it\n\t\t\t\twp_deregister_style( $handle );\n\t\t\t\twp_dequeue_style( $handle );\n\t\t\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "37c83c52a436b428d895dacce5f8fab9", "score": "0.5573213", "text": "public function test_no_block_styles_for_viewing_without_theme_support() {\n\t\t// Confirm we are without theme support by default.\n\t\t$this->assertFalse( current_theme_supports( 'gc-block-styles' ) );\n\n\t\tgc_default_styles( $GLOBALS['gc_styles'] );\n\n\t\t$this->assertFalse( gc_style_is( 'gc-block-library-theme' ) );\n\t\tgc_enqueue_style( 'gc-block-library' );\n\t\t$this->assertFalse( gc_style_is( 'gc-block-library-theme' ) );\n\t}", "title": "" }, { "docid": "3f528803153d3876a1a43a1de909f04e", "score": "0.55693847", "text": "function ru_filter_styles(){\n $this->removestyle(\"bbp-default\");\n\n // download monitor is not used in the front-end.\n $this->removestyle(\"wp_dlmp_styles\");\n\n if( !is_singular( 'docs' ) ){\n // the table of contents plugin is being used on documentation pages only\n $this->removestyle(\"toc-screen\");\n }\n\n if ( !( is_page( 'account' ) || is_page( 'edit-profile' )) ){\n // this should not be like this. Need to look into it.\n $this->removestyle(\"wppb_stylesheet\");\n }\n\n if( !is_singular( array('docs', 'post' ) ) ){\n $this->removestyle(\"codebox\");\n }\n }", "title": "" }, { "docid": "7664801483cf427335841370d6d254d1", "score": "0.556367", "text": "private function renderEmptyMessage()\n {\n System::loadLanguageFile('tl_style_manager');\n return '<div class=\"no_styles tl_info\"><p>' . $GLOBALS['TL_LANG']['tl_style_manager']['noStylesDefined'] . '</p></div>';\n }", "title": "" }, { "docid": "e2cc3f18f3353b5b1dc5041da46b297f", "score": "0.55613786", "text": "function studiare_inline_style($value) {\n\techo studiare_get_inline_style($value);\n}", "title": "" }, { "docid": "cb3435a07207e6a6bb2dfff61a79e944", "score": "0.55585843", "text": "public function use_default_gallery_style_filter() {\n \treturn false;\n }", "title": "" }, { "docid": "e895460904896f78a2a464845537eb5d", "score": "0.5558087", "text": "public function getStyleID(){\n\t\treturn $this->style_id;\n\t}", "title": "" }, { "docid": "e64b540b662b90036abbdab79756b464", "score": "0.55547005", "text": "function GetStyle( $item )\r\n {\r\n return ( ( isset( $this->_style[$item] ) )?$this->_style[$item]:null );\r\n }", "title": "" }, { "docid": "693a5e6fbea18b3cbc26ba069b0ff9f3", "score": "0.5542789", "text": "function _setDefaults() {\n// \t\t$this->setCSS(\"border\",\"1px solid gray\");\n $this->setCSS(\"overflow\", \"hidden\");\n }", "title": "" }, { "docid": "85100c66450fedfebb374245f2ec60af", "score": "0.553778", "text": "public function disableConcatenateCss() {}", "title": "" }, { "docid": "9c9f4f6765fdc8c54681ec42d7a4b201", "score": "0.5537232", "text": "public function test_unnecessary_style_tags() {\n\n\t\t$expected = \"<link rel='stylesheet' id='handle-css' href='http://example.com?ver=1' type='text/css' media='all' />\\n\";\n\n\t\tgc_enqueue_style( 'handle', 'http://example.com', array(), 1 );\n\n\t\t$this->assertSame( $expected, get_echo( 'gc_print_styles' ) );\n\n\t}", "title": "" }, { "docid": "a54ef251b88187e47f1d6456a6d7fc9f", "score": "0.553434", "text": "protected static function remove_insecure_styles($input)\n {\n }", "title": "" }, { "docid": "364e4c29cff4507bcb0479b54c5f46e7", "score": "0.5531015", "text": "function _FixStyles()\r\n {\r\n $matches = array();\r\n preg_match('%<style[^>]*>(.*)</style>%is', $this->body['h'], $matches);\r\n\r\n if (isset($matches[1])) {\r\n $new_styles = str_replace(\"\\n.\", \"\\n .\", $matches[1]);\r\n $this->body['h'] = str_replace($matches[1], $new_styles, $this->body['h']);\r\n }\r\n }", "title": "" }, { "docid": "b55cf8966a4eb9dff16e71e7ee520bce", "score": "0.5530846", "text": "function tie_remove_recent_comments_style() {\n\tadd_filter( 'show_recent_comments_widget_style', '__return_false' );\n}", "title": "" }, { "docid": "44f3328562740044984726ac2aa8be29", "score": "0.55290264", "text": "function remove_word_styles() {\r\n\t\t$this->code = preg_replace('/<style[^<>]*?>(.*?)<\\/style>/is', '<style type=\"text/css\"></style>', $this->code);\r\n\t}", "title": "" }, { "docid": "54604e3c0be25b26373d907abab10492", "score": "0.5523679", "text": "function rocket_admin_print_styles() {\n\t_deprecated_function( __FUNCTION__, '2.11' );\n}", "title": "" }, { "docid": "8b22694027b9ee8d94ab3c7151d67f46", "score": "0.55154395", "text": "public function nyp_style() {\r\n\t\tif ( get_option( 'woocommerce_nyp_disable_css', 'no' ) !== 'yes' ) {\r\n\t\t\twp_enqueue_style( 'woocommerce-nyp', WC_Name_Your_Price()->plugin_url() . '/assets/css/name-your-price.css', false, WC_Name_Your_Price()->version );\r\n\t\t\twp_style_add_data( 'woocommerce-nyp', 'rtl', 'replace' );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "0ef861a434b0b97008cadcf5960fec6d", "score": "0.55036795", "text": "protected function charge_style() {\r\n\t\tforeach ( $this->style as $s ) {\r\n\t\t\techo \"<link rel='stylesheet' type='text/css' href='../VUE/Style/\" . $s . \".css'/>\";\r\n\t\t\techo (\"\\n\");\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "e115bb47eb58bca03a13b1a51bc87da6", "score": "0.5490385", "text": "function wpview_media_sandbox_styles()\n {\n }", "title": "" }, { "docid": "8fb1e2df1fb3500300955b44ad1fd48b", "score": "0.5484748", "text": "function dumpCSS()\r\n {\r\n if(($this->ControlState & csDesigning) == csDesigning)\r\n {\r\n echo \"border: thin dotted #C0C0C0;\\n\";\r\n }\r\n\r\n parent::dumpCSS();\r\n\r\n if ($this->Style==\"\")\r\n {\r\n // Adds the cursor to the style\r\n if ($this->_cursor != \"\")\r\n {\r\n echo parent::parseCSSCursor();\r\n }\r\n }\r\n\r\n }", "title": "" }, { "docid": "47123c4e3ea8d826149211b7e50aebb3", "score": "0.5477165", "text": "function wp_dequeue_style($handle)\n {\n }", "title": "" }, { "docid": "0d63c6d6757edeaa90ee8e988559d02c", "score": "0.5456412", "text": "function excStyles(){\n $styles = new converterMethod; \n echo nt_styles($styles->nt_Url_Style('netfree', false), false);\n echo nt_styles($styles->nt_Url_Style('movie-row', false), false);\n echo nt_styles($styles->nt_Url_Style('featuredmovie', false), false);\n echo nt_styles($styles->nt_Url_Style('header', false), false);\n echo nt_styles($styles->nt_Url_Style('footer', false), false);\n}", "title": "" }, { "docid": "d2afb608a0544ba8c9218011110d4197", "score": "0.5452619", "text": "public function print_styles( ) { ?>\n\t\t<style type=\"text/css\">\n\t\t.edit-php .actions select[name=\"m\"] {\n\t\t\tdisplay: none;\n\t\t}\n\t\t</style>\n\t<?php }", "title": "" } ]
fad7a62255e47cf503dfd2e702e268cd
Stems a word. Simple huh?
[ { "docid": "17a04ec1ea22d53e8b0a5dafc664e9f7", "score": "0.63974094", "text": "public static function Stem($word)\n {\n if (strlen($word) <= 2) {\n return $word;\n }\n\n $word = self::step1ab($word);\n $word = self::step1c($word);\n $word = self::step2($word);\n $word = self::step3($word);\n $word = self::step4($word);\n $word = self::step5($word);\n\n return $word;\n }", "title": "" } ]
[ { "docid": "0fa71f6a87b389025f807235dd7cedc6", "score": "0.6603388", "text": "private function stem($word)\n\t\t{\n\t\t\tif (function_exists('stemmer_stem_'.$this->langID)) \n\t\t\t{\n\t\t\t\treturn call_user_func('stemmer_stem_'.$this->langID, $word); \n\t\t\t} else { \n\t\t\t\treturn $word;\n\t\t\t} \n\t\t}", "title": "" }, { "docid": "239b8efaf09c1f4dad0c25874504377d", "score": "0.6559932", "text": "public function stem($word);", "title": "" }, { "docid": "c049e7ccbdf0adb9515b493ab0e6d7d8", "score": "0.632474", "text": "function getArticle(string $word) :string\n{\n return !in_array(strtolower($word[0]), ['a','e','i','o','u']) ? 'a' : 'an';\n}", "title": "" }, { "docid": "e9cd3b14d502694d46e828e7ea2976cd", "score": "0.62104553", "text": "public function MindEntity($word)\n\t\t{\n\t\t\t$this->name= (string)$word;\n\t\t}", "title": "" }, { "docid": "6b3cf9bbc546129d2b66e7fe59c9d958", "score": "0.60330147", "text": "public function singularize($word) {\n $result = strval($word);\n if (in_array(strtolower($result), $this->uncountableWords())) {\n return $result;\n } else {\n\t\t\t$singularRules = $this->singularRules();\n foreach($singularRules as $rule => $replacement) {\n if (preg_match($rule, $result)) {\n $result = preg_replace($rule, $replacement, $result);\n break;\n }\n }\n return $result;\n }\n }", "title": "" }, { "docid": "be23f7b379aa72b1b3a7ceb71c2f926c", "score": "0.6015496", "text": "public function wordify($word,$type=0){\n\t\tif($type==0) return htmlspecialchars(trim(ucwords(strtolower($word))));\n\t\tif($type==5) return htmlspecialchars(trim(ucwords(strtoupper($word))));\n\t\telse return htmlspecialchars(trim($word));\n\t}", "title": "" }, { "docid": "9b5b67cf63b66653256ed34069631a0e", "score": "0.5924371", "text": "public function stem($token);", "title": "" }, { "docid": "acefd2a0ff161ade893efb95e7d85717", "score": "0.58908874", "text": "public static function singularize($word){\n\t\treturn static::apply_inflections($word, static::inflections()->singulars);\n\t}", "title": "" }, { "docid": "61746e6e08494637e6a4b8df660d8d13", "score": "0.5886157", "text": "public static function stemWord($word) {\n require_once(EFC_WEBAPP_PATH.'_lib/extlib/Stemmer/class.PorterStemmer.php');\n return PorterStemmer::Stem($word);\n }", "title": "" }, { "docid": "f8d790495354f45088bf2ecc2188df86", "score": "0.58228976", "text": "static public function stem($word)\n\t{\n\t\t$s_v = '^([^aeiou][^aeiouy]*)?[aeiouy]';\n\t\t$mgr0 = $s_v . '[aeiou]*[^aeiou][^aeiouy]*';\n\t\t\n\t\t$s_v_regex = '#' . $s_v . '#';\n\t\t$mgr0_regex = '#' . $mgr0 . '#';\n\t\t$meq1_regex = '#' . $mgr0 . '([aeiouy][aeiou]*)?$#';\n\t\t$mgr1_regex = '#' . $mgr0 . '[aeiouy][aeiou]*[^aeiou][^aeiouy]*#';\n\t\t\n\t\t$word = fUTF8::ascii($word);\n\t\t$word = strtolower($word);\n\t\t\n\t\tif (strlen($word) < 3) {\n\t\t\treturn $word;\n\t\t}\n\t\t\n\t\tif ($word[0] == 'y') {\n\t\t\t$word = 'Y' . substr($word, 1);\n\t\t}\n\t\t\n\t\t// Step 1a\n\t\t$word = preg_replace('#^(.+?)(?:(ss|i)es|([^s])s)$#', '\\1\\2\\3', $word);\n\t\t\n\t\t// Step 1b\n\t\tif (preg_match('#^(.+?)eed$#', $word, $match)) {\n\t\t\tif (preg_match($mgr0_regex, $match[1])) {\n\t\t\t\t$word = substr($word, 0, -1);\n\t\t\t}\n\t\t\t\n\t\t} elseif (preg_match('#^(.+?)(ed|ing)$#', $word, $match)) {\n\t\t\tif (preg_match($s_v_regex, $match[1])) {\n\t\t\t\t$word = $match[1];\n\t\t\t\tif (preg_match('#(at|bl|iz)$#', $word)) {\n\t\t\t\t\t$word .= 'e';\n\t\t\t\t} elseif (preg_match('#([^aeiouylsz])\\1$#', $word)) {\n\t\t\t\t\t$word = substr($word, 0, -1);\n\t\t\t\t} elseif (preg_match('#^[^aeiou][^aeiouy]*[aeiouy][^aeiouwxy]$#', $word)) {\n\t\t\t\t\t$word .= 'e';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Step 1c\n\t\tif (substr($word, -1) == 'y') {\n\t\t\t$stem = substr($word, 0, -1);\n\t\t\tif (preg_match($s_v_regex, $stem)) {\n\t\t\t\t$word = $stem . 'i';\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Step 2\n\t\tif (preg_match('#^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$#', $word, $match)) {\n\t\t\tif (preg_match($mgr0_regex, $match[1])) {\n\t\t\t\t$word = $match[1] . strtr(\n\t\t\t\t\t$match[2],\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'ational' => 'ate', 'tional' => 'tion', 'enci' => 'ence',\n\t\t\t\t\t\t'anci' => 'ance', 'izer' => 'ize', 'bli' => 'ble',\n\t\t\t\t\t\t'alli' => 'al', 'entli' => 'ent', 'eli' => 'e',\n\t\t\t\t\t\t'ousli' => 'ous', 'ization' => 'ize', 'ation' => 'ate',\n\t\t\t\t\t\t'ator' => 'ate', 'alism' => 'al', 'iveness' => 'ive',\n\t\t\t\t\t\t'fulness' => 'ful', 'ousness' => 'ous', 'aliti' => 'al',\n\t\t\t\t\t\t'iviti' => 'ive', 'biliti' => 'ble', 'logi' => 'log'\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Step 3\n\t\tif (preg_match('#^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$#', $word, $match)) {\n\t\t\tif (preg_match($mgr0_regex, $match[1])) {\n\t\t\t\t$word = $match[1] . strtr(\n\t\t\t\t\t$match[2],\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'icate' => 'ic', 'ative' => '', 'alize' => 'al', 'iciti' => 'ic',\n\t\t\t\t\t\t'ical' => 'ic', 'ful' => '', 'ness' => ''\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Step 4\n\t\tif (preg_match('#^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize|(?<=[st])ion)$#', $word, $match) && preg_match($mgr1_regex, $match[1])) {\n\t\t\t$word = $match[1];\n\t\t}\n\t\t\n\t\t// Step 5\n\t\tif (substr($word, -1) == 'e') {\n\t\t\t$stem = substr($word, 0, -1);\n\t\t\tif (preg_match($mgr1_regex, $stem)) {\n\t\t\t\t$word = $stem;\n\t\t\t} elseif (preg_match($meq1_regex, $stem) && !preg_match('#^[^aeiou][^aeiouy]*[aeiouy][^aeiouwxy]$#', $stem)) {\n\t\t\t\t$word = $stem;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (preg_match('#ll$#', $word) && preg_match($mgr1_regex, $word)) {\n\t\t\t$word = substr($word, 0, -1);\n\t\t}\n\t\t\n\t\tif ($word[0] == 'Y') {\n\t\t\t$word = 'y' . substr($word, 1);\n\t\t}\n\t\t\n\t\treturn $word;\n\t}", "title": "" }, { "docid": "56cfdb9300e3d9e9ddbcabb0c6fde920", "score": "0.57830834", "text": "function checkword_small($text, $Bword) {\n\t//this is the typed statement\n\t$text = strtolower($text);\n\n\t//this helps to avoid some common workarounds\n\t$expressions = array (\n\t\t'@',\n\t\t'$',\n\t\t'3',\n\t\t'1',\n\t\t'7'\n\t);\n\t$replacements = array (\n\t\t'a',\n\t\t's',\n\t\t'e',\n\t\t'l',\n\t\t't'\n\t); //make sure these are lowercase\n\t$text = str_replace($expressions, $replacements, $text);\n\t//this gets the typed statement with spaces and punctuation removed\n\t$textcut = preg_replace('/[^a-z]/', '', $text);\n\n\tif (strpos($textcut, $Bword) === false) {\n\t\t//the word wasn't there at all\n\t\treturn false;\n\t} else {\n\t\t//get an array of all the words typed\n\t\t$textarr = preg_split('/ +/', $text);\n\t\t//this regex will check for a repeated last letter (eg assss)\n\t\t$regex = '/' . $Bword . '+/';\n\t\tforeach ($textarr as $word) {\n\t\t\t//we delete the entire matching phrase and see if that's the whole word\n\t\t\tif ($word == $Bword || preg_replace('/[^a-z]/', '', $word) == $Bword || preg_replace($regex, '', $text) == \"\") {\n\t\t\t\t//echo \"first<br>\";\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t}\n\t\t//NOTE: this is probably the most processor-intensive part\n\t\t//it's not a word by itself, has it been split? (eg \"a s s\")\n\t\t//NOTE: this approach will NOT pick up \"a ss\"\n\t\t$index = 0;\n\t\t$regex = \"/\";\n\t\t$length = strlen($Bword) - 1; //we skip the last character\n\t\twhile ($index < $length) {\n\t\t\t$regex .= $Bword[$index] . ' +';\n\t\t\t$index++;\n\t\t}\n\t\t$regex .= $Bword[$length] . '/'; //no regex after the last element\n\t\t//so at this point we should have something that looks like\n\t\t// '/a +s +s/'\n\t\tif (preg_match($regex, $text)) {\n\t\t\t//echo \"third<br>\";\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "140cb4355771b8309cac43970a5e5728", "score": "0.5769515", "text": "public function singular($word)\n {\n return $this->_inflect($word, 'singular');\n }", "title": "" }, { "docid": "89fdb89016345c2f28d025055561b418", "score": "0.57694334", "text": "function cleanWord($word)\n {\n $word = preg_replace('/^\\PL+|\\PL\\z/', '', $word);\n return $word;\n }", "title": "" }, { "docid": "87bd574cdb59398c6cd3b621506d5f08", "score": "0.576781", "text": "static public function singularize($word) {\n\t\treturn \\Mmitasch\\Flow4ember\\Utility\\EmberInflector::singularize($word);\n\t}", "title": "" }, { "docid": "e60fc003df584aefb282c916aa504294", "score": "0.57079417", "text": "public function Singular($word)\n {\n $lowercased_word = strtolower($word);\n foreach ($this->_uncountable as $_uncountable)\n {\n if(substr($lowercased_word,(-1*strlen($_uncountable))) == $_uncountable)\n {\n return $word;\n }\n }\n\n foreach ($this->_irregular as $_plural=> $_singular)\n {\n if (preg_match('/('.$_singular.')$/i', $word, $arr))\n {\n return preg_replace('/('.$_singular.')$/i', substr($arr[0],0,1).substr($_plural,1), $word);\n }\n }\n\n foreach ($this->_singular as $rule => $replacement)\n {\n if (preg_match($rule, $word))\n {\n return preg_replace($rule, $replacement, $word);\n }\n }\n\n return $word;\n }", "title": "" }, { "docid": "7566dbf53f869cc3f58e97dd12672c0a", "score": "0.57042223", "text": "public function suggest($word);", "title": "" }, { "docid": "7e321aa6d130c296ec9b137a54deed85", "score": "0.56539327", "text": "private function blockWord($word)\n {\n if ($this->strictClean) {\n return str_repeat($this->blocker[0], strlen($word));\n }\n\n return $this->blocker;\n }", "title": "" }, { "docid": "03106bcaf4244cac424b4a1da0874d55", "score": "0.5613463", "text": "function getSylalblesAndTonic($word);", "title": "" }, { "docid": "e9e6232ab692f9ea63d1f66e6e1dcd6f", "score": "0.5613021", "text": "private function cleanPassage(){\n\t\t\n\t\t//magic words to clean up passage.\n\t\t$this->passage = preg_replace('/[^a-z]+/i', ' ', $this->passage);\n\t\t\n\t}", "title": "" }, { "docid": "d56a563f51d14c245a996e3e1822a3d4", "score": "0.56090194", "text": "function getWord(){\n\t\treturn $this->word;\n\t}", "title": "" }, { "docid": "79353b6fd079b9554e9aa65b21393fa7", "score": "0.5607041", "text": "public function addWord(string $word);", "title": "" }, { "docid": "e5ad6779b45e8c717da3eb5af72793ed", "score": "0.5591194", "text": "public static function singularize(string $word) : string {\n\t\t$uninflected = '(?:'.join( '|', Inflector::$singular['uninflected']).')';\n\t\t$irregular = '(?:'.join( '|', array_keys(Inflector::$singular['irregular'])).')';\n\t\t\n\t\tif (preg_match('/(.*)\\\\b('.$irregular.')$/i', $word, $regs)) {\n\t\t\t$string = $regs[1].substr($word, 0, 1).substr($irregular[strtolower($regs[2])], 1);\n\t\t\treturn $string;\n\t\t}\n\n\t\tif (preg_match('/^('.$uninflected.')$/i', $word, $regs)) {\n\t\t\treturn $word;\n\t\t}\n\n\t\tforeach (Inflector::$singular['rules'] as $rule => $replacement) {\n\t\t\tif (preg_match($rule, $word)) {\n\t\t\t\treturn preg_replace($rule, $replacement, $word);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $word;\n\t}", "title": "" }, { "docid": "007617ac022a59863eb0894071f957c2", "score": "0.5586499", "text": "public function testLemmatizationUnknownWord() {\n $this->assertEquals(self::$lemmatizer->getLemmas('MacBooks', 'noun'), [new Lemma('MacBooks', 'noun')]);\n }", "title": "" }, { "docid": "5df34be7bca89b42b5191ae0abee2088", "score": "0.5581428", "text": "public function saySomething($word) {\r\n echo $word;\r\n }", "title": "" }, { "docid": "d5ff05c9f8b34498dfcb0879babab70d", "score": "0.5571341", "text": "public function stopword( string $word ) : void\n {\n\t\t$this->excluded_words[] = $word;\n }", "title": "" }, { "docid": "38407965abe93a3d14167b7c8c1b6337", "score": "0.55655396", "text": "public function munch(string $dirtyWord) : string {\n $trimmedWord = trim($dirtyWord, ' !@#$%^&*()\\'\"<>\\.,');\n return $trimmedWord;\n }", "title": "" }, { "docid": "919898940fdc42e93820708e8f9bb3b4", "score": "0.55636084", "text": "public function getWord(string $word)\n {\n if (isset($this->words[strtolower($word)])) {\n return new SpecialWord($word, $this->words[strtolower($word)][0], $this->words[strtolower($word)][1]);\n }\n\n return new Word($word);\n }", "title": "" }, { "docid": "2136346c04d041574a4afca689536b3b", "score": "0.55551594", "text": "public function stem($word)\n {\n $stem = null;\n\n if ($this->stemmer) {\n $method = $this->stemmer->pro_search_stem_method;\n $stem = $this->stemmer->$method($word);\n }\n\n return $stem;\n }", "title": "" }, { "docid": "bc4250a4a69f374b9d60c76011a1ff02", "score": "0.5534318", "text": "function setLettersGuessed( $word ) {\n $letters_guessed = $this->letters_guessed;\n $letters = str_split($word);\n if (empty($letters)) {\n return;\n } \n foreach ($letters as $num => $word_letter) {\n if (strpos($letters_guessed, $word_letter) === FALSE) {\n $this->letters_guessed .= $word_letter;\n }\n }\n return;\n }", "title": "" }, { "docid": "187fad436c42840763a5eccdfb98df65", "score": "0.5532799", "text": "function __construct($word)\n {\n $this->word = $this->normalize($word);\n }", "title": "" }, { "docid": "a086c6cfcce60644761527f8d67c4308", "score": "0.5501342", "text": "function prepareWord($word) {\r\n if (strlen($word) < 3) return false;\r\n // skip links\r\n// if (strpos($word, '://') !== false) return false;\r\n // transliterate word to ascii charset\r\n $word = iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $word);\r\n // remove all characters that are not letters or digits\r\n //$word = preg_replace('#[\\W_]#', '', $word);\r\n // user lowercase version of the word\r\n $word = strtolower($word);\r\n\r\n return $word;\r\n}", "title": "" }, { "docid": "3bd691ab9c6db2fc1f28a0ee6335cb5a", "score": "0.54926306", "text": "function getBrandName(string $noun) {\n $noun = strtolower($noun); \n if (substr($noun, 0, 1) === substr($noun, -1)) {\n $result = ucwords($noun . substr($noun, 1));\n } else {\n $result = 'The ' . ucwords($noun);\n }\n return $result;\n}", "title": "" }, { "docid": "4f3635a7de1c79ac2790b067c63274d7", "score": "0.5481662", "text": "function short_title($old_string,$limit_word){\n $string = strip_tags($old_string);\n\n if (strlen($string) > $limit_word) {\n\n // truncate string\n $stringCut = substr($string, 0, $limit_word);\n\n // make sure it ends in a word so assassinate doesn't become ass...\n $string = substr($stringCut, 0, strrpos($stringCut, ' ')).'...'; \n }\n return($string);\n}", "title": "" }, { "docid": "f4eeafadee12bb5194e797b437ea796a", "score": "0.5476735", "text": "function isWord() {\n if (!strlen(trim($this->value))) {\n return false;\n }\n if (preg_match('/^\\&[a-z0-9]+;$/i',trim($this->value))) {\n return false;\n }\n return preg_match('/[a-z]/i',$this->value);\n }", "title": "" }, { "docid": "8ca27fba42be8bdc6de90e879c855585", "score": "0.5461719", "text": "public function getWord()\n {\n return $this->word;\n }", "title": "" }, { "docid": "8ca27fba42be8bdc6de90e879c855585", "score": "0.5461719", "text": "public function getWord()\n {\n return $this->word;\n }", "title": "" }, { "docid": "f67462366e4829e0f2324777ebbe4b22", "score": "0.54456365", "text": "public function getWord(){\n\t\treturn $this->word;\n\t}", "title": "" }, { "docid": "bd67127f37da4bd8bb8e65169a5a04bf", "score": "0.5440086", "text": "function sanitize ($terms)\n {\n $ex = explode(\" \", $terms);\n \n //We match with stuff from our database\n \n foreach ($ex as $key):\n $st = humanize($key);\n if($st != \"The\" | \"A\" | \"Or\"):\n return $st;\n endif;\n endforeach;\n }", "title": "" }, { "docid": "b6c660d8296d284164c7d094d9522de8", "score": "0.5434373", "text": "function isDot($word)\r\n{\r\n\tif (preg_match('/[.]/', $word))\r\n\t{\r\n\t\t$temp_word = str_replace(\".\", \"\", $word);\r\n\t\t$temp_word = str_replace(\" \", \"\", $temp_word);\r\n\t\treturn $temp_word . \".\";\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn $word;\r\n\t}\r\n}", "title": "" }, { "docid": "bbe5a99a9875e646d1e08169fd2bb8cb", "score": "0.5419564", "text": "function _t($word){ //==> _(\"HELLO_WORLD\");\n\ttry{\t\n\t\t$word = strtolower($word);\n\t\t$contents = file(folder . '/' . language . '.po');\n\t\t$searchtxt = array_map('strtolower',$contents);\n\t\t$pos = array_flip(preg_grep('/' . $word . '/', $searchtxt));\n\t\tif ($pos !== false) {\n\t\t\treturn preg_replace('/\\n/','',preg_replace('/\"/','',preg_replace('/msgstr /','',$contents[array_shift($pos)+1])));\n\t\t} else {\n\t\t\treturn '';\t\t\n\t\t}\n\t} catch (Exception $e) {\n\t\treturn '';\n\t}\n}", "title": "" }, { "docid": "8ff97b821b874624beafdf004bc45847", "score": "0.54161453", "text": "function word($message = null)\n{\n static $wordCharMatcher = null;\n\n if ($wordCharMatcher === null) {\n $wordCharMatcher = new WordCharacterPredicate();\n }\n\n return new CharacterParser(\n $wordCharMatcher,\n $message ?: 'letter or digit expected');\n}", "title": "" }, { "docid": "040a113f53de150638a0fc64bb7b60d6", "score": "0.5410763", "text": "public static function singularize($word) {\n\t\t$lower = Strings::lower($word);\n\n\t\tif (self::isSingular($word))\n\t\t\treturn $word;\n\n\t\tif (!self::isCountable($word))\n\t\t\treturn $word;\n\n\t\tif (self::isIrregular($word))\n\t\t\tforeach (self::$irregular as $single => $plural)\n\t\t\t\tif ($lower == $plural)\n\t\t\t\t\treturn $single;\n\n\t\tforeach (self::$plurals as $rule => $replacement)\n\t\t\tif (preg_match($rule, $word))\n\t\t\t\treturn preg_replace($rule, $replacement, $word);\n\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "11005b2c80a5bf075f0743ee7acc1c12", "score": "0.5407315", "text": "private function generate_word() {\n\t//--\n\t$pool = (string) $this->pool;\n\t$len = (int) strlen($pool) - 1;\n\tif($len <= 0) {\n\t\t$len = 1;\n\t} //end if\n\t//--\n\t$str = '';\n\t//--\n\tfor($i = 0; $i<$this->chars; $i++) {\n\t\t$str .= substr($pool, Smart::random_number(0, (int)$len), 1);\n\t} //end for\n\t//--\n\treturn (string) $str;\n\t//--\n}", "title": "" }, { "docid": "5f38b0a0046fcccdd1cd370e74ce933b", "score": "0.54016966", "text": "function maleLitery ($small) {\n\n $nospace = str_replace(\" \",\"\", $small);\n\n if(in_array(('A'-'Z'), str_split($nospace))){\n $result = ucfirst(strtolower($nospace));\n }\n\n return $result;\n\n}", "title": "" }, { "docid": "5908f3771788efc176765fc2a15993bf", "score": "0.5392788", "text": "public function word( $firstUpper = false )\n {\n\t\t$symbolsCount = $this->fromToRand('word');\n\n $word = '';\n\n while ( strlen($word) < $symbolsCount )\n {\n $syllable = mt_rand(0, 1) ? $this->openSyllable() : $this->closedSyllable();\n $word .= $syllable;\n }\n\n if ( $firstUpper )\n {\n $characters = preg_split( '//u', $word, -1, PREG_SPLIT_NO_EMPTY );\n $characters[0] = mb_strtoupper($characters[0]);\n $word = implode($characters);\n }\n\n return $word;\n }", "title": "" }, { "docid": "9aaf1c2538fc3228a5bda64c86303925", "score": "0.5391292", "text": "public function firstLetter()\n {\n return $this->word[0];\n }", "title": "" }, { "docid": "e17f37b7ba404df569cf69945f336bf9", "score": "0.53818554", "text": "function filter($word)\r\n{\r\n $word = trim($word);\r\n $word = preg_replace('/[^A-Za-z0-9\\-]/','', $word);\r\n return strtolower($word);\r\n}", "title": "" }, { "docid": "15c61e4e9f51657acf222f0bf7f8febe", "score": "0.5373287", "text": "public function setWord($in_word){\n $this->my_word = $in_word;\n }", "title": "" }, { "docid": "83e74e89a986d34425bf85c07921759e", "score": "0.53623575", "text": "public static function singularize($word) {\n\t\tif (isset(static::$_singularized[$word])) {\n\t\t\treturn static::$_singularized[$word];\n\t\t}\n\t\tif (empty(static::$_singular['irregular'])) {\n\t\t\tstatic::$_singular['irregular'] = array_flip(static::$_plural['irregular']);\n\t\t}\n\t\textract(static::$_singular);\n\n\t\tif (!isset($regexUninflected) || !isset($regexIrregular)) {\n\t\t\t$regexUninflected = static::_enclose(join('|', $uninflected + static::$_uninflected));\n\t\t\t$regexIrregular = static::_enclose(join('|', array_keys($irregular)));\n\t\t\tstatic::$_singular += compact('regexUninflected', 'regexIrregular');\n\t\t}\n\t\tif (preg_match(\"/(.*)\\\\b({$regexIrregular})\\$/i\", $word, $regs)) {\n\t\t\t$singular = substr($word, 0, 1) . substr($irregular[strtolower($regs[2])], 1);\n\t\t\treturn static::$_singularized[$word] = $regs[1] . $singular;\n\t\t}\n\t\tif (preg_match('/^(' . $regexUninflected . ')$/i', $word, $regs)) {\n\t\t\treturn static::$_singularized[$word] = $word;\n\t\t}\n\t\tforeach ($rules as $rule => $replacement) {\n\t\t\tif (preg_match($rule, $word)) {\n\t\t\t\treturn static::$_singularized[$word] = preg_replace($rule, $replacement, $word);\n\t\t\t}\n\t\t}\n\t\treturn static::$_singularized[$word] = $word;\n\t}", "title": "" }, { "docid": "06dd55ca98544f7fb2af415fc9a7d1ab", "score": "0.5329937", "text": "function get_first_word($sentence)\n {\n $wordArr = explode(' ', $sentence);\n $first_word = trim($wordArr[0]);\n runDebug(__FILE__, __FUNCTION__, __LINE__, \"Sentence: $sentence. First word:$first_word\", 4);\n return $first_word;\n }", "title": "" }, { "docid": "8aef7455206b318a53a2e8f1824b6e93", "score": "0.5318826", "text": "public function setWord($word = null)\r\n {\r\n return $this->word = $word;\r\n }", "title": "" }, { "docid": "010e08621e4cdc046fe88c8328e8eaa1", "score": "0.5307312", "text": "public static function humanize($word) {\n\t\treturn ucfirst(strtolower(preg_replace(array('/_id$/', '/_/'), array('', ' '), $word)));\n\t}", "title": "" }, { "docid": "d3489a1722a6a1a2d767952524b394ac", "score": "0.5280976", "text": "public function filter($word = '')\n {\n // if the word ends with the lettter 'y'\n if (substr($word, -1) == 'y') {\n return substr($word, 0, strlen($word) - 1) . 'ies';\n }\n return \"{$word}s\";\n }", "title": "" }, { "docid": "f94714886793fabc81ffcec37aa0adcd", "score": "0.5270125", "text": "protected static function pluralise( $word )\n {\n $last_letter = substr($word, -1, 1);\n $second_last_letter = substr($word, -2, 1);\n \n switch($last_letter)\n {\n case 'f':\n $word = substr($word, 0, -1) . 'ves';\n break;\n case 'x':\n $word .= 'es';\n break;\n case 's':\n if( !self::consonant($second_last_letter) )\n $word .= 'es';\n break;\n default:\n $word .= 's';\n break;\n }\n \n return $word;\n }", "title": "" }, { "docid": "ece23de67635a9ca822cb169f5dd651d", "score": "0.5255158", "text": "function norm($input)\n{\n\treturn preg_replace(\"/([^\\w])/\", '', $input);\n}", "title": "" }, { "docid": "8e8c70527c2c9378891b9e0dfc563f3d", "score": "0.5254986", "text": "public static function words($phrase) {\n $phrase = preg_replace('/[\\s\\-_]/s', ' ', $phrase);\n $phrase = trim(preg_replace('/[A-Z]/', ' \\0', $phrase));\n\n return self::rmRepeatedWhitespace($phrase);\n }", "title": "" }, { "docid": "12771a55a49a545025ae325671275717", "score": "0.5252701", "text": "protected function _getWordString() {\n $str= '';\n foreach ($this->getWords() as $w) { \n if ($w{0} != '-') {\n $str.= ' AND '.$w;\n } else {\n $str.= ' NOT '.substr($w, 1);\n }\n }\n \n return substr ($str, 5);\n }", "title": "" }, { "docid": "a8ea419b26436b6a8b1fd2e1f5578a75", "score": "0.5237256", "text": "function __construct($word) {\n\t\t$this->word = $word;\n\t}", "title": "" }, { "docid": "f625af3bb42d4b4dd80fbff4d3650f59", "score": "0.52156985", "text": "function getWord ($parts) {\n \t\t$result = count($parts)-1;\n\t\t\t\t\t\n\t\t$x = mt_rand(0, $result);\n\t\t$y = mt_rand(0, $result);\n\t\t$z = mt_rand(0, $result);\n\n\t\t $oneSyl = $parts[$x];\n\t\t $twoSyl = $parts[$x].$parts[$y];\n\t\t $threeSyl = $parts[$x].$parts[$y].$parts[$z];\n\t\t\n\t\t//creating an array of 1,2,3 syllable words\n\t\t $newWord = array ($oneSyl, $twoSyl, $threeSyl);\n\t\n\t\t// getting a number from 0 to 2\t\n\t\t $randLength = mt_rand(0, 2);\n\t\n\t\techo $newWord[$randLength];\n\n \t\t}", "title": "" }, { "docid": "58c0de484607be3bebab76124224effd", "score": "0.52124894", "text": "public function readWord()\n { \n // move to the first non-whitespace character.\n if (($currentChar = $this->currentChar()) && is_string($currentChar)) {\n // determine if current character is whitespace.\n if ($isWhitespace = ctype_space($currentChar)) {\n // an internal mechanishm to mark a char.\n $markedChar = self::UNMARKED;\n do {\n // mark the current character.\n $markedChar = $this->nextChar;\n // read the next character.\n $currentChar = $this->readChar();\n // determine if next character is whitespace.\n $isWhitespace = ctype_space($currentChar);\n } while ($isWhitespace);\n\n // reset reader to marked char.\n $this->nextChar = $markedChar;\n }\n }\n \n $word = null;\n if ($this->hasCharsLeft()) { \n if (preg_match('#(.[^\\s]*)#', $this->content, $matches, 0, $this->nextChar)) {\n // get matched word.\n $word = $matches[1];\n // update char count.\n $this->nextChar += strlen($word);\n }\n }\n \n return $word;\n }", "title": "" }, { "docid": "4a31c627c4988637a7b07d3c40b137d2", "score": "0.52108186", "text": "function cleanWords($words){\n //r_print($words);\n //r_print(getAllStopWords());\n $stemmer = new Stemmer();\n\n $words = removeStopWords($words);\n $words = array_filter($words, \"notURL\");\n $words = array_filter($words, \"notHash\");\n $words = array_filter($words, \"notUsername\");\n\n foreach($words as $key => $word){\n $words[$key] = $stemmer->stem($word);\n }\n\n return $words;\n}", "title": "" }, { "docid": "7acd7a79be1383c8527584fa53a57cb9", "score": "0.52080023", "text": "function lookUpWord($word) {\n\t\t$url = \"http://api.pearson.com/v2/dictionaries/wordwise/entries?limit=100&headword=\" . rawurlencode($word);\n\t\t$ch = curl_init($url);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 4);\n\t\t$response = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\t$obj = json_decode($response, true); //true converts stdClass to associative array.\n\t\t$messyList = $obj['results'];\n\t\tif($messyList == null) {\n\t\t\terror_log(\"messy list null for word: $word\");\n\t\t\t$messyList = array();\n\t\t}\n\t\t$ans = array();\n\t\tforeach($messyList as $messy) {\n\t\t\tif(strpos($messy[\"headword\"], \" \") === false && strpos($messy[\"headword\"], \"-\") === false) { // no phrase definitions, only word. Allows for unconjugated form\n\t\t\t\t$senses = isset($messy[\"senses\"]) ? $messy[\"senses\"] : array();\n\t\t\t\tforeach($senses as $sense) {\n\t\t\t\t\t$def = array();\n\t\t\t\t\t$hw = strtolower($messy[\"headword\"]);\n\t\t\t\t\t\n\t\t\t\t\t$def[\"word\"] = $word;\n\t\t\t\t\t$def['def'] = isset($sense['definition']) ? $sense['definition'] : \"\";\n\t\t\t\t\t$def['pos'] = ($messy[\"part_of_speech\"] != null) ? $messy[\"part_of_speech\"] : \"\";\n\t\t\t\t\t$def['rw'] = '';\n\t\t\t\t\t\n\t\t\t\t\tif($hw == $word) {\n\t\t\t\t\t\t$ans[] = $def;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// has a separate root word. Definition and pos are now inaccurate and\n\t\t\t\t\t\t// should be user-defined relative to rw definition.\n\t\t\t\t\t\t$new = array();\n\t\t\t\t\t\t$new[\"word\"] = $word;\n\t\t\t\t\t\t$new['def'] = \"<TODO>\" . $def['def'];\n\t\t\t\t\t\t$new['pos'] = \"<TODO>\" . $def['pos'];\n\t\t\t\t\t\t$new['rw'] = $hw;\n\t\t\t\t\t\t$ans[] = $new;\n\t\t\t\t\t\t// also add the root word, in case it hasn't already been defined\n\t\t\t\t\t\t// deal with duplicates later\n\t\t\t\t\t\t$def = array();\n\t\t\t\t\t\t$def[\"word\"] = $hw;\n\t\t\t\t\t\t$def[\"def\"] = isset($sense['definition']) ? $sense['definition'] : \"\";\n\t\t\t\t\t\t$def['pos'] = ($messy[\"part_of_speech\"] != null) ? $messy[\"part_of_speech\"] : \"\";\n\t\t\t\t\t\t$def['rw'] = true; // signal that this is a root word\n\t\t\t\t\t\t$ans[] = $def;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $ans;\n\t}", "title": "" }, { "docid": "3551e3c5979301dc0338fcc13e049ff8", "score": "0.5204611", "text": "function handleSingleQuote($word, $pevent)\n {\n $this->checkEventPush( $word, $pevent);\n if ($this->checkEventPop($word,$pevent))\n {\n if ($this->p_vars['last_word'] != \"'\")\n {\n $this->p_vars['quote_data'] = $this->p_vars['last_word'];\n } else {\n $this->p_vars['quote_data'] = \"\";\n }\n }\n }", "title": "" }, { "docid": "721caaebef1fd18be1f747733dfbd7a4", "score": "0.520003", "text": "function deuxcode_shorten_str($string, $wordsreturned) {\r\n\t$array = explode(\" \", $string);\r\n\tarray_splice($array, $wordsreturned);\r\n\t$retval = implode(\" \", $array).\"...\";\r\n return $retval;\r\n}", "title": "" }, { "docid": "5ecb5eea6ca60c05ebc7fc0c32f3805b", "score": "0.5194458", "text": "public static function newsplus_short_by_word( $phrase, $max_words ) {\r\n\t\tif ( '' == $max_words ) {\r\n\t\t\t$max_words = 20;\r\n\t\t}\r\n\t\t$phrase_array = explode( ' ', $phrase );\r\n\t\tif ( count( $phrase_array ) > $max_words && $max_words > 0 ) {\r\n\t\t\t$phrase = implode( ' ', array_slice( $phrase_array, 0, $max_words ) ) . '&hellip;';\r\n\t\t}\r\n\t\treturn $phrase;\r\n\t}", "title": "" }, { "docid": "15080a421a947ce9b7264d7815ef5e5f", "score": "0.51864195", "text": "public function addWord($givenWord, $syllableWord): void;", "title": "" }, { "docid": "929b4d41c6ca73b5c49b86e1f7034af3", "score": "0.517671", "text": "public function run()\n {\n Word::truncate();\n\n $words = [ 'aalskakker', 'aambeienbeffer', 'aambeienlikker', 'aambeienschoffelaar', 'aambeihaarwasser', 'aansteller', 'aap', 'aapjesviller', 'aapmens', 'aaprikaan', 'aardappelhoer', 'aardappelluis', 'aardbanaan', 'aardgeest', 'aardpeer', 'aardpiraat', 'aardvarken', 'aardworm', 'aardworst', 'aars', 'aarsaap', 'aarsatleet', 'aarsbaard', 'aarsbaars', 'aarsbanaan', 'aarsbeer', 'aarsbeffer', 'aarselaar', 'aarsfreter', 'aarsgarnaal', 'aarshaar', 'aarshaarfohner', 'aarshaarknabbelaar', 'aarshaarluis', 'aarshaarverzamelaar', 'aarsketser', 'aarskind', 'aarsklodder', 'aarslander', 'aarslikker', 'aarslog', 'aarsneger', 'aarsridder', 'aarsmaad', 'aarsmade', 'aarsslijm', 'aarsvijand', 'aarsvis', 'aarsvocht', 'aarsworm', 'aartschurk', 'aarszweet', 'aasgier', 'abortuskind', 'absjaar', 'achterbakse', 'achterlader', 'achterlijke', 'achterlijk', 'achterpoter', 'achterbuurtfossiel', 'acrobaat', 'adderengebroedsels', 'addergebroed', 'afstammeling', 'afstoot', 'aftreksel', 'afvallige', 'afvalturk', 'afzakker', 'afzuigroodkappie', 'akadildosnoeper', 'akrobaat', 'albinoreetkever', 'allesneuker', 'alleseter', 'allochtoon', 'amateurklusser', 'amfitryon', 'amoebe', 'anaal', 'anakoloet', 'analfabeet', 'analist', 'anarchist', 'androchiem', 'ankerboer', 'anorexia', 'anthraciet', 'anus', 'anusacrobaat', 'anusastronout', 'anusbikker', 'anusbuisvergruiser', 'anuscoureur', 'anusgezwel', 'anusgezicht', 'anusgitaar', 'anusgezwel', 'anushaargrabbelaar', 'anushaarslingeraar', 'anushaarvreter', 'anushaarknabbelaar', 'anushoofd', 'anushopper', 'anuskanaalninja', 'anuskringspiermusketierdier', 'slingerpier', 'anuslikkendekontkever', 'anuslikker', 'anusontkalker', 'anuspapegaai', 'anuspenetreerder', 'anuspieper', 'anuspiloot', 'anuspiraat', 'anuspuntverknetteraar', 'anusreflector', 'anusridder', 'anussabbelaar', 'anussap-verzuring', 'anustoerist', 'anusuitscheiding', 'anusvreter', 'apache', 'apekloot', 'apekop', 'apekut', 'apegaper', 'apenbatser', 'apenflikkerneuker', 'apenhaar', 'apenrukker', 'apeneuker', 'apewaffel', 'appel', 'appelflap', 'appelzwijn', 'armoedversprijder', 'armoedzaaier', 'arrefakker', 'asbak', 'arrogant', 'asbestmuis', 'asfaltridder', 'asielzoeker', 'aso-big', 'asperge', 'asshole', 'augurk', 'augurkenneuker', 'augurkenturk', 'augurklul', 'autocraat', 'autodidact', 'autokraat', 'avocadoneuker', 'azteek', 'baanduivel', 'baardaap', 'baarmoeder', 'baarmoederscheefgepoept-kuttekind', 'baarmoederbuikwandschimmel', 'baarmoeder-discokip', 'baarmoederslijmvlieg', 'baarmoederwandschimmel', 'baarvader', 'babaloekoe', 'babbalipviskikker', 'baby', 'babypoedersnuiver', 'baccilledrager', 'badaap', 'badjufbeffer', 'badmuts', 'bafaap', 'baffer', 'bafferik', 'bafkoning', 'bafstaaf', 'baggerbult', 'baggeraap', 'baggeraar', 'baggerbeer', 'baggerboer', 'baggerhoer', 'baggerlip', 'baggerslet', 'bakhoer', 'baklap', 'bakslet', 'bakvis', 'bal', 'balgehakt', 'balgehaktmethaar', 'balhaar', 'baliekluiver', 'balkan-hork', 'ballebaars', 'ballekratser', 'ballenbatser', 'ballenbeuker', 'ballenhoofd', 'ballenlikker', 'ballenstamper', 'ballo', 'ballonnekenskop', 'balneuker', 'baloog', 'balzak', 'balzak vreter', 'bamboebal', 'bamboebuiger', 'bamibal', 'bamiboer', 'bamikanariewenkbrauw', 'banaan', 'banaanaapje', 'bananendief', 'banaanspuitslet', 'banaanspruitslet', 'banaliteit', 'bananenbeffer', 'bananenfretter', 'bananenhoofd', 'bananenschil', 'bananenzuiger', 'bandenlip', 'bandiet', 'bange bladluis', 'bangerd', 'bangerik', 'banjer', 'barbiebeffendekutaap', 'barbiekut', 'barbietrut', 'barebacker', 'basji-boezoek', 'basji-boezoek uit de karpaten', 'bassierassie', 'bastaardkind', 'batsslet', 'battyboy', 'baviaan', 'bavianenbeffer', 'bavianenkuthoofd', 'bavianenkop', 'bavianenneuker', 'bavianenrukker', 'baxter', 'baxtercentrum', 'beast', 'beddepisser', 'beeldenstormer', 'bengel', 'bengelende piemel pik', 'beer', 'beers', 'beerputworm', 'bef', 'bef16', 'befaap', 'befbanaan', 'befbek', 'befbeugel', 'befbever', 'beffende-berggeit', 'beffende schaamlip', 'befgaaius', 'befgeit', 'befkoe', 'beflap', 'beflapje', 'beflijster', 'beflulhanger', 'befhenk', 'befhoer', 'befkever', 'befkikker', 'befkoning', 'befman', 'befschaap', 'befslet', 'befslurper', 'befsmurf', 'befsnol', 'beftackle', 'beftekkel', 'befvlees', 'bejaardehoer', 'belgicist', 'belhamel', 'bekakteneuker', 'bekkenbeul', 'bekschurft', 'berber', 'bereden-politieagent', 'berenanus', 'berenneuker', 'berenlul', 'berggeitballer', 'berggeitneuker', 'bergkwabaal', 'bermslet', 'beroepskoe', 'beroepswww\\'er', 'beschetendakvenster', 'beschimmeldefriekandel', 'beschimmeldepaardenlul', 'beschuitlul', 'besmettelijke tongblaar', 'bete rweter vrete', 'betonrot', 'beul', 'beulemanser', 'beunhaas', 'beverbeffer', 'bezem', 'bezopen kokosmakroon', 'bidonviller', 'bierbeul', 'bietjesbakker', 'big', 'bigbaffer', 'bigbeffer', 'biggebilbeffer', 'biggebraaksel', 'biggelikker', 'biggenbilbeffer', 'biggenbraaksel', 'biggenneuker', 'biggy-wiggy', 'behaardekloteapenanus', 'behaardekutapenanus', 'behaarde ADHD trekkende kut', 'biggenviool', 'biggenwipper', 'bijbal-eter', 'bijbal-bijter', 'bijbalontsteking', 'bijgoochem', 'bijprodukt', 'bikkel', 'bilbeuker', 'bilcrosser', 'bilkrokodil', 'billekip', 'billepik', 'billenbatser', 'billenbeffer', 'billenrijder', 'billiefretter', 'billpijper', 'bilnaadbeklimmer', 'bilnaadfanaat', 'bilnaadkamaraad', 'bilnaadkandidaat', 'bilnaadpiraat', 'bilnaadskier', 'bilracer', 'bilridder', 'bilspiermusketier', 'bilspleetatleet', 'bilspleetoprekker', 'bilspeetragger', 'bilspeetsamoerai', 'bimbo', 'bipsbaviaan', 'bipsdipper', 'bipsvingeraar', 'bisexuelenecrofiel', 'bitch', 'bitchkomkommer', 'blaag', 'blaaskaak', 'bladharker', 'bladluis', 'blafaap', 'blafbal', 'blaftering', 'blalo-lijer', 'blauwe', 'blauwbaard', 'bleekscheet', 'bleetscheet', 'blikkenhater', 'blob', 'bloedbak', 'bloeddrop', 'bloedhoer', 'bloedhond', 'bloedkop', 'bloedkut', 'bloedpoepende indianenhoer', 'bloedpoeper', 'bloedzuiger', 'bloempje', 'bloempot', 'bloesjesman', 'blondje', 'blondeaarshaarvlechter', 'blondehoer', 'blotekloteloper', 'blotekontengezicht', 'blubberkut', 'bluestar', 'blufhufter', 'blubzak', 'blurb', 'bobbelkont', 'bobbelkut', 'bobbelnazi', 'bobbelnek', 'bochel', 'boef', 'boelahoepa', 'boemelebassen', 'boenjoel', 'boekenworm', 'boekenwurm', 'boeler', 'boelkind', 'boer', 'boeregabber', 'boeren-appeltaart', 'boerenhoofd', 'boerenkut', 'boerenlul', 'boerenpuistenknijper', 'boerenpummel', 'boerentriene', 'boerenworst', 'bokkeketser', 'bokkekut', 'bokkel', 'bokkenlul', 'bokkepenis', 'bokkepok', 'bokkerbeffer', 'bokko', 'bolleke petvet', 'bolletjepretvet', 'bollusdraaier', 'boominfanterist', 'boomkutreetkever', 'boomschatter', 'bombardeerkever', 'bonkstreuf', 'bonzai kutje', 'bosaap', 'bosbeffer', 'bosbes', 'bosbonker', 'bosjesneger', 'boskut', 'boskameel', 'boskoe', 'bosmongool', 'bosneger', 'bosprotter', 'bosuil', 'boterham', 'boterlul', 'bouwdoos', 'braakhut', 'bralaap', 'brandnetel', 'breedbekzoeloe', 'breezerslet', 'breibitch', 'breuker', 'brilleflikker', 'brilsmoel', 'brinkie-aap', 'brintanicht', 'broccoliehoofd', 'broccoliekop', 'broekkakker', 'brogem', 'brontosaurus', 'broodje', 'broodmongool', 'broodzak', 'brubbelkut', 'brugkut', 'brugpieper', 'bruidsuikertemeijer', 'bruinduiker', 'bruinekruisruiker', 'bruinridder', 'bruinwerker', 'bruisend', 'brulaap', 'brulboei', 'brulkip', 'bruut', 'bse-drager', 'buffelbutser', 'buffelleuter', 'buitenlander', 'bukeend', 'bulexmule', 'bulldozer', 'bullebak', 'bult', 'bultezel', 'bultrug', 'bultrugkonijn', 'bunkerhoer', 'bunzig', 'bushalt-hoertje', 'butt', 'buttfucker', 'camperhoer', 'campesneurdo', 'campinghoer', 'campingreed', 'campingslet', 'campusnerd', 'camslet', 'carnavals-inca', 'carnavalskaper', 'carnavals-mussolini', 'capsoneslijer', 'capsonestrut', 'caveman', 'centernschraper', 'centromeerloze chromatiet', 'cocosmattevreter', 'champignonkoppeke', 'chatnicht', 'choco', 'chocobakbeest', 'chocodipper', 'chocohoer', 'chocolademoes', 'chocoladeridder', 'chocolademouse', 'chocoladesjofel', 'chokoladeridder', 'chocopotjesdipper', 'chocopotjeslikker', 'chocoprins', 'cholerabacterie', 'choleravlinder', 'clipse', 'cliteter', 'clausjanis', 'clubkut', 'cobra', 'cobrakut', 'cocksucker', 'coloradokever', 'communicatiestoornis', 'completaan', 'computerteletubie', 'condoom', 'condoomcoureur', 'coolzaeter', 'cousum', 'crackhoer', 'currieknijper', 'curry kop', 'cut', 'cutekak', 'cutkruiper', 'cuvry', 'cyanide', 'cyberhoer', 'cyberslet', 'cybersnol', 'cycloon', 'cyclotron', 'cyrano', 'daaglaker', 'dagblinde', 'dakduif', 'dakhaas', 'dameskapper', 'damhoer', 'darmafval', 'darmcoureur', 'darmflora flikker', 'darmfloraflirter', 'darmgas-wildebras', 'darmkikker', 'darmneuker', 'darmstad', 'darmtoerist', 'dashond', 'debiel', 'deegsliert', 'deis', 'dekbedovertrekker', 'dekdoos', 'dekhengst', 'dekslet', 'dekzwabber', 'delege', 'dendorfiel', 'deprikut', 'diarreegorgelaar', 'diareedrol', 'diareekop', 'diareedruppel', 'dierofiel', 'dijkhoer', 'dikbeer', 'dikhoofd', 'dikkedrek', 'dikkepad', 'dildoeend', 'dildohapper', 'Dildo kip', 'dikkekop', 'diktong', 'dikkiedik', 'dikkop', 'dikzak', 'dildo', 'dildodel', 'dildotrekker', 'diplodocus', 'dipstick', 'dismonetarier', 'dixiuitzuiger', 'dobby', 'dodo', 'doe-het-zelf-hoer', 'doedelzak', 'dombo', 'dominante SM-teef', 'dommerat', 'domoor', 'doodgestampte-rat', 'doodrijder', 'doodvlees', 'doolhofschijter', 'doorgelekteprikker', 'doos', 'dopoog', 'drakenbaby', 'drempelkut', 'drankkar', 'drankorgel', 'dreugkleut', 'driedubbeldoorgedraaide-kontenneuker', 'driedubbel-uitdepotgerukte-kutpedofiel', 'drilboorpastoor', 'droeftoeter', 'droge visjes eter', 'drol', 'drolduiker', 'drollebak', 'drolleman', 'drollendeuker', 'drolleneuker', 'drollendouwer', 'drollenjanus', 'drollenpijper', 'drollendraaier', 'drolletjedrie', 'dromedarisruftverzamelaar', 'dronkelap', 'drooggepomptevogelneuker', 'droogkloot', 'dropjojo', 'dropkut', 'droplul', 'dropwater', 'druifluis', 'druiloor', 'druipende penis', 'druiper', 'druipscheet', 'drullik', 'dubbeldoorgehaalde neukfout', 'duckfucker', 'duikbootcommissaris', 'duif', 'duinbewoner', 'duizendpoot', 'duyvejonck', 'dundas', 'dwaas', 'dwarrel', 'dweil', 'dwergpapegaai', 'ectoplasma', 'ectoplastisch bijprodukt', 'edeldarm', 'endeldarmkannonier', 'endeldarmtouroperator', 'edammer', 'eekhoornneuker', 'eeltneus', 'eend', 'eendeneikel', 'eendekweker', 'eerstekamer nerd', 'éénoog', 'egocentrischebullebak', 'egoistischekrentenkakker', 'egoist', 'eiermix-imitatie', 'eierzak', 'eikel', 'eikelbijter', 'eikelkluiver', 'eikellikker', 'eikelschijf', 'eikelspleet', 'eikeltumor', 'eikenhoutekoeienkut', 'ellendelaar', 'ellendeling', 'emmer', 'emmerkut', 'endeldarm', 'endeldarmbeklimmer', 'endeldarmexploitant', 'endeldarmkruiper', 'endeldarmoprekker', 'endeldarmschoffelaar', 'endeldarmtoerist', 'eppo', 'ersatzmatroos', 'espressonicht', 'etalagesloerie', 'etterbak', 'everzwijnenpoeper', 'exeempikkie', 'ezel', 'ezelskop', 'ezelskut', 'ezelslul', 'ezelsoor', 'facadeklasher', 'falliete tiet', 'familycocktail', 'farmer', 'fatsich', 'fatsige spekhond', 'fietsbeldief', 'fietsendief zonder herssens', 'fietspompenlullegezicht', 'fileklever', 'flamingo', 'flapdrol', 'flapkut', 'flappie', 'flapscooter', 'flathoer', 'flatslet', 'flauwerd', 'flemmietok', 'flerkie', 'flikker', 'flipperkastflikker', 'flippoot', 'fibo', 'fish fucker', 'flitspoeper', 'flubberkut', 'flubberkutje', 'fluitketel', 'flutkut', 'floepeend', 'floeptiet', 'floskop', 'flowhoofd', 'fluotrut', 'foetus', 'folteraar', 'fout', 'foutje', 'franskiljon', 'fratsekop', 'freak', 'friemel', 'friemelhoofd', 'frikandel', 'frisbie', 'foor-aap', 'fucker', 'fuckface', 'fuck you', 'fuckingkutkop', 'fucionfucker', 'fuffizeeers', 'fluimekop', 'gabber', 'gadoodengeefmijbrood', 'gajeskop', 'galbak', 'galgenaas', 'galgengebroed', 'galkankerdebiel', 'galsmoel', 'gambaslet', 'gamefreak', 'gangster', 'ganzeboard', 'garnaal', 'gatbatser', 'gatlarf', 'gatbal', 'gatgarnaal', 'gatracer', 'gatridder', 'gatspier musketier', 'gatzitter', 'gebakje', 'gebalde balbabber', 'gebalde kwelkwabber', 'gebefte anuskanibaal', 'geblondeerde strontbosaap', 'geblondeerde kuthoer', 'gebochelte', 'gebrandefrikandel', 'gebreide teletubbie rietje', 'gecastreerde gorilla in de mist', 'gedrogt', 'geek', 'geflambeerde boomschorsbeffer', 'geflambeerde landrot', 'geflipte pingvogel', 'gehaktbal', 'geile aap', 'geit', 'geitebeffer', 'geitegewei', 'geitegezicht', 'geitekut', 'geitelul', 'geitepijper', 'geitenbaffer', 'geitenbeffer', 'geitenbek', 'geitenbreier', 'geitendekker', 'geitenhoer', 'geitennakker', 'geitenneuker', 'geitenwipper', 'geit-op-skies', 'gek', 'gele vla pissebed', 'gelukte abortus', 'genetische fout', 'geperforeerd geufdier', 'gepekop', 'gepijpte tepelhaarlikker', 'gepoepte-baarmoederschimmel', 'geschorenbefpoedel', 'geschuurdecondoom- kutkind', 'gespierde handdoek', 'gespierde spijker', 'gespuis', 'gezaaide bloembolknop', 'gier', 'gierkut', 'gierputsnuiver', 'gillendezweinendrol', 'gladiool', 'gladjakker', 'gladjanus', 'gleufdier', 'gleufdierschaamlipspier', 'gleufdoos', 'gleufgeiler', 'gleufgladiool', 'gleufjesruuker', 'gleufridder', 'glibberkut', 'gluipdeken', 'gnoe', 'goddeloze', 'godver', 'goedkope circushoer', 'goof', 'gootsteenneuker', 'gordijnenkut', 'gore marmot', 'gorgeldrank', 'graaikraai', 'grafbak', 'grafhengst', 'grafhoer', 'grafjanhomokankerfiel', 'grafkop', 'grafkut', 'graflul', 'grafmongool', 'grafpegel', 'graftak', 'graftiefusdebiel', 'grafzerk', 'granolsnol', 'graskaffer', 'grasmat', 'graszuiger', 'granenkut', 'gratekut', 'gratenkut', 'gratenpakhuis', 'greppelbeffer', 'greppeldel', 'greppelheks', 'greppelhoer', 'greppelslet', 'greppelsletten', 'grepelteef', 'griezel', 'grindtegel', 'groeiknuppel', 'groningsebijstandshoer', 'grotjeskicker', 'gulpenruiker', 'gulpenrukker', 'gulpensnuiver', 'gummie', 'gva-lezer', 'gyroscoop', 'haagse wim', 'haaibaai', 'haas', 'hakker', 'halfuitgekakte kwallendrol', 'halvegare', 'halve maan-rover', 'halve tamme', 'halvezool', 'hammehapper', 'hamerhomo', 'hamsteraar', 'hamsterpamper', 'hamsterpijper', 'hanenwipper', 'handelaar in 2hands vogelmest', 'handvat', 'hangbuikvarkenkonteneuker', 'hangbuikzwijn', 'hangjas', 'hanglaaf', 'hangoor', 'hangtietzeug', 'hangzakschaap', 'hansworst', 'hapschaar', 'hark', 'haringvulva', 'harlekijn', 'harrie', 'harslijer', 'hatseflats', 'hazenbroek', 'hazentand', 'hazenwinkel', 'heaumeaux', 'heggeneuker', 'heggewipper', 'heidene', 'heikneuter', 'hemahoer', 'hemelpiloot', 'hemelpiraat', 'henkjansmit', 'hermafrodiet', 'heroinehoerenkankerkind', 'herre', 'hersenloze', 'hersenschim', 'hertensnikkel', 'hielenlikker', 'hieper-kinetische plasbek', 'hipper-kinetische-hondendrol', 'hippie', 'hippy', 'hindoeridder', 'hinnepoeper', 'hitsige aap', 'hittepetit', 'hobbyhoer', 'hoer', 'hoerebok', 'hoerejong', 'hoerenjong', 'hoerenkots', 'hoerenkut', 'hoerenloper', 'hoerenzoon', 'hoerenzwam', 'hoerepoeper', 'hoerezak', 'hoerperser', 'hoerslijper', 'holbewoner', 'holjokker', 'holmaat', 'holstrontverklonteraar', 'holstrontverklontering', 'holtor', 'holtorneuker', 'homo', 'homofiel', 'homofielebewaker', 'homofielebroodpoot', 'homogenetische – kameleon', 'homojager', 'homohoer', 'homokut', 'homolesbieseflikker', 'homonaaier', 'homopatische-genotsflikker', 'homofiele varkensboer', 'homo sapiën', 'horzel', 'hond', 'hondekut', 'hondelul', 'hondenfacker', 'hondenkrikker', 'hondenneuker', 'hondenpoependelul', 'hondenwipper', 'hondenzak', 'hondestront', 'hondneukende paardenlul', 'hondsbolheid', 'hondsvod', 'hornox', 'houtworm', 'huisaan huisslet', 'huiself', 'huisjesmelker', 'hufter', 'humushond', 'hunky dunky', 'huppelende kamelenkut', 'huppelde kuttemefrutteslut', 'huppelkut', 'huppelkutje', 'huppelkutter', 'huppelmuts', 'huppelmutsje', 'huppeltrut', 'hupperkutter', 'hupsel', 'hurksnol', 'hutkoffer op wielen', 'huurdoos', 'huurling', 'hypocriet', 'hyperkinetische hondendrol', 'hyperkinetische plasbek', 'ibbeltje', 'idikut', 'idioot', 'ijskoningin', 'ijslul', 'imbiciel', 'impotente lul', 'impotentietor', 'inboorling', 'indianus', 'indoending', 'infantiel', 'ingeblikte atlas', 'ingeblikte knakworst', 'ingeblikte moeraskikker', 'ingeblikte pinguinscheet', 'ingedeukte vetrol', 'ingegroeidekonthaar', 'ingeblikte kamerscheet', 'ingevroren visstick', 'infanterist', 'inktfis', 'inktlul', 'inktviskut', 'insekt', 'internetslet', 'internetverslaafde-neuker', 'invertebraat', 'Jaap de Aap', 'jambekslikker', 'jandoedel', 'janettescheter', 'janksnor', 'janlul', 'jantje shit', 'jatskont', 'jenevertrut', 'jam-bek', 'jetonslikker', 'jetslet', 'jeukkut', 'javaanse beftekkel', 'jobsex', 'jodenkoek', 'jodenneuker', 'joker', 'judas', 'judatiger', 'juleslikker', 'kaalgeschoren bouvier', 'kaalhoofdige kontebonker', 'kaalkop', 'kaapstander', 'kaashaas', 'kaaskop', 'kaasknobbel', 'kaasnicht', 'kaasrandknabbelaar', 'kadaver', 'kaffer', 'kak', 'kakgarnaal', 'kakbal', 'kakboer', 'kakbroek', 'kakke-motte-vette-tette-piemel', 'kaketoe', 'kakker', 'kakkerlak', 'kakkie', 'kakkige kakkerlak', 'kakmadam', 'kakteef', 'kale inktvisdrol', 'kameel', 'kamelenlul', 'kamelenpijper', 'kamelenridder', 'kamelenvanger', 'kamelenteen', 'kamelenzuurvleesoog', 'kamerolifant', 'kamperhoer', 'kampschreur', 'kanaak', 'kanalenveger', 'kanarieneuker', 'kannekijker', 'kannibaal', 'kansloze muizenbeffer', 'kaper', 'kapitein breedbeer', 'karpaten-papoea', 'kasplant', 'katoenplukker', 'kattenkontneuker', 'kattenkrikker', 'kebabflap', 'keeskop', 'keilewegslet', 'kelderdel', 'kenobi', 'kerkhoefhoer', 'kerkhofslet', 'kermisfritbarak', 'kermissletje', 'ketsdwerg', 'ketser', 'ketter', 'keutelbaviaan', 'keuteldeuker', 'keutelduiker', 'keutelkauwer', 'keutelkop', 'keuteltikker', 'kever', 'keverkut', 'kidnapper', 'kieken', 'kiewiekut', 'kikkerbil', 'kikkerkop', 'killerzaad', 'kilometervreter', 'kinderlikker', 'kinderlokker', 'kinderpedofoon', 'kinkut', 'kip', 'kippekut', 'kip zonder kop', 'kipnugget', 'kippenneuker', 'kip-zonder-kop', 'kistenkut', 'kistkalf', 'kittelikker', 'klaphark', 'klapkut', 'kiwi', 'kiwikut', 'klapkut', 'klaploper', 'klappekut', 'klapperkut', 'klapperzak', 'kleefkut', 'kleffe teelbal', 'klepzeiker', 'klereflikker', 'kleurspoeling', 'kleuterschool', 'kliekkop', 'kliekkind', 'klieklijer', 'klimwandpuisten', 'klitlikker', 'klittekut', 'kloefkapper', 'kloekepik', 'kloekhorst', 'klokkeluier', 'klokkenbeffer', 'klompenkut', 'klont', 'klonterkak', 'kloot', 'klootbek', 'klootbever', 'kloothommel', 'kloothoofd', 'klootjavaan', 'klootjebijter', 'klootkip', 'klootoog', 'klootspiraal', 'klootstrijker', 'klootveter', 'klootviool', 'klootvis', 'klootzak', 'klotebibber', 'klotefucker', 'klotehufter', 'kloteklapper', 'klotelikker', 'klotelul', 'klotenklapper', 'klotenklopper', 'klotenkusser', 'klotige fucker', 'klotser', 'klotskop', 'klutser', 'knalbal', 'knalkop', 'knalkut', 'knakworst', 'Knaning', 'knasterhuis', 'knetterkakker', 'kneus', 'knevelkut', 'kniesoor', 'knikkerhoofd', 'knipnicht', 'knobbelkop', 'knol', 'knuppelfenomeen', 'knuppelrukker', 'knurft', 'knurftschurft', 'koala', 'koe', 'koebeer', 'koei', 'koeiekut', 'koeienflatswerver', 'koeienkop', 'koeienkut', 'koeienlul', 'koeienneuker', 'koeienswans', 'koeistront', 'koeienuier', 'koekenbakker', 'koekepan', 'koekbek', 'koekwous', 'koelie', 'koelkastlampie', 'koepok', 'kofferhoer', 'koffieboon', 'kokkelende kakkerlak', 'kokosnoot', 'kokosnootmuts', 'kolokwint', 'komkommer', 'komkommerkut', 'kommaneuker', 'konijnennaaier', 'konijnenneuker', 'kont', 'kontbonker', 'kontcoureur', 'kontcrossende', 'kontegezicht', 'konteketser', 'kontekleverkever', 'konteklimmer', 'kontekratser', 'kontekroeper', 'kontekuiser', 'kontenbonker', 'kontenketser', 'kontenkruiper', 'kontenkuiser', 'kontenlikker', 'kontenneuker', 'kontenpakker', 'kontgat', 'kontgatmusketier', 'konthaar', 'konthaareter', 'konthaarkorrel', 'konthaarknipper', 'konthaarkrabber', 'konthaarpilaar', 'konthaarverzamelaar', 'konthaarvlechter', 'konthoer', 'kontie', 'kontjebroezer', 'kontkever', 'kontklontenbonker', 'kontklosser', 'klontkors', 'kontkorst', 'kontkorsthaar', 'kontkorstkrabber', 'kontkorstkrauwer', 'kontkorstkrabbelaar', 'kontkrauwer', 'kontkrol', 'kontkruimel', 'kontlikker', 'kontlikkendeslijmbalongool', 'kontmaatje', 'kontridder', 'kontspiermusketier', 'kontvocht', 'koolhydraat', 'koolwaterstof-extract', 'koopavondteef', 'koopman', 'koorddanser', 'kopkaasknabbelaar', 'kopkaasvreter', 'kopkluiver', 'koppensneller', 'korrelvreter', 'kotskop', 'kotszakophaler', 'kotvarken', 'krapuul', 'kreeftenkutlikker', 'krekelpijper', 'krentenbaard', 'krentenkakker', 'krikhoer', 'kringspier', 'kringspierklever', 'kringspiermusketier', 'kringspierturner', 'kroesgeit', 'kroeskop', 'kroeskut', 'krokante gabber', 'krokettor', 'kropdrager', 'kropmens', 'krotekoker', 'kruikenkop', 'kruikenkruiper', 'kruipneger', 'kruizensnuiver', 'krukkel', 'krulparasiet', 'kuft', 'ku-klux-klanner', 'kusmekloteamateur', 'kut', 'kutaap', 'kutbeffer', 'kutbelg', 'kutboer', 'kut-clitoris', 'kutdeksel', 'kutfluit', 'kutfricandel', 'kutgast', 'kutgezicht', 'kutgitaar', 'kuthaarflosser', 'kuthoer', 'kuthommel', 'kuthond', 'kuthoofd', 'kutjandosie', 'kutjanus', 'kutje-pik-andijvie', 'kutjebef', 'kutjebefbef', 'kutje de bruin', 'kutjepikandijfie', 'kutjekleier', 'kutjeplof', 'kutjeskin', 'kutjeslurper', 'kutkabauter', 'kutkachel', 'kutkak', 'kutkind', 'kutkip', 'kutklusser', 'kutknabbelaar', 'kutkop', 'kutkorst', 'kutkrekel', 'kutlap', 'kutleier', 'kutlul', 'kuttekop', 'kuttekoper', 'kuttelikker', 'kuttelikkertje', 'kuttesneuver', 'kuttintelijer', 'kutlip', 'kutlul', 'kutlullo', 'kutlurker', 'kutmadam', 'kutmatroos', 'kutmeloen', 'kutmongool', 'kutontstopper', 'kutsapslurper', 'kutslet', 'kuttekop', 'kuttekrabber', 'kunnteknopers', 'kuttekoppen', 'kuttenlikker', 'kuttenneuker', 'kuttenstamper', 'kuttewapper', 'kuttezakker', 'kuttezuiger', 'kutveger', 'kutviool', 'kutvloeistof', 'kutwrijver', 'kutzak', 'kutzwabber', 'kutwijf', 'kwaekert', 'kwajongen', 'kwakbak', 'kwakbol', 'kwakslikbakbeest', 'kwakzalver', 'kwalkut', 'kwallekop', 'kwalschijter', 'kwanto', 'kwast', 'kween', 'kwee', 'kwelgeest', 'kwezel', 'kwibus', 'kwijlwortel', 'kwispelkont', 'kwistenbiebel', 'laagvliegendestrondbaviaan', 'lasagnelul', 'labbekak', 'labellopotjes pijper', 'lafaard', 'lafbek', 'lamagezicht', 'lambak', 'lambal', 'lamlul', 'lampekap', 'lampenhoer', 'lamstraal', 'lamzak', 'lampelul', 'landloper', 'langharige beftekkel', 'langstaart', 'lantaarnpaalhoer', 'lantarenslet', 'lapzwans', 'latexnicht', 'lauwbikker', 'lauwwaterdrinker', 'lavabosmoel', 'lawaaipapegaai', 'leeg broekje', 'leipo', 'lekkerbek', 'lelijk', 'lelijkerd', 'lepellikker', 'leprakind', 'leprasnikkel', 'lesbie', 'lesbische konijnenkut', 'lesbische vingerplant', 'leuningbijter', 'lift', 'lichtekooi', 'lijkenlikker', 'lijkenneuker', 'lijkenprikker', 'lijkenwipper', 'lijpe', 'lijpo', 'lijpedildo', 'lijpe-dodo', 'likbaard', 'likhond', 'likkende-baardaap', 'likvis', 'lintwormlikker', 'liplama', 'locomotrutfant', 'loempialul', 'loempiavouwer', 'loerak', 'logaritme', 'lompe', 'lompeezel', 'lompelul', 'longlijer', 'longpleur', 'lookalike', 'lord of the strings', 'lorejas', 'lorrekut', 'loser', 'losgeslaagde aap', 'losgeslaagde idioot', 'loslopende soa', 'Loslopende vaginale infectie', 'luihoofd', 'luilak', 'luipaard', 'luis', 'luizenbol', 'luizenlul', 'luizigaard', 'lul', 'lulblubber', 'luldebehanger', 'lulhannes', 'lulhoofd', 'lulijzer', 'luljanus', 'lullebadje', 'lullelikker', 'lulleloper', 'lullenbijter', 'lullenknabbelaar', 'lullenkotser', 'lullenvreter', 'lullepijp', 'lulvinger', 'lullewatten', 'lulzuiger', 'lullo', 'lulskie', 'lummeltol', 'luster', 'maagdelijke-pornoactrice', 'maaghoer', 'maaghond', 'maagpens', 'maangezicht', 'maan-rovers', 'maf', 'mafkaas', 'mafkees', 'mafketel', 'mafklapper', 'mafkikker', 'makaak', 'makak', 'makako', 'makreel', 'malerd', 'malloot', 'maltdrinker', 'mameluk', 'mamaslieverdje', 'mama\\'skindje', 'mamasexer', 'mannelijke-nudist', 'mannenprakker', 'manusje van alles', 'manverzachter', 'manwijf', 'mapamapa', 'mapima', 'marginaal', 'marinoschaap', 'maskerade-inca', 'maskeradevrijbuiter', 'masturbarie', 'mastrubeer', 'matennaaier', 'mau-mauer', 'maximilia', 'mayomuil', 'meeëter', 'meeloper', 'meeroller', 'meeuwenflats', 'megacycle', 'megafallus', 'megalomaan', 'melkmuil', 'mellow-teef', 'meloen', 'mensaap', 'menseneter', 'mestbek', 'metadon-snol', 'microfiel', 'miepkadet', 'mierennaaier', 'miereneter', 'mierenmelker', 'mierenneuker', 'mierentiet', 'mierkut', 'mietje', 'minimasnol', 'minimumloonhoer', 'minipik', 'minkukel', 'miskraam', 'miskraamkop', 'mismaaksel', 'misneuker', 'mispel', 'mobifiel', 'modekut', 'modetrut', 'modetrutje', 'moederkoekje', 'moederkoekkut', 'moederkoekslijm', 'moederneuker', 'moederneukendeaap', 'moederskindje', 'mof', 'moffrikaan', 'mokkagrotbezoeker', 'molenteef', 'mombakkes', 'mongolekut', 'mongolenbeffer', 'mongolenkut', 'mongool', 'monk', 'monkyboy', 'monnik', 'moordenaar', 'moraalridder', 'mormel', 'moslip', 'mossel', 'mosselbakkes', 'mosterdgast', 'mosterdpap', 'mosterdpot', 'motherfucker', 'mountendeldarmbeklimmer', 'muilezel', 'muis', 'muishuis', 'muppet', 'muppetlolly', 'murfgeluldedaewoorijder', 'murk', 'muts', 'mutsenplukker', 'mutten', 'naadhopper', 'naadje', 'naaiaap', 'naaidoos', 'naaimachine', 'naarling', 'nachtuil', 'nageboorte', 'nageboortegezwel', 'nakko', 'nanoneuker', 'nasivreter', 'natbal', 'natje', 'natkut', 'natnek', 'nattekut', 'nazibal', 'nazihoer', 'nazikont', 'neanderthaler', 'necrofiel', 'necrosorofiel', 'neger', 'negerlul', 'nerd', 'netverslaafde', 'netwerkfout', 'neukbijbel', 'neukendewipaap', 'neukfout', 'neukgleuf', 'neukhoofd', 'neukkabouter', 'neukkonijn', 'neuknaad', 'neuknicht', 'neukroomzuiger', 'neukslet', 'neukstengel', 'neukterrorist', 'neuktruffel', 'neusaap', 'neusneuker', 'nicht', 'nichtebal', 'nitraatmaat', 'nietsnut', 'nevergonnebee', 'nikker', 'nikkerwipper', 'no-liver', 'no-nek', 'nogaspekulant', 'nooduitgang', 'nul', 'necrofiel', 'oelepoeper', 'oelewap', 'oelewapper', 'oen', 'oesterkut', 'oetlul', 'okkenootje', 'oksel', 'okselhaas', 'olalul', 'oliebol', 'olifantenlul', 'olifantenschimmelslurf', 'omabeffer', 'onderbroekenverzamelaar', 'ondeugd', 'ondeugend knaapje', 'ondeugende tienerhoer', 'ongebruikte-omakut', 'ongeliktebeer', 'ongelikte berggeit', 'ongeluk', 'ongeschoren befchef', 'ongestelde bloedworst', 'ongestelde parkeend', 'ongewassen bilnaad', 'onnozel', 'onnozelle', 'onnozelaar', 'ontbindend addergebroed', 'ontdekkingsreiziger', 'ontplofde bavianenlul', 'onwelriekende gleuvenbrigade', 'oomneuker', 'oorbelmusketier', 'oorsmeerworst', 'oorwurm', 'oorwurmneuker', 'oorzak', 'oostgoot', 'opapijper', 'opgepistepornopaal', 'opperdombo', 'opperwaus', 'optiekhoer', 'oraalkoraal', 'ornithotynchus', 'orgasmus', 'orgelpijper', 'osnicht', 'osseknots', 'ossenkut', 'oudgepoeptezak', 'ouwerukker', 'ouwe trekezel', 'overbijter', 'overlekte peer', 'overgepierste negerinnentet', 'overmaasehazewindhonden', 'korenmolenpestpokken', 'overrijpepuist', 'paardebeffer', 'paardebrei', 'paardekloot', 'paardekut', 'paardelid', 'paardelul', 'paardelullo', 'paardenlul', 'paardenanus', 'paardenpenis', 'paardepenisneuker', 'paardenpijper', 'paardenpikkenpoetser', 'paardenpenislikker', 'paardenpikkerslikker', 'paardenplasserwasser', 'paardenneuker', 'paarsedruiveneikel', 'paashaas', 'paashaasneuker', 'paashaasschaamhaarverzamelaar', 'paashaasschaamhaar verzamelaarstasje', 'padoog', 'pakhuisrat', 'palenlaaier', 'palingkop', 'palingstekker', 'palingvel', 'palmboomneuker', 'pannekoek', 'pantoffelneuker', 'pandapikkenpijper', 'pannekoek', 'pantyneuker', 'papabaf', 'papegaai', 'papagaaiekuttenbefkonijn', 'papzak', 'Penis Aqua Rosa', 'Penis Papierus Plaksus', 'papomslag', 'pappige luller', 'parasiet', 'parelridder', 'parkeerkut', 'parkiet', 'parkinghomo', 'parkschijter', 'passoa-slet', 'passoatrut', 'patagonier', 'patatzak', 'patjepeeër', 'patser', 'pazop', 'pedo', 'pedomaan', 'pedomeester', 'pedocyclomasturbant', 'pedofiele concierge', 'pedopenis', 'pedopyrofilatomaan', 'peepje', 'pekelharing', 'pekelteef', 'penisafhakker', 'penishoofd', 'peniskoker', 'peniskokerlikker', 'penisleier', 'penislekker', 'penislikker', 'penislijder', 'penispijper', 'penispukkelpuist', 'penisspuiter', 'penisworstelaar', 'peniszuiger', 'pennelikker', 'pensklepper', 'perebek', 'perenplukker', 'pestbek', 'pestboer', 'peukenneuker', 'peul', 'pezewever', 'phenomeen', 'piaprisma', 'pias', 'picorniekop', 'piek', 'pieleflats', 'pielemans', 'pielesnuiver', 'pielemuis', 'pielewielie', 'pielewieps', 'piemel', 'piemelaar', 'piemelboxer', 'piemelbrie', 'piemelgymmer', 'piemelhoofdje', 'piemelemoosje', 'piemelpatser', 'piemelpiraat', 'piemelpuist', 'piemelpunt', 'piemelteef', 'piemelwijf', 'pierewipper', 'pierlala', 'pierlalla', 'pietje de dood', 'pietje piemelhoofd', 'pietje pikhaar', 'pietlut', 'piezer', 'piggel', 'piggelmee', 'pijnboombeffer', 'pijpbek', 'pijpdeuramateur', 'pijpendemonkyboy', 'pijpenkoplikker', 'pijpelullebakkes', 'pijpert', 'pijpgeit', 'pijphoer', 'pijphomo', 'pijpmond', 'pijpmonk', 'pijppiloot', 'pijpslet', 'pijpslet met hazenlip', 'pijpzuiger', 'pijverse hoer', 'pik', 'pikomhoog', 'pikbroek', 'pikgatjager', 'pikhoofd', 'pikkie', 'pikkelikker', 'pikkenlikker', 'pikkentrekker', 'pikkepoelie', 'pikketrekker', 'pikknopbult', 'pikomhoog', 'pikoog', 'pikstok', 'pikvocht', 'pikzuiger', 'pilbil', 'pinda', 'pindaplukker', 'pindavreter', 'pinguinscheet', 'pino', 'pinopijper', 'pinopijpvogel', 'pintenman', 'pipo', 'piraat', 'pisbakkenpoot', 'pisbakneuker', 'pisbuisje', 'pisbuismug', 'pisbuisuitzuiger', 'pisgatneuker', 'pisgezicht', 'pishoofd', 'piskabouter', 'piskonijn', 'piskont', 'piskut', 'pislama', 'pislul', 'pisklit', 'pisnicht', 'pispanty', 'pissebed', 'pisvinger', 'pisvink', 'pisvlek', 'pithecantropus', 'plakhaas', 'plakhoer', 'plakkenamer', 'plak-plaatjes-volk', 'plas', 'plasnicht', 'plaspop', 'plasser', 'platborst', 'platjesvreter', 'platvoeter', 'platzak', 'plee', 'pleerol', 'pleeteef', 'pleister op een houten been', 'pleures', 'pleuris', 'ploeg', 'ploertah', 'ploerten', 'plofdrek', 'plofkip', 'plofkop', 'plork', 'pluimezel', 'pluruskut', 'poedel', 'poedelpijper', 'poedelneuker', 'poep', 'poepchinees', 'poepdooshoofd', 'poepduim', 'poepekrulhaar', 'poeperd', 'poepgat', 'poephaan', 'poephapper', 'poephoer', 'poephoofd', 'poepkop', 'poepkut', 'poepkwab', 'poepneger', 'peopnerd', 'poepneuker', 'poepneukzak', 'poepschijtendeanuslikker', 'poepsexhomo', 'poepslet', 'poepsnoeper', 'poepsnol', 'poepstamper', 'poepsterrenoprekker', 'poepturk', 'poepvinger', 'poepvlek', 'poepvreter', 'poepzak', 'poesiewaus', 'poesjeslikker', 'poet', 'poeta', 'poets', 'pokkejong', 'pokkemokkel', 'pokkenteef', 'pokketeringtakkewijf', 'pokkewijf', 'pol', 'polderindiaan', 'polderkoe', 'poldersnol', 'politieagent', 'pollepol', 'polstokpoldersnol', 'polygraaf', 'pombaksmoel', 'pompbakfreter', 'pompslet', 'ponchohoer', 'ponkiewonkie', 'ponylul', 'poot', 'poppennaaier', 'poppenneuker', 'pornokabouter', 'pornomonster', 'porno pedofiel', 'pornoster', 'portiekhoerslet', 'portieksnol', 'postpukkel', 'portretslet', 'pot', 'pothoer', 'potsenmaker', 'potter', 'potverdorie', 'potvis', 'powerprulletje', 'praatjesmaker', 'pretletter', 'pretslet', 'preut', 'preutelekker', 'preutsesuet', 'preutsekut', 'preutse slet', 'primitieveling', 'printernaaier', 'proefbuisbaby', 'profiteur', 'proleet', 'prolurk', 'promillageverlager', 'prosessorneuker', 'protozoen', 'protput', 'prottekop', 'prul', 'pruimtabak', 'pruumenlikker', 'pruthoofd', 'prutlip', 'prutser', 'puber', 'puienzeiker', 'puist', 'puistekop', 'puistekutje', 'puistenhomo', 'puistenknobbel', 'puistenkut', 'puistenreet', 'pukkelkop', 'pukkelnek', 'pukrukker', 'pummel', 'punniktrut', 'punthond', 'punthoofd', 'puntpiel', 'puntvleugelschijtvogel', 'pusbak', 'pusemmer', 'pushoer', 'puskop', 'puskut', 'puslikker', 'puslip', 'pusnaad', 'puspik', 'puta', 'putjesschepper', 'putlul', 'pyromaan', 'quartrozo', 'quasimodo', 'quasimodom', 'quist', 'quikhoer', 'quikteef', 'raamneger', 'rabauter', 'rabbezak', 'racechinees', 'racesjinees', 'raceplee', 'ragkut', 'ragnicht', 'railnicht', 'raketpiraat', 'ramenlikker', 'rammelhoofd', 'rampdebiel', 'rampenbek', 'randdebiel', 'ransaap', 'rapalje', 'rapenschijter', 'raseikel', 'rat', 'rasgedrocht', 'ratelslang', 'rattenkruid', 'rattenneuker', 'raveteef', 'raviolie', 'rectumslikker', 'reed', 'reedkever', 'reefteef', 'reet', 'reetatleet', 'reethengelaar', 'reetketelsteen', 'reetkever', 'reetkikker', 'reetkogel', 'reetgeboorte', 'reetkever', 'reetkevereikel', 'reetkeververzamelaar', 'reetkikker', 'reetneus', 'reetracer', 'reetridder', 'reetroeier', 'reetveeg', 'reetveter', 'reetvereterversleter', 'reetverschuiver', 'reetveterkever', 'reetzweet-scheet', 'regelneef', 'regenknakken', 'rekel', 'rektum', 'rekvet', 'relnicht', 'remmerist', 'remspoorbroek', 'renegaat', 'reptielengezicht', 'retekever', 'retekind', 'retelteef', 'reuzelkont', 'reuzelragger', 'richelvet', 'ridder', 'rimboekikker', 'rimboe-sprinter', 'rimmboy', 'rimmer', 'rimpelkut', 'rimpelrad', 'rimpelsaurus', 'rimpelzwijn', 'rioolfox', 'rioolpinguin', 'rioolkruizer', 'rioolridder', 'rioolverschimmelaar', 'rodekool', 'roekoerd-roekoerd', 'rolaap', 'rolmops', 'rolstoelbaviaan', 'rolstoelterrorist', 'ronde-tafel-conferentie-houder', 'roodbilbaviaan', 'roodreetbaviaan', 'rooie dakduif', 'rooie kippendief', 'rotmof', 'rottigje', 'roze-ridder', 'rubbernicht', 'ruft', 'ruftende reetaap', 'ruftende rukeend', 'ruftende rukslet', 'ruftknikker', 'ruggekrabber', 'ruggekruiper', 'ruggentuffer', 'ruggentikker', 'ruggetuffer', 'rugklimmer', 'rugkoning', 'rugridder', 'rugridder', 'rugrunner', 'rugtoerist', 'ruigridder', 'ruilnicht', 'rukbeer', 'rukduck', 'rukeend', 'rukfreak', 'rukfriek', 'rukhoer', 'rukkameel', 'rukker', 'rukmuts', 'ruktijger', 'rundercentrum west', 'rups', 'russische berg geit', 'russische heroine hoer', 'sabberkut', 'sacoche', 'sal', 'sapcentrifuge', 'satan', 'satraap', 'satehoer', 'schaamhaaracrobaat', 'schaamhaarlikker', 'schaamhaaretendebaffer', 'schaamhaarverzamelaar', 'schaamlikkerkip', 'schaamlipgezwel', 'schaamliplikker', 'schaamluis', 'schaamluisbedrieger', 'schaampik', 'schaap', 'schadewijf', 'schandknaap', 'schapekut', 'schapenhoeder', 'schapenneuker', 'schaaldierpijper', 'schapezak', 'scharminkel', 'scharrelaar', 'schavuit', 'schele', 'scheepsjongen', 'scheepskanon', 'scheepskelderaar', 'scheettoerist', 'schreeuwlelijk', 'scheidsrechter', 'schelle-holbewoner', 'schelecycloop', 'schele dakduif', 'schelejoodsehomoneger', 'schelm', 'schetemollebezeke', 'scheve aap', 'scheve kutneuker', 'scheve lavabo', 'scheve schele holter', 'schijndode', 'schijnzwangerschap', 'schijt', 'schijtbek', 'schijter', 'schijterd', 'schijthoer', 'schijthomo', 'schijtkameel', 'schijtkut', 'schijtlaars', 'schijtlijster', 'schijtluis', 'schijtmongool', 'schijtsmoel', 'schijtsnuiver', 'schijtwijf', 'schijtzak', 'schil', 'schildknaap', 'schildvleugelige', 'schim', 'schimmelkaas', 'schimmelkont', 'schimmelkut', 'schimmelpik', 'schimmelkont', 'schimmelteen', 'schlemiel', 'schminkduus', 'schobbejak', 'schoelje', 'schoft', 'schooier', 'schoolhoer', 'schoolhoertje', 'schoolkamphoer', 'schoonmaakturk', 'schoonmoederneuker', 'schoonvader', 'schoorsteenvegersragebol', 'schorem', 'schorpioen', 'schorriemorrie', 'schrurftkop', 'schubbekut', 'schuimbatser', 'schuimhoer', 'schuimzak', 'schuinsmarcheerder', 'schurftbek', 'schurftenlul', 'schurfthond', 'schurftkonijn', 'schurftkut', 'schurk', 'schutkut', 'schuurdoos', 'scooter', 'scootersnol', 'scrotum betaster', 'sekte', 'semafoonneuker', 'senseozuiper', 'seropositive dwerg', 'sesamhoofd', 'seut', 'seutigebarbiepop', 'sexeend', 'sexer', 'sexuele schaamhaarvreter', 'seksslet', 'sexterrorist', 'shampoorukker', 'sifilis', 'sigarettenneuker', 'sigarettenslet', 'sillybilly-appelschillie', 'sjacheraar', 'sjembek', 'sjonnie', 'skaletterige haarbal', 'skunkmajoor', 'skuwe', 'slaapwandelaar', 'sladood', 'slagtand', 'slakkenhuis', 'slakut', 'slappe aap', 'slapswanz', 'slang', 'slangenbijter', 'slavendrijver', 'slavenhaler', 'slavenhandelaar', 'sleeplul', 'slet', 'slettebak', 'slettebek', 'slettekind', 'sletteklep', 'slettekop', 'slettendekker', 'slettepaket', 'sleurhutverneuker', 'slibworm', 'sliederiel', 'slikheks', 'slikhoer', 'slikslet', 'slimmerik', 'slingeraap', 'slingerschijt', 'slingersnikkel', 'slipwijf', 'slijksloeberaar', 'slijmbal', 'sloalippe (zwols)', 'sloeber', 'sloeder', 'sloekoe', 'sloerie', 'sloeriekop', 'slome', 'slomofiel', 'slootkloot', 'sluikhandelaar', 'sluitspierbeul', 'sluitspiergezicht', 'sluitspiermusketier', 'sluitspierpionier', 'slungel', 'smeerige heiligekut', 'smeerlap', 'smeerpoes', 'smefsnol', 'smegmalikker', 'smegmasnuiver', 'smerrige das', 'smetkut', 'smoelknikker', 'smootie', 'smurfenlikker', 'smurfenzuiger', 'smurfenneuker', 'smufenerohteekbezoeker', 'sneeuwman', 'sneeuwschuimer', 'sneeuwvreter', 'snertvogel', 'snertsnikkel', 'snijboon', 'snifter', 'snikkelbeer', 'snikkeldier', 'snikkel-sap-slikker', 'snikkelschijter', 'snikkelslikker', 'snikkelwikkel', 'snikkelzuiger', 'snikkerskut', 'snitzer', 'snoeshaan', 'snollekont', 'snollenpoes', 'snol', 'snollebol', 'snollekop', 'snoodaard', 'snor', 'snorfietsmongool', 'snorro', 'snotkopbaviaan', 'snotkut', 'snotpork', 'snotneus', 'snottebel', 'snotterkuiken', 'snuggle', 'snuifeekhoorn', 'snuifkieken', 'snuiver', 'snul', 'soalikker', 'soalipjesslikker', 'sodomist', 'soepkieken', 'soepkip', 'soepkut', 'soeplul', 'soepmongool', 'soepnel', 'sokkenloper', 'sorofiel', 'sosio', 'spagettievreter', 'spammer', 'spast', 'spastenkut', 'spatlaplikker', 'speenvarken', 'spekberg', 'spekgat', 'speklap', 'speknek', 'spekreet', 'speldepik', 'spermabal', 'spermabekkie', 'spermabandiet', 'spermacel', 'spermacontainer', 'spermahoer', 'spermakotser', 'spermakut', 'spermapegel', 'spermaslikkende', 'spermaslikker', 'spermaspons', 'spermaspugendeballenbatser', 'spermakikker', 'spermalul', 'spermasnoet', 'spermaspons', 'spermatepel', 'spermatoïde', 'spermazuiger', 'spermazuiper', 'sperzieboonmetkaassaus', 'spetterlip', 'spetterpoep', 'spetterpukkel', 'spinaziebeffer', 'spinaziekut', 'spinnenkop', 'spiritist', 'spitsboef', 'splatman', 'spleetoog', 'spleetruiter', 'spleetscheet', 'spraaktabletteef', 'springgeit', 'sprinkhaan', 'springkanarie', 'springpoot', 'spritzer', 'sproeipoep', 'sproeipoeper', 'sproeivliegtuigfanaat', 'spuit', 'spuitende steenpuistlul', 'spuithoer', 'spuitkut', 'spuitsnol', 'staatsmongool', 'staketsel', 'stakker', 'stalksloerie', 'stamper', 'steekneus', 'steigerhoer', 'stekelvarken', 'steraf', 'sterf', 'steriaotiet', 'sterfaf', 'stereomongool', 'steroiet', 'steromiet', 'sterreneter', 'stiefheks', 'stierenbeffer', 'stierenek', 'stierenlul', 'stinkaap', 'stinkbeer', 'stinkbek', 'stinkbom', 'stinkdeken', 'stinkhol', 'stinkhoer', 'stinkhomo', 'stinklul', 'stinkmalloot', 'stinkotter', 'stinkpoepgat', 'stinkslet', 'stinkspleet', 'stinkzak', 'stinkzwam', 'stoephaas', 'stoephoer', 'stoepkabouter', 'stoepslet', 'stoepneuker', 'stoepsnol', 'stoeptegel', 'stoeptegelhoer', 'stoethaspel', 'stofnol', 'stofsnol', 'stomkonijn', 'stommebadgast', 'stommeling', 'stommerat', 'stommerd', 'stommerik', 'stomme kat', 'stopcontactneuker', 'stoplicht', 'stouterik', 'straalbulldozer', 'straaljager', 'straathoer', 'straatjoekel', 'straatprostituee', 'straatnieuws', 'straatslet', 'straatsnol', 'strandhoer', 'strandjeanet', 'strandschuimer', 'straussvogel', 'stringwing', 'strompstomper', 'stront', 'strontartiest', 'strontbaffiaan', 'strontbak', 'strontboerke', 'strontboorder', 'strontbuffer', 'strontcrosser', 'stronteter', 'strontfluit', 'stronthapper', 'stronthoer', 'strontholverklontering', 'strontkonthaar', 'strontkorrel', 'strontkut', 'strontloempia', 'strontmof', 'strontmuilen', 'strontpelicaan', 'strontpot', 'strontosaurus', 'strontracer', 'strontridderke', 'strontstekker', 'strontstamper', 'strontstomper', 'strontverdamper', 'strontvlieg', 'strontzaadvreter', 'strontzabbelaar', 'strontzak', 'strontzakneuker', 'strontzuiger', 'strotgrondel', 'strottekots', 'struikelhaar', 'struikenduiker', 'struikneger', 'studiehoofdje', 'stuitermongool', 'stuiterende teelbal', 'suckhead', 'suet', 'sufbubbel', 'sufgeliktekankerhoer', 'sufgerukte', 'sufgeruktesloototter', 'sufgerukt konijn', 'sufkonijn', 'sufkut', 'suflul', 'sukkel', 'sukkelduck', 'sukkelaar', 'sukkelnerd', 'sul', 'sulwijf', 'superkut', 'supermongool', 'supporterke', 'surfplank', 'swiebie', 'taboetstabiske', 'takenboeker', 'takkehoer', 'takkenteef', 'takkentrut', 'takkesnol', 'takketrol', 'takketut', 'tamponkut', 'tampontrekker', 'tampony', 'tandloze', 'tangelteef', 'tankreet', 'tapijtenventer', 'tapijtenzwendelaar', 'tapijtkever', 'tarrelbaviaan', 'technocraat', 'teckel', 'teef', 'teelbal', 'teeringhoer', 'tegelteef', 'tegelveger', 'tekkelbeffer', 'teletubbie', 'teletubbiekut', 'teletubielikker', 'teletubbieneuker', 'teletubiezuiger', 'tempelslet', 'tempohakker', 'tepel', 'tepelbaviaan', 'tepeldief', 'tepelhaarbeffer', 'tepellozepuistenzwijn', 'tepellozetiet', 'tepellozetietvlieg', 'tepellozetientiterigevlieg', 'tepeltrut', 'tepelwrat', 'tergdwerg', 'teringdrol', 'teringheftruck', 'teringhond', 'teringhufter', 'teringlijer', 'teringlul', 'teringneet', 'teringslet', 'teringtubbie', 'teringtutje', 'teringtyfushoer', 'teringzooi', 'teringzwans', 'termieteneter', 'terrorist', 'testbeeld', 'tettekop', 'tetterslet', 'tettezot', 'theemuts', 'tifushoer', 'tibetaanse krabhamster', 'tietenbek', 'tietenlokker', 'tietloze-terrorist', 'tietgezicht', 'tietmier', 'tietvlieg', 'tikkelhoofd', 'tikteef', 'tjappie', 'tjoepenlikker', 'tjoetn', 'tobbert', 'tobogan', 'toelie', 'toiletbril', 'toiletpapierzeveraar', 'tokkie', 'tomaat', 'toogpisser', 'toonbanksloerie', 'touwtyfus', 'touwtyphusleier', 'tovenaar', 'traanpreut', 'traliehoer', 'transsexuele rukeend', 'trapleuning', 'travestiet', 'travo', 'travohoer', 'travovarken', 'trekgans', 'trekpleister', 'trekpop', 'trekslet', 'trektekkel', 'trekvlek', 'trekzak', 'trien', 'trippeleend', 'troela', 'troelie', 'trol', 'troglodiet', 'trotoir', 'trottoir prostiuee', 'trut', 'truttekut', 'tubby', 'tuig', 'tuinkabouter', 'tulpentrut', 'tunderkont', 'tupperwaredoos', 'turbotrut', 'turfsteker', 'turkenbeffer', 'turkenlikker', 'turkenneuker', 'turkentrekker', 'turnflikker', 'tuthola', 'tutneus', 'twanyboy', 'tyfusaap', 'tyfushoer', 'tyfuslijer', 'tyfuslul', 'tyfustubbie', 'tyfustukker', 'typhoon', 'uienreet', 'uiersnuiver', 'uilskuiken', 'uitlaatneuker', 'urinemonster', 'urinespuiter', 'urinoirlikker', 'urger', 'vaginaplakker', 'vaginavarken', 'vaginavochtabsorbeerder', 'vaginalehangflapper', 'valappel', 'valse noot', 'vampier', 'vandaal', 'varken', 'varkenshol', 'varkenskop', 'vaselinevriend', 'vastenavondzeeschuimer', 'vat zonder bodem', 'veegpik', 'veenlijk', 'veenslet', 'veeverkrachter', 'vegetarier', 'verkrachter', 'verneukte', 'verpleger', 'verrader', 'verrekte kutknakker', 'verekte trekvlek', 'verrottestront', 'verrotting', 'versletenstofvot', 'verwekfout', 'vetkever', 'vetnek', 'vettige herder', 'vettigeteef', 'vetvlek', 'vetzak', 'vibratorpijper', 'vies mormel', 'viezerik', 'vingerplant', 'violenkut', 'violenkutje', 'vispastei', 'viswijf', 'vitesseneur', 'vivisectionist', 'vlahoofd', 'vlakut', 'vlamingo', 'vlees', 'vleesbeest', 'vleesklak', 'vleespet', 'vleeswortel', 'vlegel', 'vlerk', 'vlojak', 'vloklul', 'vleugelmoer', 'vliegend-befschaap', 'vliegennaaier', 'vliegenvanger', 'vlieghoer', 'voetveeg', 'voetzoeker', 'vogelverschrikker', 'volgescheten palingvel', 'volgevreten varken', 'volkorenkut', 'volksverhuizer', 'volleknolle', 'voorhuidjogger', 'vooruitstrevende bink', 'vorkhapper', 'vorrecrosser', 'vrottepelikaan', 'vrouwenprakker', 'vreetzak', 'vrijbuiter', 'vuillak', 'vuilbakskarter', 'vuile dief', 'vuilegedruktesmoel', 'vuile raamneger', 'vuilereetscheet', 'vuileslet', 'vuilnis', 'vuistneuker', 'vulkaankop', 'vuurtoren', 'waailap', 'wabipi', 'wafelijzer', 'walvisganger', 'wandelende asbak', 'wandelend virus', 'wanhopigedarmrukker', 'wannabee', 'wasbakkenpisser', 'wasknijper', 'waterdrinker', 'waterhoofd', 'watervlo', 'watje', 'wc-borstel', 'wc-bril', 'wc-duiker', 'wc-hoofd', 'wc-pot', 'websitegeiler', 'weekdier', 'weerhaakhoofd', 'weerwolf', 'wegdesperado', 'wegduivel', 'weggerotstukkadaver', 'wegpiraat', 'weg-werp-slet', 'wentelteef', 'wentelzak', 'werkeikel', 'wieberdink', 'wietmiet', 'wijf', 'wijkgebondenstoepslet', 'wigger', 'wilde', 'wildeman', 'windgeruithangbordlul', 'wipkip', 'wirdo', 'witte', 'witverlies snuiver', 'woesteling', 'woestijnvos', 'woezzie', 'wollige wombad', 'wormsteek', 'wormrot', 'worstebroodje', 'wortelpotige', 'wous', 'wout', 'wrattenkop', 'wrattenkont', 'wrattenschimmel', 'Xylofoonneuker', 'yogoteef', 'yvesmoeder', 'yoyolul', 'yoghurtventje', 'yoghurtpisser', 'zaadbal', 'zaadcontainer', 'zaadhamsteraar', 'zaadheks', 'zaadhoer', 'zaadnaad', 'zaadnek', 'zaadschieter', 'zaadslikker', 'zaadslet', 'zaadsnuiver', 'zaadspuitende', 'zaadstaafteler', 'zaadstengel', 'zaadzwerver', 'zaadvarken', 'zaadvrager', 'zaadvragende-budcontainer', 'zaadvreter', 'zadelruiker', 'zak', 'zakcel', 'zaksel', 'zalf', 'zakbreuk', 'zak hooi', 'zakkendroller', 'zakkenwasser', 'zakrat', 'zandhaas', 'zandloper', 'zandvlo', 'zanikert', 'zapoteek', 'zatmuil', 'zattekop', 'zeekbakkes', 'zeekbos', 'zeekmem', 'zeekoe', 'zeekomkommer', 'zeekreeft', 'zeemlap', 'zeeolifant', 'zeepok', 'zeepsmoel', 'zeerover', 'zeeschuimer', 'zeeslang', 'zeeteef', 'zeikmossel', 'zeikseule', 'zeiksnor', 'zeldzame zaadschieter', 'zelfontbrander', 'zemelaar', 'zeemelaar', 'zemmer', 'zeugbikkel', 'zeverzak', 'zichzelf-etalerende-parkhoer', 'ziekepudding', 'zigeuner', 'zinksnijer', 'zoeaaf', 'zoeloe', 'zoeloelip', 'zoetwateradmiraal', 'zoetwaterchinees', 'zoetwaterkaper', 'zoetwaterkosmonaut', 'zoetwatermatroos', 'zoetwaterpapoea', 'zoetwaterpik', 'zoetwaterpiraat', 'zoetwaterpoliep', 'zoldersnol', 'zondagsrijder', 'zondaar', 'zonnebankfiguur', 'zonnebankwijf', 'zonnekind', 'zoogdierpijper', 'zooloog', 'zot', 'zoutwaternichten', 'zuig', 'zuiger', 'zuigende zuigaap', 'zuigkonijn', 'zuigoffer', 'zuigsnor', 'zuigslet', 'zuigvis', 'zulletje', 'zulthoofd', 'zultkop', 'zultnek', 'zulu', 'zure lippeslikker', 'zuurstogverpester', 'zwabberhoofd', 'zwakkeling', 'zwamkip', 'zwamneus', 'zwangere-badsloef', 'zwangere-soepstengel', 'zwangere-stoeptegel', 'zwans', 'zwartjoekel', 'zwarte bruingreppel', 'zwartehond', 'zwartetijgerneuker', 'zwartgelakerde klereschoen', 'zwartgelakerde schoenzool', 'zwartzak', 'zweefkees', 'zweefteef', 'zweer', 'zweetaap ', 'zweetanus', 'zweetballen', 'zweetcees', 'zweetjap', 'zweetjoekel', 'zweetkees', 'zweetlex', 'zweetkut', 'zweetlul', 'zweetnaad', 'zweetneger', 'zweetnek', 'zweetpenis', 'zweetpik', 'zweetpruim', 'zweetreet', 'zweetzak', 'zwendelaar', 'zwijmelende stinkteef', 'zwijn', 'zwijnenbeffer', 'zwoeft', 'zwoelie'];\n\n foreach($words as $word) {\n $dbWord = new Word;\n $dbWord->word = $word;\n $dbWord->save();\n }\n\n }", "title": "" }, { "docid": "701fa03c1b4fcf0859748cef06146b77", "score": "0.51686007", "text": "public function searchWord(){\n $fichier = file('mots.txt');\n $this->word = trim($fichier[array_rand($fichier)]); # Récupère la valeur sans guillemet\n $this->underscore_array = array_fill(0, strlen($this->word), \"_\"); # remplace les lettres par des _\n }", "title": "" }, { "docid": "3170d3d3d9c5ba172401ae927683239e", "score": "0.5166784", "text": "function getWordUpp ($parts) {\n \t\t$result = count($parts)-1;\n\t\t\t\t\t\n\t\t$x = mt_rand(0, $result);\n\t\t$y = mt_rand(0, $result);\n\t\t$z = mt_rand(0, $result);\n\n\t\t $oneSyl = $parts[$x];\n\t\t $twoSyl = $parts[$x].$parts[$y];\n\t\t $threeSyl = $parts[$x].$parts[$y].$parts[$z];\n\t\t\n\t\t//creating an array of 1,2,3 syllable words\n\t\t $newWord = array ($oneSyl, $twoSyl, $threeSyl);\n\t\n\t\t// getting a number from 0 to 2\t\n\t\t $randLength = mt_rand(0, 2);\n\t\n\t\techo ucfirst($newWord[$randLength]);\n\t\t\n \t\t}", "title": "" }, { "docid": "ebf6fe113fe75ba3608994ff8e98746d", "score": "0.5162636", "text": "public function consumeWord() {\n return $this->scanFor(';');\n }", "title": "" }, { "docid": "d08fb3158ac1a12fe7e7c765cdc34202", "score": "0.5161698", "text": "function humanize($word, $uppercase = '')\n{\n $uppercase = $uppercase == 'all' ? 'ucwords' : 'ucfirst';\n return $uppercase(str_replace('_',' ',preg_replace('/_id$/', '',$word)));\n}", "title": "" }, { "docid": "128a1bb9189632d18e58c69ec51add75", "score": "0.5153804", "text": "public function fullGenderWord( $word ){\n $gender = ucfirst( $word ); //. default behavior\n\n if( $word == \"M\" ){\n $gender = \"Male\";\n }else if( $word == \"F\" ){\n $gender = \"Female\";\n }\n \n return $gender;\n }", "title": "" }, { "docid": "e8112c95e69387ea1a3a5e579e5fb934", "score": "0.5151376", "text": "function myextract($msg, $w1, $w2) {\n //\n //Let p1 be the position of the first word\n $p1 = strpos($msg, $w1);\n //\n //Let p2 be the first position of the amound\n $p2 = $p1 + strlen($w1);\n\n //Calculate theh length of the ampunt\n //\n //Let p3 be the starto of the ampunt terminator\n $p3 = strpos($msg, $w2);\n //\n //The amount lenth is the difference between the start and the terminator\n $l = $p3 - $p2 - 1;\n\n //\n return substr($msg, $p2, $l);\n }", "title": "" }, { "docid": "ddaa5afa994931042fc9da131cf6acc0", "score": "0.5150232", "text": "public function pluralize($word) {\n $result = strval($word);\n if (in_array(strtolower($result), $this->uncountableWords())) {\n return $result;\n } else {\n\t\t\t$pluralRules = $this->pluralRules();\n foreach($pluralRules AS $rule => $replacement) {\n if (preg_match($rule, $result)) {\n $result = preg_replace($rule, $replacement, $result);\n break;\n }\n }\n return $result;\n }\n }", "title": "" }, { "docid": "7cb7572007e3f6631d5a902a454b81ed", "score": "0.5145033", "text": "function chooseWord() {\n\t\t$split_word = array();\n\t\t\n\t\t//Get words out of the word list file.\n\t\t$wordlist = $this->getWordList();\n\t\t//Choose a word from the list, and ensure it has no repeated letters.\n\t\t//We do this rather than pruning the list because it might be an option in a later version.\n while (count(array_unique($split_word)) != 5) {\n\t\t\t$word = (array_rand($wordlist));\n\t\t\t$word = $wordlist[$word];\n\t\t\t\n\t\t\t$split_word = str_split($word);\n\t\t}\n\t\t//Save the word we ended up with.\n\t\t$this->opponents_word = $word;\n return $word;\n }", "title": "" }, { "docid": "07ceb43c82750cab6e79a798806e96ca", "score": "0.5130094", "text": "function getLemmaFromForm($wordForm)\n {\n $word = mb_strtolower($wordForm);\n $variation = $this->WordVariation->where('variation', $word)->first();\n if($variation === NULL) {\n return $word;\n }\n return $variation->word;\n }", "title": "" }, { "docid": "5a88dd01f62074a8b8209b85fc0ec827", "score": "0.5127756", "text": "function analyseword($tok)\r\n\t{\r\n\t\t// Si c'est un nombre\r\n\t\tif ((isset($tok[0]) && $tok[0] == '$') || (isset($tok[0]) && $tok[0] == '#') || ($tok == (string)intval($tok)))\r\n\t\treturn $this->formatspecialtok($tok, $this->colornumber, $this->stylenumber);\r\n\t\t// Si c'est vide, on renvoie une chaine vide\r\n\t\tif (empty($tok)) return $tok;\r\n\t\t// Si c'est un mot cle\r\n\t\tif ((($this->case_sensitive) && (is_integer(array_search($tok, $this->keywords, FALSE)))) ||\r\n\t\t((!$this->case_sensitive) && (is_integer($this->array_search_case($tok, $this->keywords)))))\r\n\t\treturn $this->formatspecialtok($tok, $this->colorkeyword, $this->stylekeyword);\r\n\t\t// Sinon, on renvoie le mot sans formattage\r\n\t\treturn $this->formatspecialtok($tok, $this->colortext, $this->styletext);\r\n\t}", "title": "" }, { "docid": "6eca05bd3b9dac13db1dbf853f438716", "score": "0.51261014", "text": "function short_text ($text) {\r\n \treturn substr($text, 0, strrpos($text, ' '));\r\n }", "title": "" }, { "docid": "07c3af047c1774fc1a275561cc434889", "score": "0.5125465", "text": "function edit_mword_new($text, $tid, $ord, $len) \n{\n global $tbpref;\n\n $term = new Term();\n $term->lgid = get_first_value(\n \"SELECT TxLgID AS value FROM {$tbpref}texts WHERE TxID = $tid\"\n );\n $term->text = prepare_textdata($text);\n $term->textlc = mb_strtolower($term->text, 'UTF-8');\n\n $term->id = get_first_value(\n \"SELECT WoID AS value FROM {$tbpref}words \n WHERE WoLgID = $term->lgid AND WoTextLC = \" . \n convert_string_to_sqlsyntax($term->textlc)\n );\n if (isset($term->id)) { \n $term->text = get_first_value(\n \"SELECT WoText AS value FROM {$tbpref}words WHERE WoID = $term->id\"\n ); \n }\n edit_mword_display_new($term, $tid, $ord, $len);\n\n}", "title": "" }, { "docid": "10669dc1611cac1e30c54cdbafa1c9cf", "score": "0.5122856", "text": "function test_makeTitleCase_oneWord()\n {\n //Arrange\n $test_TitleCaseGenerator = new TitleCaseGenerator;\n $input = \"beowulf\";\n\n //Act\n $result = $test_TitleCaseGenerator->makeTitleCase($input);\n\n //Assert\n $this->assertEquals(\"Beowulf\", $result);\n }", "title": "" }, { "docid": "87cbd3ccabac22461ddbeedef6f563d1", "score": "0.5111629", "text": "public static function variablize($word) {\n\t\t$word = self::toCamelCase($word);\n\t\treturn strtolower($word[0]).substr($word,1);\n\t}", "title": "" }, { "docid": "570c3c7d0a7b6df0068c1d0697792ffc", "score": "0.51098543", "text": "private function isSafeWord($word, $stopWords, $phraseLength) {\n if (sizeof($stopWords) > 0) {\n $safeWord = '';\n foreach ($stopWords as $stopWord) { //For each list of stop words\n if (in_array($word, $stopWord->getList())) { //If the current word is in the list\n //If this is not a minimal length stop word (so we keep \"in correlation with\" but throw out \"in\")\n if ($stopWord->getMinPhraseLength() && ($phraseLength + 1 >= $stopWord->getMinPhraseLength())) {\n $safeWord = $word;\n } else { //return \"\"\n $safeWord = '';\n break;\n }\n } else { //Current word is not in the list\n $safeWord = $word;\n }\n }\n return $safeWord;\n }\n return $word;\n }", "title": "" }, { "docid": "584be8b4fb9bb3a5652af42cf3e1aeb9", "score": "0.51072073", "text": "function suggest_spelling($string) {\n $dict_config = pspell_config_create('en', 'american');\n pspell_config_personal($dict_config, '/tmp/custom.pws');\n pspell_config_ignore($dict_config, 2); \n pspell_config_mode($dict_config, PSPELL_FAST); \n $dictionary = pspell_new_config($dict_config);\n\n // pspell_add_to_personal($dictionary, \"doofburger\");\n // pspell_save_wordlist($dictionary);\n\n $dictionary = pspell_new_config($dict_config);\n\t\n //Make sure we know whether we've suggested anything\n $suggested_replacement = false;\n\n //Now we've got it set up, break it up by words\n $string = explode(' ', $string); \n foreach ($string as $key=>$value) {\n $value = trim(str_replace(',', '', $value));\n if ( (strlen($value) > 3) && (! pspell_check($dictionary, $value)) ) {\n //If we can't find a suggestion\n $suggestion = pspell_suggest($dictionary, $value); \n\t //Suggestions are case sensitive, so check first\n if (strtolower($suggestion[0]) != strtolower($value)) {\n $string[$key] = $suggestion[0]; \n $suggested_replacement = true;\n }\n }\n }\n\n if ($suggested_replacement) {\n //We had a suggestion, so return the data\n return implode(' ', $string); \n } else {\n return null;\n }\n}", "title": "" }, { "docid": "b2ea79bcca9ea5c4d8b7a52abdbbf822", "score": "0.5105291", "text": "public function check($word);", "title": "" }, { "docid": "691e05b2f4347fb5e139aa17f54d2c85", "score": "0.5105234", "text": "function get_random_word($min_length, $max_length) {\n// and return it\n\n // generate a random word\n $word = '';\n // remember to change this path to suit your system\n $dictionary = '/usr/dict/words'; // the ispell dictionary\n $fp = @fopen($dictionary, 'r');\n if(!$fp) {\n return false;\n }\n $size = filesize($dictionary);\n\n // go to a random location in dictionary\n $rand_location = rand(0, $size);\n fseek($fp, $rand_location);\n\n // get the next whole word of the right length in the file\n while ((strlen($word) < $min_length) || (strlen($word)>$max_length) || (strstr($word, \"'\"))) {\n if (feof($fp)) {\n fseek($fp, 0); // if at end, go to start\n }\n $word = fgets($fp, 80); // skip first word as it could be partial\n $word = fgets($fp, 80); // the potential password\n }\n $word = trim($word); // trim the trailing \\n from fgets\n return $word;\n}", "title": "" }, { "docid": "bcdc94c75a64b2a0ac7ad8da8f5a3903", "score": "0.5090405", "text": "static public function pluralize($word) {\n\t\treturn \\Mmitasch\\Flow4ember\\Utility\\EmberInflector::pluralize($word);\n\t}", "title": "" }, { "docid": "8b5d8e7b37266b10f0285751e28af60f", "score": "0.50900525", "text": "function firstWords($string, $count)\n{\n $string = strip_tags($string);\n return implode(' ', array_slice(explode(' ',$string), 0, $count));\n}", "title": "" }, { "docid": "ec3d91926be0cb137c2c0b512c7e9661", "score": "0.5089344", "text": "public function wordHumanize($word)\n {\n return ucwords(str_replace('_', ' ', $word));\n }", "title": "" }, { "docid": "4b88fc5a4301ddff5292d72734aa194c", "score": "0.5086259", "text": "function get_random_word($min_length, $max_length) {\r\n// and return it\r\n\r\n // generate a random word\r\n $word = '';\r\n // remember to change this path to suit your system\r\n $dictionary = '/usr/dict/words'; // the ispell dictionary\r\n $fp = @fopen($dictionary, 'r');\r\n if(!$fp) {\r\n return false;\r\n }\r\n $size = filesize($dictionary);\r\n\r\n // go to a random location in dictionary\r\n $rand_location = rand(0, $size);\r\n fseek($fp, $rand_location);\r\n\r\n // get the next whole word of the right length in the file\r\n while ((strlen($word) < $min_length) || (strlen($word)>$max_length) || (strstr($word, \"'\"))) {\r\n if (feof($fp)) {\r\n fseek($fp, 0); // if at end, go to start\r\n }\r\n $word = fgets($fp, 80); // skip first word as it could be partial\r\n $word = fgets($fp, 80); // the potential password\r\n }\r\n $word = trim($word); // trim the trailing \\n from fgets\r\n return $word;\r\n}", "title": "" }, { "docid": "fe8dc31216d3d2f375913ae030ccb169", "score": "0.50746435", "text": "public function testAddWordIgnoreEmptyString()\n {\n $this->assertEquals(0, $this->dictionary->count());\n $this->dictionary->add('');\n $this->assertEquals(0, $this->dictionary->count());\n }", "title": "" }, { "docid": "dd81b60e42410df38b459d05217adcb6", "score": "0.5073162", "text": "public function removeStuff(){\n\t\n\tforeach ($this->text as $word) {\n\t\n\t$word = str_replace(chr(92), '', $word);\n\t$word = str_replace(chr(46), '', $word);\n\t$word = preg_replace('/[0-9]+/', \"\" , $word);\n\t$word = trim($word);\n\t$this->tekstas2[$word[0]][$word[1]][] = $word;\n\n\t}\n}", "title": "" }, { "docid": "bd0cbb4ff7c159f0e0f9cdd5db5db9e1", "score": "0.50704813", "text": "static function generateWord( $trim = true )\n {\n /**\n * Fetch dictionary content\n */\n $dictionary = self::$BCLoremIpsumDictionary;\n $dictionarySize = count( $dictionary );\n\n /**\n * Fetch random word (string)\n */\n $randomIndex = mt_rand( 0, $dictionarySize - 1 );\n\n /**\n * Test if trim required, else return default string\n */\n if( $trim )\n {\n return trim( str_replace( \"\\n\", '', $dictionary[$randomIndex] ) );\n }\n else\n {\n return $dictionary[$randomIndex];\n }\n }", "title": "" }, { "docid": "4b403a2a93253f40d836ff12424fb054", "score": "0.5064463", "text": "protected function singularize($name)\n {\n $name = strtolower($name);\n\n // Based on this grammar rules: http://www.ef.com/english-resources/english-grammar/singular-and-plural-nouns/\n $lastOne = substr($name, -1);\n $lastThree = substr($name, -3);\n $lastFour = substr($name, -4);\n $lastFive = substr($name, -5);\n\n $vowels = array('a', 'e', 'i', 'o', 'u', 'y');\n\n // Taken from: http://english-zone.com/spelling/plurals.html\n $exceptions = array(\n // I => US\n 'alumni' => 'alumnus',\n 'cacti' => 'cactus',\n 'foci' => 'focus',\n 'fungi' => 'fungus',\n 'nuclei' => 'nucleus',\n 'radii' => 'radius',\n 'stimuli' => 'stimulus',\n\n // ES => IS\n 'axes' => 'axis',\n 'analyses' => 'analysis',\n 'bases' => 'basis',\n 'crises' => 'crisis',\n 'diagnoses' => 'diagnosis',\n 'ellipses' => 'ellipsis',\n 'hypotheses' => 'hypothesis',\n 'oases' => 'oasis',\n 'paralyses' => 'paralysis',\n 'parentheses' => 'parenthesis',\n 'syntheses' => 'synthesis',\n 'synopses' => 'synopsis',\n 'theses' => 'thesis',\n\n // ICES => IX\n 'appendices' => 'appendix',\n 'indeces' => 'index',\n 'matrices' => 'matrix',\n\n // EAU => EAUX\n 'beaux' => 'beau',\n 'bureaux' => 'bureau',\n 'bureaus' => 'bureau',\n 'tableaux' => 'tableau',\n 'tableaus' => 'tableau',\n\n // EN => ***\n 'children' => 'child',\n 'men' => 'man',\n 'oxen' => 'ox',\n 'women' => 'woman',\n\n // A => ***\n 'bacteria' => 'bacterium',\n 'corpora' => 'corpus',\n 'criteria' => 'criterion',\n 'curricula' => 'curriculum',\n 'data' => 'datum',\n 'genera' => 'genus',\n 'media' => 'medium',\n 'memoranda' => 'memorandum',\n 'phenomena' => 'phenomenon',\n 'strata' => 'stratum',\n\n // NO CHANGE\n 'bison' => 'bison',\n 'cod' => 'cod',\n 'pike' => 'pike',\n 'salmon' => 'salmon',\n 'shrimp' => 'shrimp',\n 'swine' => 'swine',\n 'trout' => 'trout',\n 'deer' => 'deer',\n 'fish' => 'fish',\n 'means' => 'means',\n 'offspring' => 'offspring',\n 'series' => 'series',\n 'sheep' => 'sheep',\n 'species' => 'species',\n 'news' => 'news',\n 'information' => 'information',\n\n // EE => OO\n 'feet' => 'foot',\n 'geese' => 'goose',\n 'teeth' => 'tooth',\n\n // AE => A\n 'antennae' => 'antenna',\n 'formulae' => 'formula',\n 'nebulae' => 'nebula',\n 'vertebrae' => 'vertebra',\n 'vitae' => 'vita',\n\n // ICE => OUSE\n 'lice' => 'louse',\n 'mice' => 'mouse',\n\n // OTHERS\n 'leaves' => 'leaf',\n 'halves' => 'half',\n 'knives' => 'knife',\n 'wives' => 'wife',\n 'lives' => 'life',\n 'elves' => 'elf',\n 'loaves' => 'loaf',\n 'potatoes' => 'potato',\n 'tomatoes' => 'tomato',\n 'syllabi' => 'syllabus'\n );\n\n // Exceptions\n if (array_key_exists($name, $exceptions)) {\n return $exceptions[$name];\n }\n\n // Craft does not vary\n if ($lastFive === 'craft') {\n return $name;\n }\n\n // s => ses, x => xes, z => zes\n // ch => ches, sh => shes\n if ($lastThree === 'ses' || $lastThree === 'xes' || $lastThree === 'zes' || $lastFour === 'ches' || $lastFour === 'shes') {\n return substr($name, 0, -2);\n }\n\n // y => ies, does not work if there is a vowel just before the \"y\" (in this case it switch to the basic case)\n if ($lastThree === 'ies' && !in_array(substr($lastFour, 0, 1), $vowels)) {\n return substr($name, 0, -3).'y';\n }\n\n //\n\n // => s, The most simple case\n if ($lastOne === 's') {\n return substr($name, 0, -1);\n }\n\n // Should never reach that point but just in case...\n return $name;\n }", "title": "" }, { "docid": "c8baf54e09e2d24a2b394a26d26cf016", "score": "0.5060005", "text": "function validFood($food)\r\n {\r\n /*\r\n if(!empty($food) && ctype_alpha($food)) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n */\r\n\r\n $food = str_replace(' ', '', $food);\r\n return !empty($food) && ctype_alpha($food);\r\n }", "title": "" }, { "docid": "24e7df1d8da6c2844f8e61c2ba3584c8", "score": "0.50367826", "text": "function test_WordFinder_styler()\n {\n //arrange\n $test_WordFinder = new WordFinder(\"owl\", \"owl\");\n\n //act\n $result = $test_WordFinder->styleSentence2(\"nope\");\n\n //assert\n $this->assertEquals(\"<span class='theWord'>owl</span>\", $result);\n }", "title": "" }, { "docid": "bd95b42ffb2b60953dd8770727d817a8", "score": "0.503654", "text": "private function getUniqueWord()\n {\n return str_replace('.', '', $this->faker->unique()->sentence(2));\n }", "title": "" }, { "docid": "ef8b24a750788bb13cc4cb2797de057f", "score": "0.5034308", "text": "function check_string($astring, $aword)\n{\n\n}", "title": "" }, { "docid": "4354c9a7d0f450a76c2df9ed1b3418d3", "score": "0.503161", "text": "private function isStopword($word)\n {\n $word_array = array();\n \n // list came from http://meta.wikimedia.org/wiki/MySQL_4.0.20_stop_word_list\n $stopwordlist = \"things ii iii a able about above according accordingly across actually after afterwards again against ain't all allow allows almost alone along already also although always am among amongst an and another any anybody anyhow anyone anything anyway anyways anywhere apart appear appreciate appropriate are aren't around as aside ask asking associated at available away awfully be became because become becomes becoming been before beforehand behind being believe below beside besides best better between beyond both brief but by c'mon c's came can can't cannot cant cause causes certain certainly changes clearly co com come comes concerning consequently consider considering contain containing contains corresponding could couldn't course currently definitely described despite did didn't different do does doesn't doing don't done down downwards during each edu eg eight either else elsewhere enough entirely especially et etc even ever every everybody everyone everything everywhere ex exactly example except far few fifth first five followed following follows for former formerly forth four from further furthermore get gets getting given gives go goes going gone got gotten greetings had hadn't happens hardly has hasn't have haven't having he he's help hence her here here's hereafter hereby herein hereupon hers herself hi him himself his hither hopefully how howbeit however i'd i'll i'm i've ie if ignored immediate in inasmuch inc indeed indicate indicated indicates inner insofar instead into inward is isn't it it'd it'll it's its itself just keep keeps kept know knows known last lately later latter latterly least less lest let let's like liked likely little look looking looks ltd mainly many may maybe me mean meanwhile merely might more moreover most mostly much must my myself name namely nd near nearly necessary need needs neither never nevertheless new next nine no nobody non none noone nor normally not nothing novel now nowhere obviously of off often oh ok okay old on once one ones only onto or other others otherwise ought our ours ourselves out outside over overall own part particular particularly per perhaps placed please plus possible presumably probably provides que quite qv rather rd re really reasonably regarding regardless regards relatively respectively right said same saw say saying says second secondly see seeing seem seemed seeming seems seen self selves sensible sent serious seriously seven several shall she should shouldn't since six so some somebody somehow someone something sometime sometimes somewhat somewhere soon sorry specified specify specifying still sub such sup sure t's take taken tell tends th than thank thanks thanx that that's thats the their theirs them themselves then thence there there's thereafter thereby therefore therein theres thereupon these they they'd they'll they're they've think third this thorough thoroughly those though three through throughout thru thus to together too took toward towards tried tries truly try trying twice two un under unfortunately unless unlikely until unto up upon us use used useful uses using usually value various very via viz vs want wants was wasn't way we we'd we'll we're we've welcome well went were weren't what what's whatever when whence whenever where where's whereafter whereas whereby wherein whereupon wherever whether which while whither who who's whoever whole whom whose why will willing wish with within without won't wonder would would wouldn't yes yet you you'd you'll you're you've your yours yourself yourselves zero\";\n \n $word_array = explode(' ', $stopwordlist);\n \n if (array_search(strtolower($word), $word_array) == true) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "39e0b1a5df9ab524efc8ad3dc20c87e7", "score": "0.5031586", "text": "function words() { # :: Str -> Collection\n return (new Collection (explode(' ', $this->value)))\n -> of ('Data.Str');\n }", "title": "" }, { "docid": "56aba7922304909094893370a8392262", "score": "0.50263983", "text": "public function prepareWord($phrase, $no_regexp)\n\t{\n\t\treturn $this->_searchAPI->prepareWord($phrase, $no_regexp);\n\t}", "title": "" } ]
91c407e103521595f69f75dcd3e27212
overridable method called when a queue item is about to be inserted Following this call, the model will be saved.
[ { "docid": "ee96d2ea3f5bf3ded30a437e05c93bf4", "score": "0.55634767", "text": "protected function onItemInsert(ECash_Models_WritableModel $model)\n\t\t{\n\t\t}", "title": "" } ]
[ { "docid": "eb2eefdaa68647138281a6a0e908993c", "score": "0.7041644", "text": "public function insert(ECash_Queues_BasicQueueItem $item)\n\t\t{\n\t\t\t$queue_entry = $item->getModel();\n\t\t\t$queue_entry->date_queued = time();\n\t\t\t$queue_entry->queue_id = $this->model->queue_id;\n\t\t\t$this->onItemInsert($queue_entry);\n\t\t\t$queue_entry->save();\n\t\t\t$this->onItemInsertComplete($queue_entry);\n\t\t}", "title": "" }, { "docid": "1a95546f7b98e83c2c90555d35beac4c", "score": "0.66021323", "text": "public function beforeSave()\n {\n if ($this->getItem()) {\n $this->setSendquoteItemId($this->getItem()->getId());\n }\n return parent::beforeSave();\n }", "title": "" }, { "docid": "fca61bd9771b2202bc2453d21bf4db8e", "score": "0.61076766", "text": "protected function afterInsert()\n {\n }", "title": "" }, { "docid": "0c2439491afb0d65f4d30ecb7919809b", "score": "0.6051779", "text": "function save() {\n\n\t\tif ( $this->exists ) {\n\t\t\t// update changed fields\n\t\t\t$changed_data = array_intersect_key( $this->data, array_flip( $this->changed_fields ) );\n\n\t\t\t// serialize\n\t\t\t$changed_data = array_map( 'maybe_serialize', $changed_data );\n\n\t\t\tif ( empty( $changed_data ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t$queue_id = $this->get_id();\n\n\t\t\t$updated = $this->update( $queue_id, $changed_data );\n\n\t\t\tif ( false === $updated ) {\n\t\t\t\t// Return here to prevent cache updates on error\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tdo_action( 'ig_es_object_update', $this ); // cleans object cache\n\t\t} else {\n\t\t\t$this->set_created_at( new DateTime() );\n\t\t\t$this->data = array_map( 'maybe_serialize', $this->data );\n\t\t\t\n\t\t\t// insert row\n\t\t\t$queue_id = $this->insert( $this->data );\n\n\t\t\tif ( $queue_id ) {\n\t\t\t\t$this->exists = true;\n\t\t\t\t$this->id = $queue_id;\n\t\t\t} else {\n\n\t\t\t\tES()->logger->error( sprintf( __( 'Could not insert into \\'%1$s\\' table. \\'%1$s\\' may not be present in the database.', 'email-subscribers' ), $this->table_name ), $this->logger_context );\n\n\t\t\t\t// Return here to prevent cache updates on error\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// reset changed data\n\t\t// important to reset after cache hooks\n\t\t$this->changed_fields = [];\n\t\t$this->original_data = $this->data;\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "21f72c6212d18d53fed9f55ccdc285e6", "score": "0.6030426", "text": "protected function afterInserting()\n {\n }", "title": "" }, { "docid": "4197347deb6e34547b749cf6c093e221", "score": "0.6005649", "text": "protected function _insert()\n {\n $this->_setModificationInfo();\n $this->_setCreatedInfo();\n }", "title": "" }, { "docid": "6d9b9edfcd7b4763f062e6ade3fcff5e", "score": "0.59970444", "text": "public function save()\n {\n // Quantity is reset to 1 if it's not specified, so make sure it's included\n if (count($this->updatedFields) AND !in_array('Quantity', $this->updatedFields)) {\n $this->updatedFields[] = 'Quantity';\n }\n\n // Need to save custom fields first\n $this->saveCustom();\n parent::save();\n }", "title": "" }, { "docid": "3e62802ab1bf9334d00098d7f031662e", "score": "0.5974309", "text": "protected function _postInsert()\n {\n }", "title": "" }, { "docid": "e182678737706bd3a69ceb9b3c36e0b6", "score": "0.591742", "text": "public function enqueue()\n {\n }", "title": "" }, { "docid": "e182678737706bd3a69ceb9b3c36e0b6", "score": "0.591742", "text": "public function enqueue()\n {\n }", "title": "" }, { "docid": "e182678737706bd3a69ceb9b3c36e0b6", "score": "0.591742", "text": "public function enqueue()\n {\n }", "title": "" }, { "docid": "e182678737706bd3a69ceb9b3c36e0b6", "score": "0.591742", "text": "public function enqueue()\n {\n }", "title": "" }, { "docid": "e182678737706bd3a69ceb9b3c36e0b6", "score": "0.591742", "text": "public function enqueue()\n {\n }", "title": "" }, { "docid": "e182678737706bd3a69ceb9b3c36e0b6", "score": "0.591742", "text": "public function enqueue()\n {\n }", "title": "" }, { "docid": "8373b4fafe7293ffe01de7c2d0fd2b25", "score": "0.5910914", "text": "public function hookAfterSaveItem($args) {\n $item = $args['record'];\n if ($item->item_type_id != get_option('iiifitems_annotation_item_type')) {\n $json = IiifItems_Util_Canvas::buildCanvas($item);\n IiifApiBridge_Util_JsonTransform::transformCanvas($json, $item);\n if ($args['insert']) {\n IiifApiBridge_Queue_Canvas::create($item, $json);\n } else {\n IiifApiBridge_Queue_Canvas::update($item, $json);\n }\n if (!empty($item->collection_id)) {\n $this->hookAfterSaveCollection(array(\n 'record' => get_record_by_id('Collection', $item->collection_id),\n 'insert' => false,\n ));\n }\n } else {\n $annotatedItem = IiifItems_Util_Annotation::findAnnotatedItemFor($item);\n $json = IiifItems_Util_Annotation::buildAnnotation($item);\n IiifApiBridge_Util_JsonTransform::transformAnnotation($json, $item, $annotatedItem);\n if ($args['insert']) {\n IiifApiBridge_Queue_Annotation::create($item, $json);\n } else {\n IiifApiBridge_Queue_Annotation::update($item, $json);\n }\n if (!empty($annotatedItem->collection_id)) {\n $this->hookAfterSaveCollection(array(\n 'record' => get_record_by_id('Collection', $annotatedItem->collection_id),\n 'insert' => false,\n ));\n }\n }\n }", "title": "" }, { "docid": "28a108455e579abe775f0a5ef2bd2839", "score": "0.5887854", "text": "public function ___added(Saveable $item) {\n\t\t$this->log(\"Added\", $item);\n\t}", "title": "" }, { "docid": "4de0b28269d7ae54673b61a23f99fd6c", "score": "0.5879387", "text": "protected function _postInsert()\n\t{\n\t\tforeach ($this->getItems()->items() as $item)\n\t\t\tif (isset($item->stock->auction_id) && $item->stock->auction_id)\n\t\t\t\t\\Auction\\PinAuction::setPurchase($item->stock->auction_id, $this->id);\n\t}", "title": "" }, { "docid": "a0fa357b06c71b6b7cb6d64ac8b0992c", "score": "0.5858199", "text": "public function onInsert()\n {\n }", "title": "" }, { "docid": "c8971e0c104db66565e6185887d2cb9e", "score": "0.58559364", "text": "protected function send(){\n $data = base64_encode(serialize($this));\n $header = array(\n 'persistent'=>'true',\n 'suppress_content_length' => 'true',\n );\n // log_message('QUEUE_ITEM', \" THIS SERIALIZED: \" . serialize($this));\n get_instance()->activemq->addItem($data, $header);\n }", "title": "" }, { "docid": "8810cc39193d22aecad9990c6ddaf642", "score": "0.5851119", "text": "protected abstract function msgItemSuccessfullyAdded();", "title": "" }, { "docid": "42ad76dd9f4a58bdbf67f703873a62f4", "score": "0.58456254", "text": "public function execute() {\n $this->getQueue()->push($this->getJob(), $this->getJobOptions());\n }", "title": "" }, { "docid": "0321134ff3c4209fec8d0c0d118dd9ea", "score": "0.5835935", "text": "protected function afterInsertAccepting()\n {\n }", "title": "" }, { "docid": "31fdc7a12973bd68139830c72d6400f9", "score": "0.58186835", "text": "public function enqueue() {\n }", "title": "" }, { "docid": "cb4c1ec3d75733a22ffbabadeceabaae", "score": "0.5784667", "text": "abstract protected function saveItems();", "title": "" }, { "docid": "d8ede08de1562ec7ffa81cad303bf009", "score": "0.57742846", "text": "public function ___saveReady(Saveable $item) { }", "title": "" }, { "docid": "6ed9c114b12c194812d3572064e3f045", "score": "0.5773656", "text": "public function onAfterSave() {}", "title": "" }, { "docid": "3769e72ae227a664a8e8ceef9b610e86", "score": "0.57618046", "text": "protected function _postSave()\n {}", "title": "" }, { "docid": "dfab4e25c7e869aa1cd0228ac9b31e6c", "score": "0.574956", "text": "public function enqueue($item)\n {\n $this->items[] = $item;\n }", "title": "" }, { "docid": "64bdd078fa8bdd893d5ac2a60b2ca1d8", "score": "0.57347983", "text": "public function onBeforeSave() {}", "title": "" }, { "docid": "14e49c34d24418caeab270806c7c9806", "score": "0.57250017", "text": "public function save()\n {\n $em = self::getEntityManager();\n $em->persist($this);\n $em->flush();\n }", "title": "" }, { "docid": "02caff05785bd9f851f0e3d51f188e34", "score": "0.5716316", "text": "protected function _postInsert()\n\t{\n\t}", "title": "" }, { "docid": "428a61c95e41d1093b53f7ef52a75c4a", "score": "0.57150936", "text": "protected function preInsert( ModelInterface &$model ) {\n }", "title": "" }, { "docid": "31e128d1ee7d924c406b6a628a45823e", "score": "0.57070863", "text": "protected function beforeInserting()\n {\n }", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.5699601", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "6f7901812b039238811166570a2da040", "score": "0.5684833", "text": "public function queue()\n {\n $em = $this->getEntityManager();\n\n $task = new EventConsequenceTask();\n $task->setConsequence($this->entity);\n\n $em->persist($task);\n $em->flush();\n }", "title": "" }, { "docid": "208010ea1dd6539aee19473eb34b8b12", "score": "0.5661672", "text": "public function add() \n {\n // prepare the model to insert a new item in the database\n if($this->request->is('post')) \n {\n $this->Item->create();\n \n if($this->Item->save($this->request->data))\n {\n $this->redirect('index');\n }\n else \n {\n //ne faeit rien\n \n }\n }\n \n \n }", "title": "" }, { "docid": "5a58c5a84b286d981cb91e03c93fc083", "score": "0.56375444", "text": "public function onPostDispatch()\n {\n /** @var Shipperhq_Shipper_Model_Storage[] $storageList */\n $storageList = Mage::helper('shipperhq_shipper')->storageManager()->getStorageObjects();\n foreach ($storageList as $storage) {\n if ($storage->hasDataChanges() && $storage->getId()) {\n $this->_saveStorageInstance($storage);\n }\n }\n }", "title": "" }, { "docid": "90233515af83bb99989a4b4b79c192bb", "score": "0.56228864", "text": "protected function _save()\n {}", "title": "" }, { "docid": "b1d19fd769c5c13f136d157cd01c510a", "score": "0.56193763", "text": "public function setItem()\n {\n //conditional checks by taking advantage of polymorphism\n $this->setAllBasics();\n $this->setParams();\n\n $addQuery = 'INSERT INTO items(sku, name, price, type, height, width, length) VALUES (:sku,:name,:price, :type,:height, :width, :length)';\n $query = $this->pdo->prepare($addQuery);\n $query->bindValue(':sku', $this->getSKU());\n $query->bindValue(':name', $this->getName());\n $query->bindValue(':price', $this->getPrice());\n $query->bindValue(':type', $this->getType());\n $query->bindValue(':height', $this->getHeight());\n $query->bindValue(':width', $this->getWidth());\n $query->bindValue(':length', $this->getLength());\n\n $query->execute();\n }", "title": "" }, { "docid": "1052ecabe457bc82673027c513ac3d4f", "score": "0.5598103", "text": "public function save()\n {\n// \tif (empty($this->timestampCreated)) $this->timestampCreated = time();\n// \tif (empty($this->accepted)) $this->accepted = false;\n// \tif (empty($this->rejected)) $this->rejected = false;\n// \tif (empty($this->agreed)) $this->agreed = false;\n \tparent::save();\n }", "title": "" }, { "docid": "7eadbd5557f1f6a421109a7402cdfb92", "score": "0.5592063", "text": "public function insert(): void\n {\n parent::insert();\n }", "title": "" }, { "docid": "d9dd725f45f4ae6a933bcec42235ac53", "score": "0.556516", "text": "protected function _insert()\n {\n }", "title": "" }, { "docid": "6643061b61952afb6a7d797af4eeb29e", "score": "0.55570936", "text": "public function postPersist()\n {\n }", "title": "" }, { "docid": "55c5f33397cb784a9e0db64bc5bf9fa3", "score": "0.55565375", "text": "protected function _saveBefore()\n {\n // nothing here\n }", "title": "" }, { "docid": "253c328df7ce6d0a45c945d6ab9afdc8", "score": "0.5551078", "text": "public function enqueue($item)\n {\n array_push($this->array, $item);\n }", "title": "" }, { "docid": "b458e72eb56fa7bbea743e55b6332f97", "score": "0.5550673", "text": "protected function afterSave()\n {\n return parent::afterSave();\n if (!$this->order) $this->order = $this->id;\n $this->save(false);\n }", "title": "" }, { "docid": "d7c861595f5c02464e57d0e1667fafb7", "score": "0.55349505", "text": "protected function insert()\n\t{\n\t\t$this->autofill();\n\n\t\tparent::insert();\n\n\t}", "title": "" }, { "docid": "1abf8255fcc3a90c61c88a1283410573", "score": "0.5533871", "text": "public function Add()\n\t{\n\t\t$this->_processInsert();\n\t}", "title": "" }, { "docid": "1abf8255fcc3a90c61c88a1283410573", "score": "0.5533871", "text": "public function Add()\n\t{\n\t\t$this->_processInsert();\n\t}", "title": "" }, { "docid": "b0bd71f0dde3728a6da64e51b3d279fd", "score": "0.55207175", "text": "public function SaveQueueemail() {\n\t\t\ttry {\n\t\t\t\t// Update any fields for controls that have been created\n\t\t\t\tif ($this->txtTo) $this->objQueueemail->To = $this->txtTo->Text;\n\t\t\t\tif ($this->txtSubject) $this->objQueueemail->Subject = $this->txtSubject->Text;\n\t\t\t\tif ($this->txtBody) $this->objQueueemail->Body = $this->txtBody->Text;\n\t\t\t\tif ($this->txtStatus) $this->objQueueemail->Status = $this->txtStatus->Text;\n\t\t\t\tif ($this->txtLog) $this->objQueueemail->Log = $this->txtLog->Text;\n\t\t\t\tif ($this->txtIdUser) $this->objQueueemail->IdUser = $this->txtIdUser->Text;\n\t\t\t\tif ($this->calCreateDateTime) $this->objQueueemail->CreateDateTime = $this->calCreateDateTime->DateTime;\n\n\t\t\t\t// Update any UniqueReverseReferences (if any) for controls that have been created for it\n\n\t\t\t\t// Save the Queueemail object\n\t\t\t\t$this->objQueueemail->Save();\n\n\t\t\t\t// Finally, update any ManyToManyReferences (if any)\n\t\t\t} catch (QCallerException $objExc) {\n\t\t\t\t$objExc->IncrementOffset();\n\t\t\t\tthrow $objExc;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "61f058f1723d06839a1fe2b312c93fb6", "score": "0.5509228", "text": "protected function performPostPersistCallback()\n {\n // echo 'inserted a record ...';\n return true;\n }", "title": "" }, { "docid": "8051fb795ce956d0c48f7268327f3a35", "score": "0.5492304", "text": "protected function beforeInsert()\n {\n }", "title": "" }, { "docid": "8dd09eddea6bd186202f174c457ef436", "score": "0.5483733", "text": "private function performQueueOperations()\n\t{\n\t\t//$this->queue_manager = high_risk\n\t\t$application_id = $this->application->getModel()->application_id;\n\t\t$qi = $this->queue_manager->getQueue(\"high_risk\")->getNewQueueItem($application_id);\n\t\t$this->queue_manager->moveToQueue($qi, \"high_risk\");\t\t\n\t}", "title": "" }, { "docid": "122323c780f2c8c484e39827f64a4fd4", "score": "0.5465258", "text": "protected function afterSave()\n {\n\n }", "title": "" }, { "docid": "122323c780f2c8c484e39827f64a4fd4", "score": "0.5465258", "text": "protected function afterSave()\n {\n\n }", "title": "" }, { "docid": "1df7b65c856ff3fd5b263b552fbd4eb6", "score": "0.5465099", "text": "public function prePersist()\n {\n }", "title": "" }, { "docid": "08c8664a2b701f605d0d9e76221dd657", "score": "0.5461388", "text": "public function beforeSave() {\n\t\tparent::beforeSave ();\n\t}", "title": "" }, { "docid": "c40cbcbb072af4dd7be410677e0f4cf6", "score": "0.5448744", "text": "public function preSave( ezcPersistentObjectDefinition $def, ezcDbHandler $db, ezcQueryInsert $q )\n {\n }", "title": "" }, { "docid": "28abe885cf7843e44fca31136a44d0ae", "score": "0.54439485", "text": "public function afterSave() {\n \n }", "title": "" }, { "docid": "93b9758d9afab3cd3274d79ff1ac06db", "score": "0.54437745", "text": "public function AddItem() {\n\tdie('This method not written yet!'); // is it needed now?\n }", "title": "" }, { "docid": "93a7e3feaee84145f3d1544cd7efd0d4", "score": "0.543829", "text": "public function create()\n {\n // Not needed cause this is coming from the item listing\n }", "title": "" }, { "docid": "85e778dff305a448c98663c1bd774aa1", "score": "0.54365414", "text": "public function insert() {\n \n }", "title": "" }, { "docid": "e7637d9ea29521a5657e97e76cdb32f4", "score": "0.542338", "text": "public function insert()\n {\n $this->id = insert($this);\n }", "title": "" }, { "docid": "dd7b8f9ff912a055c070fe13fd8d9230", "score": "0.5416667", "text": "function queue() {\n\n\t\t$date = false;\n\t\t$queue = new Queued_Event();\n\t\t$queue->set_workflow_id( $this->get_id() );\n\n\t\tswitch( $this->get_timing_type() ) {\n\n\t\t\tcase 'delayed':\n\t\t\t\t$date = new DateTime();\n\t\t\t\t$date->setTimestamp( time() + $this->get_timing_delay() );\n\t\t\t\tbreak;\n\n\t\t\tcase 'scheduled':\n\t\t\t\t$date = $this->calculate_scheduled_datetime();\n\t\t\t\tbreak;\n\n\t\t\tcase 'fixed':\n\t\t\t\t$date = $this->get_fixed_time();\n\t\t\t\tbreak;\n\n\t\t\tcase 'datetime':\n\t\t\t\t$date = $this->get_variable_time();\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$date = apply_filters( 'automatewoo/workflow/queue_date', $date, $this );\n\n\t\tif ( ! $date ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$queue->set_date_due( $date );\n\t\t$queue->save();\n\n\t\t$queue->store_data_layer( $this->data_layer() ); // add meta data after saved\n\n\t\treturn $queue;\n\t}", "title": "" }, { "docid": "10861417608bdbd72cd519eed731ce98", "score": "0.54121363", "text": "public function save()\n {\n if($this->changed) {\n Item::saveNewValues($this->id, $this->name, $this->status);\n } else {\n echo 'Nothing changed!';\n }\n }", "title": "" }, { "docid": "60ec4c055d829ac8afa02c40e81b6cd0", "score": "0.54090303", "text": "protected function afterSave() {\n\n }", "title": "" }, { "docid": "0e1d44abb795d4cf1dbea62dad70026d", "score": "0.53990185", "text": "public function insert_entry()\r\n\t{\r\n\t\t$this->db->insert(\"email_workflow\", $this);\r\n\t}", "title": "" }, { "docid": "3f80ded3a3ee11501969716097c3f472", "score": "0.5385559", "text": "public function insert( $item )\n\t{\n\t\t$this->_items[] = $item;\n\t}", "title": "" }, { "docid": "e251c3dc304494cd7334a3faca109d15", "score": "0.53854793", "text": "public function run()\n {\n $this->execute(function ($item) {\n Unit::insert($item->toArray());\n });\n }", "title": "" }, { "docid": "d1ac69e1f3d368652f1621e168a19c31", "score": "0.5380274", "text": "protected function _insert()\n\t{\n\t}", "title": "" }, { "docid": "57c18b3865aaeb2c39b081324fb762e9", "score": "0.53790474", "text": "function afterSave(){\n\t\t$this->scheduleNow($this->id);\n\t}", "title": "" }, { "docid": "5c71e21a234f33ae27a286e798a691e7", "score": "0.5376089", "text": "public function create() {\n\t\t\t\n\t\t/* set method */\n\t\t$this->request_method = 'create';\n\t\t\t\t\n\t\t/* check for a model id */\n\t\tif( $this->id) {\n\t\t\t$this->set_error( 4, 'A model id is set in the request, cant create a new item on server' );\n\t\t\treturn;\t\t\t\n\t\t}\n\t\t\n\t\t/* read the data from backbone */\n\t\t$this->parse_model_request();\n\n\t\tif($this->get_errors())\n\t\t\treturn;\n\t\t\t\n\t\t/* get the parsed post data from request */\n\t\t$item_data = $this->parsed_model_request;\n\n\t\t/* privileg checking @TODO outsource to filter */\n\t\tif( $this->properties->access == \"loggedin\" && ! current_user_can('edit_posts')) { // TODO improve CPT\n\t\t\t$this->set_error( 9, 'no user privileges to save the item on server' );\n\t\t\treturn;\n\t\t}\t\n\t\t\t\t \t\n\t\t/* insert database */\n\t\tswitch( $this->properties->modelclass ) {\n\t\t\t\n\t\t\t/* posts */\n\t\t\tcase('post'):\n\t\t\t\t$post = $item_data['post'];\t\t\t\t\t\t\t\n\t\t\t\t$result = wp_insert_post( $post );\n\t\t\t\t\n\t\t\t\t/* was there an error saving the post */\n\t\t\t\tif( ! $result) {\n\t\t\t\t\t$this->set_error( 6, 'saving the item failed on the server' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* got the id of the created post */\n\t\t\t\t$new_id = $result;\t\n\t\t\tbreak;\n\n\t\t\tcase('attachment'):\n\t\t\t\t//@TODO\n\t\t\t\t$attachment = $item_data['post'];\t\n\t\t\t\t\n\t\t\t\t/* a post parent for a attachment must be set */\t\t\t\n\t\t\t\tif( ! $this->parent_id ) {\n\t\t\t\t\t$this->set_error( 7, 'the attachment has no parent id' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* upload the file ($_FILE) and attach it to the parent post\t\t\t */\n\t\t\t\t$result = media_handle_upload('async-upload', $this->parent_id, $attachment);\t\t\n if ( is_wp_error( $result )) {\n\t\t\t\t\t$this->set_error( 8, 'saving the attachment failed on the server' ); \n return; \n }\n\t\t\t\t$new_id = $result;\t\t\n\t\t\tbreak;\n\t\t\t\n\t\t\t/* comment */\n\t\t\tcase('comment'):\n\t\t\t\t$comment = $item_data['comment'];\n\n\t\t\t\t/* a post parent for a comment must be set */\t\t\t\n\t\t\t\tif( ! $this->parent_id ) {\n\t\t\t\t\t$this->set_error( 7, 'the comment has no parent id' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* in some odd cases it maybe that the parent id is not yet present in the comment array */\n\t\t\t\t$comment['comment_post_ID'] = $this->parent_id;\n\t\t\t\t\n\t\t\t\t$result = wp_insert_comment($comment);\n\t\t\t\t\n\t\t\t\t/* was there an error saving the comment */\t\t\t\t\t\t\t\n\t\t\t\tif( ! $result) {\n\t\t\t\t\t$this->set_error( 8, 'saving the comment failed on the server' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* got the id of the created comment */\n\t\t\t\t$new_id = $result;\n\t\t\tbreak;\n\t\t\tcase('user'):\n\t\t\t//@TODO\n\t\t\tbreak;\n\t\t\tcase('idone'):\n\t\t\t\t$new_id = $this->id; // interacting with the databse is outsourced to the data package handlers\t\t\t\n\t\t\tbreak;\n\t\t}\t\n\t\t\n\t\t/* save custom data, this only method does all the magic, details must be specified in the custom package handlers */\n\t\t$this->_action_custom_package_data( $new_id, $item_data);\t\n\t\t\n\t\t/* set a clean response */\n\t\t$this->parse_model_response($new_id);\t\n do_action('bb-wp-api_after_create', $new_id, $this->properties, $this );\n\t}", "title": "" }, { "docid": "bd5a6a80d37b95ffef54fe9162836f92", "score": "0.53698957", "text": "protected function saving() {\n // This will get reimplemented by children when necessary\n }", "title": "" }, { "docid": "15cfaa1887b897c60fe1e35b80ee8ecc", "score": "0.5365197", "text": "public function save()\n {\n $now = new DateTime();\n $this->timestamp = $now->getTimestamp();\n self::setClassAndTable();\n parent::saveModel();\n\n $this->id = parent::getLastID();\n\n // Send notification to watchers\n $post = Post::find([\"id\" => $this->post_id]);\n $owner = $post->user();\n $watchers = $post->watchers();\n foreach ($watchers as $user) {\n $notif = new Notification();\n $notif->user_id_from = $owner->id;\n $notif->user_id_to = $user->id;\n $notif->type = Notification::WATCHLIST_UPDATE;\n $notif->link = \"/posts/view.php?post_id=$post->id\";\n $notif->save();\n }\n }", "title": "" }, { "docid": "51d4783bfca0328cc8120a501d89bec0", "score": "0.53608775", "text": "public function store(CreateOrderItemRequest $request)\n {\n //\n }", "title": "" }, { "docid": "527e6e993997b1dfd4bd2c31c2850868", "score": "0.53588796", "text": "protected function _preSave()\n {\n if ($this->isInsert() && $this->get('expiry_date') >= 4294967295)\n {\n $this->set('expiry_date', 0);\n }\n\n parent::_preSave();\n\n if (SV_ReportImprovements_Globals::$replyBanOptions && $this->get('content_type') == 'post')\n {\n $user = $this->_getUserModel()->getUserById($this->get('user_id'));\n\n $postId = $this->get('content_id');\n $post = $this->_getPostModel()->getPostById($postId, array(\n 'join' => XenForo_Model_Post::FETCH_THREAD | XenForo_Model_Post::FETCH_FORUM,\n 'skip_wordcount' => true,\n ));\n\n if (!empty($post['thread_id']) && $user && $this->_getThreadModel()->canReplyBanUserFromThread($user, $post, $post, $errorPhraseKey))\n {\n $this->replyBanUser = $user;\n $this->replyBanThread = $post;\n $this->replyBanOptions = SV_ReportImprovements_Globals::$replyBanOptions;\n }\n else\n {\n $this->error($errorPhraseKey, 'ban_length');\n }\n }\n }", "title": "" }, { "docid": "1cff03f638d08f7511aff9d74507a9c1", "score": "0.53500384", "text": "public function save()\n {\n // Process all the items and save to the DB, then clean up\n if ($this->aChanges) {\n\n $this->aChanges = array_values($this->aChanges);\n $oDate = Factory::factory('DateTime');\n\n for ($i = 0; $i < count($this->aChanges); $i++) {\n $this->aChanges[$i]['changes'] = array_values($this->aChanges[$i]['changes']);\n $this->aChanges[$i]['changes'] = json_encode($this->aChanges[$i]['changes']);\n $this->aChanges[$i][$this->getColumnCreated()] = $oDate->format('Y-m-d H:i:s');\n $this->aChanges[$i][$this->getColumnCreatedBy()] = activeUser('id');\n $this->aChanges[$i][$this->getColumnModified()] = $oDate->format('Y-m-d H:i:s');\n $this->aChanges[$i][$this->getColumnModifiedBy()] = activeUser('id');\n }\n\n $oDb = Factory::service('Database');\n $oDb->insert_batch($this->getTableName(), $this->aChanges);\n }\n\n $this->clear();\n }", "title": "" }, { "docid": "dc2876e49a4ca844c0403f170be075db", "score": "0.53340596", "text": "protected function onModelCreated()\n {\n if ($this->addLeaf != null) {\n $this->addLeaf->setName(\"Add\");\n $this->model->addLeaf = $this->addLeaf;\n }\n\n // Hook up the event handler that returns a selection item for a given model.\n $this->model->getItemForModelEvent->attachHandler(function(Model $model){\n return $this->makeItemForValue($model->getUniqueIdentifier());\n });\n\n parent::onModelCreated();\n }", "title": "" }, { "docid": "3a6ea9bad6bcc4f9396da80f77e86593", "score": "0.5330936", "text": "protected function saveTask() {}", "title": "" }, { "docid": "ca4023d0dffedb07565e7ec3b9d04b1b", "score": "0.5328851", "text": "function queue() {\n\n\t\t$date = false;\n\t\t$queue = new ES_Workflow_Queue();\n\t\t$queue->set_workflow_id( $this->get_id() );\n\t\t$timing_type = $this->get_timing_type();\n\n\t\tswitch ( $timing_type ) {\n\n\t\t\tcase 'immediately':\n\t\t\t\t$date = new DateTime();\n\t\t\t\t$date->setTimestamp( time() );\n\t\t\t\tbreak;\n\n\t\t\tcase 'delayed':\n\t\t\t\t$date = new DateTime();\n\t\t\t\t$date->setTimestamp( time() + $this->get_timing_delay() );\n\t\t\t\tbreak;\n\n\t\t\tcase 'scheduled':\n\t\t\t\t$date = $this->calculate_scheduled_datetime();\n\t\t\t\tbreak;\n\n\t\t\tcase 'fixed':\n\t\t\t\t$date = $this->get_fixed_time();\n\t\t\t\tbreak;\n\n\t\t\tcase 'datetime':\n\t\t\t\t$date = $this->get_variable_time();\n\t\t\t\tbreak;\n\n\t\t}\n\n\t\t$date = apply_filters( 'ig_es_workflow_queue_date', $date, $this );\n\n\t\tif ( ! $date ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$queue->set_scheduled_at( $date );\n\t\t$queue->save();\n\n\t\t$queue->store_data_layer( $this->data_layer() ); // add meta data after saved\n\n\t\treturn $queue;\n\t}", "title": "" }, { "docid": "eb204983c2a5c0748dd4b72f39373fa3", "score": "0.53278565", "text": "public function afterAdd();", "title": "" }, { "docid": "010774af4e5389069b648968bbf9e8fd", "score": "0.53267634", "text": "public function save() {\n // Check to see if another tag exists with the same name\n $duplicate_tag = ORM::factory(\"tag\")\n ->where(\"name\", \"=\", $this->name)\n ->where(\"id\", \"!=\", $this->id)\n ->find();\n if ($duplicate_tag->loaded()) {\n // If so, tag its items with this tag so as to merge it\n $duplicate_tag_items = ORM::factory(\"item\")\n ->join(\"items_tags\", \"items.id\", \"items_tags.item_id\")\n ->where(\"items_tags.tag_id\", \"=\", $duplicate_tag->id)\n ->find_all();\n foreach ($duplicate_tag_items as $item) {\n $this->add($item);\n }\n\n // ... and remove the duplicate tag\n $duplicate_tag->delete();\n }\n\n if (isset($this->object_relations[\"items\"])) {\n $added = array_diff($this->changed_relations[\"items\"], $this->object_relations[\"items\"]);\n $removed = array_diff($this->object_relations[\"items\"], $this->changed_relations[\"items\"]);\n if (isset($this->changed_relations[\"items\"])) {\n $changed = array_merge($added, $removed);\n }\n $this->count = count($this->object_relations[\"items\"]) + count($added) - count($removed);\n }\n\n $result = parent::save();\n\n if (!empty($changed)) {\n foreach (ORM::factory(\"item\")->where(\"id\", \"IN\", $changed)->find_all() as $item) {\n module::event(\"item_related_update\", $item);\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "2e6bee20bcd493712604f8165e848e81", "score": "0.53182024", "text": "public function insert_in_cart()\n {\n array_push($this->shop_cart, $this->item);\n }", "title": "" }, { "docid": "0f90a97469623fa6a647aa7963bd2caa", "score": "0.5317961", "text": "public function add()\r\n {\r\n $this->start();\r\n $this->write_to_db();\r\n }", "title": "" }, { "docid": "152956442b3d5c55d013b0d8066b2c90", "score": "0.5311216", "text": "public function insert()\n\t{\n\t\treturn $this->getModel()->insert($this);\n\t}", "title": "" }, { "docid": "ae1e4e211a271d916bffa7b9cfc48656", "score": "0.5310611", "text": "public function postSave(): void;", "title": "" }, { "docid": "5b1f1288b1c428bb93f3360a110d8fa2", "score": "0.5309349", "text": "private function saveItem()\n {\n DB::beginTransaction();\n try\n {\n $product = !empty(request()->json('id')) ? Product::find(request()->json('id')) : new Product();\n $product->client_id = auth()->user()->current_client_id;\n $product->warehouse_id = auth()->user()->current_warehouse_id;\n $product->sku = request()->json('sku');\n $product->sku_client = request()->json('sku_client', null);\n $product->name = request()->json('name');\n $product->barcode = request()->json('barcode', null);\n $product->barcode_client = request()->json('barcode_client', null);\n $product->rfid = request()->json('rfid', null);\n $product->reorder_level = request()->json('reorder_level');\n $product->product_type_id = request()->json('product_type_id');\n\n /* HARDCODE IT TO BE THE DEFAULT FOR THE PRODUCT TYPE FOR NOW. CHANGE IT TO BE PER PRODUCT LATER */\n $product->default_uom = request()->json('product_type')['default_uom'];\n\n $product->uom1 = request()->json('uom1');\n $product->uom2 = request()->json('uom2', null);\n $product->uom3 = request()->json('uom3', null);\n $product->uom4 = request()->json('uom4', null);\n $product->uom5 = request()->json('uom5', null);\n $product->uom6 = request()->json('uom6', null);\n $product->uom7 = request()->json('uom7', null);\n $product->uom8 = request()->json('uom8', null);\n $product->oversized_pallet = (!empty(request()->json('oversized_pallet'))) ? true : false;\n $product->active = (!empty(request()->json('active'))) ? true : false;\n\n $product->save();\n\n //check for default bin and add it\n if( empty(request()->json('id')) )\n {\n $aisle = request()->json('aisle');\n $section = request()->json('section');\n $tier = request()->json('tier');\n $position = request()->json('position');\n\n //part of default bin data is missing\n if( empty($aisle) || empty($section) || empty($tier) || empty($position) )\n {\n throw new Exception('Default bin data is missing');\n }\n\n //add the bin\n else\n {\n $bin = new Bin();\n $bin->product_id = $product->id;\n $bin->default = true;\n $bin->active = true;\n $bin->aisle = $aisle;\n $bin->section = $section;\n $bin->tier = $tier;\n $bin->position = $position;\n $bin->save();\n }\n }\n }\n catch(\\Exception $e)\n {\n //rollback since something failed\n DB::rollback();\n\n //log error so we can trace it if need be later\n Log::info(auth()->user());\n Log::error($e);\n\n //set error message. Don't send verbose error if not in debug mode\n $err_msg = ( env('APP_DEBUG') === true ) ? $e->getMessage() : 'SQL error. Please try again or report the issue to the admin.';\n\n //send back error\n $error_message = array('errorMsg' => 'The product was not saved. Error: ' . $err_msg);\n return response()->json($error_message);\n }\n\n //if we got here, then everything worked!\n DB::commit();\n\n return $product->id;\n }", "title": "" }, { "docid": "3b0f6afa268c7ed82445a487590428e1", "score": "0.53028935", "text": "public function save()\n {\n //todo save comments\n $this->notify();\n }", "title": "" }, { "docid": "728c60bf3b9ed0d10d53a2ea1a0c088c", "score": "0.5301637", "text": "public function save()\n {\n }", "title": "" }, { "docid": "3a3b36bcb9347240aee457969f057406", "score": "0.5288578", "text": "protected function _insert(AbstractObject $obj) {\n\t\t//---\n\t\t\n\t}", "title": "" }, { "docid": "99b052c2a3ab8815617b1741f67ba9a2", "score": "0.5285727", "text": "public function save()\n {\n if($this->id != -1)\n {\n $this->update_subject();\n }\n else\n {\n $this->insert_subject();\n }\n }", "title": "" }, { "docid": "5155aa77740cbabdc890b39a057dc8de", "score": "0.5285506", "text": "public function addItem();", "title": "" }, { "docid": "350f0bc88efa5c37f17b51819e55725d", "score": "0.5284956", "text": "public function execute()\n {\n $data = $this->getRequest()->getPostValue();\n\n // Set the isNew flag\n $this->isNew = isset($data['id']);\n\n // Check if the data is valid\n if (!$data) {\n $this->_redirect(self::EDIT_URL);\n return;\n }\n\n // Attempt a save operation\n try {\n // Update dat\n $data = $this->_prepareData($data);\n\n // Create the item in the hub\n if ($this->isNew) {\n $this->objectService->create($data);\n }\n else {\n $this->objectService->update($data);\n }\n\n // Save the row data\n $this->_saveRowData($data);\n\n } catch (Exception $e) {\n $this->messageManager->addError(__($e->getMessage()));\n }\n\n // Redirect to the grid list page\n $this->_redirect(self::LIST_URL);\n }", "title": "" }, { "docid": "70ab039e3b06924613d5337fc1bf96e5", "score": "0.52810925", "text": "public function afterSave(){\n\t}", "title": "" }, { "docid": "044e55cd8be860cb83901cc7bb07d645", "score": "0.52798325", "text": "public function beforeSave()\n {\n $value = $this->getValue();\n $value = $this->makeStorableArrayFieldValue($value);\n $this->setValue($value);\n }", "title": "" }, { "docid": "c4aee2ec98f7d9e0db50961ab58b47c7", "score": "0.52708757", "text": "public function onSaving()\n {\n $entry = $this->getFormEntry();\n $adapter = $this->getAdapter();\n\n $entry->adapter = $adapter->getNamespace();\n }", "title": "" }, { "docid": "1d37e970bca1a04f900de1cc40f33fcc", "score": "0.5269678", "text": "public function saveBillableInstance()\n {\n $this->save();\n }", "title": "" }, { "docid": "f8052fd2718a29d49132d1fed1a4a2c2", "score": "0.52627134", "text": "public function store()\n {\n $this->preStoreActions($this->data);\n\n //check all the fields\n $this->validate();\n\n //save to the database\n $this->save();\n\n //do broadcast\n //$this->broadcastUpdate(\"Updated Menu for - \".Str::limit($this->accountName,50));\n\n //tidy up\n $this->afterStore($this->data['id'] ?? '');\n\n //run a user specific method IF installed and needed after save\n $this->afterStoreActions($this->data);\n }", "title": "" }, { "docid": "7461fa0236ef9763c4360623d1ce8ec5", "score": "0.5252786", "text": "public function Insert() {\n\t\t\t// Declare classes\n\t\t\t$RepItem\t\t\t= new RepItem();\n\t\t\t$ModItem\t\t\t= new ModItem();\n\t\t\t// Fetch and model Item types\n\t\t\t$combat_types\t\t= $RepItem->getAllCombatItemTypes();\n\t\t\t$combat_types\t\t= ($combat_types) ? $ModItem->combo($combat_types) : false;\n\t\t\t$noncombat_types\t= $RepItem->getAllNonCombatItemTypes();\n\t\t\t$noncombat_types\t= ($noncombat_types) ? $ModItem->combo($noncombat_types) : false;\n\t\t\t// Fetch and model fields for combo\n\t\t\t$RepQuestion\t\t= new RepQuestion();\n\t\t\t$branches\t\t\t= $RepQuestion->getAllBranches();\n\t\t\t$branches\t\t\t= ($branches) ? $ModItem->combo($branches, true) : false;\n\t\t\t// Define sub menu selection\n\t\t\t$GLOBALS['menu']['items']['opt1_css'] = 'details_item_on';\n\t\t\tView::set('branches',\t\t\t$branches);\n\t\t\tView::set('combat_types',\t\t$combat_types);\n\t\t\tView::set('noncombat_types',\t$noncombat_types);\n\t\t\t// Render view\n\t\t\tView::render('itemsInsert');\n \t\t}", "title": "" }, { "docid": "b24219362aa9ae77a711186dcfa3451d", "score": "0.52482176", "text": "public function onSlotsAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}", "title": "" } ]
df84c284b69870cfc0004ac7fd480cc5
Returns url of the widget
[ { "docid": "4d0fc00a27ce89db111f843767381d70", "score": "0.81267685", "text": "public function getURL() {\n\t\tif ($custom_url = $this->widget_manager_custom_url) {\n\t\t\treturn $custom_url;\n\t\t}\n\t\t\n\t\treturn parent::getURL();\n\t}", "title": "" } ]
[ { "docid": "78841dcaa2dd8e35cd51330ea9190a02", "score": "0.7721756", "text": "public static function urlwidgets() \n\t{ \n\t\treturn (string)'plugin.php?p=widgets'; \n\t}", "title": "" }, { "docid": "342bc52ed39cf4b6ffd5f789b29474da", "score": "0.7222469", "text": "public function getConfigureChatWidgetUrl(): string\n {\n return $this->emailConfig->getRegionAwarePortalUrl() . self::CHAT_CONFIGURE_WIDGET_PATH;\n }", "title": "" }, { "docid": "874e722d3bb97c6f626711db0973b1de", "score": "0.66700727", "text": "public function getURL()\n {\n return $this->site->getURL() . 'edit/';\n\n }", "title": "" }, { "docid": "902fafdbea1ca72502e5e55a7ecc8d53", "score": "0.6581691", "text": "public function url()\n {\n return admin_base_path(\"tests/painters/{$this->painter->getKey()}/edit\");\n }", "title": "" }, { "docid": "603c8bb9183a05df1aa78128486814c4", "score": "0.6579148", "text": "protected function getWidgetPublicPath()\n {\n return public_path()\n .'/widgets'\n .'/'.strtolower($this->type)\n .'/'.strtolower($this->author)\n .'/'.strtolower($this->name);\n }", "title": "" }, { "docid": "0d00e4c10bc4ca5d6985c1f35eec2313", "score": "0.6534438", "text": "public function get_url() {\n return new moodle_url('/blocks/bsu_area/building.php', array('id'=>$this->_instanceid));\n }", "title": "" }, { "docid": "6e22d055025353be3a3f5be4f479b7d1", "score": "0.6508879", "text": "public function get_url() {\n\t\treturn 'http://code.google.com/p/wordpress-custom-content-type-manager/wiki/Image';\n\t}", "title": "" }, { "docid": "eed7218c85015ad3a6619a86abaf9435", "score": "0.6499777", "text": "public function getHandlerUrl()\n {\n return $this->urlBuilder->getUrl('helperbar/ajax_config/templatePathHints');\n }", "title": "" }, { "docid": "46d5362aac5d99b9b25b39329ee2660f", "score": "0.64681065", "text": "public function get_url() {\n return new moodle_url('/blocks/bsu_disser/index.php', array('id'=>$this->_instanceid));\n }", "title": "" }, { "docid": "5eb5033a46d12db7fe4ae41e6e374a0b", "score": "0.6442176", "text": "public function getUrl()\n {\n return $this->url ? $this->url : $this->table->ajax_url ;\n }", "title": "" }, { "docid": "52fb2b5f46d5bfb24b3fa32650dc9ec3", "score": "0.6440695", "text": "public function getActionUrl()\n {\n return $this->getUrl('adminhtml/*/share', ['_current' => true]);\n }", "title": "" }, { "docid": "a2d8fe3cf3f681116686155b38301258", "score": "0.6408072", "text": "public function get_url() {\n\t\treturn $this->url;\n\t}", "title": "" }, { "docid": "ae440d63433f76acc6fc03d00500bef2", "score": "0.638467", "text": "public function getUrl() {\n\t\treturn $this->getLink('url');\n\t}", "title": "" }, { "docid": "068ea5b6fd7106a940e5369e0bd3d597", "score": "0.63786644", "text": "public function getInstanceUrl();", "title": "" }, { "docid": "068ea5b6fd7106a940e5369e0bd3d597", "score": "0.63786644", "text": "public function getInstanceUrl();", "title": "" }, { "docid": "93765a89e0f84e0cce6087411c9e85fa", "score": "0.6376452", "text": "public function getUrl()\n {\n return $this->getProperty(\"Url\");\n }", "title": "" }, { "docid": "8b0b839e0b943d5b56eae46d0822bb70", "score": "0.636472", "text": "public function getUrl()\r\n {\r\n return Yii::app()->createUrl('/forum/forum/view', array('id'=>$this->id));\r\n }", "title": "" }, { "docid": "a2e5945c8bda8ce49d89ec8bacc0735d", "score": "0.6342435", "text": "public function url() {\n\t\treturn $this->url;\n\t}", "title": "" }, { "docid": "3c08c6258d564e2799d5f5b05dc0db17", "score": "0.63142455", "text": "public function getUrl()\n {\n\n return $this->context->getUrl();\n\n }", "title": "" }, { "docid": "9b7b77ac37c99de8a27f7b903b7e7043", "score": "0.63087523", "text": "public function getUrl()\n {\n return $this->notificable->getUrl();\n }", "title": "" }, { "docid": "8a9325e569d904cb964407f551855822", "score": "0.6306541", "text": "protected function _getUrl()\n {\n return Router::url(\n [\n 'plugin' => false,\n 'prefix' => false,\n 'controller' => 'Rankings',\n 'action' => 'view',\n 'hash' => $this->hash,\n ],\n true\n );\n }", "title": "" }, { "docid": "cdc1196911517964b4d40617b90ecb72", "score": "0.6301748", "text": "public function getUrl()\n {\n return $this->getUrlInternal();\n }", "title": "" }, { "docid": "f19d200a7c002144259458460763d8a0", "score": "0.6295994", "text": "public function getAjaxUrl()\n {\n return Mage::getUrl('*/*/view');\n }", "title": "" }, { "docid": "b07605432216257a19bbab088a63fe94", "score": "0.6285861", "text": "protected function _getUrl()\n {\n return Router::url([\n 'plugin' => false,\n 'prefix' => false,\n 'controller' => 'Partners',\n 'action' => 'view',\n 'id' => $this->id,\n 'slug' => $this->slug,\n ]);\n }", "title": "" }, { "docid": "5d6b3b56b87e417140c89438a9fa1306", "score": "0.6282691", "text": "public function getUrl()\n {\n return url('/poll/token/' . $this->token);\n }", "title": "" }, { "docid": "7dafc0a5706d7574c1b463c7e4f6e977", "score": "0.62806237", "text": "public function GetUrl () {\n\t\treturn $this->url;\n\t}", "title": "" }, { "docid": "9a858d119138e8dc3775e8d76a5e62f1", "score": "0.6279645", "text": "public function url_callback() {\n printf( '<input type=\"text\" size=\"55\" id=\"url\" name=\"%s[url]\" value=\"\" />',\n $this->dataset_tab_group_name );\n }", "title": "" }, { "docid": "1e767edc198ba85558216dffa40e5e92", "score": "0.6270233", "text": "public function getUrl()\n {\n return $this->getParameter(self::API_URL);\n }", "title": "" }, { "docid": "9fa5239f61f34c4ea72afddc779279b5", "score": "0.62654567", "text": "public function getUrl() {\n\t\treturn $this->url;\n\t}", "title": "" }, { "docid": "9fa5239f61f34c4ea72afddc779279b5", "score": "0.62654567", "text": "public function getUrl() {\n\t\treturn $this->url;\n\t}", "title": "" }, { "docid": "9fa5239f61f34c4ea72afddc779279b5", "score": "0.62654567", "text": "public function getUrl() {\n\t\treturn $this->url;\n\t}", "title": "" }, { "docid": "f188a1b6d058949a5096c5cfb207542e", "score": "0.6260034", "text": "public static function url() {\n\t\treturn Menu::upcxUrl();\n\t}", "title": "" }, { "docid": "90ab1e5ec86661ed342f24b2163f9119", "score": "0.6254998", "text": "public function getClickUrl()\n {\n return $this->get(self::CLICK_URL);\n }", "title": "" }, { "docid": "559fa84196ff9015830483b35083e787", "score": "0.62484914", "text": "public function url()\n {\n return $this->url;\n }", "title": "" }, { "docid": "559fa84196ff9015830483b35083e787", "score": "0.62484914", "text": "public function url()\n {\n return $this->url;\n }", "title": "" }, { "docid": "820e080ad9ca4843859611cbe0ca3d22", "score": "0.6239184", "text": "public function getUrl() {\n return $this->url_;\n }", "title": "" }, { "docid": "291e2caac736ec25f4b33ecd420da4db", "score": "0.62330127", "text": "public function get_url() {\n return new moodle_url('/blocks/bsu_area/area.php', array('id'=>$this->_instanceid));\n }", "title": "" }, { "docid": "5b26a0ecd2947bb3cf5180b38e933e49", "score": "0.6230193", "text": "public function render_base_url_field() {\n\t\t?>\n\t\t<input\n\t\t\tstyle=\"width: 600px; height: 40px;\"\n\t\t\tname=\"coral_talk_base_url\"\n\t\t\tplaceholder=\"https://talk.my-site.com\"\n\t\t\tid=\"coral_talk_base_url\"\n\t\t\ttype=\"url\"\n\t\t\tvalue=\"<?php echo esc_url( get_option( 'coral_talk_base_url' ) ); ?>\"\n\t\t/>\n\t\t<?php\n\t}", "title": "" }, { "docid": "553593069a6e9c1dc057baf58d675c25", "score": "0.6225042", "text": "function wct_get_plugin_url() {\n\treturn apply_filters( 'wct_get_plugin_url', wct()->plugin_url );\n}", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.62154865", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "a7903ac08f2f591b35767e1650736568", "score": "0.6211476", "text": "public function getURL()\n {\n return $this->get('URL');\n }", "title": "" }, { "docid": "a7903ac08f2f591b35767e1650736568", "score": "0.6211476", "text": "public function getURL()\n {\n return $this->get('URL');\n }", "title": "" }, { "docid": "c5da771665d0fa30aa36c980294894f3", "score": "0.6204836", "text": "public function getUrl()\n {\n return $this->likeable->getUrl();\n }", "title": "" }, { "docid": "26415a59f543ba73b232d87fedf512b1", "score": "0.62016255", "text": "public function getUrl()\n {\n return $this->_url;\n }", "title": "" }, { "docid": "26415a59f543ba73b232d87fedf512b1", "score": "0.62016255", "text": "public function getUrl()\n {\n return $this->_url;\n }", "title": "" }, { "docid": "26415a59f543ba73b232d87fedf512b1", "score": "0.62016255", "text": "public function getUrl()\n {\n return $this->_url;\n }", "title": "" }, { "docid": "fb0d9cd6635156f9fcee762edc7ad369", "score": "0.6182501", "text": "public function getURL() {\n\t\tif (!$this->guid) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$version = $this->getVersion();\n\t\treturn \"/releases/view/$version\";\n\t}", "title": "" }, { "docid": "90a1e9bc3d72efaf8efe517f2848542f", "score": "0.6181807", "text": "public function getUrl()\n {\n return $this->getBaseUrl() . $this->selectedMinimum\n . '-' . $this->selectedMaximum;\n }", "title": "" }, { "docid": "e16f273c1e5c9cd2960306d4fee36a7b", "score": "0.61742705", "text": "public function getUrl()\n\t{\n\t return $this->url;\n\t}", "title": "" }, { "docid": "cb6911926cc66c339672156cade43920", "score": "0.6168454", "text": "function getDisplayUrl() {\n\t\tglobal $gBitSystem;\n\t\t$ret = NULL;\n\t\tif( @$this->isValid() ) {\n\t\t\tif( $gBitSystem->isFeatureActive( 'pretty_urls' ) || $gBitSystem->isFeatureActive( 'pretty_urls_extended' )) {\n\t\t\t\t$ret = TICKETS_PKG_URL.$this->mTicketId;\n\t\t\t} else {\n\t\t\t\t$ret = TICKETS_PKG_URL.\"index.php?ticket_id=\".$this->mTicketId;\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "535c715e775b27dc8cf3bb75443b42d6", "score": "0.6165842", "text": "public function getUrl()\n\t{\n\t\t$uri = craft()->request->getPath();\n\t\treturn UrlHelper::getUrl($uri);\n\t}", "title": "" }, { "docid": "b0eaa0e7ee37090677a7db06285c49b9", "score": "0.6165773", "text": "protected function getLoginUrl()\n\t{\n\t\t$pl = $this->getPlugin();\n\t\treturn $this->ctrl->getLinkTargetByClass(array($pl->getPageGUIClass(), \"ilpcpluggedgui\", \"ilquicksignupplugingui\"), \"loginView\",\n\t\t\t\"\", true);\n\t}", "title": "" }, { "docid": "e271a26dfd456ed8d27765b3e82f4c9e", "score": "0.6163631", "text": "public function getUrl() {\n return $this->url;\n }", "title": "" }, { "docid": "e271a26dfd456ed8d27765b3e82f4c9e", "score": "0.6163631", "text": "public function getUrl() {\n return $this->url;\n }", "title": "" }, { "docid": "e271a26dfd456ed8d27765b3e82f4c9e", "score": "0.6163631", "text": "public function getUrl() {\n return $this->url;\n }", "title": "" }, { "docid": "e271a26dfd456ed8d27765b3e82f4c9e", "score": "0.6163631", "text": "public function getUrl() {\n return $this->url;\n }", "title": "" }, { "docid": "e271a26dfd456ed8d27765b3e82f4c9e", "score": "0.6163631", "text": "public function getUrl() {\n return $this->url;\n }", "title": "" }, { "docid": "e271a26dfd456ed8d27765b3e82f4c9e", "score": "0.6163631", "text": "public function getUrl() {\n return $this->url;\n }", "title": "" }, { "docid": "f8b372d922c97275a917842cdcad097b", "score": "0.61589396", "text": "public function getUrl() \n\t{\n\t return $this->url;\n\t}", "title": "" }, { "docid": "73133a1ca05c5a2d93d041839919439b", "score": "0.6154384", "text": "public function ValideURL(){\n\t\treturn parent::ValideURL();\n\t}", "title": "" }, { "docid": "8b7125a2bfd8fab93c2f2c12d7c01849", "score": "0.61470026", "text": "function getUrl() {\n\n return $this->url;\n\n }", "title": "" }, { "docid": "0398bca0e6ed1077bd53dc79066dac57", "score": "0.6145704", "text": "function getURL() {\n\t\treturn $this->url;\n }", "title": "" } ]
f23b4e6cf6f49e625101fb483f0a6593
ObtenerIdRecetaRepetitivaEliminar /FINALIZA TODAS LAS TRANSFERENCIAS
[ { "docid": "a2135e65022d249fbcf484b93bceda2d", "score": "0.0", "text": "function FinalizaTransferencia($IdPersonal){\n\t\t$queryUpdate=\"update farm_transferencias set IdEstado='D' where IdPersonal='$IdPersonal' and IdEstado='X'\";\n\t\tmysql_query($queryUpdate);\n\t}", "title": "" } ]
[ { "docid": "b8ca9edec157dc8c0d8d40bcf553b3ea", "score": "0.7308425", "text": "function eliminarProcesoContrato(){\n\t\t$this->procedimiento='saj.f_tproceso_contrato_ime';\n\t\t$this->transaccion='SA_CONTRA_ELI';\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_proceso_contrato','id_proceso_contrato','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}", "title": "" }, { "docid": "63022ab8e236dd8e3b5dc15ce705564b", "score": "0.7203982", "text": "function eliminarFinalidad(){\n\t\t$this->procedimiento='tes.ft_finalidad_ime';\n\t\t$this->transaccion='TES_FIN_ELI';\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_finalidad','id_finalidad','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}", "title": "" }, { "docid": "999782c6f452b65ab2852d2d737ab8ab", "score": "0.71262026", "text": "public function eliminar()\n\t{\n\t\t$descripcion=array(); //array para almacenar la informacion de la entidad\n\t\t//Concateno el where para eliminar los registros de la entidad\n\t\t$sql=\"DELETE FROM direccion WHERE dir_id = \".$this -> getDirId();\n\n\t\tif(isset($this -> auditoria_tabla) and $this -> auditoria_tabla)\n\t\t{\n\t\t\t//Consulto la informacion que se registro luego de la actualizacion\n\t\t\t$direccion = $this -> consultarId($this -> getDirId());\n\t\t\t\t\t$descripcion[]=\"dir_id = \".$direccion -> getDirId();\n\t\t\t\t\t$descripcion[]=\"dir_nombres = \".$direccion -> getDirNombres();\n\t\t\t\t\t$descripcion[]=\"dir_apellidos = \".$direccion -> getDirApellidos();\n\t\t\t\t\t$descripcion[]=\"dir_correo = \".$direccion -> getDirCorreo();\n\t\t\t\t\t$descripcion[]=\"dir_telefono = \".$direccion -> getDirTelefono();\n\t\t\t\t\t$descripcion[]=\"dir_celular = \".$direccion -> getDirCelular();\n\t\t\t\t\t$descripcion[]=\"dir_direccion = \".$direccion -> getDirDireccion();\n\t\t\t\t\t$descripcion[]=\"dir_ciudad = \".$direccion -> getDirCiudad();\n\t\t\t\t\t$descripcion[]=\"dir_departamento = \".$direccion -> getDirDepartamento();\n\t\t\t$descripcion_antigua = implode(\", \", $descripcion);\n\t\t}\n\t\t\n\t\t//Si la ejecucion es exitosa entonces devuelvo el numero de registros borrados\n\t\tif($this -> getConexion() -> Execute($sql))\n\t\t{\n\t\t\t$registros_eliminados=$this -> getConexion() -> Affected_Rows();\n\t\t\t\n\t\t\t//Si se pudo eliminar el registro entonces registro la auditoria sobre la tabla\n\t\t\tif(isset($this -> auditoria_tabla) and $this -> auditoria_tabla and $registros_eliminados)\n\t\t\t{\n\t\t\t\t/**\n\t\t\t\t * instanciacion de la clase auditoria_tabla para la eliminacion de un registro\n\t\t\t\t */\n\t\t\t\t$objAuditoriaTabla = new AuditoriaTabla();\n\t\t\t\t$objAuditoriaTabla->crearBD(\"sisgot_adodb\");\n\t\t\t\t$objAuditoriaTabla->setAutTabla(\"direccion\");\n\t\t\t\t$objAuditoriaTabla->setAutTablaId($this -> getDirId());\n\t\t\t\t$objAuditoriaTabla->setAutUsuId($objAuditoriaTabla -> obtenerUsuarioActual());\n\t\t\t\t$objAuditoriaTabla->setAutFecha(\"NOW()\", \"sql\");\n\t\t\t\t$objAuditoriaTabla->setAutDescripcionAntigua($descripcion_antigua);\n\t\t\t\t$objAuditoriaTabla->setAutDescripcionNueva(\"\");\n\t\t\t\t$objAuditoriaTabla->setAutTransaccion(\"ELIMINAR\");\n\t\t\t\t$aut_id=$objAuditoriaTabla->insertar();\n\t\t\t\t\n\t\t\t\tif(!$aut_id)\n\t\t\t\t{\n\t\t\t\t\techo \"<b>Error al almacenar informacion en la tabla de auditoria_tabla</b><br/>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $registros_eliminados;\n\t\t}\n\t\t//Sino imprimo el mensaje de error\n\t\telse\n\t\t\techo $this -> getConexion() -> ErrorMsg().\" <strong>SQL: \".$sql.\"<br/>En la linea \".__LINE__.\"<br/></strong>\";\n\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "22a3c4f090d8ea56cc7cd66a3b91947f", "score": "0.71017927", "text": "function eliminarRango(){\n\t\t$this->procedimiento='conta.ft_rango_ime';\n\t\t$this->transaccion='CONTA_RAN_ELI';\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_rango','id_rango','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}", "title": "" }, { "docid": "f72a7e7c4ae428c6c1229fcf71541605", "score": "0.7096281", "text": "function EliminarReceta($IdHistorialClinico, $IdPersonal, $IdReceta) {\n /* * **\tRECUPERACION DE EXISTENCIAS\t *** */\n $querySelect1 = \"select IdArea from farm_recetas where IdReceta=\" . $IdReceta;\n $IdArea = pg_fetch_array(pg_query($querySelect1));\n if ($IdArea[0] == 2) {\n /* * ************************************************* */\n /* \t\t\t\tAREA CONSULTA EXTERNA\t\t\t\t */\n /* * ************************************************* */\n /* * ***************************************************** */\n /* \t\t\t\t\t\t\tLOTE 1\t\t\t\t\t\t */\n /* * ***************************************************** */\n\n $querySelect2 = \"select IdMedicinaRecetada,IdEstado from farm_medicinarecetada where IdReceta=\" . $IdReceta;\n $resp2 = pg_query($querySelect2);\n while ($row2 = pg_fetch_array($resp2)) {\n $querySelect3 = \"select CantidadLote1, Lote1, CantidadLote2, Lote2\n\t\t\t\t\t\t\tfrom farm_medicinarecetada\n\t\t\t\t\t\t\twhere IdMedicinaRecetada=\" . $row2[\"IdMedicinaRecetada\"];\n $resp3 = pg_fetch_array(pg_query($querySelect3));\n $CantidadLote1 = $resp3[\"CantidadLote1\"];\n $IdLote1 = $resp3[\"Lote1\"];\n $CantidadLote2 = $resp3[\"CantidadLote2\"];\n $IdLote2 = $resp3[\"Lote2\"];\n $IdEstado = $row2[\"IdEstado\"];\n /* * *************\tLOTE 1\t****************** */\n if ($IdEstado == 'S') {\n $querySelect4 = \"select Existencia\n\t\t\t\t\t\t\t\tfrom farm_medicinaexistenciaxarea\n\t\t\t\t\t\t\t\twhere IdLote=\" . $IdLote1;\n $respExistencia1 = pg_fetch_array(pg_query($querySelect4));\n $Existencia_new1 = $CantidadLote1 + $respExistencia1[\"Existencia\"];\n\n $queryUpdate1 = \"update farm_medicinaexistenciaxarea set Existencia='$Existencia_new1' where IdLote=\" . $IdLote1;\n pg_query($queryUpdate1);\n\n /* * *************\tLOTE 2\t****************** */\n if ($IdLote2 != '' and $IdLote2 != NULL and $IdLote2 != '0') {\n $querySelect4 = \"select Existencia\n\t\t\t\t\t\t\t\t\t\tfrom farm_medicinaexistenciaxarea\n\t\t\t\t\t\t\t\t\t\twhere IdLote=\" . $IdLote2;\n $respExistencia2 = pg_fetch_array(pg_query($querySelect4));\n $Existencia_new2 = $CantidadLote2 + $respExistencia2[\"Existencia\"];\n\n $queryUpdate2 = \"update farm_medicinaexistenciaxarea set Existencia='$Existencia_new2' where IdLote=\" . $IdLote2;\n pg_query($queryUpdate2);\n }//IdLote2 != NULL\n }//IDEstado=='S'\n }//While\n } else {\n /* * ************************************************* */\n /* \t\t\t\t\tLAS DEMAS AREAS\t\t\t\t\t */\n /* * ************************************************* */\n $querySelect2 = \"select IdMedicinaRecetada,IdEstado from farm_medicinarecetada where IdReceta=\" . $IdReceta;\n $resp2 = pg_query($querySelect2);\n while ($row2 = pg_fetch_array($resp2)) {\n $querySelect3 = \"select CantidadLote1, Lote1, CantidadLote2, Lote2\n\t\t\t\t\t\t\tfrom farm_medicinarecetada\n\t\t\t\t\t\t\twhere IdMedicinaRecetada=\" . $row2[\"IdMedicinaRecetada\"];\n $resp3 = pg_fetch_array(pg_query($querySelect3));\n $CantidadLote1 = $resp3[\"CantidadLote1\"];\n $IdLote1 = $resp3[\"Lote1\"];\n $CantidadLote2 = $resp3[\"CantidadLote2\"];\n $IdLote2 = $resp3[\"Lote2\"];\n $IdEstado = $row2[\"IdEstado\"];\n if ($IdEstado == 'S') {\n /* * *************\tLOTE 1\t****************** */\n $querySelect4 = \"select Existencia\n\t\t\t\t\t\t\t\tfrom farm_entregamedicamento\n\t\t\t\t\t\t\t\twhere IdLote=\" . $IdLote1;\n $respExistencia1 = pg_fetch_array(pg_query($querySelect4));\n $Existencia_new1 = $CantidadLote1 + $respExistencia1[\"Existencia\"];\n\n $queryUpdate1 = \"update farm_entregamedicamento set Existencia='$Existencia_new1' where IdLote=\" . $IdLote1;\n pg_query($queryUpdate1);\n\n\n /* * *************\tLOTE 2\t****************** */\n if ($IdLote2 != '' and $IdLote2 != NULL and $IdLote2 != '0') {\n $querySelect4 = \"select Existencia\n\t\t\t\t\t\t\t\t\tfrom farm_entregamedicamento\n\t\t\t\t\t\t\t\t\twhere IdLote=\" . $IdLote2;\n $respExistencia2 = pg_fetch_array(pg_query($querySelect4));\n $Existencia_new2 = $CantidadLote2 + $respExistencia2[\"Existencia\"];\n\n $queryUpdate2 = \"update farm_entregamedicamento set Existencia='$Existencia_new2' where IdLote=\" . $IdLote2;\n pg_query($queryUpdate2);\n }//IdLote != NULL\n }//IDEstado==S\n }//While\n }//ELSE AREA = 2\n\n\n /* * ***************\t\tELIMINACION DE RECETA Y DETALLE\t\t********************** */\n $queryDeleteReceta = \"delete from farm_recetas where farm_recetas.IdReceta='$IdReceta'\";\n $querySelect = \"select * from farm_medicinarecetada where farm_medicinarecetada.IdReceta='$IdReceta'\";\n $queryDeleteMedicina = \"delete from farm_medicinarecetada where farm_medicinarecetada.IdReceta='$IdReceta'\";\n $queryDeleteHistorialClinico = \"delete from sec_historial_clinico where sec_historial_clinico.IdHistorialClinico='$IdHistorialClinico'\";\n\n\n $resp = pg_fetch_array(pg_query($querySelect));\n\n if ($resp != NULL) {\n pg_query($queryDeleteMedicina);\n }\n pg_query($queryDeleteReceta);\n\n\n $resp2 = RecetasProceso::ObtenerIdRecetaRepetitivaEliminar($IdHistorialClinico, $IdPersonal);\n\n while ($row = pg_fetch_array($resp2)) {\n $IdReceta2 = $row[\"IdReceta\"];\n $queryDeleteReceta2 = \"delete from farm_recetas where farm_recetas.IdReceta='$IdReceta2'\";\n $querySelect2 = \"select * from farm_medicinarecetada where farm_medicinarecetada.IdReceta='$IdReceta2'\";\n $queryDeleteMedicina2 = \"delete from farm_medicinarecetada where farm_medicinarecetada.IdReceta='$IdReceta2'\";\n\n $respuesta = pg_fetch_array(pg_query($querySelect2));\n if ($respuesta != NULL) {\n pg_query($queryDeleteMedicina2);\n }\n pg_query($queryDeleteReceta2);\n }//fin de while\n pg_query($queryDeleteHistorialClinico);\n }", "title": "" }, { "docid": "b77dedde28dd118274eceb2362b7cd25", "score": "0.69295055", "text": "public function eliminarRecursoRecibidoAction(Request $request)\n {\n if (!($this->getRequest()->isXmlHttpRequest())) // Verifica si la petición No es de AJAX \n {\n return $this->render('SisproBundle:Plantillas:prohibido.html.twig');\n } \n \n $idRecurso = $request->request->get('id'); \n \n $em = $this->getDoctrine()->getManager();\n \n $recurso = $em->getRepository('SisproBundle:RecursoRecibido')\n ->find($idRecurso);\n \n if (!$recurso) die(json_encode(array('error'=>'Registro no encontrado')));\n \n $data['proyecto'] = $recurso->getProyecto();\n \n //Información para el registro en bitácora\n $data['registro'] =\"Eliminación de Recurso Recibido id: $idRecurso, en el Proyecto: \".\n $recurso->getProyecto()->getCodigo().\" - \".$recurso->getProyecto()->getNombre().\n \". Por \".$recurso->getMoneda()->getSimbolo().\" \".$recurso->getMonto().\" (\".\n $recurso->getMoneda()->getIso().\") provenientes de: \".\n $recurso->getFuenteFinanciamiento()->getFuente().\". Realizado por: \".\n $this->getUser()->__toString().\".\";\n \n $data['entidad']=\"RecursoRecibido\";\n $data['operacion']=\"DELETE\";\n \n $error='';\n $em->remove($recurso); \n try { \n $em->flush();\n } catch (\\Exception $e) { // Atrapa Error del servidor\n if(stristr($e->getMessage(), 'Foreign key violation'))\n {\n $error= 'No se pudo eliminar el Registro.'; \n }else\n {\n $error = $e->getMessage();\n }\n die(json_encode(array('error'=>$error))); \n } \n // Logró ser eliminado\n \n $badge = $this->getDoctrine()\n ->getRepository('SisproBundle:Proyecto')\n ->getRecursosRecibidosProyecto($data['proyecto']);\n \n $this->_registrarBitacora($data);\n \n die(json_encode(array('error'=>$error,\n 'badge'=>count($badge),\n 'panel'=>$this->_panelRecursoRecibido($data))) );\n }", "title": "" }, { "docid": "f52ba930f3b8f191959118ef2b3192d5", "score": "0.6893129", "text": "public function actionQuitarResponsable()\n { \n $transaction = Yii::$app->db->beginTransaction(); \n try{\n $id = Yii::$app->request->get('id');\n $response = Yii::$app->serviceGrupoFamiliar->eliminarResponsable($id);\n if($response['success']){ \n $transaction->commit();\n Yii::$app->response->format = 'json';\n return ['error' => '0', 'mensaje' => Yii::$app->params['eliminacionCorrecta']]; \n }else{\n $transaction->rollBack();\n Yii::$app->response->format = 'json';\n return ['error' => '1', 'mensaje' => Yii::$app->params['eliminacionErronea']]; \n }\n }catch(GralException $e){\n (isset($transaction) && $transaction->isActive)?$transaction->rollBack():'';\n \\Yii::$app->getModule('audit')->data('errorAction', \\yii\\helpers\\VarDumper::dumpAsString($e)); \n throw new GralException($e->getMessage()); \n }catch(\\Exception $e){\n (isset($transaction) && $transaction->isActive)?$transaction->rollBack():'';\n \\Yii::$app->getModule('audit')->data('errorAction', \\yii\\helpers\\VarDumper::dumpAsString($e)); \n throw new GralException('Error al querer remover al responsable. Intente nuevamente y en caso de persistir el error comuniquese con su administrador.');\n } \n }", "title": "" }, { "docid": "293451c5b8fe3a0f540952be883672e7", "score": "0.6865907", "text": "public function confirmarEliminacionAction(){\n $request = $this->getRequest();\n $fecha = $request->query->get('fecha');\n if($fecha){\n $em = $this->getDoctrine()->getManager();\n $aspirantesElim = $em->getRepository('ExpedienteBundle:Expediente')->obtenerExpedientesPeriodo($fecha);\n foreach ($aspirantesElim as $asp) {\n $idExpAsp = $asp['id']; \n $aspirantetarget = $em->getRepository('ExpedienteBundle:Expediente')->find($idExpAsp); \n $em->remove($aspirantetarget);\n }\n $em->flush();\n\n $this->get('session')->getFlashBag()->add('confirm','Información de Aspirante eliminada exitosamente');\n //return $this->render('ExpedienteBundle:Expediente:seleliminar.html.twig');\n return $this->redirect($this->generateUrl('expediente_elim_ant')); \n }\n\n }", "title": "" }, { "docid": "f7ce684cab0dc70d5e92c1ce70e2648b", "score": "0.68539053", "text": "public function actionDelete1($ID_CAR, $ID_SEM, $CODIGO_ASIG, $ID_PER) {\n $sql = AsigDocPer::findBySql(\"SELECT * FROM asig_doc_per WHERE \n CODIGO_ASIG = '\" . $CODIGO_ASIG . \"'\n AND ID_CAR= '\" . $ID_CAR . \"'\n AND ID_SEM= '\" . $ID_SEM . \"'\n AND ID_PER= '\" . $ID_PER . \"'\")->all();\n\n foreach ($sql as $s) {\n //eliminar tambien todas las aulas, horas y dias de un docente-asignatura\n $aulas = DiaAulaHora::findBySql(\"SELECT * FROM dia_aula_hora WHERE \n CEDULA_DOC = '\" . $s->CEDULA_DOC . \"'\n AND PARALELO = '\" . $s->PARALELO . \"' \n AND CODIGO_ASIG = '\" . $s->CODIGO_ASIG . \"'\n AND ID_CAR = '\" . $s->ID_CAR. \"' \n AND ID_SEM = '\" . $s->ID_SEM . \"' \n AND ID_PER= '\" . $s->ID_PER . \"'\")->all();\n if (isset($aulas)) {\n foreach ($aulas as $aula) {\n $aula->delete();\n }\n }\n }\n\n foreach ($sql as $s) {\n //eliminar tambien todos los docentes, que dan esa asignatura en tal periodo academico \n if (isset($s)) {\n $s->delete();\n }\n }\n\n $this->findModel($ID_CAR, $ID_SEM, $CODIGO_ASIG, $ID_PER)->delete();\n// $model_1 = CarsemAsigPer::findOne(['ID_CAR' => $ID_CAR, 'ID_SEM' => $ID_SEM, 'CODIGO_ASIG' => $CODIGO_ASIG, 'ID_PER' => $ID_PER]);\n// $model_1->ESTADO_CSAP = 3; //ACTIVA=1 INACTIVO=0\n \n return $this->redirect(['create']);\n }", "title": "" }, { "docid": "cbb3d8df13ebe2ba83d8c1e77c8fc12d", "score": "0.68169147", "text": "function eliminarServicios(){\r\n\t\t$this->procedimiento='vef.ft_servicios_ime';\r\n\t\t$this->transaccion='VEF_INGAS_ELI';\r\n\t\t$this->tipo_procedimiento='IME';\r\n\r\n\t\t//Define los parametros para la funcion\r\n\t\t$this->setParametro('id_concepto_ingas','id_concepto_ingas','int4');\r\n\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "title": "" }, { "docid": "79876ebc87124812e444c5d30c362d45", "score": "0.6814119", "text": "public function _eliminarPermiso()\n {\n $this->_acl->acceso('agregar_rol');\n //Variables Ajax_Javascript\n $Per_IdPermiso = $this->getInt('_Per_IdPermiso');\n $Row_Estado = $this->getInt('_Row_Estado');\n $txtBuscar = $this->getSql('palabra');\n $pagina = $this->getInt('pagina');\n $filas = $this->getInt('filas');\n\n //Para Mensajes\n $resultado = array();\n $mensaje = \"error\";\n $contenido = \"\";\n //Para mensajes\n\n if ($Row_Estado == 0) {\n if (!$Per_IdPermiso) {\n $contenido = 'Error parametro ID ..!!';\n $mensaje = \"error\";\n array_push($resultado, array(0 => $mensaje, 1 => $contenido));\n } else {\n $role = $this->_cursom->verificarPermisoRol($Per_IdPermiso);\n // print_r($role);\n if (!$role) {\n $usuario = $this->_cursom->verificarPermisoUsuario($Per_IdPermiso);\n if (!$usuario) {\n $rowCount = $this->_cursom->eliminarHabilitarPermiso($Per_IdPermiso, $Row_Estado);\n if ($rowCount) {\n $contenido = 'El permiso fue elimnado correctamente...!!!';\n $mensaje = \"ok\";\n array_push($resultado, array(0 => $mensaje, 1 => $contenido));\n } else {\n $contenido = 'No se pudo eliminar permiso error en consulta...!!!';\n $mensaje = \"error\";\n array_push($resultado, array(0 => $mensaje, 1 => $contenido));\n }\n } else {\n $contenido = 'No se pudo eliminar permiso asignado a usuario...!!!';\n $mensaje = \"error\";\n array_push($resultado, array(0 => $mensaje, 1 => $contenido));\n }\n\n } else {\n $contenido = 'No se pudo eliminar permiso asignado a rol...!!!';\n $mensaje = \"error\";\n array_push($resultado, array(0 => $mensaje, 1 => $contenido));\n }\n }\n } else {\n $rowCount = $this->_cursom->eliminarHabilitarPermiso($Per_IdPermiso, $Row_Estado);\n\n if ($rowCount) {\n $contenido = 'El permiso fue activado correctamente...!!!';\n $mensaje = \"ok\";\n array_push($resultado, array(0 => $mensaje, 1 => $contenido));\n } else {\n $contenido = 'No se pudo activar permiso, error en variable(s) de consulta...!!!';\n $mensaje = \"error\";\n array_push($resultado, array(0 => $mensaje, 1 => $contenido));\n }\n }\n\n $mensaje_json = json_encode($resultado);\n // echo($mensaje_json); exit();\n $this->_view->assign('_mensaje_json', $mensaje_json);\n\n $soloActivos = 0;\n $condicion = \"\";\n if ($txtBuscar) {\n $condicion = \" WHERE Per_Nombre liKe '%$txtBuscar%' \";\n if (!$this->_acl->permiso('ver_eliminados')) {\n $soloActivos = 1;\n $condicion .= \" AND p.Row_Estado = $soloActivos \";\n }\n $condicion .= \" ORDER BY p.Row_Estado DESC \";\n } else {\n //Filtro por Activos/Eliminados\n $condicion = \" ORDER BY p.Row_Estado DESC \";\n if (!$this->_acl->permiso('ver_eliminados')) {\n $soloActivos = 1;\n $condicion = \" WHERE p.Row_Estado = $soloActivos \";\n }\n\n //Filtro por Activos/Eliminados\n }\n\n $paginador = new Paginador();\n\n $arrayRowCount = $this->_cursom->getPermisosRowCount($condicion);\n $totalRegistros = $arrayRowCount['CantidadRegistros'];\n // echo($totalRegistros);\n // print_r($arrayRowCount); echo($condicion);exit;\n $this->_view->assign('permisos', $this->_cursom->getPermisosCondicion($pagina, $filas, $condicion));\n\n $paginador->paginar($totalRegistros, \"listarPermisos\", \"$txtBuscar\", $pagina, $filas, true);\n\n $this->_view->assign('numeropagina', $paginador->getNumeroPagina());\n $this->_view->assign('paginacionPermisos', $paginador->getView('paginacion_ajax_s_filas'));\n $this->_view->renderizar('ajax/listarPermisos', false, true);\n //$this->permisos($error);\n }", "title": "" }, { "docid": "1110ac546d180bb8ff1b919cab49d4b8", "score": "0.6795775", "text": "function deletePreDetalle2(){\n $sql='DELETE FROM prepedidos WHERE IdPrePedido = ?';\n $params=array($this->idPre);\n return Database::executeRow($sql, $params);\n\t}", "title": "" }, { "docid": "affa5b7025d2339aef85ee6bb65565d1", "score": "0.6793045", "text": "function EliminarFichaTecnica()\n\t{\n\t\t/*Creamos una query sencilla*/ \n\t\t$sql=\"delete from FichaTecnica \n\t\t\t\twhere idFichaTecnica = $this->idFichaTecnica\"; \n\t\t \n\t\t/*Ejecutamos la query*/ \n\t\t$bd = Db::getInstance();\n\t\t$query = $bd->ejecutar($sql); \n\n \n // ELIMINAMOS LOS COLORES TELA\n\t\t$this->EliminarFichaTecnicaColorTela(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n \n // ELIMINAMOS LAS TINTORERIAS DE TELA\n\t\t$this->EliminarFichaTecnicaTintoreria(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n \n \n // ELIMINAMOS LAS NOTAS\n\t\t//$this->EliminarFichaTecnicaNotas(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n \n \n\t\t// ELIMINAMOS LOS COLORES \n\t\t$this->EliminarFichaTecnicaColor(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\t\t\n\t\t// ELIMINAMOS LAS TALLAS \n\t\t$this->EliminarFichaTecnicaTalla(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\t\t\n\t\t// ELIMINAMOS LAS TALLAS COMPLEMENTOS\n\t\t$this->EliminarFichaTecnicaTallaComplemento(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\t\t\n\t\t// ELIMINAMOS LAS IMAGENES \n\t\t$this->EliminarFichaTecnicaImagen(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\n\t\t// ELIMINAMOS LAS PIEZAS \n\t\t$this->EliminarFichaTecnicaPieza(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\t\t\n\t\t// ELIMINAMOS LOS DETALLES DE CONSTRUCCION \n\t\t$this->EliminarFichaTecnicaConstruccion(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\n\t\t// ELIMINAMOS LAS ESPECIFICACIONES PARA LUEGO INSERTARLAS DE NUEVO CON LA INFORMACION DEL FORMULARIO\n\t\t$this->EliminarFichaTecnicaEspecificacion(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\t\t\n\t\t// ELIMINAMOS LAS COMBINACIONES PARA LUEGO INSERTARLAS DE NUEVO CON LA INFORMACION DEL FORMULARIO\n\t\t$this->EliminarFichaTecnicaCombinacion(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\t\t\n\t\t// ELIMINAMOS LOS MATERIALES \n\t\t$this->EliminarFichaTecnicaMaterial(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n \n\t\t// ELIMINAMOS LOS MATERIALES \n\t\t$this->EliminarFichaTecnicaMaterialAdicional(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\t\t\n\t\t// ELIMINAMOS LAS MEDIDAS \n\t\t$this->EliminarFichaTecnicaMedida(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\t\t\n\t\t// ELIMINAMOS LAS MEDIDAS POR TALLA PARA LUEGO INSERTARLAS DE NUEVO CON LA INFORMACION DEL FORMULARIO\n\t\t$this->EliminarFichaTecnicaMedidaTalla(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\n\t\t// ELIMINAMOS LOS CENTROS DE PRODUCCION PARA LUEGO INSERTARLOS DE NUEVO CON LA INFORMACION DEL FORMULARIO\n\t\t$this->EliminarFichaTecnicaCentroProduccion(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\n\t\t// ELIMINAMOS LOS ARCHIVOS ADJUNTOS \n\t\t$this->EliminarFichaTecnicaAdjunto(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\t\t\n\t\t// ELIMINAMOS LOS COMPONENTES\n\t\t$this->EliminarFichaTecnicaComponente(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\t\t\n\t\t// ELIMINAMOS LISTADO DE OPERACIONES \n//\t\t$this->EliminarFichaTecnica(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\t\t\n\t\t\n\t\t// ELIMINAMOS LAS OPERACIONES\n\t\t/* PARA ELIMINAR TODO EN UN SOLO PROCESO\n\t\t * DELETE t1, t2, t3, t4, t5, t6\nFROM Movimiento t1 \nLEFT JOIN MovimientoDetalle t2 \nON t1.idMovimiento = t2.Movimiento_idMovimiento\nLEFT JOIN MovimientoImpuesto t3\nON t1.idMovimiento = t3.Movimiento_idMovimiento\nLEFT JOIN MovimientoRetencion t4\nON t1.idMovimiento = t4.Movimiento_idMovimiento\nLEFT JOIN MovimientoDocumentoRef t5\nON t1.idMovimiento = t5.Movimiento_idMovimiento\nLEFT JOIN MovimientoMedioPago t6\nON t1.idMovimiento = t6.Movimiento_idMovimiento\nWHERE t1.idMovimiento IN ( , , , , )\n\t\t */\n\n\t\treturn $query;\n }", "title": "" }, { "docid": "e30efa21291968bfc8341a6c2e284e34", "score": "0.6789443", "text": "function eliminarMovimiento(){\n\t\t$this->procedimiento='kaf.ft_movimiento_ime';\n\t\t$this->transaccion='SKA_MOV_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_movimiento','id_movimiento','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}", "title": "" }, { "docid": "598a904c0f23656a86a3ea9a0f005c95", "score": "0.6785914", "text": "function eliminarTechoPresupuestos(){\n\t\t$this->procedimiento='pre.ft_techo_presupuestos_ime';\n\t\t$this->transaccion='PRE_TECPRE_ELI';\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_techo_presupuesto','id_techo_presupuesto','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}", "title": "" }, { "docid": "04e9c1196e60b7275e0da9e86261c215", "score": "0.6776439", "text": "function deleteEncuestasSinCompletar($id, $numero_encuestas_eliminar) {\r\n $condicional = $id . ' and ees_id!=1 order by enc_id';\r\n $encuestas = $this->getIdsEncuestas($condicional);\r\n $cont = 0;\r\n $predicado = ' 0 ';\r\n while ($cont < $numero_encuestas_eliminar) {\r\n $predicado = $predicado . ' or enc_id =' . $encuestas[$cont]['enc_id'];\r\n $cont++;\r\n }\r\n $r = $this->db->borrarRegistro('instrumento_respuestas', $predicado);\r\n return $this->db->borrarRegistro('encuesta', $predicado);\r\n // 2337 2319\r\n }", "title": "" }, { "docid": "08a5b4343182978d92464f0a6aa1eb82", "score": "0.67354286", "text": "public function borrar()\n\t{\n\t\t$bd=Conexion2::getInstance();\n\t\t$sentencia = \"DELETE FROM ProfeEdFisicaxEscuela WHERE id_Ed_FisicaxEscuela=$this->id_Ed_FisicaxEscuela\";\n\t\t if ($bd->ejecutar($sentencia)) {//Ingresa aqui si fue ejecutada la sentencia con exito\n\t\t\t \t$ultimoRegistro=$bd->lastID();\n\t\t\t\treturn $ultimoRegistro;\n\t\t }else{\n\t\t\t\t\treturn $sentencia.\"<br>\".\"Error al ejecutar la sentencia\".$conexion->errno.\" :\".$conexion->error;\n\t\t }\n\t}", "title": "" }, { "docid": "a8ed28f1366afe31c096ed96c4aeb490", "score": "0.6734134", "text": "function eliminarAmbitoprecio(){\n\t\t$this->procedimiento='snx.ft_ambitoprecio_ime';\n\t\t$this->transaccion='SNX_AMBP_ELI';\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_ambitoprecio','id_ambitoprecio','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}", "title": "" }, { "docid": "1493b2d7d96a7d579a6999f6779f84d2", "score": "0.67018974", "text": "function eliminarFormaPago(){\n\t\t$this->procedimiento='vef.ft_forma_pago_ime';\n\t\t$this->transaccion='VF_FORPA_ELI';\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_forma_pago','id_forma_pago','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}", "title": "" }, { "docid": "fdf1b75d878914f411333850e725d5c6", "score": "0.66969293", "text": "public function Borrar_Productos_Carro_Plan_2_3(){\n Session::Set('kit_combos_eliminados', FALSE);\n\n if ( $_SESSION['logueado'] == FALSE || Session::Get('idtipo_plan_compras') ==1 || Session::Get('usuario_viene_del_registro') == TRUE ){\n return;\n }\n if ( $_SESSION['logueado'] == TRUE && Session::Get('kit_comprado') == FALSE){\n return;\n }\n\n $this->Iniciar_Procesos_Carro();\n $Productos_a_Borrar = array();\n $Id = 0;\n for ($pos=0; $pos < $this->Cantidad_Filas_Carrito; $pos++) {\n $id_categoria_producto = $this->Datos_Carro [$pos]['id_categoria_producto'];\n $idproducto = $this->Datos_Carro [$pos]['idproducto'];\n $Cantidad = $this->Datos_Carro [$pos]['cantidad'];\n if ( $id_categoria_producto == 8 || $idproducto == 10744){\n $Productos_a_Borrar[$Id]['idproducto'] = $idproducto ;\n $Productos_a_Borrar[$Id]['cantidad'] =$Cantidad ;\n Session::Set('kit_combos_eliminados', TRUE);\n $Id++;\n }\n }// Fin for\n $this->Cerrar_Procesos_Carro();\n if ( Session::Get('kit_combos_eliminados') == TRUE ){\n for ($pos=0; $pos < $Id; $pos++) {\n $this->Borrar_Producto_Carrito($Productos_a_Borrar[$pos]['idproducto'] , $Productos_a_Borrar[$pos]['cantidad']);\n }// fin for\n }\n }", "title": "" }, { "docid": "f40333c5a404483004dfb76d801c8f61", "score": "0.66959924", "text": "public function excluirAction(){\r\n \r\n // Recupera os parametros da requisição\r\n $params = $this->_request->getParams();\r\n //Zend_Debug::dump($params); die();\r\n \r\n // Instancia o modelo\r\n $consLigTabela = new ConsultaLigacaoTabelaModel();\r\n \r\n // Captura o código da transação pai\r\n $pai_cd_consulta = Zend_Registry::get(\"pai_cd_consulta\");\r\n \r\n if($params[\"cd_ligacao\"] != \"\") {\r\n if($consLigTabela->delete(\"CD_LIGACAO = '\" . $params[\"cd_ligacao\"] . \"' AND CD_CONSULTA = \" . $pai_cd_consulta)) {\r\n $this->_helper->json('1', true);\r\n } else {\r\n $this->_helper->json('0', true);\r\n }\r\n \r\n } else {\r\n $this->_helper->json('0', true);\r\n }\r\n \r\n }", "title": "" }, { "docid": "f0de6cccf23e193e6879bdf27e2b1f8b", "score": "0.6674019", "text": "function eliminarPartidaUsuario(){\n\t\t$this->procedimiento='pre.ft_partida_usuario_ime';\n\t\t$this->transaccion='PRE_PARUSU_ELI';\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_partida_usuario','id_partida_usuario','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}", "title": "" }, { "docid": "ffdfe9d90c4eed24555ed462ee5c95ed", "score": "0.6666989", "text": "function eliminarTipoSimulador(){\r\n $this->procedimiento='oip.ft_tipo_simulador_ime';\r\n $this->transaccion='OIP_TIPSIMU_ELI';\r\n $this->tipo_procedimiento='IME';\r\n\r\n //Define los parametros para la funcion\r\n $this->setParametro('id_tipo_simulador','id_tipo_simulador','int4');\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "title": "" }, { "docid": "5c539fdbd439a8217d6f1bc93fd9cd9d", "score": "0.6660712", "text": "function eliminarCotizacion(){\n\t\t$this->procedimiento='mat.ft_cotizacion_ime';\n\t\t$this->transaccion='MAT_CTS_ELI';\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_cotizacion','id_cotizacion','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}", "title": "" }, { "docid": "6ab4b48be5c1cd67a273effdee578c00", "score": "0.6659449", "text": "function eliminarTipoDocumento(){\n\t\t$this->procedimiento='wf.ft_tipo_documento_ime';\n\t\t$this->transaccion='WF_TIPDW_ELI';\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_tipo_documento','id_tipo_documento','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}", "title": "" }, { "docid": "6de71232856b73636e53b1c207ad3314", "score": "0.66370624", "text": "public function eliminarPedidosFueraDePlazo( $task )\n {\n $pedidos = pedidoTable::getInstance()->listFechaLimiteDePagoExpirada();\n \n foreach( $pedidos as $pedido )\n {\n // Doy de baja el pedido en Deluxe\n $fueDadoDeBaja = $pedido->procesarBaja('Baja de pedido #' . $pedido->getIdPedido() . ' por superar la fecha limite de pago.');\n if ( !$fueDadoDeBaja ) continue;\n \n // Cancelo el pedido en Mercado Pago, ( siempre que tenga id en Mercado Pago )\n $canceladoEnMP = PagoProvider::getInstance( formaPago::MERCADOPAGO )->cancelarPago($pedido);\n \n // Genero una notificacion ya procesada para guardar el log del pedido\n $pagoNotificacion = new pagoNotificacion();\n $pagoNotificacion->setIdFormaPago( formaPago::MERCADOPAGO );\n $pagoNotificacion->setMetodo(pagoNotificacion::INTERNO);\n $pagoNotificacion->setIdPedido( $pedido->getIdPedido() );\n $pagoNotificacion->setResponse( null);\n $pagoNotificacion->setProcesado(true);\n \n if ( $canceladoEnMP )\n {\n $pagoNotificacion->setMensaje( 'Se realizó la baja por superar la fecha limite de pago y se cancelo correctamente el pedido en Mercado Pago.' );\n }\n else\n {\n $pagoNotificacion->setMensaje( 'Se realizó la baja por superar la fecha limite de pago, pero no se pudo cancelar el/los pago/s en Mercado Pago.' );\n }\n \n $pagoNotificacion->save();\n \n $usuario = $pedido->getUsuario();\n \n // Envio el aviso via mail\n if ( $pedido->getIdEshop() ) {\n $eshop = $pedido->getEshop();\n $from = $eshop->getEmailNoReply();\n $tipoMail = 'ESHOP';\n } else {\n $eshop = false;\n $from = sfConfig::get('app_email_from_noreply');\n $tipoMail = 'DELUXE';\n }\n \n $subject = 'Ha finalizado el periodo para el pago del pedido #' . $pedido->getIdPedido();\n $vars = array( 'eshop' => $eshop, '$eshop' => $subject, 'usuario' => $pedido->getUsuario(), 'pedido' => $pedido );\n $mailer = new Mailer('avisoExpiroPlazoDePago' . $tipoMail, $vars);\n $mailer->send( $subject, $usuario->getEmail(), $from );\n \n $task->log('Se elimino el pedido #' . $pedido->getIdPedido() );\n }\n }", "title": "" }, { "docid": "813116ed571bed39f2cac01ba0e7c720", "score": "0.6636877", "text": "public function actionEliminardetallesalida() {\n if (Yii::$app->request->post()) {\n $consecutivo = Html::encode($_POST[\"consecutivo\"]);\n $id = Html::encode($_POST[\"id_salida\"]);\n if ((int) $id) {\n $Detalle = SalidaEntradaProduccionDetalle::findOne($consecutivo);\n try {\n SalidaEntradaProduccionDetalle::deleteAll(\"consecutivo=:consecutivo\", [\":consecutivo\" => $consecutivo]);\n $this->ActualizarCantidadEntradaSalida($id);\n $this->redirect([\"orden-produccion/viewsalida\", 'id' => $id]);\n } catch (IntegrityException $e) {\n $this->redirect([\"orden-produccion/viewsalida\", 'id' => $id]);\n Yii::$app->getSession()->setFlash('error', 'Error al eliminar el detalle, tiene registros asociados en ficha de operaciones');\n } catch (\\Exception $e) {\n Yii::$app->getSession()->setFlash('error', 'Error al eliminar el detalle, tiene registros asociados en ficha de operaciones');\n $this->redirect([\"orden-produccion/viewsalida\", 'id' => $id]);\n }\n } else {\n echo \"<meta http-equiv='refresh' content='3; \" . Url::toRoute(\"orden-produccion/index\") . \"'>\";\n }\n } else {\n return $this->redirect([\"orden-produccion/index\"]);\n }\n }", "title": "" }, { "docid": "b282e813f8b95347244a6a7752d63a0d", "score": "0.6631704", "text": "function eliminartodo()\r\n {\r\n $data['sistema'] = $this->sistema;\r\n if($this->acceso(12)||$this->acceso(30)){ //12 ventas o 30 pedidos\r\n //**************** inicio contenido *************** \r\n $usuario_id = $this->session_data['usuario_id'];\r\n $sql = \"delete from detalle_venta_aux where usuario_id = \".$usuario_id;\r\n $this->Venta_model->ejecutar($sql);\r\n return true;\r\n \t\t\r\n //**************** fin contenido ***************\r\n }\r\n }", "title": "" }, { "docid": "f56d77269e962563b5ac5b6b09a88090", "score": "0.662923", "text": "function eliminarCuentasCorreo()\n {\n $this->procedimiento = 'protra.ft_cuentas_correo_ime';\n $this->transaccion = 'PROTRA_CUECO_ELI';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_cuenta_correo', 'id_cuenta_correo', 'int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "4fab1636d6952548f0102a3e6dea5e63", "score": "0.6625566", "text": "function deletePreDetalle(){\n $sql='DELETE FROM prepedidos WHERE IdCliente = ?';\n $params=array($this->cliente);\n return Database::executeRow($sql, $params);\n\t}", "title": "" }, { "docid": "0ddf8b02478f5d0345983f886c996cfe", "score": "0.6625229", "text": "function eliminarReporte(){\n\t\t$this->procedimiento='plani.ft_reporte_ime';\n\t\t$this->transaccion='PLA_REPO_ELI';\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_reporte','id_reporte','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}", "title": "" }, { "docid": "cead137816573971dc5948b77c85a990", "score": "0.66025186", "text": "function eliminarUniCons(){\n\t\t$this->procedimiento='gem.f_uni_cons_ime';\n\t\t$this->transaccion='GEM_TUC_ELI';\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_uni_cons','id_uni_cons','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}", "title": "" }, { "docid": "05c92724bd18e172d5d2dd2c807fd27a", "score": "0.65671736", "text": "public function eliminarTpRespaldo($condiciones) {\r\n \r\n \t$this->pdo->beginTransaction();\t\r\n\r\n\r\n\t$r1 = $this->pdo->_delete('tr034_tipo_respaldo', $condiciones);\r\n\t\r\n\tif($r1)\r\n\t\t\t{$this->pdo->commit(); return true;}\r\n\telse\t\t\r\n\t\t\t{$this->pdo->rollback(); return \"Error : 1= \".$r1;\t }\r\n }", "title": "" }, { "docid": "e1cd6ab677492b9ff9489fd03b644eba", "score": "0.6555354", "text": "public function actionEliminardetalles($idordenproduccion) {\n $mds = Ordenproducciondetalle::find()->where(['=', 'idordenproduccion', $idordenproduccion])->all();\n $mensaje = \"\";\n $error = 0;\n if (Yii::$app->request->post()) {\n $intIndice = 0;\n\n if (isset($_POST[\"seleccion\"])) {\n foreach ($_POST[\"seleccion\"] as $intCodigo) {\n $ordenProduccionDetalle = OrdenProduccionDetalle::findOne($intCodigo);\n $subtotal = $ordenProduccionDetalle->subtotal;\n $cantidad = $ordenProduccionDetalle->cantidad;\n \n try {\n OrdenProduccionDetalle::findOne($intCodigo)->delete();\n $this->Actualizartotal($idordenproduccion);\n $this->Actualizarcantidad($idordenproduccion);\n //$this->redirect([\"orden-produccion/view\", 'id' => $idordenproduccion]);\n } catch (IntegrityException $e) {\n //$this->redirect([\"orden-produccion/view\", 'id' => $idordenproduccion]);\n Yii::$app->getSession()->setFlash('error', 'Error al eliminar el detalle, tiene registros asociados en ficha de operaciones');\n $error = 1;\n } catch (\\Exception $e) {\n Yii::$app->getSession()->setFlash('error', 'Error al eliminar el detalle, tiene registros asociados en ficha de operaciones');\n $error = 1;\n }\n \n }\n if($error == 1){\n Yii::$app->getSession()->setFlash('error', 'Error al eliminar el detalle, tiene registros asociados en ficha de operaciones');\n }else{\n $this->redirect([\"orden-produccion/view\", 'id' => $idordenproduccion]);\n }\n \n } else {\n $mensaje = \"Debe seleccionar al menos un registro\";\n }\n }\n return $this->render('_formeliminardetalles', [\n 'mds' => $mds,\n 'idordenproduccion' => $idordenproduccion,\n 'mensaje' => $mensaje,\n ]);\n }", "title": "" }, { "docid": "ee8326ebc7909dc3f650c527238c7ed3", "score": "0.6551431", "text": "public function limpiar() \n\t{\n \t$actualizaficha = Doctrine_Query::create()\n\t->delete('Fichacarga fa')\n\t->where('fa.idalumno = 0')\n ->execute();\n\n\n\t}", "title": "" }, { "docid": "76ae4d9c1712f0071d8f2bef524314b5", "score": "0.65462714", "text": "public function excluir(){\r\n $instancia = EncontroDAO::getInstancia();\r\n // executando o metodo //\r\n $encontro = $instancia->excluir($this->getId());\r\n // retornando o resultado //\r\n return $encontro;\r\n\t}", "title": "" }, { "docid": "e2ce4af21b6bfd17a76bea9d1fbcd6ee", "score": "0.6537877", "text": "public static function BorrarDatos(){ // Descuento y descuento maybe\n if(request()->isMethod('get')){\n if(request()->filled('id_Borrar')){\n // Variables usadas en general\n $Rut = session('Empleado')->Datos->Rut;\n // id_Borrar == 1 = borrar gratificacion\n // id_Borrar == 2 = borrar descuento\n\n if(request('id_Borrar')==1 && request()->filled('id_Gratificacion')){\n DB::table('rel_tEmpleados_tBonos')->where([\n ['id_Bono','=',request('id_Gratificacion')],\n ['Rut','=',$Rut] \n ])->delete();\n self::CargarGratificaciones(); //self hace referencia a la misma clase, necesito estudiar clases JAJAJAJA :^) \n return back();\n }\n if(request('id_Borrar')==2 && request()->filled('id_Descuento')){ \n DB::table('rel_tEmpleados_tDescuentos')->where([\n ['id_Descuento','=',request('id_Descuento')],\n ['Rut','=',$Rut] \n ])->delete();\n self::CargarDescuentos(); //self hace referencia a la misma clase, necesito estudiar clases JAJAJAJA :^) \n return back();\n }\n\n\n }\n else{\n echo \"kill your self\"; // retroceder y mostrar error, revisar buscar empleado para darle formato al error\n }\n }\n }", "title": "" }, { "docid": "663a024e80495c77bb24e07e101ac7ba", "score": "0.6529304", "text": "static public function ctrEliminarSublimado(){\n\n\t\tif(isset($_GET[\"idSublimado\"])){\n\n\t\t\t$datos = $_GET[\"idSublimado\"];\n\t\t\t$tabla=\"sublimado_jf\";\n\t\t\tdate_default_timezone_set('America/Lima');\n\t\t\t$fecha = new DateTime();\n\t\t\t$sublimados=ControladorProcedimientos::ctrMostrarSublimados(\"id\",$datos);\n\t\t\t$usuario= $_SESSION[\"nombre\"];\n\t\t\t$para = '[email protected]';\n\t\t\t$asunto = 'Se elimino un sublimado';\n\t\t\t$descripcion = 'El usuario '.$usuario.' elimino el sublimado '.$sublimados[\"modelo\"].' - '.$sublimados[\"color_modelo\"];\n\t\t\t$de = 'From: [email protected]';\n\t\t\tif($_SESSION[\"correo\"] == 1){\n\t\t\t\tmail($para, $asunto, $descripcion, $de);\n\t\t\t}\n\t\t\tif($_SESSION[\"datos\"] == 1){\n\t\t\t\t$datos2= array( \"usuario\" => $usuario,\n\t\t\t\t\t\t\t\t\"concepto\" => $descripcion,\n\t\t\t\t\t\t\t\t\"fecha\" => $fecha->format(\"Y-m-d H:i:s\"));\n\t\t\t\t$auditoria=ModeloUsuarios::mdlIngresarAuditoria(\"auditoriajf\",$datos2);\n\t\t\t}\n\t\t\t\n\t\t\t$respuesta = ModeloProcedimientos::mdlEliminarSublimado($tabla,$datos);\n\t\t\tif($respuesta == \"ok\"){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\techo'<script>\n\n\t\t\t\tswal({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"El sublimado ha sido borrado correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\",\n\t\t\t\t\t closeOnConfirm: false\n\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"sublimados\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\t\t\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "058b2e0cd2381bb2c75269f819255085", "score": "0.6529202", "text": "function eliminar_tcp() {\n//// echo$cantidad.\"<br>\";\n// if ($cantidad == 0) {\n//// echo \"elimino\";\n//// return;\n// $conec = new ADO();\n// $sql = \"update ter_tipo_documento set tdoc_eliminado='si' where tdoc_id='\" . $_POST['tdoc_id'] . \"'\";\n// $conec->ejecutar($sql);\n// $mensaje = 'Tipo de Documento Eliminado Correctamente.';\n// } else {\n// $mensaje = 'El Tipo de Documento no puede ser eliminado, por que ya fue referenciado en algunos comprobantes.';\n// }\n// $this->formulario->ventana_volver($mensaje, $this->link . '?mod=' . $this->modulo);\n }", "title": "" }, { "docid": "2d664327d379ba9c7df12915a7291c1f", "score": "0.6528332", "text": "function eliminarMovimientoMotivo(){\n\t\t$this->procedimiento='kaf.ft_movimiento_motivo_ime';\n\t\t$this->transaccion='SKA_MMOT_ELI';\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_movimiento_motivo','id_movimiento_motivo','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}", "title": "" }, { "docid": "011e4e52d645f35d31177e5a2594b7c3", "score": "0.6527945", "text": "protected function removerVinculos() {\n\n if ($this->iCodigo != null) {\n\n $oDaoTransporteEmpresa = new cl_veiculotransportemunicipalterceiro();\n $oDaoTransporteEmpresa->excluir(null, \"tre03_veiculotransportemunicipal = {$this->getCodigo()}\");\n if ($oDaoTransporteEmpresa->erro_status == 0) {\n\n $sMensagemErro = 'educacao.transporteescolar.VeiculoTransporte.erro_exclusao_vinculo_empresa';\n $oVariavel = new stdClass();\n $oVariavel->erro_dao = $oDaoTransporteEmpresa->erro_status;\n throw new BusinessException(_M($sMensagemErro, $oVariavel));\n }\n\n $oDaoTransporteVeiculo = new cl_veiculotransportemunicipalveiculos();\n $oDaoTransporteVeiculo->excluir(null, \"tre02_veiculotransportemunicipal = {$this->getCodigo()}\");\n if ($oDaoTransporteVeiculo->erro_status == 0) {\n\n $sMensagemErro = 'educacao.transporteescolar.VeiculoTransporte.erro_exclusao_vinculo_veiculo';\n $oVariavel = new stdClass();\n $oVariavel->erro_dao = $oDaoTransporteVeiculo->erro_status;\n throw new BusinessException(_M($sMensagemErro, $oVariavel));\n }\n }\n }", "title": "" }, { "docid": "3c15ff4b460f913b4343dd4c101ff531", "score": "0.6524197", "text": "public function actionEliminardetallepiloto($id_proceso, $id, $iddetalle) {\n if (Yii::$app->request->post()) {\n $piloto = PilotoDetalleProduccion::findOne($id_proceso);\n if ((int) $id_proceso) {\n try {\n PilotoDetalleProduccion::deleteAll(\"id_proceso=:id_proceso\", [\":id_proceso\" => $id_proceso]);\n \n $this->redirect([\"orden-produccion/newpilotoproduccion\",'iddetalle'=>$iddetalle, 'id'=>$id]);\n } catch (IntegrityException $e) {\n $this->redirect([\"orden-produccion/newpilotoproduccion\",'iddetalle'=>$iddetalle, 'id'=>$id]);\n Yii::$app->getSession()->setFlash('error', 'Error al eliminar al eliminar el registro.!');\n } catch (\\Exception $e) {\n\n $this->redirect([\"orden-produccion/newpilotoproduccion\",'iddetalle'=>$iddetalle, 'id'=>$id]);\n Yii::$app->getSession()->setFlash('error', 'Error al eliminar al eliminar el registro.!');\n }\n } else {\n // echo \"Ha ocurrido un error al eliminar el registros, redireccionando ...\";\n echo \"<meta http-equiv='refresh' content='3; \" . Url::toRoute([\"orden-produccion/newpilotoproduccion\",'iddetalle'=>$iddetalle, 'id'=>$id]) . \"'>\";\n }\n } else {\n $this->redirect([\"orden-produccion/newpilotoproduccion\",'iddetalle'=>$iddetalle, 'id'=>$id]);\n }\n }", "title": "" }, { "docid": "0cb472e7be44bfd06e048da7708a332e", "score": "0.6520234", "text": "public function eliminar_item_controlador(){\n\t\t$id = mainModel::decryption($_POST['id_item_del']);\n\t\t$id = mainModel::lipiar_cadena($id);\n\n\t\t/*comprobar si exsiste en la DB*/\n\t\t$check_item = mainModel::ejecutar_consulta_simple(\"SELECT item_id FROM item WHERE item_id = '$id'\");\n\t\tif($check_item->rowCount() <= 0){\n\t\t\t$alerta = [\n\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\"Texto\"=>\"El item que intente eliminar no existe en el sisitema\",\n\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t];\n\t\t\techo json_encode($alerta);\n\t\t\texit();\n\t\t}\n\n\t\t/*comprobar stock en 0 para eliminar*/\n\t\t$chek_stock = mainModel::ejecutar_consulta_simple(\"SELECT * FROM item WHERE item_id = '$id' AND item_stock > 0\");\n\n\t\tif($chek_stock->rowCount() >0){\n\t\t\t$alerta = [\n\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\"Texto\"=>\"El item que intente eliminar aun tiene un stock mayor a 0\",\n\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t];\n\t\t\techo json_encode($alerta);\n\t\t\texit();\n\t\t}\n\n\t\t/*privilegio para poder eliminar clientes*/\n\t\tsession_start(['name'=>'SPM']);\n\t\tif($_SESSION['privilegio_spm'] != 1){\n\t\t\t$alerta = [\n\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\"Texto\"=>\"No tienes los perisos suficientes como para realizar esta operacion\",\n\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t];\n\t\t\techo json_encode($alerta);\n\t\t\texit();\n\t\t}\n\n\t\t/*eliminar*/\n\t\t$eliminar_item = itemModelo::eliminar_item_modelo($id);\n\t\tif($eliminar_item->rowCount() == 1){\n\t\t\t$alerta = [\n\t\t\t\t\"Alerta\"=>\"recargar\",\n\t\t\t\t\"Titulo\"=>\"Item eliminado\",\n\t\t\t\t\"Texto\"=>\"El item a sido eliminado con exitosamente\",\n\t\t\t\t\"Tipo\"=>\"success\"\n\t\t\t];\n\t\t}else{\n\t\t\t$alerta = [\n\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\"Texto\"=>\"No hemos podido eliminar el item, porfavor intente nuevamente\",\n\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t];\n\t\t}\n\t\techo json_encode($alerta);\n\t}", "title": "" }, { "docid": "056c65efb3bf9e5e39304c70bfd01234", "score": "0.65018934", "text": "function eliminarDetalleGastoSolicitud(){\n\t\t$this->procedimiento='adq.f_solicitud_det_ime';\n\t\t$this->transaccion='ADQ_DGSTSOL_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_solicitud','id_solicitud','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}", "title": "" }, { "docid": "43bf0eff8dc80b80e34508172f744ea2", "score": "0.6498355", "text": "public function actualiza_repetidos(){\n \tif ($this->session->userdata('is_logged_in')){\n\t\t\t$actualiza_duple = $this->Articulos_model->actualiza_repetidos($_POST['data']);\n\t\t\t$elimina = $this->borra_temporal();\n\t\t\techo $actualiza_duple;\n\t\t} else{\n\t\t\tredirect('main/restringido');\n\t\t}\n }", "title": "" }, { "docid": "91bb5800aa02b64d8aefcac8f71c0c93", "score": "0.6488107", "text": "public function actionDelete($ID_CAR, $ID_SEM, $CODIGO_ASIG, $ID_PER) {\n $sql = AsigDocPer::findBySql(\"SELECT * FROM asig_doc_per WHERE \n CODIGO_ASIG = '\" . $CODIGO_ASIG . \"'\n AND ID_CAR= '\" . $ID_CAR . \"'\n AND ID_SEM= '\" . $ID_SEM . \"'\n AND ID_PER= '\" . $ID_PER . \"'\")->all();\n\n foreach ($sql as $s) {\n //eliminar tambien todas las aulas, horas y dias de un docente-asignatura\n $aulas = DiaAulaHora::findBySql(\"SELECT * FROM dia_aula_hora WHERE \n CEDULA_DOC = '\" . $s->CEDULA_DOC . \"'\n AND PARALELO = '\" . $s->PARALELO . \"' \n AND CODIGO_ASIG = '\" . $s->CODIGO_ASIG . \"'\n AND ID_CAR = '\" . $s->ID_CAR. \"' \n AND ID_SEM = '\" . $s->ID_SEM . \"' \n AND ID_PER= '\" . $s->ID_PER . \"'\")->all();\n if (isset($aulas)) {\n foreach ($aulas as $aula) {\n $aula->delete();\n }\n }\n }\n\n foreach ($sql as $s) {\n //eliminar tambien todos los docentes, que dan esa asignatura en tal periodo academico \n if (isset($s)) {\n $s->delete();\n }\n }\n $this->findModel($ID_CAR, $ID_SEM, $CODIGO_ASIG, $ID_PER)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "206a224171dd5791e9bed4d8998e0a18", "score": "0.648739", "text": "function eliminarFuncionarioEspecialidad(){\n\t\t$this->procedimiento='orga.f_funcionario_especialidad_ime';\n\t\t$this->transaccion='RH_RHESFU_ELI';\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_funcionario_especialidad','id_funcionario_especialidad','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}", "title": "" }, { "docid": "95c2e28b436ebd79bef678559af9afdc", "score": "0.64849603", "text": "public function excluiranexoAction()\n {\n if (isset($_GET['idArquivo']) && !empty($_GET['idArquivo']) && isset($_GET['idPreProjeto']) && !empty($_GET['idPreProjeto']) && isset($_GET['tipoDocumento']) && !empty($_GET['tipoDocumento'])) :\n if ($_GET['tipoDocumento'] == 'proposta') {\n $tbDocumentosPreProjeto = new Proposta_Model_DbTable_TbDocumentosPreProjeto();\n $file = $tbDocumentosPreProjeto->findBy(array('iddocumentospreprojetos' => $_GET['idArquivo']));\n $tbDocumentosPreProjeto->apagar(array('iddocumentospreprojetos = ?' => $_GET['idArquivo']));\n } else {\n $tbDocumentosAgentes = new Proposta_Model_DbTable_TbDocumentosAgentes();\n $file = $tbDocumentosAgentes->findBy(array('iddocumentosagentes' => $_GET['idArquivo']));\n $tbDocumentosAgentes->apagar(array('iddocumentosagentes = ?' => $_GET['idArquivo']));\n }\n $filePath = APPLICATION_PATH . '/..' . $file['imdocumento'];\n if (file_exists($filePath)) {\n unlink($filePath);\n }\n\n if (isset($_GET['request'])) {\n $request = $_GET['request'];\n } else {\n $request = 'proposta/manterpropostaedital/enviararquivoedital?idPreProjeto=' . $_GET['idPreProjeto'];\n }\n\n parent::message('Exclus&atilde;o efetuada com sucesso!', $request, 'CONFIRM');\n endif;\n }", "title": "" }, { "docid": "3a094c27f1b86f5bc678f9abbe865a29", "score": "0.6479124", "text": "function eliminarClasificacionPartida(){\n\t\t$this->procedimiento='kaf.ft_clasificacion_variable_ime';\n\t\t$this->transaccion='SKA_CLASIPAR_ELI';\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_clasificacion_partida','id_clasificacion_partida','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}", "title": "" }, { "docid": "184420278aaacbf4682ecceac9a41b9a", "score": "0.6477178", "text": "static public function ctrBorrarVenta(){\n\n\t\tif(isset($_GET[\"idVentaEliminar\"])){\n\t\t \n\t\t \n\t\t $tabla2 = \"simcards\";\n\n\t\t\t\t $item = \"simcard\";\n\n\t\t\t\t $valor = $_GET[\"simcards\"];\n\n\t\t\t\t $item2 = \"valor\";\n\n\t\t\t\t $valor2 = 0;\n\n\t\t\t\t $respuesta2 = ModeloSimscards::MdlActualizarSimcard($tabla2, $item, $valor,$item2,$valor2);\n\n\t\t\t$tabla =\"ventas\";\n\t\t\t$datos = $_GET[\"idVentaEliminar\"];\n\n\t\t\t\n\n\t\t\t$respuesta = ModeloVentas::mdlEliminarVentas($tabla, $datos);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo'<script>\n\n\t\t\t\tswal({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"La venta ha sido borrada correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"ventas\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\t\t\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "09413a65a9d18d5bc7b945667fc68d4a", "score": "0.6475906", "text": "public function excluirAction() {\r\n \r\n // Recupera os parametros da requisição\r\n $params = $this->_request->getParams();\r\n \r\n // Instancia o modelo\r\n $clientesUsuarios = new UsuarioClienteModel();\r\n \r\n // Captura o código da transação pai\r\n $pai_cd_usuario = Zend_Registry::get(\"pai_cd_usuario\");\r\n \r\n // Valida os dados obrigatórios\r\n if($pai_cd_usuario != \"\" && $params['cd_cliente'] != \"\") {\r\n // Monta a condição do where\r\n $where = \"CD_USUARIO = '\" . $pai_cd_usuario . \"' AND \" .\r\n \"CD_CLIENTE = \" . $params[\"cd_cliente\"];\r\n \r\n // Atualiza os dados\r\n $delete = $clientesUsuarios->delete($where);\r\n \r\n // Verifica se o registro foi excluído\r\n if($delete) {\r\n // Limpa os dados da requisição\r\n $params = $this->_helper->LimpaParametrosRequisicao->limpar();\r\n \r\n // Redireciona para o index\r\n $this->_forward(\"index\", null, null, $params);\r\n \r\n } else {\r\n // Se não conseguir excluir, retorna pra seleção do registro\r\n $this->_forward(\"selecionar\");\r\n }\r\n }\r\n \r\n }", "title": "" }, { "docid": "e23858e3e4a1dbb4953e28a299122c3a", "score": "0.6470883", "text": "public function execute() {\n $validar = true;\n $id = FormatUtils::getParam('id');\n $conceptoManager = new ConceptoManager();\n $criterio = new CriterioBusqueda();\n $criterio->addFiltro(\"C.cd_tipoconcepto\", $id, \"=\");\n $cant = $conceptoManager->getCantConceptos($criterio);\n if ($cant > 0 || $id == CD_TIPO_CONCEPTO_PRACTICA || $id == CD_TIPO_CONCEPTO_BONO || $id == CD_TIPO_CONCEPTO_REINTEGRO) {\n $validar = false;\n $msg = \"Error: No se puede eliminar el tipo de concepto porque está relacionado a un concepto.\";\n }\n\n if ($validar) {\n $manager = new TipoconceptoManager();\n $manager->eliminarTipoconcepto($id);\n return 'eliminar_tipoconcepto_success';\n } else {\n $this->setDs_forward_params(\"er=1&msg=$msg\");\n return 'eliminar_tipoconcepto_error';\n }\n }", "title": "" }, { "docid": "aa37f38bfcc5c350ce67f2cc97b7af45", "score": "0.64698094", "text": "function eliminarSolicitudDet(){\n\t\t$this->procedimiento='adq.f_solicitud_det_ime';\n\t\t$this->transaccion='ADQ_SOLD_ELI';\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_solicitud_det','id_solicitud_det','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}", "title": "" }, { "docid": "81d4eff256f98ec98372b8b94bab9b87", "score": "0.64638174", "text": "function eliminarUsuario(){\r\n\t\t$this->procedimiento='segu.ft_usuario_ime';\r\n\t\t$this->transaccion='SEG_USUARI_ELI';\r\n\t\t$this->tipo_procedimiento='IME';\r\n\t\t\t\r\n\t\t//Define los setParametros para la funcion\r\n\t\t$this->setParametro('id_usuario','id_usuario','integer');\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t\t\t\r\n\t\t$this->ejecutarConsulta();\r\n\t\treturn $this->respuesta;\r\n\t}", "title": "" }, { "docid": "f563715e8aa5006342811fbddf28aeb1", "score": "0.64635366", "text": "function eliminarPlantillaComprobante(){\r\n\t\t$this->procedimiento='conta.ft_plantilla_comprobante_ime';\r\n\t\t$this->transaccion='CONTA_CMPB_ELI';\r\n\t\t$this->tipo_procedimiento='IME';\r\n\t\t\t\t\r\n\t\t//Define los parametros para la funcion\r\n\t\t$this->setParametro('id_plantilla_comprobante','id_plantilla_comprobante','int4');\r\n\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "title": "" }, { "docid": "254e081685da2cedcc6fff28bc0c0f45", "score": "0.64633936", "text": "function eliminarMoneda(){\n\t\t$this->procedimiento='param.f_moneda_ime';\n\t\t$this->transaccion='PM_MONEDA_ELI';\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_moneda','id_moneda','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}", "title": "" }, { "docid": "5a01b73defa061ad938eca762ef8c1b7", "score": "0.6460361", "text": "function borrarPedido($datos){\t\t\r\n\t\t//Se guardan sus datos en un array asociativo, el cual cada id o key tiene que tener el mismo nombre de la columna de la tabla en la bd. Sino se hace asi se genera error\t\t\r\n\t\t$this->db->where('idOrdenPedido', $datos[\"id\"]);\r\n\t\t\r\n\t\t$this->db->delete('Detalle_OrdenPedido'); \t\t\t\r\n\t\t\r\n\t}", "title": "" }, { "docid": "e08747a9e1525aa155e7448a4c56bcc6", "score": "0.64596224", "text": "function eliminarConceptoIngas(){\n\t\t$this->procedimiento='pre.f_concepto_ingas_ime';\n\t\t$this->transaccion='PRE_CINGAS_ELI';\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_concepto_ingas','id_concepto_ingas','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}", "title": "" }, { "docid": "f4b92da2881e936b38530f127e1ca3b2", "score": "0.6451038", "text": "public function actionDelete()\n {\n $ID_Tahun = $this->IDTahun();\n /* below code actually unneccessary, because No_Misi foreign key have cascade onDelete\n \\common\\models\\TaSasaranRPJMD::findOne(['ID_Tahun' => $ID_Tahun->ID_Tahun, 'No_Misi' => 98])->delete();\n \\common\\models\\TaSasaranRPJMD::findOne(['ID_Tahun' => $ID_Tahun->ID_Tahun, 'No_Misi' => 99])->delete();\n \\common\\models\\TaTujuanRPJMD::findOne(['ID_Tahun' => $ID_Tahun->ID_Tahun, 'No_Misi' => 98])->delete();\n \\common\\models\\TaTujuanRPJMD::findOne(['ID_Tahun' => $ID_Tahun->ID_Tahun, 'No_Misi' => 99])->delete();\n */\n \\common\\models\\TaMisiSKPD::findOne(['ID_Tahun' => $ID_Tahun->ID_Tahun, 'No_Misi' => 99, 'Kd_Urusan' => Yii::$app->user->identity->tperan->kd_urusan, 'Kd_Bidang' => Yii::$app->user->identity->tperan->kd_bidang, 'Kd_Unit' => Yii::$app->user->identity->tperan->kd_unit,])->delete();\n \\common\\models\\TaMisiSKPD::findOne(['ID_Tahun' => $ID_Tahun->ID_Tahun, 'No_Misi' => 98, 'Kd_Urusan' => Yii::$app->user->identity->tperan->kd_urusan, 'Kd_Bidang' => Yii::$app->user->identity->tperan->kd_bidang, 'Kd_Unit' => Yii::$app->user->identity->tperan->kd_unit])->delete();\n \\common\\models\\TaKegiatanSkpd::deleteAll(['ID_Tahun' => $ID_Tahun->ID_Tahun, 'No_Misi' => 98, 'Kd_Urusan' => Yii::$app->user->identity->tperan->kd_urusan, 'Kd_Bidang' => Yii::$app->user->identity->tperan->kd_bidang, 'Kd_Unit' => Yii::$app->user->identity->tperan->kd_unit]);\n \\common\\models\\TaKegiatanSkpd::deleteAll(['ID_Tahun' => $ID_Tahun->ID_Tahun, 'No_Misi' => 99, 'Kd_Urusan' => Yii::$app->user->identity->tperan->kd_urusan, 'Kd_Bidang' => Yii::$app->user->identity->tperan->kd_bidang, 'Kd_Unit' => Yii::$app->user->identity->tperan->kd_unit]);\n \n\n //$this->findModel($ID_Tahun, $Kd_Prov, $Kd_Kab_Kota, $Kd_Perubahan, $Kd_Dokumen, $Kd_Usulan, $No_Misi)->delete();\n\n return $this->redirect(Yii::$app->request->referrer);\n }", "title": "" }, { "docid": "a398027d9870b63e7cc39ad0d4582564", "score": "0.64468056", "text": "public function delete(){\n $Id = ''; $codigo = ''; $concepto = ''; $estado=\"\";\n $result = $this->model->getById('Id',$_POST['id']);\n foreach ($result as $r) {\n $Id = $r[\"Id\"];\n $concepto = $r[\"Concepto\"];\n $estado = $r[\"estado\"];\n }\n require_once ROOT . FOLDER_PATH .'/app/Request/PagoRequest.php';\n }", "title": "" }, { "docid": "5b2afa59af54a2892e39b1132698902d", "score": "0.6445389", "text": "public function Borrar_Producto_Carrito($producto=0, $cantidad=0) {\n $this->Iniciar_Procesos_Carro();\n\n Session::Set('pv_tron_resumen',0);\n Session::Set('pv_ocas_resumen',0);\n if ( $producto == 0 && $cantidad == 0){\n $IdProducto = General_Functions::Validar_Entrada('IdProducto','NUM');\n $Cantidad = General_Functions::Validar_Entrada('Cantidad','NUM');\n $IdProductoCombo = General_Functions::Validar_Entrada('idproductocombo','NUM');\n\n }else{\n $IdProducto = $producto;\n $Cantidad = $cantidad;\n $IdProductoCombo = 0;\n }\n $i = 0;\n $NombreArray = 'TRON'.$IdProducto; // CAPTURA CANTIDAD DE PRODUCTO TRON COMPRADO\n\n\n if ( $IdProductoCombo == 0 ){\n\n foreach ($this->Datos_Carro as $key => $productos) {\n if ($productos['idproducto'] == $IdProducto) {\n $cantidad_producto = $this->Datos_Carro[$key]['cantidad'];\n $cantidad_producto = $cantidad_producto - $Cantidad;\n\n Session::Set($NombreArray,$cantidad_producto);\n\n if ($cantidad_producto <= 0) {\n array_splice($this->Datos_Carro, $i, 1);\n Session::Set($NombreArray,0);\n }else {\n $this->Datos_Carro[$key]['cantidad'] = $cantidad_producto;\n }\n }\n $i++;\n } // end foreach\n }\n $i=0;\n if ( $IdProductoCombo > 0 ){\n foreach ($this->Datos_Carro as $key => $productos) {\n if ($productos['idproductocombo'] == $IdProductoCombo) {\n unset( $this->Datos_Carro[$i] );\n }\n $i++;\n\n } // end foreach\n }\n\n Session::Destroy('CarritoTron');\n $this->Cerrar_Procesos_Carro();\n\n $this->Totalizar_Carrito();\n if ( $producto == 0 ){ /// SI HE ENVIADO UN PRODUCTO COMO PARÁMETRO\n $this->Retornar_Totales_Carro_Json();\n }\n }", "title": "" }, { "docid": "856a20429e96977788fc4b48f610480e", "score": "0.64402986", "text": "public function borrarDocumentosComunicacionAction(Request $request){\n date_default_timezone_set('America/Tegucigalpa');\n //Instanciamos el Servicio Helpers\n $helpers = $this->get(\"app.helpers\");\n \n $em = $this->getDoctrine()->getManager();\n \n //Recoger el Hash\n //Recogemos el Hash y la Autrizacion del Mismo\n $hash = $request->get(\"authorization\", null);\n //Se Chekea el Token\n $checkToken = $helpers->authCheck($hash);\n //Evalua que el Token sea True\n if($checkToken == true){\n $identity = $helpers->authCheck($hash, true);\n \n //Convertimos los Parametros POSt a Json\n $json = $request->get(\"json\", null);\n \n //Comprobamos que Json no es Null\n if ($json != null) {\n $params = json_decode($json);\n \n //Parametros a Convertir \n //Datos generales de la Tabla\n $cod_documento_del = ($params->codDocument != null) ? $params->codDocument : null ; \n $id_correspondencia_det = ($params->idCorrespondenciaDet != null) ? $params->idCorrespondenciaDet : null ; \n $id_correspondencia_enc = ($params->idCorrespondenciaEnc != null) ? $params->idCorrespondenciaEnc : null ; \n $desc_documento = ($params->descDocumento != null) ? $params->descDocumento : null ; \n \n $fecha_ingreso = new \\DateTime('now');\n \n $hora_ingreso = new \\DateTime('now'); \n $hora_ingreso->format('H:i');\n \n \n // INI de Grabacion de Documentos ******************************\n // Buscamos el Documento con el Parametro enviado\n //Instanciamos de la Clase TblDocumentos **********************\n $documento_borrarBD = $em->getRepository(\"BackendBundle:TblDocumentos\")->findOneBy(\n array(\n \"codDocumento\" => $cod_documento_del \n )); \n $em->remove( $documento_borrarBD ); //Borramos el Documento\n \n $flush = $em->flush();\n \n if ($flush == null) {\n // Ingresamos la Botacora del Borrado\n // ************************************************************\n $bitacoraDeleter = new TblBitacoraBorradoDocumentos();\n\n //Ingresamos un valor en la Tabla **********************\n //Bitacora Borrao Documentos ******************************* \n $bitacoraDeleter->setDescDocumento( $desc_documento ); //Set de Descripcion\n $bitacoraDeleter->setJustificacionBorrado( \"Borrado desde la ventana ... \" ); //Set de Descripcion\n $bitacoraDeleter->setFechaBorrado( $fecha_ingreso ); //Set de Fecha Borrado\n $bitacoraDeleter->setHoraBorrado( $hora_ingreso ); //Set de Fecha Salida\n \n //Buscamos El Usuario que lo Borra en la tabla Usuarios\n $usuarioDel = $em->getRepository(\"BackendBundle:TblUsuarios\")->findOneBy(\n array(\n \"idUsuario\" => $identity->sub\n ));\n $bitacoraDeleter->setIdUsuario( $usuarioDel ); //Set de Id de Usuario\n \n //Buscamos El Id de la CorrespondenciaEnc\n $correspondenciaEncDel = $em->getRepository(\"BackendBundle:TblCorrespondenciaEnc\")->findOneBy(\n array(\n \"idCorrespondenciaEnc\" => $id_correspondencia_enc\n ));\n $bitacoraDeleter->setIdCorrespondenciaEnc( $correspondenciaEncDel ); //Set de Id de Comunicacion\n \n //Persistencia de los Datos\n $em->persist( $bitacoraDeleter );\n $em->flush();\n \n //**********************************************************\n //Buscamos si tiene mas Detalle la Tabla de Documentos\n $detalle_comunicacion = $em->getRepository(\"BackendBundle:TblDocumentos\")->findOneBy(\n array(\n \"idCorrespondenciaDet\" => $id_correspondencia_det\n )); \n \n //Contamos Cuantas Acciones de Documentos tiene ese Detalle\n if( count($detalle_comunicacion) == 0 ){\n //Buscamos si tiene mas Detalle la Tabla de Documentos\n // INI Borrar Detalle Correspondencia\n $act_detalle_comunicacion = $em->getRepository(\"BackendBundle:TblCorrespondenciaDet\")->findOneBy(\n array(\n \"idCorrespondenciaDet\" => $id_correspondencia_det\n ));\n \n $em->remove( $act_detalle_comunicacion );\n \n $flush = $em->flush();\n }\n //Bitacora de \n // Fin de Borrar Detalle Correspondencia\n \n //Array de Mensajes\n $data = array(\n \"status\" => \"success\", \n \"code\" => 200, \n \"msg\" => \"Se ha Borrado el Documento Exitosamente \",\n //\"data\" => $correspondenciaConsulta\n );\n } else {\n //Array de Mensajes\n $data = array(\n \"status\" => \"error\", \n \"code\" => 500, \n \"msg\" => \"No se ha Borrado el Documento, intentalo de nuevo ... \",\n //\"data\" => $correspondenciaConsulta\n );\n } \n // FIN de Grabacion de Documentos ******************************\n }else {\n //Array de Mensajes\n $data = array(\n \"status\" => \"error\", \n \"code\" => 400, \n \"msg\" => \"Documento no Creado, parametros invalidos !!\"\n );\n }\n }else {\n $data = array(\n \"status\" => \"error\", \n \"code\" => 500, \n \"msg\" => \"Autorizacion de Token no valida, tu sessión ha caducado !!\" \n );\n }\n //Retorno de la Funcion ************************************************\n return $helpers->parserJson($data); \n }", "title": "" }, { "docid": "5d27c62a973a172346706f6b753a214b", "score": "0.64364934", "text": "function eliminarActivoFijoUltimoRegistro(){\r\n\t\t$this->procedimiento='gev.f_tgv_activo_fijo_ultimo_registro_ime';\r\n\t\t$this->transaccion='tgv_urg_ELI';\r\n\t\t$this->tipo_procedimiento='IME';\r\n\t\t\t\t\r\n\t\t//Define los parametros para la funcion\r\n\t\t$this->setParametro('id_ultimo_registro','id_ultimo_registro','int4');\r\n\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "title": "" }, { "docid": "a743bf425b37f09745e2b6b16388ff9c", "score": "0.64350605", "text": "function eliminarLogEstado(){\n\t\t$this->procedimiento='oip.ft_log_estado_ime';\n\t\t$this->transaccion='OIP_OIPLOG_ELI';\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_log_estado','id_log_estado','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}", "title": "" }, { "docid": "ba2ccda63afc1b26684ffb064afb1f0e", "score": "0.6424581", "text": "public function del()\n\t{\n\t\ttry\n\t\t{\n\t\t\tif(isset($this->_idIscrizione))\n\t\t\t{\n\t\t\t\t$sql = 'DELETE FROM iscrizione\n\t\t\t\tWHERE idIscrizione = :id';\n\t\t\t\t$data = [\n\t\t\t\t\t'id' => $this->_idIscrizione + 0\n\t\t\t\t];\t\n\t\t\t}\n\t\t\telse if(isset($this->_idUtente))\n\t\t\t{\n\t\t\t\tif(isset($this->_idLezione))\n\t\t\t\t{\n\t\t\t\t\t$sql = 'DELETE FROM iscrizione\n\t\t\t\t\tWHERE utente = :id AND lezione = :class';\n\t\t\t\t\t$data = [\n\t\t\t\t\t\t'id' => $this->_idUtente + 0,\n\t\t\t\t\t\t'class' => $this->_idLezione + 0\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$sql = 'UPDATE lezione l\n\t\t\t\t\tINNER JOIN iscrizione i ON i.lezione = l.idLezione\n\t\t\t\t\tSET l.postiOccupati = l.postiOccupati - 1\n\t\t\t\t\tWHERE i.utente = :id';\n\t\t\t\t\t$data = [\n\t\t\t\t\t\t'id' => $this->_idUtente + 0\n\t\t\t\t\t];\n\t\t\t\t\t$stmt = $this->db->prepare($sql);\n\t\t\t\t\t$stmt->execute($data);\n\n\t\t\t\t\t$sql = 'DELETE FROM iscrizione\n\t\t\t\t\tWHERE utente = :id';\n\t\t\t\t\t$data = [\n\t\t\t\t\t\t'id' => $this->_idUtente + 0\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\theader(\"HTTP/1. 500 Internal server error\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$stmt = $this->db->prepare($sql);\n\t\t\t$stmt->execute($data);\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\theader(\"HTTP/1. 500 Internal server error\");\n\t\t}\n\t}", "title": "" }, { "docid": "5fa3b1b07c0662da532434e7f0771e59", "score": "0.64204437", "text": "function deleteComentario($id_comentario){\n \n $sentencia = $this->bbdd->prepare( \" DELETE FROM comentario WHERE id_comentario = ? \");\n return $sentencia->execute(array($id_comentario));\n\n //te dice cuantas filas toco/borro/etc esa sentencia\n return $sentencia->rowCount();\n }", "title": "" }, { "docid": "72c83bd995f4f936fb8879569d64d77e", "score": "0.6405403", "text": "public function eliminarAction()\n {\n $this->disableAutoRender();\n\n /* Recibo la lista de Ids separado por comas */\n $idList = $this->_getParam('id');\n\n if ($idList) {\n /* Convierto la lista a un Array */\n $idArray = explode (\",\", $idList);\n\n /* Recorro el array eliminando cada Id */\n foreach ($idArray as $id) {\n try {\n $this->_modelo->eliminar($id);\n } catch(Exception $ex) {\n $message = $ex->getMessage();\n echo 'error|'.$message;\n }\n }\n }\n }", "title": "" }, { "docid": "7129516218b6fbb4d873e14e1232dc7f", "score": "0.64036536", "text": "public function unlinkPrazoAction ()\n {\n $this->_helper->layout()->disableLayout();\n $this->_helper->viewRenderer->setNoRender(TRUE);\n\n $sqAssunto = $this->_getParam('sqAssunto');\n $sqTipoDocumento = $this->_getParam('sqTipoDocumento');\n $sqIndicacaoPrazo = $this->_getParam('sqIndicacaoPrazo');\n $this->getService()->unlinkPrazo($sqAssunto, $sqTipoDocumento, $sqIndicacaoPrazo);\n }", "title": "" }, { "docid": "0a3886ecbe299971a0e9825428cd4d98", "score": "0.6402312", "text": "public function eliminarEpicrisis()\r\n {\r\n $sql = \"DELETE FROM Epicrisis WHERE cedula_Usuario = '{$this-> cedula_Usuario}'\";\r\n $this-> conex-> consultaSimple($sql);\r\n }", "title": "" }, { "docid": "3d901de54c6e1590a0f52d90be0eaf40", "score": "0.6396758", "text": "function DELETE()\n\t{\n\t\t$this->query = \"DELETE FROM RESPONSABLE_RECURSO \n\t\tWHERE\n\t\t(LOGIN_RESPONSABLE = '$this->login_responsable')\n\t\t\";\n\n\t\t$this->execute_single_query();\n\n\t\tif ($this->feedback['ok']) {\n\t\t\t$this->feedback['code'] = '08003'; //borrado con exito\n\t\t} else {\n\t\t\tif ($this->feedback['code'] != '00000') //sino es fallo conexion gestor\n\t\t\t\t$this->feedback['code'] = '02108'; //borrado fallido\n\t\t}\n\n\t\treturn $this->feedback;\n\t}", "title": "" }, { "docid": "f1f01b85959e7847ed9ba3bb7dad603e", "score": "0.639071", "text": "public function actionEliminardetallesordenterceromasivo($id) {\n $mds = OrdenProduccionTerceroDetalle::find()->where(['=', 'id_orden_tercero', $id])->all();\n $orden_tercero = OrdenProduccionTercero::findOne($id);\n $mensaje = \"\";\n \n if (Yii::$app->request->post()) {\n $intIndice = 0;\n\n if (isset($_POST[\"seleccion\"])) {\n foreach ($_POST[\"seleccion\"] as $intCodigo) {\n try {\n OrdenProduccionTerceroDetalle::findOne($intCodigo)->delete();\n $this->ActualizarValorTercero($id);\n $this->redirect([\"orden-produccion/viewtercero\", 'id' => $id]);\n } catch (IntegrityException $e) {\n //$this->redirect([\"orden-produccion/view\", 'id' => $idordenproduccion]);\n Yii::$app->getSession()->setFlash('error', 'Error al eliminar el detalle, tiene registros asociados.');\n \n } catch (\\Exception $e) {\n Yii::$app->getSession()->setFlash('error', 'Error al eliminar el detalle, tiene registros asociados.');\n \n }\n \n }\n \n } else {\n $mensaje = \"Debe seleccionar al menos un registro para ejecutar el proceso.\";\n }\n }\n return $this->render('_formeliminardetallesordentercero', [\n 'mds' => $mds,\n 'id' => $id,\n 'mensaje' => $mensaje,\n 'orden_tercero' => $orden_tercero,\n ]);\n }", "title": "" }, { "docid": "beed29ddf949bfa62ad2eb9911a2045f", "score": "0.63856274", "text": "function eliminarFuncionario(){\r\n\t\t$this->objFunSeguridad=new FuncionesRecursosHumanos();\t\r\n\t\t$this->res=$this->objFunSeguridad->eliminarFuncionario($this->objParam);\r\n\t\t$this->res->imprimirRespuesta($this->res->generarJson());\r\n\r\n\t}", "title": "" }, { "docid": "8fd5c87dbc6d88edd61d49db54a68ec5", "score": "0.6378527", "text": "public function borrar(){\n $vehiculo_table = Config::get()->db_vehiculo_table;\n $consulta = \"DELETE FROM $vehiculo_table WHERE id='$this->id';\";\n return Database::get()->query($consulta);\n }", "title": "" }, { "docid": "d3b72a34ea8f824f73ccf8bb77cb7771", "score": "0.6372177", "text": "function delete(){\n $sql=\"SELECT * FROM Recurso WHERE Id_Recurso='$this->Id_Recurso'\";\n $resultado= $this->mysqli->query($sql);\n if ($resultado->num_rows==1) { //si encuentra la tupla a borrar\n $sql = \"DELETE FROM Recurso WHERE (Id_Recurso='$this->Id_Recurso')\";\n $this->mysqli->query($sql);\n return \"Borrado correctamente\";\n }\n else{\n return \"No se encuentra el Recurso\";\n }\n }", "title": "" }, { "docid": "895dd2be1daaba1341cf1b4107bd72c7", "score": "0.6338262", "text": "function deleteRespuestasPlaId($id) {\r\n $encuestas = $this->getIdsEncuestas($id);\r\n $cont = 0;\r\n $predicado = ' 0 ';\r\n while ($cont < count($encuestas)) {\r\n $predicado = $predicado . ' or enc_id =' . $encuestas[$cont]['enc_id'];\r\n $cont++;\r\n }\r\n $r = $this->db->borrarRegistro('instrumento_respuestas', $predicado);\r\n }", "title": "" }, { "docid": "cee9e04f007b7720e9a32de97bd546de", "score": "0.6335007", "text": "function deleteByComprobante($id)\n {\n global $db;\n $items = $this->getListItems($id); \n for ($i=0; $i<count($items); $i++)\n { \n $this->deleteByItem($items[$i][\"ingresoId\"]);\n }\n $sql = \" delete from almacen_reception where itemId = $id \";\n $db->Execute($sql); \n }", "title": "" }, { "docid": "7ba4ffd31af0df134b7f89fdc7657f96", "score": "0.633196", "text": "function eliminarFuncionario(){\n $this->objFunSeguridad=$this->create('MODFuncionario');\n $this->res=$this->objFunSeguridad->eliminarFuncionario($this->objParam);\n $this->res->imprimirRespuesta($this->res->generarJson());\n\n }", "title": "" }, { "docid": "7f0de81eb7697b452b2c8744879632fc", "score": "0.63146764", "text": "public function supprimerAction($id)\n\t{\n\t $em = $this->container->get('doctrine')->getManager();\t \n\t $acteur = $em->find('GCNAFNAFBundle:EquipeChef', $id);\t//id=ref\t \n\t \t$salarie=$acteur->getIdSalarie();\n \t \t$dated=$acteur->getDateD();\t\n\t \t$interval = new DateInterval('P1D'); //-1 jour \n\t \t$date3 = clone $dated;\n\t \t$date3->sub($interval);\n\t \t$date3->format('Y-m-d');\t//fin =dd-1\n//requete\n$qb = $em->createQueryBuilder();\n$qb->select('r')\n->from('GCNAFNAFBundle:EquipeChef', 'r')\n->where('r.idSalarie = :ids');\t\t\n$qb->setParameter('ids', $salarie);\t\t\t\t\t\n$query = $qb->getQuery(); \n$total = $query->getResult();\t\n\t $max=count($total);\n\t $tab=array();\n\t\tfor($i=0;$i<$max;$i++){\n\t\t\t$tab[$i]=$total[$i];\n\t\t}\n\t $m=count($tab);\t \t\t\n\t\tfor($j=0;$j<$m;$j++){\n\t\t$datefin=$tab[$j]->getDateF();\t\t\n\t\t\tif($datefin==$date3)\n\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t$newDF=$tab[$j]->setDateF(NULL);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t}//end for\n\t if (!$acteur) \n\t {\n\t\tthrow new NotFoundHttpException(\"salarie non trouve\");\n\t }\t\t\t\n\t $em->remove($acteur);\n\t $em->flush(); \n\t return new RedirectResponse($this->container->get('router')->generate('GCNAFNAFBundle_chef_equipe'));\t \t \n\t}", "title": "" }, { "docid": "27d47385495b3864b693768aabca5174", "score": "0.6313498", "text": "function removeEspaco ($db,$morada,$codigo) {\n try{\n $db->beginTransaction(); \n $values = array($morada,$codigo);\n $sql = \"DELETE FROM arrenda WHERE morada = ? AND codigo = ?\";\n $stmt = $db->prepare($sql); \n $affected_rows = $stmt->execute($values);\n\n $values = array($morada,$codigo);\n $sql = \"DELETE FROM espaco WHERE morada = ? AND codigo = ?\";\n $stmt = $db->prepare($sql); \n $affected_rows = $stmt->execute($values);\n\n $valuesAlugavel = array($morada,$codigo);\n $sql = \"DELETE FROM alugavel WHERE morada = ? AND codigo = ?\";\n $stmt = $db->prepare($sql); \n $affected_rows = $stmt->execute($valuesAlugavel);\n $db->commit();\n\n }\n\n catch (Exception $e) {\n $db->rollBack();\n echo(\"<p>Nao e possivel remover o Espaco.</p>\");\n }\n \n }", "title": "" }, { "docid": "fcca42e891a64256702091372abb0fef", "score": "0.6307772", "text": "public function eliminarServicio($condiciones) {\r\n \r\n \t$this->pdo->beginTransaction();\t\r\n\r\n\r\n\t$r1 = $this->pdo->_delete('tr013_servicio', $condiciones);\r\n\t\r\n\tif($r1)\r\n\t\t\t{$this->pdo->commit(); return true;}\r\n\telse\t\t\r\n\t\t\t{$this->pdo->rollback(); return \"Error : 1= \".$r1;\t }\r\n }", "title": "" }, { "docid": "aef11d40ca8d92a1b2380197f56e153b", "score": "0.63037586", "text": "private function delCombi()\n {\n $cuerpo = file_get_contents('php://input');\n $usuario = json_decode($cuerpo);\n\n $resultado = self::deleteUserC($usuario);\n\n switch ($resultado) {\n case self::ESTADO_CREACION_EXITOSA:\n http_response_code(200);\n return\n [\n \"estado\" => self::ESTADO_CREACION_EXITOSA,\n \"mensaje\" => utf8_encode(\"Se ha borrado el usuario\")\n ];\n break;\n case self::ESTADO_CREACION_FALLIDA:\n throw new ExcepcionApi(self::ESTADO_CREACION_FALLIDA, \"Ha ocurrido un error\");\n break;\n default:\n throw new ExcepcionApi(self::ESTADO_FALLA_DESCONOCIDA, \"Falla desconocida\", 400);\n }\n }", "title": "" }, { "docid": "517776fdfaa0da0c9124a699d75d93f1", "score": "0.62987804", "text": "function eliminarInstrucSegDet(){\n\t\t$this->procedimiento='gem.ft_instruc_seg_det_ime';\n\t\t$this->transaccion='GM_INSEDE_ELI';\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_instruc_seg_det','id_instruc_seg_det','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}", "title": "" }, { "docid": "ed618b315c71f8264dd3ec68219b9949", "score": "0.62913007", "text": "public function borrado(Request $request)\n {\n $fecha_borrado = $request->input('fecha_borrado');\n\n //Conversión de fecha al formado usado por la BBDD.\n $fecha_borrado_2 = date(\"Y-m-d\", strtotime($fecha_borrado));\n\n\n $viajes = DB::table('viajes')\n ->where('viajes.dia', '<', $fecha_borrado_2)\n ->select('viajes.id')\n ->get();\n\n\n\n\n\n foreach ($viajes as $viaje){\n\n\n\n\n $reservas = DB::table('reservas')\n ->where('reservas.viaje_id', '=', $viaje->id)\n ->select('reservas.cliente_id', 'reservas.id')\n ->get();\n \n //Se borran los registros de la tabla 'reservas' con el valor de 'viaje_id' igual a '$viaje->id'. \n DB::table('reservas')->where('reservas.viaje_id', '=', $viaje->id)->delete();\n //echo 'Borrado de reserva con id '.$reserva->id.'<br>'; \n \n\n foreach($reservas as $reserva){\n\n $clientes = DB::table('clientes')\n ->where('clientes.id', '=', $reserva->cliente_id)\n ->select('clientes.id')\n ->get();\n\n foreach ($clientes as $cliente){\n $otras_reservas = DB::table('reservas')\n ->where('reservas.cliente_id','=', $cliente->id)\n ->count();\n\n\n \n\n //echo 'numero de reservas del cliente con id '.$cliente->id.': '.$otras_reservas.'<br>';\n\n if ($otras_reservas == 0){\n\n\n //Se borra el registro para el cliente con 'id' igual '$cliente->id'.\n DB::table('clientes')->where('clientes.id', '=', $cliente->id)->delete();\n //echo 'Borrado de cliente con id '.$cliente->id.'<br>';\n }\n\n\n }\n\n\n\n }\n\n\n\n }\n\n //Se borran los registros de la tabla 'viajes' con el valor de 'dia' menor que '$fecha_borrado_2'. \n DB::table('viajes')->where('viajes.dia', '<', $fecha_borrado_2)->delete();\n //echo 'Borrado de viaje con id '.$viaje->id.'<br>';\n //DB::table('viajes')->where('viajes.id', '=', 1)->delete();\n\n $message = 'Se han eliminado las reservas seleccionadas';\n return view('reserva/message', ['mensaje' => $message]);\n\n }", "title": "" }, { "docid": "312087ac49a140eaae990e54e006d372", "score": "0.6289728", "text": "private function suppr_res(){\n\t\t\tif($this->get_request_method() != \"DELETE\"){ $this->response('',406); }\n\t\t $my_preco=new Model_Precos;\n\t\t $numanc=$this->_request['numanc'];\n\t\t $ret=$my_preco->delete($numanc);\n\t\t If($ret){\n\t\t\t $success = array('status' => \"Success\", \"msg\" => \"Element supprimé.\");\n\t\t\t $this->response($this->json($success),200);\n\t\t }else{\n\t\t\t $this->response('',204);\n\t\t }\n\t\t}", "title": "" }, { "docid": "75eee50acb924af9d4fb73269bc3a3bb", "score": "0.6286609", "text": "public function excluir(){\r\n return (new Database('contas'))->delete('id = '.$this->id);\r\n }", "title": "" }, { "docid": "a0cb207e40afde984e28ce26ac7c4a6d", "score": "0.62798005", "text": "function eliminarNumeroServicio(){\n\t\t$this->procedimiento='gecom.ft_numero_servicio_ime';\n\t\t$this->transaccion='GC_NUMSER_ELI';\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_numero_servicio','id_numero_servicio','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}", "title": "" }, { "docid": "7de53d9b8db31af4f76ce90c92b141c3", "score": "0.626773", "text": "public function delete($tipo_periferico){\r\n $id=$tipo_periferico->getId();\n\r\n try {\r\n $sql =\"DELETE FROM `tipo_periferico` WHERE `id`='$id'\";\r\n return $this->insertarConsulta($sql);\r\n } catch (SQLException $e) {\r\n throw new Exception('Primary key is null');\r\n }\r\n }", "title": "" }, { "docid": "842db4901a9612662168ffd3df842c58", "score": "0.6264056", "text": "static public function ctrEliminarCotizacion(){\n\n\t\tif (isset($_GET[\"idCotizacion\"])) {\n\t\t\t\n\t\t\t$tabla = \"Cotizaciones\";\n\t\t\t$datos = $_GET[\"idCotizacion\"];\n\n\t\t\t$respuesta = ModeloCotizaciones::mdlBorrarCotizacion($tabla, $datos);\n\n\t\t\tif ($respuesta == \"ok\") {\n\t\t\t\t\n\t\t\t\techo '<script>\n\t\t\t\t\t\t\n\t\t\t\t\t\tswal({\n\n\t\t\t\t\t\t\ttype: \"success\",\n\t\t\t\t\t\t\ttitle: \"La cotización ha sido eliminada exitosamente\",\n\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\tcloseOnConfirm: false\n\n\t\t\t\t\t\t\t}).then(function(result){\n\n\t\t\t\t\t\t\t\tif(result.value){\n\n\t\t\t\t\t\t\t\t\twindow.location = \"cotizaciones\";\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t </script> ';\n\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "fb87998bbe16b7cdfbc8c557d1d7a0d6", "score": "0.6262939", "text": "public function insertPedidoRecurFinan() {\n\t\t// Para gravar nulo nos campos quando não houver informação\n\t\t\n\t\tif (null !== ($this->__get('arq_orc_pedido'))) {\n\t\t\tif (empty($this->__get('arq_orc_pedido'))) {\n\t\t\t\t$arq_orc_pedido = null;\n\t\t\t} else {\n\t\t\t\t$arq_orc_pedido = $this->__get('arq_orc_pedido');\n\t\t\t}\n\t\t} else {\n\t\t\t$arq_orc_pedido = null;\n\t\t}\n\n\t\tif (null !== ($this->__get('dir_guarda_arq'))) {\n\t\t\tif (empty($this->__get('dir_guarda_arq'))) {\n\t\t\t\t$dir_guarda_arq = null;\n\t\t\t} else {\n\t\t\t\t$dir_guarda_arq = $this->__get('dir_guarda_arq');\n\t\t\t}\n\t\t} else {\n\t\t\t$dir_guarda_arq = null;\n\t\t}\n\n\t\tif (null !== ($this->__get('arq_compara_preco_pedido'))) {\n\t\t\tif (empty($this->__get('arq_compara_preco_pedido'))) {\n\t\t\t\t$arq_compara_preco_pedido = null;\n\t\t\t} else {\n\t\t\t\t$arq_compara_preco_pedido = $this->__get('arq_compara_preco_pedido');\n\t\t\t}\n\t\t} else {\n\t\t\t$arq_compara_preco_pedido = null;\n\t\t}\n\n\t\tif (null !== ($this->__get('dt_autoriza_pedido'))) {\n\t\t\tif (empty($this->__get('dt_autoriza_pedido'))) {\n\t\t\t\t$dt_autoriza_pedido = null;\n\t\t\t} else {\n\t\t\t\t$dt_autoriza_pedido = $this->__get('dt_autoriza_pedido');\n\t\t\t}\n\t\t} else {\n\t\t\t$dt_autoriza_pedido = null;\n\t\t}\n\n\t\tif (null !== ($this->__get('cd_vlnt_resp_autoriza'))) {\n\t\t\tif (empty($this->__get('cd_vlnt_resp_autoriza'))) {\n\t\t\t\t$cd_vlnt_resp_autoriza = null;\n\t\t\t} else {\n\t\t\t\t$cd_vlnt_resp_autoriza = $this->__get('cd_vlnt_resp_autoriza');\n\t\t\t}\n\t\t} else {\n\t\t\t$cd_vlnt_resp_autoriza = null;\n\t\t}\n\n/*\n\t\techo 'cd_grp '. $this->__get('cd_grp'); \n\t\techo '<br>'; \n\t\techo 'cd_sbgrp '. $this->__get('cd_sbgrp'); \n\t\techo '<br>'; \n\t\techo 'seql_pedido_finan '. $this->__get('seql_pedido_finan');\n\t\techo '<br>'; \t\t\n\t\techo 'dsc_sucinta_pedido '. $this->__get('dsc_sucinta_pedido');\n\t\techo '<br>'; \t\t\n\t\techo 'dsc_resum_pedido '. $this->__get('dsc_resum_pedido');\n\t\techo '<br>'; \t\t\n\t\techo 'menor_vlr_encontra '. $this->__get('menor_vlr_encontra');\n\t\techo '<br>'; \t\t\n\t\techo 'arq_orc_pedido '. $arq_orc_pedido; \n\t\techo '<br>'; \t\t\n\t\techo 'arq_compara_preco_pedido '. $arq_compara_preco_pedido;\n\t\techo '<br>'; \t\t\n\t\techo 'cd_vlnt_resp_pedido '. $this->__get('cd_vlnt_resp_pedido'); \n\t\techo '<br>'; \t\t\n\t\techo 'dt_autoriza_pedido '. $dt_autoriza_pedido;\n\t\techo '<br>'; \t\t\n\t\techo 'cd_vlnt_resp_autoriza '. $cd_vlnt_resp_autoriza;\n\t\techo '<br>'; \t\t\n\t\techo 'cd_tip_enquadra_pedido '. $this->__get('cd_tip_enquadra_pedido');\n\t\techo '<br>'; \n\t\techo 'cd_est_pedido '. $this->__get('cd_est_pedido');\n\t\techo '<br>'; \n\t\techo 'cd_situ_envio_ressar_pedido '. $this->__get('cd_situ_envio_ressar_pedido');\n\t\techo '<br>'; \t\t\n\t\techo 'dir_guarda_arq '. $this->__get('dir_guarda_arq');\n*/\n\t\t$query = \" \n\t\t\t\tinsert into tb_pedido_recur_finan\n\t\t\t\t(cd_grpID, \n\t\t\t\tcd_sbgrpID, \n\t\t\t\tseql_pedido_finanID, \n\t\t\t\tdsc_sucinta_pedido,\n\t\t\t\tdsc_resum_pedido,\n\t\t\t\tmenor_vlr_encontra,\n\t\t\t\tarq_orc_pedido, \n\t\t\t\tarq_compara_preco_pedido,\n\t\t\t\tdt_incl_pedido, \n\t\t\t\tcd_vlnt_resp_pedido, \n\t\t\t\tdt_autoriza_pedido,\n\t\t\t\tcd_vlnt_resp_autoriza,\n\t\t\t\tcd_tip_enquadra_pedido,\n\t\t\t\tcd_est_pedido,\n\t\t\t\tcd_situ_envio_ressar_pedido,\n\t\t\t\tts_pedido,\n\t\t\t\tdir_guarda_arq)\n\n\t\t\t\tvalues \n\n\t\t\t\t(:cd_grp, \n\t\t\t\t:cd_sbgrp, \n\t\t\t\t:seql_pedido_finan, \n\t\t\t\t:dsc_sucinta_pedido,\n\t\t\t\t:dsc_resum_pedido,\n\t\t\t\t:menor_vlr_encontra,\n\t\t\t\t:arq_orc_pedido, \n\t\t\t\t:arq_compara_preco_pedido,\n\t\t\t\tnow(), \n\t\t\t\t:cd_vlnt_resp_pedido, \n\t\t\t\t:dt_autoriza_pedido,\n\t\t\t\t:cd_vlnt_resp_autoriza,\n\t\t\t\t:cd_tip_enquadra_pedido,\n\t\t\t\t:cd_est_pedido,\n\t\t\t\t:cd_situ_envio_ressar_pedido,\n\t\t\t\tCURRENT_TIMESTAMP,\n\t\t\t\t:dir_guarda_arq)\";\n\n\t\t$stmt = $this->db->prepare($query);\n\t\t$stmt->bindValue('cd_grp', $this->__get('cd_grp')); \n\t\t$stmt->bindValue('cd_sbgrp', $this->__get('cd_sbgrp')); \n\t\t$stmt->bindValue('seql_pedido_finan', $this->__get('seql_pedido_finan'));\n\t\t$stmt->bindValue('dsc_sucinta_pedido', $this->__get('dsc_sucinta_pedido'));\n\t\t$stmt->bindValue('dsc_resum_pedido', $this->__get('dsc_resum_pedido'));\n\t\t$stmt->bindValue('menor_vlr_encontra', $this->__get('menor_vlr_encontra'));\n\t\t$stmt->bindValue('arq_orc_pedido', $arq_orc_pedido); \n\t\t$stmt->bindValue('arq_compara_preco_pedido', $arq_compara_preco_pedido);\n\t\t$stmt->bindValue('cd_vlnt_resp_pedido', $this->__get('cd_vlnt_resp_pedido')); \n\t\t$stmt->bindValue('dt_autoriza_pedido', $dt_autoriza_pedido);\n\t\t$stmt->bindValue('cd_vlnt_resp_autoriza', $cd_vlnt_resp_autoriza);\n\t\t$stmt->bindValue('cd_tip_enquadra_pedido', $this->__get('cd_tip_enquadra_pedido'));\n\t\t$stmt->bindValue('cd_est_pedido', $this->__get('cd_est_pedido'));\n\t\t$stmt->bindValue('cd_situ_envio_ressar_pedido', $this->__get('cd_situ_envio_ressar_pedido'));\n\t\t$stmt->bindValue('dir_guarda_arq', $this->__get('dir_guarda_arq'));\n\t\t$stmt->execute();\n\n\t\treturn $this;\n\n\t}", "title": "" }, { "docid": "020ba323198b30b2958c03acaece3836", "score": "0.62599254", "text": "function eliminarTerrenolt(){\n\t\t$this->procedimiento='snx.ft_terrenolt_ime';\n\t\t$this->transaccion='SNX_TLT_ELI';\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_terrenolt','id_terrenolt','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}", "title": "" }, { "docid": "6033e26d2526af3e5f480f348daedd6c", "score": "0.62562823", "text": "public function eliminarTransportista(){\n try {\n\n //CONEXION A LA BASE DE DATOS\n $conexion = new PDO('mysql:host='.$this->datosConexionBD[0].';\n dbname='.$this->datosConexionBD[3], $this->datosConexionBD[1], $this->datosConexionBD[2]);\n\n $conexion -> exec(\"set names utf8\");\n\n //Sentencia SQL para eliminar un transportista\n $query = \"DELETE FROM transportistas WHERE rfcTransportista = '\".$this->rfc.\"'\";\n\n $statement = $conexion->prepare($query);\n\n $statement->execute();\n\n return \"Transportista eliminado exitosamente\";\n }\n\n catch(PDOException $e){\n return \"Error: \" . $e->getMessage();\n }\n }", "title": "" }, { "docid": "7c6694aac10384b6bbd80f971f8bc9ad", "score": "0.6255487", "text": "function cresponsable_consultoria_delete() {\n global $conn;\n\n // Initialize table object\n $GLOBALS[\"responsable_consultoria\"] = new cresponsable_consultoria();\n\n // Initialize other table object\n $GLOBALS['usuario'] = new cusuario();\n\n // Intialize page id (for backward compatibility)\n if (!defined(\"EW_PAGE_ID\"))\n define(\"EW_PAGE_ID\", 'delete', TRUE);\n\n // Initialize table name (for backward compatibility)\n if (!defined(\"EW_TABLE_NAME\"))\n define(\"EW_TABLE_NAME\", 'responsable_consultoria', TRUE);\n\n // Open connection to the database\n $conn = ew_Connect();\n }", "title": "" }, { "docid": "b2fa00e3a91b7fd6d5df57611e83e3e1", "score": "0.6251264", "text": "function DELETE()\n{\n\n\t$check = $this->comprobar_atributos_DELETE();\n\t//si algun atributo no cumple las restricciones\n\tif ($check !== true) return $check;\n\n//Busco si profesor existe con todas las caracteristicas\n\t$sql = \"SELECT *\n\t\t\tFROM PROFESOR\n\t\t\tWHERE (DNI = '$this->dni')\";\n\n\t$obj = $this->mysqli->query($sql);\n\tif( mysqli_num_rows($obj) == 1 ){\n\n\t\t$sql = \"SELECT *\n\t\t\tFROM PROF_ESPACIO\n\t\t\tWHERE (DNI = '$this->dni')\";\n\n\t\t$obj = $this->mysqli->query($sql);\n\n\t\t$sql = \"SELECT *\n\t\t\tFROM PROF_TITULACION\n\t\t\tWHERE (DNI = '$this->dni')\";\n\n\t\t$obj2 = $this->mysqli->query($sql);\n\n\t\tif( mysqli_num_rows($obj) == 0 && mysqli_num_rows($obj2) == 0 ){\n\t\t\t$sql = \"DELETE \n \t\t\tFROM PROFESOR\n \t\t\tWHERE (DNI = '$this->dni')\";\n\n \t\t\treturn $this->mysqli->query($sql) ? 'Borrado realizado con éxito' : 'errorDelete';\n\t\t}\n\t} \n\treturn 'Error de gestor de base de datos';\n\t//return 'El profesor no existe';\n \n}", "title": "" }, { "docid": "d58ce94bc69ec904d729089ee95c93eb", "score": "0.62385976", "text": "static public function ctrEliminarPago(){\n\n\t\tif(isset($_GET[\"idPago\"])){\n\n\t\t\t$tabla =\"pagos\";\n\t\t\t$datos = $_GET[\"idPago\"];\n\n\t\t\t$respuesta = ModeloPagos::mdlEliminarPago($tabla, $datos);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo'<script>\n\n\t\t\t\tswal({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"La cuenta ha sido borrado correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"pagar\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "9317342f7a4ff5108f3e058a01b5816b", "score": "0.62374276", "text": "public function excluir()\n {\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"DELETE FROM EquipeDiscipulos WHERE discipuloId = ?\n AND equipeId = ?\n \";\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n $stm->bindParam(1, $this->discipuloId );\n $stm->bindParam(2, $this->equipeId );\n\n $resposta = $stm->execute();\n\n $erro = $stm->errorInfo();\n\n //fechar conexão\n $pdo = null ;\n\n return $resposta;\n\n }", "title": "" }, { "docid": "eb8b7442ff3118f954cf53fb69e475d2", "score": "0.6233179", "text": "public function deleteEnviosPorGuia(Request $r){\n if($r->input(\"editable\")=='true') {\n $pedidos = DB::select(\"select \n * \n from \n v_guias_pedidos_corte\n where numero_guia='\" . $r->input(\"guia\") . \"'\n \");\n\n foreach ($pedidos as $pedido) {\n DB::statement(\"DELETE FROM productos_enviados WHERE guia_pedido_id = '$pedido->guia_pedido_id'\");\n //echo \"DELETE FROM productos_enviados WHERE guia_pedido_id = '$pedido->guia_pedido_id'\";\n }\n }\n // dd(\"Ok\");\n return response(['success'=>['ok']],200);\n }", "title": "" }, { "docid": "7ae1c1962d1fed2b3f4640748d4f39b0", "score": "0.6233101", "text": "public function Delete($cod, $fecha){\r\n\r\n\t\t\ttry{\r\n\r\n\t\t\t\t/**\r\n\t\t\t\t * Primero se comprueba que si hay personas acivas en la dependencia\r\n\t\t\t\t * @return array si hay datos\r\n\t\t\t\t * @return boolean si no hay datos\r\n\t\t\t\t */\r\n $var1 = $this->Query(\"SELECT * FROM personas WHERE per_estado = '1' AND per_dep_cod = '$cod'\")->fetch();\r\n\t\t\t\t/**\r\n\t\t\t\t * se comprueba que si hay comprobantes activos en la dependencia\r\n\t\t\t\t * @return array si hay datos\r\n\t\t\t\t * @return boolean si no hay datos\r\n\t\t\t\t */\r\n $var2 = $this->Query(\"SELECT * FROM comprobantes WHERE com_estado = '1' AND com_dep_user = '$cod';\")->fetch();\r\n\t\t\t\t/**\r\n\t\t\t\t *se comprueba que el nucleo de la dependdencia este activo\r\n\t\t\t\t * @return array si hay datos\r\n\t\t\t\t * @return boolean si no hay datos\r\n\t\t\t\t */\r\n $var3 = $this->Query(\"SELECT * FROM nucleo INNER JOIN dependencia ON \r\n dependencia.dep_nucleo_cod = nucleo.nuc_cod \r\n WHERE dependencia.dep_cod = '$cod';\")->fetch();\r\n\t\t\t\t\r\n\t\t\t\tif(!$var1 && !$var2){\r\n\t\t\t\t\t$con2 = $this->Query(\"SELECT * FROM dependencia WHERE dep_cod = '$cod';\")->fetch();\r\n\r\n\t\t\t\t\tif($con2['dep_estado'] == 1){\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tif($var3[\"nuc_estado\"] == 1){\r\n\t\t\t\t\t\t\t\r\n $con3 = $this->Prepare(\"UPDATE dependencia SET dep_estado = '0', \r\n\t\t\t dep_fecha_desactivacion = '$fecha' WHERE dep_cod = :cod\");\r\n\r\n\t\t\t\t\t\t\t$con3 -> bindParam(\":cod\", $cod);\r\n\t\t\t\t\t\t\t$con3 -> execute();\r\n\r\n\t\t\t\t\t\t\tif ($con3->rowCount() > 0){\r\n\t\t\t\t\t\t\t\treturn $this->MakeResponse(200, \"Operacion Exitosa!\");\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\treturn $this->MakeResponse(400, \"Operacion Fallida!\");\r\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\treturn $this->MakeResponse(400, \"Operacion Fallida!, El nucleo esta desactivado\");\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}else if($con2['dep_estado'] == 0){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif($var3['nuc_estado'] == 1){\r\n $con3 = $this->Prepare(\"UPDATE dependencia SET dep_estado = '1',\r\n\t\t\t dep_fecha_desactivacion = null WHERE dep_cod = :cod;\");\r\n\t\t\t\t\t\t\t$con3 -> bindParam(\":cod\", $cod);\r\n\t\t\t\t\t\t\t$con3 -> execute();\r\n\r\n\t\t\t\t\t\t\tif ($con3->rowCount() > 0){\r\n\t\t\t\t\t\t\t\treturn $this->MakeResponse(200, \"Operacion Exitosa!\");\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\treturn $this->MakeResponse(400, \"Operacion Fallida!\");\r\n\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\treturn $this->MakeResponse(400, \"Operacion Fallida!\",\"El nucleo de esta Dependencia seleccionada esta desactivada\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn $this->MakeResponse(400, \"Operacion Fallida!\",\"La Dependencia esta en uso\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}catch(PDOException $e){\r\n\t\t\t\terror_log(\"Error en la consulta::models/ClsDependencias->Delete, ERROR = \".$e->getMessage());\r\n\t\t\t\treturn $this->MakeResponse(400, \"Error desconocido, Revisar php-error.log\");\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "6c35fbbf6884d1c1e85c0b24f64feffb", "score": "0.62320197", "text": "public function eliminar(){\n\t\t$usu = new Usuario();\n\t\t$permisoAdmin = $usu->verificarTipoUsuario();\n\t\tif($permisoAdmin){\n\t\t\t$request = !empty($_POST) ? $_POST : $_GET;\n\t\t\t$idPersona\t= $request['id_persona'];\t\t\t\n\t\t\t$persona = new Persona();\n\t\t\t$data = $persona->actualizarEstado($idPersona, 'borrador');\t\n\t\t\t/*$request = !empty($_POST) ? $_POST : $_GET;\n\t\t\t$idPersona\t= $request['id_persona'];\n\t\t\t$categoria = new CategoriaGeneral();\n\t\t\t$resCategoria = $categoria->eliminar($idPersona);\n\t\t\tif($resCategoria['status']){\n\t\t\t\t$area = new Area();\n\t\t\t\t$resArea = $area->eliminar($idPersona);\n\t\t\t\tif($resArea['status']){\n\t\t\t\t\t$persona = new Persona();\n\t\t\t\t\t$data = $persona->eliminar($idPersona);\t\n\t\t\t\t}else{\n\t\t\t\t\t$data = $resArea;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$data = $resCategoria;\n\t\t\t}\t*/\n\t\t}else{\n\t\t\t$data['status']=false;\n\t\t\t$data['mensaje']='No tiene permisos para eliminar';\n\t\t}\n\t\techo json_encode($data);\t\t\n\t\texit();\n\t}", "title": "" }, { "docid": "53a1bdf7ac116d9540f22bba960231bf", "score": "0.6227107", "text": "function DELETE()\n{\n\t$comprobar = $this->comprobar_DNI();\n\t\n\tif($comprobar == true)\n\t{\n\t\t//sentencia de borrado\n\t $sql = \"\tDELETE FROM \n\t \t\t\t\tPROF_TITULACION\n\t \t\t\tWHERE(\n\t \t\t\t\tDNI = '$this->DNI'\n\t \t\t\t)\n\t \t\t\t\";\n\n\t \tif ($this->mysqli->query($sql))\n\t\t{\n\t\t\t$resultado = 'Borrado realizado con éxito';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$resultado = 'Error de gestor de base de datos';\n\t\t}\n\t\treturn $resultado;\n\t}else\n\t{\n\t\treturn $comprobar;\n\t}\n}", "title": "" }, { "docid": "0f446e2f74f7b504a15e1d6115d6618c", "score": "0.6223435", "text": "public function deletarabrangenciaAction()\n {\n if ( $this->_hasParam('idFaixacep') == false )\n {\n $this->_redirect('/admin/cartorio/abrangencias');\n }\n \n $id = (int) $this->_getParam('idFaixacep');\n $where = $this->model_abrangencia->getAdapter()->quoteInto('idFaixacep = ?', $id);\n \n if($this->model_abrangencia->delete($where))\n ZendX_JQuery_FlashMessenger::addMessage('Dados deletados com sucesso.');\n else \n ZendX_JQuery_FlashMessenger::addMessage('Problemas ao deletar os dados.', 'error'); \n $this->_redirect('/admin/cartorio/abrangencias');\n }", "title": "" }, { "docid": "7f0cf06990985c7d1cea8bb999ded5d4", "score": "0.6221066", "text": "public function del(){\n\t\t$sql = \"delete from \".self::$tablename.\" where ID_COMPRA_PRO=$this->ID_COMPRA_PRO\";\n\t\tExecutor::doit($sql);\n\t}", "title": "" } ]
d861627fbe4ceee50b52a340be8689e7
/ function to open edit expiry page
[ { "docid": "831c1382cd32f98ce40de1ae8bf91e66", "score": "0.8080362", "text": "public function edit_expiry() {\r\r\n\t\ttry {\r\r\n\t\t\t$data['tab']='EditExpiry';\r\r\n\t\t\t$data['bcum']='Expiry';\r\r\n\t\t\t$data['main']='expiry';\r\r\n\t\t\t$data['mode']='edit';\r\r\n\t\t\t\r\r\n\t\t\t$datas['expiry'] = $this->em->get_expiry();\r\r\n\t\t\t\r\r\n\t\t\t$this->load->view('backend/header', $data);\r\r\n\t\t\t$this->load->view('backend/edit-expiry', $datas);\r\r\n\t\t\t$this->load->view('backend/footer');\r\r\n\t\t}\r\r\n\t\tcatch (Exception $ex) {\r\r\n\t\t\techo $ex->getMessage();\r\r\n\t\t}\r\r\n\t}", "title": "" } ]
[ { "docid": "96884a0d55f36349b743e3d913248156", "score": "0.67111444", "text": "function edit()\n {\n $this->_view_edit('edit');\n }", "title": "" }, { "docid": "ce486bb63e6598e4832f335cd2e9a1ee", "score": "0.66700715", "text": "function edit()\n {\n if (right::write())\n {\n if (session::get(\"edit\"))\n echo form::link(\"endedit\",\"edit\",\"index.php?action=noedit\",\"noedit\");\n else\n echo form::link(\"edit\",\"edit\",\"index.php?action=edit\",\"edit\");\n }\n }", "title": "" }, { "docid": "5cdfa29a84d9444ef60694c125a915cc", "score": "0.65369314", "text": "public function vewEdit($is_id){\n\t\t\tif($this->session->status) {\n\t\t\t\t$data['issue'] = $this->Issue_model->get_issue($is_id);\n\t\t\t\t$this->load->view('include/header');\n\t\t\t\t$this->load->view('Homes/edit_issue', $data);\n\t\t\t\t$this->load->view('include/footer');\n\t\t\t\t\t\t}\n\t\t\telse{\n\n\t\t\t redirect($_SERVER['HTTP_REFERER']);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "79c86103c3d8c947b2319d16bdceb16d", "score": "0.6329164", "text": "public function edit() {\n\t\tHtmlEditorField::include_js();\n//\t\tRequirements::javascript('simplewiki/javascript/sslinks/editor_plugin_src.js');\n\n\t\t$existing = $this->getEditingLocks($this->data(), true);\n\t\t// oops, we've somehow got here even though we shouldn't have\n\t\tif ($existing && $existing['user'] != Member::currentUser()->Email) {\n\t\t\treturn $this->redirect($this->data()->Link());\n\t\t}\n\n\t\tif (!$this->data()->canEdit()) {\n\t\t\treturn Security::permissionFailure($this);\n\t\t}\n\n\t\t$this->form = $this->EditForm();\n\n\t\t// check who's editing and whether or not we should bail out\n\t\treturn $this->renderWith(array('WikiPage', 'Page'));\n\t}", "title": "" }, { "docid": "19ee539567147b621d94549cef8db48f", "score": "0.6322221", "text": "public function ns_task_edit_page() {\n\t\tglobal $task;\n\t\t\n\t\t$task_id = $this->sanitize( $_GET, 'edit' );\n\t\t/**\n\t\t * @var WP_Post $task\n\t\t */\n\t\t$task = get_post( $task_id );\n\t\tif ( $task instanceof WP_Error || $task->post_type !== $this->task_type || ! empty( get_post_meta( $task->ID, '_private', true ) ) ) {\n\t\t\twp_redirect( admin_url( 'index.php?page=ns-dashboard' ) );\n\t\t}\n\t\t\n\t\t$this->get_template( 'client-tasks-edit' );\n\t}", "title": "" }, { "docid": "1d94403d2acd74d9393297956ff20089", "score": "0.63192093", "text": "function edit()\n {\n $this->_form('edit');\n }", "title": "" }, { "docid": "2a72a6272e2a8b83c73402651775fb77", "score": "0.6285932", "text": "public function admin_edit($id = null) {\n $this->Acl->aro = array('root', 'admin');\n if (!$this->Acl->isAuthorized()) {\n $this->Session->setFlash(Configure::read('ACL_ERROR'), 'default', array('class' => 'alert alert-error'));\n $this->redirect($this->referer());\n }\n \n $this->Expiration->id = $id;\n //Verifico que exista el ticket\n if (!$this->Expiration->exists()) {\n throw new NotFoundException(__('No existe la fecha de vencimiento que intenta editar'));\n }\n \n if ($this->request->is('post')\n or $this->request->is('put')) {\n \n $newDateExp = date('Y-m-d', strtotime($this->request->data['Expiration']['date_exp']));\n \n $now = $newDateExp;\n $sevenDaysLess = strtotime('-7 days', strtotime($newDateExp));\n $threeDaysLess = strtotime('-3 days', strtotime($newDateExp));\n $oneDaysLess = strtotime('-1 days', strtotime($newDateExp));\n \n $sevenDaysLess = date('Y-m-d', $sevenDaysLess);\n $threeDaysLess = date('Y-m-d', $threeDaysLess);\n $oneDaysLess = date('Y-m-d', $oneDaysLess); \n \n $datesExp = array(\n 'now' => $now,\n 'one' => $oneDaysLess,\n 'three' => $threeDaysLess,\n 'seven' => $sevenDaysLess\n );\n \n $i = 0;\n foreach ($datesExp as $type => $date) {\n//// pr($date);die;\n $this->Expiration->create();\n $this->request->data['Expiration']['date_exp'] = $date;\n $this->request->data['Expiration']['type'] = $type;\n if ($this->Expiration->save($this->request->data)) {\n $i++;\n }\n }\n \n if ($i == 4) { // porque guardo 4 fechas\n $this->Flash->success(__('La fecha de vencimiento ha sido creada. Puede agregar otra.'));\n return $this->redirect(array('action' => 'add'));\n } else {\n $this->Flash->danger(__('Error. Intente nuevamente.'));\n }\n \n } else {\n $this->request->data = $this->Expiration->read(null, $id);\n $newDateExp = date('d-m-Y', strtotime($this->request->data['Expiration']['date_exp']));\n $this->request->data['Expiration']['date_exp'] = $newDateExp;\n }\n \n// $this->set('data', $data);\n $this->render('admin/edit');\n }", "title": "" }, { "docid": "c4fca3011d7e2ed2c317276c9d9fc5ff", "score": "0.62771267", "text": "public function edit(){\n $this->View('Editing/Proofreading','');\n }", "title": "" }, { "docid": "5722acc50e2150d56adbc897797455ad", "score": "0.62561744", "text": "public function display_edit() {\n\t\t$site = array(\n\t\t\t'title' => '',\n\t\t\t'url' => '',\n\t\t\t'unique_key' => '',\n\t\t\t'auth_user' => '',\n\t\t\t'auth_password' => '',\n\t\t);\n\n\t\t\\eoxia\\View_Util::exec( 'digirisk_dashboard', 'site', 'main-edit', array(\n\t\t\t'edit_site' => $site,\n\t\t) );\n\t}", "title": "" }, { "docid": "318b02f1e1b0e7190ffada04ae09e0e2", "score": "0.6252378", "text": "public function edit($id)\n {\n $form = $this->paging->get_form_name_id();\n if(is_permitted($_SESSION[get_variable().'userdata']['M_Groupuser_Id'],$form['m_tickersetting'],'Write'))\n {\n $model = $this->M_tickersettings->get($id);\n $data = $this->paging->set_data_page_edit($model);\n load_view('m_tickersetting/edit', $data, lang(\"ui_tickersetting\")); \n }\n else\n {\n $this->load->view('forbidden/forbidden');\n } \n }", "title": "" }, { "docid": "9603f47b4ac21b9886d1dc866e3b5e89", "score": "0.6207379", "text": "public function edit()\n {\n $this->timeControl();\n $this->load->view('header');\n $this->load->view('edit_user_password');\n }", "title": "" }, { "docid": "e2d64baf531444993f439d05239f2f4d", "score": "0.6190753", "text": "public function edit()\n {\n return view('officeautomation::edit');\n }", "title": "" }, { "docid": "2f9195f1dc79b6367bf4d757bbfb3606", "score": "0.61806786", "text": "public function admin_updateExpiration(){\n $this->Acl->aro = array('root', 'admin');\n if (!$this->Acl->isAuthorized()) {\n $this->Session->setFlash(Configure::read('ACL_ERROR'), 'default', array('class' => 'alert alert-error'));\n $this->redirect($this->referer());\n }\n \n if ($this->request->is('post')\n or $this->request->is('put')) {\n \n $this->Expiration->id = $this->data['id'];\n $this->Expiration->saveField('status', 'inactive');\n } \n die;\n }", "title": "" }, { "docid": "760a446f87a1d5c4295ddeef5d62b63d", "score": "0.61394405", "text": "function edit()\n\t{\n\t}", "title": "" }, { "docid": "c3ac17e0e299ab685e8e93381ae3a4ae", "score": "0.6138842", "text": "function edit(){\n $this->reg->config->set('page_title', 'Edit Event');\n\n // check if the form has been submitted\n if(array_key_exists('edit_event', $_SESSION['FORM'])){\n\n // insert form with the comment piece passed\n $this->model->edit_do($_SESSION['FORM']['edit_event']['id'],\n $_SESSION['FORM']['edit_event']['name'],\n $_SESSION['FORM']['edit_event']['date'],\n $_SESSION['FORM']['edit_event']['img_small'],\n $_SESSION['FORM']['edit_event']['img_large'],\n $_SESSION['FORM']['edit_event']['description'],\n\t\t\t\t\t\t\t\t $_SESSION['FORM']['edit_event']['order']);\n\n\n // unset the form and redirect\n unset($_SESSION['FORM']['edit_event']);\n header('location:/feature/index/');\n }elseif($this->reg->url->is_set('id')){\n // set the form in the layout to be echoed\n $this->reg->template->assign('edit_event', $this->model->edit($this->reg->url->get('id')));\n }else{\n // redirect to index if id is not set\n header('location:/feature/index');\n }\n }", "title": "" }, { "docid": "9085c4b4b864c2d24d6a540600c0c746", "score": "0.613324", "text": "function edit_line($db, $draft_number, $id, $view_only = true) {\n global $username, $user_role, $cfg, $expenses_types_array, $currencies_types_array, $exchange_rates;\n\n if (!$er = $db->Execute(\"SELECT * FROM er WHERE draft_number=$draft_number\")) {\n echo \"<table class=\\\"warn_db\\\" width=\\\"100%\\\"><tr><td>DB ERROR: \" . $db->ErrorMsg() . \"</td></tr></table>\";\n return FALSE;\n }\n $section_id = $er->fields[\"section\"];\n $section = $db->Execute(\"SELECT * FROM section WHERE id=$section_id\");\n $line_item = $db->Execute(\"SELECT * FROM er_items WHERE id=$id\"); \n $cr_user_id = $er->fields[\"created_by\"];\n if (($username != $cr_user_id) && \n\t($username != $section->fields[\"superapprover\"]) && \n\t($username != $section->fields[\"headof\"]) && \n\t($username != $section->fields[\"delegate\"]) && \n\t($username != $section->fields[\"receptionist\"]) && \n\t($user_role != $cfg[\"admin\"]) && \n\t($user_role != $cfg[\"finofficer\"]) && \n\t($user_role != $cfg[\"finmember\"])) {\n finance_log( $db, 'er', $draft_number, 'warn', \"Insufficient privilege. You are \" . $username .\". Only \" . $er->fields[\"created_by\"]. \" can edit the line of this Expense Report\" );\n return FALSE;\n }\n\n\tif ($view_only) {\n\t\t$disabled = \"disabled\";\n\t\t$action_item = \"View\";\n\t}else{\n\t\t$disabled = \"\";\n\t\t$action_item = \"Edit\";\n\t}\n ?>\n <table class=\"small\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">\n <form action=\"er.php\" method=\"post\" name=\"form_edit_line_<?echo $line_item->fields[\"id\"];?>\">\n <tr class=\"box_head\">\n <td colspan=\"8\"><b><?php echo $action_item; ?> Item</b></td>\n </tr>\n <tr class=\"box_bg\"> \n <td align=\"right\" valign=\"top\">Type</td>\n <td colspan=\"3\"><?php \n\t\techo \"<select $disabled name=\\\"type\\\">\";\n\t\tforeach ($expenses_types_array as &$t ) { \n\t\t\t$select = ( $t == $line_item->fields[\"type\"] ) ? \"selected\" : \"\";\n\t\t\techo \"<option value='$t' $select>\" . expenses_type2name($t) . \"</option>\";\n\t\t}\n echo \"</select>\";\n\t\t?>\n </td>\n </tr>\n\n <tr class=\"box_bg\"> \n <td align=\"right\">Receipt</td>\n\t<td><input <?php echo $disabled; ?> type=\"text\" name=\"receipt\" size=\"16\"\n value=\"<?php echo $line_item->fields[\"receipt\"]; ?>\">\n\t</td>\n </tr>\n <tr class=\"box_bg\"> \n <td align=\"right\" valign=\"top\">Description</td>\n <td colspan=\"1\"> \n <input <?php echo $disabled; ?> type=\"text\" name=\"description\" size=\"128\"\n value=\"<?php echo $line_item->fields[\"description\"]; ?>\">\n </td>\n </tr>\n <tr class=\"box_bg\"> \n <td align=\"right\" valign=\"top\">Comment</td>\n <td colspan=\"1\"> \n <input <?php echo $disabled; ?> type=\"text\" name=\"comment\" size=\"128\"\n value=\"<?php echo $line_item->fields[\"comment\"]; ?>\">\n </td>\n </tr>\n <tr class=\"box_bg\"> \n <td align=\"right\">Price</td>\n\t<td><input <?php echo $disabled; ?> type=\"text\" name=\"price\" size=\"16\"\n value=\"<?php echo $line_item->fields[\"price\"]; ?>\">\n\t\tQuantity = <input <?php echo $disabled; ?> type=\"text\" name=\"quantity\" size=\"16\" value=\"<?php echo $line_item->fields[\"quantity\"]; ?>\">\n\t</td>\n </tr>\n <tr class=\"box_bg\"> \n <td align=\"right\">Currency</td>\n\t<td><?php\n\t\techo \"<select $disabled name=\\\"currency\\\">\";\n\t\tforeach ($currencies_types_array as &$c ) { \n\t\t\t$select = ( $c == $line_item->fields[\"currency\"] ) ? \"selected\" : \"\";\n\t\t\techo \"<option value='$c' $select \" .\n\t\t\t\"onClick=\\\"javascript:document.form_edit_line_\". $line_item->fields[\"id\"] . \".exchangerate.value=\". $exchange_rates[ get_currency_sign( $c, \"eurofxref\" ) ] . \"\\\";\"\n\t\t\t. \">\" . get_currency_sign( $c, \"text\" ) . \"</option>\";\n\t\t\t//$exchange_rate[ $currencyCode[1] ] = $rate[1];\n\t\t}\n echo \"</select>\";\n\t\t?>\n\t\texchange rate = <input <?php echo $disabled; ?> type=\"text\" name=\"exchangerate\" size=\"16\" value=\"<?php echo $line_item->fields[\"exchangerate\"]; ?>\">\n\t</td>\n </tr>\n\n\n\t<?php if (!$view_only) {?>\n\t\t <tr class=\"box_bg\"> \n\t\t <td colspan=\"8\">\n\t\t\t <button type=\"button\" class=\"button_update\" onClick=\"if (valid_er_line_form(document.form_edit_line_<?echo $line_item->fields[\"id\"];?>)) { \n\t\t\t document.form_edit_line_<?echo $line_item->fields[\"id\"];?>.submit(); }\">Update</button> \n\t\t\t <button type=\"button\" class=\"button_delete\" \n\t\t\t onClick=\"if (isConfirmed('Are you sure you want to DELETE this Expense Report Line Item ?')) { window.location='er.php?action=delete_line&id=<?php echo $id; ?>&draft_number=<?php echo $draft_number; ?>'; }\">Delete</button>\n\t\t\t <button type=\"button\" class=\"button_cancel\" onClick=\"window.location='er.php?action=cancel&draft_number=<?php echo $draft_number; ?>'\">Cancel</button>\n\t\t </td>\n\t\t </tr>\n\t\t <input type=\"hidden\" name=\"action\" value=\"update_line\">\n\t\t <input type=\"hidden\" name=\"id\" value=\"<?php echo $id; ?>\">\n\t\t <input type=\"hidden\" name=\"draft_number\" value=\"<?php echo $draft_number; ?>\">\n\t\t </form>\n\t<?php } ?>\n </table>\n <script language=\"JavaScript\">\n document.edit_line.unit.focus();\n </script> <?php\n//edit_line_item END\n}", "title": "" }, { "docid": "75c932133f26a007e90a05572c34ec74", "score": "0.6131837", "text": "public function update_expiry() {\r\r\n\t\ttry{\r\r\n $this->form_validation->set_rules('start_date', 'Start Date', 'trim|required');\r\r\n $this->form_validation->set_rules('end_date', 'End Date', 'trim|required');\r\r\n $this->form_validation->set_error_delimiters('<div class=\"error\">','</div>');\r\r\n if($this->form_validation->run()===FALSE){\r\r\n $data['tab']='EditExpiry';\r\r\n\t\t\t\t$data['bcum']='Expiry';\r\r\n\t\t\t\t$data['main']='expiry';\r\r\n\t\t\t\t$data['mode']='edit';\r\r\n\t\t\t\t\r\r\n\t\t\t\t$datas['expiry'] = $this->em->get_expiry();\r\r\n\t\t\t\t\r\r\n\t\t\t\t$this->load->view('backend/header', $data);\r\r\n\t\t\t\t$this->load->view('backend/edit-expiry', $datas);\r\r\n\t\t\t\t$this->load->view('backend/footer');\r\r\n }\r\r\n else{\r\r\n $start_date = htmlspecialchars(strip_tags(trim($this->input->post('start_date'))));\r\r\n $end_date = htmlspecialchars(strip_tags(trim($this->input->post('end_date'))));\r\r\n\t\t\t\t\r\r\n\t\t\t\t$data = array(\r\r\n\t\t\t\t\t'start_date' => $start_date,\r\r\n\t\t\t\t\t'end_date' => $end_date,\r\r\n\t\t\t\t);\r\r\n\t\t\t\t\r\r\n\t\t\t\t$res = $this->em->update_expiry($data);\r\r\n\t\t\t\t\r\r\n\t\t\t\tif ($res) {\r\r\n\t\t\t\t\t$this->session->set_userdata('msg', 'Expiry Updated Successfully');\r\r\n\t\t\t\t\t$this->session->set_userdata('status', 'success');\r\r\n\t\t\t\t\tredirect(base_url() . EDIT_EXPIRY);\r\r\n\t\t\t\t}\r\r\n\t\t\t\telse {\r\r\n\t\t\t\t\t$this->session->set_userdata('msg', 'Wrong Credentials or your software is expired');\r\r\n\t\t\t\t\t$this->session->set_userdata('status', 'fail');\r\r\n\t\t\t\t\tredirect(base_url() . EDIT_EXPIRY);\r\r\n\t\t\t\t}\r\r\n }\r\r\n } \r\r\n\t\tcatch (Exception $ex) {\r\r\n echo $ex->getMessage();\r\r\n }\r\r\n\t}", "title": "" }, { "docid": "f24b3d4bab18a9d75efa91fc56a2b062", "score": "0.61002624", "text": "public function edit()\n {\n return view('housekeeping::edit');\n }", "title": "" }, { "docid": "9f2c7c95436a8835f42044309999f79e", "score": "0.6097949", "text": "function edit($fkey = NULL)\n {\n if($this->isWebAdmin()){\n if($fkey == NULL)\n {\n redirect($this->cname.'/view');\n }\n\n $this->global['pageTitle'] = \"Edit Data Sparepart - \".APP_NAME;\n $this->global['pageMenu'] = 'Edit Data Sparepart';\n $this->global['contentHeader'] = 'Edit Data Sparepart';\n $this->global['contentTitle'] = 'Edit Data Sparepart';\n $this->global ['role'] = $this->role;\n $this->global ['name'] = $this->name;\n $this->global ['repo'] = $this->repo;\n\n $data['classname'] = $this->cname;\n $data['records'] = $this->get_edit($fkey);\n $this->loadViews($this->view_dir.'edit', $this->global, $data);\n }else{\n redirect($this->cname.'/view');\n }\n }", "title": "" }, { "docid": "4f27edb1f635fcd6d79b9db690d385e6", "score": "0.60704094", "text": "public function edit()\n\t{\n\t}", "title": "" }, { "docid": "4f27edb1f635fcd6d79b9db690d385e6", "score": "0.60704094", "text": "public function edit()\n\t{\n\t}", "title": "" }, { "docid": "4f27edb1f635fcd6d79b9db690d385e6", "score": "0.60704094", "text": "public function edit()\n\t{\n\t}", "title": "" }, { "docid": "9c2378db5c4786c49d9a04cd862418b4", "score": "0.606937", "text": "public function edit(Expenses $expenses)\n {\n //\n }", "title": "" }, { "docid": "ae8e82a9b0559c18da947ec758714bbc", "score": "0.60545325", "text": "public function Edit() {\n\t\t$agency_id = $_GET['aid'];\n\t\t$this->load->model('administration');\n\t\t$agency = $this->administration->getAgencyByID($agency_id);\n\t\t//PREPARE THE VIEW FOR THE FORM\n\t\t$data = array(\n\t\t\t'agency' => $agency,\n\t\t\t'html' => ''\n\t\t);\n\t\t//THIS IS THE DEFAULT VIEW FOR ANY BASIC FORM.\n\t\t$this->load->dom_view('forms/agencies/edit_add', $this->theme_settings['ThemeViews'], $data);\n\t}", "title": "" }, { "docid": "29c6b01ba341fc74ebe597cd3aa7ed5c", "score": "0.6028082", "text": "function edit($id){\r\n $editId = $id;\r\n $name = $_POST[\"name\"];\r\n $birth = $_POST[\"birth\"];\r\n updateEmployee($name, $birth, $editId);\r\n //2. Geef een view weer voor het updaten en geef de variable met medewerker hieraan mee\r\n header(\"location:\". URL. \"employee/index\");\r\n\r\n}", "title": "" }, { "docid": "859d85e406640cd207c04147ac132e1a", "score": "0.601006", "text": "function edit() {}", "title": "" }, { "docid": "5a02684925f991ee39abcb153d80d058", "score": "0.6008475", "text": "public function edit()\r\n {\r\n return view('hr::edit');\r\n }", "title": "" }, { "docid": "defe18803afa129e2f941e78220db714", "score": "0.5993398", "text": "public function edit($id)\n\t{\n\t\tif(Module::hasAccess(\"Evaluation_Periods\", \"edit\")) {\t\t\t\n\t\t\t$evaluation_period = Evaluation_Period::find($id);\n\t\t\tif(isset($evaluation_period->id)) {\t\n\t\t\t\t$module = Module::get('Evaluation_Periods');\n\t\t\t\t\n\t\t\t\t$module->row = $evaluation_period;\n\t\t\t\t$startDate = implode(\"/\", array_reverse(explode(\"-\", $evaluation_period->start_date)));\n\t\t\t\t$endDate = implode(\"/\", array_reverse(explode(\"-\", $evaluation_period->end_date)));\n\t\t\t\treturn view('la.evaluation_periods.edit', [\n\t\t\t\t\t'module' => $module,\n\t\t\t\t 'startDate' => $startDate,\n\t\t\t\t 'endDate' => $endDate,\n\t\t\t\t\t'view_col' => $this->view_col,\n\t\t\t\t])->with('evaluation_period', $evaluation_period);\n\t\t\t} else {\n\t\t\t\treturn view('errors.404', [\n\t\t\t\t\t'record_id' => $id,\n\t\t\t\t\t'record_name' => ucfirst(\"evaluation_period\"),\n\t\t\t\t]);\n\t\t\t}\n\t\t} else {\n\t\t return redirect('/dashboard');\n\t\t}\n\t}", "title": "" }, { "docid": "a2c4b9f94f63ae15d25e58aeec857d8a", "score": "0.5992346", "text": "public function actionEdit()\n {\n $template = __DIR__ . '/../../../templates/admin/edit.html';\n $this->view->display($template);\n }", "title": "" }, { "docid": "b580b532e83c3e918516d606bfd777be", "score": "0.5986238", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "53a8bfb522da712de73cdf296b8026c5", "score": "0.5984433", "text": "public function edit($key = null, $urlVar = null)\n {\n $input = JFactory::getApplication()->input;\n $input->set('view',$input->getCmd('view','Tradinghours'));\n $input->set('layout','edit');\n\n parent::display(false);\n }", "title": "" }, { "docid": "bd2eb7b4b851671a6d52d11c4bdca5a3", "score": "0.5983005", "text": "public function Editing()\n {\n $this->routeAuth();\n\n $arguments = [\n 'required' => ['route' => 'default'],\n 'method' => 'get',\n ];\n $parameters = $this->getArguments($arguments);\n\n $this->standardView('EditForm', $parameters);\n }", "title": "" }, { "docid": "cf962803a36a2f1d8a70270da5eb9ce4", "score": "0.5977075", "text": "public function edit() {\n include \"ROOT_PATH\" . \"../../../resource/views/debtor/edit.php\";\n }", "title": "" }, { "docid": "686fbcd317fc319653e17be32016e8a4", "score": "0.59671664", "text": "public function edit($edit) {\n\n\t}", "title": "" }, { "docid": "2aeac9339e736420dfdba092efa5d13e", "score": "0.5961349", "text": "public function editAction() {\r\n\t\t$id = $this->getInput('id');\r\n\t\t$info = Gou_Service_FateRule::getFateRule(intval($id));\r\n\t\t$this->assign('info', $info);\r\n\t}", "title": "" }, { "docid": "415c0afd9d3ed0d1e87127c04f87e8e7", "score": "0.59390235", "text": "function wyz_do_frontend_offers_edit( $atts ) {\n\tif ( ( ! current_user_can( 'manage_options' ) && 'on' != get_option( 'wyz_offer_editable' ) ) || 'on' == get_option( 'wyz_disable_offers' ) ) {\n\t\treturn '<h3>' . esc_html__( 'You don\\'t have the right to access this page', 'wyzi-business-finder' ) . '</h3>';\n\t}\n\n\t$query = new WP_Query( array(\n\t\t'post_type' => 'wyz_offers',\n\t\t'posts_per_page' => '-1',\n\t\t'post_status' => array( 'publish', 'pending','future' ),\n\t\t'p' => $_GET[ WyzQueryVars::EditOffer ]\n\t) );\n\t$can_edit = false;\n\n\tglobal $WYZ_USER_ACCOUNT_TYPE;\n\n\tif ( $WYZ_USER_ACCOUNT_TYPE == WyzQueryVars::EditOffer ) {\n\n\t\tif ( $query->have_posts() ) :\n\t\t\twhile ( $query->have_posts() ) :\n\t\t\t\t$query->the_post();\n\n\t\t\t\t$curr_id = get_the_ID();\n\t\t\t\t$curr_post = get_post( $curr_id );\n\t\t\t\tif ( current_user_can( 'manage_options' ) || get_current_user_id() == $curr_post->post_author ) {\n\n\t\t\t\t\t$can_edit = true;\n\t\t\t\t\t\n\t\t\t\t\tif ( $_GET[ WyzQueryVars::EditOffer ] == $curr_id ) {\n\t\t\t\t\t\t$current_post = $curr_id;\n\n\t\t\t\t\t\t// Get CMB2 metabox object.\n\t\t\t\t\t\t$cmb = wyz_frontend_cmb2_update_get( $current_post );\n\n\t\t\t\t\t\t// Get $cmb object_types.\n\t\t\t\t\t\t$post_types = $cmb->prop( 'object_types' );\n\n\t\t\t\t\t\t// Current user.\n\t\t\t\t\t\t$user_id = get_current_user_id();\n\n\t\t\t\t\t\t// Parse attributes.\n\t\t\t\t\t\t$atts = shortcode_atts( array(), $atts, 'offers-form-full-display' );\n\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t* Let's add these attributes as hidden fields to our cmb form\n\t\t\t\t\t\t* so that they will be passed through to our form submission\n\t\t\t\t\t\t*/\n\t\t\t\t\t\tforeach ( $atts as $key => $value ) {\n\t\t\t\t\t\t\t$cmb->add_hidden_field( array(\n\t\t\t\t\t\t\t\t'field_args' => array(\n\t\t\t\t\t\t\t\t\t'id' => \"atts[$key]\",\n\t\t\t\t\t\t\t\t\t'type' => 'hidden',\n\t\t\t\t\t\t\t\t\t'default' => $value,\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\t\n\t\t\t\t\t\t$output = '';\n\n\t\t\t\t\t\t// Get any submission errors.\n\t\t\t\t\t\tif ( ( $error = $cmb->prop( 'submission_error' ) ) && is_wp_error( $error ) ) {\n\t\t\t\t\t\t\t// If there was an error with the submission, add it to our ouput.\n\t\t\t\t\t\t\t$output .= WyzHelpers::wyz_error( $error->get_error_message(), true );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Get our form.\n\t\t\t\t\t\tif ( function_exists( 'cmb2_get_metabox_form' ) )\n\t\t\t\t\t\t\t$output .= cmb2_get_metabox_form( $cmb, $current_post, array( 'save_button' => esc_html__( 'Update Post', 'wyzi-business-finder' ) ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tendwhile;\n\t\t\twp_reset_postdata();\n\t\tendif;\n\t}\n\n\twp_reset_postdata();\n\n\tif ( ! $can_edit ) {\n\t\treturn WyzHelpers::wyz_error( esc_html__( 'you don\\'t have the appropriate permissions to edit this post', 'wyzi-business-finder' ), true );\n\t}\n\tif ( ! isset( $current_post ) ) {\n\t\treturn WyzHelpers::wyz_info( esc_html__( 'No', 'wyzi-business-finder' ) . ' ' . WYZ_OFFERS_CPT . ' ' . esc_html__( 'to display', 'wyzi-business-finder' ), true );\n\t}\n\treturn $output;\n}", "title": "" }, { "docid": "e73067a8f5b9e79d6667ad146041904d", "score": "0.5938232", "text": "function edit()\n {\n }", "title": "" }, { "docid": "ced44e573e48269f7e18b7046bf3c7b8", "score": "0.5933741", "text": "public function edit()\r\n {\r\n if($this->getSessionHandler()->isLoggedIn())\r\n {\r\n $id = $this->getRequestObject()->getParameter('id');\r\n $record = accounts::create()->findOne($id);\r\n \r\n $v = new EditAccountView();\r\n $v->injectData(array('data' => $record, 'id' => $id));\r\n echo $v->render();\r\n }\r\n else\r\n {\r\n $this->displayMessage('You must login to view this area!');\r\n }\r\n\r\n }", "title": "" }, { "docid": "1331db35f58f1af9410b73e01dda0256", "score": "0.59315455", "text": "function edit($id){\r\nglobal $EVENTS_TB,$CAT_TB,$mth,$calstartyear,$caladvanceyear,$notimeentry,$time12hour,$useFCKEditor,$FCKEditorBasePath;\r\n\r\n$query = \"select id,title,description,url,email,cat,cat_name,starttime,endtime,day,month,year from \".$EVENTS_TB.\" left join \".$CAT_TB.\" on \".$EVENTS_TB.\".cat=\".$CAT_TB.\".cat_id where \".$EVENTS_TB.\".id='$id'\";\r\n$result = mysql_query($query);\r\n$rowe = mysql_fetch_object($result);\r\n\r\necho \"<div class=titlefont>\".translate(\"Update Event\").\"</div><br/>\\n\";\r\necho \"<div class=normalfont>\\n\" ;\r\necho \"<form name=evfrm action='cal_addevent.php?op=upevent&id=$id' method=post>\\n\";\r\necho translate(\"Event Title\").\"<br/>\\n\";\r\necho \"<input type=text name=title value='\".stripslashes(quote145($rowe->title)).\"' size=70 onkeypress='return imposeMaxLength(this, 255)';><br/>\\n\";\r\n\r\necho translate(\"Event Description\").\"<br/>\\n\";\r\nif ($useFCKEditor) {\r\n\t$oFCKeditor = new FCKeditor('description') ;\r\n\t$oFCKeditor->BasePath = $FCKEditorBasePath;\r\n\t$oFCKeditor->Value = stripslashes($rowe->description);\r\n\t$oFCKeditor->Create() ;\r\n} else {\r\n\techo \"<textarea name=description cols=70 rows=7>\";\r\n\techo stripslashes(str_replace(\"<br />\",\"\",$rowe->description));\r\n\techo \"</textarea><br/>\\n\";\r\n}\r\n\r\necho translate(\"Email\").\" (\".translate(\"Optional\").\") <br/>\\n\";\r\necho \"<input type=text name=email value=\\\"\".$rowe->email.\"\\\" size=40><br/>\\n\";\r\necho \"URL (\".translate(\"Optional\").\") <br/>\\n\";\r\necho \"<input type=text name=url value='\";\r\nif ((trim($rowe->url)<>\"\")&&(strtolower(substr($rowe->url,0,4))<>\"http\"))\r\n echo \"http://\".$rowe->url.\"' size=40><br/>\\n\";\r\nelse echo $rowe->url.\"' size=40><br/>\\n\";\r\n// get the categories\r\necho translate(\"Event Category\").\"<br/>\";\r\necho \"<select name=cat>\\n\\t\";\r\n$query = \"select cat_id,cat_name from \".$CAT_TB.\" order by cat_name\" ;\r\n$result = mysql_query($query);\r\n while ($row = mysql_fetch_object($result)){\r\n echo \"\\t<option value=\".$row->cat_id;\r\n if ($rowe->cat == $row->cat_id){\r\n echo \" selected\";\r\n }\r\n echo \">\".stripslashes($row->cat_name).\"\\n\";\r\n }\r\n\r\necho \"</select>\\n<br/>\\n\";\r\n\r\nif ($notimeentry==0) {\r\n\r\n// get start time\r\necho translate(\"Start Time\").\" (hh:mm) <br/>\\n\";\r\necho \"&nbsp;<select name=starttimehr>\\n\\t<option value='--'>--\\n\";\r\n$thour = 24 ;\r\n$sthour = 0 ;\r\n$midnight=false;\r\nif ($time12hour==1) { $thour = 13 ; $sthour = 1 ; }\r\n\r\nif (($time12hour==1)&&(substr($rowe->starttime,0,2)==\"00\")) $midnight=true ;\r\nfor ($i = $sthour;$i<$thour;$i++){\r\nif ($i<10) {\r\n\techo \"\\t<option value='0$i'\" ;\r\n\tif (substr($rowe->starttime,0,2)==(\"0\".$i)) echo \" selected\" ;\r\n\tif ($time12hour==1) {\r\n\t if ((intval(substr($rowe->starttime,0,2)) - 12) == $i) echo \" selected \" ;\r\n\t }\r\n\techo \">0$i\\n\" ;\r\n\t}\r\nelse {\r\n\techo \"\\t<option value=$i\" ;\r\n\tif (substr($rowe->starttime,0,2)==\"$i\") echo \" selected\" ;\r\n if (($midnight)&&($i==12)) echo \" selected \" ;\r\n\tif ($time12hour==1) {\r\n\t if ((intval(substr($rowe->starttime,0,2)) - 12) == $i) echo \" selected \" ;\r\n\t }\r\n\techo \">$i\\n\";\r\n\t}\r\n}\r\necho \"</select>&nbsp;<b>:</b>&nbsp;\\n\";\r\necho \"<select name=starttimemin>\\n\";\r\nfor ($i=0;$i<60;$i=$i+5){\r\nif ($i<10) {\r\n\techo \"\\t<option value='0$i'\" ;\r\n\tif (substr($rowe->starttime,3,2)==(\"0\".$i)) echo \" selected\" ;\r\n\techo \">0$i\\n\" ;\r\n\t}\r\nelse {\r\n\techo \"\\t<option value=$i\" ;\r\n\tif (substr($rowe->starttime,3,2)==\"$i\") echo \" selected\" ;\r\n\techo \">$i\\n\";\r\n\t}\r\n}\r\necho \"</select>\\n\";\r\n\r\nif ($time12hour==1) {\r\n echo \" &nbsp; <select name='startperiod'>\\n\";\r\n echo \"\\t<option value='am'\" ;\r\n if (intval(substr($rowe->starttime,0,2)) < 12) echo \" selected \" ; \r\n echo \">am\" ;\r\n echo \"\\t<option value='pm'\" ;\r\n if (intval(substr($rowe->starttime,0,2)) >= 12) echo \" selected \" ; \r\n echo \">pm\" ;\r\n echo \"</select><br/>\\n\";\r\n}\r\nelse echo \"<input type='hidden' name='startperiod' value=''><br/>\\n\" ;\r\n\r\n// get end time\r\necho translate(\"End Time\").\" (hh:mm) <br/>\\n\";\r\necho \"&nbsp;<select name=endtimehr>\\n\\t<option value='--'>--\\n\";\r\n$thour = 24 ;\r\n$sthour = 0 ;\r\n$midnight=false;\r\nif ($time12hour==1) { $thour = 13 ; $sthour = 1 ; }\r\nif (($time12hour==1)&&(substr($rowe->endtime,0,2)==\"00\")) $midnight=true ;\r\nfor ($i = $sthour;$i<$thour;$i++){\r\nif ($i<10) {\r\n\techo \"\\t<option value='0$i'\" ;\r\n\tif (substr($rowe->endtime,0,2)==(\"0\".$i)) echo \" selected\" ;\r\n\tif ($time12hour==1) {\r\n\t if ((intval(substr($rowe->endtime,0,2)) - 12) == $i) echo \" selected \" ;\r\n\t }\r\n\techo \">0$i\\n\" ;\r\n\t}\r\nelse {\r\n\techo \"\\t<option value=$i\" ;\r\n\tif (substr($rowe->endtime,0,2)==\"$i\") echo \" selected\" ;\r\n\tif (($midnight)&&($i==12)) echo \" selected \" ;\r\n if ($time12hour==1) {\r\n\t if ((intval(substr($rowe->endtime,0,2)) - 12) == $i) echo \" selected \" ;\r\n\t }\r\n\techo \">$i\\n\";\r\n\t}\r\n}\r\necho \"</select>&nbsp;<b>:</b>&nbsp;\\n\";\r\necho \"<select name=endtimemin>\\n\";\r\nfor ($i=0;$i<60;$i=$i+5){\r\nif ($i<10) {\r\n\techo \"\\t<option value='0$i'\" ;\r\n\tif (substr($rowe->endtime,3,2)==(\"0\".$i)) echo \" selected\" ;\r\n\techo \">0$i\\n\" ;\r\n\t}\r\nelse {\r\n\techo \"\\t<option value=$i\" ;\r\n\tif (substr($rowe->endtime,3,2)==\"$i\") echo \" selected\" ;\r\n\techo \">$i\\n\";\r\n\t}\r\n}\r\necho \"</select>\\n\";\r\n\r\nif ($time12hour==1) {\r\n echo \" &nbsp; <select name='endperiod'>\\n\";\r\n echo \"\\t<option value='am'\" ;\r\n if (intval(substr($rowe->endtime,0,2)) < 12) echo \" selected \" ; \r\n echo \">am\" ;\r\n echo \"\\t<option value='pm'\" ;\r\n if (intval(substr($rowe->endtime,0,2)) >= 12) echo \" selected \" ; \r\n echo \">pm\" ;\r\n echo \"</select><br/>\\n\";\r\n}\r\nelse echo \"<input type='hidden' name='endperiod' value=''><br/>\\n\" ;\r\n\r\n}\r\n\r\n// get days\r\necho translate(\"Date\").\"<br/>\\n\";\r\necho \"<select name=bday>\\n\\t\";\r\nfor ($i = 1;$i<=31;$i++){\r\n\techo \"\\t<option value=\".$i;\r\n\tif ($rowe->day == $i){\r\n\techo \" selected\";\r\n}\r\necho \">$i\\n\";\r\n}\r\necho \"</select>&nbsp;&nbsp;\\n\";\r\n\r\n// get months\r\necho \"<select name=bmonth>\\n\\t<option value=0>\".translate(\"Month\").\"\\n\";\r\nfor($i=1;$i<13;$i++){ \r\n echo \"\\t<option\";\r\n if ($rowe->month == $i){\r\n echo \" selected\";\r\n }\r\n echo \" value=\".$i.\">\".ucfirst($mth[$i]).\"\\n\"; \r\n} \r\necho \"</select>&nbsp;&nbsp;\\n\";\r\n\r\n// get year from \"calstartyear\" and give \"caladvanceyear\" years more to select\r\necho \"<select name=byear>\\n\\t<option value=0>\".translate(\"Year\").\"\\n\";\r\n$year = date(\"Y\");\r\nfor ($i=$calstartyear;$i<=($year+$caladvanceyear);$i++){\r\n echo \"\\t<option value=$i\" ;\r\n if ($rowe->year==$i) echo \" selected \" ;\r\n echo \">$i\\n\";\r\n}\r\necho \"</select>\\n\";\r\n$pdate = date(\"Y-m-d\",mktime(0,0,0,$rowe->month,$rowe->day,$rowe->year));\r\necho \"&nbsp;<input type=button value=\\\"\".translate(\"Select\").\"\\\" onclick=\\\"Javascript:wopen('cal_date.php?op=smallcal&date=$pdate&frmname=evfrm&frmday=bday&frmmth=bmonth&frmyear=byear','pickdate',220,200,'no');\\\"><br/>\";\r\necho \"<br/><input type=submit value=\\\"\".translate(\"Update Event\").\"\\\">\\n &nbsp; \\n\";\r\necho \"<input type=button value=\\\"\".translate(\"Cancel\").\"\\\" onClick=\\\"Javascript:window.close();\\\">\\n<br/>\\n\";\r\necho \"<form></div>\\n\";\r\n}", "title": "" }, { "docid": "d0bbf09e092f68a1e67004b57cbe91fb", "score": "0.5916994", "text": "public function edit()\n {\n return view('billing::edit');\n }", "title": "" }, { "docid": "d0bbf09e092f68a1e67004b57cbe91fb", "score": "0.5916994", "text": "public function edit()\n {\n return view('billing::edit');\n }", "title": "" }, { "docid": "18b29b8ee14b901e79ba33e981f89da3", "score": "0.5916784", "text": "static public function ctrEditdue(){\n\n\t\tif(isset($_POST[\"editname\"])){\n\n\t\t\tif(isset( $_POST[\"editname\"]) \n\t\t\t ){\n\n\t\t\t \t$table = \"cipc_annual_returns\";\n\t\t\t\t\n\t\t\t\t$formatString = 'l, F j, Y';\n\t\t\t\t$date = date('l, F j, Y');\n\t\t\t\t\n\t\t\t\t$Currentdate = new DateTime($date);\n\t\t\t\t$date1 = new DateTime($_POST[\"editfiledate\"]);\n\n\t\t\t\t$date2 = clone $date1;\n\t\t\t\t$date2->modify('+12 month');\n\t\t\t\t\n\t\t\t\t$reminder = $date2->modify('last day of -1 month')->format('l, F j, Y');\n\t\t\t\t\n\t\t\t\t$armonth = clone $date1;\n\t\t\t\t$armonth->modify('-1 month');\n\n\t\t\t \t$data = array(\"id\"=>$_POST[\"editregnumber\"],\n\t\t\t \t\t\t\t \"name\"=>$_POST[\"editname\"],\n\t\t\t\t\t \"fileddate\"=>$_POST[\"editfiledate\"],\n\t\t\t\t\t\t\t \"armonths\"=>$armonth->format('M'),\n\t\t\t\t\t\t\t\t\"nextdue\"=>$date2->format($formatString),\n\t\t\t\t\t\t\t\t\"howmanyreturns\"=> $Currentdate ->format('Y') - $date2->format('Y'),\n\t\t\t\t\t\t\t\t\"statusreminder\"=>$reminder,\n\t\t\t\t\t \"regnumber\"=>$_POST[\"editregnumber\"]\n\t\t\t\t\t );\n\t\t\t\t\n\n\n\t\t\t \t$answer = ModelAnnuals::mdlEditdue($table, $data);\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t \tif($answer == \"ok\"){\n\n\t\t\t\t\techo'<script>\n\n\t\t\t\t\tswal({\n\t\t\t\t\t\t type: \"success\",\n\t\t\t\t\t\t title: \"The customer has been edited\",\n\t\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t\t confirmButtonText: \"Close\"\n\t\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\t\twindow.location = \"cipc-annual-returns\";\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t})\n\n\t\t\t\t\t</script>';\n\n\t\t\t\t}\n\n\t\t\t}else{\n\n\t\t\t\techo'<script>\n\n\t\t\t\t\tswal({\n\t\t\t\t\t\t type: \"error\",\n\t\t\t\t\t\t title: \"Customer cannot be blank or especial characters!\",\n\t\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t\t confirmButtonText: \"Close\"\n\t\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\twindow.location = \"cipc-annual-returns\";\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\n\t\t\t \t</script>';\n\n\n\n\t\t\t}\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "479163de23a1f205dee55b3ca55d6508", "score": "0.5910644", "text": "public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Client_Service_Ad::getAd(intval($id));\n\t\t$this->assign('ad_type', $this->ad_type);\n\t\t$this->assign('postion', $this->postion);\n\t\t$this->assign('info', $info);\n\t}", "title": "" }, { "docid": "817cd0b68250870a2855b1c005fa1aa4", "score": "0.5905286", "text": "public function edit() {\n\t\tif (!$this->table_id) {\n\t\t\t$this->ctrl->redirectByClass(\"ildclfieldeditgui\", \"listFields\");\n\n\t\t\treturn;\n\t\t} else {\n\t\t\t$this->table = ilDclCache::getTableCache($this->table_id);\n\t\t}\n\t\t$this->initForm(\"edit\");\n\t\t$this->getValues();\n\t\t$this->tpl->setContent($this->form->getHTML());\n\t}", "title": "" }, { "docid": "734c624b34c52ff6cb3c2642809dfdbc", "score": "0.5896744", "text": "protected function actionEdit() {\n\t\t\n\t\t// generate templates list\n\t\t$this->showDataLayoutContent();\n\t}", "title": "" }, { "docid": "22932325acdabe5255f458eae927dcde", "score": "0.58933747", "text": "function go_to_er_form() { ?>\n <table class=\"default\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\" align=\"center\">\n <form action=\"er.php\" method=\"post\" name=\"go_to_to\">\n <tr class=\"row_head\"> \n <td align=\"center\" colspan=\"2\" nowrap><b>Update Expense Report No.</b></td>\n </tr>\n <tr class=\"box_bg\"> \n <td align=\"right\">Expense Report and Claim No.:</td>\n <td> \n <input type=\"text\" name=\"draft_number\" size=\"12\">\n <input type=\"submit\" class=\"button_enter\" value=\"Enter\">\n </td>\n </tr>\n <input type=\"hidden\" name=\"action\" value=\"edit_er\">\n </form>\n </table>\n <script language=\"JavaScript\">\n document.go_to_er.draft_number.focus();\n </script> <?php\n//go_to_er END\n}", "title": "" }, { "docid": "ceacc7f1d454b81c7524c93ab66c4e01", "score": "0.5890439", "text": "function Edit(){\n\tinclude_once(\"eurekastock.php\");\n\t\n\t$PaymentId=mysqli_real_escape_string($con,$_POST['txtPaymentId']);\n $TransactionName=mysqli_real_escape_string($con,$_POST['txtTransactionName']);\n $PaymentDate=mysqli_real_escape_string($con,$_POST['txtPaymentDate']);\n $NewPaidAmount=mysqli_real_escape_string($con,$_POST['txtPaidAmount']);\n\tif (!is_numeric($NewPaidAmount))\n\t{\n\t//alert message\n\techo '<script type=\"text/javascript\">alert(\"Payment amount should be numeric!\");</script>';\n\t// HTTP redirect\n\techo '<script>window.location.replace(\"ManageReceivable.php\");</script>';\n\texit();\n\t}\n\tif ($NewPaidAmount < 0)\n\t{\n\t//alert message\n\techo '<script type=\"text/javascript\">alert(\"Payment amount can not be less than 0!\");</script>';\n\t// HTTP redirect\n\techo '<script>window.location.replace(\"ManageReceivable.php\");</script>';\n\texit();\n\t}\n $DebitNoteNo=mysqli_real_escape_string($con,$_POST['txtDebitNoteNo']);\n\t$Remark=mysqli_real_escape_string($con,$_POST['txtRemark']);\n\n\t// Retrieve transaction information based on transaction name\n\t$sql = \"select * from transaction where TransactionName='\".$TransactionName.\"'\";\n\t$result = mysqli_query($con,$sql) or die(mysqli_error($con));\n\t$row = mysqli_fetch_array($result);\n\t$TransactionId=$row['TransactionId'];\n\t$TransactionDate=$row['TransactionDate'];\n\t$InvoiceAmount=$row['InvoiceAmount'];\n\t$DueDate=$row['DueDate'];\n\n\tif ($PaymentDate < $TransactionDate)\n\t{\n\t//alert message\n\techo '<script type=\"text/javascript\">alert(\"Wrong Date Sequence. The new payment date is prior to the transaction date or invoice date!\");</script>';\n\t// HTTP redirect\n\techo '<script>window.location.replace(\"ManageReceivable.php\");</script>';\n\texit();\n\t} \n\n\t// Retrieve Sum of Paid amounts for the particular transaction till settlement to determine the remaining amount\n\t$sql1 = \"select SUM(payment.PaidAmount) AS SettledAmount from payment where payment.TransactionId='\".$TransactionId.\"'\";\n\t// Execute query\n\t$result1 = mysqli_query($con,$sql1) or die(mysqli_error($con));\n\t// Fetch the record\n\t$row = mysqli_fetch_array($result1);\n\t$SettledAmount=$row['SettledAmount'];\n\n\t$RemainingAmount=$InvoiceAmount-$SettledAmount;\n\n\tif ($RemainingAmount >= $NewPaidAmount)\n\t{\n\t// Specify the query to Update Record\n\t$sql2 = \"Update payment set payment.TransactionId='\".$TransactionId.\"',payment.PaymentDate='\".$PaymentDate.\"',payment.PaidAmount='\".$NewPaidAmount.\"',payment.DebitNoteNo='\".$DebitNoteNo.\"',payment.Remark='\".$Remark.\"' where payment.PaymentId='\".$PaymentId.\"' \";\n\n\t// Execute query\n\tmysqli_query($con,$sql2) or die(mysqli_error($con));\n\t}\n\telse\n\t{\n\t//alert message\n\techo '<script type=\"text/javascript\">alert(\"Extra amount paid! Please refer to the payment history of the particular transaction.\");</script>';\n\t// HTTP redirect\n\techo '<script>window.location.replace(\"ManageReceivable.php\");</script>';\n\texit();\n\t}\n \n\t// Close The Connection\n\tmysqli_close($con);\n\t\n\t//alert message\n\techo '<script type=\"text/javascript\">alert(\"Payment Record Updated Successfully!\");</script>';\n\t// HTTP redirect\n\techo '<script>window.location.replace(\"ManageReceivable.php\");</script>';\n\texit();\n\t\n\t}", "title": "" }, { "docid": "eb07f1eee4819499bec93211103ff2cb", "score": "0.5889513", "text": "function editLink() {\n $user = mm_getUser();\n if ($user && $user->isAdmin()) {\n return $this->linkTag(h(\"edit '{$this->content_name}'\"), mm_actionToUri('content.edit?name=' . urlencode($this->content_name)));\n }\n }", "title": "" }, { "docid": "8ad893f1cf0494e8c40f06f938567dcc", "score": "0.58878034", "text": "public function edit()\n {\n $slider=\\App\\Slider::find(1);\n\t\t$title= array('pageTitle' => 'Edit Slider');\n\t\tif(Auth::user()->can('home-page'))\n {\n\n return view('admin.homepage.sliders.edit',$title,compact('slider')); \n }\n return redirect()->back();\n }", "title": "" }, { "docid": "cb382cdd3d92b42313b611be76c8eef4", "score": "0.58821154", "text": "public function editAction()\n {\n $this->loadLayout();\n $this->_initLayoutMessages('customer/session');\n if ($block = $this->getLayout()->getBlock('freed_block_privateproducts_edit')) {\n $block->setRefererUrl($this->_getRefererUrl());\n }\n $headBlock = $this->getLayout()->getBlock('head');\n if ($headBlock) {\n $headBlock->setTitle(Mage::helper('downloadable')->__('My Private Orders'));\n }\n $session = Mage::getSingleton('customer/session');\n $productId = $this->getRequest()->getParam('product_id');\n $forsell = $this->getRequest()->getParam('for_sell');\n $price = $this->getRequest()->getParam('price');\n //echo $forsell;echo \"/\".$productId;\n if($forsell!=null)\n\t{\n\tif ($productId > 0)\n\t{\n\t$purchasedPrivate = Mage::getModel('freed/freed');\n $purchasedPrivate->convertPiedClient($productId,$session->getCustomerId(),$forsell);\n if (!is_null($price))\n\t{\n\t\n\tif(is_numeric($price))\n\t{\n\t$prdprice = Mage::getModel('catalog/product')->load($productId);\n\t$currentStore = $prdprice->getStoreId();\n Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);\n\t\n\t$prdprice->setPrice($price);\n\t$prdprice->save();\n\tMage::app()->setCurrentStore($currentStore);\n\t}\n\t}\n }\n\t\t}\n \n $this->renderLayout();\n }", "title": "" }, { "docid": "189e62f1cff36b876d812bdfc8700c1d", "score": "0.5881464", "text": "public function edit() {\n }", "title": "" }, { "docid": "a58958f56d66e425d0a75d78d2ffd3cc", "score": "0.58750266", "text": "public function edit($id)\n {\n $historical=historicalp::where('id',$id)->first();\n return view('admin.historical.edit ',compact('historical'));\n }", "title": "" }, { "docid": "06ff903d38aaeec23f05a7f25a05eab9", "score": "0.5866738", "text": "public function edit_profile()\n {\n $this->timeControl();\n $this->load->view('header');\n $data['description'] = $_SESSION['description'];\n $this->load->view('edit_profile', $data);\n }", "title": "" }, { "docid": "c0967bb3c0d9943c8e24acf9890144c9", "score": "0.58646715", "text": "public function reopen_editFile(){\n\t\t$this->load->model('user_model');\n\t\t$data['user_data'] = $this->user_model->fetch_single_file($_SESSION['file_name']);\n\t\t$this->load->view('edit',$data);\n\t}", "title": "" }, { "docid": "c7fb8ca57aa245198154f4b3760cca0c", "score": "0.58597136", "text": "public function edit()\n\t{\n\t\t$id = $_GET['class_time_id'];\n\t\t$model = M('class_time');\n\t\t$data = $model->find($id);\n\n\t\t$this->assign('data',$data);\n\n\t\t$this->display('edit');\n\t}", "title": "" }, { "docid": "f72ad63c8e13bcf6bc3218a5d551155d", "score": "0.5859181", "text": "public function edit_expense()\n\t{\n\t\t$base_url = site_url();\n\n\t\tif (!isset($_SERVER['HTTP_REFERER']) || (strripos($_SERVER['HTTP_REFERER'], $base_url) === FALSE))\n\t\t{\n\t\t\t$this->output->set_status_header('401');\n\t\t\texit('Access not allowed');\n\t\t}\n\n\t\tif ($this->input->server('REQUEST_METHOD') !== 'POST')\n\t\t{\n\t\t\t$this->output->set_status_header('401');\n\t\t\texit('Access not allowed');\n\t\t}\n\n\t\t$exp_id = $this->input->post('exp_id');\n\t\t$item = $this->input->post('item');\n\t\t$description = $this->input->post('desc');\n\t\t$date_occured = $this->input->post('dte_occured');\n\t\t$amount = $this->input->post('amount');\n\t\t$interview_id = $this->input->post('intid');\n\t\t$att_id = $this->input->post('attid');\n\n\t\tif (!isset($item) || $item == FALSE) {\n\t\t\t$this->output->set_status_header('400');\n\t\t\texit('item not found');\n\t\t}\n\n\t\tif (!isset($exp_id) || $exp_id == FALSE) {\n\t\t\t$this->output->set_status_header('400');\n\t\t\texit('Expense not found.');\n\t\t}\n\n\t\t$this->load->model('Billing');\n\n\t\t//edit_expense($expense_id,$date_occured,$item,$amount,$desc,$interview_id,$att_id)\n\t\t$db_result = $this->Billing->edit_expense($exp_id,$date_occured,$item,$amount,$description,$interview_id,$att_id);\n\t\tif ($db_result['result']) {\n\n\t\t\t$this->output->set_status_header('200');\n\t\t\techo \"{\\\"result\\\":\".$db_result['result'].\"}\";\n\n\t\t}else{\n\t\t\t// determine if user error or server error\n\t\t\tif (strlen($db_result['message']) > 0) {\n\t\t\t\t$this->output->set_status_header('400');\n\t\t\t\texit($db_result['message']);\n\t\t\t} else {\n\t\t\t\t$this->output->set_status_header('500');\n\t\t\t\texit('Unable to remove expense.');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "7b438e79140e60044911dae16e1104d3", "score": "0.584835", "text": "public function edit($id)\n\t{\n\t\t// get the nerd\n $pay_period = Pay_period::find($id);\n\n // show the edit form and pass the nerd\n return View::make('pay_periods.edit')\n ->with('pay_period', $pay_period);\n\t}", "title": "" }, { "docid": "55d997bb93ead313c6087458b40a5fbe", "score": "0.58422697", "text": "function edit(){\r\n $this->reg->config->set('page_title', 'Edit Navigation Page');\r\n\r\n if(!$this->reg->url->is_set('id'))\r\n header('location:/navigation/index/');\r\n\r\n if(array_key_exists('edit_navigation_item', $_SESSION['FORM'])){\r\n if($this->model->edit_do($_SESSION['FORM']['edit_navigation_item']['item_id'],\r\n $_SESSION['FORM']['edit_navigation_item']['name'],\r\n $_SESSION['FORM']['edit_navigation_item']['nav_type'],\r\n $_SESSION['FORM']['edit_navigation_item']['plugin_path'],\r\n $_SESSION['FORM']['edit_navigation_item']['external_link'])){\r\n unset($_SESSION['FORM']['edit_navigation_item']);\r\n header('location:/navigation/index/');\r\n }else{\r\n die('sdfsd');\r\n $this->reg->template->assign('edit', $this->model->edit($this->reg->url->get('id')));\r\n unset($_SESSION['FORM']['edit_navigation_item']);\r\n }\r\n }else{\r\n $this->reg->template->assign('edit', $this->model->edit($this->reg->url->get('id')));\r\n }\r\n }", "title": "" }, { "docid": "e36c2ecb310647d71e0b8c6b3565182e", "score": "0.58415043", "text": "function AffiliatesDoEditAction() {\r\n\t\t;\r\n\t}", "title": "" }, { "docid": "9be8203688481c44990f4caf470f1bcd", "score": "0.58399206", "text": "public function edit($id)\n {\n $id=(int)$id;\n $edit = $this->consultingFee->find($id);\n if ($edit)\n {\n return view('backendview.admin.consultingFee.edit', compact('edit'));\n } else\n return redirect('/configuration/consulting-fee');\n \n\n }", "title": "" }, { "docid": "4ca3ae92d949a3d2af052db80f239ef4", "score": "0.5837902", "text": "public function edit($id)\n\t{\n\t\t$this->data['projectexpensesActive'] = 'active';\n $this->data['expense'] = Expense::find($id);\n $this->data['link'] = \"http://localhost/fresizeon/admin/projectexpenses/project?department=\".$this->data['expense']->department;\n\n\t\treturn View::make('admin.projectexpenses.edit', $this->data);\n\t}", "title": "" }, { "docid": "930cc5862d852939c7f6a5c925df2c62", "score": "0.58308715", "text": "function edit(){\r\n $this->reg->config->set('page_title', 'Edit User');\r\n\r\n if($this->reg->url->is_set('user_id')){\r\n if(\tarray_key_exists('edit_user', $_SESSION['FORM']) &&\r\n array_key_exists('user_id', $_SESSION['FORM']['edit_user']) &&\r\n array_key_exists('username', $_SESSION['FORM']['edit_user']) &&\r\n array_key_exists('password', $_SESSION['FORM']['edit_user']) &&\r\n array_key_exists('email', $_SESSION['FORM']['edit_user']) &&\r\n array_key_exists('privileges', $_SESSION['FORM']['edit_user'])){\r\n\r\n if($this->model->edit_do($_SESSION['FORM']['edit_user']['user_id'],\r\n $_SESSION['FORM']['edit_user']['username'],\r\n $_SESSION['FORM']['edit_user']['password'],\r\n $_SESSION['FORM']['edit_user']['email'],\r\n $_SESSION['FORM']['edit_user']['privileges'])){\r\n unset($_SESSION['FORM']['edit_user']);\r\n header('location:/user/index/');\r\n }else{\r\n $this->reg->template->assign('edit', $this->model->edit($this->reg->url->get('user_id')));\r\n unset($_SESSION['FORM']['edit_user']);\r\n }\r\n }else{\r\n $this->reg->template->assign('edit', $this->model->edit($this->reg->url->get('user_id')));\r\n }\r\n }else{\r\n header('location:/user/index/');\r\n }\r\n }", "title": "" }, { "docid": "eb6f0a2f425e47dbc3e467b7f04cad53", "score": "0.582645", "text": "public function edit($id)\n {\n if( Session::get('level') == '1' && Session::get('fingerprint') == md5($_SERVER['HTTP_USER_AGENT'] . $_SERVER['REMOTE_ADDR']) )\n { \n $data = Company::find( e($id) );\n return View::make( 'company.edit', array('data' => $data) );\n }\n else\n {\n return Redirect::to('/');\n }\n }", "title": "" }, { "docid": "9443931fcf9450e4082ea1fcc8f7947f", "score": "0.5824288", "text": "public function editAction()\n {\n $category = $this->_helper->db->findById();\n $form = $this->_getForm($category);\n $this->view->form = $form;\n $this->_processPageForm($category, $form, 'edit'); \n }", "title": "" }, { "docid": "61a1da91fb98b3f4e823f84c76163485", "score": "0.5817972", "text": "public function getEdit($id) {\n if(Auth::user()->IsWrite() || Auth::user()->IsAdmin())\n {\n $licence = Licence::findOrFail($id);\n\n if ($licence->company_id != Auth::user()->company_id) {\n App::abort(403);\n return;\n }\n\n return View::make(\"licence/edit\")\n ->with(\"licence\", $licence)\n ->with(\"title\", Lang::get('messages.modifyLicenceModalTitle'))\n ->with(\"action\", Lang::get('controls.editButton'))\n ->with(\"idParent\", \"\")\n ->with(\"cmd\", \"cmdEditLicence\")\n ;\n } else {\n App::abort(403);\n }\n }", "title": "" }, { "docid": "2beb90fadbb01fc51d9f15bef5d11b8d", "score": "0.58051765", "text": "public function edit()\n {\n return view('pagebuilder::edit');\n }", "title": "" }, { "docid": "2af505464f8dd57cd048a1854a68cd39", "score": "0.58018297", "text": "function reborn_edit_link() {\n\tedit_post_link(\n\t\tsprintf(\n\t\t\t'%1$s<span class=\"sr-only\"> \"%2$s\"</span>',\n\t\t\t__( 'Edit', 'reborn' ),\n\t\t\tget_the_title()\n\t\t),\n\t\t'<span class=\"edit-link\"><i class=\"icon-pencil\"></i>',\n\t\t'</span>'\n\t);\n}", "title": "" }, { "docid": "1e79149fc16aee1bcabe4fd2d631f1e4", "score": "0.5794585", "text": "public function editAction()\n {\n $this->_title($this->__('Edit event'));\n\n $this->loadLayout();\n $this->_setActiveMenu('event');\n $this->_addBreadcrumb(\n Mage::helper('sp_events')->__('Edit event'),\n Mage::helper('sp_events')->__('Edit event')\n );\n $this->renderLayout();\n }", "title": "" }, { "docid": "042d4410ebdf414119ef66816f2d50bf", "score": "0.57901394", "text": "function get_edit($params) {\n \n $id = safeParam($params, 0, false);\n if (!$id) {\n die(\"No record specified\");\n }\n $record = Question::findPostByID($id);\n Authenticator::instance()->ensure('question_edit', false, $record->getUserId() );\n $post = strip_tags($record->getPost());\n $record ->setPost($post);\n if (!$record) {\n die(\"No record found.\");\n }\n \n \n renderTemplate(\n \"views/record_edit.inc\",\n array(\n 'title' => 'Editing Record',\n 'record' => $record\n \n )\n );\n \n}", "title": "" }, { "docid": "ddf01debb6f9fd301bcc6dfa7a8cc2f1", "score": "0.5789079", "text": "public function edit(Supply $supply)\n {\n $supply->expiry_date = Carbon::now()->addMonths(24);\n\n return view('supplies.edit', compact('supply'));\n }", "title": "" }, { "docid": "04c22cc7052d2c1dc1d5e330c4bb2e4c", "score": "0.5782289", "text": "public function edit($id)\n {\n $data = KeyWarranty::findOrFail($id);\n\n return view('admin.warranty.edit', compact(['data']));\n }", "title": "" }, { "docid": "28a90ab6820643f9d5748374ed81131a", "score": "0.57771534", "text": "public function edit($id)\n {\n $this->view->employee = $this->model->edit($id);\n $this->view->render($this->path . '/edit');\n \n }", "title": "" }, { "docid": "cf8a16698b230ca55b1c2d93429c0dc3", "score": "0.57749474", "text": "function editPage($options = array())\n{\n// if not Page Editable return null\nif(!page()->editable()) return;\n\n// Default Options\n$defaults = array(\n 'id' => 'edit-btn',\n 'div_class' => 'edit-btn flex-center',\n 'link_class' => 'link-button',\n 'edit_text' => setting('edit'),\n 'edit_url' => page()->editURL,\n);\n// Merge Options\n$options = _mergeOptions($defaults, $options);\n\n// Display region debugging info\nreturn \"<div id='$options[id]' class='$options[div_class]'>\n<a class='$options[link_class]' href='$options[edit_url]'>$options[edit_text]</a></div>\";\n}", "title": "" }, { "docid": "a1e829f7d988fd1d506d40a17dd40335", "score": "0.57743645", "text": "public function edit(kpi_oeedetail $kpi_oeedetail)\n {\n //\n }", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.57716393", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.57716393", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.57716393", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.57716393", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.57716393", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.57716393", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.57716393", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "91762b61017193220db09e3a7cae538b", "score": "0.5769144", "text": "function edit()\n {\n // hien thi form sua san pham\n $id = getGetParameter('id');\n $orders = $this->model->order->find_by_id($id);\n $this->layout->set('auth_layout');\n $this->view->load('order/edit', [\n 'orders' => $orders\n ]);\n }", "title": "" }, { "docid": "10b8afa2e628872a51eebd4a48c6f04d", "score": "0.57688385", "text": "public function edit(Expense $expense)\n {\n //\n }", "title": "" }, { "docid": "cf11e44b004e31b9767fcb3cd11aa2c5", "score": "0.57668245", "text": "function edit_view()\n {\n\n if($this->session->userdata('logged_in'))\n {\n $data_type = $this->uri->segment(4); // get risk data type from uri 4th segment\n\n $data_type_item_id = $this->uri->segment(5); // get risk data type from uri 5th segment\n\n // get title from uri\n $data = array('title' => 'Edit '.$this->risk_data[$data_type]['title']);\n\n // store data type in array\n $data['data_type'] = $data_type;\n\n // breadcrumb\n $this->breadcrumb->add('Settings','/dashboard/settings');\n $this->breadcrumb->add('Risk Data','/settings/data');\n $this->breadcrumb->add($data_type,'/settings/data/'.$data_type);\n $this->breadcrumb->add($data['title']);\n $data['breadcrumb'] = $this->breadcrumb->output();\n\n // get global data\n $data = array_merge($data,$this->get_global_data());\n $data['select_project'] = $this->userproject->getProject( $data['user_id'] );\n\n // get data based on risk data item id and table name\n $data['riskdata'] = $this->riskdata_model->getSingleRiskData($data_type_item_id, $this->risk_data[$data_type]['tbl_name']);\n \n $this->template->load('dashboard', 'settings/data/edit', $data);\n }\n else\n {\n // if no session, redirect to login page\n redirect('login', 'refresh');\n }\n }", "title": "" }, { "docid": "db61d6f0b7171bf098059899379c050e", "score": "0.57645917", "text": "public function edit()\n {\n return view('budget::edit');\n }", "title": "" }, { "docid": "6ce2bbb2790bc62bc3f3b253b57f9416", "score": "0.5761094", "text": "public function editAction()\n {\n $acregId = $this->getRequest()->getParam('id');\n $acreg = $this->_initAcreg();\n if ($acregId && !$acreg->getId()) {\n $this->_getSession()->addError(\n Mage::helper('bs_acreg')->__('This a/c reg no longer exists.')\n );\n $this->_redirect('*/*/');\n return;\n }\n $data = Mage::getSingleton('adminhtml/session')->getAcregData(true);\n if (!empty($data)) {\n $acreg->setData($data);\n }\n Mage::register('acreg_data', $acreg);\n $this->loadLayout();\n $this->_title(Mage::helper('bs_acreg')->__('A/C Reg'))\n ->_title(Mage::helper('bs_acreg')->__('A/C Reg'));\n if ($acreg->getId()) {\n $this->_title($acreg->getReg());\n } else {\n $this->_title(Mage::helper('bs_acreg')->__('Add a/c reg'));\n }\n if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {\n $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);\n }\n $this->renderLayout();\n }", "title": "" }, { "docid": "4d3b69e41bd74fa9d27821f36fdac89f", "score": "0.5759799", "text": "function do_Edit ($pos, $lang)\n {\n global $vnT, $func, $DB, $conf;\n $vnT->html->addStyleSheet( $vnT->dir_js . \"/jquery_ui/themes/base/ui.all.css\");\n\t\t$vnT->html->addScript($vnT->dir_js . \"/jquery_ui/ui.core.js\");\t\t\n\t\t$vnT->html->addScript($vnT->dir_js . \"/jquery_ui/ui.datepicker.js\");\n\t\t\n $vnT->html->addScriptDeclaration(\"\n\t \t\t$(function() {\n\t\t\t\t$('.dates').datepicker({\n\t\t\t\t\tchangeMonth: true,\n\t\t\t\t\tchangeYear: true\n\t\t\t\t}); \n\t\t\t});\n\t\t\n\t\t\");\n $id = (int) $vnT->input['id'];\n if ($vnT->input['do_submit']) {\n $data = $_POST;\n\n //check err\n if ($type_ad = 0 && $vnT->input['picture']==''){\n $err = $func->html_err(\"No Web link Image selected\");\n }\n\n if(empty($vnT->input['csrf_token']) || ($vnT->input['csrf_token'] != $_SESSION['vnt_csrf_token']) ) {\n $err = $func->html_err($vnT->lang['err_csrf_token']) ;\n }\n\n\n if (empty($err)) {\n\n $cot = array();\n $res_info = $this->buildInfoItem();\n foreach ($res_info as $key => $val) {\n $cot[$key] = $val;\n }\n\n $ok = $DB->do_update(\"advertise\", $cot, \"l_id=$id\");\n if ($ok) {\n\n unset($_SESSION['vnt_csrf_token']);\n\n //xoa cache\n $func->clear_cache();\n //insert adminlog\n $func->insertlog(\"Edit\", $_GET['act'], $id);\n $err = $vnT->lang[\"edit_success\"];\n $url = $this->linkUrl . \"&sub=manage&pos=$pos\";\n $func->html_redirect($url, $err);\n } else\n $err = $func->html_err($vnT->lang[\"edit_failt\"] . $DB->debug());\n }\n }\n $query = $DB->query(\"SELECT * FROM advertise WHERE l_id={$id} \");\n if ($data = $DB->fetch_row($query)) {\n $data['l_link'] = $data['link'];\n $data['date_add'] = ($data['date_add']) ? @date(\"d/m/Y\", $data['date_add']) : \"\";\n $data['date_expire'] = ($data['date_expire']) ? @date(\"d/m/Y\", $data['date_expire']) : \"\";\n\n switch ($data['type_ad'])\n {\n case 1 :\n $data['style0']=\" style='display:none' \";\n $data['style1']=\"\";\n $data['style2']=\" style='display:none' \";\n $data['content'] = $data['img'];\n break\t;\n case 2 :\n $data['style0']=\" style='display:none' \";\n $data['style1']=\" style='display:none' \";\n $data['script'] = $func->txt_unHTML($data['img']);\n break\t;\n default :\n $data['style0']=\"\";\n $data['style1']=\" style=\\\"display:none;\\\" \";\n $data['style2']=\" style='display:none' \";\n if($data['img'])\n {\n $src = (strstr($data['img'],\"http\")) ? $data['img'] : MOD_DIR_UPLOAD . \"/\" . $data['img'] ;\n $data['html_img'] = \"<img src=\\\"{$src}\\\" />\";\n $data['picture'] = $data['img'];\n }\n\n break;\n }\n\n //more\n $res_more = $this->load_more_data($data);\n if (is_array($res_more)){\n foreach ($res_more as $key => $val)\t{\n $data[$key] = $val;\n }\n }\n $data['list_pos'] = $this->List_Pos($pos, \"option\");\n $data['list_display'] = vnT_HTML::list_yesno(\"display\", $data['display']);\n \n } else {\n $mess = $vnT->lang['not_found'] . \" ID : \" . $id;\n $url = $this->linkUrl;\n $func->html_redirect($url, $mess);\n }\n\n if (! isset($_SESSION['vnt_csrf_token'])) {\n $_SESSION['vnt_csrf_token'] = md5(uniqid(rand(), TRUE)) ;\n }\n $data['csrf_token'] = $_SESSION['vnt_csrf_token'] ;\n $data['err'] = $err;\n $data['link_action'] = $this->linkUrl . \"&sub=edit&pos=$pos&id=$id\";\n /*assign the array to a template variable*/\n $this->skin->assign('data', $data);\n $this->skin->parse(\"edit\");\n return $this->skin->text(\"edit\");\n }", "title": "" }, { "docid": "1d9a4f5d2ab22adb237f17c7c1c8eced", "score": "0.57546127", "text": "public function viewAction()\n {\n \t$this->editAction();\n }", "title": "" }, { "docid": "60c5f9214317c4a10d4b44449df0a871", "score": "0.574949", "text": "function tombolEdit($url, $model){\r\n\t\tif(getPermission()){\r\n\t\t\tif(getPermissionEmp()->EMP_ID == $model->ID_USER AND getPermission()->BTN_EDIT==1){\r\n\t\t\t\t if($model->STATUS == 0){ // 0=process 101=Approved\r\n\t\t\t\t\t$title = Yii::t('app', 'Edit Detail');\r\n\t\t\t\t\t$options = [ //'id'=>'ro-edit',\r\n\t\t\t\t\t\t\t\t//'data-toggle'=>\"modal\",\r\n\t\t\t\t\t\t\t\t//'data-target'=>\"#add-ro\",\r\n\t\t\t\t\t\t\t\t//'data-confirm'=>'Anda yakin ingin menghapus RO ini?',\r\n\t\t\t\t\t];\r\n\t\t\t\t\t$icon = '<span class=\"fa fa-pencil-square-o fa-lg\"></span>';\r\n\t\t\t\t\t$label = $icon . ' ' . $title;\r\n\t\t\t\t\t$url = Url::toRoute(['/purchasing/request-order/edit','kd'=>$model->KD_RO]);\r\n\t\t\t\t\t$options['tabindex'] = '-1';\r\n\t\t\t\t\treturn '<li>' . Html::a($label, $url, $options) . '</li>' . PHP_EOL;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "743a82c26cf70a43bef218bf285bbbe8", "score": "0.5747817", "text": "function editEntryView($companyId = NULL) {\r\n if ($this->isAdmin() == TRUE && $this->session->userdata('role') != 3) {\r\n $this->loadThis();\r\n } else {\r\n if ($companyId == null) {\r\n redirect('employee/vehicle/entrylist');\r\n }\r\n\r\n $data['companyInfo'] = $this->k_parking_model->getDetails($companyId);\r\n\r\n $this->global['pageTitle'] = PROJECT_NAME . ' : Edit Company';\r\n $data['title'] = \"Vehicle Company\";\r\n\r\n $data['sub_title'] = \"Edit\";\r\n\r\n $this->loadViews(\"employee/vehicle/entry/edit\", $this->global, $data, NULL);\r\n }\r\n }", "title": "" }, { "docid": "093f4ada65f95c5c7e23c07d6c7e1a49", "score": "0.5746367", "text": "public function edit( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "093f4ada65f95c5c7e23c07d6c7e1a49", "score": "0.5746367", "text": "public function edit( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "093f4ada65f95c5c7e23c07d6c7e1a49", "score": "0.5746367", "text": "public function edit( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "093f4ada65f95c5c7e23c07d6c7e1a49", "score": "0.5746367", "text": "public function edit( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "2d6568cc671853ca34804cd0d664d264", "score": "0.5745579", "text": "function edit_kurir($id){\n\t\t$data['data'] = $this->Kurir_act->get_kurir($id);\n\t\t$data['action'] = site_url().'/kurir/update_kurir/'.$id;\n\t\t$this->content = $this->load->view('kurir/form',$data,true);\n\t\t$this->index();\n\t}", "title": "" }, { "docid": "c2113cf7999c4ae3516983f86e22b27e", "score": "0.57385653", "text": "public function edit()\n {\n return view('tms::edit');\n }", "title": "" }, { "docid": "a72efb5f221069b0c88902d35d6896bb", "score": "0.57368165", "text": "public function editAction()\n {\n \t\n }", "title": "" }, { "docid": "b1fe3ff53f60b89ec6a519cae69ab67e", "score": "0.5734812", "text": "public function edit($id){\r\n $data = Expense::where('id', $id)->firstOrFail();\r\n return view('admin.expense.expense-add', compact('data'));\r\n }", "title": "" }, { "docid": "2f7a3a181e0239826a2431254681fdf3", "score": "0.5733413", "text": "public function edit(Date $date)\n {\n //\n }", "title": "" }, { "docid": "a2209b88101fbe18cc37674309046ec6", "score": "0.57316285", "text": "public function editAction()\n {\n $this->_initLayout();\n $this->_addContent($this->getLayout()->createBlock('arrakis_404evergone/adminhtml_rewriterule_edit'));\n $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);\n $this->renderLayout();\n }", "title": "" } ]
163ec6918e6e97ca6f1238e38b61bc10
/ callback function for filter all users list on the bases of perticular agencies function call in main.php with "pre_get_users" wordpress hook.
[ { "docid": "7647aff2aa354fc47c82d696f9c63050", "score": "0.7644887", "text": "function filter_users_by_agencies($query)\n\t{\n\t\t$current_user = wp_get_current_user();\n\t\t$user_role=$current_user->roles[0];\n\t\tglobal $pagenow;\n\t\tif (is_admin() && 'users.php' == $pagenow) {\n\t\t\t/*\n\t\t\t* display list of user on the base of user roles\n\t\t\t* if agencyadmin login only list of their users will show\n\t\t\t*/\n\n\t\t\tif($user_role==\"agencyadmin\"){\n\t\t\t\t$meta_query = array (\t\t\t\t\n\t\t\t\tarray (\n\t\t\t\t\t'key' => 'agencyid',\n\t\t\t\t\t'value' => $current_user->data->ID,\n\t\t\t\t\t'compare' => '='\n\t\t\t\t)\n\t\t\t);\n\t\t\t$query->set('meta_query', $meta_query);\n\n\t\t\t}\n\t\t\t// if administrator login and will access user by \"Show User\" users will show on the base of agency\n\t\t\telseif(isset($_GET['user_agencyid']) && $user_role == \"administrator\"){\n\t\t\t\t$meta_query = array (\t\t\t\t\n\t\t\t\tarray (\n\t\t\t\t\t'key' => 'agencyid',\n\t\t\t\t\t'value' => $_GET['user_agencyid'],\n\t\t\t\t\t'compare' => '='\n\t\t\t\t)\n\t\t\t);\n\t\t\t$query->set('meta_query', $meta_query);\n\t\t\t\n\t\t\t}\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "c7e2f730ea9a9ffe7a8dc37010944159", "score": "0.6639658", "text": "private function get_users() {\n\t\t\n\t}", "title": "" }, { "docid": "063a05c0ff7c6223818d81dc56886365", "score": "0.6613738", "text": "function get_users(){\n}", "title": "" }, { "docid": "4b6d9f56e9ed15a14673b1157fcf8546", "score": "0.6529261", "text": "function acf_get_users( $args = array() ) {\n\n\t// Get users.\n\t$users = get_users( $args );\n\n\t// Maintain order.\n\tif ( $users && $args['include'] ) {\n\n\t\t// Generate order array.\n\t\t$order = array();\n\t\tforeach ( $users as $i => $user ) {\n\t\t\t$order[ $i ] = array_search( $user->ID, $args['include'] );\n\t\t}\n\n\t\t// Sort results.\n\t\tarray_multisort( $order, $users );\n\t}\n\n\t// Return\n\treturn $users;\n}", "title": "" }, { "docid": "55ad1694be9a8cdc3daec3f93e6ff49c", "score": "0.63155794", "text": "function ldap_get_userlist($filter=\"*\") {\n /// returns all users from ldap servers\n $fresult = array();\n $ldapconnection = $this->ldap_connect();\n if ($filter==\"*\") {\n $filter = \"(&(\".$this->config->user_attribute.\"=*)(\".$this->config->objectclass.\"))\";\n }\n $contexts = explode(\";\",$this->config->contexts);\n if (!empty($this->config->create_context)) {\n array_push($contexts, $this->config->create_context);\n }\n foreach ($contexts as $context) {\n $context = trim($context);\n if (empty($context)) {\n continue;\n }\n if ($this->config->search_sub) {\n //use ldap_search to find first user from subtree\n $ldap_result = ldap_search($ldapconnection, $context,$filter,array($this->config->user_attribute));\n }\n else {\n //search only in this context\n $ldap_result = ldap_list($ldapconnection, $context,\n $filter,\n array($this->config->user_attribute));\n }\n $users = $this->ldap_get_entries($ldapconnection, $ldap_result);\n //add found users to list\n for ($i=0;$i<count($users);$i++) {\n array_push($fresult, ($users[$i][$this->config->user_attribute][0]) );\n }\n }\n $this->ldap_close();\n return $fresult;\n }", "title": "" }, { "docid": "e65a9c2655d170419c22fe7bbf2ee2f7", "score": "0.622094", "text": "public function get_current_user_list()\n {\n $search_text = $_POST['searchText'];\n // echo 'Search Text: ' . $search_text;\n if (!$search_text) {\n echo \"Please insert a search text...\";\n wp_die();\n }\n\n// ARGS FOR THE USER QUERY\n $args = array(\n 'number' => -1,\n 'search' => '*' . $search_text . '*',\n 'search_columns' => ['display_name', 'user_email', 'user_nicename', 'user_login', 'ID']\n );\n\n // THE USER QUERY W/ SEARCH\n $user_query = new \\WP_User_Query($args);\n\n // THE USER LOOP\n if (!empty($user_query->get_results())) {\n foreach ($user_query->get_results() as $user) {\n\n $acf_user_id = 'user_' . $user->ID;\n $user_current_points = get_field('selflist_points', $acf_user_id);\n\n echo '<div class=\"border p-3\" data-userID=\"' . $user->ID . '\" >';\n echo '<input class=\"user-checkbox\" data-userID=\"' . $user->ID . '\" type=\"checkbox\">';\n\n echo 'User found: ' . $user->display_name . '<br>';\n echo '<span class=\"badge badge-danger\">User ID: ' . $user->ID . ' </span><span class=\"badge badge-dark\">Current User Points: ' . $user_current_points . '</span><br>';\n\n echo '</div>';\n\n }\n } else {\n\n echo 'No users found.';\n\n }\n\n wp_die();\n\n }", "title": "" }, { "docid": "5795bfbc1cb6052ce4cacd820900df71", "score": "0.6158643", "text": "function remove_filters_user_clauses(){\n\n\tif( bp_current_component() == \"members\" ){\n\t\tremove_filter('bp_user_query_uid_clauses', 'bp_xprofile_bp_user_query_search');\n\t\tremove_filter('bp_user_query_uid_clauses', 'bps_uid_clauses',99);\t\n\t}\n\n}", "title": "" }, { "docid": "3afd195bfde78d40b597cab78669dd5d", "score": "0.61556786", "text": "function bf_deferred_option_get_users( $args = array() ) {\n\n\t\t$args = bf_merge_args( $args, array(\n\t\t\t'default' => false,\n\t\t\t'default-label' => __( 'Default User', 'publisher' ),\n\t\t\t'default-id' => '',\n\t\t\t'query' => array(),\n\t\t\t'group' => false,\n\t\t\t'group_label' => __( 'Select User', 'publisher' ),\n\t\t) );\n\n\t\tif ( ! isset( $args['query']['advanced-label'] ) ) {\n\t\t\t$args['query']['advanced-label'] = true;\n\t\t}\n\n\t\t$pages = bf_get_users( $args['query'] );\n\n\t\tif ( $args['group'] ) {\n\t\t\t$pages = array(\n\t\t\t\tarray(\n\t\t\t\t\t'label' => $args['group_label'],\n\t\t\t\t\t'options' => $pages,\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\tif ( $args['default'] ) {\n\t\t\treturn array( $args['default-id'] => $args['default-label'] ) + $pages;\n\t\t} else {\n\t\t\treturn $pages;\n\t\t}\n\n\t}", "title": "" }, { "docid": "e13cdd213fbee8d206d79ea9ee214f4c", "score": "0.6119379", "text": "public function getListUser() {\n\t\t$this->logger->debug ( __METHOD__ . ' begin' );\n\t\t\n\t\t$subConcept = 'adrUsersList';\n\t\t// Subtitle section\n\t\t$_REQUEST ['currentContent'] ['subtitle'] = Util::getSubmenuTitle ( $_REQUEST ['id'] );\n\t\t\n\t\t// Pager variables\n\t\t$count = $_SESSION ['s_parameters'] ['page_size'];\n\t\t\n\t\tif (isset ( $_REQUEST ['page'] ) && $_REQUEST ['page'] != '' && is_numeric ( $_REQUEST ['page'] )) {\n\t\t\t$page = $_REQUEST ['page'];\n\t\t} else {\n\t\t\t$page = '';\n\t\t}\n\t\t\n\t\tif ($page == '') {\n\t\t\t$begin = 0;\n\t\t\t$page = 1;\n\t\t} else {\n\t\t\t$begin = ($page - 1) * $count;\n\t\t}\n\t\t\n\t\t$filters = array ();\n\t\t\n\t\t// ID filter\n\t\t$filters ['id'] = $this->getNumberFilter ( 'id', Util::getLiteral ( 'user_id' ), 50, 'su.id', $subConcept );\n\t\t\n\t\t// User Login filter\n\t\t$filters ['userLogin'] = $this->getTextFilter ( 'userlogin', Util::getLiteral ( 'user_loggin' ), 50, 'su.userlogin', $subConcept );\n\t\t\n\t\t// User firstname filter\n\t\t$filters ['userFirstName'] = $this->getTextFilter ( 'name', Util::getLiteral ( 'user_firstname' ), 50, 'su.name', $subConcept );\n\t\t\n\t\t// User lastname filter\n\t\t$filters ['userLastName'] = $this->getTextFilter ( 'surname', Util::getLiteral ( 'user_lastname' ), 50, 'su.surname', $subConcept );\n\t\t\n\t\t// User phone filter\n\t\t$filters ['userPhoneNumber'] = $this->getTextFilter ( 'phone', Util::getLiteral ( 'user_phone_number' ), 50, 'sua.phone', $subConcept );\n\t\t\n\t\t// User plan filter\n\t\t$filters ['plan'] = $this->getSelectFilter ( 'plan', Util::getLiteral ( 'adr_plan_name' ), 'sua.planid', false, '', true, false, $subConcept );\n\t\tif (is_array ( $_SESSION ['adrPlansConcepts'] ['plans'] )) {\n\t\t\tforeach ( $_SESSION ['adrPlansConcepts'] ['plans'] as $key => $element ) {\n\t\t\t\t$filters ['plan']->addValue ( $key, $element ['name'] );\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Count\n\t\t$numrows = $this->managerUser->getAdrUsersCount ( $filters );\n\t\t\n\t\t$list = array ();\n\t\t\n\t\tif ($numrows > 0) {\n\t\t\t//List\n\t\t\t$list = $this->managerUser->getAdrUsers ( $begin, $count, $filters );\n\t\t}\n\t\t\n\t\t// Pager\n\t\t$pager = Util::getPager ( $numrows, $begin, $page, $count );\n\t\t\n\t\t// Filter Group (Form)\n\t\t$filterGroup = new FilterGroup ( 'adrUsersFilter', '', '', '' );\n\t\t$filterGroup->setFiltersList ( $filters );\n\t\t\n\t\t$html = '';\n\t\t\n\t\trequire_once $_SERVER ['DOCUMENT_ROOT'] . '/../application/modules/adr/views/AdrUsersActions.view.php';\n\t\t\n\t\t$actions = AdrUsersActions::render ();\n\t\t\n\t\trequire_once $_SERVER ['DOCUMENT_ROOT'] . '/../application/modules/adr/views/AdrUsersList.view.php';\n\t\t\n\t\t$html .= AdrUsersList::render ( $list, $filterGroup, $pager, $actions, $numrows );\n\t\t\n\t\trequire_once $_SERVER ['DOCUMENT_ROOT'] . '/../application/core/factories/MasterFactory.class.php';\n\t\t\n\t\t$masterView = MasterFactory::getMaster ();\n\t\t\n\t\t$view = $masterView->render ( $html );\n\t\t\n\t\t$render = new RenderActionResponse ( $view );\n\t\t\n\t\t$this->logger->debug ( __METHOD__ . ' end' );\n\t\t\n\t\treturn $render;\n\t}", "title": "" }, { "docid": "8eedd0cfbb75522805a58cbd88741c94", "score": "0.61113966", "text": "function filtering_instructor_custom($args=false,$object=false){\n\t \tif($object!='members')//hide for members only\n\t\t return $args;\n\n\t\t$qs = $args; \n\t\t$args = wp_parse_args( $args ); \n\n\t\t if(!isset($args['scope']) || $args['scope'] != 'instructors')\n\t\t \treturn $qs;\n\t\t \n\t\t $args=array('role' => 'Instructor','fields' => 'ID');\n\t\t $users = new WP_User_Query($args);\n\n\t\t $included_user = implode(',',$users->results);\n\t\t //$included_user='1,2,3';//comma separated ids of users whom you want to exclude\n\t\t \n\t\t $args=wp_parse_args($qs);\n\t\t \n\t\t //check if we are searching or we are listing friends?, do not exclude in this case\n\t\t if(!empty($args['user_id'])||!empty($args['search_terms']))\n\t\t return $qs;\n\t\t \n\t\t if(!empty($args['include']))\n\t\t $args['include']=$args['include'].','.$included_user;\n\t\t else\n\t\t $args['include']=$included_user;\n\n\t\t $qs=build_query($args);\n\n\t\t return $qs;\n\t}", "title": "" }, { "docid": "8cdb1072c23946087570e49c311042aa", "score": "0.609293", "text": "function filtering_members_page_admin( $sql, $query ) {\n\n\n // If we are superadmin users, we can explore users\n \tif( bp_current_component() == \"members\" && get_role_user() == \"admin\" ){ \t\t\n \t\t\n\n \t\t$type = $query->query_vars[\"type\"];\n \t\t$term = $query->query_vars[\"search_terms\"]; \n\n \t\tif( $type == \"undefined\") $type = \"active\"; // fix bug when search term by active order, the first time reutrn undefined\n\n \t\t$sql_id_word = \"\";\n\n $filter = \"\";\n\n $options = array(\"admin\",\"active\",\"newest\",\"premium\",\"inactive\",\"noplan\",\"free\"); \n\t\tif( in_array( $type, $options ) ){\n\t\t\t$sql[\"select\"] = \"SELECT u.user_id as id FROM wp_bp_activity u\" ;\n\t\t\t$filter = \" u.component = 'members' AND u.type = 'last_activity' \";\t\t\n\t\t\t$sql_id_word = \"u.user_id\";\t\n\n\t\t\tif( $type != \"newest\" ){\n\t\t\t\t$sql[\"orderby\"] = \" ORDER BY u.date_recorded \" ;\n\t\t\t\t$sql[\"order\"] = \" DESC \" ;\n\t\t\t}\n\t\t}\n\n\t\t$options = array(\"alphabetical\",\"undefined\"); \n\t\tif( in_array( $type, $options ) ){\n\t\t\t//$filter = \" u.ID IN ( SELECT ID FROM wp_users WHERE user_status = 0 ) \";\n\t\t\t$filter = \" u.user_status = 0 \"; // users key confirmed and active\n\t\t\t$sql_id_word = \"u.ID\";\t\n\t\t}\n \t\t\n\t\t$sql[\"where\"] = array();\n\n\t\t$sql[\"where\"][] = \" 1=1 \";\n\t\t$sql[\"where\"][] = $filter;\n\n\t\t\n\t\tif( $type == \"premium\" || $type == \"inactive\" || $type == \"free\" ){ $sql[\"where\"][] = $sql_id_word.\" IN (\".members_find_levels($type).\")\";}\n\t\telse if( $type == \"noplan\" ){ $sql[\"where\"][] = $sql_id_word.\" NOT IN (\".members_find_levels($type).\")\"; }\n\t\telse if( $type == \"admin\" ){ $sql[\"where\"][] = $sql_id_word.\" IN (\".members_find_admins().\")\"; }\n\n\n\t\tif( $term ){\t\t\t\n\t\t\t$sql[\"where\"][\"search\"] = $sql_id_word.\" IN (\".members_find_term($term).\")\";\n\t\t}\n\t\n\t\t\n\t\t//pr($query->query_vars);\n //pr($sql); \n\n\n \t\treturn $sql;\n\n \t}else{\n\t\treturn $sql; \t\t\n \t}\n\n}", "title": "" }, { "docid": "17f7d4a0bad84c8305afe7b425d07555", "score": "0.6080598", "text": "function content_function(){ load_all_users(); }", "title": "" }, { "docid": "49f43e888be8e6d8e76d0622dfdc3e12", "score": "0.602847", "text": "function return_users($get_approval){\n if($get_approval){\n // declare variables\n $dimensions = 'rt:source';\n\t\t$rt_users = 'rt:activeUsers';\n\t\t\n\t\t//validate the credentials\n $service = check_credentials($get_approval);\n\t\t$optparams = array ('dimensions' => $dimensions);\n\t\t\n\t\t//get result \n\t\t$results = $service->data_realtime->get(variable_get('os_board_analytics_id'), $rt_users);\n\t\t//return the results\n\t\treturn $results;\t\n}\n}", "title": "" }, { "docid": "e9ed72629ae9b1e0078e3c4f35a584c4", "score": "0.5973096", "text": "function getUsers()\n {\n //TODO\n }", "title": "" }, { "docid": "5f932f9290c58233ba83d8d27112b08a", "score": "0.5963156", "text": "function network_notifier_get_users() {\n\tglobal $wpdb;\n\t\n\t$network_notifier_current_blog = get_current_blog_id() == 1 ? 'wpress_user_level' : 'wpress_' . get_current_blog_id() . '_user_level';\n\t$network_notifier_user_array = array();\n\t\n\tfor ( $i = 0; $i <= 10; $i++ ) {\n\t\t$authors = $wpdb->get_results( $wpdb->prepare( \"SELECT * FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value = %s\", $network_notifier_current_blog, $i ) );\n\t\tforeach ( $authors as $author ) {\n\t\t\t$author = get_userdata( $author->user_id );\n\t\t\t$name = $author->nickname;\n\t\t\t$email = strtolower( $author->user_email );\n\t\t\t\n\t\t\t$network_notifier_user_array[] = array( 'name' => $name, 'email' => $email );\n\t\t}\n\t}\n\t\n\treturn $network_notifier_user_array;\n}", "title": "" }, { "docid": "8e3d75cb6e7ea869ef7bbce2a977e341", "score": "0.5943552", "text": "public function userInAll($uid = NULL);", "title": "" }, { "docid": "90f92e215f09edf43ee8700fbf335a4a", "score": "0.5931501", "text": "function UserID_Filtering(&$filter) {\r\n\r\n\t\t// Enter your code here\r\n\t}", "title": "" }, { "docid": "822baea0a8332a01ad42c23e01090690", "score": "0.59298307", "text": "public function userIdFiltering(&$filter)\n {\n // Enter your code here\n }", "title": "" }, { "docid": "9da20ff6a110539970adc698a4aa71e2", "score": "0.5909525", "text": "public function hook_pre_get_users( $query ) {\n\t\t$meta_query = $query->get( 'meta_query' );\n\t\tif ( ! empty( $meta_query ) ) {\n\t\t\t$meta_query = $this->filter_meta_query_array( $meta_query, 'user_meta' );\n\t\t\t$query->set( 'meta_query', $meta_query );\n\t\t}\n\t}", "title": "" }, { "docid": "179dd780050a7f7e22327e077f3af388", "score": "0.59061676", "text": "function SearchUser_func() {\n\tglobal $msw;\n $select = sanitize_text_field($_POST['select']);\n\t$search_input = sanitize_text_field($_POST['search_input']);\n\t$status = 'FAILED';\n $usersids = array();\n $message = array();\n\n if($select != 'name' && $search_input ) {\n $user = get_user_by($select, $search_input);\n $usersids[] = $user->data->ID;\n } else if( $select == 'name') {\n // $args = array (\n // 'order' => 'ASC',\n // 'orderby' => 'display_name',\n // 'search' => '*'.esc_attr( $search_input ).'*',\n // // 'search_columns' => array( 'ID', 'user_login', 'user_nicename', 'user_email'),\n // 'meta_query' => array(\n // 'relation' => 'OR',\n // array(\n // 'key' => 'first_name',\n // 'value' => $search_input,\n // 'compare' => 'LIKE'\n // ), \n // array(\n // 'key' => 'last_name',\n // 'value' => $search_input,\n // 'compare' => 'LIKE'\n // ),\n // array(\n // 'key' => 'description',\n // 'value' => $search_input ,\n // 'compare' => 'LIKE'\n // )\n // )\n // );\n\n // $wp_user_query = new WP_User_Query($args);\n // $users_found = $wp_user_query->get_results();\n // $usersids = wp_list_pluck($users_found, 'ID');\n\n global $wpdb;\n //some cleanup to the search term, as well as caching it to $usersearch\n $usersearch = substr(stripslashes( trim($search_input) ), 1);\n //$wpdb->prepare() is a fast and safe method for performing a MySQL query\n $stmt = $wpdb->prepare(\"SELECT user_id FROM $wpdb->usermeta AS um\n WHERE ( um.meta_key='first_name' AND um.meta_value LIKE '%%%s%%') OR\n (um.meta_key='last_name' AND um.meta_value LIKE '%%%s%%')\n ORDER BY um.meta_value \n LIMIT 150\", $usersearch, $usersearch );\n //results are cached in the variable $results using get_col()\n $usersids = $wpdb->get_col( $stmt );\n\n }\n\n $usersids = array_filter($usersids);\n\n\tif ( is_array($usersids) && !empty($usersids) ) {\n $status = 'SUCCESS';\n foreach ($usersids as $id) {\n $each_user = array();\n $user = get_user_by('ID', $id);\n $each_user['userid'] = $user->data->ID;\n $each_user['name'] = $user->data->display_name;\n $each_user['email'] = $user->data->user_email;\n $each_user['roles'] = $user->roles;\n $each_user['avatar'] = get_avatar_url($user->data->ID);\n $each_user['balance'] = get_user_meta( $user->data->ID, 'wallet_balance', true);\n $each_user['currency'] = $msw->currency_symbol;\n $message[] = $each_user;\n }\n\t} else {\n\t\t$message = 'No user found!';\n\t}\n\n\techo json_encode(array( 'status' => $status, 'responsetext' => $message ));\n\tdie();\n}", "title": "" }, { "docid": "d03974446720cb2b75f8eb1e02f09966", "score": "0.589811", "text": "function adverts_author_suggest() {\n \n // Find users matching user query\n $users = new WP_User_Query( array(\n 'search' => '*'.esc_attr( $_GET[\"q\"] ).'*',\n 'search_columns' => array(\n 'user_login',\n 'display_name',\n 'user_email',\n ),\n ) );\n \n $users_found = $users->get_results();\n \n foreach($users_found as $user) {\n echo '<span data-id=\"'.$user->ID.'\">'.esc_html($user->display_name).'</span>';\n echo '<!-- suggest delimeter -->';\n }\n \n echo '<span data-id=\"0+\"><em>Anonymous</em></span>';\n echo '<!-- suggest delimeter -->';\n \n exit;\n}", "title": "" }, { "docid": "57f7795cfe83bf4c311e78c864f7eaa5", "score": "0.58964115", "text": "function homeland_agent_list() {\n\t\tglobal $post;\n\n\t\t$homeland_agent_limit = esc_attr( get_option('homeland_agent_limit') ); \n\t\t$homeland_agents_header = get_option('homeland_agents_header');\n\t\t$homeland_agent_order = get_option('homeland_agent_order');\n\t\t$homeland_agent_orderby = get_option('homeland_agent_orderby');\n \n\t\t?>\n\t\t<div class=\"agent-block\">\n\t\t\t<h3>\n\t\t\t\t<span>\n\t\t\t\t\t<?php \n\t\t\t\t\t\tif(!empty( $homeland_agents_header )) : echo $homeland_agents_header;\n\t\t\t\t\t\telse : sanitize_title( _e( 'Agents', CODEEX_THEME_NAME ) ); \n\t\t\t\t\t\tendif;\n\t\t\t\t\t?>\n\t\t\t\t</span>\n\t\t\t</h3>\n\t\t\t<ul>\n\t\t\t\t<?php\n\t\t\t\t\t$args = array( \n\t\t\t\t\t\t'role' => 'contributor', \n\t\t\t\t\t\t'order' => $homeland_agent_order, \n\t\t\t\t\t\t'orderby' => $homeland_agent_orderby, \n\t\t\t\t\t\t'number' => $homeland_agent_limit \n\t\t\t\t\t);\n\n\t\t\t\t $homeland_agents = new WP_User_Query( $args );\n\n\t\t\t\t if (!empty( $homeland_agents->results )) :\n\t\t\t\t\t\tforeach ($homeland_agents->results as $homeland_user) :\n\t\t\t\t\t\t\tglobal $wpdb;\n\n\t\t\t\t\t\t\t$homeland_post_author = $homeland_user->ID;\n\t\t\t\t\t\t\t$homeland_custom_avatar = get_the_author_meta('homeland_custom_avatar', $homeland_post_author);\n\n\t\t\t\t\t\t\t$homeland_count = (int) $wpdb->get_var( $wpdb->prepare( \"SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'homeland_properties' AND post_status = 'publish' AND post_author = %d\", $homeland_post_author ) );\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t<li class=\"clear\">\n\t\t\t\t\t\t\t\t\t<a href=\"<?php echo esc_url( get_author_posts_url( $homeland_post_author ) ); ?>\">\n\t\t\t\t\t\t\t\t\t\t<?php \n\t\t\t \t\t\t\t\t\t\tif(!empty($homeland_custom_avatar)) : \n\t\t\t \t\t\t\t\t\t\t\techo '<img src=\"' . $homeland_custom_avatar . '\" class=\"avatar\" style=\"width:70px; height:70px;\" />';\n\t\t\t\t \t\t\t\t\t\telse : echo get_avatar( $homeland_post_author, 70 );\n\t\t\t\t \t\t\t\t\t\tendif;\n\t\t\t \t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t<h4><a href=\"<?php echo esc_url( get_author_posts_url( $homeland_post_author ) ); ?>\">\n\t\t\t\t\t\t\t\t\t\t<?php echo $homeland_user->display_name; ?></a></h4>\n\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t<i class=\"fa fa-home fa-lg\"></i> <?php esc_attr( _e( 'Listed:', CODEEX_THEME_NAME ) ); ?>\n\t\t\t\t\t\t\t\t\t\t<span><?php echo intval($homeland_count); echo \"&nbsp;\"; esc_attr( _e( 'Properties', CODEEX_THEME_NAME ) ); ?></span>\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t</li>\t\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\tendforeach;\n\t\t\t\t\telse : _e( 'No Agents found!', CODEEX_THEME_NAME );\n\t\t\t\t\tendif;\n\t\t\t\t?>\n\t\t\t</ul>\n\t\t</div><?php\t\n\t}", "title": "" }, { "docid": "0d031c43175a103a4b5a45d480cbf141", "score": "0.58960104", "text": "function get_users()\n {\n global $wpdb, $table_prefix;\n return $wpdb->get_results(\"SELECT user_login, ID FROM $wpdb->users ORDER BY user_login ASC\");\t\n }", "title": "" }, { "docid": "8d900a1b7b8a49fcb530c5cf9dd51607", "score": "0.5874757", "text": "function custom_wp_list_authors($args = '') {\nglobal $wpdb;\n\n$defaults = array(\n 'orderby' => 'name', 'order' => 'ASC', 'number' => '',\n 'optioncount' => false, 'exclude_admin' => true,\n 'show_fullname' => false, 'hide_empty' => true,\n 'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true,\n 'style' => 'list', 'html' => true\n);\n\n$args = wp_parse_args( $args, $defaults );\nextract( $args, EXTR_SKIP );\n\n$return = '';\n\n$query_args = wp_array_slice_assoc( $args, array( 'orderby', 'order', 'number' ) );\n$query_args['fields'] = 'ids';\n$authors = get_users( $query_args );\n\n $custom_post_types = get_post_types(array('_builtin' => false));\n if(!empty($custom_post_types)){\n $temp = implode (\"','\", $custom_post_types);\n $custom_post_types = \"'\";\n $custom_post_types .= $temp;\n $custom_post_types .= \"','post'\";\n }else{\n $custom_post_types .= \"'post'\";\n }\n$author_count = array();\nforeach ( (array) $wpdb->get_results(\"SELECT DISTINCT post_author, COUNT(ID) AS count FROM $wpdb->posts WHERE post_type in ($custom_post_types) AND \" . get_private_posts_cap_sql( 'post' ) . \" GROUP BY post_author\") as $row )\n $author_count[$row->post_author] = $row->count;\n\nforeach ( $authors as $author_id ) {\n $author = get_userdata( $author_id );\n\n if ( $exclude_admin && 'admin' == $author->display_name )\n continue;\n\n $posts = isset( $author_count[$author->ID] ) ? $author_count[$author->ID] : 0;\n\n if ( !$posts && $hide_empty )\n continue;\n\n $link = '';\n\n if ( $show_fullname && $author->first_name && $author->last_name )\n $name = \"$author->first_name $author->last_name\";\n else\n $name = $author->display_name;\n\n if ( !$html ) {\n $return .= $name . ', ';\n\n continue; // No need to go further to process HTML.\n }\n\n if ( 'list' == $style ) {\n $return .= '<li>';\n }\n\n $link = '<a href=\"' . get_author_posts_url( $author->ID, $author->user_nicename ) . '\" title=\"' . esc_attr( sprintf(__(\"Posts by %s\"), $author->display_name) ) . '\">' . $name . '</a>';\n\n if ( !empty( $feed_image ) || !empty( $feed ) ) {\n $link .= ' ';\n if ( empty( $feed_image ) ) {\n $link .= '(';\n }\n\n $link .= '<a href=\"' . get_author_feed_link( $author->ID ) . '\"';\n\n $alt = $title = '';\n if ( !empty( $feed ) ) {\n $title = ' title=\"' . esc_attr( $feed ) . '\"';\n $alt = ' alt=\"' . esc_attr( $feed ) . '\"';\n $name = $feed;\n $link .= $title;\n }\n\n $link .= '>';\n\n if ( !empty( $feed_image ) )\n $link .= '<img src=\"' . esc_url( $feed_image ) . '\" style=\"border: none;\"' . $alt . $title . ' />';\n else\n $link .= $name;\n\n $link .= '</a>';\n\n if ( empty( $feed_image ) )\n $link .= ')';\n }\n\n if ( $optioncount )\n $link .= ' ('. $posts . ')';\n\n $return .= $link;\n $return .= ( 'list' == $style ) ? '</li>' : ', ';\n}\n\n$return = rtrim($return, ', ');\n\nif ( !$echo )\n return $return;\n\necho $return;\n}", "title": "" }, { "docid": "128a8e95df2cd5cc85f3332ae30189b4", "score": "0.58643633", "text": "function get_hired_minyawns_for_job($job_id){\n\n global $wpdb;\n\n $query = \"Select user_id from \".$wpdb->base_prefix .\"userjobs WHERE job_id = \".$job_id.\" and status = 'hired'\";\n \n $results = $wpdb->get_results( $query,OBJECT);\n $users = array();\n foreach($results as $result){\n $users[] = $result->user_id;\n }\n\n if(count($users)!=0){\n return get_users( array( 'include' => $users ) );\n }else{\n return false;\n }\n \n}", "title": "" }, { "docid": "561f8dc691c87a12230e38612fcf1618", "score": "0.5863929", "text": "function lanorg_get_user_list() {\n\t$user_list = array();\n\n\t$users = get_users();\n\tforeach ($users as $user) {\n\t\t$user_list[$user->ID] = $user->user_login;\n\t}\n\treturn $user_list;\n}", "title": "" }, { "docid": "6c25d1097751ef19affd2344b4922a23", "score": "0.5859027", "text": "function UserID_Filtering(&$filter) {\n\n\t\t// Enter your code here\n\t}", "title": "" }, { "docid": "6c25d1097751ef19affd2344b4922a23", "score": "0.5859027", "text": "function UserID_Filtering(&$filter) {\n\n\t\t// Enter your code here\n\t}", "title": "" }, { "docid": "6c25d1097751ef19affd2344b4922a23", "score": "0.5859027", "text": "function UserID_Filtering(&$filter) {\n\n\t\t// Enter your code here\n\t}", "title": "" }, { "docid": "ec70661a932fe6ce205eee9e58c8bcc3", "score": "0.58566993", "text": "function userOffers($uid, $filter, $order)\n{\n\treturn \\dal\\market\\userOffers($uid, $filter, $order);\n}", "title": "" }, { "docid": "24d4c1139bc527d7e62530ffa5c84766", "score": "0.58489466", "text": "protected function addUserAutoComplete()\n\t{\n\t\t/**\n\t\t * @var $rbacsystem ilRbacSystem\n\t\t */\n\t\tglobal $rbacsystem;\n\n\t\tif(!$rbacsystem->checkAccess('read', '', $this->object->getRefId()) ||\n\t\t\t!$rbacsystem->checkAccess('read', '', USER_FOLDER_ID)\n\t\t)\n\t\t{\n\t\t\techo json_encode(array());\n\t\t\texit();\n\t\t}\n\t\t\n\t\tinclude_once 'Services/User/classes/class.ilUserAutoComplete.php';\n\t\t$auto = new ilUserAutoComplete();\n\t\t$auto->setSearchFields(array('login', 'firstname', 'lastname', 'email'));\n\t\t$auto->enableFieldSearchableCheck(false);\n\t\t$auto->setMoreLinkAvailable(true);\n\n\t\tif(($_REQUEST['fetchall']))\n\t\t{\n\t\t\t$auto->setLimit(ilUserAutoComplete::MAX_ENTRIES);\n\t\t}\n\n\t\techo $auto->getList($_REQUEST['term']);\n\t\texit();\n\t}", "title": "" }, { "docid": "fc483adc90bbcf8d5ed098c715e27d12", "score": "0.5848673", "text": "function user_list($parameters){ //\n\t\t$end_page \t\t= 1;\n\t\t$group_filter\t= $this->check_parameters($parameters,\"group_filter\",0);\n\t\t$page\t\t\t= $this->check_parameters($parameters,\"page\",1);\n\t\t$status\t\t\t= $this->check_parameters($parameters,\"status\",$this->check_parameters($parameters,\"identifier\",-1));\n\t\t$order_filter\t= $this->check_parameters($parameters,\"order_filter\",0);\n\t\t$filter_string\t= str_replace(\n\t\t\t\t\t\t\tArray(\" \",\"'\"), \n\t\t\t\t\t\t\tArray(\"%\",\"&#39;\"), \n\t\t\t\t\t\t\t$this->check_parameters($parameters,\"filter_string\")\n\t\t\t\t\t\t );\n\t\t$variables \t\t= array();\t\n\t\t\n\t\tif ($this->module_debug){$this->call_command(\"UTILS_DEBUG_ENTRY\",array($this->module_name,\"user_list filter parameters\",__LINE__,print_r($parameters,true)));}\n\t\t\n\t\t/**\n\t\t* Procude the SQL command that will retrieve the information from the database\n\t\t*/\n\t\t$where = \"\";\n\t\t$w2=\"\";\n\t\t$w=\"\";\n\t\t$join=\"\";\n\t\tif ($this->has_module_contact==1){\n\t\t\t$join.=\" \n\t\t\tleft outer join contact_data on user_info.user_identifier=contact_data.contact_user\n\t\t\tleft outer join contact_address on contact_address.address_identifier=contact_data.contact_address\n\t\t\tleft outer join contact_company on contact_address.address_identifier=contact_company.company_address\n\t\t\tleft outer join email_addresses on contact_data.contact_identifier=email_addresses.email_contact\n\t\t\t\";\n\n\t\t\t$where .= \" and (contact_data.contact_client=$this->client_identifier or contact_data.contact_client is null) \";\n\t\t\t$w2\t .= \" or\n\t\t\t\tcontact_data.contact_first_name like '%$filter_string%' or \n\t\t\t\tcontact_data.contact_last_name like '%$filter_string%' or \n\t\t\t\tcontact_data.contact_initials like '%$filter_string%' or \n\t\t\t\tcontact_data.contact_job_title like '%$filter_string%' or \n\t\t\t\tcontact_data.contact_telephone like '%$filter_string%' or \n\t\t\t\tcontact_data.contact_fax like '%$filter_string%' or \n\t\t\t\tcontact_data.contact_profile like '%$filter_string%'\";\n\t\t\t$where .= \" and (contact_company.company_client=$this->client_identifier or contact_company.company_client is null) \";\n\t\t\t$w2 .= \" or contact_company.company_name like '%$filter_string%' \";\n\t\t\t$where .= \" and (contact_address.address_client=$this->client_identifier or contact_address.address_client is null) \";\n\t\t\t$w2\t .= \" or\n\t\t\t\tcontact_address.address_1 like '%$filter_string%' or \n\t\t\t\tcontact_address.address_2 like '%$filter_string%' or \n\t\t\t\tcontact_address.address_3 like '%$filter_string%' or \n\t\t\t\tcontact_address.address_city like '%$filter_string%' or \n\t\t\t\tcontact_address.address_county like '%$filter_string%' or \n\t\t\t\tcontact_address.address_postcode like '%$filter_string%'\";\n\t\t\t$where .= \" and (email_addresses.email_client=$this->client_identifier or email_addresses.email_client is null)\";\n\t\t\t$w2 .= \" or email_addresses.email_address like '%$filter_string%' \";\n\t\t\t\n/*\t\t\t*/\n\t\t}\n\t\tif ($filter_string!=\"\"){\n\t\t\t$w = \" and (user_login_name like '%$filter_string%' $w2)\";\n\t\t}\n\t\tif ($group_filter>0){\n\t\t\t$join.=\" left outer join groups_belonging_to_user on user_info.user_identifier = groups_belonging_to_user.user_identifier\";\n\t\t\t$where .=\" and groups_belonging_to_user.group_identifier = $group_filter\";\n\t\t}\n\t\tif($status!=-1){\n\t\t\t$where .=\" and user_info.user_status = $status\";\n\t\t}\n\t\t$sql = \"Select * from user_info $join where user_info.user_client=$this->client_identifier $where $w order by \".$this->display_options[$order_filter][2].\"\";\n//\t\tprint $sql;\n\t\tif ($this->module_debug){\n\t\t\t$this->call_command(\"UTILS_DEBUG_ENTRY\",array($this->module_name,\"SQL Statement\",__LINE__,\"[$sql]\"));\n\t\t}\n\t\t$result = $this->call_command(\"DB_QUERY\",array($sql));\n\t\t/**\n\t\t* what functionality options are available on this page\n\t\t*/\n\t\t$variables[\"PAGE_BUTTONS\"] = Array(Array(\"ADD\",$this->module_command.\"ADD\",ADD_NEW));\n\t\t$variables[\"HEADER\"] = \"User Manager (List users)\";\n\t\tif (!$result){\n\t\t\t/**\n\t\t\t* No Records were returned.\n\t\t\t*/\n\t\t\tif ($this->module_debug){\n\t\t\t\t$this->call_command(\"UTILS_DEBUG_ENTRY\",array($this->module_name,\"SQL Statement\",__LINE__,\"[Records not returned]\"));\n\t\t\t}\n\t\t\t$number_of_records\t= 0;\n\t\t\t$goto\t\t\t\t= 0;\n\t\t\t$finish\t\t\t\t= 0;\n\t\t\t$page\t\t\t\t= 1;\n\t\t\t$num_pages\t\t\t= 1;\n\t\t\t$start_page\t\t\t= 1;\n\t\t\t$end_page\t\t\t= 1;\n\t\t}else{\n\t\t\t/**\n\t\t\t* When some records are returned we will only return the page of results that the\n\t\t\t- user has requested or the first page if the user has not requested any page.\n\t\t\t*/\n\t\t\t\n\t\t\tif ($this->module_debug){\n\t\t\t\t$this->call_command(\"UTILS_DEBUG_ENTRY\",array($this->module_name,\"SQL Statement\",__LINE__,\"[Records returned]\"));\n\t\t\t}\n\t\t\t$this->page_size =50;\n\t\t\t/**\n\t\t\t* Start to work out what posisition on the record set we are supposed to be at.\n\t\t\t*/\n\t\t\t$page = $this->check_parameters($parameters,\"page\",1);\n\t\t\t$number_of_records = $this->call_command(\"DB_NUM_ROWS\",array($result));\n\t\t\t$goto = ((--$page)*$this->page_size);\n\t\t\t\n\t\t\t/**\n\t\t\t* jump down the results to the starting record for our consideration\n\t\t\t*/\n\t\t\tif (($goto!=0)&&($number_of_records>$goto)){\n\t\t\t\t$pointer = $this->call_command(\"DB_SEEK\",array($result,$goto));\n\t\t\t}\n\t\t\t/**\n\n\t\t\t* produce the variables that will be used to work out what information will be\n\t\t\t- displayed\n\t\t\t*/\n\t\t\tif ($goto+$this->page_size>$number_of_records){\n\t\t\t\t$finish = $number_of_records;\n\t\t\t}else{\n\t\t\t\t$finish = $goto+$this->page_size;\n\t\t\t}\n\t\t\t$goto++;\n\t\t\t$page++;\n\t\t\t\n\t\t\t$num_pages=floor($number_of_records / $this->page_size);\n\t\t\t$remainder = $number_of_records % $this->page_size;\n\t\t\tif ($remainder>0){\n\t\t\t\t$num_pages++;\n\t\t\t}\n\t\t\t\n\t\t\t$start_page=intval($page/$this->page_size);\n\t\t\t$remainder = $page % $this->page_size;\n\t\t\tif ($remainder>0){\n\t\t\t\t$start_page++;\n\t\t\t}\n\t\t\tif (($start_page+$this->page_size)>$num_pages)\n\t\t\t$end_page=$num_pages;\n\t\t\telse\n\t\t\t$end_page+=$this->page_size;\n\t\t\t\n\t\t\t$counter=0;\n\t\t\t\n\t\t\t/**\n\t\t\t* What options are available per result\n\t\t\t*/\n/*\t\t\t\t$variables[\"ENTRY_BUTTONS\"] \t= Array(\n\t\t\t\t\tArray(\"EDIT\",$this->module_command.\"EDIT\",EDIT_EXISTING),\n\t\t\t\t\tArray(\"REMOVE\",$this->module_command.\"REMOVE\",REMOVE_EXISTING)\n\t\t\t\t);\n*/\n/*\t\t\tif ($this->parent->server[LICENCE_TYPE]==ECMS)\t\t\t{\n\t\t\t\t\n\t\t\t}*/\n\t\t\t/**\n\t\t\t* Retrieve the actual results that are to be displayed\n\t\t\t*/\n\t\t\t$variables[\"RESULT_ENTRIES\"] \t= Array();\n\t\t\twhile (($r = $this->call_command(\"DB_FETCH_ARRAY\",array($result)))&&($counter<$this->page_size)){\n\t\t\t\t$counter++;\n\t\t\t\t$index=count($variables[\"RESULT_ENTRIES\"]);\n\t\t\t\t$phone = $this->check_parameters($r,\"contact_telephone\",\"[[nbsp]]\");\n\t\t\t\tif($phone==\"\"){\n\t\t\t\t\t$phone=\"[[nbsp]]\";\n\t\t\t\t}\n\t\t\t\t$uid = $r[\"user_identifier\"];\n\t\t\t\t$variables[\"RESULT_ENTRIES\"][$index]=Array(\n\t\t\t\t\t\"identifier\"\t=> $uid,\n\t\t\t\t\t\"ENTRY_BUTTONS\" => Array(),\n\t\t\t\t\t\"attributes\"\t=> Array(\n\t\t\t\t\t\tArray(ENTRY_USERNAME,\t$this->check_parameters($r,\"user_login_name\"),\"TITLE\",\"NO\"),\n\t\t\t\t\t\tArray(USER_FULL_NAME,\t$this->check_parameters($r,\"contact_last_name\").\", \".$this->check_parameters($r,\"contact_first_name\",\"\"),\"SUMMARY\",\"NO\"),\n\t\t\t\t\t\tArray(USER_COMPANY,\t\t$this->check_parameters($r,\"company_name\",\"[[nbsp]]\")),\n//\t\t\t\t\t\tArray(USER_PHONE,\t\t$phone),\n//\t\t\t\t\t\tArray(LOCALE_EMAIL,\t\t$this->check_parameters($r,\"email_address\",\"[[nbsp]]\"))\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t$override_edit =0;\n\t\t\t\tif (($this->parent->server[LICENCE_TYPE]==ECMS)||($this->parent->server[LICENCE_TYPE]==MECM)){\n\t\t\t\t\tif ($this->has_module_group==1){\n\t\t\t\t\t\t$grps = $this->call_command(\"GROUP_RETRIEVE_INFORMATION\",Array(\"user_identifier\" => $r[\"user_identifier\"]));\n\t\t\t\t\t\t$grp_info =\"\";\n\t\t\t\t\t\t$grp_type=1;\n\t\t\t\t\t\tfor ($i=0,$max=count($grps);$i<$max;$i++){\n\t\t\t\t\t\t\tif ($grps[$i][\"TYPE\"]==2){\n\t\t\t\t\t\t\t\t$grp_type=2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$grp_info .=\"<li>\".$grps[$i][\"LABEL\"].\"</li>\";\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\tif($grp_info == \"\"){\n\t\t\t\t\t\t\t$grp_info = \"[[nbsp]]\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$variables[\"RESULT_ENTRIES\"][$index][\"attributes\"][count($variables[\"RESULT_ENTRIES\"][$index][\"attributes\"])] = Array(USER_GROUP_NAME, $grp_info,\"SUMMARY\",\"NO\");\n\t\t\t\t\t}\n\t\t\t\t\t$sql = \"select distinct * from user_to_object where uto_client = $this->client_identifier and uto_identifier = $uid\";\n//\t\t\t\t\tprint \"<li>\".__FILE__.\"@\".__LINE__.\"<p>$sql</p></li>\";\n\t\t\t\t\t$result_obj = $this->call_command(\"DB_QUERY\",Array($sql));\n while($r_obj = $this->call_command(\"DB_FETCH_ARRAY\",Array($result_obj))){\n \t$variables[\"RESULT_ENTRIES\"][$index][\"ENTRY_BUTTONS\"][count($variables[\"RESULT_ENTRIES\"][$index][\"ENTRY_BUTTONS\"])] = Array(\"edit\" , $r_obj[\"uto_module\"].\"EXECUTE_EDIT&amp;module_identifier=\".$r_obj[\"uto_object\"],\"Edit Member\");\n\t\t\t\t$variables[\"RESULT_ENTRIES\"][$index][\"ENTRY_BUTTONS\"][count($variables[\"RESULT_ENTRIES\"][$index][\"ENTRY_BUTTONS\"])] = Array(\"REMOVE\", $r_obj[\"uto_module\"].\"EXECUTE_DELETE&amp;module_identifier=\".$r_obj[\"uto_object\"],\"Delete Member\");\n\t\t\t\t\t\t$override_edit=1;\n }\n $this->call_command(\"DB_FREE\",Array($result_obj));\n\t\t\t\t}\n\t\t\t\tif($override_edit==0){\n\t\t\t\t\t$variables[\"RESULT_ENTRIES\"][$index][\"ENTRY_BUTTONS\"][count($variables[\"RESULT_ENTRIES\"][$index][\"ENTRY_BUTTONS\"])] = Array(\"EDIT\",$this->module_command.\"EDIT\",EDIT_EXISTING);\n\t\t\t\t$variables[\"RESULT_ENTRIES\"][$index][\"ENTRY_BUTTONS\"][count($variables[\"RESULT_ENTRIES\"][$index][\"ENTRY_BUTTONS\"])] = Array(\"REMOVE\",$this->module_command.\"REMOVE_CONFIRM\",REMOVE_EXISTING);\n\t\t\t\t}\n\t\t\t}\n\t\t\t/**\n\t\t\t* produce the XML representation of the information above.\n\t\t\t*/\n\t\t}\n\t\t/**\n\t\t* retrieve the page spanning information\n\t\t*/\n\t\t$variables[\"NUMBER_OF_ROWS\"]\t= $number_of_records;\n\t\t$variables[\"as\"]\t= \"table\";\n\t\t$variables[\"START\"]\t\t\t\t= $goto;\n\t\t$variables[\"FINISH\"]\t\t\t= $finish;\n\t\t$variables[\"CURRENT_PAGE\"]\t\t= $page;\n\t\t$variables[\"NUMBER_OF_PAGES\"]\t= $num_pages;\n\t\t$variables[\"START_PAGE\"]\t\t= $start_page;\n\t\t$variables[\"END_PAGE\"]\t\t\t= $end_page;\n\t\t/**\n\t\t* retrieve the XML information for building the filter form\n\t\t*/\n\t\tif (($this->parent->server[LICENCE_TYPE]==ECMS)||($this->parent->server[LICENCE_TYPE]==MECM)){\n\t\t\t$variables[\"FILTER\"]\t\t\t= $this->user_filter($parameters);\n\t\t}else{\n\t\t\t$variables[\"FILTER\"]\t\t\t= \"\";\n\t\t}\n\t\t\t\n\t\t$out = $this->generate_list($variables);\n\t\t\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "605b4ee319e27a1cbcee46e550bb2471", "score": "0.5848371", "text": "public function apply_new_user_filters() {\n\t\tadd_filter( 'new_user_notification_title', array( $this, 'new_user_notification_title_filter' ), 10, 2 );\n\t\tadd_filter( 'new_user_notification_message', array( $this, 'new_user_notification_message_filter' ), 10, 3 );\n\t\tadd_filter( 'send_new_user_notification', array( $this, 'send_new_user_notification_filter' ) );\n\t\tadd_filter( 'new_user_admin_notification_mail_to', array( $this, 'new_user_admin_notification_mail_to_filter' ) );\n\t\tadd_filter( 'new_user_admin_notification_title', array( $this, 'new_user_admin_notification_title_filter' ), 10, 2 );\n\t\tadd_filter( 'new_user_admin_notification_message', array( $this, 'new_user_admin_notification_message_filter' ), 10, 2 );\n\t\tadd_filter( 'send_new_user_admin_notification', array( $this, 'send_new_user_admin_notification_filter' ) );\n\t}", "title": "" }, { "docid": "757b85cd7a6ecd5f524f484467abad90", "score": "0.5835589", "text": "public function test_get_users_in_context_external_blog() {\n $user1 = $this->getDataGenerator()->create_user();\n $u1ctx = context_user::instance($user1->id);\n $extu1 = $this->create_external_blog(['userid' => $user1->id]);\n\n $userlist = new \\core_privacy\\local\\request\\userlist($u1ctx, 'core_blog');\n provider::get_users_in_context($userlist);\n $userids = $userlist->get_userids();\n $this->assertCount(1, $userids);\n }", "title": "" }, { "docid": "400415b305b9ac2330c041662f89e673", "score": "0.58155316", "text": "function ciusan_restrict_widget_userinfo($input, $var = null){\r\n\tglobal $wpdb;\r\n\t$user = $wpdb->get_row(\"SELECT * FROM $wpdb->users WHERE user_login = '{$input}' OR user_email = '{$input}' OR ID = '{$input}'\");\r\n\tif(!empty($user)){\r\n\r\n\t\tforeach ($user as $key => $value) {\r\n\t\t\t$users_data[$key] = $value; \r\n\t\t}\r\n\r\n\t\t$usermeta = $wpdb->get_results(\"SELECT * FROM $wpdb->usermeta WHERE user_id = '{$user->ID}'\");\r\n\r\n\t\tforeach ($usermeta as $key => $value) {\r\n\t\t\t$users_data[$value->meta_key] = $value->meta_value;\r\n\t\t}\r\n\r\n\t\tif(!is_null($var)){\r\n\t\t\treturn @$users_data[$var];\t\r\n\t\t}else{\r\n\t\t\treturn @$users_data;\r\n\t\t}\t\t\t\r\n\t}else{\r\n\t\treturn null;\r\n\t}\r\n}", "title": "" }, { "docid": "a7f5946c22aef33d43cdf970b831af60", "score": "0.5813692", "text": "function fellow_agency_subscribers() {\n\t\t//get count of subscribers user\n\t\t$current_user = wp_get_current_user();\n\t\t//check role of login user\n\t\t$loginrole=$current_user->roles[0];\n\t\tglobal $wpdb;\n\t\t$table ='user';\n\t\tif(isset($_GET['fagency_id'])){\n\t\t$agency_id=$_GET['fagency_id'];\n\t\t$sql = \"SELECT COUNT(*) FROM $table WHERE agencyId = $agency_id\";\n\t\t}\n\t\telseif($loginrole==\"agencyadmin\"){\n\t\t$cuurentuid=$current_user->ID;\n\t\t$sql = \"SELECT COUNT(*) FROM $table WHERE agencyId = $cuurentuid\";\n\n\t\t}else{\n\t\t$sql = \"SELECT COUNT(*) FROM $table WHERE agencyId != ''\";\n\t\t}\n\t\t$sub_count = $wpdb->get_var($sql);\n\n\t\t// code for display subscribe manu on top of user table\n\t $screen = get_current_screen();\n\t if ( $screen->id != \"users\" ) // Only add to users.php page\n\t return;\n\t ?>\n\t <script type=\"text/javascript\">\n\t jQuery(document).ready( function($)\n\t {\n\t $('.subsubsub').append('<li class=\"subscribers\"><a href=\"admin.php?page=subscribers\">Subscribers <span class=\"count\">(<? echo $sub_count?>)</span></a></li>');\n\t });\n\t </script>\n\t <?php\n\t}", "title": "" }, { "docid": "f32dc387f66439589ea6279673eca566", "score": "0.5793939", "text": "function adleex_user_list($query, $pre='') {\r\n\t$result = get_users($query);\r\n\t$list = $pre.',';\r\n\tforeach ($result as $voice) $list .= $voice->ID.':'.$voice->display_name.',';\r\n\t$list = trim($list,',');\r\n\t\r\n\treturn $list;\r\n\t\r\n}", "title": "" }, { "docid": "7bb58d681319dd0c38468c72c9b2b144", "score": "0.57903683", "text": "function get_userlist() {\n return $this->ldap_get_userlist(\"({$this->config->user_attribute}=*)\");\n }", "title": "" }, { "docid": "b18d1f9329a8d728cc9e07049686306f", "score": "0.5776567", "text": "function venture_group_get_requesting_users($gid) {\n $query = \"SELECT u.uid FROM {og_uid} ou INNER JOIN {users} u ON ou.uid = u.uid\n WHERE ou.nid = %d AND u.status > 0 AND ou.is_active = 0\";\n $result = db_query($query, $gid);\n \n $uids = array();\n while ($user = db_fetch_object($result)) {\n $uids[] = $user->uid;\n }\n \n return venture_profile_get_sorted_users($uids);\n}", "title": "" }, { "docid": "b4e2634e66fa8413e750495d52daad6c", "score": "0.5769375", "text": "function get_online_users($page=null,$limit=null){\r\n global $wpdb,$bp;\r\n \r\n if ($limit && $page)\r\n $pag_sql = $wpdb->prepare(\" LIMIT %d, %d\", intval(( $page - 1 ) * $limit), intval($limit));\r\n //let us check if friends component is active and check user preferences for friends only chat\r\n $friend_list=bpchat_get_user_friend_list_as_set($bp->loggedin_user->id);\r\n if(bpchat_has_friends_only_enabled($bp->loggedin_user->id)){\r\n \r\n if(empty($friend_list))\r\n return false;\r\n\r\n $paged_users_sql = \"SELECT user_id FROM {$bp->chat->table_chat_users} where is_online=1 AND user_id in {$friend_list} {$pag_sql}\";//// \"SELECT DISTINCT um.user_id FROM \" . CUSTOM_USER_META_TABLE . \" um LEFT JOIN \" . CUSTOM_USER_TABLE . \" u ON u.ID = um.user_id WHERE um.meta_key = 'last_activity' AND u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 AND DATE_ADD( FROM_UNIXTIME(um.meta_value), INTERVAL 5 MINUTE ) >= NOW() ORDER BY FROM_UNIXTIME(um.meta_value) DESC{$pag_sql}\", $pag_sql);\r\n return $wpdb->get_results($paged_users_sql);\r\n \r\n } else{\r\n\r\n //incase of sitewide pref show users with sitewide pref or in the friend_list\r\n\r\n $sql=\"SELECT user_id FROM {$bp->chat->table_chat_users} where is_online=1 AND user_id!=%d AND friends_only=0 \";//{$pag_sql}\r\n\r\n if($friend_list){\r\n $sql2=\"SELECT user_id FROM {$bp->chat->table_chat_users} where is_online=1 AND user_id in {$friend_list}\";\r\n $sql=$sql.\" UNION \".$sql2 ;\r\n }\r\n \r\n $paged_users_sql = $wpdb->prepare($sql,$bp->loggedin_user->id);//\"SELECT user_id FROM {$bp->chat->table_chat_users} where is_online=1 AND user_id!=%d AND friends_only=0 {$pag_sql}\",$bp->loggedin_user->id);//// \"SELECT DISTINCT um.user_id FROM \" . CUSTOM_USER_META_TABLE . \" um LEFT JOIN \" . CUSTOM_USER_TABLE . \" u ON u.ID = um.user_id WHERE um.meta_key = 'last_activity' AND u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 AND DATE_ADD( FROM_UNIXTIME(um.meta_value), INTERVAL 5 MINUTE ) >= NOW() ORDER BY FROM_UNIXTIME(um.meta_value) DESC{$pag_sql}\", $pag_sql);\r\n $paged_users = $wpdb->get_results($paged_users_sql);\r\n\r\n return $paged_users;//, 'total' => $total_users);\r\n\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "ad7cc13f0ac573a48b1513f29efe63cc", "score": "0.5766007", "text": "function sb_get_users($sorting = ['creation_time' , 'DESC'], $user_types = [], $search = '', $pagination = 0) {\n $query = '';\n $query_search = '';\n $count = count($user_types);\n if ($count) {\n for ($i = 0; $i < $count; $i++) {\n $query .= 'user_type = \"' . $user_types[$i] . '\" OR ';\n }\n $query = '(' . substr($query, 0, strlen($query) - 4) . ')';\n }\n if ($search != '') {\n $searched_users = sb_search_users($search);\n $count_search = count($searched_users);\n if ($count_search > 0) {\n for ($i = 0; $i < $count_search; $i++) {\n $query_search .= $searched_users[$i]['id'] . ',';\n }\n $query .= ($query != '' ? ' AND ' : '') . 'id IN (' . substr($query_search, 0, -1) . ')';\n }\n }\n if ($query != '') {\n $query = ' WHERE user_type <> \"bot\" AND ' . $query;\n } else {\n $query = ' WHERE user_type <> \"bot\"';\n }\n $users = sb_db_get(SELECT_FROM_USERS . ' FROM sb_users ' . $query . ' ORDER BY ' . $sorting[0] . ' ' . $sorting[1] . ' LIMIT ' . ($pagination * 100) . ',100', false);\n if (isset($users) && is_array($users)) {\n return $users;\n } else {\n return new SBError('db-error', 'sb_get_users', $users);\n }\n}", "title": "" }, { "docid": "95d566371d6bb405f921b6766734cc3a", "score": "0.57509196", "text": "function user_list() {\n $data = $this->commonHead();\n $data['module'] = \"dashboard\";\n $data['links'] = array();\n $where_users = '';\n\n\t\t\t$txt_username \t= $data['txt_username'] = (isset($_GET['username'])&&$_GET['username']) ? $_GET['username'] : $this->input->post('txt_hdr_username');\n\t\t\t$cmb_usertype \t= $data['cmb_usertype'] = (isset($_GET['usertype'])&&$_GET['usertype']) ? $_GET['usertype'] : $this->input->post('cmb_hdr_usertype');\n\t\t\t$data['filter_type'] = \"$cmb_usertype\";\n\t\t\t\n\t\t\t($cmb_usertype == \"utc\") ? $cmb_usertype = 7 : '';\n\t\t\tif( $txt_username != \"\" && $cmb_usertype != \"\" ) {\n\t\t\t\t\t$where_users = \" AND type_id = \".$cmb_usertype.\" AND id != '\".$this->sess_userid.\"' AND (CONCAT(firstname, ' ', lastname) LIKE '%\".$txt_username.\"%' OR nickname LIKE '%\".$txt_username.\"%' OR email_addr LIKE '%\".$txt_username.\"%')\";\n\t\t\t}\n\t\t\telse if( $txt_username == \"\" && $cmb_usertype != \"\") {\t\t\t\t\n\t\t\t\t\t$where_users = \" AND type_id = \".$cmb_usertype.\" AND id != '\".$this->sess_userid.\"'\";\n\t\t\t}\n\t\t\telse if($txt_username != \"\" && $cmb_usertype == \"\") {\n\t\t\t\t\t$where_users = \" AND id != '\".$this->sess_userid.\"' AND (CONCAT(firstname, ' ', lastname) LIKE '%\".$txt_username.\"%' OR nickname LIKE '%\".$txt_username.\"%' OR email_addr LIKE '%\".$txt_username.\"%')\";\n\t\t\t}\n\n // Get connection links of people and organigation //\n\t\t\t$peo_links \t= $this->users->getMyConnectionsByUserId( 'PEOPLE', $this->sess_userid, NULL, '*', $where_users );\n\t\t\t$data['peo_links']\t= (isset($peo_links) && is_array($peo_links)) ? $peo_links : array();\n\t\t\t$org_links\t= $this->users->getMyConnectionsByUserId( 'ORGANIZATION', $this->sess_userid, NULL, '*', $where_users );\t\t\t\n\t\t\t$data['org_links']\t= (isset($org_links) && is_array($org_links)) ? $org_links : array();\n\t\t\t$data['links'] \t\t= array_merge($peo_links, $org_links); \n\t\t\t\n\t\t\t$pg_limit = $data['pg_limit'] = 9; //changed from 36 to 9 by Marcio on Aug-10-2015\n\t\t\t$pgno_userlist \t\t= $data['pgno_userlist'] = isset($_GET['page']) ? (int)$_GET['page'] : '1';\n\t\t\t$total_user_list \t= $data['total_user_list'] = sizeof($data['links']);\n\t\t\t\n\t\t\t$this->load->view('user_list', $data);\n }", "title": "" }, { "docid": "ccc4bf95d1e440ec7f2a2f964ca3cf71", "score": "0.57354647", "text": "function sgfc_add_active_members_filter( $user_query ) {\n\n global $wpdb;\n\n if(!$user_query->get(\"active_members\"))\n return;\n\n $user_query->query_from .= ' INNER JOIN ' . $wpdb->posts . ' ON ' . $wpdb->posts . '.post_author = ' . $wpdb->users . '.ID '; // additional joins here\n $user_query->query_where .= ' AND ' . $wpdb->posts . '.post_status = \"wcm-active\"'; // additional where clauses\n\n}", "title": "" }, { "docid": "53c7a77a5e2d13c6e08210d77ca0b254", "score": "0.5719382", "text": "public function alm_users_query(){\n \t\n \tif(!isset($_GET)){ \n \treturn false; \n }\n \n $id = (isset($_GET['id'])) ? $_GET['id'] : '';\n $post_id = (isset($_GET['post_id'])) ? $_GET['post_id'] : '';\n \t\t$page = (isset($_GET['page'])) ? $_GET['page'] : 0;\n \t$offset = (isset($_GET['offset'])) ? $_GET['offset'] : 0;\n \t$repeater = (isset($_GET['repeater'])) ? $_GET['repeater'] : 'default';\n \t$type = alm_get_repeater_type($repeater);\n \t$theme_repeater = (isset($_GET['theme_repeater'])) ? $_GET['theme_repeater'] : 'null';\n \t$canonical_url = (isset($_GET['canonical_url'])) ? $_GET['canonical_url'] : $_SERVER['HTTP_REFERER'];\n \t$queryType = (isset($_GET['query_type'])) ? $_GET['query_type'] : 'standard'; // Ajax Query Type\n \n // Users data array - from ajax-load-more.js\n $data = (isset($_GET['users'])) ? $_GET['users'] : '';\n if($data){\n $role = (isset($data['role'])) ? $data['role'] : '';\n $users_per_page = (isset($data['per_page'])) ? $data['per_page'] : 5;\n $order = (isset($data['order'])) ? $data['order'] : 5;\n $orderby = (isset($data['orderby'])) ? $data['orderby'] : 'login';\n $include = (isset($data['include'])) ? $data['include'] : false;\n $exclude = (isset($data['exclude'])) ? $data['exclude'] : false;\n }\n \n // Custom Fields\n \t$meta_key = (isset($_GET['meta_key'])) ? $_GET['meta_key'] : '';\n \t$meta_value = (isset($_GET['meta_value'])) ? $_GET['meta_value'] : '';\n \t$meta_compare = (isset($_GET['meta_compare'])) ? $_GET['meta_compare'] : '';\n \tif(empty($meta_compare))\n \t\t$meta_compare = 'IN'; \n \tif($meta_compare === 'lessthan') $meta_compare = '<'; // do_shortcode fix (shortcode was rendering as HTML)\n \tif($meta_compare === 'lessthanequalto') $meta_compare = '<='; // do_shortcode fix (shortcode was rendering as HTML)\n \t$meta_relation = (isset($_GET['meta_relation'])) ? $_GET['meta_relation'] : '';\n \tif(empty($meta_relation))\n \t\t$meta_relation = 'AND';\n \t$meta_type = (isset($_GET['meta_type'])) ? $_GET['meta_type'] : '';\n \tif(empty($meta_type))\n \t\t$meta_type = 'CHAR';\n \t\t\n \n // Cache Add-on\n $cache_id = (isset($_GET['cache_id'])) ? $_GET['cache_id'] : '';\n \n // Preload Add-on\n \t$preloaded = (isset($_GET['preloaded'])) ? $_GET['preloaded'] : false;\n \t$preloaded_amount = (isset($_GET['preloaded_amount'])) ? $_GET['preloaded_amount'] : '5';\n \tif(has_action('alm_preload_installed') && $preloaded === 'true'){\n \t\t$old_offset = $preloaded_amount;\n \t $offset = $offset + $preloaded_amount;\n \t $alm_loop_count = $old_offset;\n \t}else{\n \t$alm_loop_count = 0;\n \t}\n \n // SEO Add-on\n \t$seo_start_page = (isset($_GET['seo_start_page'])) ? $_GET['seo_start_page'] : 1;\n \n \n if(!empty($role)){ // Role Defined\n \n // Get decrypted role\n $role = alm_role_decrypt($role);\t \n \n // Get query type\n $role_query = ALMUsers::get_role_query_type($role);\n \n // Get user role array\t \n $role = ALMUsers::get_role_as_array($role, $role_query);\n \n // User Query Args\n $args = array(\n \t$role_query => $role,\n \t'number' \t=> $users_per_page,\n \t'order' \t\t=> $order,\n \t'orderby' \t=> $orderby,\n \t'offset' \t=> $offset + ($users_per_page*$page),\n );\n \n // Include\n if($include){\n $args['include'] = array($include);\n }\n \n // Exclude\n if($exclude){\n $args['exclude'] = array($exclude);\n }\n \n // Meta Query\n \t\tif(!empty($meta_key) && !empty($meta_value) || !empty($meta_key) && $meta_compare !== \"IN\"){\n \t\t\n \t\t// Parse multiple meta query \n $meta_query_total = count(explode(\":\", $meta_key)); // Total meta_query objects\n $meta_keys = explode(\":\", $meta_key); // convert to array\n $meta_value = explode(\":\", $meta_value); // convert to array\n $meta_compare = explode(\":\", $meta_compare); // convert to array\n $meta_type = explode(\":\", $meta_type); // convert to array\n \n \t\t\t// Loop Meta Query\n $args['meta_query'] = array(\n \t\t\t 'relation' => $meta_relation\n );\n \t\t\tfor($mq_i = 0; $mq_i < $meta_query_total; $mq_i++){\n \t\t\t\t$args['meta_query'][] = alm_get_meta_query($meta_keys[$mq_i], $meta_value[$mq_i], $meta_compare[$mq_i], $meta_type[$mq_i]);\n \t\t\t}\n \t\t}\n \t \n // Meta_key, used for ordering by meta value\n if(!empty($meta_key)){\n if (strpos($orderby, 'meta_value') !== false) { // Only order by meta_key, if $orderby is set to meta_value{_num}\n $meta_key_single = explode(\":\", $meta_key);\n $args['meta_key'] = $meta_key_single[0];\n }\n }\n\t \n\t \n\t /*\n \t\t\t *\talm_users_query_args_{id}\n \t\t\t *\n \t\t\t * ALM Users Filter Hook\n \t\t\t *\n \t\t\t * @return $args;\n \t\t\t */\n \t\t $args = apply_filters('alm_users_query_args_'.$id, $args, $post_id);\n \n \n \t\t// WP_User_Query\n $user_query = new WP_User_Query( $args ); \n \n if($queryType === 'totalposts') {\n \t \n \t $return = array(\n \t\t \t'totalposts' => (!empty($user_query->results)) ? $user_query->total_users : 0\n \t\t ); \n \t \n } else {\n \n \t $alm_page = $page;\n \t $alm_item = 0;\n \t $alm_current = 0;\n \t $alm_page_count = ($page == 0) ? 1 : $page + 1;\n \t\n \t\t\tif (!empty($user_query->results)) {\n \t\t\t\t\n \t\t\t\tob_start();\n \t\n \t\t\t\t$alm_post_count = count($user_query->results); // total for this query\n \t\t\t\t$alm_found_posts = $user_query->total_users; // total of entire query\n \t\n \t\t\t\tforeach ( $user_query->results as $user ) {\n \t\n \t\t\t\t\t$alm_item++;\n \t $alm_current++;\n \t $alm_item = ($alm_page_count * $users_per_page) - $users_per_page + $alm_loop_count; // Get current item\n \t\n \t\t\t\t\t// Repeater Template\n \t\t\t\t\tif($theme_repeater != 'null' && has_action('alm_get_theme_repeater')){ // Theme Repeater\n \t\t\t\t\t\tdo_action('alm_get_users_theme_repeater', $theme_repeater, $alm_found_posts, $alm_page, $alm_item, $alm_current, $user);\n \t\t\t\t\t}else{\n \t\t\t\t\t\tinclude(alm_get_current_repeater( $repeater, $type )); // Repeater\n \t\t\t\t\t}\n \t\t\t\t\t// End Repeater Template\n \t\n \t\t\t\t}\n \t\t\t\t$data = ob_get_clean();\n \t\n \t\n \t\t\t\t/*\n \t *\talm_cache_file\n \t *\n \t * Cache Add-on hook\n \t * If Cache is enabled, check the cache file\n \t *\n \t * @return null\n \t */\n \t if(!empty($cache_id) && has_action('alm_cache_installed')){\n \t apply_filters('alm_cache_file', $cache_id, $page, $seo_start_page, $data, $preloaded);\n \t }\n \t\n \t\t\t} else {\n \t\t\t\t$data = null;\n \t\t\t}\n \t\n \t\t\t/*\n \t\t\t *\talm_debug\n \t\t\t *\n \t\t\t * ALM Core Filter Hook\n \t\t\t *\n \t\t\t * @return $alm_query/false;\n \t\t\t */\n \t\t\t$debug = (apply_filters('alm_debug', false)) ? $alm_query : false;\n \t\t\t\n \t\t\t\n \t\t\t// Build return JSON\n \t\t\t$return = array(\n \t\t\t\t'html' => $data,\n \t\t\t\t'meta' => array(\n \t\t\t\t\t'postcount' => (isset($alm_post_count)) ? $alm_post_count : null,\n \t\t\t\t\t'totalposts' => (isset($alm_found_posts)) ? $alm_found_posts : null,\n \t\t\t\t\t'debug' \t\t => $debug\n \t\t\t\t)\n \t\t\t);\n \t\t}\n \t\n \t} else { // Role is empty\n \t\t\n \t\t// Build return JSON\n \t\t$return = array(\n \t\t\t'html' => null,\n \t\t\t'meta' => array(\n \t\t\t\t'postcount' => null,\n \t\t\t\t'totalposts' => null,\n \t\t\t\t'debug' \t\t => $debug\n \t\t\t)\n \t\t);\n \t\t\n \t}\n \n \twp_send_json($return);\n\n \t}", "title": "" }, { "docid": "fa1453c87e8363a7caf4e3527858c957", "score": "0.57144123", "text": "public function getUserLists();", "title": "" }, { "docid": "34a298eb524482cee0e07831eb02a254", "score": "0.5710191", "text": "function wpapi_pre_user_query( $user_search ) {\n global $wpdb;\n\n $vars = $user_search->query_vars;\n if ( !is_null( $vars['search'] ) ) {\n # For some reason, the search term is enclosed in asterisks.\n #Remove them \n $search = preg_replace('/^\\*/', '', $vars['search']);\n $search = preg_replace('/\\*$/', '', $search);\n \n # search in display name\n if( !empty( $search ) ){\n $user_search->query_where = substr(trim($user_search->query_where), 0, -1) . \" OR display_name LIKE '%\". $search . \"%')\";\n }\n # search in first name\n $user_search->query_from .= \" INNER JOIN {$wpdb->usermeta} m1 ON \" .\n \"{$wpdb->users}.ID=m1.user_id AND (m1.meta_key='first_name')\";\n \n # search in last name\n $user_search->query_from .= \" INNER JOIN {$wpdb->usermeta} m2 ON \" .\n \"{$wpdb->users}.ID=m2.user_id AND (m2.meta_key='last_name')\";\n \n # prepare new SQl statement\n $names_where = $wpdb->prepare(\"m1.meta_value LIKE '%s' OR m2.meta_value LIKE '%s'\", \"%{$search}%\", \"%$search%\");\n $user_search->query_where = str_replace('WHERE 1=1 AND (', \"WHERE 1=1 AND ({$names_where} OR \", $user_search->query_where);\n }\n return $user_search;\n}", "title": "" }, { "docid": "3658149cad5195ac08d51eb9cb81daa6", "score": "0.5702316", "text": "function bp_dtheme_ajax_messages_autocomplete_results() {\n\n\t// Include everyone in the autocomplete, or just friends?\n\tif ( bp_is_current_component( bp_get_messages_slug() ) )\n\t\t$autocomplete_all = buddypress()->messages->autocomplete_all;\n\n\t$pag_page = 1;\n\t$limit = (int) $_GET['limit'] ? $_GET['limit'] : apply_filters( 'bp_autocomplete_max_results', 10 );\n\n\t// Get the user ids based on the search terms\n\tif ( ! empty( $autocomplete_all ) ) {\n\t\t$users = BP_Core_User::search_users( $_GET['q'], $limit, $pag_page );\n\n\t\tif ( ! empty( $users['users'] ) ) {\n\t\t\t// Build an array with the correct format\n\t\t\t$user_ids = array();\n\t\t\tforeach( $users['users'] as $user ) {\n\t\t\t\tif ( $user->id != bp_loggedin_user_id() ) {\n\t\t\t\t\t$user_ids[] = $user->id;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$user_ids = apply_filters( 'bp_core_autocomplete_ids', $user_ids, $_GET['q'], $limit );\n\t\t}\n\n\t} else {\n\t\tif ( bp_is_active( 'friends' ) ) {\n\t\t\t$users = friends_search_friends( $_GET['q'], bp_loggedin_user_id(), $limit, 1 );\n\n\t\t\t// Keeping the bp_friends_autocomplete_list filter for backward compatibility\n\t\t\t$users = apply_filters( 'bp_friends_autocomplete_list', $users, $_GET['q'], $limit );\n\n\t\t\tif ( ! empty( $users['friends'] ) ) {\n\t\t\t\t$user_ids = apply_filters( 'bp_friends_autocomplete_ids', $users['friends'], $_GET['q'], $limit );\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( ! empty( $user_ids ) ) {\n\t\tforeach ( $user_ids as $user_id ) {\n\t\t\t$ud = get_userdata( $user_id );\n\t\t\tif ( ! $ud ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( bp_is_username_compatibility_mode() ) {\n\t\t\t\t// Sanitize for spaces\n\t\t\t\t$username = urlencode( $ud->user_login );\n\t\t\t} else {\n\t\t\t\t$username = $ud->user_nicename;\n\t\t\t}\n\n\t\t\t// Note that the final line break acts as a delimiter for the\n\t\t\t// autocomplete javascript and thus should not be removed\n\t\t\techo '<span id=\"link-' . esc_attr( $username ) . '\" href=\"' . bp_core_get_user_domain( $user_id ) . '\"></span>' . bp_core_fetch_avatar( array( 'item_id' => $user_id, 'type' => 'thumb', 'width' => 15, 'height' => 15, 'alt' => $ud->display_name ) ) . ' &nbsp;' . bp_core_get_user_displayname( $user_id ) . ' (' . esc_html( $username ) . ')' . \"\\n\";\n\t\t}\n\t}\n\n\texit;\n}", "title": "" }, { "docid": "ba90d8d2905f67fd716b749c04e45bde", "score": "0.5701652", "text": "public function individualUsersList(Request $request) {\n $filter = [];\n $search_keyword = $request->get('search_keyword');\n $kyc_status = $request->get('kyc_status');\n $user_source = $request->get('user_source');\n $profile_status = $request->get('profile_status');\n $filter['search_keyword'] = '';\n $filter['kyc_status'] = '';\n $filter['user_source'] = '';\n $filter['profile_status'] = '';\n\n if ($search_keyword != '' && $search_keyword != null) {\n $filter['search_keyword'] = $search_keyword;\n }\n\n if ($kyc_status != '' && $kyc_status != null) {\n $filter['kyc_status'] = $kyc_status;\n }\n\n\n if ($user_source != '' && $user_source != null) {\n $filter['user_source'] = $user_source;\n }\n\n if ($profile_status != '' && $profile_status != null) {\n $filter['profile_status'] = $profile_status;\n }\n\n $usersList = $this->userRepo->getAllUsersPaginate(1, $filter);\n /*echo \"<pre>\";\n print_r($usersList);die;*/\n return view('backend.users', ['usersList' => $usersList, 'filter' => $filter]);\n }", "title": "" }, { "docid": "3f6a98427e687262cadbe9e93cc4cd39", "score": "0.5685509", "text": "public function executeAutocomplete()\n {\n $c = new Criteria();\n\n if($this->getRequestParameter('hidden') == 'yes')\n $c->add(UserPeer::HIDDEN, true);\n else\n $c->add(UserPeer::HIDDEN, false);\n\n $c->add(UserPeer::USERNAME, $this->getRequestParameter('username').'%', Criteria::LIKE);\n $c->setLimit(25);\n\n //Send that list to the template\n $this->users = UserPeer::doSelect($c);\n }", "title": "" }, { "docid": "f4eaa4df5286b7320522dd5751c5e844", "score": "0.56651807", "text": "function _all_members_who_have_enabled_with_page_access($to_filter,$page,$only_if_enabled_on__notification_code,$only_if_enabled_on__category,$to_member_ids,$start,$max)\n\t{\n\t\tlist($_members,$possibly_has_more)=$to_filter;\n\t\t$members=array();\n\t\tforeach ($_members as $member=>$setting)\n\t\t{\n\t\t\tif (has_actual_page_access($member,$page))\n\t\t\t\t$members[$member]=$setting;\n\t\t}\n\t\treturn array($members,$possibly_has_more);\n\t}", "title": "" }, { "docid": "9b3bb9c23da1e0d2c32376c6953b0473", "score": "0.56602746", "text": "function getUsersAction() {\n\t\t\n\t\t$this->getInputManager()->setLookupGlobals(utilityInputManager::LOOKUPGLOBALS_GET);\t\n\t\t$data = $this->getInputManager()->doFilter();\n\t\tif ( strlen($data[\"term\"]) >= 2 ) {\n\t\t\t\n\t\t\tif ( preg_match(\"/@/\", $data[\"term\"]) ) {\n\t\t\t\t$oMofilmUserSearch = new mofilmUserSearch();\n\t\t\t\t$oMofilmUserSearch->setUser($this->getRequest()->getSession()->getUser());\n\t\t\t\t$oMofilmUserSearch->setUserEmailAddress($data[\"term\"]);\n\t\t\t\t$result = $oMofilmUserSearch->search();\t\t\n\t\t\t\t$json_arr = array();\n\t\t\t\tforeach ( $result as $oProfile ) {\n\t\t\t\t\tif( $oProfile->getFirstName() ) {\n\t\t\t\t\t\t$json_arr[] = array(\"label\" => $oProfile->getFullName(),\"value\" => $oProfile->getFullName(),\"key\" => $oProfile->getID());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//$json_arr[] = array(\"label\" => \"<b> Search by name,email addrress. <br />Enter the email address if you have not found the user <br /> we shall invite for you ! </b>\",\"value\" => \"none\");\n\t\t\t\t$list = json_encode($json_arr);\n\t\t\t\techo $list;\n\t\t\t\treturn;\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t} else {\n\t\t\t\t$oMofilmUserSearch = new mofilmUserSearch();\n\t\t\t\t$oMofilmUserSearch->setUser($this->getRequest()->getSession()->getUser());\n\t\t\t\t$oMofilmUserSearch->setSearchTextType(mofilmUserSearch::SEARCH_TEXT_EXACT);\n\t\t\t\t$oMofilmUserSearch->setWhereType(2);\n\t\t\t\t$oMofilmUserSearch->setKeywords($data[\"term\"]);\n $oMofilmUserSearch->setOrderBy(mofilmUserSearch::ORDERBY_FULLNAME);\n $oMofilmUserSearch->setOrderDirection(mofilmUserSearch::ORDER_ASC);\n\t\t\t\t$result = $oMofilmUserSearch->search();\t\t\n\t\t\t\t$json_arr = array();\n\t\t\t\tforeach ( $result as $oProfile ) {\n\t\t\t\t\tif( $oProfile->getFirstName() ) {\n\t\t\t\t\t\t$json_arr[] = array(\"label\" => $oProfile->getFullName(),\"value\" => $oProfile->getFullName(), \"key\" => $oProfile->getID());\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//$json_arr[] = array(\"label\" => \"<b> Search by name,email addrress. <br /> Enter the email addrress if you have not found the user <br /> we shall invite for you ! </b>\",\"value\" => \"none\");\n\t\t\t\t$list = json_encode($json_arr);\n\t\t\t\techo $list;\n\t\t\t\treturn;\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "399fba2c2e6cc494627f911c33b09603", "score": "0.56332034", "text": "public function userListing() {\n\t\t$searchText = $this->input->post ( 'searchText' );\n\t\t$this->data ['searchText'] = $searchText;\n\t\t$status = $this->input->post ( 'status' );\n\t\t$this->data ['status'] = $status;\n\t\t\n\t\t$count = $this->User_model->userListingCount ( $searchText, $status );\n\t\t$returns = $this->paginationCompress ( \"userListing/\", $count, 5 );\n\t\t\n\t\t$this->data ['userRecords'] = $this->User_model->userListing ( NULL, $searchText, $status, $returns [\"page\"], $returns [\"segment\"] )->result ();\n\t\t\n\t\tforeach ( $this->data ['userRecords'] as $k => $user ) {\n\t\t\t$this->data ['userRecords'] [$k]->groups = $this->User_model->get_users_groups ( $user->id )->result ();\n\t\t}\n\t\t\n\t\t// here is status search dropdown\n\t\t$this->data ['statuses'] = array (\n\t\t\t\t'-1' => 'Status all',\n\t\t\t\t'1' => 'Active',\n\t\t\t\t'0' => 'Inactive' \n\t\t);\n\t\t// end of status search dropdown\n\t\t\n\t\t$this->render ( 'admin/users', $this->data );\n\t}", "title": "" }, { "docid": "2be1e6138fcb54b60a34b927d6715ed0", "score": "0.56301236", "text": "function kjgrc_get_users_of_blog( $id = '' ) {\r\n global $wpdb, $blog_id;\r\n if ( empty($id) )\r\n $id = (int) $blog_id;\r\n $users = $wpdb->get_results( \"SELECT user_id, user_login, display_name, user_email, meta_value FROM $wpdb->users, $wpdb->usermeta WHERE \" . $wpdb->users . \r\n\".ID = \" . $wpdb->usermeta . \".user_id AND meta_key = '\" . $wpdb->prefix . \"capabilities' ORDER BY {$wpdb->usermeta}.user_id\" );\r\n return $users;\r\n}", "title": "" }, { "docid": "2b26671f81b5fd4d148692be209fb26e", "score": "0.5618609", "text": "function get_users_of_post_type($post_type) {\n global $wpdb;\n\n switch ($post_type) {\n\n case 'property':\n $results = $wpdb->get_results($wpdb->prepare(\"\n SELECT DISTINCT u.ID, u.display_name\n FROM {$wpdb->posts} AS p\n JOIN {$wpdb->users} AS u ON u.ID = p.post_author\n WHERE p.post_type = '%s'\n AND p.post_status != 'auto-draft'\n \", $post_type), ARRAY_N);\n break;\n\n default: break;\n }\n\n if (empty($results)) {\n return false;\n }\n\n $users = array();\n foreach ($results as $result) {\n $users[$result[0]] = $result[1];\n }\n\n $users = apply_filters('wpp_get_users_of_post_type', $users, $post_type);\n\n return $users;\n }", "title": "" }, { "docid": "8d71d24b9a4b77d96e488600fea956fb", "score": "0.55986214", "text": "function auiu_list_users() {\n global $wpdb;\n $users = $wpdb->get_results( \"SELECT ID, user_login from $wpdb->users\" );\n $list = array();\n if ( $users ) {\n foreach ($users as $user) {\n $list[$user->ID] = $user->user_login;\n }\n }\n return $list;\n}", "title": "" }, { "docid": "ff6211848fab6e854e0f30bec45f915b", "score": "0.55768883", "text": "function get_job_hired_users($jobid){\n$hireduser = $GLOBALS['wpdb']->get_results( 'SELECT * FROM wp_userjobs WHERE job_id = \"'.$jobid.'\" AND status = \"hired\"', ARRAY_A );\nif($hireduser){\n $users = array();\n foreach ($hireduser as $hide){\n\n $user_info = get_userdata($hide['user_id']);\n $user_name = '<a href=\"'.get_site_url().'/profile/'.$hide['user_id'].'\">'.$user_info->first_name.' '.$user_info->last_name.'</a>';\n $users[] = $user_name;\n }\n\n return implode(\",\", $users); \n}\n\n}", "title": "" }, { "docid": "ada873a0e031ecffef0ae3f0b7770783", "score": "0.5572977", "text": "public function get_pending_users($flag=1, $upper=null, $perpage=null)\n\t{\n\t\t$this->load->model('Model_userprofile');\n\t\t$query = $this->db->query(\"SELECT `login_name`,`user_id` FROM `user_main` WHERE `admin_status` = 0\");\n\t\t$users = $query->result();\n\n\t\tforeach ($users as $key => $user) {\n\t\t\t$email = $this->Model_userprofile->get_user_email($user->user_id);\n\t\t\t$personal_details = $this->Model_userprofile->get_personal_details($user->user_id);\n\n\t\t\t// Get branch\n\t\t\t//TODO: 6398 is the time when we changed to the new website, NEED TO FIX THIS. IN OLDER DATABSE BRANCH IS STORED INSTEAD OF BRANCH CODE. \n\t\t\tif ($user->user_id > 6398) {\n\t\t\t\t$branch = $this->Model_userprofile->get_user_branch(@$personal_details[0]->branch_ug);\n\t\t\t\t$branch = @$branch[0]->Branch;\n\t\t\t}else{\n\t\t\t\t$branch = @$personal_details[0]->branch_ug;\t\t\t\t\t\n\t\t\t}\n\n\t\t\t// get passing year\n\t\t\t$users[$key]->passing_year = @$personal_details[0]->ug_passing_year;\n\t\t\t$users[$key]->name = @$personal_details[0]->name;\n\t\t\t$users[$key]->email_verification_status = @$personal_details[0]->email_verification_status;\n\t\t\t$users[$key]->email = $email ;\n\t\t\t$users[$key]->branch = $branch ;\n\t\t}\n\t\t// foreach ($users as $user) {\n\t\t// \techo \"<pre>\";\n\t\t// \tvar_dump($user);\n\t\t// \techo \"</pre>\";\n\t\t// }\n\t\t// die();\n\t\treturn $users;\n\t\t\n\t}", "title": "" }, { "docid": "761ebf5c4b12da8683b5919dc38caaa3", "score": "0.55706894", "text": "function openlab_group_contact_autocomplete_cb() {\n\tglobal $wpdb;\n\n\t$nonce = $term = '';\n\n\tif ( isset( $_GET['nonce'] ) ) {\n\t\t$nonce = urldecode( $_GET['nonce'] );\n\t}\n\n\tif ( ! wp_verify_nonce( $nonce, 'openlab_group_contact_autocomplete' ) ) {\n\t\tdie( json_encode( -1 ) );\n\t}\n\n\t$group_id = isset( $_GET['group_id'] ) ? (int) $_GET['group_id'] : 0;\n\tif ( ! $group_id ) {\n\t\tdie( json_encode( -1 ) );\n\t}\n\n\tif ( isset( $_GET['term'] ) ) {\n\t\t$term = urldecode( $_GET['term'] );\n\t}\n\n\t$q = new BP_Group_Member_Query( array(\n\t\t'group_id' => $group_id,\n\t\t'search_terms' => $term,\n\t\t'type' => 'alphabetical',\n\t\t'group_role' => array( 'member', 'mod', 'admin' ),\n\t) );\n\n\t$retval = array();\n\tforeach ( $q->results as $u ) {\n\t\t$retval[] = array(\n\t\t\t'label' => sprintf( '%s (%s)', esc_html( $u->fullname ), esc_html( $u->user_nicename ) ),\n\t\t\t'value' => esc_attr( $u->user_nicename ),\n\t\t);\n\t}\n\n\techo json_encode( $retval );\n\tdie();\n}", "title": "" }, { "docid": "15e222314c320927b9ab349f398bf0aa", "score": "0.55597705", "text": "function searchForUser(){\n\n $logged_in_userid = Auth::instance()->get_user()->id;\n $user_role = Session::instance()->get('user_role_id');\n\n $prospects_list = $this->select('prospects.*','country.country_name');\n\n if($user_role==1)\n $prospects_list= $prospects_list->and_where('prospects.user_id', '=', $logged_in_userid);\n\n // filter name search start\n if($_POST['filter_name']!=''){\n $prospects_list = $prospects_list->and_where_open();\n $prospects_list= $prospects_list->and_where('prospects.first_name', 'like', '%'.trim($_POST['filter_name']).'%');\n $prospects_list= $prospects_list->or_where('prospects.last_name', 'like', '%'.trim($_POST['filter_name']).'%');\n $prospects_list = $prospects_list->and_where_close();\n }\n // filter name search end\n\n // filter email search start\n if($_POST['filter_email']!='')\n $prospects_list= $prospects_list->where('prospects.email', 'like', '%'.trim($_POST['filter_email']).'%');\n // filter email search end\n\n // filter phone search start\n if($_POST['filter_phone']!='')\n $prospects_list= $prospects_list->where('prospects.phone', 'like', '%'.trim($_POST['filter_phone']).'%');\n // filter phone search end\n\n // filter location search start\n if($_POST['filter_location']!='')\n $prospects_list= $prospects_list->where('prospects.country_name', 'like', '%'.$_POST['filter_location'].'%');\n // filter location search end\n\n // filter binary search start\n if($_POST['filter_binary']!='')\n $prospects_list= $prospects_list->where('prospects.binary_side', '=', $_POST['filter_binary']);\n // filter binary search end\n\n\n $filterMemberType = $_POST['filter_member_type'];\n // filter member type search start\n switch($filterMemberType){\n case 'Pre-Enrollee':\n //$prospects_list = $prospects_list->join('users','left');\n $prospects_list = $prospects_list->join('users');\n $prospects_list = $prospects_list->on('prospects.id', '=', 'users.prospect_id');\n if($user_role==1)\n $prospects_list = $prospects_list->where('users.prospect_id','=',$logged_in_userid);\n else\n $prospects_list = $prospects_list->where('users.prospect_id','is',NULL);\n\n break;\n\n case 'Single-Returnee':\n $prospects_list = $prospects_list->join('users','right');\n $prospects_list = $prospects_list->on('prospects.id', '=', 'users.prospect_id');\n $prospects_list = $prospects_list->join('visits');\n $prospects_list = $prospects_list->on('visits.prospect_id', '=', 'prospects.id');\n $prospects_list = $prospects_list->where('visits.total_visit','!=', 0);\n $prospects_list = $prospects_list->group_by('visits.prospect_id');\n $prospects_list = $prospects_list->having(DB::expr('count(total_visit)'),'=',1);\n //$prospects_list = $prospects_list->order_by('visits.id');\n break;\n\n case 'Multiple-Returnee':\n $prospects_list = $prospects_list->join('users','right');\n $prospects_list = $prospects_list->on('prospects.id', '=', 'users.prospect_id');\n $prospects_list = $prospects_list->join('visits');\n $prospects_list = $prospects_list->on('visits.prospect_id', '=', 'prospects.id');\n $prospects_list = $prospects_list->where('visits.total_visit','!=', 0);\n $prospects_list = $prospects_list->group_by('visits.prospect_id');\n $prospects_list = $prospects_list->having(DB::expr('count(total_visit)'),'>',1);\n //$prospects_list = $prospects_list->order_by('visits.id');\n break;\n\n case 'Money Coming':\n // get date of money coming starts\n $today = strtolower(date('D'));\n switch ($today){\n case('sun'): $days = \"-3 days\";break;\n case('mon'): $days = \"-4 days\";break;\n case('tue'): $days = \"-5 days\";break;\n case('wed'): $days = \"-6 days\";break;\n case('thurs'): $days = \"-0 days\";break;\n case('fri'): $days = \"-1 days\";break;\n case('sat'): $days = \"-2 days\";break;\n }\n $moneyComingDate = date('Y-m-d 00:00:00', strtotime($days));\n // get date of money coming ends\n\n $prospects_list = $prospects_list->join('users','right');\n $prospects_list = $prospects_list->on('prospects.id', '=', 'users.prospect_id');\n $prospects_list = $prospects_list->where('users.parent_id','!=','\"\"');\n $prospects_list = $prospects_list->where('users.parent_id','is not',NULL);\n $prospects_list = $prospects_list->where('users.created_date','>',$moneyComingDate);\n //$prospects_list = $prospects_list->order_by('users.id');\n break;\n\n case 'New Member':\n $prospects_list = $prospects_list->join('users','right');\n $prospects_list = $prospects_list->on('prospects.id', '=', 'users.prospect_id');\n $prospects_list = $prospects_list->where('users.created_date','>=', DB::expr(\"DATE_SUB(CURDATE( ) , INTERVAL 7 DAY )\"));\n $prospects_list = $prospects_list->where('users.created_date','<=', DB::expr('CURDATE( )'));\n //$prospects_list = $prospects_list->order_by('users.id');\n break;\n\n case 'All Members':\n $prospects_list = $prospects_list->join('users','right');\n $prospects_list = $prospects_list->on('prospects.id', '=', 'users.prospect_id');\n //$prospects_list = $prospects_list->order_by('users.id');\n break;\n\n case 'Sponsors':\n break;\n case 'Enroller':\n $prospects_list = $prospects_list->join('users','right');\n $prospects_list = $prospects_list->on('prospects.id', '=', 'users.prospect_id');\n\n $prospects_list = $prospects_list->join(DB::expr('users as u'));\n $prospects_list = $prospects_list->on('users.id', '=', 'u.parent_id');\n //$prospects_list = $prospects_list->order_by('users.id');\n break;\n }\n // filter member type search end\n\n // filter whos status search start\n if($_POST['filter_status'] != \"\" && $_POST['status_operator'] == 'not'){\n $prospects_list = $prospects_list->where('prospects.status_id','not in',DB::expr('('.$_POST['filter_status'].')'));\n $prospects_list = $prospects_list->where('prospects.status_id','is not',NULL);\n }\n if($_POST['filter_status'] != \"\" && $_POST['status_operator'] == 'is'){\n $prospects_list = $prospects_list->where('prospects.status_id','in',DB::expr('('.$_POST['filter_status'].')'));\n }\n // filter whos status search end\n\n // check if lead type exists starts\n if($_POST['filter_lead_type'] !=\"\" ){\n $prospects_list = $prospects_list->where('prospects.lead_type_id','in',DB::expr('('.$_POST['filter_lead_type'].')'));\n }\n // check if lead type exists ends\n\n $prospects_list = $prospects_list->join('country','left');\n $prospects_list = $prospects_list->on('prospects.country_id', '=', 'country.country_id');\n\n $prospects_list = $prospects_list->join('prospect_address','left');\n $prospects_list = $prospects_list->on('prospects.prospect_address_id','=','prospect_address.id');\n\n // filter zip search start\n if($_POST['filter_zip']!=''){\n $prospects_list = $prospects_list->where('prospect_address.postalcode', '=', $_POST['filter_zip']);\n }\n // filter zip search end\n\n // filter state search start\n if($_POST['filter_state']!=''){\n $prospects_list = $prospects_list->where('prospect_address.statecode', '=', $_POST['filter_state']);\n }\n // filter state search end\n\n // filter pre enrollee date search start\n if($_POST['from']!='')\n $prospects_list= $prospects_list->where('created_date', '>=', ''.date('Y-m-d',strtotime($_POST['from'])).'');\n\n if($_POST['to']!='')\n $prospects_list= $prospects_list->where('created_date', '<=', ''.date('Y-m-d',strtotime($_POST['to'])).'');\n // filter pre enrollee date search end\n\n // search contact start\n if($_POST['filter_contacted_from']!='' || $_POST['filter_contacted_to']!=''){\n $prospects_list = $prospects_list->join('campaigns','right');\n $prospects_list = $prospects_list->on('prospects.id', '=', 'campaigns.prospect_id');\n }\n\n if($_POST['filter_contacted_from']!='')\n $prospects_list = $prospects_list->where('prospects.created_date', '>=', ''.date('Y-m-d',strtotime($_POST['filter_contacted_from'])).'');\n if($_POST['filter_contacted_to']!='')\n $prospects_list = $prospects_list->where('prospects.created_date', '<=', ''.date('Y-m-d',strtotime($_POST['filter_contacted_to'])).'');\n // search contact end\n\n // search visitors start\n if($_POST['filter_date_visited_from']!='' || $_POST['filter_date_visited_to']!=''){\n $prospects_list = $prospects_list->join('visits','right');\n $prospects_list = $prospects_list->on('prospects.id', '=', 'visits.prospect_id');\n }\n\n if($_POST['filter_date_visited_from']!='')\n $prospects_list = $prospects_list->where('visits.visit_date', '>=', ''.date('Y-m-d',strtotime($_POST['filter_date_visited_from'])).'');\n if($_POST['filter_date_visited_to']!='')\n $prospects_list = $prospects_list->where('visits.visit_date', '<=', ''.date('Y-m-d',strtotime($_POST['filter_date_visited_to'])).'');\n // search visitors end\n\n // search date convert to member start\n if(($_POST['filter_date_convert_member_from'] != '' || $_POST['filter_date_convert_member_to'] != '') && $filterMemberType == \"\"){\n $prospects_list = $prospects_list->join('users','right');\n $prospects_list = $prospects_list->on('prospects.id', '=', 'users.prospect_id');\n }\n\n if($_POST['filter_date_convert_member_from']!='')\n $prospects_list = $prospects_list->where('users.created_date', '>=', ''.date('Y-m-d',strtotime($_POST['filter_date_convert_member_from'])).'');\n if($_POST['filter_date_convert_member_to']!='')\n $prospects_list = $prospects_list->where('users.created_date', '<=', ''.date('Y-m-d',strtotime($_POST['filter_date_convert_member_to'])).'');\n // search date convert to member end\n\n // order by start\n switch($filterMemberType){\n case 'Pre-Enrollee':\n $prospects_list = $prospects_list->order_by('prospects.id');\n break;\n\n case 'Single-Returnee':\n case 'Multiple-Returnee':\n $prospects_list = $prospects_list->order_by('visits.id');\n break;\n\n case 'Money Coming':\n case 'New Member':\n case 'All Members':\n case 'Sponsors':\n case 'Enroller':\n $prospects_list = $prospects_list->group_by('prospects.id');\n $prospects_list = $prospects_list->order_by('users.id');\n break;\n }\n // order by end\n\n $prospects_list = $prospects_list->find_all();\n $prospects_list = $prospects_list->as_array();\n\n return $prospects_list;\n }", "title": "" }, { "docid": "93ad05f630a8ebef99d3f0afa8796b01", "score": "0.55579346", "text": "public function test_get_relevant_users() {\n // Set up two users to search for and one to do the searching.\n $generator = $this->getDataGenerator();\n $student1 = $generator->create_user(['firstname' => 'Amelia', 'lastname' => 'Aardvark']);\n $student2 = $generator->create_user(['firstname' => 'Amelia', 'lastname' => 'Beetle']);\n $student3 = $generator->create_user(['firstname' => 'Zebedee', 'lastname' => 'Boing']);\n $course = $generator->create_course();\n $generator->enrol_user($student1->id, $course->id, 'student');\n $generator->enrol_user($student2->id, $course->id, 'student');\n $generator->enrol_user($student3->id, $course->id, 'student');\n\n // As student 3, search for the other two.\n $this->setUser($student3);\n $result = external::get_relevant_users('Amelia', 0);\n $this->assertCount(2, $result);\n\n // Check that the result contains all the expected fields.\n $this->assertEquals($student1->id, $result[0]->id);\n $this->assertEquals('Amelia Aardvark', $result[0]->fullname);\n $this->assertContains('/u/f2', $result[0]->profileimageurlsmall);\n\n // Check we aren't leaking information about user email address (for instance).\n $this->assertObjectNotHasAttribute('email', $result[0]);\n\n // Note: We are not checking search permissions, search by different fields, etc. as these\n // are covered by the core_user::search unit test.\n }", "title": "" }, { "docid": "3364c5882d7734c57267408d37951884", "score": "0.5551149", "text": "function filter_load() {\n\t\tadd_action( current_filter(), array( $this, 'setup_vars' ), 20 );\n\t\tadd_action( 'restrict_manage_posts', array( $this, 'get_select' ) );\n\t\tadd_filter( \"manage_taxonomies_for_{$this->post_type}_columns\", array( $this, 'add_columns' ) );\n\t}", "title": "" }, { "docid": "657fb4cdd8c586e258b425bf0751d302", "score": "0.5541858", "text": "function isymphony_modify_user_list() {\n\tglobal $db;\t\n\t$query = \"SELECT * FROM isymphony_users\";\n\t$results = $db->getAll($query, array(), DB_FETCHMODE_ASSOC);\n\tif((DB::IsError($results)) || (empty($results))) {\n\t\treturn array();\n\t} else {\n\t\treturn $results;\n\t}\n}", "title": "" }, { "docid": "425ee8391ca19bf4c4f8875c969ee3f2", "score": "0.5540622", "text": "function register_filters() {\n\t\t\t// ie. add_filter($this->slug.\"/get_feeds\", array($this,\"import_user_feed\"), 1,2);\n\t\t\tadd_filter($this->slug.\"/get_pages\", array($this,\"get_pages\"), 1,2);\n\t\t}", "title": "" }, { "docid": "8c596f567094a9d651c6fd68957f3a7b", "score": "0.55376136", "text": "function pdcertificate_get_users_by_capability(context $context, $capability, $fields = '', $sort = '', $limitfrom = '', $limitnum = '',\n $groups = '', $filters = '', $doanything_ignored = null, $view_ignored = null, $useviewallgroups = false) {\n global $CFG, $DB;\n\n $defaultuserroleid = isset($CFG->defaultuserroleid) ? $CFG->defaultuserroleid : 0;\n $defaultfrontpageroleid = isset($CFG->defaultfrontpageroleid) ? $CFG->defaultfrontpageroleid : 0;\n\n $ctxids = trim($context->path, '/');\n $ctxids = str_replace('/', ',', $ctxids);\n\n // Context is the frontpage\n $iscoursepage = false; // coursepage other than fp\n $isfrontpage = false;\n if ($context->contextlevel == CONTEXT_COURSE) {\n if ($context->instanceid == SITEID) {\n $isfrontpage = true;\n } else {\n $iscoursepage = true;\n }\n }\n $isfrontpage = ($isfrontpage || is_inside_frontpage($context));\n\n $caps = (array)$capability;\n\n // construct list of context paths bottom-->top\n list($contextids, $paths) = get_context_info_list($context);\n\n // we need to find out all roles that have these capabilities either in definition or in overrides\n $defs = array();\n list($incontexts, $params) = $DB->get_in_or_equal($contextids, SQL_PARAMS_NAMED, 'con');\n list($incaps, $params2) = $DB->get_in_or_equal($caps, SQL_PARAMS_NAMED, 'cap');\n $params = array_merge($params, $params2);\n $sql = \"SELECT rc.id, rc.roleid, rc.permission, rc.capability, ctx.path\n FROM {role_capabilities} rc\n JOIN {context} ctx on rc.contextid = ctx.id\n WHERE rc.contextid $incontexts AND rc.capability $incaps\";\n\n $rcs = $DB->get_records_sql($sql, $params);\n foreach ($rcs as $rc) {\n $defs[$rc->capability][$rc->path][$rc->roleid] = $rc->permission;\n }\n\n // go through the permissions bottom-->top direction to evaluate the current permission,\n // first one wins (prohibit is an exception that always wins)\n $access = array();\n foreach ($caps as $cap) {\n foreach ($paths as $path) {\n if (empty($defs[$cap][$path])) {\n continue;\n }\n foreach($defs[$cap][$path] as $roleid => $perm) {\n if ($perm == CAP_PROHIBIT) {\n $access[$cap][$roleid] = CAP_PROHIBIT;\n continue;\n }\n if (!isset($access[$cap][$roleid])) {\n $access[$cap][$roleid] = (int)$perm;\n }\n }\n }\n }\n\n // make lists of roles that are needed and prohibited in this context\n $needed = array(); // one of these is enough\n $prohibited = array(); // must not have any of these\n foreach ($caps as $cap) {\n if (empty($access[$cap])) {\n continue;\n }\n foreach ($access[$cap] as $roleid => $perm) {\n if ($perm == CAP_PROHIBIT) {\n unset($needed[$cap][$roleid]);\n $prohibited[$cap][$roleid] = true;\n } else if ($perm == CAP_ALLOW and empty($prohibited[$cap][$roleid])) {\n $needed[$cap][$roleid] = true;\n }\n }\n if (empty($needed[$cap]) or !empty($prohibited[$cap][$defaultuserroleid])) {\n // easy, nobody has the permission\n unset($needed[$cap]);\n unset($prohibited[$cap]);\n } else if ($isfrontpage and !empty($prohibited[$cap][$defaultfrontpageroleid])) {\n // everybody is disqualified on the frontpage\n unset($needed[$cap]);\n unset($prohibited[$cap]);\n }\n if (empty($prohibited[$cap])) {\n unset($prohibited[$cap]);\n }\n }\n\n if (empty($needed)) {\n // there can not be anybody if no roles match this request\n return array();\n }\n\n if (empty($prohibited)) {\n // we can compact the needed roles\n $n = array();\n foreach ($needed as $cap) {\n foreach ($cap as $roleid=>$unused) {\n $n[$roleid] = true;\n }\n }\n $needed = array('any'=>$n);\n unset($n);\n }\n\n // ***** Set up default fields ******\n if (empty($fields)) {\n if ($iscoursepage) {\n $fields = 'u.*, ul.timeaccess AS lastaccess';\n } else {\n $fields = 'u.*';\n }\n } else {\n if ($CFG->debugdeveloper && strpos($fields, 'u.*') === false && strpos($fields, 'u.id') === false) {\n debugging('u.id must be included in the list of fields passed to get_users_by_capability().', DEBUG_DEVELOPER);\n }\n }\n\n // Set up default sort\n if (empty($sort)) { // default to course lastaccess or just lastaccess\n if ($iscoursepage) {\n $sort = 'ul.timeaccess';\n } else {\n $sort = 'u.lastaccess';\n }\n }\n\n // Prepare query clauses\n $wherecond = array();\n $params = array();\n $joins = array();\n\n // User lastaccess JOIN\n if ((strpos($sort, 'ul.timeaccess') === false) and (strpos($fields, 'ul.timeaccess') === false)) {\n // user_lastaccess is not required MDL-13810\n } else {\n if ($iscoursepage) {\n $joins[] = \"LEFT OUTER JOIN {user_lastaccess} ul ON (ul.userid = u.id AND ul.courseid = {$context->instanceid})\";\n } else {\n throw new coding_exception('Invalid sort in get_users_by_capability(), ul.timeaccess allowed only for course contexts.');\n }\n }\n\n // We never return deleted users or guest account.\n $wherecond[] = \"u.deleted = 0 AND u.id <> :guestid\";\n $params['guestid'] = $CFG->siteguest;\n\n // Groups\n if ($groups) {\n $groups = (array)$groups;\n list($grouptest, $grpparams) = $DB->get_in_or_equal($groups, SQL_PARAMS_NAMED, 'grp');\n $grouptest = \"u.id IN (SELECT userid FROM {groups_members} gm WHERE gm.groupid $grouptest)\";\n $params = array_merge($params, $grpparams);\n\n if ($useviewallgroups) {\n $viewallgroupsusers = get_users_by_capability($context, 'moodle/site:accessallgroups', 'u.id, u.id', '', '', '', '', $exceptions);\n if (!empty($viewallgroupsusers)) {\n $wherecond[] = \"($grouptest OR u.id IN (\" . implode(',', array_keys($viewallgroupsusers)) . '))';\n } else {\n $wherecond[] = \"($grouptest)\";\n }\n } else {\n $wherecond[] = \"($grouptest)\";\n }\n }\n\n // User filters\n if (!empty($filters)) {\n\n $filterfirstname = @$filters[0];\n $filterlastname = @$filters[1];\n if (!empty($filterfirstname)) {\n $wherecond[] = \"u.firstname LIKE :firstname \\n\";\n $extparams = array('firstname' => $filterfirstname.'%');\n $params = array_merge($params, $extparams);\n }\n\n if (!empty($filterlastname)) {\n $wherecond[] = \"u.lastname LIKE :lastname \\n\";\n $extparams = array('lastname' => $filterlastname.'%');\n $params = array_merge($params, $extparams);\n }\n }\n\n // now add the needed and prohibited roles conditions as joins\n if (!empty($needed['any'])) {\n // simple case - there are no prohibits involved\n if (!empty($needed['any'][$defaultuserroleid]) or ($isfrontpage and !empty($needed['any'][$defaultfrontpageroleid]))) {\n // everybody\n } else {\n $joins[] = \"JOIN (SELECT DISTINCT userid\n FROM {role_assignments}\n WHERE contextid IN ($ctxids)\n AND roleid IN (\".implode(',', array_keys($needed['any'])) .\")\n ) ra ON ra.userid = u.id\";\n }\n } else {\n $unions = array();\n $everybody = false;\n foreach ($needed as $cap=>$unused) {\n if (empty($prohibited[$cap])) {\n if (!empty($needed[$cap][$defaultuserroleid]) or ($isfrontpage and !empty($needed[$cap][$defaultfrontpageroleid]))) {\n $everybody = true;\n break;\n } else {\n $unions[] = \"SELECT userid\n FROM {role_assignments}\n WHERE contextid IN ($ctxids)\n AND roleid IN (\".implode(',', array_keys($needed[$cap])) .\")\";\n }\n } else {\n if (!empty($prohibited[$cap][$defaultuserroleid]) or ($isfrontpage and !empty($prohibited[$cap][$defaultfrontpageroleid]))) {\n // nobody can have this cap because it is prevented in default roles\n continue;\n\n } else if (!empty($needed[$cap][$defaultuserroleid]) or ($isfrontpage and !empty($needed[$cap][$defaultfrontpageroleid]))) {\n // everybody except the prohibitted - hiding does not matter\n $unions[] = \"SELECT id AS userid\n FROM {user}\n WHERE id NOT IN (SELECT userid\n FROM {role_assignments}\n WHERE contextid IN ($ctxids)\n AND roleid IN (\".implode(',', array_keys($prohibited[$cap])) .\"))\";\n\n } else {\n $unions[] = \"SELECT userid\n FROM {role_assignments}\n WHERE contextid IN ($ctxids) AND roleid IN (\".implode(',', array_keys($needed[$cap])) .\")\n AND userid NOT IN (\n SELECT userid\n FROM {role_assignments}\n WHERE contextid IN ($ctxids)\n AND roleid IN (\" . implode(',', array_keys($prohibited[$cap])) . \")\n )\";\n }\n }\n }\n if (!$everybody) {\n if ($unions) {\n $joins[] = \"JOIN (SELECT DISTINCT userid FROM ( \".implode(' UNION ', $unions).\" ) us) ra ON ra.userid = u.id\";\n } else {\n // only prohibits found - nobody can be matched\n $wherecond[] = \"1 = 2\";\n }\n }\n }\n\n // Collect WHERE conditions and needed joins\n $where = implode(' AND ', $wherecond);\n if ($where !== '') {\n $where = 'WHERE ' . $where;\n }\n $joins = implode(\"\\n\", $joins);\n\n // Ok, let's get the users!\n $sql = \"SELECT $fields\n FROM {user} u\n $joins\n $where\n ORDER BY $sort\";\n\n return $DB->get_records_sql($sql, $params, $limitfrom, $limitnum);\n}", "title": "" }, { "docid": "346574b6db988f7a4cf05130407ea312", "score": "0.5536409", "text": "public function getUsers();", "title": "" }, { "docid": "346574b6db988f7a4cf05130407ea312", "score": "0.5536409", "text": "public function getUsers();", "title": "" }, { "docid": "91693f2f94e6c2a4e8f29337cdc2c8b3", "score": "0.55267614", "text": "function getUsers($Field = '', $Where = array(), $multiRecords = FALSE, $PageNo = 1, $PageSize = 15) {\r\n /* Additional fields to select */\r\n $Params = array();\r\n if (!empty($Field)) {\r\n $Params = array_map('trim', explode(',', $Field));\r\n $Field = '';\r\n $FieldArray = array(\r\n 'RegisteredOn' => 'DATE_FORMAT(E.EntryDate, \"' . DATE_FORMAT . '\") RegisteredOn',\r\n 'LastLoginDate' => 'DATE_FORMAT(UL.LastLoginDate, \"' . DATE_FORMAT . '\") LastLoginDate',\r\n 'Rating' => 'E.Rating',\r\n 'UserTypeName' => 'UT.UserTypeName',\r\n 'IsAdmin' => 'UT.IsAdmin',\r\n 'UserID' => 'U.UserID',\r\n 'UserTypeID' => 'U.UserTypeID',\r\n 'FirstName' => 'U.FirstName',\r\n 'MiddleName' => 'U.MiddleName',\r\n 'LastName' => 'U.LastName',\r\n 'ProfilePic' => 'IF(U.ProfilePic IS NULL,CONCAT(\"' . BASE_URL . '\",\"uploads/profile/picture/\",\"default.jpg\"),CONCAT(\"' . BASE_URL . '\",\"uploads/profile/picture/\",U.ProfilePic)) AS ProfilePic',\r\n 'ProfileCoverPic' => 'IF(U.ProfilePic IS NULL,CONCAT(\"' . BASE_URL . '\",\"uploads/profile/cover/\",\"default.jpg\"),CONCAT(\"' . BASE_URL . '\",\"uploads/profile/picture/\",U.ProfileCoverPic)) AS ProfileCoverPic',\r\n 'About' => 'U.About',\r\n 'About1' => 'U.About1',\r\n 'About2' => 'U.About2',\r\n 'Email' => 'U.Email',\r\n 'EmailForChange' => 'U.EmailForChange',\r\n 'Username' => 'U.Username',\r\n 'Gender' => 'U.Gender',\r\n 'BirthDate' => 'U.BirthDate',\r\n 'Address' => 'U.Address',\r\n 'Address1' => 'U.Address1',\r\n 'RoutingCode' => 'U.RoutingCode',\r\n 'IBAN' => 'U.IBAN',\r\n 'SwiftCode' => 'U.SwiftCode',\r\n 'Postal' => 'U.Postal',\r\n 'CountryCode' => 'U.CountryCode',\r\n 'CountryName' => 'CO.CountryName',\r\n 'CityName' => 'U.CityName',\r\n 'StateName' => 'U.StateName',\r\n 'PhoneCode' => 'U.PhoneCode',\r\n 'PhoneNumber' => 'U.PhoneNumber',\r\n 'Email' => 'U.Email',\r\n 'PhoneNumberForChange' => 'U.PhoneNumberForChange',\r\n 'Website' => 'U.Website',\r\n 'FacebookURL' => 'U.FacebookURL',\r\n 'TwitterURL' => 'U.TwitterURL',\r\n 'GoogleURL' => 'U.GoogleURL',\r\n 'InstagramURL' => 'U.InstagramURL',\r\n 'LinkedInURL' => 'U.LinkedInURL',\r\n 'WhatsApp' => 'U.WhatsApp',\r\n 'WalletAmount' => 'U.WalletAmount',\r\n 'WinningAmount' => 'U.WinningAmount',\r\n 'isWithdrawal' => 'U.isWithdrawal',\r\n 'CashBonus' => 'U.CashBonus',\r\n 'TotalCash' => '(U.WalletAmount + U.WinningAmount + U.CashBonus) AS TotalCash',\r\n 'ReferralCode' => '(SELECT ReferralCode FROM tbl_referral_codes WHERE tbl_referral_codes.UserID=U.UserID LIMIT 1) AS ReferralCode',\r\n 'ReferredByUserID' => 'U.ReferredByUserID',\r\n 'ModifiedDate' => 'E.ModifiedDate',\r\n 'Status' => 'CASE E.StatusID\r\n\t\t\t\t\t\t\t\t\t\t\t\twhen \"1\" then \"Pending\"\r\n\t\t\t\t\t\t\t\t\t\t\t\twhen \"2\" then \"Verified\"\r\n\t\t\t\t\t\t\t\t\t\t\t\twhen \"3\" then \"Deleted\"\r\n\t\t\t\t\t\t\t\t\t\t\t\twhen \"4\" then \"Blocked\"\r\n\t\t\t\t\t\t\t\t\t\t\t\twhen \"8\" then \"Hidden\"\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tEND as Status',\r\n 'ReferredCount' => '(SELECT COUNT(*) FROM `tbl_users` WHERE `ReferredByUserID` = U.UserID) AS ReferredCount',\r\n 'StatusID' => 'E.StatusID',\r\n 'IsPrivacyNameDisplay' => 'U.IsPrivacyNameDisplay',\r\n 'PushNotification' => 'US.PushNotification',\r\n 'PhoneStatus' => 'if(U.PhoneNumber is null, \"Pending\", \"Verified\") as PhoneStatus',\r\n 'EmailStatus' => 'if(U.Email is null, \"Pending\", \"Verified\") as EmailStatus',\r\n 'WeekID' => '(SELECT WeekID FROM football_sports_season_weeks WK,tbl_entity E WHERE E.EntityID=WK.WeekID AND E.StatusID = 2 LIMIT 1) AS WeekID',\r\n );\r\n foreach ($Params as $Param) {\r\n $Field .= (!empty($FieldArray[$Param]) ? ',' . $FieldArray[$Param] : '');\r\n }\r\n }\r\n $this->db->select('U.UserGUID, U.UserID, CONCAT_WS(\" \",U.FirstName,U.LastName) FullName');\r\n if (!empty($Field)) $this->db->select($Field, FALSE);\r\n\r\n\r\n /* distance calculation - starts */\r\n /* this is called Haversine formula and the constant 6371 is used to get distance in KM, while 3959 is used to get distance in miles. */\r\n if (!empty($Where['Latitude']) && !empty($Where['Longitude'])) {\r\n $this->db->select(\"(3959*acos(cos(radians(\" . $Where['Latitude'] . \"))*cos(radians(E.Latitude))*cos(radians(E.Longitude)-radians(\" . $Where['Longitude'] . \"))+sin(radians(\" . $Where['Latitude'] . \"))*sin(radians(E.Latitude)))) AS Distance\", false);\r\n $this->db->order_by('Distance', 'ASC');\r\n\r\n if (!empty($Where['Radius'])) {\r\n $this->db->having(\"Distance <= \" . $Where['Radius'], null, false);\r\n }\r\n }\r\n /* distance calculation - ends */\r\n\r\n $this->db->from('tbl_entity E');\r\n $this->db->from('tbl_users U');\r\n $this->db->where(\"U.UserID\", \"E.EntityID\", FALSE);\r\n\r\n if (array_keys_exist($Params, array('UserTypeName', 'IsAdmin')) || !empty($Where['IsAdmin'])) {\r\n $this->db->from('tbl_users_type UT');\r\n $this->db->where(\"UT.UserTypeID\", \"U.UserTypeID\", FALSE);\r\n }\r\n $this->db->join('tbl_users_login UL', 'U.UserID = UL.UserID', 'left');\r\n $this->db->join('tbl_users_settings US', 'U.UserID = US.UserID', 'left');\r\n\r\n if (array_keys_exist($Params, array('CountryName'))) {\r\n $this->db->join('set_location_country CO', 'U.CountryCode = CO.CountryCode', 'left');\r\n }\r\n\r\n if (!empty($Where['Keyword'])) {\r\n $Where['Keyword'] = trim($Where['Keyword']);\r\n $this->db->group_start();\r\n $this->db->like(\"U.FirstName\", $Where['Keyword']);\r\n $this->db->or_like(\"U.LastName\", $Where['Keyword']);\r\n $this->db->or_like(\"U.Username\", $Where['Keyword']);\r\n $this->db->or_like(\"U.Email\", $Where['Keyword']);\r\n $this->db->or_like(\"U.EmailForChange\", $Where['Keyword']);\r\n $this->db->or_like(\"U.PhoneNumber\", $Where['Keyword']);\r\n $this->db->or_like(\"U.PhoneNumberForChange\", $Where['Keyword']);\r\n $this->db->or_like(\"CONCAT_WS('',U.FirstName,U.Middlename,U.LastName)\", preg_replace('/\\s+/', '', $Where['Keyword']), FALSE);\r\n $this->db->group_end();\r\n }\r\n\r\n if (!empty($Where['SourceID'])) {\r\n $this->db->where(\"UL.SourceID\", $Where['SourceID']);\r\n }\r\n\r\n if (!empty($Where['UserTypeID'])) {\r\n $this->db->where_in(\"U.UserTypeID\", $Where['UserTypeID']);\r\n }\r\n\r\n if (!empty($Where['UserTypeIDNot']) && $Where['UserTypeIDNot'] == 'Yes') {\r\n $this->db->where(\"U.UserTypeID!=\", $Where['UserTypeIDNot']);\r\n }\r\n\r\n if (!empty($Where['UserID'])) {\r\n $this->db->where(\"U.UserID\", $Where['UserID']);\r\n }\r\n if (!empty($Where['StateName'])) {\r\n $this->db->where(\"U.StateName\", $Where['StateName']);\r\n }\r\n if (!empty($Where['UserArray'])) {\r\n $this->db->where_in(\"U.UserGUID\", $Where['UserArray']);\r\n }\r\n if (!empty($Where['UserIDNot'])) {\r\n $this->db->where(\"U.UserID!=\", $Where['UserIDNot']);\r\n }\r\n if (!empty($Where['UserGUID'])) {\r\n $this->db->where(\"U.UserGUID\", $Where['UserGUID']);\r\n }\r\n if (!empty($Where['ReferredByUserID'])) {\r\n $this->db->where(\"U.ReferredByUserID\", $Where['ReferredByUserID']);\r\n }\r\n\r\n if (!empty($Where['Username'])) {\r\n $this->db->where(\"U.Username\", $Where['Username']);\r\n }\r\n if (!empty($Where['Email'])) {\r\n $this->db->where(\"U.Email\", $Where['Email']);\r\n }\r\n if (!empty($Where['PhoneNumber'])) {\r\n $this->db->where(\"U.PhoneNumber\", $Where['PhoneNumber']);\r\n }\r\n\r\n if (!empty($Where['LoginKeyword'])) {\r\n $this->db->group_start();\r\n $this->db->where(\"U.Email\", $Where['LoginKeyword']);\r\n $this->db->or_where(\"U.EmailForChange\", $Where['LoginKeyword']);\r\n $this->db->or_where(\"U.Username\", $Where['LoginKeyword']);\r\n $this->db->or_where(\"U.PhoneNumber\", $Where['LoginKeyword']);\r\n $this->db->group_end();\r\n }\r\n if (!empty($Where['Password'])) {\r\n $this->db->where(\"UL.Password\", md5($Where['Password']));\r\n }\r\n\r\n if (!empty($Where['IsAdmin'])) {\r\n $this->db->where(\"UT.IsAdmin\", $Where['IsAdmin']);\r\n }\r\n if (!empty($Where['StatusID'])) {\r\n $this->db->where(\"E.StatusID\", $Where['StatusID']);\r\n }\r\n if (!empty($Where['groupFilter']) && $Where['groupFilter'] == \"Group\") {\r\n $this->db->group_by(\"EmailForChange\");\r\n $this->db->group_by(\"PhoneNumberForChange\");\r\n }\r\n if (!empty($Where['EntryFrom'])) {\r\n $this->db->where(\"DATE(E.EntryDate) >=\", $Where['EntryFrom']);\r\n }\r\n if (!empty($Where['EntryTo'])) {\r\n $this->db->where(\"DATE(E.EntryDate) <=\", $Where['EntryTo']);\r\n }\r\n if (!empty($Where['ListType'])) {\r\n $this->db->where(\"DATE(E.EntryDate) =\", date(\"Y-m-d\"));\r\n }\r\n if (!empty($Where['isWithdrawal'])) {\r\n $this->db->where(\"U.isWithdrawal\", $Where['isWithdrawal']);\r\n }\r\n if (!empty($Where['IsPrivacyNameDisplay'])) {\r\n $this->db->where(\"U.IsPrivacyNameDisplay\", $Where['IsPrivacyNameDisplay']);\r\n }\r\n if (!empty($Where['WalletType']) && !empty($Where['Operator']) && !empty($Where['Amount'])) {\r\n $this->db->where($Where['WalletType'] . $Where['Operator'], $Where['Amount']);\r\n }\r\n\r\n if (!empty($Where['OrderBy']) && !empty($Where['Sequence']) && in_array($Where['Sequence'], array('ASC', 'DESC'))) {\r\n $this->db->order_by($Where['OrderBy'], $Where['Sequence']);\r\n } else {\r\n $this->db->order_by('U.UserID', 'DESC');\r\n }\r\n\r\n\r\n /* Total records count only if want to get multiple records */\r\n if ($multiRecords) {\r\n $TempOBJ = clone $this->db;\r\n $TempQ = $TempOBJ->get();\r\n $Return['Data']['TotalRecords'] = $TempQ->num_rows();\r\n $this->db->limit($PageSize, paginationOffset($PageNo, $PageSize)); /* for pagination */\r\n } else {\r\n $this->db->limit(1);\r\n }\r\n\r\n $Query = $this->db->get();\r\n if ($Query->num_rows() > 0) {\r\n foreach ($Query->result_array() as $Record) {\r\n /* Get Wallet Data */\r\n if (in_array('Wallet', $Params)) {\r\n $WalletData = $this->getWallet('Amount,Currency,PaymentGateway,TransactionType,TransactionID,EntryDate,Narration,Status,OpeningBalance,ClosingBalance', array('UserID' => $Where['UserID'], 'TransactionMode' => 'WalletAmount'), TRUE);\r\n $Record['Wallet'] = ($WalletData) ? $WalletData['Data']['Records'] : array();\r\n }\r\n\r\n /* Get User Entries Data */\r\n if (in_array('UserEntriesBalance', $Params) && !empty($Where['WeekID'])) {\r\n $Query = $this->db->query('SELECT `PurchasedEntries`,ConsumedEntries,AllowedPredictions,ConsumedPredictions,AllowedPurchaseDoubleUps,TotalPurchasedDoubleUps,(AllowedPurchaseDoubleUps-TotalPurchasedDoubleUps) RemainingPurchaseDoubleUps,ConsumeDoubleUps FROM `tbl_users_game_entries` WHERE `UserID` =' . $Where['UserID'] . ' AND WeekID = '.$Where['WeekID'].' LIMIT 1');\r\n if($Query->num_rows() > 0){\r\n $Record['UserEntriesBalance'] = $Query->row();\r\n }else{\r\n $Record['UserEntriesBalance'] = array('PurchasedEntries' => 0,'ConsumedEntries' => 0,'AllowedPredictions' => 0,'ConsumedPredictions' => 0,'AllowedPurchaseDoubleUps' => 0,'TotalPurchasedDoubleUps' => 0,'RemainingPurchaseDoubleUps' => 0,'ConsumeDoubleUps' => 0);\r\n }\r\n }\r\n\r\n /* Get Week Data */\r\n if (in_array('WeekData', $Params)) {\r\n\r\n $WeekData = $this->db->query('SELECT FW.WeekGUID,FW.WeekStartDate,FW.WeekEndDate FROM football_sports_season_weeks FW,tbl_entity E WHERE E.EntityID = FW.WeekID AND E.StatusID = 2 LIMIT 1')->row();\r\n $Record['WeekData'] = ($WeekData) ? $WeekData : new stdClass();\r\n }\r\n\r\n if (!$multiRecords) {\r\n return $Record;\r\n }\r\n $Records[] = $Record;\r\n }\r\n\r\n $Return['Data']['Records'] = $Records;\r\n return $Return;\r\n }\r\n return FALSE;\r\n }", "title": "" }, { "docid": "44cee97704a260f18494417fc35df9a6", "score": "0.55248517", "text": "function get_users_users($roleID, $userID, $search = '')\n{\n global $DB;\n $sql = 'SELECT user.* FROM {user} user \n JOIN {block_bcgt_user_assign} assign ON assign.assigneeuserid = user.id \n WHERE assign.roleid = ? AND assign.userid = ?';\n $params = array($roleID, $userID);\n if($search != '')\n {\n $sql .= ' AND (user.lastname LIKE ? \n OR user.firstname LIKE ? OR user.username LIKE ? \n OR user.username LIKE ?)';\n $params[] = '%'.$search.'%';\n $params[] = '%'.$search.'%';\n $params[] = '%'.$search.'%';\n $params[] = '%'.$search.'%';\n }\n return $DB->get_records_sql($sql, $params);\n\n \n}", "title": "" }, { "docid": "dfe84e9e13815530ca424f866d0f40d2", "score": "0.55232066", "text": "function checkin_users_in( $args = array() ) {\n\t\n\t$args = wp_parse_args( $args, array(\n\t\n\t\t'meta_query' => array(\n\t\t\t\n\t\t\tarray(\n\t\t\t\t'key' => 'p2checkin_currently_checked_in',\n\t\t\t\t'value' => true // the user is checked in\n\t\t\t)\n\t\t\t\n\t\t)\n\t\n\t));\n\t\n\t$users = get_users( $args );\n\t\n\treturn $users;\n\n}", "title": "" }, { "docid": "6819c82e7a3b944915fe69ffa4005b4c", "score": "0.5513417", "text": "public function retrieveUsers($start, $limit, $filter) {\n\t return parent::retrieveUsers($start, $limit, $filter);\n }", "title": "" }, { "docid": "dbb4398541fc096ce6fa391d3ac5be8e", "score": "0.5483757", "text": "public function doUserAutoComplete() {\r\n\t\t$search_fields = array( \"login\", \"firstname\", \"lastname\", \"email\" );\r\n\t\t$result_field = \"login\";\r\n\r\n\t\t$auto = new ilUserAutoComplete();\r\n\t\t$auto->setSearchFields($search_fields);\r\n\t\t$auto->setResultField($result_field);\r\n\t\t$auto->enableFieldSearchableCheck(true);\r\n\r\n\t\techo $auto->getList($_REQUEST['term']);\r\n\t\texit();\r\n\t}", "title": "" }, { "docid": "c7e98e7d9dc9c6574aa63950227f08a4", "score": "0.5482839", "text": "public function LoadList()\n {\n \t$this->admin_users_list = $this->GetUsersList();\n }", "title": "" }, { "docid": "4193f51fc097b308856a670e595545a1", "score": "0.5475421", "text": "function findmefollow_allusers() {\n global $db;\n $sql = \"SELECT extension,name FROM users ORDER BY extension\";\n $results = $db->getAll($sql);\n if(DB::IsError($results)) {\n $results = null;\n }\n foreach($results as $result){\n if (checkRange($result[0])){\n $users[] = array($result[0],$result[1]);\n }\n }\n if (isset($users)) sort($users);\n return $users;\n}", "title": "" }, { "docid": "14b9eb188ef4cdbdfd90c49fc14bafc0", "score": "0.54593104", "text": "public function getRecentRegistrations(){\n\t\t\t$order_column = array(\"userID\",\"lname\",\"username\",\"date\",\"userType\",null,null); \n\t\t\t$this->db->select()->from('tbl_users');\n\t\t\tif(isset($_POST[\"search\"][\"value\"])){ \n\t $this->db->or_like(\"lname\", $_POST[\"search\"][\"value\"])->or_like(\"fname\", $_POST[\"search\"][\"value\"])->or_like(\"username\", $_POST[\"search\"][\"value\"])->or_like(\"date\", $_POST[\"search\"][\"value\"])->or_like(\"userType\", $_POST[\"search\"][\"value\"])->or_like(\"username\", $_POST[\"search\"][\"value\"]); \n }\n if(isset($_POST['order'])){\n \t$this->db->order_by($order_column[$_POST['order']['0']['column']],$_POST['order']['0']['dir']);\n }\n else{\n \t$this->db->like('date',date('Y-m', strtotime('first day of last month')))->or_like('date',date('Y-m',strtotime('this day')))->order_by('date', 'DESC');\n } \t\t\t\n\t\t}", "title": "" }, { "docid": "4c44b6cb48061ad68575b37ac591bc3f", "score": "0.5458532", "text": "function wplms_instructor_privacy_filter($args=array()){\n\t $instructor_privacy = vibe_get_option('instructor_content_privacy');\n\t if(isset($instructor_privacy) && $instructor_privacy && !current_user_can('manage_options')){\n\t global $current_user;\n\t get_currentuserinfo();\n\t $args['author'] = $current_user->ID;\n\t }\n\t return $args;\n\t}", "title": "" }, { "docid": "98ace0f0524f8b1d465659a68f248187", "score": "0.54572743", "text": "function getSearchedUsers($value, $flag)\n{\n //flag == 1 ==> called from normal search\n //flag == 2 ==> called from allSearchResults.php\n\n if (strlen($value) == 0) {\n // If search input field is empty\n echo \" \";\n } else {\n $value = strtolower($value);\n //explode breakes the string into array, each substring is made when the first arg of explode is found in the string\n $names = explode(\" \", $value);\n if (count($names) == 2) {\n //if there there are two substrings then it would search for first substirng in first name and second string in the last name\n\n if ($flag == 2) {\n // allSearchResults.php - displaying all results\n $users = queryFunc(\"SELECT CONCAT(first_name,' ',last_name) as name,profile_pic,user_id from users where lower(first_name) like '$names[0]%' AND lower(last_name) like '$names[1]%'\");\n } else {\n $users = queryFunc(\"SELECT CONCAT(first_name,' ',last_name) as name,profile_pic,user_id from users where lower(first_name) like '$names[0]%' AND lower(last_name) like '$names[1]%' limit 5\");\n }\n } else {\n //if there is only one substring, i.e no spaces are present in the input then it would search that substring in both first name and last name\n if ($flag == 2) {\n // allSearchResults.php - displaying all results\n $users = queryFunc(\"SELECT CONCAT(first_name,' ',last_name) as name,profile_pic,user_id from users where lower(first_name) like '$names[0]%' OR lower(last_name) like '$names[0]%'\");\n } else {\n $users = queryFunc(\"SELECT CONCAT(first_name,' ',last_name) as name,profile_pic,user_id from users where lower(first_name) like '$names[0]%' OR lower(last_name) like '$names[0]%' limit 5\");\n }\n }\n\n // If any user is found against search\n if (isData($users)) {\n if ($flag == 1 || $flag == 2) {\n while ($row = isRecord($users)) {\n $row['profile_pic'] = \"./assets/profile_pictures/\" . $row['profile_pic'];\n $user = <<<DELIMETER\n <div class='search-person-container'>\n <a href='timeline.php?visitingUserID={$row['user_id']}' class='search-person'>\n <span class='search-person-image'>\n <img src='{$row['profile_pic']}' class='post-avatar post-avatar-30'/>\n </span>\n <span class='search-person-info'>\n <span class='person-name'>{$row['name']}</span>\n </span>\n </a>\nDELIMETER;\n // Not displaying message icon if loggedIn user appear in search results\n if ($row['user_id'] != $_SESSION['user_id']) {\n $user .= <<<DELIMETER\n <div class='person-message'>\n <a href='messages.php?id={$row['user_id']}'><i class='fas fa-envelope message-icon'></i></a>\n </div>\n </div> \nDELIMETER;\n } else {\n // Ending the opened div\n $user .= '</div>'; // search-person\n }\n // Passing the response back\n echo $user;\n }\n } else {\n // When search is done from messages\n while ($row = isRecord($users)) {\n $row['profile_pic'] = \"./assets/profile_pictures/\" . $row['profile_pic'];\n $user = <<<DELIMETER\n <div class='search-person'>\n <div class='search-person-image'>\n <img src='{$row['profile_pic']}' class='post-avatar post-avatar-30' />\n </div>\n\n <a href='messages.php?id={$row['user_id']}' class='search-person-info'>\n <span class='person-name'>\n {$row['name']}\n </span>\n </a>\n </div>\nDELIMETER;\n //Don't show user logged in, in search results for chats\n if ($row['user_id'] != $_SESSION['user_id']) {\n echo $user;\n }\n\n }\n }\n } else {\n // If no user was found against the search\n echo 'No';\n }\n }\n}", "title": "" }, { "docid": "c4e4faee853becab5ad76fbdd4581665", "score": "0.5455495", "text": "function learn_press_get_students_list_filter() {\n\t$filter = array(\n\t\t'all' => esc_html__( 'All', 'learnpress' ),\n\t\t'in-progress' => esc_html__( 'In Progress', 'learnpress' ),\n\t\t'finished' => esc_html__( 'Finished', 'learnpress' ),\n\t);\n\n\treturn apply_filters( 'learn_press_get_students_list_filter', $filter );\n}", "title": "" }, { "docid": "12b551c7011f50326dbcf9cdd6ec1c63", "score": "0.54480225", "text": "public function register_filters() {\n\t\tif ( is_multisite() ) {\n\t\t\tadd_action( 'network_admin_menu', array( &$this, 'admin_menu' ) );\n\t\t\tremove_action( 'admin_menu', array( &$this, 'admin_menu' ) );\n\t\t}\n\t\tadd_action( 'admin_notices', array( &$this, 'display_activation_notice' ) );\n\t\tadd_action( 'check_passwords', array( &$this, 'hack_check_passwords' ) );\n\t\tadd_filter( 'pre_user_display_name', array( &$this, 'hack_pre_user_display_name' ) );\n\t\tadd_filter( 'pre_user_email', array( &$this, 'hack_pre_user_email' ) );\n\t\tadd_action( 'register_post', array( &$this, 'register_post' ), 1, 3 );\n\t\tadd_filter( 'registration_errors', array( &$this, 'registration_errors' ), 1 );\n\t\tadd_action( 'retrieve_password', array( &$this, 'retrieve_password' ) );\n\t\tadd_filter( 'retrieve_password_message', array( &$this, 'retrieve_password_message' ) );\n\t\tadd_action( 'user_profile_update_errors', array( &$this, 'user_profile_update_errors' ), 1, 3 );\n\t\tadd_filter( 'wpmu_validate_user_signup', array( &$this, 'bp_members_validate_user_signup' ) );\n\t\tadd_action( $this->get_hook( 'after_settings_form' ), array( &$this, 'list_multiple_accounts' ) );\n\t}", "title": "" }, { "docid": "94873c8933e602b8e416e948fb6db1f5", "score": "0.5446593", "text": "public function search_users( $args = array() ) {\n\t\t\tglobal $wpdb;\n\n\t\t\t$default = array(\n\t\t\t\t'search' => false,\n\t\t\t\t'limit' => false,\n\t\t\t\t'offset' => 0\n\t\t\t);\n\n\t\t\t$args = wp_parse_args( $args, $default );\n\t\t\textract( $args );\n\n\t\t\t$sql = \"SELECT DISTINCT i.user_id\n FROM {$wpdb->yith_wcwl_items} AS i\n LEFT JOIN {$wpdb->yith_wcwl_wishlists} AS l ON i.wishlist_id = l.ID\";\n\n\t\t\tif( ! empty( $search ) ){\n\t\t\t\t$sql .= \" LEFT JOIN `{$wpdb->users}` AS u ON l.`user_id` = u.ID\";\n\t\t\t\t$sql .= \" LEFT JOIN `{$wpdb->usermeta}` AS umn ON umn.`user_id` = u.`ID`\";\n\t\t\t\t$sql .= \" LEFT JOIN `{$wpdb->usermeta}` AS ums ON ums.`user_id` = u.`ID`\";\n\t\t\t}\n\n\t\t\t$sql .= \" WHERE l.wishlist_privacy = %d\";\n\t\t\t$sql_args = array( 0 );\n\n\t\t\tif( ! empty( $search ) ){\n\t\t\t\t$sql .= \" AND ( umn.`meta_key` LIKE %s AND ums.`meta_key` LIKE %s AND ( u.`user_email` LIKE %s OR u.`user_login` LIKE %s OR umn.`meta_value` LIKE %s OR ums.`meta_value` LIKE %s ) )\";\n\t\t\t\t$sql_args[] = 'first_name';\n\t\t\t\t$sql_args[] = 'last_name';\n\t\t\t\t$sql_args[] = \"%\" . esc_sql( $search ) . \"%\";\n\t\t\t\t$sql_args[] = \"%\" . esc_sql( $search ) . \"%\";\n\t\t\t\t$sql_args[] = \"%\" . esc_sql( $search ) . \"%\";\n\t\t\t\t$sql_args[] = \"%\" . esc_sql( $search ) . \"%\";\n\t\t\t}\n\n\t\t\tif( ! empty( $limit ) && isset( $offset ) ){\n\t\t\t\t$sql .= \" LIMIT \" . $offset . \", \" . $limit;\n\t\t\t}\n\n\t\t\t$res = $wpdb->get_col( $wpdb->prepare( $sql, $sql_args ) );\n\t\t\treturn $res;\n\t\t}", "title": "" }, { "docid": "ce7bc02b14f661434643a605c3a76d5a", "score": "0.5441272", "text": "function get_members($num, $page, $search, $filter)\n{\n if (!UserLevel::is_admin())\n {\n return json_error(\"Not authorized\");\n }\n\n global $db;\n\n $offset = $num == 0 ? 0 : $num * $page;\n $filter = json_decode($filter);\n $query = \"SELECT users.id AS id, username, level, last_login, created_at, firstname, lastname, email, phone, email_alerts, phone_alerts FROM users INNER JOIN user_info ON users.id=user_info.userid \";\n\n $filter_string = \"WHERE 1 \";\n $admin_level = UserLevel::Admin;\n if (!$filter->type->new)\n {\n $filter_string .= \"AND level <> 0 \";\n }\n if (!$filter->type->regular)\n {\n $filter_string .= \"AND (level = 0 OR level >= $admin_level) \";\n }\n if (!$filter->type->admin)\n {\n $filter_string .= \"AND level < $admin_level \";\n }\n\n if ($filter->pii != \"all\")\n {\n if ($filter->pii == 'yes')\n {\n $filter_string .= \"AND (firstname <> '' OR lastname <> '' OR email <> '' OR phone <> 0) \";\n }\n else\n {\n $filter_string .= \"AND firstname = '' AND lastname = '' AND email = '' AND phone = 0 \";\n }\n }\n\n if (strlen($search) > 0)\n {\n $search = $db->real_escape_string($search);\n $filter_string .= \"AND username LIKE '%$search%' \";\n }\n\n $query .= $filter_string . \"ORDER BY \";\n switch ($filter->sort)\n {\n case \"id\":\n $query .= \"id \";\n break;\n case \"name\":\n $query .= \"username \";\n break;\n case \"seen\":\n $query .= \"last_login \";\n break;\n case \"level\":\n $query .= \"level \";\n break;\n default:\n return json_error('Invalid filter sort field');\n }\n\n $query .= $filter->order . \" \";\n if ($num != 0)\n {\n $query .= \"LIMIT $num \";\n }\n\n if ($offset != 0)\n {\n $query .= \"OFFSET $offset\";\n }\n\n $result = $db->query($query);\n if (!$result)\n {\n return db_error();\n }\n\n $members = new \\stdClass();\n $users = array();\n while ($row = $result->fetch_row())\n {\n $user = new \\stdClass();\n $user->id = $row[0];\n $user->username = $row[1];\n $user->level = $row[2];\n $user->last_seen = $row[3];\n $user->created = $row[4];\n $user->name = $row[5] . ' ' . $row[6];\n $user->email = $row[7];\n $user->phone = $row[8];\n $user->emailalerts = $row[9];\n $user->phonealerts = $row[10];\n array_push($users, $user);\n }\n\n $members->data = $users;\n\n $result->close();\n\n $query = \"SELECT COUNT(*) FROM users INNER JOIN user_info ON users.id=user_info.userid \" . $filter_string;\n $result = $db->query($query);\n if (!$result)\n {\n return db_error();\n }\n\n $members->total = (int)$result->fetch_row()[0];\n\n return json_encode($members);\n}", "title": "" }, { "docid": "c81ebee495cf10f308266b39c884d676", "score": "0.5440084", "text": "function addressbook_userapi_getListHeader($args)\n{\n extract($args);\n if (!isset($sort)) {\n return false;\n }\n if ($sort == 1) {\n $sortCols = explode(',',xarModGetVar(__ADDRESSBOOK__, 'sortorder_1'));\n }\n else {\n $sortCols = explode(',',xarModGetVar(__ADDRESSBOOK__, 'sortorder_2'));\n }\n for ($i=0;$i<2;$i++) {\n switch ($sortCols[$i]) {\n case 'sortname':\n $returnArray[$i] = array('header'=> strtoupper(_AB_LABEL_NAME));\n break;\n case 'title':\n $returnArray[$i] = array('header'=> strtoupper(_AB_TITLE));\n break;\n case 'sortcompany':\n $returnArray[$i] = array('header'=> strtoupper(_AB_COMPANY));\n break;\n case 'zip':\n $returnArray[$i] = array('header'=> strtoupper(_AB_ZIP));\n break;\n case 'city':\n $returnArray[$i] = array('header'=> strtoupper(_AB_CITY));\n break;\n case 'state':\n $returnArray[$i] = array('header'=> strtoupper(_AB_STATE));\n break;\n case 'country':\n $returnArray[$i] = array('header'=> strtoupper(_AB_COUNTRY));\n break;\n default:\n // do nothing\n break;\n }\n $useCustomFields = xarModGetVar(__ADDRESSBOOK__,'useCustomFields');\n if ($useCustomFields) {\n $custUserData = xarModAPIFunc(__ADDRESSBOOK__,'user','getcustfieldtypeinfo');\n foreach($custUserData as $userData) {\n if ($sortCols[$i] == $userData['colName']) {\n $returnArray[$i] = array('header'=> strtoupper($userData['custLabel']));\n }\n }\n }\n }\n\n /**\n * Check if any of the custom fields are selected for display on the search results\n */\n $useCustomFields = xarModGetVar(__ADDRESSBOOK__,'useCustomFields');\n if ($useCustomFields) {\n $custUserData = xarModAPIFunc(__ADDRESSBOOK__,'user','getcustfieldtypeinfo');\n foreach($custUserData as $userData) {\n if ($userData['custDisplay']) {\n if (!empty($userData['custShortLabel'])) {\n $returnArray[] = array('header'=> '<acronym title=\"'.$userData['custLabel'].'\">'.strtoupper($userData['custShortLabel'].'</acronym>'));\n } else {\n $returnArray[] = array('header'=> strtoupper($userData['custLabel']));\n }\n }\n }\n }\n\n return $returnArray;\n}", "title": "" }, { "docid": "e4631f63282536199b7d0a6d6dcf67d7", "score": "0.5440023", "text": "function checkin_users_out( $args = array() ) {\n\t\n\t$args = wp_parse_args( $args, array(\n\t\n\t\t'exclude' => checkin_users_in_ids()\n\t\n\t));\n\t\n\t$users = get_users( $args );\n\t\n\treturn $users;\n\n}", "title": "" }, { "docid": "cf76ac7427f9915345a56484524a60a0", "score": "0.5439645", "text": "function get_users_on_unit_qual($unitID, $qualID = -1, $courseID = -1, $groupingID = -1, $limit = false, $limitFrom = false)\n{\n global $DB;\n $sql = \"SELECT distinct(user.id), user.* FROM {block_bcgt_user_unit} userunit \n JOIN {user} user ON user.id = userunit.userid \n JOIN {block_bcgt_user_qual} userqual ON userqual.userid = user.id \";\n $params = array();\n if($qualID != -1)\n {\n $sql .= \" AND userqual.bcgtqualificationid = ?\";\n $params[] = $qualID;\n }\n if($courseID != -1 && $courseID != SITEID)\n {\n $sql .= \" JOIN {block_bcgt_course_qual} coursequal ON coursequal.bcgtqualificationid = userqual.bcgtqualificationid\";\n }\n if($groupingID != -1)\n {\n $sql .= \" JOIN {groups_members} members ON members.userid = userunit.userid \n JOIN {groupings_groups} gg ON gg.groupid = members.groupid\";\n }\n $sql .= \" WHERE userunit.bcgtunitid = ? AND user.deleted != ?\"; \n $params[] = $unitID;\n $params[] = 1;\n if($qualID != -1)\n {\n $sql .= \" AND userunit.bcgtqualificationid = ? \"; \n $params[] = $qualID;\n }\n if($courseID != -1 && $courseID != SITEID)\n {\n $sql .= \" AND coursequal.courseid = ?\";\n $params[] = $courseID;\n }\n if($groupingID != -1)\n {\n $sql .= \" AND gg.groupingid = ?\";\n $params[] = $groupingID;\n } \n $sql .= \" ORDER BY user.lastname ASC, user.firstname ASC, user.username ASC\";\n \n if ($limit !== false)\n {\n $sql .= \" LIMIT \";\n if ($limitFrom !== false){\n $sql .= \"{$limitFrom},\";\n }\n $sql .= $limit;\n }\n \n return $DB->get_records_sql($sql, $params);\n}", "title": "" }, { "docid": "5c5f2f62d53838249c8ed54757bd80d9", "score": "0.54388493", "text": "public function getDataWithFilters(UserFilters $filters){ \n\n $userRole = Auth::user()->role;\n $userId = Auth::user()->id; \n\n $data = User::filter($filters)->get();\n\n if ($userRole == 'RSM') {\n $region = RsmRegion::where('rsm_regions.user_id', $userId)\n ->join('regions', 'rsm_regions.region_id', '=', 'regions.id')\n ->join('areas', 'regions.id', '=', 'areas.region_id')\n ->join('districts', 'areas.id', '=', 'districts.area_id')\n ->join('stores', 'districts.id', '=', 'stores.district_id')\n ->join('employee_stores', 'stores.id', '=', 'employee_stores.store_id')\n ->join('users', 'employee_stores.user_id', '=', 'users.id')\n ->pluck('users.id');\n $data = $data->whereIn('id', $region);\n }\n\n if ($userRole == 'DM') {\n $area = DmArea::where('dm_areas.user_id', $userId)\n ->join('areas', 'dm_areas.area_id', '=', 'areas.id')\n ->join('districts', 'areas.id', '=', 'districts.area_id')\n ->join('stores', 'districts.id', '=', 'stores.district_id')\n ->join('employee_stores', 'stores.id', '=', 'employee_stores.store_id')\n ->join('users', 'employee_stores.user_id', '=', 'users.id')\n ->pluck('users.id');\n $data = $data->whereIn('id', $area);\n }\n \n if (($userRole == 'Supervisor') or ($userRole == 'Supervisor Hybrid')) {\n $store = Store::where('stores.user_id', $userId)\n ->join('employee_stores', 'stores.id', '=', 'employee_stores.store_id')\n ->join('users', 'employee_stores.user_id', '=', 'users.id')\n ->pluck('users.id');\n $data = $data->whereIn('id', $store);\n }\n\n return $data;\n }", "title": "" }, { "docid": "01e94cb769947e7ebbcbadba32a01f39", "score": "0.54311776", "text": "function users(){\n\n\t\t}", "title": "" }, { "docid": "823ef27910abf16b3353250025d60806", "score": "0.5430698", "text": "public\tfunction customer_att() {\n $listusers = array();\n\t\t$query = '';\n\t\t$subquery = '';\n\t\tswitch($this->parameters[\"user\"]){\n\t\t\tcase \"customer\":{\n\t\t\t\tswitch($this->parameters[\"action\"]){\n\t\t\t\t\tcase \"markCustAtt\":{\n\t\t\t\t\t\t$subquery = \"AND cust.`id` IN (\n\t\t\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\t\t\tDISTINCT(a.`id`) AS cust_pk\n\t\t\t\t\t\t\t\tFROM `customer` AS a\n\t\t\t\t\t\t\t\tINNER JOIN `customer_attendence` AS d ON d.`customer_pk` = a.`id`\n\t\t\t\t\t\t\t\tWHERE d.`facility_id` = '\" . $this->parameters[\"fid\"] . \"'\n\t\t\t\t\t\t\t\tAND STR_TO_DATE(NOW(),'%Y-%m-%d') = STR_TO_DATE(d.`in_time` ,'%Y-%m-%d')\n\t\t\t\t\t\t\t\tAND d.`status` = 12\n\t\t\t\t\t\t\t)\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase \"unmarkCustAtt\":{\n\t\t\t\t\t\t$subquery = \"AND cust.`id` IN (\n\t\t\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\t\t\tDISTINCT(a.`id`) AS cust_pk\n\t\t\t\t\t\t\t\tFROM `customer` AS a\n\t\t\t\t\t\t\t\tINNER JOIN `customer_attendence` AS d ON d.`customer_pk` = a.`id`\n\t\t\t\t\t\t\t\tWHERE d.`facility_id` = '\" . $this->parameters[\"fid\"] . \"'\n\t\t\t\t\t\t\t\tAND STR_TO_DATE(NOW(),'%Y-%m-%d') = STR_TO_DATE(d.`in_time` ,'%Y-%m-%d')\n\t\t\t\t\t\t\t\tAND d.`status` = 11\n\t\t\t\t\t\t\t)\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tdefault:{\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t$subquery = \"AND cust.`id` NOT IN (\n\t\t\t\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\t\t\t\tDISTINCT(a.`id`) AS cust_pk\n\t\t\t\t\t\t\t\t\tFROM `customer` AS a\n\t\t\t\t\t\t\t\t\tINNER JOIN `customer_attendence` AS d ON d.`customer_pk` = a.`id`\n\t\t\t\t\t\t\t\t\tWHERE d.`facility_id` = '\" . $this->parameters[\"fid\"] . \"'\n\t\t\t\t\t\t\t\t\tAND STR_TO_DATE(NOW(),'%Y-%m-%d') = STR_TO_DATE(d.`in_time` ,'%Y-%m-%d')\n\t\t\t\t\t\t\t\t\tAND d.`status` = 12 OR d.`status` = 11\n\t\t\t\t\t\t\t\t)\";\n\t\t\t\t\t\t*/\n\t\t\t\t\t\t$subquery = \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$query = \"SELECT\n\t\t\t\t\t\tGROUP_CONCAT(g.`id`,'☻☻♥♥☻☻') AS cust_id,\n\t\t\t\t\t\tGROUP_CONCAT(g.`cust_name`,'☻☻♥♥☻☻') AS cust_name,\n\t\t\t\t\t\tGROUP_CONCAT(g.`cust_email`,'☻☻♥♥☻☻') AS cust_email,\n\t\t\t\t\t\tGROUP_CONCAT(g.`cnum`,'☻☻♥♥☻☻') AS cnum,\n\t\t\t\t\t\tg.`facility_id`,\n\t\t\t\t\t\t(SELECT `name` FROM `facility` WHERE `id` = g.`facility_id`) AS facility_name,\n\t\t\t\t\t\tGROUP_CONCAT(g.`uphoto`,'☻☻♥♥☻☻') AS cphoto\n\t\t\t\t\tFROM(\n\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\tcft.`facility_id` AS facility_id,\n\t\t\t\t\t\t\tcust.`id` AS id,\n\t\t\t\t\t\t\tcust.`name` AS cust_name,\n\t\t\t\t\t\t\tcust.`email` AS cust_email,\n\t\t\t\t\t\t\tcust.`cell_number` AS cnum,\n\t\t\t\t\t\t\tCASE\n\t\t\t\t\t\t\t\tWHEN ph.`ver2` IS NOT NULL\n\t\t\t\t\t\t\t\tTHEN CONCAT('\" . URL . ASSET_DIR . \"', ph.`ver2`)\n\t\t\t\t\t\t\t\tELSE '\" . USER_ANON_IMAGE . \"'\n\t\t\t\t\t\t\tEND AS uphoto\n\t\t\t\t\t\tFROM `customer` As cust\n\t\t\t\t\t\tLEFT JOIN `group_members` AS gm ON cust.`id` = gm.`customer_pk` AND gm.`status` = (SELECT id FROM `status` WHERE statu_name = 'Joined' and `status`=1)\n\t\t\t\t\t\tLEFT JOIN `groups` AS gr ON gr.`id` = gm.`group_id` AND gr.`status` = (SELECT id FROM `status` WHERE statu_name = 'Show' and `status`=1)\n\t\t\t\t\t\tLEFT JOIN `photo` AS ph ON ph.`id` = cust.`photo_id`\n\t\t\t\t\t\tLEFT JOIN `customer_facility` AS cft ON cft.`customer_pk` = cust.`id` AND cft.`status` =(SELECT id FROM `status` WHERE statu_name = 'Show' and `status`=1)\n\t\t\t\t\t\tWHERE cft.`customer_pk` = cust.`id`\n\t\t\t\t\t\t\".$subquery.\"\n\t\t\t\t\t\tAND cft.`facility_id` != 0\n\t\t\t\t\t) as g\n\t\t\t\t\tWHERE g.`facility_id` = '\" . $this->parameters[\"fid\"] . \"';\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"employee\":{\n\t\t\t\tswitch($this->parameters[\"action\"]){\n\t\t\t\t\tcase \"markCustAtt\":{\n\t\t\t\t\t\t$subquery = \"AND cust.`id` IN (\n\t\t\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\t\t\tDISTINCT(a.`id`) AS cust_pk\n\t\t\t\t\t\t\t\tFROM `employee` AS a\n\t\t\t\t\t\t\t\tINNER JOIN `employee_attendence` AS d ON d.`employee_id` = a.`id`\n\t\t\t\t\t\t\t\tWHERE d.`facility_id` = '\" . $this->parameters[\"fid\"] . \"'\n\t\t\t\t\t\t\t\tAND STR_TO_DATE(NOW(),'%Y-%m-%d') = STR_TO_DATE(d.`in_time` ,'%Y-%m-%d')\n\t\t\t\t\t\t\t\tAND d.`status` = 12\n\t\t\t\t\t\t\t)\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase \"unmarkCustAtt\":{\n\t\t\t\t\t\t$subquery = \"AND cust.`id` IN (\n\t\t\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\t\t\tDISTINCT(a.`id`) AS cust_pk\n\t\t\t\t\t\t\t\tFROM `employee` AS a\n\t\t\t\t\t\t\t\tINNER JOIN `employee_attendence` AS d ON d.`employee_id` = a.`id`\n\t\t\t\t\t\t\t\tWHERE d.`facility_id` = '\" . $this->parameters[\"fid\"] . \"'\n\t\t\t\t\t\t\t\tAND STR_TO_DATE(NOW(),'%Y-%m-%d') = STR_TO_DATE(d.`in_time` ,'%Y-%m-%d')\n\t\t\t\t\t\t\t\tAND d.`status` = 11\n\t\t\t\t\t\t\t)\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tdefault:{\n\t\t\t\t\t/*\n\t\t\t\t\t\t$subquery = \"AND cust.`id` NOT IN (\n\t\t\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\t\t\tDISTINCT(a.`id`) AS cust_pk\n\t\t\t\t\t\t\t\tFROM `employee` AS a\n\t\t\t\t\t\t\t\tINNER JOIN `employee_attendence` AS d ON d.`employee_id` = a.`id`\n\t\t\t\t\t\t\t\tWHERE d.`facility_id` = '\" . $this->parameters[\"fid\"] . \"'\n\t\t\t\t\t\t\t\tAND STR_TO_DATE(NOW(),'%Y-%m-%d') = STR_TO_DATE(d.`in_time` ,'%Y-%m-%d')\n\t\t\t\t\t\t\t\tAND d.`status` = 12 OR d.`status` = 11\n\t\t\t\t\t\t\t)\";\n\t\t\t\t\t*/\n\t\t\t\t\t\t$subquery = \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$query = \"SELECT\n\t\t\t\t\t\tGROUP_CONCAT(g.`id`,'☻☻♥♥☻☻') AS cust_id,\n\t\t\t\t\t\tGROUP_CONCAT(g.`cust_name`,'☻☻♥♥☻☻') AS cust_name,\n\t\t\t\t\t\tGROUP_CONCAT(g.`cust_email`,'☻☻♥♥☻☻') AS cust_email,\n\t\t\t\t\t\tGROUP_CONCAT(g.`cnum`,'☻☻♥♥☻☻') AS cnum,\n\t\t\t\t\t\tg.`facility_id`,\n\t\t\t\t\t\t(SELECT `name` FROM `facility` WHERE `id` = g.`facility_id`) AS facility_name,\n\t\t\t\t\t\tGROUP_CONCAT(g.`uphoto`,'☻☻♥♥☻☻') AS cphoto\n\t\t\t\t\tFROM(\n\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\tcft.`facility_id` AS facility_id,\n\t\t\t\t\t\t\tcust.`id` AS id,\n\t\t\t\t\t\t\tcust.`user_name` AS cust_name,\n\t\t\t\t\t\t\tcust.`email` AS cust_email,\n\t\t\t\t\t\t\tcust.`cell_number` AS cnum,\n\t\t\t\t\t\t\tCASE\n\t\t\t\t\t\t\t\tWHEN ph.`ver2` IS NOT NULL\n\t\t\t\t\t\t\t\tTHEN CONCAT('\" . URL . ASSET_DIR . \"', ph.`ver2`)\n\t\t\t\t\t\t\t\tELSE '\" . TRAIN_ANON_IMAGE . \"'\n\t\t\t\t\t\t\tEND AS uphoto\n\t\t\t\t\t\tFROM `employee` As cust\n\t\t\t\t\t\tLEFT JOIN `photo` AS ph ON ph.`id` = cust.`photo_id`\n\t\t\t\t\t\tLEFT JOIN `employee_facility` AS cft ON cft.`employee_id` = cust.`id` AND cft.`status` =(SELECT id FROM `status` WHERE statu_name = 'Show' and status=1)\n\t\t\t\t\t\tWHERE cft.`employee_id` = cust.`id`\n\t\t\t\t\t\t\".$subquery.\"\n\t\t\t\t\t\tAND cft.`facility_id` != 0\n\t\t\t\t\t) as g\n\t\t\t\t\tWHERE g.`facility_id` = '\" . $this->parameters[\"fid\"] . \"';\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n $res = executeQuery($query);\n if (mysql_num_rows($res)) {\n // $i = 0;\n while ($row = mysql_fetch_assoc($res)) {\n array_push($listusers,array(\n\t\t\t\t\t'id' => $row['cust_id'],\n\t\t\t\t\t'name' => $row['cust_name'],\n\t\t\t\t\t'email_id' => $row['cust_email'],\n\t\t\t\t\t'cnum' => $row['cnum'],\n\t\t\t\t\t'facility_type' => $row['facility_id'],\n\t\t\t\t\t'uphoto' => $row['cphoto'],\n\t\t\t\t\t'facility_id' => $row['facility_id'],\n\t\t\t\t\t'facility_name' => $row['facility_name']\n\t\t\t\t));\n // $listusers[$i]['id'] = array_push()$row['cust_id'];\n // $listusers[$i]['name'] = $row['cust_name'];\n // $listusers[$i]['email_id'] = $row['cust_email'];\n // $listusers[$i]['cnum'] = $row['cnum'];\n // $listusers[$i]['facility_type'] = $row['facility_id'];\n // $listusers[$i]['uphoto'] = $row['cphoto'];\n // $listusers[$i]['facility_id'] = $row['facility_id'];\n // $listusers[$i]['facility_name'] = $row['facility_name'];\n // $i++;\n }\n }\n $this->DisplayList($listusers);\n }", "title": "" }, { "docid": "7df65191d566d910c9ef07465618978a", "score": "0.54244006", "text": "function _channelConnectedTubersSearch_user($srch_options) {\n\n\n global $dbConn;\n $params = array(); \n $default_opts = array(\n 'limit' => 18,\n 'page' => 0,\n 'dont_show' => 0,\n 'channelid' => null,\n 'begins' => null,\n 'from_time' => null,\n 'to_time' => null,\n 'notify' => null,\n 'published' => 1,\n 'is_visible' => -1,\n 'search_string' => null,\n 'orderby' => 'create_ts',\n 'order' => 'd',\n 'n_results' => false,\n 'skip' => 0\n );\n\n $options = array_merge($default_opts, $srch_options);\n\n $nlimit = '';\n if (!is_null($options['limit'])) {\n $nlimit = intval($options['limit']);\n $skip = intval($options['page']) * $nlimit + intval($options['skip']);\n }\n\n $order = '';\n $orderby = $options['orderby'];\n if ($orderby == 'rand') {\n $orderby = \"RAND()\";\n } else {\n $order = ($options['order'] == 'a') ? 'ASC' : 'DESC';\n }\n \n $is_visible = $options['is_visible'];\n\n $user_id = $options['channelid'];\n if (is_null($user_id)) {\n return array();\n }\n\n $where = '';\n\n if ($where != '')\n $where .= ' AND ';\n\n\n if (!is_null($options['begins'])) {\n if ($options['begins'] == '#') {\n if ($where != '')\n $where = \" ( $where ) AND \";\n $where .= \"( U.display_fullname=0 AND LOWER(U.YourUserName) REGEXP '^[1-9]' )\";\n //user names cant have numbers\n }else {\n if ($where != '')\n $where = \" ( $where ) AND \";\n// $where .= \"( \n// (\n// U.display_fullname=0\n// AND\n// LOWER(U.YourUserName) LIKE '{$options['begins']}%'\n// )\n// OR\n// (\n// U.display_fullname=1\n// AND\n// (\n// LOWER(U.fname) LIKE '{$options['begins']}%' \n// OR\n// LOWER(U.FullName) LIKE '{$options['begins']}%'\n// )\n// )\n// )\";\n $where .= \"( \n (\n U.display_fullname=0\n AND\n LOWER(U.YourUserName) LIKE :Begins\n )\n OR\n (\n U.display_fullname=1\n AND\n (\n LOWER(U.fname) LIKE :Begins\n OR\n LOWER(U.FullName) LIKE :Begins\n )\n )\n )\";\n $params[] = array( \"key\" => \":Begins\",\n \"value\" =>$options['begins'].\"%\");\n /* only search in firstname\n * OR\n LOWER(U.lname) LIKE '{$options['begins']}%'\n\n */\n }\n }\n\n if (!is_null($options['search_string']) && $options['search_string']!='') {\n $options['search_string'] = strtolower($options['search_string']);\n if ($where != '')\n $where = \" ( $where ) AND \";\n $search_strings = explode(' ', $options['search_string']);\n $wheres = array();\n $i=0;\n foreach ($search_strings as $search_string_loop) {\n $wheres[] = \"( \n (\n U.display_fullname=0\n AND\n LOWER(U.YourUserName) LIKE :Search_strings$i\n )\n OR\n (\n U.display_fullname=1\n AND\n (\n LOWER(U.fname) LIKE :Search_strings$i \n OR\n LOWER(U.lname) LIKE :Search_strings$i \n OR\n LOWER(U.FullName) LIKE :Search_strings$i\n )\n )\n )\";\n $params[] = array( \"key\" => \":Search_strings$i\", \"value\" =>'%'.$search_string_loop.'%' );\n $i++;\n }\n $where .= \"( \" . implode(' AND ', $wheres) . \")\";\n //$where .= \"(:Wheres)\";\n //$params[] = array( \"key\" => \":Wheres\", \"value\" =>implode(' AND ', $wheres));\n }\n\n if ($where != '')\n $where .= \" AND \";\n// $where .= \" F.channelid='{$options['channelid']}' \";\n $where .= \" F.channelid=:Channelid \";\n $params[] = array( \"key\" => \":Channelid\",\n \"value\" =>$options['channelid']);\n if (!is_null($options[\"notify\"])) {\n if ($where != '')\n $where .= \" AND \";\n// $where .= \" F.notify='{$options['notify']}' \";\n $where .= \" F.notify=:Notify \";\n $params[] = array( \"key\" => \":Notify\",\n \"value\" =>$options['notify']);\n \n }\n if ($options[\"dont_show\"] != 0) {\n if ($where != '')\n $where .= \" AND \";\n// $where .= \" F.id NOT IN (\" . $options[\"dont_show\"] . \") \";\n $where .= \" NOT find_in_set(cast(F.userid as char), :Dont_show) \";\n $params[] = array( \"key\" => \":Dont_show\", \"value\" =>$options[\"dont_show\"]);\n }\n if ($is_visible != -1) {\n if ($where != '')\n $where .= \" AND \";\n// $where .= \" F.is_visible='{$options['is_visible']}' \";\n $where .= \" F.is_visible=:Is_visible \";\n $params[] = array( \"key\" => \":Is_visible\",\n \"value\" =>$options['is_visible']);\n }\n if (!is_null($options['from_time']) || !is_null($options['to_time'])) {\n if ($where != '') {\n $where = \" ( \" . $where . \" ) \";\n }\n if (!is_null($options['from_time'])) {\n if ($where != '')\n $where .= \" AND \";\n// $where .= \" (F.create_ts) >= '{$options['from_time']}' \";\n $where .= \" (F.create_ts) >= :From_time \";\n $params[] = array( \"key\" => \":From_time\",\n \"value\" =>$options['from_time']);\n }\n if (!is_null($options['to_time'])) {\n if ($where != '')\n $where .= \" AND \";\n// $where .= \" (F.create_ts) <= '{$options['to_time']}' \";\n $where .= \" (F.create_ts) <= :To_time \";\n $params[] = array( \"key\" => \":To_time\",\n \"value\" =>$options['to_time']);\n }\n }\n if ($options['published'] == -1) {\n if ($where != '')\n $where .= \" AND \";\n $where .= \" F.published IN (-5,1)\";\n }else {\n if ($where != '')\n $where .= \" AND \";\n// $where .= \" F.published= '{$options['published']}'\";\n $where .= \" F.published= :Published\";\n $params[] = array( \"key\" => \":Published\", \"value\" =>$options['published']);\n }\n\n if ($options['n_results'] == false) {\n $query = \"SELECT\n U.*,F.*, U.id as uid\n FROM\n cms_channel_connections AS F\n INNER JOIN cms_users AS U ON F.userid=U.id\n WHERE $where ORDER BY $orderby $order\";\n if (!is_null($options['limit'])) {\n// $query .= \" LIMIT $skip, $nlimit\";\n $query .= \" LIMIT :Skip, :Nlimit\";\n $params[] = array( \"key\" => \":Skip\",\n \"value\" =>$skip,\n \"type\" =>\"::PARAM_INT\");\n $params[] = array( \"key\" => \":Nlimit\",\n \"value\" =>$nlimit,\n \"type\" =>\"::PARAM_INT\");\n }\n\n// $ret = db_query($query);\n \n\t$select = $dbConn->prepare($query);\n\tPDO_BIND_PARAM($select,$params);\n\t$res = $select->execute();\n\n\t$ret = $select->rowCount();\n $media = array();\n\n// while ($row = db_fetch_array($ret)) {\n $row = $select->fetchAll();\n foreach($row as $row_item){\n if ($row_item['profile_Pic'] == '') { \n $row_item['profile_Pic'] = 'he.jpg';\n if ($row_item['gender'] == 'F') {\n $row_item['profile_Pic'] = 'she.jpg';\n }\n }\n $media[] = $row_item;\n }\n return $media;\n } else {\n $query = \" SELECT\n COUNT(F.id)\n FROM\n cms_channel_connections AS F\n INNER JOIN cms_users AS U ON F.userid=U.id\n WHERE $where\";\n\n// $ret = db_query($query);\n// $row = db_fetch_row($ret);\n\t$select = $dbConn->prepare($query);\n\tPDO_BIND_PARAM($select,$params);\n\t$res = $select->execute();\n $row = $select->fetch();\n\n return $row[0];\n }\n\n\n}", "title": "" }, { "docid": "fa294e918acfb93bf1489fc0c01e78e6", "score": "0.5422086", "text": "public function get_contact_us_list($request)\n {\n if($request['type'] == 'filter')\n {\n if(isset($request['filter']))\n {\n \n $filter = json_decode($request['filter']);\n $query = [];\n\n $list = 'Filter all';\n \n $query = DB::table('taxi_contact_us')\n ->select('taxi_contact_us.*',\n DB::raw('CONCAT(taxi_users.first_name,\" \",taxi_users.last_name) as name'),\n 'taxi_users.mobile_no'\n )\n ->join('taxi_users', 'taxi_contact_us.user_id', '=', 'taxi_users.user_id');\n \n\n if(!empty($filter->username)) // username filter\n {\n $username = explode(' ',$filter->username);\n if(count($username) > 1)\n {\n $query->where(function ($q) use ($username) {\n $q->where('taxi_users.first_name', 'LIKE', '%'.$username[0].'%')->orWhere('taxi_users.last_name', 'LIKE', '%'.$username[1].'%');\n });\n\n }\n else\n {\n $query->where(function ($q) use ($filter) {\n $q->where('taxi_users.first_name', 'LIKE', '%'.$filter->username.'%')->orWhere('taxi_users.last_name', 'LIKE', '%'.$filter->username.'%');\n });\n\n }\n }\n\n if(!empty($filter->message)) // message filter \n {\n $query->where('taxi_contact_us.message', 'LIKE', '%'.$filter->message.'%');\n }\n\n if(!empty($filter->status)) // status filter \n {\n $status = explode(',',$filter->status);\n if(count($status) > 1)\n {\n $query->whereBetween('taxi_contact_us.status',$status);\n }\n else\n {\n $query->where('taxi_contact_us.status',$status[0]);\n }\n\n }\n \n if(!empty($filter->date)) // date filter \n {\n $date = explode(' ',$filter->date);\n $query->whereBetween('taxi_contact_us.created_date',$date);\n }\n\n $contact_us_list = $query->orderBy('taxi_contact_us.id', 'DESC')->paginate(10)->toArray();\n }\n else\n {\n \n return response()->json([\n 'status' => false,\n 'message' => 'filter parameter is required',\n 'data' => new ArrayObject,\n ], 200);\n }\n\n }\n else\n {\n $list = 'All';\n\n $contact_us_list = DB::table('taxi_contact_us')\n ->select('taxi_contact_us.*',\n DB::raw('CONCAT(taxi_users.first_name,\" \",taxi_users.last_name) as name'),\n 'taxi_users.mobile_no'\n )\n ->join('taxi_users', 'taxi_contact_us.user_id', '=', 'taxi_users.user_id')\n ->orderByRaw('taxi_contact_us.id DESC')\n ->paginate(10)->toArray();\n\n }\n\n if($contact_us_list['data']) {\n\n return response()->json([\n 'status' => true,\n 'message' => $list.' Contact us list', \n 'data' => $contact_us_list,\n ], 200);\n }\n else\n {\n return response()->json([\n 'status' => false,\n 'message' => 'No data available', \n 'data' => new ArrayObject,\n ], 200);\n } \n\n }", "title": "" }, { "docid": "59258278e1652f181b60c97be6b50f4a", "score": "0.542007", "text": "public function filterUsers(Request $request)\n {\n //check the authorization\n $this->authorize('listing', [$this->authorizedModel]);\n\n request()->validate([\n 'user_type_id' => 'sometimes|integer|exists:user_types,id',\n ]);\n\n return response(\n $this->obj->getUsersByFilters(\n ($request->has('search') ? $request->input('search') : null),\n ($request->has('user_type_id') ? $request->input('user_type_id') : 0),\n ($request->has('location_ids') ? $request->input('location_ids') : []),\n ($request->has('limit') ? $request->input('limit') : 20),\n ($request->has('sort') ? $request->input('sort') : 'id'),\n ($request->has('order') ? $request->input('order') : 'desc'),\n ($request->has('offset') ? $request->input('offset') : 0)\n )\n );\n }", "title": "" }, { "docid": "08f90b26221c93394617ccb2dd85ee93", "score": "0.5412027", "text": "public function get_list($filter = User_Engine::FILTER_NORMAL)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $raw_list = $this->_get_details($filter, TRUE);\n\n $user_list = array();\n\n foreach ($raw_list as $username => $user_info)\n $user_list[] = $username;\n\n return $user_list;\n }", "title": "" }, { "docid": "ec253b2ff8a2f32008e7b2bb671ee9ca", "score": "0.541118", "text": "public function corporateUsersList(Request $request) {\n $filter = [];\n $search_keyword = $request->get('search_keyword');\n $kyc_status = $request->get('kyc_status');\n $profile_status = $request->get('profile_status');\n $filter['search_keyword'] = '';\n $filter['kyc_status'] = '';\n if ($search_keyword != '' && $search_keyword != null) {\n $filter['search_keyword'] = $search_keyword;\n }\n if ($kyc_status != '' && $kyc_status != null) {\n $filter['kyc_status'] = $kyc_status;\n }\n\n if ($profile_status != '' && $profile_status != null) {\n $filter['profile_status'] = $profile_status;\n }\n\n $usersList = $this->userRepo->getAllUsersPaginate(2, $filter);\n // echo \"<pre>\";\n // print_r($usersList);\n // exit;\n\n return view('backend.users', ['usersList' => $usersList, 'filter' => $filter]);\n }", "title": "" }, { "docid": "f817ea3840771cb881eeeb13b930f09b", "score": "0.5405929", "text": "public function filterUsers(Request $request){\n\n $request->validate([\n 'email' => 'email|nullable',\n 'first_name' => 'string|max:50|nullable',\n 'last_name' => 'string|max:50|nullable',\n 'username' => 'string|max:50|nullable',\n 'status' => 'string|nullable',\n 'order' => 'string|nullable',\n 'id' => 'int|nullable'\n ]);\n\n $email = $request->email;\n $first_name = $request->first_name;\n $last_name = $request->last_name;\n $username = $request->username;\n $id = $request->id;\n $status = $request->status;\n $order = $request->order;\n\n $users = new User();\n\n $whereArray = array();\n\n if($email){\n $whereArray[] = ['email', 'LIKE' ,$email];\n }\n if($first_name){\n $whereArray[] = ['first_name', 'LIKE' ,$first_name];\n }\n if($last_name){\n $whereArray[] = ['last_name', 'LIKE' ,$last_name];\n }\n if($username){\n $whereArray[] = ['username', 'LIKE' ,$username];\n }\n if($status){\n $whereArray[] = ['status', $status];\n }\n if($id){\n $whereArray[] = ['id' ,$id];\n }\n\n if(!empty($whereArray)){\n $users = $users->where($whereArray);\n }\n\n if($order){\n $users = $users->orderBy($order, 'DESC');\n }\n\n $this->adminIndex($order, true, $users);\n\n\n }", "title": "" }, { "docid": "14b78bc1c0ba6e970f7e96c56dfee184", "score": "0.5404274", "text": "public function beforeFilter() {\n \t$this->Auth->allow('add_from_raffle');\n\t$this->Auth->allow('get_from_raffle');\n parent::beforeFilter();\n }", "title": "" }, { "docid": "ec50dd2efd015e61ee085690a59817c3", "score": "0.5403915", "text": "public function listing_init() {\n\t\t\t$this->selectors = array(\n\t\t\t\t'user_id' => array(\n\t\t\t\t\t'type' => 'user',\n\t\t\t\t\t'show_all_value' => '',\n\t\t\t\t\t'show_all_label' => esc_html__( 'All Users', 'learndash' ),\n\t\t\t\t\t'selector_filter_function' => array( $this, 'selector_filter_for_author' ),\n\t\t\t\t\t'selector_value_function' => array( $this, 'selector_value_for_author' ),\n\t\t\t\t),\n\t\t\t\t'group_id' => array(\n\t\t\t\t\t'type' => 'post_type',\n\t\t\t\t\t'post_type' => learndash_get_post_type_slug( 'group' ),\n\t\t\t\t\t'show_all_value' => '',\n\t\t\t\t\t'show_all_label' => sprintf(\n\t\t\t\t\t\t// translators: placeholder: Groups.\n\t\t\t\t\t\tesc_html_x( 'All %s', 'placeholder: Groups', 'learndash' ),\n\t\t\t\t\t\tLearnDash_Custom_Label::get_label( 'groups' )\n\t\t\t\t\t),\n\t\t\t\t\t'show_empty_value' => 'empty',\n\t\t\t\t\t'show_empty_label' => sprintf(\n\t\t\t\t\t\t// translators: placeholder: Group.\n\t\t\t\t\t\tesc_html_x( '-- No %s --', 'placeholder: Group', 'learndash' ),\n\t\t\t\t\t\tLearnDash_Custom_Label::get_label( 'group' )\n\t\t\t\t\t),\n\t\t\t\t\t'listing_query_function' => array( $this, 'listing_filter_by_group' ),\n\t\t\t\t\t'selector_filter_function' => array( $this, 'selector_filter_for_group' ),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\t// If Group Leader remove the selector empty option.\n\t\t\tif ( learndash_is_group_leader_user() ) {\n\t\t\t\t$gl_manage_groups_capabilities = learndash_get_group_leader_manage_groups();\n\t\t\t\tif ( 'advanced' !== $gl_manage_groups_capabilities ) {\n\t\t\t\t\tif ( isset( $this->selectors['group_id'] ) ) {\n\t\t\t\t\t\tunset( $this->selectors['group_id']['show_empty_value'] );\n\t\t\t\t\t\tunset( $this->selectors['group_id']['show_empty_label'] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tparent::listing_init();\n\t\t}", "title": "" }, { "docid": "ffbfd9c1bbb1237575f85f891b35b108", "score": "0.5403303", "text": "private function users()\n\t{\n\t\tif($this->get_request_method() != \"GET\")\n\t\t{\n\t\t\t$this->response('',406);\n\t\t}\n\t\t$sql = mysql_query(\"SELECT user_id, user_fullname, user_email FROM users WHERE user_status = 1\", $this->db);\n\t\tif(mysql_num_rows($sql) > 0)\n\t\t{\n\t\t\t$result = array();\n\t\t\twhile($rlt = mysql_fetch_array($sql,MYSQL_ASSOC))\n\t\t\t{\n\t\t\t\t$result[] = $rlt;\n\t\t\t}\n\t\t\t// If success everything is good send header as \"OK\" and return list of users in JSON format\n\t\t\t$this->response($this->json($result), 200);\n\t\t}\n\t\t$this->response('',204); // If no records \"No Content\" status\n\t}", "title": "" }, { "docid": "4393076d0be44805da7aae817a7c1aa1", "score": "0.5402636", "text": "public function users_list_enqueue() {\n\n\t\twp_enqueue_script(\n\t\t\t'wpforms-admin-users',\n\t\t\tplugin_dir_url( __FILE__ ) . 'assets/js/admin-users.js',\n\t\t\tarray( 'jquery' ),\n\t\t\tWPFORMS_USER_REGISTRATION_VERSION,\n\t\t\ttrue\n\t\t);\n\n\t\twp_localize_script(\n\t\t\t'wpforms-admin-users',\n\t\t\t'wpforms_admin_users',\n\t\t\tarray(\n\t\t\t\t'approve' => esc_html__( 'Approve', 'wpforms-user-registration' ),\n\t\t\t\t'unapprove' => esc_html__( 'Unapprove', 'wpforms-user-registration' ),\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "6f1889d0785928e925e1680e2197c390", "score": "0.53936446", "text": "function wpau_whitelist_users( $new ) {\n\tif ( $new ) {\n\t\t$user_ids = get_users(\n\t\t\tarray(\n\t\t\t\t'blog_id' => '',\n\t\t\t\t'fields' => 'ID',\n\t\t\t)\n\t\t);\n\n\t\tforeach ( $user_ids as $user_id ) {\n\t\t\tupdate_user_meta( $user_id, 'wp-approve-user', true );\n\t\t\tupdate_user_meta( $user_id, 'wp-approve-user-mail-sent', true );\n\t\t}\n\t}\n\n\treturn $new;\n}", "title": "" }, { "docid": "592c9d0d99d819527d812219f1fa5eea", "score": "0.5392726", "text": "function print_filter_user_monitor() {\n\tglobal $t_select_modifier, $t_filter;\n\t?>\n\t<!-- Monitored by -->\n\t\t<select <?php echo $t_select_modifier;?> name=\"user_monitor[]\">\n\t\t\t<option value=\"<?php echo META_FILTER_ANY?>\" <?php check_selected( $t_filter[FILTER_PROPERTY_MONITOR_USER_ID], META_FILTER_ANY );?>>[<?php echo lang_get( 'any' )?>]</option>\n\t\t\t<?php\n\t\t\t\tif( access_has_project_level( config_get( 'monitor_bug_threshold' ) ) ) {\n\t\techo '<option value=\"' . META_FILTER_MYSELF . '\" ';\n\t\tcheck_selected( $t_filter[FILTER_PROPERTY_MONITOR_USER_ID], META_FILTER_MYSELF );\n\t\techo '>[' . lang_get( 'myself' ) . ']</option>';\n\t}\n\t$t_threshold = config_get( 'show_monitor_list_threshold' );\n\t$t_has_project_level = access_has_project_level( $t_threshold );\n\n\tif( $t_has_project_level ) {\n\t\tprint_reporter_option_list( $t_filter[FILTER_PROPERTY_MONITOR_USER_ID] );\n\t}\n\t?>\n\t\t</select>\n\t\t<?php\n}", "title": "" }, { "docid": "5ab010ac0485e7861e61a78f6558ecfe", "score": "0.53916913", "text": "public function getUserList ()\n {\n return $this->getBasicIdSelectList('admin_user_data');\n }", "title": "" }, { "docid": "9b181937c262500eade19f261b1c5ad5", "score": "0.5387122", "text": "public function default_search()\n { \n $this->labmates_model->load_users();\n/* SET :: undergraduates\n****************************************************************************/\n foreach($this->labmates_model->get_registered_universities($undergraduates = \"undergraduate\") as $university)\n {\n $this->undergraduates[$university->university] = $this->labmates_model->get_registered_users($university, $undergraduates = \"undergraduate\");\n } \n/* SET :: graduates\n****************************************************************************/\n foreach($this->labmates_model->get_registered_universities($graduates = \"graduate\") as $university)\n {\n $this->graduates[$university->university] = $this->labmates_model->get_registered_users($university, $graduates = \"graduate\");\n } \n/* SET :: professors\n****************************************************************************/\n foreach($this->labmates_model->get_registered_universities($professors = \"professor\") as $university)\n {\n $this->professors[$university->university] = $this->labmates_model->get_registered_users($university, $professors = \"professor\");\n }\n }", "title": "" }, { "docid": "b7b3ca735aa89641cc2a5ccfb9b27bb9", "score": "0.5384674", "text": "function cronSendAlerts() {\r\r\r\n\t$args = array(\r\r\r\n\t\t'role' => 'contributor',\r\r\r\n\t\t'nopaging' => true\r\r\r\n\t);\r\r\r\n\t\r\r\r\n $user_query = new WP_User_Query( $args );\r\r\r\n\r\r\r\n if (!empty($user_query->results)) {\r\r\r\n\t\tforeach ( $user_query->results as $user ) { \r\r\r\n\t\t\t$user_id = $user->ID;\r\r\r\n\t\t\tcheckUserAlerts($user_id);\r\r\r\n\t\t}\r\r\r\n\t}\t\r\r\r\n}", "title": "" } ]
a225a83a8df7a8b8ccacf10e9e8076c2
Adds as additionalTitle A Composite containing details of an AdditionalTitle of the Release. If multiple instances with an ApplicableTerritoryCode are provided, then the first one provides the default that is then superseded by subsequent instances.
[ { "docid": "11e6568c9b6f46de1802503fd92a7fe3", "score": "0.61360043", "text": "public function addToAdditionalTitle(\\DedexBundle\\Entity\\Ern411\\AdditionalTitleType $additionalTitle)\n {\n $this->additionalTitle[] = $additionalTitle;\n return $this;\n }", "title": "" } ]
[ { "docid": "48b5ebe0648f09d814a886e8f09dfd31", "score": "0.6101038", "text": "public function setAdditionalTitle(array $additionalTitle)\n {\n $this->additionalTitle = $additionalTitle;\n return $this;\n }", "title": "" }, { "docid": "48b5ebe0648f09d814a886e8f09dfd31", "score": "0.6101038", "text": "public function setAdditionalTitle(array $additionalTitle)\n {\n $this->additionalTitle = $additionalTitle;\n return $this;\n }", "title": "" }, { "docid": "1389c2c7b889f8bcafe3069bc20009d0", "score": "0.6027439", "text": "public function getAdditionalTitle()\n {\n return $this->additionalTitle;\n }", "title": "" }, { "docid": "1389c2c7b889f8bcafe3069bc20009d0", "score": "0.6027439", "text": "public function getAdditionalTitle()\n {\n return $this->additionalTitle;\n }", "title": "" }, { "docid": "dd07e4b8e1330dd0bbca08dbd91756f1", "score": "0.5577856", "text": "public function addTitle () {\n $title = 'Supply Chain and Bill of Material Forecast';\n\n $html = $this->render('bom/title', array(\n 'title' => $title,\n ), true);\n\n return $html;\n\n }", "title": "" }, { "docid": "18b7e99c9f10c57ca63feae83de40750", "score": "0.5262184", "text": "public function get_custom_title()\n\t{\n\t\treturn $this->custom_title;\n\t}", "title": "" }, { "docid": "8b120bce4fa77e70b7c1cad0ebcf7a36", "score": "0.5261196", "text": "public function initToolbarTitle()\n {\n parent::initToolbarTitle();\n \n if ($this->display == 'add') {\n $this->toolbar_title = array();\n $this->toolbar_title[] = $this->l('Do a Money out', null, null, false);\n $this->addMetaTitle($this->l('Do a Money out', null, null, false));\n }\n }", "title": "" }, { "docid": "e3ae42217b2b25179c7d3dff3404dc02", "score": "0.5229933", "text": "public function addTitle()\n {\n $this->addElement($this->getTextElement('title', 'Título'));\n return $this;\n }", "title": "" }, { "docid": "14853ee023219f0ad0722fbd3adde23a", "score": "0.5198096", "text": "public function FrontEndExtendedTitle();", "title": "" }, { "docid": "778d8ba0c203425bfe918cdec5b5e69d", "score": "0.5146514", "text": "public function step2CustomTitle()\n\t{\n\t\treturn \"Upgrading blog ratings\";\n\t}", "title": "" }, { "docid": "3af6198e879cc2e73d8ef56551e3129d", "score": "0.50859094", "text": "public function add_title_setting() {\n $this->wp_customize->add_setting(\n self::SETTING_WELCOME_TITLE,\n [\n 'default' => __( '', 'opicking'),\n ]\n );\n\n $this->wp_customize->add_control(\n new WP_Customize_Control(\n $this->wp_customize,\n self::SETTING_WELCOME_TITLE,\n [\n 'section' => self::SECTION_ID,\n 'label' => __( 'Modifier le titre' ),\n 'type' => 'text',\n ]\n )\n );\n }", "title": "" }, { "docid": "23bc3d70789fdc24c22dd129bef4b22a", "score": "0.50599587", "text": "function tecproservices_add_dynamic_title() {\n add_theme_support('title-tag');\n add_theme_support('custom-logo');\n}", "title": "" }, { "docid": "b7aaf327f914628e685ddda9cf9b4551", "score": "0.50563234", "text": "function set_organisation_post_title( $post_id )\n {\n\n if (!(wp_is_post_revision($post_id) || wp_is_post_autosave($post_id))) {\n return;\n }\n\n $orga_name = get_field('nomenclature_link',$post_id)->name;\n\n if(empty($orga_name)){\n $orga_name = get_field('mv_orga_organisation_name_to_be_added',$post_id);\n }\n\n\n $content = array(\n 'ID' => $post_id,\n 'post_title' => $orga_name,\n 'post_name' => sanitize_title($orga_name),\n 'post_status' => 'publish'\n );\n\n remove_action('save_post_organisation', array( $this, 'set_organisation_post_title') );\n wp_update_post($content);\n add_action('save_post_organisation', array( $this, 'set_organisation_post_title') );\n }", "title": "" }, { "docid": "91e9b094506c225d9cec88711b34a2f3", "score": "0.50104386", "text": "public function get_title() {\n\t\treturn __( 'Atl Process', 'atl-extension' );\n\t}", "title": "" }, { "docid": "f0beb6789105cec756d28eca083a8a31", "score": "0.50098866", "text": "public function step3CustomTitle()\n\t{\n\t\treturn \"Upgrading blog entries\";\n\t}", "title": "" }, { "docid": "7b0ffefad1f0f533a69f4d410ca99772", "score": "0.49812678", "text": "public function step1CustomTitle()\n\t{\n\t\treturn \"Removing announcement widgets\";\n\t}", "title": "" }, { "docid": "0f68831e12592b28289a4ef0b3295438", "score": "0.49726108", "text": "public function get_title() {\n\t\treturn __( 'CTA Text', 'elementor-call-to-action' );\n\t}", "title": "" }, { "docid": "38054b0b72a0debaf120cabe5746495d", "score": "0.49724075", "text": "function entry_title_atts( $attributes, $context, $atts ) {\n\t\tif ( ! $this->is_testimonial( $atts ) ) {\n\t\t\treturn $attributes;\n\t\t}\n\t\t$attributes['itemprop'] = 'name';\n\t\treturn $attributes;\n\t}", "title": "" }, { "docid": "1d83a66dcc7c4184989c656532a44145", "score": "0.49706852", "text": "private function displayTitle()\n {\n ?>\n <h1 class=\"wp-heading-inline\">\n <?php echo $this->title ?>\n </h1>\n\n <?php if ( ! empty( $this->getAddNewUri() ) && ! empty( $this->getAddNewLabelAttribute() ) ) : ?>\n\n <a href=\"<?php echo esc_url( $this->getAddNewUri() ); ?>\"\n class=\"page-title-action\">\n <?php echo $this->getAddNewLabelAttribute() ?>\n </a>\n\n <?php endif; ?>\n\n <hr class=\"wp-header-end\">\n\n <h2 class=\"screen-reader-text\">\n <?php echo $this->title ?>\n </h2>\n <?php\n }", "title": "" }, { "docid": "3ad666208cadc92a2e8f17aeab11b14f", "score": "0.4920154", "text": "function hfsi_customize_partial_organization_title() {\n if ( ( get_theme_mod( 'organization_title' ) ) != '' ) {\n $organization_title = get_theme_mod( 'organization_title' );\n echo $organization_title;\n }\n}", "title": "" }, { "docid": "0fbc7012d7c6c7835223ff92f71126dc", "score": "0.49172112", "text": "public function withTitle($title);", "title": "" }, { "docid": "800935f8095015c2aff3b23f83840649", "score": "0.49142483", "text": "public function get_title() {\n\t\treturn __( 'Atl Bannar', 'atl-extension' );\n\t}", "title": "" }, { "docid": "3911a92058ed5b753fa00a69f12b9d5b", "score": "0.48942286", "text": "public function addTitle( $title )\n\t\t{\n\t\t\t$this->addTitleBrowser( $title );\n\t\t\t$this->addTitlePage( $title );\n\t\t}", "title": "" }, { "docid": "3c6edd6c445f7d690bfaac650647a6d7", "score": "0.48610216", "text": "public function _title(){/* +1 Overload */\n\t\t\t$a=func_get_args();\n\t\t\tif(isset($this->title)){$this->head(($this->title!==false)?'<title>'.$this->title.((isset($a[0]))?$a[0]:'').'</title>':'');}\n\t\t\t}", "title": "" }, { "docid": "35b7f6ecf98fc1864ac1c0b96241a9a1", "score": "0.48582277", "text": "public function step5CustomTitle()\n\t{\n\t\treturn \"Converting blog group settings\";\n\t}", "title": "" }, { "docid": "3266143e73b482239ab79908afb5b4d7", "score": "0.4848228", "text": "function hfsi_customize_partial_organization_banner_title() {\n if ( ( get_theme_mod( 'organization_banner_title' ) ) != '' ) {\n echo get_theme_mod( 'organization_banner_title' );\n }\n}", "title": "" }, { "docid": "8aaeceba61fa4800bc3eb89ce9ef5bbd", "score": "0.4842994", "text": "public function setTitle( $newTitle ) { $this->Title = $newTitle; }", "title": "" }, { "docid": "61b1db32ab22947f4b203f184ebda1cd", "score": "0.4811542", "text": "protected function _buildTitle()\n\t{\n\t\t$this->_title = Lang::txt(strtoupper($this->_option));\n\t\tif ($this->_task)\n\t\t{\n\t\t\t$this->_title .= ': ' . Lang::txt(strtoupper($this->_option) . '_' . strtoupper($this->_task));\n\t\t}\n\n\t\tApp::get('document')->setTitle($this->_title);\n\t}", "title": "" }, { "docid": "ef7393a59584d1d1afa5c317df136295", "score": "0.48053402", "text": "public function title(string $text = '', string $subtext = '')\n {\n $this->setOptions([\n 'title' => [\n 'text' => $text,\n 'subtext' => $subtext,\n 'left' => 'middle'\n ]\n ]);\n\n return $this;\n }", "title": "" }, { "docid": "e636915179657c328bb877fb0bb1b4b7", "score": "0.4783447", "text": "function the_hrb_project_title( $post_id = 0, $before = '', $after = '', $atts = array() ) {\n\t$post_id = get_the_hrb_loop_id( $post_id );\n\n\t$title = get_the_title( $post_id );\n\n\t$post_type = get_post_type( $post_id );\n\n\t$defaults = array(\n\t\t'href'\t\t\t=> esc_url( get_permalink( $post_id ) ),\n\t\t'title'\t\t\t=> esc_attr( $title ),\n\t\t'class'\t\t\t=> \"{$post_type}-title\",\n\t\t'rel'\t\t\t=> 'bookmark',\n\t\t'featured_tag'\t=> 'span',\n\t);\n\t$atts = wp_parse_args( $atts, $defaults );\n\n\tif ( 'pending' != get_post_status( $post_id ) ) {\n\t\t$title_link = html( 'a', $atts, $title );\n\t} else {\n\t\tunset( $atts['href'] );\n\t\t$title_link = html( 'span', $atts, $title );\n\t}\n\n\tif ( ! empty( $atts['featured_tag'] ) && is_hrb_project_featured( $post_id ) ) {\n\n\t\t$attr_featured = array(\n\t\t\t'class' => hrb_project_featured_class( $post_id ),\n\t\t);\n\n\t\t$title = html( $atts['featured_tag'], $attr_featured, $title );\n\t}\n\n\techo $before . $title_link . $after;\n}", "title": "" }, { "docid": "77fe978c83df3a99e96ed0c7989a36c7", "score": "0.47412488", "text": "public function addToDisplayTitle(\\DedexBundle\\Entity\\Ern411\\DisplayTitleType $displayTitle)\n {\n $this->displayTitle[] = $displayTitle;\n return $this;\n }", "title": "" }, { "docid": "77fe978c83df3a99e96ed0c7989a36c7", "score": "0.47412488", "text": "public function addToDisplayTitle(\\DedexBundle\\Entity\\Ern411\\DisplayTitleType $displayTitle)\n {\n $this->displayTitle[] = $displayTitle;\n return $this;\n }", "title": "" }, { "docid": "c65c6895ae81efa26acc3d913a507d6e", "score": "0.4740834", "text": "public function setAdditionalText($additional_text)\n {\n $this->additional_text = $additional_text;\n return $this;\n }", "title": "" }, { "docid": "e256e9d1e00e6dbfee0371c5720128dd", "score": "0.47376862", "text": "public function setTitle()\n {\n parent::setTitle($this->item->getTitle());\n }", "title": "" }, { "docid": "0fc8e3f83ad870a114efae849a599401", "score": "0.47244647", "text": "function api_display_tool_title($title_element) {\n if (is_string($title_element)) {\n $tit = $title_element;\n unset ($title_element);\n $title_element['mainTitle'] = $tit;\n }\n echo '<h3>';\n if (!empty($title_element['supraTitle'])) {\n echo '<small>'.$title_element['supraTitle'].'</small><br />';\n }\n if (!empty($title_element['mainTitle'])) {\n echo $title_element['mainTitle'];\n }\n if (!empty($title_element['subTitle'])) {\n echo '<br /><small>'.$title_element['subTitle'].'</small>';\n }\n echo '</h3>';\n}", "title": "" }, { "docid": "d99fa8072e9879f1c8d6f05197d2d344", "score": "0.47207215", "text": "public function setBrandTitle($title);", "title": "" }, { "docid": "8839418e160fd7b7ed15bb0ab067f94e", "score": "0.47060633", "text": "function ufandshands_content_title() {\n\n\t$custom_meta = get_post_custom($post->ID);\n\n\tif(is_page($post->ID)) {\n\t\t$custom_subtitle = $custom_meta['custom_meta_page_subtitle'][0];\n\t} elseif(is_single($post->ID)) {\n\t\t$custom_subtitle = $custom_meta['custom_meta_post_subtitle'][0];\n\t} else {\n\t\treturn;\n\t}\n\n\t$title = '<h1>' . get_the_title();\n\tif(isset($custom_subtitle)) :\n\t\t$title .= \"<span class='medium-blue'>: \" . $custom_subtitle . \"</span>\";\n\tendif;\n\t$title .= '</h1>';\n\n\techo apply_filters('ufandshands_title', $title);\n\n}", "title": "" }, { "docid": "ac560a992925bcf380137ab2614b4bfa", "score": "0.4702478", "text": "function builder_add_title() {\n\t$seperator = apply_filters( 'builder_filter_title_seperator', '::' );\n\t\n\t$direction = ( is_rtl() ) ? 'left' : 'right';\n\t$direction = apply_filters( 'builder_filter_title_direction', $direction );\n\t\n\t$title = trim( wp_title( $seperator, false, $direction ) );\n\t\n\t$title = apply_filters( 'builder_filter_title', $title );\n\t\n\techo \"<title>$title</title>\\n\";\n}", "title": "" }, { "docid": "fe54cbdfd179960b1a93136f4b966c52", "score": "0.47023082", "text": "function flow_elated_add_admin_section_title($attributes) {\n $parent = '';\n $name = '';\n $title = '';\n\n extract($attributes);\n\n if(is_object($parent) && !empty($title) && !empty($name)) {\n $section_title = new FlowTitle($name, $title);\n $parent->addChild($name, $section_title);\n\n return $section_title;\n }\n\n return false;\n }", "title": "" }, { "docid": "6ff92bab7339593a59b659f547aa4091", "score": "0.46966055", "text": "function get_title($title) {\n global $tard;\n return $title . (isset($tard['title_append']) ? $tard['title_append'] : null);\n}", "title": "" }, { "docid": "18612918275d9a445a1caec01dcde4f6", "score": "0.4693319", "text": "public function get_title() {\n\t\treturn __( 'Advanced Share Buttons', 'advanced-share-buttons-widget' );\n\t}", "title": "" }, { "docid": "2c2a3b79a0deba042fea1b70110d5e95", "score": "0.46924594", "text": "public function getTitle()\n {\n if($this->hasOverridenTitle())\n {\n return parent::getTitle();\n }\n\n $title_parts = array();\n if(self::$LONG_TITLES)\n {\n if($this->getID3Album()) $title_parts[] = $this->getID3Album();\n if($this->getID3Artist()) $title_parts[] = $this->getID3Artist();\n }\n if($this->getID3Title())\n {\n $title_parts[] = $this->getID3Title();\n }\n if(!empty($title_parts))\n {\n return implode(' - ', $title_parts);\n }\n return parent::getTitle();\n }", "title": "" }, { "docid": "b5e46d59caee68d9fa9999ce8cfdb430", "score": "0.46863285", "text": "public function addToReferencedCreationTitle(\\DedexBundle\\Entity\\Ern382\\TitleType $referencedCreationTitle)\n {\n $this->referencedCreationTitle[] = $referencedCreationTitle;\n return $this;\n }", "title": "" }, { "docid": "56ecb587f664b49092e5ba993d80f172", "score": "0.4684032", "text": "public static function title() {\n\t\t$title = func_get_args();\n\n\t\treturn parent::title(implode(' ', $title));\n\t}", "title": "" }, { "docid": "4d52345ed462b585bd3f69d6b5ab758f", "score": "0.46754074", "text": "public function relevant_industry_add()\n\t{\n\t\t$data['ri_name'] = $this->input->post('ri_name');\n\t\t$data['modified_on'] = date('Y-m-d H:i:s');\n\t\t$data['status'] = 0;\n\n\t\t$result = $this->Setting_model->relevant_industry_add($data);\n\n\t\t$this->session->set_flashdata('ri_success', 'Relevant Industry has been added successfully.');\n\t redirect('/settings/relevant_industry');\n\t}", "title": "" }, { "docid": "8e5ae939217a3f32e88c4c8a06ef4137", "score": "0.46727997", "text": "public function setSubTitle($title)\n {\n $this->subTitle = $title;\n }", "title": "" }, { "docid": "ba1df683530a04340037184c6711ec4f", "score": "0.46727377", "text": "function _addChannelTitle()\n {\n if (!empty($this->channelTitle)) {\n $this->xmlDocument .= $this->_visualElementLevel().\"<title>\".$this->channelTitle.\"</title>\\n\";\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "f9cf5be0f480a31bf83e2f61c7a1a980", "score": "0.46723643", "text": "protected function _baseTitle() {\n $this->_title($this->__('Sales'))->_title($this->__('Order tickets'));\n }", "title": "" }, { "docid": "45ad5fcc17cd382d6321812211ccf1db", "score": "0.46650016", "text": "function qode_listing_get_title_tag( $first_empty = false, $additional_elements = array() ) {\n\t\t$title_tag = array();\n\n\t\tif ( $first_empty ) {\n\t\t\t$title_tag[''] = esc_html__( 'Default', 'qode-listing' );\n\t\t}\n\n\t\t$title_tag['h1'] = 'h1';\n\t\t$title_tag['h2'] = 'h2';\n\t\t$title_tag['h3'] = 'h3';\n\t\t$title_tag['h4'] = 'h4';\n\t\t$title_tag['h5'] = 'h5';\n\t\t$title_tag['h6'] = 'h6';\n\n\t\tif ( ! empty( $additional_elements ) ) {\n\t\t\t$title_tag = array_merge( $title_tag, $additional_elements );\n\t\t}\n\n\t\treturn $title_tag;\n\t}", "title": "" }, { "docid": "67cda414d3871010feff336f67c8cba4", "score": "0.46502215", "text": "private function _setTitle()\n {\n $title = $this->_getElementText('Title');\n if (false === $title || '' == trim($title)) {\n $title = self::ELEMENT_TITLE_DEFAULT;\n }\n $this->_coins['rft.title'] = $title;\n }", "title": "" }, { "docid": "2d5da2a1dae7b26a0770a0b44a6f4786", "score": "0.4648499", "text": "public function addToDisplayTitleText(\\DedexBundle\\Entity\\Ern411\\DisplayTitleTextType $displayTitleText)\n {\n $this->displayTitleText[] = $displayTitleText;\n return $this;\n }", "title": "" }, { "docid": "2d5da2a1dae7b26a0770a0b44a6f4786", "score": "0.4648499", "text": "public function addToDisplayTitleText(\\DedexBundle\\Entity\\Ern411\\DisplayTitleTextType $displayTitleText)\n {\n $this->displayTitleText[] = $displayTitleText;\n return $this;\n }", "title": "" }, { "docid": "5888c17a3162c117390e53557a9007f3", "score": "0.46474877", "text": "public function relevant_industry_add_page()\n\t{\n\t\t$this->load->view('settings/relevant_industry/ri_add');\n\t}", "title": "" }, { "docid": "2be2308b110d49d5c95c5acf3c4a6193", "score": "0.46411604", "text": "private function setup_name() {\n\t\t$title = get_the_title( $this->ID );\n\t\treturn $title;\n\t}", "title": "" }, { "docid": "5fc1de0c3ca19937e563344bc055d759", "score": "0.46398735", "text": "public function title($title)\n\t{\n\t\treturn $this->append('title', $title);\n\t}", "title": "" }, { "docid": "0542e68880c0d1bf21f92080c2058ee5", "score": "0.46397495", "text": "public function title($title){\n $this->addAction('HTML', ['selector' => 'title', 'data' => $title]);\n }", "title": "" }, { "docid": "2d7f559a517718aa1a5eaded33616fd5", "score": "0.4638239", "text": "public function _buildTitle()\n\t{\n\t\t//set title used in view\n\t\t$this->_title = Lang::txt(strtoupper($this->_option));\n\n\t\tif ($this->_task && $this->_task != 'intro')\n\t\t{\n\t\t\t$this->_title .= ': ' . Lang::txt(strtoupper($this->_option . '_' . $this->_task));\n\t\t}\n\n\t\t//set title of browser window\n\t\t\\Document::setTitle($this->_title);\n\t}", "title": "" }, { "docid": "1d79f09668b3efe473da3dca93daf098", "score": "0.46348315", "text": "public function addTitlesToAccount($account, $apiInformation) {\n\n\t\t// First, what titles is the user buying with this offer? And what dates/numbers etc\n\t\t$offerTitles = $this->getTitlesFromOffer($apiInformation);\n\t\t//echo 'offer has '.count($offerTitles).' titles'.'<br/>';\n\t\t\n\t\t// Next, do any of these 'clash' with existing titles in the account\n\t\tforeach ($offerTitles as $newTitle) {\n\t\t\t//echo \"offer title is \".$newTitle->productCode.'<br/>';\n\t\t\tforeach ($account->titles as $title) {\n\t\t\t\t//echo \"Existing title is \".$title->productCode.' expiring on '.$title-> expiryDate.'<br/>';\n\t\t\t\tif ($title->productCode == $newTitle-> productCode) {\n\t\t\t\t\t//echo 'add same one but expiring on '.$newTitle-> expiryDate.'<br/>';\n\t\t\t\t\t// TODO: This is not a sensible renewal set of rules\n\t\t\t\t\t// Take the latest expiry date and the corresponding number of students\n\t\t\t\t\tif (!$newTitle->expiryDate > $title-> expiryDate) {\n\t\t\t\t\t\t// The new title doesn't extend the existing one, so just delete it?\n\t\t\t\t\t\tthrow new Exception(\"Unexpected: the new title doesn't extend the old one.\".$title->productCode);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// We have a matching title that somehow needs to be extended. But exactly how?\n\t\t\t\t\t\t// Dumb answer is just to remove old title and let it be added back with the new parameters.\n\t\t\t\t\t\t$account->removeTitles(array($title));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// No date clash, so add this title to the account\n\t\t\t$account->addTitles(array($newTitle));\n\t\t}\n\t\t\n\t\treturn $account;\n\t}", "title": "" }, { "docid": "1506f657b525af89d12efb21dcfcc7f0", "score": "0.46315107", "text": "protected function __get_title()\n\t{\n\t\t$default = isset($this->tags[self::T_TITLE]) ? $this->tags[self::T_TITLE] : 'Undefined';\n\n\t\treturn t($this->flat_id, array(), array('scope' => array('module', 'title'), 'default' => $default));\n\t}", "title": "" }, { "docid": "c83da2b25c81b938e9b4e0773d42594d", "score": "0.46292797", "text": "function get_custom_title_tag() {\n global $custom_title_plugin_instance;\n return $custom_title_plugin_instance->getCustomTitle();\n}", "title": "" }, { "docid": "70a3446a759ca10539f355c394523198", "score": "0.46278563", "text": "function AddPageTitle($getPageTitle){\r\n\t\t\tglobal $amactive,$PageTitle;\r\n\t\t\t$PageTitle = $getPageTitle;\r\n\t\t\t$PageTitleReturn = '<title>[ '.$amactive['version'].' ] : '.$getPageTitle.'</title>'.\"\\r\\n\";\r\n\t\t\treturn $PageTitleReturn;\r\n\t\t}", "title": "" }, { "docid": "01162150b95b4ac0f7eaaca751b8f77c", "score": "0.46173617", "text": "public function setup_title() {\n\t\t$bp = buddypress();\n\n\t\t// Adjust title based on view\n\t\tif ( bp_is_forums_component() ) {\n\t\t\tif ( bp_is_my_profile() ) {\n\t\t\t\t$bp->bp_options_title = __( 'Forums', 'buddypress' );\n\t\t\t} else {\n\t\t\t\t$bp->bp_options_avatar = bp_core_fetch_avatar( array(\n\t\t\t\t\t'item_id' => bp_displayed_user_id(),\n\t\t\t\t\t'type' => 'thumb',\n\t\t\t\t\t'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_displayed_user_fullname() )\n\t\t\t\t) );\n\t\t\t\t$bp->bp_options_title = bp_get_displayed_user_fullname();\n\t\t\t}\n\t\t}\n\n\t\tparent::setup_title();\n\t}", "title": "" }, { "docid": "91861f2926602d243e3032ca8a1cf77e", "score": "0.46060103", "text": "function uc_custom_title_text( $translation, $text, $domain ) {\n\n\tglobal $post;\n\tif ( ! isset( $post->post_type ) )\n\t\treturn $translation;\n\n\t$temp = get_translations_for_domain( $domain );\n\t$translations = &$temp;\n\t$translation_array = array();\n\n\tswitch ($post->post_type) {\n\n\t\tcase 'ucl_agent': // custom post type name\n\t\t\t$translation_array = array(\n\t\t\t\t'Enter title here' => 'Enter agent name here'\n\t\t\t);\n\t\t\tbreak;\n\n\t\tcase 'ucl_author':\n\t\t\t$translation_array = array(\n\t\t\t\t'Enter title here' => 'Enter author name here'\n\t\t\t);\n\t\t\tbreak;\n\t}\n\n\tif ( array_key_exists( $text, $translation_array ) )\n\t\treturn $translations->translate( $translation_array[$text] );\n\n\treturn $translation;\n}", "title": "" }, { "docid": "74d5031b0e4dcdc0bfe884bcb8967d1f", "score": "0.46047297", "text": "public function FrontEndShortTitle();", "title": "" }, { "docid": "da053d576c34ec75241e3d04ba7b3433", "score": "0.4603356", "text": "public function get_title() {\n return esc_html__( 'About Us Custom', 'elementor-wtp-addon' );\n }", "title": "" }, { "docid": "88b47bf1e77f6f654b8d617bf2f446e3", "score": "0.4598958", "text": "private function _maybe_create_title_variation( $title, $data ) {\n\t\t// If this is a variation then add the variation attributes to the ticket title.\n\t\tif ( ! empty( $data['variations'] ) ) {\n\t\t\t$title = sprintf(\n\t\t\t\t__( '%1$s (%2$s)', 'woocommerce-box-office' ),\n\t\t\t\t$title,\n\t\t\t\twc_get_formatted_variation( $data['variations'], true )\n\t\t\t);\n\t\t}\n\n\t\treturn apply_filters( 'woocommerce_box_office_create_ticket_title', $title );\n\t}", "title": "" }, { "docid": "1b6bebe275d1d683469222e3b2cff96a", "score": "0.459568", "text": "public function setTitle($newTitle) {\n\t\t$this->title = $newTitle;\n\t}", "title": "" }, { "docid": "567d9111e51741e7c6bd463baf82570a", "score": "0.45926547", "text": "public function addTitle($title)\n\t{\n\t\t$this->pageTitle[] = $title;\n\n\t\treturn $this->pageTitle;\n\t}", "title": "" }, { "docid": "946a9a0bc3bf715c87c842918c0daa64", "score": "0.45867145", "text": "public function init() {\r\n\t\tadd_filter( 'enter_title_here', [ $this, 'filter_enter_title_here' ], 10, 2 );\r\n\r\n\t}", "title": "" }, { "docid": "7dc452bd87393e3a4c0461a8601ab550", "score": "0.4576559", "text": "public function setTitle($var)\n {\n GPBUtil::checkString($var, True);\n $this->title = $var;\n\n return $this;\n }", "title": "" }, { "docid": "7dc452bd87393e3a4c0461a8601ab550", "score": "0.4576559", "text": "public function setTitle($var)\n {\n GPBUtil::checkString($var, True);\n $this->title = $var;\n\n return $this;\n }", "title": "" }, { "docid": "7dc452bd87393e3a4c0461a8601ab550", "score": "0.4576559", "text": "public function setTitle($var)\n {\n GPBUtil::checkString($var, True);\n $this->title = $var;\n\n return $this;\n }", "title": "" }, { "docid": "7dc452bd87393e3a4c0461a8601ab550", "score": "0.4576559", "text": "public function setTitle($var)\n {\n GPBUtil::checkString($var, True);\n $this->title = $var;\n\n return $this;\n }", "title": "" }, { "docid": "cbda12f16582566a9dc8b5cb6e52474c", "score": "0.45759818", "text": "public function setTitle($var)\n {\n GPBUtil::checkString($var, True);\n $this->Title = $var;\n\n return $this;\n }", "title": "" }, { "docid": "c38ba39ded85a5603ab46087f859e14e", "score": "0.45600682", "text": "function setTitle($new_title)\n {\n $this->title = (string) $new_title;\n }", "title": "" }, { "docid": "1ab12d81e686894cfbe8bb5474b81019", "score": "0.45558494", "text": "function specialization() {\n $this->title = isset($this->config->title) ? $this->config->title : '';\n }", "title": "" }, { "docid": "f09661b2d242e79ef2113dea0dd98ab7", "score": "0.45540607", "text": "function rosewellness_hook_begin_post_title() {\n do_action('rosewellness_hook_begin_post_title');\n}", "title": "" }, { "docid": "5750cc0a17ce37def55b9283b6f63878", "score": "0.45520294", "text": "function empexhibitor(){\n\t\t$this->set('meta_title','Exhibitor Resources');\n\t}", "title": "" }, { "docid": "ce1f7f813dfb24edf53da2ec4c56481d", "score": "0.45481563", "text": "public function load_title_tag( $title ) {\n\n\t\t// Don't mess with the RSS feed.\n\t\tif ( is_feed() ) {\n\t\t\treturn $title;\n\t\t}\n\n\t\t// Handle front, blog, and singular items.\n\t\tif ( is_home() || is_front_page() || is_singular( minshare_meta()->supported_types() ) ) {\n\n\t\t\t// Figure out if I have a post ID.\n\t\t\t$the_id = is_singular() ? get_the_ID() : 0;\n\n\t\t\t// Check for a saved meta title and update the array if we have it.\n\t\t\tif ( false !== $custom = MinimumViableMeta_Helper::get_single_tags( $the_id, 'title' ) ) {\n\t\t\t\t$title['title'] = esc_attr( $custom );\n\t\t\t}\n\t\t}\n\n\t\t// Return our original item.\n\t\treturn $title;\n\t}", "title": "" }, { "docid": "50bcdc1fa0591118591a346d3d536dfc", "score": "0.45470572", "text": "public function getMainTitle()\n {\n return $this->__toString();\n }", "title": "" }, { "docid": "5ad82f10c262179efaec5a2b601c4e0a", "score": "0.45442685", "text": "public function shop_loop_item_title() {\n\n\t\tthe_subtitle( '<p class=\"woocommerce-loop-product__subtitle wp-subtitle\">', '</p>' );\n\n\t}", "title": "" }, { "docid": "6dfb6a877c2669757e6b718ec086519c", "score": "0.45427853", "text": "function cunifymax_customers_set_title($data, $postarr) {\n\n $post_type = get_post_type();\n\n $is_valid_nonce = (isset($_POST['cunifymax_' . $post_type . '_nonce']) && wp_verify_nonce($_POST['cunifymax_' . $post_type . '_nonce'], basename(__DIR__))) ? true : false;\n\n // Exits script depending on save status\n if (!$is_valid_nonce) {\n return $data;\n }\n\n $data['post_title'] = ($postarr['title'] == '' && $postarr['name'] != '') ? sanitize_text_field($postarr['name']) : sanitize_text_field($postarr['title']); // Updated title\n $data['post_content'] = ($postarr['description'] != '' ) ? sanitize_text_field($postarr['description']) : ''; // Updated content\n $data['post_name'] = sanitize_title(sanitize_title_with_dashes($data['post_title'], '', 'save'));\n\n return $data;\n}", "title": "" }, { "docid": "ad946781785ab8ab4df9aec4dc966b56", "score": "0.45421848", "text": "protected function _formatTitle()\n\t{\n\t\t$title = empty($this->title) && method_exists($this->_model(), 'label') && !empty($this->_model()->label()) ? $this->_model()->label() : $this->title;\n\t\t$description = empty($this->subTitle) && method_exists($this->_model(), 'description') && !empty($this->_model()->description()) ? $this->_model()->description() : $this->subTitle;\n\n\t\t// Defaut config\n\t\t$titleDefaults = [\n\t\t\t'value' => $title,\n\t\t\t'ucfirst' => true,\n\t\t\t'period' => true\n\t\t];\n\n\t\t// List of titles\n\t\t$titles = [\n\t\t\t'title_for_layout' => [\n\t\t\t\t'value' => $title,\n\t\t\t\t'period' => false\n\t\t\t],\n\t\t\t'subtitle_for_layout' => [\n\t\t\t\t'value' => $description\n\t\t\t]\n\t\t];\n\t\tforeach ($titles as $tag => $options) {\n\t\t\t$options = array_merge($titleDefaults, $options);\n\n\t\t\tif (!isset($this->viewVars[$tag]) && !empty($options['value'])) {\n\t\t\t\t$text = $options['value'];\n\n\t\t\t\t//\n\t\t\t\t// Format title\n\t\t\t\tif ($options['ucfirst'] == true) {\n\t\t\t\t\t$text = ucfirst($text);\n\t\t\t\t} else {\n\t\t\t\t\t$text = lcfirst($text);\n\t\t\t\t}\n\n\t\t\t\tif ($options['period'] == true && substr($text, -1) !== '.') {\n\t\t\t\t\t$text .= '.';\n\t\t\t\t} elseif ($options['period'] == false && substr($text, -1) === '.') {\n\t\t\t\t\t$text = substr($text, 0, -1);\n\t\t\t\t}\n\t\t\t\t//\n\t\t\t\t\n\t\t\t\t$this->set($tag, $text);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c28a2a8650ec444c0bce53041728b59f", "score": "0.45397776", "text": "function newfeature_archive_title( $title ) {\n if ( is_category() ) {\n $title = single_cat_title( '', false );\n } elseif ( is_tag() ) {\n $title = single_tag_title( '', false );\n } elseif ( is_author() ) {\n $title = '<span class=\"vcard\">' . get_the_author() . '</span>';\n } elseif ( is_post_type_archive() ) {\n $title = post_type_archive_title( '', false );\n } elseif ( is_tax() ) {\n $title = single_term_title( '', false );\n }\n \n return $title;\n}", "title": "" }, { "docid": "dadce6b0fc083229edcf9b991fabb903", "score": "0.4537161", "text": "public function get_title() {\n\t\treturn __( 'Atl Testimonial', 'atl-extension' );\n\t}", "title": "" }, { "docid": "ba323f78131504803bddbfa0b72f5025", "score": "0.45333755", "text": "public function addTitle($text, $depth = 1) {\n\t\t$text = utf8encode_dummy($text);\n\t\t$styles = PHPWord_Style::getStyles();\n\t\tif(array_key_exists('Heading_'.$depth, $styles)) {\n\t\t\t$style = 'Heading'.$depth;\n\t\t} else {\n\t\t\t$style = null;\n\t\t}\n\t\t\n\t\t$title = new PHPWord_Section_Title($text, $depth, $style);\n\t\t\n\t\t$data = PHPWord_TOC::addTitle($text, $depth);\n\t\t$anchor = $data[0];\n\t\t$bookmarkId = $data[1];\n\t\t\n\t\t$title->setAnchor($anchor);\n\t\t$title->setBookmarkId($bookmarkId);\n\t\t\n\t\t$this->_elementCollection[] = $title;\n\t\treturn $title;\n\t}", "title": "" }, { "docid": "5cd64ef67f664c268ff22e187e53e4ee", "score": "0.4530215", "text": "public function enter_title_here ( $title ) {\n\t\tif ( get_post_type() == $this->token ) {\n\t\t\t$title = __( 'Enter the customer\\'s name here', 'woothemes-testimonials' );\n\t\t}\n\t\treturn $title;\n\t}", "title": "" }, { "docid": "217608bab2ac50694d7ab9bddf64593d", "score": "0.45164058", "text": "public function setTitle($title) {\r\n\t\t\t$this->data['title'] = $title;\r\n\t\t}", "title": "" }, { "docid": "d804e1adc3c13de8e1e695fb5b5e7421", "score": "0.4511845", "text": "function green_woocommerce_the_title($title) {\n\t\tif (green_get_global('in_product_item') && get_post_type()=='product') {\n\t\t\t$title = '<a href=\"'.get_permalink().'\">'.($title).'</a>';\n\t\t}\n\t\treturn $title;\n\t}", "title": "" }, { "docid": "b6224b209269e8f087b4eec1fe3efd68", "score": "0.45117977", "text": "public static function getTitle(): string\n {\n return 'SeAT Group Applications';\n }", "title": "" }, { "docid": "b363ed1640dd3345f2076e53c8428785", "score": "0.45097443", "text": "public function getAdditionalText()\n {\n return $this->additional_text;\n }", "title": "" }, { "docid": "424bbe268406896708c69158a86d6387", "score": "0.45090497", "text": "function specialization() {\n if (empty($this->config->title)) {\n $this->title = get_string('blocktagstitle','tag');\n } else {\n $this->title = $this->config->title;\n }\n }", "title": "" }, { "docid": "bf3e7b7084d241abb46c176d7a3647df", "score": "0.45083365", "text": "public function setTitle(string $title = null) : CNabuDataObject\n {\n $this->setValue('nb_catalog_taxonomy_lang_title', $title);\n \n return $this;\n }", "title": "" }, { "docid": "d478e26d5654d2e667bc538fabd74d7e", "score": "0.45064077", "text": "function lsx_tec_global_header_title( $title ) {\n\n\t\tif ( tribe_is_community_edit_event_page() ) {\n\n\t\t\t$is_route = get_query_var( 'WP_Route' );\n\t\t\tswitch ( $is_route ) {\n\t\t\t\tcase 'ce-edit-route':\n\t\t\t\t\t$title = apply_filters( 'tribe_ce_edit_event_page_title', __( 'Edit an Event', 'lsx' ) );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'ce-edit-organizer-route':\n\t\t\t\t\t$title = __( 'Edit an Organizer', 'lsx' );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'ce-edit-venue-route':\n\t\t\t\t\t$title = __( 'Edit a Venue', 'lsx' );\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t$title = apply_filters( 'tribe_ce_submit_event_page_title', __( 'Submit an Event', 'lsx' ) );\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t} else if ( tribe_is_community_my_events_page() ) {\n\t\t\t$title = apply_filters( 'tribe_ce_submit_event_page_title', __( 'My Events', 'lsx' ) );\n\t\t} else if ( tribe_is_event() ) {\n\t\t\t$title = tribe_get_events_title();\n\t\t}\n\n\t\t//Only disable the title after we have retrieved it\n\t\tadd_filter( 'tribe_get_events_title', 'lsx_text_disable_body_title', 200, 1 );\n\n\t\tif ( is_singular( 'tribe_events' ) ) {\n\t\t\tadd_filter( 'the_title', 'lsx_text_disable_body_title', 200, 1 );\n\t\t}\n\t\treturn $title;\n\t}", "title": "" }, { "docid": "7bd49d55ab16ea8fc8467c4f13767414", "score": "0.45009854", "text": "public function setAltTitle($altTitle = null)\n {\n $this->altTitle = $altTitle;\n\n return $this;\n }", "title": "" }, { "docid": "71e269ede7f3fb603f1eb8f2e59b5ec6", "score": "0.4493783", "text": "protected function completeTitle($subtitle){\n return $subtitle . $this->siteTitle;\n }", "title": "" }, { "docid": "e1860591dc441185b8a06c13a0a8a203", "score": "0.44897494", "text": "public function issetAdditionalTitle($index)\n {\n return isset($this->additionalTitle[$index]);\n }", "title": "" }, { "docid": "e1860591dc441185b8a06c13a0a8a203", "score": "0.44897494", "text": "public function issetAdditionalTitle($index)\n {\n return isset($this->additionalTitle[$index]);\n }", "title": "" }, { "docid": "cfa4c77acc5eef0bc250a85d4396a609", "score": "0.44875425", "text": "public function setTitle( $title );", "title": "" } ]
2a96646c64d8161717489adea472a2dd
Returns the name of the object storage container
[ { "docid": "9ab504a51e3cc9f59e1ced1eac16343c", "score": "0.0", "text": "public final function getContainer() {\n return $this->container;\n }", "title": "" } ]
[ { "docid": "41ee66f1f8fb5909877af5015f8a8758", "score": "0.7362947", "text": "function get_container_name(){\r\n\t\treturn $this->get_setting('container');\r\n\t}", "title": "" }, { "docid": "385354581bd96de858e24427818d5b2a", "score": "0.69863147", "text": "function get_storage_name() {\n return $this->storage_name;\n }", "title": "" }, { "docid": "385354581bd96de858e24427818d5b2a", "score": "0.69863147", "text": "function get_storage_name() {\n return $this->storage_name;\n }", "title": "" }, { "docid": "a6f368086250b5e351616a0244c6d580", "score": "0.65831065", "text": "public static function getStorageName()\n {\n return 'nb_catalog_item';\n }", "title": "" }, { "docid": "e8b645031a06feb28d2ddd54f5ea87e7", "score": "0.6477368", "text": "public function getName()\n {\n return 'storageHelper';\n }", "title": "" }, { "docid": "c0ce514601e3a8470052616bb65d9774", "score": "0.639563", "text": "public function getContainerID() : string\n {\n return $this->containerID;\n }", "title": "" }, { "docid": "4e9004578a1b22af1c0babd2c5479579", "score": "0.6221451", "text": "public function getStorageClass() {\n\t\treturn $this->storageClassName;\n\t}", "title": "" }, { "docid": "69a7bcd047c17561786faf550252d47b", "score": "0.6136206", "text": "public function getContainerId() {\n\t\treturn Mage::getStoreConfig(self::XML_PATH_CONTAINER);\n\t}", "title": "" }, { "docid": "69a7bcd047c17561786faf550252d47b", "score": "0.6136206", "text": "public function getContainerId() {\n\t\treturn Mage::getStoreConfig(self::XML_PATH_CONTAINER);\n\t}", "title": "" }, { "docid": "f116996f6c3ad73709f7745d4b3ceed5", "score": "0.61161196", "text": "private function getContainerClass(): string\n {\n $class = str_replace('\\\\', '_', $this::class);\n $class .= ucfirst($this->environment);\n $class .= $this->debug ? 'Debug' : '';\n $class .= 'Container';\n\n return $class;\n }", "title": "" }, { "docid": "a93496496d918968dd35b27fef8f7ef3", "score": "0.6043168", "text": "public function getAzureBlobContainer(): ?string {\n $val = $this->getBackingStore()->get('azureBlobContainer');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'azureBlobContainer'\");\n }", "title": "" }, { "docid": "2de39dd14e7589fd675873039ab99d09", "score": "0.5987523", "text": "function getType() {\n return 'container';\n }", "title": "" }, { "docid": "1e4a53bc864dc2a95c6558ebd62235a9", "score": "0.59787", "text": "protected function getObjectName()\n {\n return basename(str_replace('\\\\', '/', $this->getControllerGroup()));\n }", "title": "" }, { "docid": "b98d1dcd37f93b40f350bf60edc9bdf6", "score": "0.59479356", "text": "function getName()\n\t{\n\t return $this->bucketname;\n\t}", "title": "" }, { "docid": "3292409206168e92680052bee6ec486a", "score": "0.5916558", "text": "function get_name() {\r\n return $this->basenode->get_name();\r\n }", "title": "" }, { "docid": "dd134d188c00be1b560e071131639499", "score": "0.58801967", "text": "public function getStorageClass()\n {\n return $this->storage_class;\n }", "title": "" }, { "docid": "78a4c2ae461d3242a5ba77be38997769", "score": "0.5878552", "text": "protected function getContainer()\n {\n $sContainer = 'bootbox-container';\n if($this->hasOption('dom.container'))\n {\n $sContainer = $this->getOption('dom.container');\n }\n return $sContainer;\n }", "title": "" }, { "docid": "2abf71ae89aa2f9bcd286489d1d05afd", "score": "0.58721024", "text": "public function getStorageId()\n\t{\n\t\treturn $this->storageId;\n\t}", "title": "" }, { "docid": "076ff1849294d9d7ef6b8b6720c77a77", "score": "0.58430266", "text": "function getType(){\n return 'container';\n }", "title": "" }, { "docid": "f12fa0971a6aea2bf990b9b9aeac5765", "score": "0.58256686", "text": "protected function getStorageDiskName(): string\n {\n $storageType = config('filesystems.attachments');\n\n // Change to our secure-attachment disk if any of the local options\n // are used to prevent escaping that location.\n if ($storageType === 'local' || $storageType === 'local_secure' || $storageType === 'local_secure_restricted') {\n $storageType = 'local_secure_attachments';\n }\n\n return $storageType;\n }", "title": "" }, { "docid": "ac91b7ee31e6dff8179accd76b55b05a", "score": "0.58105224", "text": "protected function getCloudDiskName()\n {\n if (!property_exists(static::class, 'cloudDiskName')) return Storage::getDefaultCloudDriver();\n\n return $this->cloudDiskName;\n }", "title": "" }, { "docid": "6399d7e990533dd169b50b3b6aee3d79", "score": "0.5795605", "text": "public function container($containerName = null, $options = array()) {\n\t\t$defalts = array(\n\t\t\t'region' => 'DFW',\n\t\t);\n\t\t$defalts = array_merge($defalts, $this->datasource()->config);\n\t\t$options = array_merge($defalts, $options);\n\t\t// verify required data\n\t\tif (empty($containerName) && !empty($options['container'])) {\n\t\t\t// container name now based on the options\n\t\t\t$containerName = $options['container'];\n\t\t}\n\t\tif (empty($containerName) && !empty($this->containers)) {\n\t\t\t// get last used container\n\t\t\t$containerName = current($this->containers);\n\t\t}\n\t\tif (empty($containerName)) {\n\t\t\tthrow new OutOfBoundsException('RSCFile::container() missing required container name');\n\t\t}\n\t\tif (is_object($containerName)) {\n\t\t\t// containerName is actually the object Container... just return it\n\t\t\treturn $containerName;\n\t\t}\n\t\tif (!empty($this->containers[$containerName])) {\n\t\t\t// stashed container connection/object exists... just return the stashed one\n\t\t\treturn $this->containers[$containerName];\n\t\t}\n\t\t// Setup API connection\n\t\t$connection = $this->datasource()->connect();\n\t\t// now, connect to the ObjectStore service\n\t\t$objstore = $connection->ObjectStore('cloudFiles', $options['region']);\n\t\tif (!is_object($objstore)) {\n\t\t\tthrow new OutOfBoundsException('RSCFile::container() unable to connect to the Rackspace Files ObjectStore');\n\t\t}\n\t\t// now get the container\n\t\ttry {\n\t\t\t// try to assume the container exists, and simply load it\n\t\t\t// this is faster and usually the case\n\t\t\t$this->containers[$containerName] = $objstore->Container($containerName);\n\t\t} catch (Exception $e) {\n\t\t\t// didn't work? list all containers and make/load as needed\n\t\t\t// slower but should always work\n\t\t\t$this->containers[$containerName] = $this->getOrMakeContainer($objstore, $containerName);\n\t\t}\n\t\t// return the container\n\t\treturn $this->containers[$containerName];\n\t}", "title": "" }, { "docid": "c695d55e96668392eb1288367b8fa256", "score": "0.579375", "text": "public function getStorageId();", "title": "" }, { "docid": "023ee7988ec7fe888517af67b711f34c", "score": "0.57892513", "text": "protected function getContainerBaseClass()\n {\n return 'Container';\n }", "title": "" }, { "docid": "a413ac38a31debf512dce10fece10910", "score": "0.5777369", "text": "public function ownerName(): string\n {\n if ($this->owner) {\n return $this->owner->name;\n }\n\n return 'root';\n }", "title": "" }, { "docid": "9b1f6d06aa41d83d623ee7348c7441e2", "score": "0.57639295", "text": "function ajax_check_container() {\r\n\t\tif ( ! isset( $_POST['container_name'] ) || ! ( $container = sanitize_text_field( $_POST['container_name'] ) ) ) { // input var okay\r\n\t\t\t$out = array( 'error' => __( 'No bucket name provided.', 'azure-storage-and-cdn' ) );\r\n\r\n\t\t\t$this->end_ajax( $out );\r\n\t\t}\r\n\r\n\t\treturn strtolower( $container );\r\n\t}", "title": "" }, { "docid": "a2b67587a5667ccd8c0411ba6f10fe50", "score": "0.5760144", "text": "public static function getStorageName()\n {\n return 'nb_icontact_prospect_status_type';\n }", "title": "" }, { "docid": "0cbbaa6db51abaa0a097252c34c74f74", "score": "0.57259667", "text": "public function getNameSpace()\n {\n return MasterDir::MASTER_DIR . '\\\\' . $this->getPackageName();\n }", "title": "" }, { "docid": "911aedcce2eda37f3f93140e9cca8161", "score": "0.57215345", "text": "public function getContainerId()\n {\n return $this->containerId;\n }", "title": "" }, { "docid": "b89bc4be6de332729c1268cc52a5f5e8", "score": "0.5707112", "text": "function getZoneContainer( $zone ) {\n\t\tswitch ( $zone ) {\n\t\t\tcase 'public':\n\t\t\t\treturn $this->container;\n\t\t\tcase 'temp':\n\t\t\t\treturn $this->container . \"%2Ftemp\";\n\t\t\tcase 'deleted':\n\t\t\t\treturn $this->container . \"%2Fdeleted\";\n\t\t\tcase 'thumb':\n\t\t\t\treturn $this->container . \"%2Fthumb\";\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "e4def2f18124bc83eec2c5c45934a355", "score": "0.5690091", "text": "function getContainerType();", "title": "" }, { "docid": "e1893c587255cf5117e9dab5370aedb1", "score": "0.5675859", "text": "public static function imageBucketName()\n {\n return \\Yaconf::get('welfare.qn.bucket_img');\n }", "title": "" }, { "docid": "c462dd4e8ce045fed2abbdf4c2482068", "score": "0.5666504", "text": "abstract protected function getObjectName();", "title": "" }, { "docid": "878be292e654ab70766590d8061aeeb1", "score": "0.56650436", "text": "abstract public static function getStorageFieldName();", "title": "" }, { "docid": "e72ae617a1175220c1044a17bf44be37", "score": "0.5660974", "text": "public function container($name);", "title": "" }, { "docid": "7241c04d624027f28845b4cd2468583a", "score": "0.5631516", "text": "public function getSpaceName(): string\n {\n return $this->spaceName;\n }", "title": "" }, { "docid": "d8a87fbdd4609fd86062aa2424292e00", "score": "0.5618423", "text": "protected function getOwnerName() {\n $owner_name = 'environment';\n return $owner_name;\n }", "title": "" }, { "docid": "e712dd328579d7b3eda0d486d6c439ea", "score": "0.5591576", "text": "public function getCommonObjectName() {\n return $this->_commonObjectName;\n }", "title": "" }, { "docid": "0f610500ecf4cf87571ca426f5a9fcd8", "score": "0.55744416", "text": "public function getStorageAccount()\n {\n return $this->storage_account;\n }", "title": "" }, { "docid": "09fbf81b9591a2027470693380d959a1", "score": "0.5572135", "text": "function getName()\n\t{\n\t\treturn 'cache';\n\t}", "title": "" }, { "docid": "59feb2c2b93444b491b8071baac5403a", "score": "0.5571955", "text": "protected static function getCacheName()\r\n\t{\r\n\t\tstatic $strCacheName;\r\n\t\tif (!isset($strCacheName))\r\n\t\t{\r\n\t\t\t$strCacheName = __CLASS__;\r\n\t\t}\r\n\t\treturn $strCacheName;\r\n\t}", "title": "" }, { "docid": "fbc47a131261bb9b0b2826cd0ebffdb4", "score": "0.5570036", "text": "public function getJsObjectName()\n {\n return $this->getId().'JsObject';\n }", "title": "" }, { "docid": "6bba27918b3b183ab142eb0dff2a4240", "score": "0.5566403", "text": "public function name()\n\t{\n\t\treturn $this->base->name();\n\t}", "title": "" }, { "docid": "f1c6934b50479622788936d09cfe8ceb", "score": "0.55638826", "text": "function getStorageInfo()\n {\n return 'path=`'.$this->getPath().'\\'';\n }", "title": "" }, { "docid": "cb5500559a7cdedb7dbca43c3633bd5b", "score": "0.5562134", "text": "static public function getStorageTypeNames(){\n\t\treturn array_keys(self::$storageTypes);\n\t}", "title": "" }, { "docid": "548489cb18c14010241df600e1cbaeea", "score": "0.5558521", "text": "protected function getName()\r\n\t{\r\n\t\treturn 'garbage_collection';\r\n\t}", "title": "" }, { "docid": "3af8924ae20757592fafb00ca859afb9", "score": "0.55571306", "text": "public function getGridJsObjectName()\n {\n return (($gridBlock = $this->getGridBlock()) ? $gridBlock->getJsObjectName() : null);\n }", "title": "" }, { "docid": "85670465b81d321cccfdf4aca9fdc278", "score": "0.5529442", "text": "public function getStoragePathFilename()\n {\n return \"$this->id\";\n }", "title": "" }, { "docid": "30defa3cb0402ddbb47f78cbea84fa68", "score": "0.55167025", "text": "public function get_storage_unit()\n {\n return $this->storage_unit;\n }", "title": "" }, { "docid": "ff561f4c21edb0e9fb78a700d193e3d8", "score": "0.5512861", "text": "public function getName() {\n\t\treturn \"NFS\";\n\t}", "title": "" }, { "docid": "672616c1afc9e3fb0c1ae7c03cfaea0b", "score": "0.55075175", "text": "final public function getContainerId()\n {\n\t\treturn $this->_id;\n }", "title": "" }, { "docid": "f654bfb702b9db8c51b3c1a695f0cf8b", "score": "0.5507301", "text": "public function getName() {\n\t\treturn ($this->instanceName ? $this->instanceName : $this->packageName);\n\t}", "title": "" }, { "docid": "fc6c7f315c735eec1f6f42417bfe893d", "score": "0.5505865", "text": "public function getStorageInfo()\n {\n return 'table=`'.$this->_getTable().'\\'';\n }", "title": "" }, { "docid": "5952f1a803ef4d5fd7a0c54ee7b9f240", "score": "0.5502456", "text": "public function getSpaceName()\n {\n return $this->SpaceName;\n }", "title": "" }, { "docid": "1bc004c5eabed328d7dd5825360b1a93", "score": "0.5501284", "text": "public function name() {\n return basename($this->root);\n }", "title": "" }, { "docid": "c425ab873d6d56321fc502260611ccef", "score": "0.5496233", "text": "public function container($name = null);", "title": "" }, { "docid": "3289696c193014bc107d7a68045865f0", "score": "0.5482916", "text": "protected function getFormObjectName() {\n\t\t$formObjectName = NULL;\n\t\tif ($this->hasArgument('objectName')) {\n\t\t\t$formObjectName = $this->arguments['objectName'];\n\t\t} elseif ($this->hasArgument('name')) {\n\t\t\t$formObjectName = $this->arguments['name'];\n\t\t}\n\t\treturn $formObjectName;\n\t}", "title": "" }, { "docid": "4fecf471def44ff335a3fdd9d25ab663", "score": "0.54711974", "text": "public function storagePath(): string\n {\n return $this->paths['path.storage'];\n }", "title": "" }, { "docid": "8cb1cac18b41939523ca294ef45fea07", "score": "0.5470372", "text": "public function name(): string\n {\n return pathinfo($this->root, PATHINFO_FILENAME);\n }", "title": "" }, { "docid": "f4091cccc636e31f986eb679787d1462", "score": "0.54628855", "text": "protected function getMasterKeyClassName() {\n\t\t\t// Get class name from owner\n\t\t\t$className = get_class( $this->owner );\n\n\t\t\t// Return class name with back-slashes replaced with a delimiter\n\t\t\treturn str_replace( \"\\\\\", $this->cacheKeyDelimiter, $className );\n\t\t}", "title": "" }, { "docid": "1979d53db854c20790f8ca5ab39ab7b1", "score": "0.54626113", "text": "protected function getNameWithoutPrefix() {\n\t\t$formObjectName = $this->viewHelperVariableContainer->get('TYPO3\\\\CMS\\\\Fluid\\\\ViewHelpers\\\\FormViewHelper', 'formObjectName');\n\t\tif (!empty($formObjectName)) {\n\t\t\t$propertySegments = explode('.', $this->arguments['objectName']);\n\t\t\t$propertyPath = '';\n\t\t\tforeach ($propertySegments as $segment) {\n\t\t\t\t$propertyPath .= '[' . $segment . ']';\n\t\t\t}\n\t\t\t$name = $formObjectName . $propertyPath;\n\t\t} else {\n\t\t\t$name = $this->arguments['objectName'];\n\t\t}\n\n\t\treturn $name;\n\t}", "title": "" }, { "docid": "0b0a20f5b0659f0968a45bfa9dc8a2ca", "score": "0.54596186", "text": "public function getContainer()\n {\n if (is_null($this->container)) {\n /** @psalm-var ?string $data */\n $data = $this->raw(self::FIELD_CONTAINER);\n if (is_null($data)) {\n return null;\n }\n $this->container = (string) $data;\n }\n\n return $this->container;\n }", "title": "" }, { "docid": "b5675c87b2201886357e167376dcd0f6", "score": "0.54513514", "text": "public function getNodename() : string;", "title": "" }, { "docid": "74cebe0b85df1a24e454fd52c278b746", "score": "0.54267377", "text": "public static function getName($connection = null){\r\n return \\Illuminate\\Queue\\QueueManager::getName($connection);\r\n }", "title": "" }, { "docid": "2fd67f52f084500b1bb8472d61942f6c", "score": "0.54176337", "text": "public function getControllerObjectName();", "title": "" }, { "docid": "cf84cbec3437082a733cff59374b6a64", "score": "0.5412339", "text": "public function getName(): string\n {\n return $this->instance()->getName();\n }", "title": "" }, { "docid": "9cec9f089d2c9b88d3e3c9cf6ce72df7", "score": "0.54107255", "text": "public function getName()\n {\n return class_basename($this);\n }", "title": "" }, { "docid": "1753324afb2a4c9ae710c03de860cf3c", "score": "0.54048896", "text": "public static function getName($connection = null){\n\t\treturn \\Illuminate\\Queue\\QueueManager::getName($connection);\n\t}", "title": "" }, { "docid": "d86bcbcac386ab83dfe79090fcc6c585", "score": "0.5398097", "text": "public function name()\n {\n $value = $this->object->getValue();\n return $value['name'];\n }", "title": "" }, { "docid": "9ee38256a337d191b56cd7f7d9b74332", "score": "0.5396653", "text": "public function getSpaceName()\n {\n return $this->spaceName;\n }", "title": "" }, { "docid": "acfeca508175ae4a0962af7b3a67a9d1", "score": "0.539508", "text": "public function getName()\n {\n return 'app.aws_s3_collector';\n }", "title": "" }, { "docid": "d722422c6d37506a3d7b34ade1ad63b9", "score": "0.5393065", "text": "private function getCacheName(): string\n {\n return $this->name . '_cache';\n }", "title": "" }, { "docid": "4d2e476146115ddf2576a20af355cc3a", "score": "0.53922546", "text": "public function getName()\n {\n return $this->_namespace;\n }", "title": "" }, { "docid": "fe87cc481f53d691b77bb3ea48b98e69", "score": "0.537537", "text": "function currentEntityBaseName()\n{\n\treturn class_basename(currentEntityName());\n}", "title": "" }, { "docid": "8693da2942a2aa8760fd84e16328edfa", "score": "0.5375322", "text": "public function getName()\n {\n if (empty($this->name)) {\n $explode = explode('\\\\', get_class($this));\n $this->name = array_pop($explode);\n }\n\n return $this->name;\n }", "title": "" }, { "docid": "9c7f76a0aa5108ae8d70f9f2208f88f6", "score": "0.5374229", "text": "public function getGridBlockJsObjectName()\n {\n return (($gridBlock = $this->getGridBlock()) ? $gridBlock->getJsObjectName() : null);\n }", "title": "" }, { "docid": "d123a071d720035aa22a338ae136dbed", "score": "0.5359425", "text": "public static function name() {\n\t\t/** @var $env Env */\n\t\t$env = static::getInstance();\n\t\treturn $env->name;\n\t}", "title": "" }, { "docid": "c64d59ebbf0912bace65b1a88070fb58", "score": "0.5359214", "text": "public function getContainer($name)\n\t{\n\t\t$container = $this->getObjectStore()->getContainer($name);\n\n\t\treturn $container;\n\t}", "title": "" }, { "docid": "cf6870c04f7e73a4aaace56f44d9db5c", "score": "0.53517413", "text": "public function getName()\n {\n return \\get_class($this);\n }", "title": "" }, { "docid": "b227fd447723e74b77f8c422a7d6e5c5", "score": "0.5349197", "text": "public function getInstanceName()\n {\n return $this->instanceName;\n }", "title": "" }, { "docid": "b227fd447723e74b77f8c422a7d6e5c5", "score": "0.5349197", "text": "public function getInstanceName()\n {\n return $this->instanceName;\n }", "title": "" }, { "docid": "79eb24f43e16fd226aab015dd2208d8b", "score": "0.53464884", "text": "public function getName(): string\n {\n $this->ensureHoldLock();\n\n return $this->nub->DL->abcLockEntityCoreGetName($this->nameId);\n }", "title": "" }, { "docid": "7db4839ed568bb0dbd4f476a1ffd23d8", "score": "0.5341407", "text": "public function getName()\n {\n $clazz = get_class($this);\n $namespaceBreak = strrpos($clazz, '\\\\');\n if ($namespaceBreak !== false) {\n $clazz = substr($clazz, $namespaceBreak + 1);\n }\n return $clazz;\n }", "title": "" }, { "docid": "cef66c5e65641c7eb0a83593c1e29520", "score": "0.5339053", "text": "private function getPrefix(): string\n {\n if ($this->prefix === null) {\n $this->prefix = (string)$this->deploymentConfig->get(\n ConfigOptionsListConstants::CONFIG_PATH_DB_CONNECTION_DEFAULT\n . '/'\n . ConfigOptionsListConstants::KEY_NAME,\n ''\n );\n }\n\n return $this->prefix;\n }", "title": "" }, { "docid": "7a8178c8f0a0c6024f7e0dfd3100d903", "score": "0.53338", "text": "public function getStorage()\n {\n return $this->storage;\n }", "title": "" }, { "docid": "7a8178c8f0a0c6024f7e0dfd3100d903", "score": "0.53338", "text": "public function getStorage()\n {\n return $this->storage;\n }", "title": "" }, { "docid": "7a8178c8f0a0c6024f7e0dfd3100d903", "score": "0.53338", "text": "public function getStorage()\n {\n return $this->storage;\n }", "title": "" }, { "docid": "7a8178c8f0a0c6024f7e0dfd3100d903", "score": "0.53338", "text": "public function getStorage()\n {\n return $this->storage;\n }", "title": "" }, { "docid": "7a8178c8f0a0c6024f7e0dfd3100d903", "score": "0.53338", "text": "public function getStorage()\n {\n return $this->storage;\n }", "title": "" }, { "docid": "7a8178c8f0a0c6024f7e0dfd3100d903", "score": "0.53338", "text": "public function getStorage()\n {\n return $this->storage;\n }", "title": "" }, { "docid": "25da3e9ba8f2c6acbabe1f1cf6fc32b7", "score": "0.53317106", "text": "public function getStorage()\n\t{\n\t\treturn $this->storage;\n\t}", "title": "" }, { "docid": "25da3e9ba8f2c6acbabe1f1cf6fc32b7", "score": "0.53317106", "text": "public function getStorage()\n\t{\n\t\treturn $this->storage;\n\t}", "title": "" }, { "docid": "14cf6b13a7ba1bf03431acde7c129098", "score": "0.5328595", "text": "public static function getName()\n {\n return \\Tygh::$app['session']->getName();\n }", "title": "" }, { "docid": "f889212ad1fdd3913b98fdca119c8bdf", "score": "0.5326033", "text": "public function getFullPath()\n {\n $storage_disk = Storage::disk($this->storage_disk)->getAdapter()->getPathPrefix();\n return \"{$storage_disk}{$this->storage_path}/{$this->name}\";\n }", "title": "" }, { "docid": "3a620cdb00f6b1d31028f18258723b39", "score": "0.5320621", "text": "public function __getContainer()\n {\n return self::$c5x8oh0mal;\n }", "title": "" }, { "docid": "3207c0f263753119c634bdf4eb3bcfc1", "score": "0.531995", "text": "protected function getLocalDiskName()\n {\n if (!property_exists(static::class, 'localDiskName')) return Storage::getDefaultDriver();\n\n return $this->localDiskName;\n }", "title": "" }, { "docid": "a697492bdf44df155dd15bccd79f12da", "score": "0.5316936", "text": "public function getStorage() {\n return $this->storage;\n }", "title": "" }, { "docid": "afe7cd74af2b652738858324da32580c", "score": "0.5312026", "text": "public function getContainerClass()\n {\n return $this->containerClass;\n }", "title": "" }, { "docid": "397b467a8394a29252a9344a3328dd6a", "score": "0.5311191", "text": "public function name()\n {\n return $this->_connectionName;\n }", "title": "" }, { "docid": "6536e1e1116f43ce3e4dece328ac300f", "score": "0.53101903", "text": "public function getName()\n {\n $identity = $this->session->get('auth');\n return $identity['name'];\n }", "title": "" }, { "docid": "12b79332bae1fe4e3a3622f102aa4bb4", "score": "0.5309542", "text": "function getDomainObjectName();", "title": "" } ]
1fada0b961b323dcc0b9fae61d954e1e
Helper method to force dependent fields to be skipped during validation when not chosen
[ { "docid": "67c6b37aaaf16d16a02fba1e628f75f7", "score": "0.5217664", "text": "public static function resolveDependencies($fields, $data = array())\n\t{\n\t\tif (empty($data))\n\t\t{\n\t\t\treturn $fields;\n\t\t}\n\n\t\t$skip = array();\n\n\t\tforeach ($fields as $field)\n\t\t{\n\t\t\tforeach ($field->options as $option)\n\t\t\t{\n\t\t\t\t$selected = false;\n\n\t\t\t\tif (!$option->get('dependents'))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$events = json_decode($option->get('dependents', '[]'));\n\n\t\t\t\tif (empty($events))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (isset($data[$field->get('name')]))\n\t\t\t\t{\n\t\t\t\t\t$values = $data[$field->get('name')];\n\n\t\t\t\t\tif (is_array($values) && in_array($option->get('value'), $values))\n\t\t\t\t\t{\n\t\t\t\t\t\t$selected = true;\n\t\t\t\t\t}\n\t\t\t\t\telse if ($values == $option->get('value'))\n\t\t\t\t\t{\n\t\t\t\t\t\t$selected = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If the option was chosen...\n\t\t\t\t// pass its dependents through validation\n\t\t\t\tif ($selected)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// If the option was NOT chosen...\n\t\t\t\t// skip its dependents (no validation)\n\t\t\t\t$skip = array_merge($skip, $events);\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($skip))\n\t\t{\n\t\t\tforeach ($fields as $field)\n\t\t\t{\n\t\t\t\tif (in_array($field->get('name'), $skip))\n\t\t\t\t{\n\t\t\t\t\t// Temporarily mark as optional\n\t\t\t\t\t$field->set('required', 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $fields;\n\t}", "title": "" } ]
[ { "docid": "e8df64a39eac00530d2ac77eeab9f873", "score": "0.61394805", "text": "function clearInvalidOptionnalFields()\r\n {\r\n $fields = $this->getRequestFields();\r\n foreach ($fields as $field) {\r\n if (!$field->isValid() && !$field->isRequired()) {\r\n $field->setValue(null);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "72e50b13bd8b2b989035ec4b4ca6460e", "score": "0.59112877", "text": "private function __validate_disabled() {\n if (isset($this->initial_data[\"disable\"])) {\n if ($this->initial_data[\"disable\"] === true) {\n $this->validated_data[\"disable\"] = \"\";\n }\n } else {\n if (isset($this->config['openvpn']['openvpn-csc'][$this->id]['disable'])) {\n $this->validated_data[\"disable\"] = \"\";\n }\n }\n }", "title": "" }, { "docid": "a82fee7e554efb685712e1a8a33f1834", "score": "0.5870503", "text": "protected function getRequiredFields() {\n return [];\n }", "title": "" }, { "docid": "1b3b3d314456d70ae2e5dce321ecfe58", "score": "0.58580357", "text": "public function beforeValidating();", "title": "" }, { "docid": "7250059493b2483b953b77b5b740e026", "score": "0.57958263", "text": "public function getRequiredFields()\n {\n }", "title": "" }, { "docid": "04c0aeaf9be154ec3adf89d79f1fe317", "score": "0.5792096", "text": "public function testBeforeValidateNoChanges() {\n\t\t$sample_data = array($this->NullableForeignIdsModel->alias => array(\n\t\t\t'id' => 5,\n\t\t\t'slug' => 'something',\n\t\t\t'first_foreign_id' => 1,\n\t\t\t'second_foreign_id' => null,\n\t\t\t'third_foreign_id' => 7,\n\t\t\t'fourth_foreign_id' => 8,\n\t\t\t'fifth_foreign_id' => null\n\t\t));\n\t\t\n\t\t$this->NullableForeignIdsModel->data = $sample_data;\n\t\t$this->NullableForeignIdsBehavior->beforeValidate($this->NullableForeignIdsModel);\n\t\t$this->assertSame($sample_data, $this->NullableForeignIdsModel->data);\n\t}", "title": "" }, { "docid": "4938d81556e85e53a5c8b57ac5528305", "score": "0.5734199", "text": "function skipValidation($caller = null);", "title": "" }, { "docid": "42604252ec5792c84479f271607782a8", "score": "0.5730571", "text": "public function skipValidation ()\n {\n $this->skipValidation = true;\n\n return $this;\n }", "title": "" }, { "docid": "2538ef7cad4c29914eded3e9b0685a0c", "score": "0.56555796", "text": "public function beforeValidate()\n {\n // Default is empty\n }", "title": "" }, { "docid": "72935a54326a487077205668b7196eca", "score": "0.56365377", "text": "public function testBeforeValidateNullifyWithNoSettings() {\n\t\t$this->NullableForeignIdsBehavior->cleanup($this->NullableForeignIdsModel);\n\t\t$this->NullableForeignIdsBehavior->setup($this->NullableForeignIdsModel);\n\t\t\n\t\t$sample_data = array($this->NullableForeignIdsModel->alias => array(\n\t\t\t'id' => 5,\n\t\t\t'slug' => 'something',\n\t\t\t'first_foreign_id' => 0,\n\t\t\t'second_foreign_id' => 0,\n\t\t\t'third_foreign_id' => '',\n\t\t\t'fourth_foreign_id' => '',\n\t\t\t'fifth_foreign_id' => false\n\t\t));\n\t\t\n\t\t$expected = array($this->NullableForeignIdsModel->alias => array(\n\t\t\t'id' => 5,\n\t\t\t'slug' => 'something',\n\t\t\t'first_foreign_id' => 0,\n\t\t\t'second_foreign_id' => null,\n\t\t\t'third_foreign_id' => null,\n\t\t\t'fourth_foreign_id' => null,\n\t\t\t'fifth_foreign_id' => null\n\t\t));\n\t\t\n\t\t$this->NullableForeignIdsModel->data = $sample_data;\n\t\t$this->NullableForeignIdsBehavior->beforeValidate($this->NullableForeignIdsModel);\n\t\t$this->assertSame($expected, $this->NullableForeignIdsModel->data);\n\t}", "title": "" }, { "docid": "8eeabca6193513724fa71366eba67fdc", "score": "0.5626077", "text": "public function beforeValidation() {}", "title": "" }, { "docid": "240efd1f9fa6b2dba8054796e4f2b5e0", "score": "0.56253576", "text": "public function beforeValidate() {\n if($this->isNewRecord){\n if(strpos($this->fieldName,'c_') !== 0 && $this->custom && $this->scenario != 'test'){\n // This is a safeguard against fields that end up having\n // identical names to fields added later in updates.\n $this->fieldName = \"c_{$this->fieldName}\";\n }\n }\n return parent::beforeValidate();\n }", "title": "" }, { "docid": "787ea03fed9c10fbc77f59aeb39b93ee", "score": "0.5615191", "text": "protected function afterValidation()\n {\n //\n }", "title": "" }, { "docid": "b465a7ba56dc9a72fec3b6019d85c925", "score": "0.5601283", "text": "function custom_override_default_address_fields2( $address_fields ) {\n $address_fields['address_1']['required'] = false;\n $address_fields['address_2']['required'] = false;\n $address_fields['city']['required'] = false;\n $address_fields['state']['required'] = false;\n $address_fields['country']['required'] = false;\n $address_fields['postcode']['required'] = false;\n /* unset($address_fields['postcode']); */\n\n return $address_fields;\n}", "title": "" }, { "docid": "15c47d39a440d749202f0d1b6c41f2c4", "score": "0.5588401", "text": "public function rules()\n {\n return [\n 'firstname' => 'required|alpha|min:2|max:255',\n 'lastname' => 'required|alpha|min:2|max:255',\n 'socialinsurancenumber' => 'required|integer|digits:9|unique:tax_services',\n 'country' => 'required',\n 'maritalstatus' => 'required',\n 'typeoftaxreturn' => 'required',\n 'address' => 'required',\n 'city' => 'required',\n 'provinceorstate' => 'required',\n 'postalcode' => 'required|alpha_dash|min:6|max:6',\n\n 'spousefirstname' => 'required_if:spouse,yes|alpha|min:2|max:255',\n 'spouselastname' => 'required_if:spouse,yes|alpha|min:2|max:255',\n 'spousesocialinsurancenumber' => 'required_if:spouse,yes|integer|digits:9|unique:spouses',\n\n 'dependentfirstname' => 'required_if:dependent,yes|min:1|max:255',\n 'dependentlastname' => 'required_if:dependent,yes|min:1|max:255',\n 'dependentdateofbirth' => 'required_if:dependent,yes|min:1',\n 'relationship' => 'required_if:dependent,yes|min:1',\n 'comment' => 'required_if:dependent,yes|min:1',\n 'dependentgender' => 'required_if:dependent,yes|min:1',\n\n 'revenueagency' => 'required|boolean',\n ];\n }", "title": "" }, { "docid": "32921760e467ac7c5e6365679eddd974", "score": "0.55361366", "text": "public function requiredWithoutAll(string ...$otherFields)\n {\n return $this->appendIfNotExists(\"required_without_all:\".implode(',', $otherFields));\n }", "title": "" }, { "docid": "c56d063d5ed426336c1f41be5354c896", "score": "0.5535643", "text": "public function getFrontEndRequiredFields();", "title": "" }, { "docid": "4635e9a7bb3aa54d3ee7f653bfbf5240", "score": "0.5528381", "text": "public function validateBeforeSave();", "title": "" }, { "docid": "d66aeb38172a4601626932f71b24e70e", "score": "0.55086565", "text": "public function requiredWithout(string ...$otherFields)\n {\n return $this->appendIfNotExists(\"required_without:\".implode(',', $otherFields));\n }", "title": "" }, { "docid": "2a3ab8436037ed16e37db429f311dd48", "score": "0.5493603", "text": "public function getRequiredFields()\n {\n return array();\n }", "title": "" }, { "docid": "ed9cc3d4d86486f4bee09a5e64709931", "score": "0.5492012", "text": "protected function _disableForeignKeyChecks()\n {\n return 'SET CONSTRAINTS ALL DEFERRED';\n }", "title": "" }, { "docid": "4ef54a38235c252188a183f7db39b4e7", "score": "0.54809654", "text": "public function testBeforeValidateNullifyWithSomeNullableFieldsAttr() {\n\t\t$this->NullableForeignIdsBehavior->cleanup($this->NullableForeignIdsModel);\n\t\t$this->NullableForeignIdsBehavior->setup($this->NullableForeignIdsModel, array(\n\t\t\t'third_foreign_id',\n\t\t\t'fifth_foreign_id'\n\t\t));\n\t\t\n\t\t$sample_data = array($this->NullableForeignIdsModel->alias => array(\n\t\t\t'id' => 5,\n\t\t\t'slug' => 'something',\n\t\t\t'first_foreign_id' => 0,\n\t\t\t'second_foreign_id' => 0,\n\t\t\t'third_foreign_id' => '',\n\t\t\t'fourth_foreign_id' => '',\n\t\t\t'fifth_foreign_id' => false\n\t\t));\n\t\t\n\t\t$expected = array($this->NullableForeignIdsModel->alias => array(\n\t\t\t'id' => 5,\n\t\t\t'slug' => 'something',\n\t\t\t'first_foreign_id' => 0,\n\t\t\t'second_foreign_id' => 0,\n\t\t\t'third_foreign_id' => null,\n\t\t\t'fourth_foreign_id' => '',\n\t\t\t'fifth_foreign_id' => null\n\t\t));\n\t\t\n\t\t$this->NullableForeignIdsModel->data = $sample_data;\n\t\t$this->NullableForeignIdsBehavior->beforeValidate($this->NullableForeignIdsModel);\n\t\t$this->assertSame($expected, $this->NullableForeignIdsModel->data);\n\t}", "title": "" }, { "docid": "d916f9cc50191ab222f6299d3e89e331", "score": "0.54787815", "text": "public function getIsRequired();", "title": "" }, { "docid": "470d9a3e06284659746ff085739e5fd5", "score": "0.5473004", "text": "function preGenerateForm() {\n\t\t$model = &$this->getDefaultModel();\n\t\t$fields = $model->fields();\n\t\tif (in_array('cms_headline', $fields)) {\n\t\t\t$model->form_rules[] = array('cms_headline', 'This headline is already being used', 'callback', array(&$this, 'uniqueHeadline'));\n\t\t}\n\t\tparent::preGenerateForm();\n\t}", "title": "" }, { "docid": "4bedba84c18588ba550c618e859a5004", "score": "0.5454417", "text": "public function getRequiredFields(): array\n {\n return [\n 'name',\n 'price',\n 'category_id',\n ];\n }", "title": "" }, { "docid": "b2c822a5abb00e9751b6b1e8d4bc5f62", "score": "0.54512566", "text": "public function getRequiredFields()\n {\n return parent::getRequiredFields() + array(\n $this->completionField => $this->completionField,\n );\n }", "title": "" }, { "docid": "f8581dc686342241a4d8df8a00430f84", "score": "0.5444891", "text": "protected function prepareForValidation()\n {\n }", "title": "" }, { "docid": "34712ac7d7b200197cab927a8d06e9a8", "score": "0.54362494", "text": "function manual_field_validation($data, $field, $contextid) {\n global $DB;\n\n if (!($field instanceof field)) {\n error_log(\"manual_field_validation(): coding error - non-field object passed (contextid = {$contextid})\");\n return false;\n }\n\n if (!isset($field->owners['manual'])) {\n // BJB120605: Fix bug when viewing/editing disabled and no owner\n error_log(\"manual_field_validation(): no manual owner for field: {$field->shortname}\");\n return false;\n }\n\n $errstr = null;\n if ($field->multivalued) {\n $manual = new field_owner($field->owners['manual']);\n if (!isset($data)) {\n $data = array();\n }\n if (!is_array($data)) {\n $data = array($data);\n }\n $fielddata = $data;\n sort($fielddata);\n if ($manual->param_required) {\n if (empty($fielddata)) {\n $errstr = get_string('required');\n } else if (!empty($manual->param_options)) {\n $options = explode(\"\\n\", $manual->param_options);\n array_walk($options, 'trim_cr'); // TBD: defined below\n foreach ($fielddata as $entry) {\n if (!in_array($entry, $options)) {\n $errstr = get_string('required');\n break;\n }\n }\n }\n }\n if (is_null($errstr) && $field->forceunique) {\n $curcontext = -1;\n $vals = null;\n\n $where = \"contextid != {$contextid} AND fieldid = {$field->id}\";\n $recs = $DB->get_recordset_select($field->data_table(), $where, null, '', 'id, contextid, data');\n foreach ($recs AS $rec) {\n if ($curcontext != $rec->contextid) {\n if (!empty($vals)) {\n sort($vals);\n if ($vals == $fielddata) {\n $errstr = get_string('valuealreadyused');\n // TBD^^^ \"[These/This combination of] values already uesd!\"\n $vals = null;\n break;\n }\n }\n $curcontext = $rec->contextid;\n $vals = array();\n }\n $vals[] = $rec->data;\n }\n unset($recs);\n\n if (!empty($vals)) {\n sort($vals);\n if ($vals == $fielddata) {\n $errstr = get_string('valuealreadyused');\n // TBD^^^ \"[These/This combination of] values already uesd!\"\n }\n }\n }\n } else if ($field->forceunique) {\n // NON-MULTIVALUED case\n $datafield = 'data';\n if ($field->data_type() == 'text') {\n //error_log(\"manual_field_validation(): field({$field->id}), datafield = {$datafield}, type = \". $field->data_type() );\n $datafield = $DB->sql_compare_text('data', 255); // TBV\n }\n $where = \"fieldid = ? AND {$datafield} = ?\";\n $fielddata = $DB->get_recordset_select($field->data_table(), $where, array($field->id, $data));\n $fcount = $DB->count_records_select($field->data_table(), $where, array($field->id, $data));\n if (!empty($fielddata) && $fielddata->valid()) {\n $fdata = $fielddata->current();\n if ($fcount > 1 || $fdata->contextid != $contextid) {\n $errstr = get_string('valuealreadyused');\n }\n $fielddata->close();\n }\n }\n\n return $errstr;\n}", "title": "" }, { "docid": "8126a888b42c48100a8199910a438652", "score": "0.54288", "text": "public function postGetForm()\n {\n foreach ($this->getElements() as $element) {\n /** @var Zend_Form_Element $element */\n if ($element->isRequired()) {\n $this->setRequire($element);\n }\n }\n }", "title": "" }, { "docid": "83b6b3246f33b6c9efc8356b7182c325", "score": "0.5421852", "text": "public function fieldRequiring() {\n $this->drupalPostForm('admin/structure/cacheflush/add', [], t('Save'));\n $this->assertResponse(200);\n $this->assertRaw('error');\n }", "title": "" }, { "docid": "1d9e441bc7fa2e2ab8dcd2cec5a2337a", "score": "0.54213226", "text": "private function checkRequired() {\n $ok = array();\n foreach ($this->_submitted as $name => $value) {\n $value = is_array($value) ? $value : trim($value);\n if (!empty($value)) {\n $ok[] = $name;\n }\n }\n $this->_missing = array_diff($this->_required, $ok);\n foreach ($this->_missing as $key => $value) {\n $this->_missing[$key] = 'Missing entry!';\n }\n }", "title": "" }, { "docid": "9ac438909c1c72b76da0fb2649e8ed37", "score": "0.5406471", "text": "public static function boot()\n {\n \n parent::boot();\n\n static::saving(function($model)\n {\n\n if (count($model->forcedNullFields) > 0) {\n\n foreach ($model->toArray() as $fieldName => $fieldValue) {\n if ( empty($fieldValue) && in_array($fieldName,$model->forcedNullFields)) {\n $model->attributes[$fieldName] = '';\n }else if($fieldName == 'dob' && $fieldValue == '0000-00-00'){\n $model->attributes[$fieldName] = ''; \n }\n }\n }\n\n return true;\n });\n\n }", "title": "" }, { "docid": "2015544241a40cac54468aef829ac632", "score": "0.53869206", "text": "public function beforeValidate()\n {\n return parent::beforeValidate();\n }", "title": "" }, { "docid": "542c842fa0714a8e7d96048eeba236e7", "score": "0.53722674", "text": "function paragraphs_field_widget_embed_delay_required_validation(&$element, &$form_state) {\n // If the process_input flag is set, the form and its input is going to be\n // validated. Prevent #required (sub)fields from throwing errors while\n // their non-#required paragraph item is empty.\n if ($form_state['process_input']) {\n _paragraphs_collect_required_elements($element, $element['#paragraphs_required_elements']);\n }\n return $element;\n}", "title": "" }, { "docid": "15e4ead17dfc54f8c7f01af0a5b38aaf", "score": "0.53662443", "text": "protected function beforeValidate()\n {\n $this->setDefaultAttributes();\n return parent::beforeValidate();\n }", "title": "" }, { "docid": "c68f3d47fd4749095be90c70ae95733b", "score": "0.5362731", "text": "function mm_override_default_address_fields( $address_fields ) {\n $address_fields['state']['required'] = false;\n\n return $address_fields;\n}", "title": "" }, { "docid": "500dea08e0fbb470aec5fb39ce71c65f", "score": "0.5351543", "text": "public function disableValidation()\n {\n $this->unsetValidation();\n }", "title": "" }, { "docid": "a18f5dca76196ea0bbbdb4bc4b4ffe7e", "score": "0.53503317", "text": "public function rules()\n {\n return [\n 'issues' => 'required_without:milestones',\n 'milestones' => 'required_without:issues',\n ];\n }", "title": "" }, { "docid": "74a79efd29e773fb931effc64657f8c8", "score": "0.5334624", "text": "private function disabledQuoteAddressValidationStep(): void\n {\n $this->billingAddress->method('setShouldIgnoreValidation')\n ->with(true);\n $this->shippingAddress->method('setShouldIgnoreValidation')\n ->with(true);\n $this->billingAddress->method('getEmail')\n ->willReturn('[email protected]');\n }", "title": "" }, { "docid": "25c66549b7a748aa9b0924df73d1e720", "score": "0.53325063", "text": "protected function beforeValidate()\n {\n //\n }", "title": "" }, { "docid": "843552da4ece07239d68740d04b1d072", "score": "0.5331407", "text": "function validate(){\n\t\t$missing_fields = Array ();\n\t\tforeach ( $this->required_fields as $field ) {\n\t\t\t$true_field = $this->fields[$field]['name'];\n\t\t\tif ( $this->$true_field == \"\") {\n\t\t\t\t$missing_fields[] = $field;\n\t\t\t}\n\t\t}\n\t\tif ( count($missing_fields) > 0){\n\t\t\t// TODO Create friendly equivelant names for missing fields notice in validation \n\t\t\t$this->errors[] = __ ( 'Missing fields: ' ) . implode ( \", \", $missing_fields ) . \". \";\n\t\t}\n\t\treturn apply_filters('em_ticket_booking_validate', count($this->errors) == 0, $this );\n\t}", "title": "" }, { "docid": "e725882eabab83b23fa10b8687b88bd0", "score": "0.53311247", "text": "public function test_form_setRequiredFields_sets_required_attribute_on_fields()\n {\n foreach($this->fields as $field) {\n $this->assertFalse(isset($this->Form->{$field['name']}->attributes->required));\n }\n\n // Set required\n $this->Form->setRequiredFields(array_column($this->fields, 'name'));\n\n // Make sure they gained the required attribute, and it's set to true\n foreach($this->fields as $field) {\n $this->assertTrue(isset($this->Form->{$field['name']}->attributes->required));\n }\n }", "title": "" }, { "docid": "1b029677b939e496c25281e0f087107f", "score": "0.53301036", "text": "private function cleanFields()\n {\n foreach ($this->fields as $field_name => $field) {\n if ($field->isDisabled()) {\n $value = $this->getInitialForField($field, $field_name);\n } else {\n $value = $field->getWidget()->valueFromData($this->data, $this->files, $this->addPrefix($field_name));\n }\n\n try {\n $this->cleaned_data[$field_name] = $field->clean($value);\n\n $method = 'clean' . snakeToCamel($field_name);\n\n if (method_exists($this, $method)) {\n $this->cleaned_data[$field_name] = call_user_func(array($this, $method));\n }\n } catch (ValidationError $e) {\n $this->addError($e->getErrorList(), $field_name);\n }\n }\n }", "title": "" }, { "docid": "1add979df0ffbb3f3a08fab0c72a1734", "score": "0.53276825", "text": "public function overrideRules()\n {\n $this->rules['postal_code'] = ['required', PostalCode::forCountry('US')];\n $this->rules['province'] = ['required'];\n }", "title": "" }, { "docid": "c5ec80ac690f47a2cad5df4050cc1065", "score": "0.5312003", "text": "public function isRequired(){\n return $this->getNotnull();\n }", "title": "" }, { "docid": "6ba49287b6117b50cda77619c194547c", "score": "0.5309355", "text": "protected function strictValidation()\n {\n return false;\n }", "title": "" }, { "docid": "b0b3aa165f10ab69379ca94fc04a86db", "score": "0.5301824", "text": "public function validate_fields()\n {\n }", "title": "" }, { "docid": "fb621b408dbe2bde3d4492ae40687b76", "score": "0.5300217", "text": "public function testValidateNullFieldsFalse() {\n $resultFalse = $this->dataValidation->validateNullFields(\"field\");\n $this->assertFalse($resultFalse);\n }", "title": "" }, { "docid": "62901b1ec1a2ac9b4d51b3ca8e6601c5", "score": "0.5296866", "text": "function beforeSave(&$model) {\n foreach ($this->settings[$model->name] as $field) {\n if (isset($model->data[$model->name][$field])\n && $model->data[$model->name][$field] === '') {\n $model->data[$model->name][$field] = null;\n } \n }\n }", "title": "" }, { "docid": "f377d06adcadf7bbf95475764fe34e8c", "score": "0.5287991", "text": "function enforceField( $fieldname ) {\n\t\tif(! in_array( $fieldname, $this->enforce ) && ! empty( $this->enforce ) ) {\n\t\t\t$forcelist = implode(', ', $this->enforce);\n\t\t\tthrow new \\Exception(\"Your field $fieldname is not a legal field ($forcelist)\");\n\t\t}\n\t}", "title": "" }, { "docid": "38d179558892cc84e12573cb5ea27097", "score": "0.5279707", "text": "protected function beforeValidate() {\n return true;\n }", "title": "" }, { "docid": "02504787edf60b5be51f4957d7436900", "score": "0.52740735", "text": "public function rules()\n {\n return [\n 'user_id' => ['nullable', 'exists:users,id', function($attribute, $value, $fail){\n if($this->name != null OR $this->surname != null OR $this->telephone)\n $fail(\"Non è possibile inserire altri dati se si specifica l'utente.\");\n }],\n 'name' => 'required_without:user_id',\n 'surname' => 'required_without:user_id',\n 'telephone' => 'required_without:user_id',\n ];\n }", "title": "" }, { "docid": "15b89078865c72f37d2e44fa477d9bd1", "score": "0.52709454", "text": "public function rules()\n {\n return [\n ['status', 'default', 'value'=>self::STATUS_NEW],\n [['user_id', 'delivery_id', 'payment_type', 'online_payment_type', 'online_payment_status'], 'integer'],\n ['description', 'string'],\n ['email', 'email'],\n ['amount', 'number'],\n [['delivery_id', 'amount', 'payment_type'], 'default'],\n [['name', 'email', 'phone', 'address'], 'string', 'max' => 255],\n [['city_id', 'address', 'payment_type', 'delivery_id'], 'required'],\n [['country_id','region_id',], 'safe'],\n ['subscribe', 'boolean'],\n [\n 'phone', 'required', 'when'=>function(self $model)\n {\n return !$model->email;\n },\n 'whenClient' => \"function (attribute, value) {\n //alert(attribute.id);\n //return !$('#order-email').val();\n return !$('[name=\\\"Order[email]\\\"]').val();\n }\",\n 'on'=>Order::SCENARIO_GUEST,\n ],\n [\n 'email', 'required', 'when'=>function(self $model)\n {\n return !$model->phone;\n },\n 'whenClient' => \"function (attribute, value) {\n return !$('[name=\\\"Order[phone]\\\"]').val();\n }\",\n 'on'=>Order::SCENARIO_GUEST,\n ],\n ['!user_id', 'safe'],\n ['userAction', 'safe'],\n ['payment_type', 'required'],\n ['online_payment_type', 'required', 'when'=>function(self $model)\n {\n return $model->payment_type==$model::PAYMENT_TYPE_ONLINE;\n },\n 'whenClient' => \"isPaymentOnline\",\n ],\n ];\n }", "title": "" }, { "docid": "ef64fddd5d43df68c126f0d073323321", "score": "0.5261383", "text": "protected function setRequiredFields()\n {\n $requiredFields = [\n 'start_date'\n ];\n\n $this->requiredFields = Common::createArrayObject($requiredFields);\n }", "title": "" }, { "docid": "9804a851c161f48b21c0c2afd721eab0", "score": "0.5260447", "text": "public function rules()\n {\n return [\n 'apply_online' => 'required|boolean',\n 'apply_instruction' => 'required_if:apply_online,1',\n 'gender_specific' => 'required|boolean',\n 'gender' => 'required_if:gender_specific,1',\n 'age_specific' => 'required|boolean',\n 'age_comparison' => 'required_if:age_specific,1',\n 'age' => 'required_if:age_specific,1',\n 'show_organization_details' => 'required|boolean',\n 'alternate_organization_name' => 'required_if:show_organization_details,0',\n 'alternate_organization_description' => 'required_if:show_organization_details,0',\n ];\n }", "title": "" }, { "docid": "bb9525871d54f5b04d1afac8b3c43398", "score": "0.5258814", "text": "public function withRequiredFieldsOnly()\n {\n //Steps\n $this->storeHelper()->createStore('generic_store', 'store');\n //Verifying\n $this->assertMessagePresent('success', 'success_saved_store');\n }", "title": "" }, { "docid": "bdd32b2d627bb0e9e4f012f2d769d789", "score": "0.52514523", "text": "public function testBeforeValidateNullify() {\n\t\t\n\t\t$sample_data = array($this->NullableForeignIdsModel->alias => array(\n\t\t\t'id' => 5,\n\t\t\t'slug' => 'something',\n\t\t\t'first_foreign_id' => array(),\n\t\t\t'second_foreign_id' => 0,\n\t\t\t'third_foreign_id' => '',\n\t\t\t'fourth_foreign_id' => 8,\n\t\t\t'fifth_foreign_id' => false\n\t\t));\n\t\t\n\t\t$expected = array($this->NullableForeignIdsModel->alias => array(\n\t\t\t'id' => 5,\n\t\t\t'slug' => 'something',\n\t\t\t'first_foreign_id' => null,\n\t\t\t'second_foreign_id' => 0,\n\t\t\t'third_foreign_id' => null,\n\t\t\t'fourth_foreign_id' => 8,\n\t\t\t'fifth_foreign_id' => null\n\t\t));\n\t\t\n\t\t$this->NullableForeignIdsModel->data = $sample_data;\n\t\t$this->NullableForeignIdsBehavior->beforeValidate($this->NullableForeignIdsModel);\n\t\t$this->assertSame($expected, $this->NullableForeignIdsModel->data);\n\t}", "title": "" }, { "docid": "8933920836ac38faace54cea2f8d564d", "score": "0.52449435", "text": "public function isOnlyValidate(): bool;", "title": "" }, { "docid": "6454be7ffbad79832c4f74837a35f10e", "score": "0.5244358", "text": "public function rules()\n {\n return [\n 'position.cargo' => 'required_without:delete|min:3',\n 'position.descripcion'=> 'required_without:delete|min:20'\n ];\n }", "title": "" }, { "docid": "e5b5c08b6966235de83dba1d4e076469", "score": "0.5233414", "text": "public function disableFK();", "title": "" }, { "docid": "464902e33b2a55ee98a0eeb40c309270", "score": "0.5230945", "text": "public function testErrorMessageExcludeFieldName()\n {\n $v = new Validator(array());\n $v->setPrependLabels(false);\n $v->rule('required', 'name');\n $v->validate();\n $this->assertSame(array(\"is required\"), $v->errors('name'));\n }", "title": "" }, { "docid": "94c777635231a454b674a12f87a4caa6", "score": "0.5228834", "text": "protected function afterValidate()\n {\n //\n }", "title": "" }, { "docid": "e812917a4008e93c89f60cdb9e79157e", "score": "0.52274543", "text": "public function isMandatory($field, $name='');", "title": "" }, { "docid": "6f3ff11f7e2f4a6373d83cbc513ee504", "score": "0.52179843", "text": "public function validate_fields()\n { }", "title": "" }, { "docid": "4dadf2e47c63abc53e27fc3f2ba79999", "score": "0.5215694", "text": "public function isRequired(): bool;", "title": "" }, { "docid": "4dadf2e47c63abc53e27fc3f2ba79999", "score": "0.5215694", "text": "public function isRequired(): bool;", "title": "" }, { "docid": "2c45c490f745bec9923226257e64d7f9", "score": "0.52089584", "text": "protected function prepareForValidation(): void\n {\n // ...\n }", "title": "" }, { "docid": "70b29e610e0a31e1207dd0b8ff322a83", "score": "0.5208425", "text": "public function rules()\n {\n return [\n 'course_id' => 'required|numeric|exists:courses,id|different:dependency_id',\n 'dependency_id' => 'required|numeric|exists:courses,id|different:course_id',\n ];\n }", "title": "" }, { "docid": "2606e596aa6c599a98e400b02c3af5e6", "score": "0.51974183", "text": "public function testCheckRequiredFieldsSomeMissingAccordingToaMustFillFields()\n {\n\n $aMustFillFields = array( 'oxuser__oxfname', 'oxuser__oxlname', 'oxuser__oxstreet',\n 'oxuser__oxstreetnr', 'oxuser__oxzip', 'oxuser__oxcity',\n 'oxuser__oxcountryid',\n 'oxaddress__oxfname', 'oxaddress__oxlname', 'oxaddress__oxstreet',\n 'oxaddress__oxstreetnr', 'oxaddress__oxzip', 'oxaddress__oxcity',\n 'oxaddress__oxcountryid'\n );\n\n oxTestModules::addFunction( \"oxInputValidator\", \"checkRequiredFields\", \"{ throw new oxInputException('EXCEPTION_INPUT_NOTALLFIELDS'); }\");\n modConfig::getInstance()->setConfigParam( 'aMustFillFields', $aMustFillFields );\n\n try {\n $aInvAdress = array();\n $aDelAdress = array();\n\n $oUser = $this->getProxyClass(\"oxUser\");\n $oUser->UNITcheckRequiredFields( $aInvAdress, $aDelAdress);\n } catch ( oxInputException $oEx ) {\n $this->assertEquals( $oEx->getMessage(), 'EXCEPTION_INPUT_NOTALLFIELDS');\n return;\n }\n $this->fail( 'failed test test_checkRequiredFields' );\n }", "title": "" }, { "docid": "9ff1cea2fa3f99af930d70782f4d9626", "score": "0.51919085", "text": "protected function _beforeSave() {}", "title": "" }, { "docid": "c52021a072318bdc5d6edc8a771a730e", "score": "0.51848674", "text": "function caution2(){\n\t\t\techo \"All fields must be required.\";\n\t\t}", "title": "" }, { "docid": "6ef4b9c6118855aaf2e3bc4a8ae7a963", "score": "0.5184622", "text": "function checkRequired() {\n\t\t\n\t\tif (!$this->getStatus()) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tforeach (func_get_args() as $field) {\n\t\t\t\n\t\t\tif (empty($_POST[$field])) {\n\t\t\t\t$this->errors['required'] = 'Some required fields have not been completed';\n\t\t\t\t$this->error_fields[] = $field;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "3f4d219a2e216ab9160fdb05ffb42c19", "score": "0.51839256", "text": "function mfcs_request_unavailability_0_edit_form_pre_validate(&$form, &$form_state) {\n $clicked_id = '';\n if (isset($form_state['triggering_element']['#id'])) {\n $clicked_id = $form_state['triggering_element']['#id'];\n }\n\n if ($clicked_id == 'mfcs-unavailable-edit-submit-cancel') {\n $form['unavailable']['title']['#required'] = FALSE;\n $form['unavailable']['type']['#required'] = FALSE;\n $form['unavailable']['date_start']['day']['#required'] = FALSE;\n }\n}", "title": "" }, { "docid": "1b710d622b4364b437c07603893304f3", "score": "0.51818496", "text": "public function rules()\n {\n return [\n 'departamento'=>'required|exists:departamentos,id',\n 'nombre'=>'required|max:150'\n ];\n }", "title": "" }, { "docid": "1addf239c9225bcd008da912722c37be", "score": "0.5176978", "text": "public function rules()\n\t{\n\t\treturn array(\n\t\t\tarray('rate, comment, business_id, review_id', 'required'),\n\t\t);\n\t}", "title": "" }, { "docid": "82f6759f4ae55ee584fbad38bf8e156e", "score": "0.517522", "text": "public function testRequiredFields()\n {\n $this->transactionModel->shouldReceive(\"verifyOpenTransaction\")->andReturn(null);\n $this->assertTrue($this->transaction->validate($this->payer, $this->payee));\n }", "title": "" }, { "docid": "7e4a15ca805ed848dd785dc3678e154f", "score": "0.51736164", "text": "public function asNotRequired(): TemplateFieldBuilder {\n\t\t$this->required = false;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "bb1d23c5d2d408ad8499e2dc2d1a1a28", "score": "0.5167891", "text": "public function allRequiredButNotSet() {\n\t\t$notSet = [];\n\n\t\t$required = $this->allRequired();\n\t\tforeach ( $required as $name ) {\n\t\t\tif ( ! $this->has( $name ) ) {\n\t\t\t\t$notSet[] = $name;\n\t\t\t}\n\t\t}\n\n\t\treturn $notSet;\n\t}", "title": "" }, { "docid": "f83a101f0f71489ac2df7df3a41c9533", "score": "0.51636755", "text": "protected function preSave() {\n\t\t// default: do nothing\n\t}", "title": "" }, { "docid": "5ddf93a11485580bb4ee514d9c4254b0", "score": "0.5163528", "text": "public function rules()\n {\n return [\n // GP One\n 'gpOne.breedId' => 'required',\n 'gpOne.farmFromId' => 'required',\n 'gpOne.sex' => 'required',\n 'gpOne.birthDate' => 'required',\n 'gpOne.birthWeight' => 'required',\n 'gpOne.adgBirth' => 'required',\n 'gpOne.adgBirthEndDate' => 'required',\n 'gpOne.adgBirthEndWeight' => 'required',\n 'gpOne.adgTest' => 'required',\n 'gpOne.adgTestStartDate' => 'required',\n 'gpOne.adgTestStartWeight' => 'required',\n 'gpOne.adgTestEndDate' => 'required',\n 'gpOne.adgTestEndWeight' => 'required',\n 'gpOne.houseType' => 'required',\n 'gpOne.bft' => 'required',\n 'gpOne.bftCollected' => 'required',\n 'gpOne.feedIntake' => 'required',\n 'gpOne.feedEfficiency' => 'required',\n 'gpOne.teatNo' => 'required',\n 'gpOne.parity' => 'required',\n 'gpOne.littersizeAliveMale' => 'required',\n 'gpOne.littersizeAliveFemale' => 'required',\n 'gpOne.littersizeWeaning' => 'required',\n 'gpOne.litterweightWeaning' => 'required',\n 'gpOne.dateWeaning' => 'required',\n 'gpOne.farmSwineId' => 'required',\n 'gpOne.swinecart' => 'required',\n // GP Sire\n 'gpSire.status' => 'required',\n 'gpSire.existingRegNo' => 'required_if:gpSire.status,registered',\n 'gpSire.imported.regNo' => 'required_if:gpSire.status,imported',\n 'gpSire.imported.farmOfOrigin' => 'required_if:gpSire.status,imported',\n 'gpSire.imported.countryOfOrigin' => 'required_if:gpSire.status,imported',\n 'gpSire.breedId' => 'required_if:gpSire.status,new',\n 'gpSire.farmFromId' => 'required_if:gpSire.status,new',\n 'gpSire.sex' => 'required_if:gpSire.status,new',\n 'gpSire.birthDate' => 'required_if:gpSire.status,new',\n 'gpSire.birthWeight' => 'required_if:gpSire.status,new',\n 'gpSire.adgBirth' => 'required_if:gpSire.status,new',\n 'gpSire.adgBirthEndDate' => 'required_if:gpSire.status,new',\n 'gpSire.adgBirthEndWeight' => 'required_if:gpSire.status,new',\n 'gpSire.adgTest' => 'required_if:gpSire.status,new',\n 'gpSire.adgTestStartDate' => 'required_if:gpSire.status,new',\n 'gpSire.adgTestStartWeight' => 'required_if:gpSire.status,new',\n 'gpSire.adgTestEndDate' => 'required_if:gpSire.status,new',\n 'gpSire.adgTestEndWeight' => 'required_if:gpSire.status,new',\n 'gpSire.houseType' => 'required_if:gpSire.status,new',\n 'gpSire.bft' => 'required_if:gpSire.status,new',\n 'gpSire.bftCollected' => 'required_if:gpSire.status,new',\n 'gpSire.feedIntake' => 'required_if:gpSire.status,new',\n 'gpSire.feedEfficiency' => 'required_if:gpSire.status,new',\n 'gpSire.teatNo' => 'required_if:gpSire.status,new',\n 'gpSire.parity' => 'required_if:gpSire.status,new',\n 'gpSire.littersizeAliveMale' => 'required_if:gpSire.status,new',\n 'gpSire.littersizeAliveFemale' => 'required_if:gpSire.status,new',\n 'gpSire.littersizeWeaning' => 'required_if:gpSire.status,new',\n 'gpSire.litterweightWeaning' => 'required_if:gpSire.status,new',\n 'gpSire.dateWeaning' => 'required_if:gpSire.status,new',\n 'gpSire.farmSwineId' => 'required_if:gpSire.status,new',\n // GP Dam\n 'gpDam.status' => 'required',\n 'gpDam.existingRegNo' => 'required_if:gpDam.status,registered',\n 'gpDam.imported.regNo' => 'required_if:gpDam.status,imported',\n 'gpDam.imported.farmOfOrigin' => 'required_if:gpDam.status,imported',\n 'gpDam.imported.countryOfOrigin' => 'required_if:gpDam.status,imported',\n 'gpDam.breedId' => 'required_if:gpDam.status,new',\n 'gpDam.farmFromId' => 'required_if:gpDam.status,new',\n 'gpDam.sex' => 'required_if:gpDam.status,new',\n 'gpDam.birthDate' => 'required_if:gpDam.status,new',\n 'gpDam.birthWeight' => 'required_if:gpDam.status,new',\n 'gpDam.adgBirth' => 'required_if:gpDam.status,new',\n 'gpDam.adgBirthEndDate' => 'required_if:gpDam.status,new',\n 'gpDam.adgBirthEndWeight' => 'required_if:gpDam.status,new',\n 'gpDam.adgTest' => 'required_if:gpDam.status,new',\n 'gpDam.adgTestStartDate' => 'required_if:gpDam.status,new',\n 'gpDam.adgTestStartWeight' => 'required_if:gpDam.status,new',\n 'gpDam.adgTestEndDate' => 'required_if:gpDam.status,new',\n 'gpDam.adgTestEndWeight' => 'required_if:gpDam.status,new',\n 'gpDam.houseType' => 'required_if:gpDam.status,new',\n 'gpDam.bft' => 'required_if:gpDam.status,new',\n 'gpDam.bftCollected' => 'required_if:gpDam.status,new',\n 'gpDam.feedIntake' => 'required_if:gpDam.status,new',\n 'gpDam.feedEfficiency' => 'required_if:gpDam.status,new',\n 'gpDam.teatNo' => 'required_if:gpDam.status,new',\n 'gpDam.parity' => 'required_if:gpDam.status,new',\n 'gpDam.littersizeAliveMale' => 'required_if:gpDam.status,new',\n 'gpDam.littersizeAliveFemale' => 'required_if:gpDam.status,new',\n 'gpDam.littersizeWeaning' => 'required_if:gpDam.status,new',\n 'gpDam.litterweightWeaning' => 'required_if:gpDam.status,new',\n 'gpDam.dateWeaning' => 'required_if:gpDam.status,new',\n 'gpDam.farmSwineId' => 'required_if:gpDam.status,new',\n ];\n }", "title": "" }, { "docid": "410b9c6e2528b4e5c286cb8b996e9098", "score": "0.51629144", "text": "public function rules()\n {\n return [\n 'advertisement_id'=>'sometimes|exists:advertisements,id',\n ];\n }", "title": "" }, { "docid": "7d245371ba3b1870f42d050c259ba002", "score": "0.5160912", "text": "protected function _enableForeignKeyChecks()\n {\n return 'SET CONSTRAINTS ALL IMMEDIATE;';\n }", "title": "" }, { "docid": "1ce990e36c880a99dfa35e75abf5c042", "score": "0.5160155", "text": "function validate() {\n\t\t$this->applyFilter('__ALL__', 'trim');\n\t\t$validated = parent::validate();\n\t\t$pass_populate_only_one = $this->require_populate_only_one();\n\t\treturn ($validated && $pass_populate_only_one);\n\t}", "title": "" }, { "docid": "02ee813f6086694ad287fb572038a209", "score": "0.5151821", "text": "public function rules()\n {\n return [\n 'user_search' => 'required',\n 'user_id' => 'required',\n 'contact_search' => 'required',\n 'contact_tel' => 'required_without:contact_email',\n 'contact_email' => 'required_without:contact_tel',\n 'organisation_search' => 'required',\n 'organisation_location' => 'required',\n 'note' => 'required',\n ];\n }", "title": "" }, { "docid": "8aea1ff0451de086e7db5c70b847d48e", "score": "0.51478386", "text": "public function rules() {\n return array(\n array('vendorType,FirstName,LastName,PrimaryContactFirstName,PrimaryContactLastName,AgencyName,Email,Phone,Password,ConfirmPassword,Id,Proof_of_Identity,Identity_proof_Number,uIdDocument,Proof_of_Address,Address_Proof_Number,AddrPfDocument,Identity_proof_document,Address_proof_document', 'safe'),\n // First Name, Email, Phone, Password and Repeat Password are required\n array('Email,Phone, Password, ConfirmPassword,Identity_proof_Number,Address_Proof_Number', 'required', 'message' => 'Please enter {attribute}.'),\n array('vendorType,Proof_of_Identity,Proof_of_Address', 'required', 'message' => 'Please select {attribute}.'),\n //array('AFirstName', 'required', 'message' => 'Please enter a value for Primary Contact First Name.'),\n //array('ALastName', 'required', 'message' => 'Please enter a value for Primary Contact Last Name.'),\n array('Identity_proof_document,Address_proof_document','required','message'=>'Please upload {attribute}'),\n array('vendorType', 'ext.YiiConditionalValidator.YiiConditionalValidator',\n 'if' => array(\n array('vendorType', 'compare', 'compareValue'=>\"1\")),\n 'then' => array(\n array('FirstName,LastName,', 'required','message' => 'Please enter {attribute}.'),\n array('FirstName,LastName,', 'match', 'pattern' => '/^[a-zA-Z\\s]+$/', 'message' => '{attribute} can only contain alphabet and space'),),\n ),\n array('vendorType', 'ext.YiiConditionalValidator.YiiConditionalValidator',\n 'if' => array(\n array('vendorType', 'compare', 'compareValue'=>\"\")),\n 'then' => array(\n array('FirstName,LastName,', 'required','message' => 'Please enter {attribute}.'),\n array('FirstName,LastName,', 'match', 'pattern' => '/^[a-zA-Z\\s]+$/', 'message' => '{attribute} can only contain alphabet and space'),),\n ),\n\n array('vendorType', 'ext.YiiConditionalValidator.YiiConditionalValidator',\n 'if' => array(\n array('vendorType', 'compare', 'compareValue'=>\"2\")),\n 'then' => array(\n array('PrimaryContactFirstName, PrimaryContactLastName,AgencyName', 'required'),\n array('PrimaryContactFirstName,PrimaryContactLastName,AgencyName', 'match', 'pattern' => '/^[a-zA-Z\\s]+$/', 'message' => '{attribute} can only contain alphabet and space'),),\n ),\n // Email has to be a valid email addressAFirstName,ALastName,AgencyName,\n array('Email', 'email'),\n // Phone min 10 digits\n \n //array('Phone', 'numerical', 'integerOnly'=>true),\n //array('Phone', 'length', \"min\" => \"10\"),\n array('Phone','numerical','integerOnly'=>true,'min'=>1111111111,'tooSmall'=>'{attribute} is too short(minimum is 10 characters)',),\n // password needs to be authenticated\n //array('Password', 'authenticate'),\n array('Password', 'required', 'on' => 'insert'),\n array('ConfirmPassword', 'compare', 'compareAttribute' => 'Password',\n 'message' => 'Password and Confirm Password need to be same'\n ),\n \n \n );\n }", "title": "" }, { "docid": "309293f588cf16c59502bc100419563c", "score": "0.5146161", "text": "public function testValidateFalseNotHavingSpecificValue()\n {\n $dependencyValue = 'value';\n $compareMockItem = $this->_getMockItem('otherValue');\n $rule = new Formagic_Rule_ItemDependency(array(\n 'item' => $compareMockItem,\n 'condition' => Formagic_Rule_ItemDependency::COND_VALUE_NOT_EQUALS,\n 'requirement' => $dependencyValue\n ));\n $actual = $rule->validate('irrelevantValue');\n $this->assertFalse($actual);\n }", "title": "" }, { "docid": "67187e3de52bf8110abd1799734af227", "score": "0.5137676", "text": "protected function department_validation()\n {\n if (is_superadmin_loggedin()) {\n $this->form_validation->set_rules('branch_id', translate('branch'), 'required');\n }\n $this->form_validation->set_rules('department_name', translate('department_name'), 'trim|required|callback_unique_department');\n }", "title": "" }, { "docid": "e80c46b8fe70e8b3c2892c3887126519", "score": "0.51237404", "text": "protected abstract function getSpecificFieldValidator();", "title": "" }, { "docid": "39137f9e3698a7e966a985d06bee5026", "score": "0.5118327", "text": "public function rules()\n {\n return [ \n \n 'paciente_id' =>'required',\n 'medico_id' =>'required',\n 'data_consulta' =>'required|max:10',\n 'hora_consulta' =>'required|max:5',\n 'especialidade_id'=>'required' \n ];\n }", "title": "" }, { "docid": "da298348ab2c6b0c16aa7aa8fcddc4e1", "score": "0.51179713", "text": "public function testBeforeValidateAndBeforeSave() {\n\t\t$this->NullableForeignIdsBehavior->cleanup($this->NullableForeignIdsModel);\n\t\t$this->NullableForeignIdsBehavior->setup($this->NullableForeignIdsModel);\n\t\t\n\t\t$this->NullableForeignIdsModel\n\t\t\t->expects($this->once())\n\t\t\t->method('schema');\n\t\t\n\t\t$sample_data = array($this->NullableForeignIdsModel->alias => array(\n\t\t\t'id' => 5,\n\t\t\t'slug' => 'something',\n\t\t\t'first_foreign_id' => 0,\n\t\t\t'second_foreign_id' => 0,\n\t\t\t'third_foreign_id' => '',\n\t\t\t'fourth_foreign_id' => '',\n\t\t\t'fifth_foreign_id' => false\n\t\t));\n\t\t\n\t\t$this->NullableForeignIdsModel->data = $sample_data;\n\t\t\n\t\t$this->NullableForeignIdsBehavior->beforeValidate($this->NullableForeignIdsModel);\n\t\t$this->NullableForeignIdsBehavior->beforeSave($this->NullableForeignIdsModel);\n\t}", "title": "" }, { "docid": "e25c8123521e5c7e70bce2e6362d4a1d", "score": "0.51147443", "text": "public function rules() {\n return [\n 'participation_class_id' => 'required|exists:participation_classes,id',\n 'source' => 'required',\n 'privacy' => 'boolean'\n ];\n }", "title": "" }, { "docid": "e727ba7e22c5d10c5ce9ffec693ba512", "score": "0.5113858", "text": "function check_ura_required_fields(){\r\n\t\tglobal $wpdb;\r\n\t\t// function option arrays \r\n\t\t$req_fields = get_option( 'csds_userRegAide_registrationFields' );\r\n\t\t// function variables\r\n\t\t$cnt = (int) 0;\r\n\t\t$foption = (string) '';\r\n\t\t$field_id = (int) 0;\r\n\t\t$field_name = (string) '';\r\n\t\t$bpid = (int) 0;\r\n\t\t$field = new FIELDS_DATABASE();\r\n\t\t// database variables & queries \r\n\t\t$results = $this->select_bp_fields();\r\n\t\t$ura_fields = $field->get_all_fields();\r\n\t\t$table_name = $wpdb->prefix.'bp_xprofile_fields';\r\n\t\tforeach( $results as $object ){\r\n\t\t\tforeach( $ura_fields as $obj ){\r\n\t\t\t\tif( $object->id != '1' ){\r\n\t\t\t\t\t$field_name = $object->name;\r\n\t\t\t\t\t$field_id = $object->id;\r\n\t\t\t\t\t$bpid = $obj->bp_ID;\r\n\t\t\t\t\tif( $field_id == $bpid ){\r\n\t\t\t\t\t\t$field_key = $obj->meta_key;\r\n\t\t\t\t\t\tif( array_key_exists( $field_key, $req_fields ) ){\r\n\t\t\t\t\t\t\tif( $object->is_required == '0' ){\r\n\t\t\t\t\t\t\t\t$update = \"UPDATE $table_name SET is_required = %s WHERE id = '%d'\";\r\n\t\t\t\t\t\t\t\t$update = $wpdb->prepare( $update, 1, $bpid );\r\n\t\t\t\t\t\t\t\t$results = $wpdb->query( $update );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif( $object->is_required == '1' ){\r\n\t\t\t\t\t\t\t\t$update = \"UPDATE $table_name SET is_required = %s WHERE id = '%d'\";\r\n\t\t\t\t\t\t\t\t$update = $wpdb->prepare( $update, 0, $bpid );\r\n\t\t\t\t\t\t\t\t$results = $wpdb->query( $update );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\t\r\n\t}", "title": "" }, { "docid": "2555e22684ada4661d16d0505f1eaee3", "score": "0.5099981", "text": "public function rules()\n {\n return [\n 'auto_approval' => ''\n ];\n }", "title": "" }, { "docid": "353113c0b39e8c00899d3cefd9c91441", "score": "0.5093474", "text": "protected function postCalculateFields()\n {\n // Empty for now since some reports in hierarchy Platform and AdNetwork don't require\n }", "title": "" }, { "docid": "1dece8448fe7065c090e99fd5a4b1676", "score": "0.5091596", "text": "private function checkFieldsClarity()\n {\n //Initialize with dirty flag.\n $dirty = $this->dirty;\n foreach ($this->getFields() as $field) {\n $dirty = $dirty || $field->isDirty();\n }\n\n //If flag was set to dirty, or any of fields was dirty, reset cache.\n if ($dirty) {\n $this->cache = [];\n $this->dirty = false;\n }\n }", "title": "" }, { "docid": "5d75e8d841ee603a79adf3d0e5062dad", "score": "0.5086695", "text": "public function testBeforeSaveNullifyWithNoSettings() {\n\t\t$this->NullableForeignIdsBehavior->cleanup($this->NullableForeignIdsModel);\n\t\t$this->NullableForeignIdsBehavior->setup($this->NullableForeignIdsModel);\n\t\t\n\t\t$sample_data = array($this->NullableForeignIdsModel->alias => array(\n\t\t\t'id' => 5,\n\t\t\t'slug' => 'something',\n\t\t\t'first_foreign_id' => 0,\n\t\t\t'second_foreign_id' => 0,\n\t\t\t'third_foreign_id' => '',\n\t\t\t'fourth_foreign_id' => '',\n\t\t\t'fifth_foreign_id' => false\n\t\t));\n\t\t\n\t\t$expected = array($this->NullableForeignIdsModel->alias => array(\n\t\t\t'id' => 5,\n\t\t\t'slug' => 'something',\n\t\t\t'first_foreign_id' => 0,\n\t\t\t'second_foreign_id' => null,\n\t\t\t'third_foreign_id' => null,\n\t\t\t'fourth_foreign_id' => null,\n\t\t\t'fifth_foreign_id' => null\n\t\t));\n\t\t\n\t\t$this->NullableForeignIdsModel->data = $sample_data;\n\t\t$this->NullableForeignIdsBehavior->beforeSave($this->NullableForeignIdsModel);\n\t\t$this->assertSame($expected, $this->NullableForeignIdsModel->data);\n\t}", "title": "" }, { "docid": "a89dcbb06d285ac7a990f82ecc972b61", "score": "0.50845045", "text": "public function testBeforeSaveNullifyWithSomeNullableFieldsAttr() {\n\t\t$this->NullableForeignIdsBehavior->cleanup($this->NullableForeignIdsModel);\n\t\t$this->NullableForeignIdsBehavior->setup($this->NullableForeignIdsModel, array(\n\t\t\t'third_foreign_id',\n\t\t\t'fifth_foreign_id'\n\t\t));\n\t\t\n\t\t$sample_data = array($this->NullableForeignIdsModel->alias => array(\n\t\t\t'id' => 5,\n\t\t\t'slug' => 'something',\n\t\t\t'first_foreign_id' => 0,\n\t\t\t'second_foreign_id' => 0,\n\t\t\t'third_foreign_id' => '',\n\t\t\t'fourth_foreign_id' => '',\n\t\t\t'fifth_foreign_id' => false\n\t\t));\n\t\t\n\t\t$expected = array($this->NullableForeignIdsModel->alias => array(\n\t\t\t'id' => 5,\n\t\t\t'slug' => 'something',\n\t\t\t'first_foreign_id' => 0,\n\t\t\t'second_foreign_id' => 0,\n\t\t\t'third_foreign_id' => null,\n\t\t\t'fourth_foreign_id' => '',\n\t\t\t'fifth_foreign_id' => null\n\t\t));\n\t\t\n\t\t$this->NullableForeignIdsModel->data = $sample_data;\n\t\t$this->NullableForeignIdsBehavior->beforeSave($this->NullableForeignIdsModel);\n\t\t$this->assertSame($expected, $this->NullableForeignIdsModel->data);\n\t}", "title": "" }, { "docid": "6a77ed9ed84aa5e27e007e715f4f19e5", "score": "0.5073417", "text": "public function testCheckRequiredFieldsAllFieldsAreFine()\n {\n\n $aMustFillFields = array( 'oxuser__oxfname', 'oxuser__oxlname', 'oxuser__oxbirthdate' );\n\n modConfig::getInstance()->setConfigParam( 'aMustFillFields', $aMustFillFields );\n\n try {\n $aInvAdress = array( 'oxuser__oxfname' => 'xxx', 'oxuser__oxbirthdate' => array( 'year' => '123' ) );\n $aDelAdress = array( 'oxuser__oxlname' => 'yyy' );\n\n $oUser = $this->getProxyClass(\"oxUser\");\n $oUser->UNITcheckRequiredFields( $aInvAdress, $aDelAdress);\n } catch ( oxExcpUserDataCheck $oException ) {\n $this->fail( 'failed test test_checkRequiredFields' );\n }\n }", "title": "" }, { "docid": "9a9fe8386eff40f66140cf604921f93e", "score": "0.5072894", "text": "public function testGetDenormalizedFieldsEmptySettings() {\n\t\t\n\t\t$this->assertFalse($this->ApiBehavior->getDenormalizedFields($this->TestModel));\n\t\t\n\t}", "title": "" }, { "docid": "37e6f381ce4004c56a4e5c56b3fd205e", "score": "0.50668305", "text": "function required_fields_validation()\n\t{\n\t\tglobal $errors;\n\t\t$required = array('full_name','account_number', 'account_name', 'email', 'phone_number');\n\t\tforeach ($required as $field) {\n\t\t\tif (empty($_POST[$field])) {\n\t\t\t\t$errors[] = \"You must fill out all fields!\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $errors;\n\t}", "title": "" } ]
b8d8b95e93619027f91fbf9f52f4bec3
/ =========================== ini tools untuk fingerprint ===========================
[ { "docid": "aa4d9fdfa5ed1b32619077fdce89fd28", "score": "0.0", "text": "public function order_format()\n {\n $year = date(\"Y\");\n $month = date(\"m\");\n $day = date(\"d\");\n $order_format = \"VP-\" . $year . \"/\" . $month . \"-\" . $day;\n return $order_format;\n }", "title": "" } ]
[ { "docid": "8b28c53eb18a3823d14a7e46f6bc8a60", "score": "0.7086485", "text": "public function getFingerprint()\n {\n }", "title": "" }, { "docid": "77ad9a8e19a036bbebb608df679c9e38", "score": "0.6335302", "text": "protected static function fingerprint() {\n\t\treturn strtoupper(md5(implode('|', array($_SERVER['REMOTE_ADDR'], $_SERVER['HTTP_USER_AGENT']))));\n\t}", "title": "" }, { "docid": "051065ea6bc60ad0074b524054436e09", "score": "0.62464863", "text": "protected static function fingerprint() {\r\n\t\treturn strtoupper(md5(implode('|', array($_SERVER['REMOTE_ADDR'], $_SERVER['HTTP_USER_AGENT']))));\r\n\t}", "title": "" }, { "docid": "89e869c51950ccf440f71b8049acf48c", "score": "0.6191624", "text": "public function _generate_email_fingerprint()\n\t{\n\t\tforeach ($this->fingerprint_sources as $prop)\n\t\t{\n\t\t\t$this->fingerprint .= $this->$prop;\n\t\t}\n\t\t$this->fingerprint = md5($this->fingerprint);\n\t}", "title": "" }, { "docid": "f74a45bf8f1b1dec8ec20404e60eccf7", "score": "0.60800594", "text": "public function get_fingerprint()\n\t{\n\t\treturn $this->fingerprint;\n\t}", "title": "" }, { "docid": "8f7d40deabf01e91224e13b7623e4210", "score": "0.59074694", "text": "private function setFingerprint($fingerprint) {\n $this->fingerprint = $fingerprint;\n }", "title": "" }, { "docid": "628adf3351bf6550b56d7b39c402ee43", "score": "0.5891189", "text": "public function getFingerprint() {\n return $this->fingerprint;\n }", "title": "" }, { "docid": "cdf2b947b507b698edb15e4c4b55eb13", "score": "0.58646625", "text": "private function generateFingerprint(): string\n {\n $fingerprint = '';\n\n foreach ($this->fingerprintGenerators as $fingerprintGenerator) {\n $fingerprint .= $fingerprintGenerator->generate();\n }\n\n return $fingerprint;\n }", "title": "" }, { "docid": "833c0b980759a4a5a6f3980ea1b9a899", "score": "0.5846114", "text": "public function identify();", "title": "" }, { "docid": "373d5ee7d57f1acced4d83f7497afcda", "score": "0.57595915", "text": "protected function updateFingerprint()\n\t{\n\t\t$user_agent = !empty($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : 'unknown';\n\n\t\t// No need for the exact user agent, a hash is enough.\n\t\t$this->set('UA', $this->hash($user_agent . $this->token));\n\t}", "title": "" }, { "docid": "0f5eed75f1214ffa986b87c93165141c", "score": "0.57168543", "text": "public function show(Fingerprint $fingerprint)\n {\n //\n }", "title": "" }, { "docid": "cf517fcb31835bdb87e51147e6eb821b", "score": "0.56806296", "text": "public function getFingerprint()\n {\n return isset($this->fingerprint) ? $this->fingerprint : '';\n }", "title": "" }, { "docid": "cf517fcb31835bdb87e51147e6eb821b", "score": "0.56806296", "text": "public function getFingerprint()\n {\n return isset($this->fingerprint) ? $this->fingerprint : '';\n }", "title": "" }, { "docid": "cf517fcb31835bdb87e51147e6eb821b", "score": "0.56806296", "text": "public function getFingerprint()\n {\n return isset($this->fingerprint) ? $this->fingerprint : '';\n }", "title": "" }, { "docid": "737159b4d5a6e002da9c92a50e8ac2d0", "score": "0.5527759", "text": "public static function fingerprint()\n {\n return \\Illuminate\\Http\\Request::fingerprint();\n }", "title": "" }, { "docid": "5cb0d5f86c700e1786fd5f9cfec908ec", "score": "0.5404988", "text": "public function setFingerprint($var)\n {\n GPBUtil::checkString($var, True);\n $this->fingerprint = $var;\n\n return $this;\n }", "title": "" }, { "docid": "5cb0d5f86c700e1786fd5f9cfec908ec", "score": "0.5404988", "text": "public function setFingerprint($var)\n {\n GPBUtil::checkString($var, True);\n $this->fingerprint = $var;\n\n return $this;\n }", "title": "" }, { "docid": "5cb0d5f86c700e1786fd5f9cfec908ec", "score": "0.5404988", "text": "public function setFingerprint($var)\n {\n GPBUtil::checkString($var, True);\n $this->fingerprint = $var;\n\n return $this;\n }", "title": "" }, { "docid": "535c7e0f151b2231429a085725baa642", "score": "0.5373624", "text": "public function getFingerprint()\n {\n if (array_key_exists(\"fingerprint\", $this->_propDict)) {\n return $this->_propDict[\"fingerprint\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "1708e7a1a354fc0cc2fa23d83a9e184f", "score": "0.52744097", "text": "public static function pHash1($ffname):string\n {\n // Resize the image.\n $img = self::get_resampled_gray($ffname,32,32);\n\n $matrix = [];\n $row = [];\n $rows = [];\n $col = [];\n\n for ($y = 0; $y < 32; $y++) \n {\n for ($x = 0; $x < 32; $x++) \n {\n $row[$x] = imagecolorat($img, $x, $y) & 0xFF;\n # $row[$x] = (int) floor(($rgb[0] * 0.299) + ($rgb[1] * 0.587) + ($rgb[2] * 0.114));\n }\n $rows[$y] = self::calculateDCT1($row);\n }\n\n for ($x = 0; $x < 32; $x++) \n {\n for ($y = 0; $y < 32; $y++) \n {\n $col[$y] = $rows[$y][$x];\n }\n $matrix[$x] = self::calculateDCT1($col);\n }\n\n // Extract the top 8x8 pixels.\n $pixels = [];\n for ($y = 0; $y < 8; $y++) \n {\n for ($x = 0; $x < 8; $x++) \n {\n $pixels[] = $matrix[$y][$x];\n }\n }\n\n // Method === MEDIAN) \n //{\n $compare = self::median($pixels);\n //} else \n // {\n # $compare = self::average($pixels);\n // }\n \n // Calculate hash.\n $bits = [];\n foreach ($pixels as $pixel) \n {\n $bits[] = ($pixel > $compare) ? '1' : '0';\n }\n\n // have array of chars '0' or '1'\n return gmp_strval( gmp_init(implode($bits),2) ); # 64-bit unsigned number as string, ready for database insert query\n }", "title": "" }, { "docid": "540edeed58cdc882cbc27c282eeec055", "score": "0.52656424", "text": "public static function browserFingerprint(){\n\t\treturn self::$browserFingerprint;\n\t}", "title": "" }, { "docid": "b2b92594774f60c200b4188e77d40f03", "score": "0.5190344", "text": "public function openFinger($id)\n {\n $customer = Customer::findOrFail($id);\n // $mdbFilename = \\App\\Setting::where('set_name','=','fingerprint')->first()->name;\n $mdbFilename = $_SERVER[\"DOCUMENT_ROOT\"].\"/hyatt/timekeeper/timekeeper.exe\";\n if (file_exists($mdbFilename)) {\n // echo $mdbFilename;\n echo exec($mdbFilename);\n }else{\n echo $mdbFilename;\n }\n \n }", "title": "" }, { "docid": "1c10e7a340db1ca7328ec7e38c929368", "score": "0.51599324", "text": "public function getGenInfo();", "title": "" }, { "docid": "95b86526d401910d36e8d6994ea8edbe", "score": "0.5149647", "text": "function get_Signature($field,$key) {\n\nksort($field); // tri des paramétres par ordre alphabétique\n$contenu_signature = \"\";\nforeach ($field as $nom => $valeur)\n{\n\tif(substr($nom,0,5) == 'vads_') {\n\t$contenu_signature .= $valeur.\"+\";\n\t}\n}\n$contenu_signature .= $key;\t// On ajoute le certificat à la fin de la chaîne.\n$signature = sha1($contenu_signature);\nreturn($signature);\n\n}", "title": "" }, { "docid": "abcc04644cdb34da592fac277e498f30", "score": "0.51493627", "text": "public static function fingerprint()\n {\n /** @var \\Illuminate\\Http\\Request $instance */\n return $instance->fingerprint();\n }", "title": "" }, { "docid": "072bf7263ad771ac1adf7632d6ddc220", "score": "0.5133738", "text": "public function fingerprint(Request $request)\n {\n return $this->fingerprinter->fingerprint(\n $request\n );\n }", "title": "" }, { "docid": "2f36326809533f02cba4b49ec8d78e7d", "score": "0.5093929", "text": "function info_camera($imagePath) {\n\n // Mengecek keberadaan file, jika tidak ditemukan maka tidak akan diproses\n if ((isset($imagePath)) and (file_exists($imagePath))) {\n \n // Ada 2 informasi dengan berbentuk array, yaitu IFD0 dan EXIF.\n $exif_ifd0 = read_exif_data($imagePath ,'IFD0' ,0); \n $exif_exif = read_exif_data($imagePath ,'EXIF' ,0);\n \n // Informasi tidak ditemukan\n $notFound = \"Tidak terdeteksi\";\n \n // Make\n if (@array_key_exists('Make', $exif_ifd0)) {\n $camMake = $exif_ifd0['Make'];\n } else { $camMake = $notFound; }\n \n // Model\n if (@array_key_exists('Model', $exif_ifd0)) {\n $camModel = $exif_ifd0['Model'];\n } else { $camModel = $notFound; }\n \n // Exposure\n if (@array_key_exists('ExposureTime', $exif_ifd0)) {\n $camExposure = $exif_ifd0['ExposureTime'];\n } else { $camExposure = $notFound; }\n\n // Aperture\n if (@array_key_exists('ApertureFNumber', $exif_ifd0['COMPUTED'])) {\n $camAperture = $exif_ifd0['COMPUTED']['ApertureFNumber'];\n } else { $camAperture = $notFound; }\n\n // Width\n if (@array_key_exists('Width', $exif_ifd0['COMPUTED'])) {\n $camWidth = $exif_ifd0['COMPUTED']['Width'];\n } else { $camWidth = $notFound; }\n \n // Height\n if (@array_key_exists('Height', $exif_ifd0['COMPUTED'])) {\n $camHeight = $exif_ifd0['COMPUTED']['Height'];\n } else { $camHeight = $notFound; }\n\n // Date\n if (@array_key_exists('DateTime', $exif_ifd0)) {\n $camDate = $exif_ifd0['DateTime'];\n } else { $camDate = $notFound; }\n \n // GPSLatitudeRef\n if (@array_key_exists('GPSLatitudeRef',$exif_exif)) {\n $camGPSLatitudeRef = $exif_exif['GPSLatitudeRef'];\n } else { $camGPSLatitudeRef = $notFound; }\n\n // GPSLatitude\n if (@array_key_exists('GPSLatitude',$exif_exif)) {\n $camGPSLatitude = $exif_exif['GPSLatitude'];\n } else { $camGPSLatitude = $notFound; }\n\n // GPSLongitudeRef\n if (@array_key_exists('GPSLongitudeRef',$exif_exif)) {\n $camGPSLongitudeRef = $exif_exif['GPSLongitudeRef'];\n } else { $camGPSLongitudeRef = $notFound; }\n\n // GPSLongitude\n if (@array_key_exists('GPSLongitude',$exif_exif)) {\n $camGPSLongitude = $exif_exif['GPSLongitude'];\n } else { $camGPSLongitude = $notFound; }\n\n // ISO\n if (@array_key_exists('ISOSpeedRatings',$exif_exif)) {\n $camIso = $exif_exif['ISOSpeedRatings'];\n } else { $camIso = $notFound; }\n \n $return = array();\n $return['make'] = $camMake;\n $return['model'] = $camModel;\n $return['exposure'] = $camExposure;\n $return['aperture'] = $camAperture;\n $return['width'] = $camWidth;\n $return['height'] = $camHeight;\n $return['date'] = $camDate;\n $return['iso'] = $camIso;\n $return['total_pixels'] = $camHeight * $camWidth;\n $return['ratio_pixels'] = $camWidth/$camHeight;\n $return['GPSLatitudeRef'] = $camGPSLatitudeRef;\n $return['GPSLatitude'] = $camGPSLatitude;\n $return['GPSLongitudeRef'] = $camGPSLongitudeRef;\n $return['GPSLongitude'] = $camGPSLongitude;\n return $return;\n \n } else {\n // Berkas tidak ditemukan\n return false;\n }\n}", "title": "" }, { "docid": "f3babe2964121159af6322f38b8eb720", "score": "0.5067216", "text": "public function detect();", "title": "" }, { "docid": "f3babe2964121159af6322f38b8eb720", "score": "0.5067216", "text": "public function detect();", "title": "" }, { "docid": "f3babe2964121159af6322f38b8eb720", "score": "0.5067216", "text": "public function detect();", "title": "" }, { "docid": "5bd764cc23b43e2c567ecbe33d34d026", "score": "0.50597066", "text": "function mkPasskey(){\n\n\tglobal $dbLink, $mainFID, $userID;\n\t\n$site_keyQ = \"SELECT `value` FROM `xbt_config` WHERE name='torrent_pass_private_key'\";\n\tif($result = $dbLink->query($site_keyQ)){\n\t\twhile ($row = $result->fetch_row()){\n\t\t\t$site_key=$row[0];}\n\t\t$result->close();\n\t}\n\n$torInHash = \"SELECT `info_hash` FROM `xbt_files` WHERE fid={$mainFID}\";\n\nif($result = $dbLink->query($torInHash)){\n\t\twhile ($row = $result->fetch_row()){\n\t\t\t$info_hash_bin=$row[0];}\n\t\t$result->close();\n\t}\n\n$info_hash=bin2hex($info_hash_bin);\n\n$torPaQu = \"SELECT `torrent_pass_version` FROM `xbt_users` WHERE uid={$userID}\";\n\nif($result = $dbLink->query($torPaQu)){\n\t\twhile ($row = $result->fetch_row()){\n\t\t\t$torrent_pass_version=$row[0];}\n\t\t$result->close();\n\t}\n\n$passkey = sprintf('%08x%s', $uid, substr(sha1(sprintf('%s %d %d %s', $site_key, $torrent_pass_version, $uid, pack('H*', $info_hash))), 0, 24));\n\nreturn $passkey;\n\n}", "title": "" }, { "docid": "450fb5d7edee187f336a9a9c4fdf138b", "score": "0.5033298", "text": "private function get_signature()\n {\n }", "title": "" }, { "docid": "dd5b2073587a5dfaf0c96c36a468686f", "score": "0.49909154", "text": "function initInfo() {}", "title": "" }, { "docid": "4981acd688b27978612b0b347dba5821", "score": "0.49738297", "text": "function equipDocHash($data,$field){\n $currentName = $data['name'];\n // return random int so browser does not cache profile image if changed in same date.\n return rand(1000,9999) . Security::hash($currentName.date('YmdHHMMII'), 'sha1', true).substr($currentName,strrpos($currentName,\".\"));\n}", "title": "" }, { "docid": "332d1132be5cb4d91744c0a56029f007", "score": "0.49674135", "text": "function IdentifyHash($str)\n{\n $hashes = array\n (\n '/^[a-f0-9]{4}$/i' => 'CRC-16,CRC-16-CCITT,FCS-16',\n '/^[a-f0-9]{8}$/i' => 'Adler32,CRC-32,CRC-32B,FCS-32,GHash-32-3,GHash-32-5,XOR-32,FNV-132,Joaat',\n '/^\\+[a-z0-9\\/\\.]{12}$/i' => 'Blowfish(Eggdrop)',\n '/^.{0,2}[a-z0-9\\/\\.]{11}$/i' => 'DES(Unix)',\n '/^[a-f0-9]{16}$/i' => 'MySQL3.x,LM,DES(Oracle),VNC,FNV-164',\n '/^[a-z0-9\\/\\.]{16}$/i' => 'MD5(Cisco PIX)',\n '/^\\$1\\$.{0,8}\\$[a-z0-9\\/\\.]{22}$/i' => 'MD5(Unix)',\n '/^\\$apr1\\$.{0,8}\\$[a-z0-9\\/\\.]{22}$/i' => 'MD5(APR)',\n '/^[a-f0-9]{24}$/i' => 'CRC-96(ZIP)',\n '/^\\$H\\$[a-z0-9\\/\\.]{31}$/i' => 'MD5(phpBB3)',\n '/^\\$P\\$[a-z0-9\\/\\.]{31}$/i' => 'MD5(Wordpress)',\n '/^[0-9a-f]{32}$/i' => 'MD5,NTLM,Domain Cached Credentials,Domain Cached Credentials 2,RAdmin v2.x,MD4,MD2,RIPEMD-128,Haval-128,Tiger-128,Snefru-128,Skein-256(128),Skein-512(128)',\n '/^0x[a-f0-9]{32}$/i' => 'Lineage II C4',\n '/^[a-f0-9]{32}:[a-z0-9]{32}$/i' => 'MD5(Joomla)', \n '/^[a-f0-9]{32}:.{5}$/i' => 'MD5(IP.Board)',\n '/^[a-f-0-9]{32}:[a-z0-9]{8}$/i' => 'MD5(MyBB)',\n '/^[a-f0-9]{40}$/i' => 'SHA-1,MySQL4.x,RIPEMD-160,Haval-160,SHA-1(MaNGOS),SHA-1(MaNGOS2),Tiger-160,Skein-256(160),Skein-512(160)',\n '/^\\*[a-f0-9]{40}$/i' => 'MySQL5.x',\n '/^sha1\\$.{0,32}\\$[a-f0-9]{40}$/i' => 'SHA-1(Django)',\n '/^0x0100[a-f0-9]{0,8}?[a-f0-9]{40}$/i' => 'MSSQL(2005),MSSQL(2008)',\n '/^[a-f0-9]{48}$/i' => 'Haval-192,Tiger-192',\n '/^[a-f0-9]{51}$/i' => 'MD5(Palshop)',\n '/^\\$S\\$[a-z0-9\\/\\.]{52}$/i' => 'SHA-512(Drupal)',\n '/^\\$2a\\$[0-9]{0,2}?\\$[a-z0-9\\/\\.]{53}$/i' => 'Blowfish(OpenBSD)',\n '/^[a-f0-9]{56}$/i' => 'SHA-224,Haval-224,Keccak-224,Skein-256(224),Skein-512(224)',\n '/^[a-f0-9]{64}$/i' => 'SHA-256,RIPEMD-256,Haval-256,Snefru-256,GOST R 34.11-94,Keccak-256,Skein-256,Skein-512(256)',\n '/^sha256\\$.{0,32}\\$[a-f0-9]{64}$/i' => 'SHA-256(Django)',\n '/^\\$5\\$.{0,22}\\$[a-z0-9\\/\\.]{43,69}$/i' => 'SHA-256(Unix)',\n '/^[a-f0-9]{80}$/i' => 'RIPEMD-320',\n '/^0x0100[a-f0-9]{0,8}?[a-f0-9]{80}$/i' => 'MSSQL(2000)',\n '/^\\$6\\$.{0,22}\\$[a-z0-9\\/\\.]{86}$/i' => 'SHA-512(Unix)',\n '/^[a-f0-9]{96}$/i' => 'SHA-384,Keccak-384,Skein-512(384),Skein-1024(384)',\n '/^sha384\\$.{0,32}\\$[a-f0-9]{96}$/i' => 'SHA-384(Django)',\n '/^[a-f0-9]{128}$/i' => 'SHA-512,Whirlpool,Keccak-512,Skein-512,Skein-1024(512)',\n '/^[a-f0-9]{256}$/i' => 'Skein-1024',\n '/^({SSHA})?[a-z0-9\\+\\/]{32,38}?(==)?$/i' => 'SSHA-1',\n '/^\\(?[a-z0-9\\+\\/]{20}\\)?$/i' => 'Lotus Domino',\n '/^[a-f0-9]{32}:[a-z0-9]{2}$/i' => 'MD5(osCommerce)',\n '/^[a-f-0-9]{32}:[a-f-0-9]{32}$/i' => 'SAM(LM_Hash:NT_Hash)',\n\t'/^\\$sha\\$[a-z0-9]{0,16}\\$[a-f0-9]{64}$/i' => 'Minecraft(AuthMe Reloaded)'\n );\n \n //initialize the array\n $possibleHashes = array();\n $nextHash = array();\n \n //loop and find matches\n foreach($hashes as $key => $value) {\n if(preg_match($key, $str)) {\n //explode the hashlist\n $nextHash = explode(\",\", $value);\n foreach($nextHash as $newVal) {\n //append to array\n array_push($possibleHashes, $newVal);\n }\n }\n }\n \n //no hash found\n if(empty($possibleHashes)) {\n return $possibleHashes = array('Unknown Hash');\n }\n //return the array\n else {\n return $possibleHashes;\n }\n}", "title": "" }, { "docid": "fe6dc7e608f862f8eb1f95c02bc1fe94", "score": "0.49502563", "text": "public function info();", "title": "" }, { "docid": "fe6dc7e608f862f8eb1f95c02bc1fe94", "score": "0.49502563", "text": "public function info();", "title": "" }, { "docid": "fe6dc7e608f862f8eb1f95c02bc1fe94", "score": "0.49502563", "text": "public function info();", "title": "" }, { "docid": "a04deb4aad18b3caed9a39fa3ad78bcc", "score": "0.49463934", "text": "public function setFingerprint($val)\n {\n $this->_propDict[\"fingerprint\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "495284349638b0ec7b2a1853852a2565", "score": "0.49421167", "text": "public function isFingerprint(): bool\n {\n $hash = md5(\n $_SERVER['HTTP_USER_AGENT'] .\n (ip2long($_SERVER['REMOTE_ADDR']) & ip2long('255.255.0.0'))\n );\n\n if (isset($_SESSION['_fingerprint'])) {\n return $_SESSION['_fingerprint'] === $hash;\n }\n\n $_SESSION['_fingerprint'] = $hash;\n\n return true;\n }", "title": "" }, { "docid": "de18c3720659b971734b607ade7b835b", "score": "0.49403027", "text": "public function run_detect()\n {\n }", "title": "" }, { "docid": "fb26a52b11a62c22dc0915a578d9509f", "score": "0.4926636", "text": "public function getLabelFingerprint()\n {\n return isset($this->label_fingerprint) ? $this->label_fingerprint : '';\n }", "title": "" }, { "docid": "e58dc6e528f510ceaacf83b0b3acc6e0", "score": "0.4925878", "text": "function getUniqueInfo( $vms ) {\n\tglobal $root;\n\trequire_once $root . 'dc_tools.php';\n\trequire_once $root . 'lookup_savefile.php';\n\n\t$luSaves = new saveLookup();\n\t$luGame = $luSaves->getGame( $vms );\n\n\tif ( strpos( $vms->getVMStext(), \"PSO/SCREEN_IMAGE\" ) !== false ) {\n\t\t$imgName = createVMSpso( $vms );\n\t\tprintFileBar();\n\t\t?>\n\t\t<tr bgcolor='<?php echo ac(); ?>'>\n\t\t\t<th>Screenshot</th>\n\t\t\t<th><img src='<?php echo $imgName; ?>'></th>\n\t\t</tr>\n\t\t<?php\n\t} else if ( getGameName( JET_GRIND_RADIO ) == $luGame ) {\n\t\t$imgName = createVMSjgr( $vms );\n\t\t$imgAlphaName = createVMSjgrALPHA( $vms );\n\t\tif ( $imgAlphaName ) {\n\t\t\tprintFileBar();\n\t\t\t?>\n\t\t\t<tr bgcolor='<?php echo ac(); ?>'>\n\t\t\t\t<th>Graffiti</th>\n\t\t\t\t<th><img src='<?php echo $imgName; ?>'></th>\n\t\t\t</tr>\n\t\t\t<tr bgcolor='<?php echo ac(); ?>'>\n\t\t\t\t<th>Transparency Mask</th>\n\t\t\t\t<th><img src='<?php echo $imgAlphaName; ?>'></th>\n\t\t\t</tr>\n\t\t\t<?php\n\t\t}\n\t} else if ( getGameName( SHENMUE ) == $luGame ) {\n\t\tprintFileBar();\n\t\tif ( shenmuePrintSlotTime( $vms, \"Resume Game\", 0x700 ) ) {\n\t\t\t$money = $vms->readInt_16(0x818);\n\t\t\t?>\n\t\t\t\t<tr bgcolor='<?php echo ac(); ?>'>\n\t\t\t\t\t<th>Money</th>\n\t\t\t\t\t<th><?php echo \"\\$$money\" ?></th>\n\t\t\t\t</tr>\n\t\t\t<?php\n\t\t}\n\t\tif ( shenmuePrintSlotTime( $vms, \"Slot 1\", 0x740 ) ) {\n\t\t\t$money = $vms->readInt_16(0x2018);\n\t\t\t?>\n\t\t\t\t<tr bgcolor='<?php echo ac(); ?>'>\n\t\t\t\t\t<th>Money</th>\n\t\t\t\t\t<th><?php echo \"\\$$money\" ?></th>\n\t\t\t\t</tr>\n\t\t\t<?php\n\t\t}\n\t\tif ( shenmuePrintSlotTime( $vms, \"Slot 2\", 0x780 ) ) {\n\t\t\t$money = $vms->readInt_16(0x3818);\n\t\t\t?>\n\t\t\t\t<tr bgcolor='<?php echo ac(); ?>'>\n\t\t\t\t\t<th>Money</th>\n\t\t\t\t\t<th><?php echo \"\\$$money\" ?></th>\n\t\t\t\t</tr>\n\t\t\t<?php\n\t\t}\n\t\tif ( shenmuePrintSlotTime( $vms, \"Slot 3\", 0x7C0 ) ) {\n\t\t\t$money = $vms->readInt_16(0x5018);\n\t\t\t?>\n\t\t\t\t<tr bgcolor='<?php echo ac(); ?>'>\n\t\t\t\t\t<th>Money</th>\n\t\t\t\t\t<th><?php echo \"\\$$money\" ?></th>\n\t\t\t\t</tr>\n\t\t\t<?php\n\t\t}\n\t}\n}", "title": "" }, { "docid": "a8f6cf150a0d9e1da69e1788e073a061", "score": "0.49063668", "text": "public function init()\n\t\t{\n\t\t\t$this->SetHelpText(GetLang('VerifyFilesHelpText'));\n\t\t\t$this->ShowSaveAndCancelButtons(false);\n\n\t\t\t$this->hashUrl = $this->hashPath.PRODUCT_VERSION_CODE.$this->hashExtension;\n\t\t\t$this->cacheFile = ISC_CACHE_DIRECTORY.'/'.PRODUCT_VERSION_CODE.'_hashes.txt';\n\t\t}", "title": "" }, { "docid": "b0b3efea6287f626252176a9a8f9a16d", "score": "0.48937523", "text": "function init__lookup()\n{\n require_code('submit'); // For the wrap_probe_ip function\n}", "title": "" }, { "docid": "f253a3dd3f479cdb764c6b76b3bc87dd", "score": "0.4891025", "text": "function creating_identicons($user,$pass,$email,$gender){\n\t$hash = md5($user . $pass . $email . $gender);\n\t// Get color from first 6 characters\n\t$color = substr($hash, 0, 6);\n// Create an array to store our boolean \"pixel\" values\n\t$pixels = array();\n\n// Make it a 5x5 multidimensional array\n\tfor ($i = 0; $i < 5; $i++) {\n\t\tfor ($j = 0; $j < 5; $j++) {\n\t\t\t$pixels[$i][$j] = hexdec(substr($hash, ($i * 5) + $j + 6, 1))%2 === 0;\n\t\t}\n\t}\n\n// Create image\n\t$image = imagecreatetruecolor(400, 400);\n// Allocate the primary color. The hex code we assigned earlier needs to be decoded to RGB\n\t$color = imagecolorallocate($image, hexdec(substr($color,0,2)), hexdec(substr($color,2,2)), hexdec(substr($color,4,2)));\n// And a background color\n\t$bg = imagecolorallocate($image, 238, 238, 238);\n\n// Color the pixels\n\tfor ($k = 0; $k < count($pixels); $k++) {\n\t\tfor ($l = 0; $l < count($pixels[$k]); $l++) {\n // Default pixel color is the background color\n\t\t\t$pixelColor = $bg;\n\n // If the value in the $pixels array is true, make the pixel color the primary color\n\t\t\tif ($pixels[$k][$l]) {\n\t\t\t\t$pixelColor = $color;\n\t\t\t}\n\n // Color the pixel. In a 400x400px image with a 5x5 grid of \"pixels\", each \"pixel\" is 80x80px\n\t\t\timagefilledrectangle($image, $k * 80, $l * 80, ($k + 1) * 80, ($l + 1) * 80, $pixelColor);\n\t\t}\n\t}\n\n// Output the image\n\n\timagePNG($image,\"../sys_img/profile_\".$user.\".png\");\n\n\t\t//header(\"content-type: image/jpeg\");\n\t\t//echo imageJPEG($image);;\n}", "title": "" }, { "docid": "c2b5efe277f627b234be46d0043ec472", "score": "0.4889381", "text": "public function attachutil()\n\t{\n\t\t$this->attachutil_attach_now_insert = \"INSERT INTO %pattach (attach_file, attach_name, attach_post, attach_size) VALUES ('%s', '%s', %d, %d)\";\n\t\t$this->attachutil_delete_now_delete = \"DELETE FROM %pattach WHERE attach_post=%d AND attach_file = '%s'\";\n\t\t$this->attachutil_insert_insert = \"INSERT INTO %pattach (attach_file, attach_name, attach_post, attach_size) VALUES ('%s', '%s', %d, %d)\";\n\t\t$this->attachutil_build_attached_data_select = 'SELECT attach_file, attach_name FROM %pattach WHERE attach_post=%d';\n\t}", "title": "" }, { "docid": "c8b35004db017f815c153792914ef525", "score": "0.48887357", "text": "function install_plugin_information() {}", "title": "" }, { "docid": "55bcf312a0786d6de8cd900fa2304ae6", "score": "0.4888536", "text": "public function edit(Fingerprint $fingerprint)\n {\n //\n }", "title": "" }, { "docid": "c69c031dbcdd5d6eb172a66ceb6d4186", "score": "0.48541474", "text": "public static function grabFingerprint(string $file_content)\n\t{\n\t\t$gpg = gnupg_init();\n\t\tif (false === ($result = gnupg_import($gpg, $file_content))) {\n\t\t\tGWF_Log::logCritical('gnupg_import() failed');\n\t\t\tGWF_Log::logCritical(GWF_HTML::lang('ERR_GENERAL', __FILE__, __LINE__));\n\t\t\treturn false;\n\t\t}\n\t\tif ( ($result['imported']+$result['unchanged']) === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn $result['fingerprint'];\n\t}", "title": "" }, { "docid": "2ee995406676f59e18654aa1734ee21c", "score": "0.48350954", "text": "protected function fingerprint($data)\n {\n $route = request()->route();\n \n return sha1(implode('|', array_merge($data, [\n $route->domain(),\n $route->uri(),\n request()->ip()\n ])));\n }", "title": "" }, { "docid": "9f476dae99f0fb70fd16bcbe739d069a", "score": "0.48293927", "text": "public function flopImage();", "title": "" }, { "docid": "badd9ef7d493d55ba817c5c8b95c29f0", "score": "0.48132595", "text": "function findCheckpoint() {\r\n\t\t\r\n\t}", "title": "" }, { "docid": "dc6b4c0413a145ae8cf536b7c1352fba", "score": "0.4809474", "text": "function probe($path){\r\n $ffprobe=\"sudo /usr/local/bin/ffmpeg/ffprobe -v quiet -print_format json -show_format\";\r\n exec($ffprobe. \" \". $path,$probe);\r\n $raw_info_probe = implode('', $probe);\r\n return json_decode($raw_info_probe,true);\r\n}", "title": "" }, { "docid": "f40befdb363d8beb60f22d6fb677f99e", "score": "0.48090607", "text": "function info_call_after_install() {\n }", "title": "" }, { "docid": "3f87a8acdc0575571b1ad22fd8f60c24", "score": "0.48066118", "text": "public static function main() {\n return md5(strtolower(trim($_REQUEST['email']))). \"?d=\" . urlencode(DEFAULT_PHOTO_LOCATION);\n }", "title": "" }, { "docid": "b1f13f5b0747d1ca63249944d9a6cabf", "score": "0.47968942", "text": "public function DefaultImageProfiders(){\n\t\t$Return = array(\n\t\t\t'404',\n\t\t\t'mm',\n\t\t\t'identicon',\n\t\t\t'monsterid',\n\t\t\t'wavatar',\n\t\t\t'retro'\n\t\t);\n\t\treturn $Return;\t\n\t}", "title": "" }, { "docid": "240627baba3544826a0aa59611c2bfea", "score": "0.4753992", "text": "public static function enable_infos()\n\t{\n\t\tstatic::$_print_infos = true;\n\t}", "title": "" }, { "docid": "ebf9d18ccdd07ed84f74afb29d417d97", "score": "0.47448418", "text": "protected function detect()\n {\n }", "title": "" }, { "docid": "ebf9d18ccdd07ed84f74afb29d417d97", "score": "0.47448418", "text": "protected function detect()\n {\n }", "title": "" }, { "docid": "ebf9d18ccdd07ed84f74afb29d417d97", "score": "0.47448418", "text": "protected function detect()\n {\n }", "title": "" }, { "docid": "ebf9d18ccdd07ed84f74afb29d417d97", "score": "0.474396", "text": "protected function detect()\n {\n }", "title": "" }, { "docid": "d224825ff403f9aacf6dc21af8135c05", "score": "0.472244", "text": "function trace_info($uid, $type, $info)\n{\n _write_trace(intval($uid), $type, $info, '../runtime/trace/info/',date('Y-m-d'));\n}", "title": "" }, { "docid": "0083e0e5fa8c28b85d433f525548be9f", "score": "0.4720518", "text": "protected function getFingerprint($uidToken) {\n $userAgent = $_SERVER['HTTP_USER_AGENT'];\n $ipAddress = $_SERVER['REMOTE_ADDR'];\n\n $fingerprint = hash_pbkdf2(\"sha256\", ($userAgent . $ipAddress), $uidToken, 2500, 128);\n\n return $fingerprint;\n }", "title": "" }, { "docid": "530af7b03369d54f7f9de1ffe4604b0b", "score": "0.46989542", "text": "public function sma_info() {}", "title": "" }, { "docid": "277cd25d826ffec3b6c237b8955b69fb", "score": "0.46981266", "text": "public function detect()\n {\n }", "title": "" }, { "docid": "feea9fc8cce4f87564ddd2415076b68a", "score": "0.46850687", "text": "public function run()\n {\n $prefecturesFilenameArray = [\n '北海道' => \"hokkaido.jpg\",\n '青森県' => \"aomori.jpg\",\n '岩手県' => \"iwate.jpg\",\n '宮城県' => \"miyagi.jpg\",\n '秋田県' => \"akita.jpg\",\n '山形県' => \"yamagata.jpg\",\n '福島県' => \"hukushima.jpg\",\n '茨城県' => \"ibaraki.jpg\",\n '栃木県' => \"tochigi.jpg\",\n '群馬県' => \"gunma.jpg\",\n '埼玉県' => \"saitama.jpg\",\n '千葉県' => \"chiba.jpg\",\n '東京都' => \"tokyo.jpg\",\n '神奈川県' => \"kanagawa.jpg\",\n '新潟県' => \"nigata.jpg\",\n '富山県' => \"toyama.jpg\",\n '石川県' => \"ishikawa.jpg\",\n '福井県' => \"hukui.jpg\",\n '愛知県' => \"aichi.jpg\",\n '静岡県' => \"shizuoka.jpg\",\n '三重県' => \"mie.jpg\",\n '山梨県' => \"yamanashi.jpg\",\n '長野県' => \"nagano.jpg\",\n '岐阜県' => \"gihu.jpg\",\n '大阪府' => \"osaka.jpg\",\n '京都府' => \"kyoto.jpg\",\n '兵庫県' => \"hyogo.jpg\",\n '滋賀県' => \"siga.jpg\",\n '奈良県' => \"nara.jpg\",\n '和歌山県' => \"wakayama.jpg\",\n '岡山県' => \"okayama.jpg\",\n '広島県' => \"hiroshima.jpg\",\n '鳥取県' => \"tottori.jpg\",\n '島根県' => \"shimane.jpg\",\n '山口県' => \"yamaguchi.jpg\",\n '香川県' => \"kagawa.jpg\",\n '徳島県' => \"tokushima.jpg\",\n '愛媛県' => \"ehime.jpg\",\n '高知県' => \"kochi.jpg\",\n '福岡県' => \"hukuoka.jpg\",\n '佐賀県' => \"saga.jpg\",\n '長崎県' => \"nagasaki.jpg\",\n '熊本県' => \"kumamoto.jpg\",\n '大分県' => \"oita.jpg\",\n '宮崎県' => \"miyazaki.jpg\",\n '鹿児島県' => \"kagoshima.jpg\",\n '沖縄県' => \"okinawa.jpg\",\n ];\n\n foreach ($prefecturesFilenameArray as $key => $prefectureFilename) {\n $areaNameArray = [\"北海道・東北\", \"関東・中部\", \"近畿\", \"中国・四国\", \"九州\"];\n $prefecturesArray = [\n [\"北海道\", \"青森県\", \"秋田県\", \"山形県\", \"岩手県\", \"宮城県\", \"福島県\"],\n [\"東京都\", \"神奈川県\", \"埼玉県\", \"千葉県\", \"栃木県\", \"茨城県\", \"群馬県\",\n \"愛知県\", \"岐阜県\", \"静岡県\", \"三重県\", \"新潟県\", \"山梨県\", \"長野県\", \"石川県\", \"富山県\", \"福井県\"],\n [\"大阪府\", \"兵庫県\", \"京都府\", \"滋賀県\", \"奈良県\", \"和歌山県\"],\n [\"岡山県\", \"広島県\", \"鳥取県\", \"島根県\", \"山口県\", \"香川県\", \"徳島県\", \"愛媛県\", \"高知県\"],\n [\"福岡県\", \"佐賀県\", \"長崎県\", \"熊本県\", \"大分県\", \"宮崎県\", \"鹿児島県\", \"沖縄県\"],\n ];\n for ($i=0; $i < 5; $i++) {\n if(in_array($key, $prefecturesArray[$i])){\n $areaName = $areaNameArray[$i];\n }\n }\n\n DB::table('prefecture_images')->insert([\n [\n 'prefecture_name' => $key,\n 'area_name' => $areaName,\n 'prefecture_filename' => $prefectureFilename,\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime(),\n ],\n ]);\n }\n }", "title": "" }, { "docid": "2b45fd1d489252878e2a1fa94c37b3d9", "score": "0.46744406", "text": "private function info_file(){\n \t//Directory + sprite_name + .sprite_info [extension]\n }", "title": "" }, { "docid": "30ffdba5ec789fe187e5d227595158b4", "score": "0.46693033", "text": "public function __construct(\\phpbb\\db\\driver\\driver_interface $db, \\phpbb\\user $user,\n\t$fingerprint_table)\n\t{\n\t\t$this->db = $db;\n\t\t$this->user = $user;\n\t\t$this->fingerprint_table = $fingerprint_table;\n\t}", "title": "" }, { "docid": "d3f8804008dd3a3ea80d1484b0b2edb3", "score": "0.4650803", "text": "public function generateFingerprint($quoteId)\n {\n $baseUrl = $this->storeManager->getStore()->getBaseUrl();\n return 'M2' . base64_encode($baseUrl) . $quoteId;\n }", "title": "" }, { "docid": "85c76ef4de67048eea5f1b3e57d13d1b", "score": "0.4639186", "text": "public function setLabelFingerprint($var)\n {\n GPBUtil::checkString($var, True);\n $this->label_fingerprint = $var;\n\n return $this;\n }", "title": "" }, { "docid": "9f6ad52dcfd8806eab28504f14fe9316", "score": "0.46343175", "text": "public function setFingerprintAndBiometricEnabled(?bool $value): void {\n $this->getBackingStore()->set('fingerprintAndBiometricEnabled', $value);\n }", "title": "" }, { "docid": "25512a751741cd96ca5c98b8e2169ad4", "score": "0.4630404", "text": "function Check_Signature($field,$key) {\n$result='false';\n\n$signature=get_Signature($field,$key);\n\nif(isset($field['signature']) && ($signature == $field['signature']))\n{\n\t$result='true';\n\t\n}\nreturn ($result);\n}", "title": "" }, { "docid": "a0aeb2c681e7e2671f2483cf0761da46", "score": "0.46270514", "text": "function get_ssid($username, $password, $sn, $pcname){\n\t\t$output = exec('/usr/local/bin/pyconcrete /var/www/html/sea/myscript.pye ' . $username . ' ' . $sn . ' ' . $password . ' ' . $pcname, $output);\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "b858581db180bcfb5bcb5e8dd3a05382", "score": "0.46210817", "text": "public function profile();", "title": "" }, { "docid": "8d32bbf9c009fbed580a6fa2ac7b86e2", "score": "0.46190193", "text": "function get_entry_points()\n\t{\n\t\treturn array('misc'=>'FILE_DUMP');\n\t}", "title": "" }, { "docid": "645e3ccea7eeb6a9bfd1686dfecd1aec", "score": "0.46124375", "text": "public static function hackKeys(){\n if(self::$requiresDone) return;\n self::$publicAuthKeys = true;\n }", "title": "" }, { "docid": "233436499f8bb3c94bf5885c1fa1bd0d", "score": "0.46064883", "text": "function dump_decoder_model_info($info, $opts) {\n echo \"WARN: dump_decoder_model_info not implemented yet.\\n\";\n }", "title": "" }, { "docid": "83dcfdd3790b0364b7127612aa416fc7", "score": "0.4601093", "text": "public function get_info();", "title": "" }, { "docid": "83dcfdd3790b0364b7127612aa416fc7", "score": "0.4601093", "text": "public function get_info();", "title": "" }, { "docid": "0734d4f3126a8c0527c104049b63ea05", "score": "0.4593126", "text": "public function store(Request $request)\n {\n //\n\t\t\n\t\t$test = Fingerprint::where(\"guard_id\", $request->guard_id)->first();\n\t\t\n\t\tif($test != null && $test->RTB64 != \"undefined\"){\n\t\t\t\n\t\t\treturn response()->json([\n\t\t\t\t\"error\" => true,\n\t\t\t\t\"message\" => \"This guard already has a fingerprint saved\" \n\t\t\t]);\n\t\t\t\n\t\t}\n\t\t\n\t\tif($test != null && $test->RTB64 == \"undefined\"){\n\t\t\t$test->RTB64 = $request->RTB64;\n\t\t\t$test->LTB64 = $request->RTB64;\n\t\t\t$test->RTISO = $request->RTB64;\n\t\t\t$test->LTISO = $request->RTB64;\n\t\t\t\n\t\t\tif($test->save()){\n\t\t\t\treturn response()->json([\n\t\t\t\t\t\"error\" => false,\n\t\t\t\t\t\"message\" => \"Fingerprint saved\"\n\t\t\t\t]);\n\t\t\t}else{\n\t\t\t\treturn response()->json([\n\t\t\t\t\t\"error\" => true,\n\t\t\t\t\t\"message\" => \"Could not save fingerprint\"\n\t\t\t\t]);\n\t\t\t}\n\t\t}else{\n\t\t\n\t\t\t$fingerprint = new Fingerprint();\n\t\t\t$fingerprint->RTB64 = $request->RTB64;\n\t\t\t$fingerprint->LTB64 = $request->RTB64;\n\t\t\t$fingerprint->RTISO = $request->RTB64;\n\t\t\t$fingerprint->LTISO = $request->RTB64;\n\t\t\t$fingerprint->guard_id = $request->guard_id;\n\n\t\t\tif($fingerprint->save()){\n\t\t\t\treturn response()->json([\n\t\t\t\t\t\"error\" => false,\n\t\t\t\t\t\"message\" => \"Fingerprint saved\"\n\t\t\t\t]);\n\t\t\t}else{\n\t\t\t\treturn response()->json([\n\t\t\t\t\t\"error\" => true,\n\t\t\t\t\t\"message\" => \"Could not save fingerprint\"\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n }", "title": "" }, { "docid": "67294d900d4367c5a746d7f0c6d026a9", "score": "0.4592622", "text": "private function updateFingerprint( Fingerprint $fingerprint ) {\n\t\tif ( $this->label === null ) {\n\t\t\t$fingerprint->removeLabel( $this->languageCode );\n\t\t} else {\n\t\t\t$fingerprint->getLabels()->setTextForLanguage( $this->languageCode, $this->label );\n\t\t}\n\t}", "title": "" }, { "docid": "e60b797ccdd8cf773f8f1fc6fc8edffb", "score": "0.45917058", "text": "public function profile() {\n\t\techo '<link rel=\"profile\" href=\"http://gmpg.org/xfn/11\">' . esc_html( PHP_EOL );\n\t}", "title": "" }, { "docid": "1ed3631d6a0b3edc18a6daead843ae32", "score": "0.458315", "text": "public function test(){\r\n $this->readInfo();\r\n $this->readYek();\r\n $this->encryptInfo();\r\n $this->infoC=$this->infoE;\r\n $this->writeInfo();\r\n //var_dump($this->url, $this->infoF, $this->infoC, $this->infoE, $this->yekC);\r\n //$this->infoToArray();\r\n }", "title": "" }, { "docid": "811c7a11399101932dd99ff4f863208e", "score": "0.45771757", "text": "private function initHashmap() {\n // Calculate hashmaps (if they weren't just calculated)\n if (false == ArrayHelper::isAssociative(self::$md5VarHashmap)) {\n for ($i = 0; $i < count(self::$md5VarHashmap); $i++) {\n self::$md5VarHashmap[self::$md5VarHashmap[$i]] = md5(self::$md5VarHashmap[$i]);\n unset(self::$md5VarHashmap[$i]);\n }\n }\n }", "title": "" }, { "docid": "02d165e8b9d3ce1552f4da9bf9ff31ce", "score": "0.45759037", "text": "public function plugin_info() {}", "title": "" }, { "docid": "8429d448983a12c0ec9d1e748aa093e7", "score": "0.45749348", "text": "function getDigital();", "title": "" }, { "docid": "d72a25c48ed17659507bc8f59125a018", "score": "0.45636067", "text": "function OVy70hg3_aqJfV()\n{\n \n}", "title": "" }, { "docid": "1954f2196f5b8dc55aac2f88ab451097", "score": "0.45597017", "text": "function genie_facteurmonitoring_dist() {\r\n\tinclude_spip('inc/config');\r\n\tinclude_spip('inc/mail');\r\n\r\n\r\n\t// chargement de la configuration\r\n\t$email = lire_config(\"facteurmonitoring/email\");\r\n\t$email_pwd = lire_config(\"facteurmonitoring/email_pwd\");\r\n\t$hote_imap = lire_config(\"facteurmonitoring/hote_imap\");\r\n\t$hote_port = lire_config(\"facteurmonitoring/hote_port\");\r\n\t$hote_inbox = lire_config(\"facteurmonitoring/hote_inbox\");\r\n\r\n\t//lire_metas();\r\n\t$adresse_site = $GLOBALS['meta']['adresse_site']; \r\n\r\n\t// etape 1: verifier la bonne reception de l'email precedent\r\n\tecrire_meta('facteurmonitoring_etat', 'NOTOK');\r\n\r\n\tspip_log(\"---\",\"facteurmonitoring\"); \r\n\r\n\tif (isset($GLOBALS['meta']['facteurmonitoring_hash'])) {\r\n\t$email_hash = trim($GLOBALS['meta']['facteurmonitoring_hash']);\r\n\r\n\tif ($email_hash) {\r\n\t\t// on se connecte en IMAP pour rechercher cet email\r\n\t\t$connection = '{'.$hote_imap.':'.$hote_port.'}'.$hote_inbox;\r\n\t\t$mbox = @imap_open($connection, $email, $email_pwd);\r\n\r\n\t\tif (FALSE === $mbox) {\r\n\t\t\t\tspip_log(\"[config] \"._T('facteurmonitoring:test_connection_notok'),\"facteurmonitoring\"); \r\n\t\t} else {\r\n\t\t\t\t// lecture boite \r\n\t\t\t\t$info = imap_check($mbox);\r\n\t\t\t\tif (FALSE === $info) {\r\n\t\t\t\t\tspip_log(\"[config] \"._T('facteurmonitoring:test_connection_notok'),\"facteurmonitoring\"); \r\n\t\t\t\t} else {\r\n\t\t\t\t\t// to do search msg\r\n\t\t\t\t\t$msgs = imap_search($mbox, 'SUBJECT \"'.$email_hash.'\"', SE_UID);\r\n\r\n\t\t\t\t\tif (count($msgs)) {\r\n\t\t\t\t\t\t// on efface les emails\r\n\t\t\t\t\t\tforeach ($msgs as $msg) {\r\n\t\t\t\t\t\t\timap_delete($mbox, $msg, FT_UID);\r\n\t\t\t\t\t\t\t// TODO: apparement la fonction marche mal sous GMAIL\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\timap_expunge($mbox); \r\n\t\t\t\t\t\tecrire_meta('facteurmonitoring_etat', 'OK'); \r\n\t\t\t\t\t\tspip_log(\"[reception] OK, email lu $email_hash\",\"facteurmonitoring\");\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tspip_log(\"[reception] NOTOK, erreur: email introuvable $email_hash\",\"facteurmonitoring\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t} else { \r\n\t\tspip_log(\"[reception] NOTOK, erreur: email hash vide\",\"facteurmonitoring\"); \r\n\t}\r\n\r\n\t} else {\r\n\t\tspip_log(\"[reception] NOTOK, erreur: email hash inconnu\",\"facteurmonitoring\"); \r\n\t}\r\n\r\n\t// etape 2: envoie d'un nouvel email test\r\n\t$envoyer_mail = charger_fonction('envoyer_mail', 'inc/');\r\n\t$email_hash = md5($adresse_site.time());\r\n\t$email_sujet = \"[facteur-monitoring] $email_hash\";\r\n\t$email_body = _T('facteurmonitoring:no-reply',array('site'=>$adresse_site));\r\n\r\n\tif ($ok = $envoyer_mail($email,$email_sujet,$email_body)) {\r\n\t\tecrire_meta('facteurmonitoring_hash', $email_hash); \r\n\t\tspip_log(\"[envoi] OK, envoi email $email_hash\",\"facteurmonitoring\");\r\n\t} else {\r\n\t\tecrire_meta('facteurmonitoring_etat', 'NOTOK');\r\n\t\tspip_log(\"[envoi] NOTOK, erreur: envoi email $email_hash\",\"facteurmonitoring\");\r\n\t}\r\n\r\n\r\n\treturn 1;\r\n}", "title": "" }, { "docid": "c366643d482d7770f62362b1ec07fd1d", "score": "0.45576817", "text": "public function checkForScreenshot();", "title": "" }, { "docid": "6091f2e57d3833dd60d68fba249e10a0", "score": "0.4557552", "text": "public function getHash(array $infosToInclude = array());", "title": "" }, { "docid": "a502d8995f3a96438404bcfff65b513b", "score": "0.4554003", "text": "function initiate_digests() {\n\t\t$next = ($this->create_digest) ? $this->calculate_next_daily_digest() : null;\n\t\t$this->next_daily_digest = $next;\n\t\tupdate_option('aktt_next_daily_digest', $next);\n\t\t\n\t\t$next = ($this->create_digest_weekly) ? $this->calculate_next_weekly_digest() : null;\n\t\t$this->next_weekly_digest = $next;\n\t\tupdate_option('aktt_next_weekly_digest', $next);\n\t}", "title": "" }, { "docid": "3b9fee7131818748db7884b6abb9caa5", "score": "0.45485798", "text": "function password_reset_hash() {\r\n\t\t\t$this->profile['reset_pass_hash'] = UM()->validation()->generate();\r\n\t\t\t$this->update_usermeta_info('reset_pass_hash');\r\n\t\t}", "title": "" }, { "docid": "08256625117622c2be5b68751332a6ef", "score": "0.4547713", "text": "function rpmdbinfo(string $nevr, bool $full = \\false)\n{\n}", "title": "" }, { "docid": "10bf6940ae1d941e882089c561a0f8b8", "score": "0.45431685", "text": "function getImageDetails ( $imagePath) {\n\t\t$imageDetails = array();\n\t\t$IMAGE_TYPES = array('1' => 'GIF', '2' => 'JPEG', '3' => 'PNG', '4' => 'SWF', '5' => 'PSD', '6' => 'BMP', '7' => 'TIFF', '8' => 'TIFF', '9' => 'JPC', '10' => 'JP2', '11' => 'JPX', '12' => 'JB2', '13' => 'SWC', '14' => 'IFF', '15' => 'WBMP', '16' => 'XBM');\n\n\t\tif ( file_exists( $imagePath)) {\n\t\t\t$imgInfo = getimagesize( $imagePath);\n\t\t\t$imageDetails['format'] = $IMAGE_TYPES[$imgInfo[2]];\n\t\t\t$imageDetails['resolution'] = $imgInfo[0].'x'.$imgInfo[1];\n\t\t\t$imageDetails['colors'] = $this->graphics->getImgColors( $imagePath);\n\t\t\t//$imageDetails['colourDepth'] = $imgInfo['bits'];;\n\t\t\t$imageDetails['date'] = date ('F d Y H:i:s', filemtime( $imagePath));\n $pathDetails = pathinfo( $imagePath);\n\t\t\t$fileExt = strtolower( $pathDetails['extension']);\n\n\t\t\tif (( !strcmp( $fileExt, 'jpg') || !strcmp( $fileExt, 'jpeg') ) && function_exists( 'exif_read_data') && $this->dispExifData){\n\t\t\t\t$imgExifData = exif_read_data( $imagePath);\n\n\t\t\t\tif ( $imgExifData) {\n\t\t\t\t\t$exifDetails = array();\n\n foreach ( $this->reqExifDataItems as $key => $value) {\n if ( trim( $imgExifData[$value]) !== '') {\n $exifDetails[$value] = $imgExifData[$value];\n }\n }\n \n if ( $exifDetails['FileDateTime'] !== '') {\n $date_time_format = $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'];\n $date_time_format = ' '.$GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'];\n $exifDetails['FileDateTime'] = date($date_time_format, $exifDetails['FileDateTime']);\n }\n if ( $exifDetails['FileType'] !== '') {\n $exifDetails['FileType'] = $IMAGE_TYPES[$exifDetails['FileType']];\n }\n if ( is_numeric( $exifDetails['FileSize'])) {\n $exifDetails['FileSize'] = ceil( ( intval( $exifDetails['FileSize']) / 1024)).' Kb';\n }\n\t\t\t\t}\n\n\t\t\t\t$imageDetails['exifData'] = $exifDetails;\n\t\t\t}\n\t\t}\n\n\t\treturn $imageDetails;\n\t}", "title": "" }, { "docid": "40ebfe76c5b1f1772aa797c4566f71c3", "score": "0.45427346", "text": "public function testDebugCapabilities()\n {\n $hasher = $this->getHashAlgorithmInstanceForTesting();\n\n if ($hasher !== null) {\n $this->assertNotEmpty(var_export($hasher, true));\n\n $reflection = new \\ReflectionClass($hasher);\n $method = $reflection->getMethod('__debugInfo');\n\n $result = $method->invoke($hasher);\n $this->assertNotEmpty($result);\n } else {\n $this->assertNull($hasher);\n }\n }", "title": "" }, { "docid": "bb3479116d24d21aa70147d908cf30df", "score": "0.4542728", "text": "function iconLookup($mime,$ext) {\n\n\t$mimeIcons=array(\n\t\t\t\"image\"=>\"image.jpg\",\n\t\t\t\"audio\"=>\"sound.jpg\",\n\t\t\t\"video\"=>\"video.jpg\",\n\t\t\t\"text\"=>\"document2.jpg\",\n\t\t\t\"text/html\"=>\"html.jpg\",\n\t\t\t\"application\"=>\"binary.jpg\",\n\t\t\t\"application/pdf\"=>\"pdf.jpg\",\n\t\t\t\"application/msword\"=>\"document2.jpg\",\n\t\t\t\"application/postscript\"=>\"postscript.jpg\",\n\t\t\t\"application/rtf\"=>\"document2.jpg\",\n\t\t\t\"application/vnd.ms-excel\"=>\"document2.jpg\",\n\t\t\t\"application/vnd.ms-powerpoint\"=>\"document2.jpg\",\n\t\t\t\"application/x-tar\"=>\"tar.jpg\",\n\t\t\t\"application/zip\"=>\"tar.jpg\",\n\t\t\t\"message\"=>\"email.jpg\",\n\t\t\t\"message/html\"=>\"html.jpg\",\n\t\t\t\"model\"=>\"kmplot.jpg\",\n\t\t\t\"multipart\"=>\"kmultiple.jpg\"\n\t\t\t);\n\t\n\t$extIcons=array(\n\t\t\t\"pdf\"=>\"pdf.jpg\",\n\t\t\t\"ps\"=>\"postscript.jpg\",\n\t\t\t\"eps\"=>\"postscript.jpg\",\n\t\t\t\"ai\"=>\"postscript.jpg\",\n\t\t\t\"ra\"=>\"real_doc.jpg\",\n\t\t\t\"rm\"=>\"real_doc.jpg\",\n\t\t\t\"ram\"=>\"real_doc.jpg\",\n\t\t\t\"wav\"=>\"sound.jpg\",\n\t\t\t\"mp3\"=>\"sound.jpg\",\n\t\t\t\"ogg\"=>\"sound.jpg\",\n\t\t\t\"eml\"=>\"email.jpg\",\n\t\t\t\"tar\"=>\"tar.jpg\",\n\t\t\t\"zip\"=>\"tar.jpg\",\n\t\t\t\"bz2\"=>\"tar.jpg\",\n\t\t\t\"tgz\"=>\"tar.jpg\",\n\t\t\t\"gz\"=>\"tar.jpg\",\n\t\t\t\"rar\"=>\"tar.jpg\",\n\t\t\t\"avi\"=>\"video.jpg\",\n\t\t\t\"mpg\"=>\"video.jpg\",\n\t\t\t\"mpeg\"=>\"video.jpg\",\n\t\t\t\"jpg\"=>\"image.jpg\",\n\t\t\t\"gif\"=>\"image.jpg\",\n\t\t\t\"png\"=>\"image.jpg\",\n\t\t\t\"jpeg\"=>\"image.jpg\",\n\t\t\t\"nfo\"=>\"info.jpg\",\n\t\t\t\"xls\"=>\"spreadsheet.jpg\",\n\t\t\t\"csv\"=>\"spreadsheet.jpg\",\n\t\t\t\"html\"=>\"html.jpg\",\n\t\t\t\"doc\"=>\"document2.jpg\",\n\t\t\t\"rtf\"=>\"document2.jpg\",\n\t\t\t\"txt\"=>\"document2.jpg\",\n\t\t\t\"xla\"=>\"document2.jpg\",\n\t\t\t\"xlc\"=>\"document2.jpg\",\n\t\t\t\"xlt\"=>\"document2.jpg\",\n\t\t\t\"xlw\"=>\"document2.jpg\",\n\t\t\t\"txt\"=>\"document2.jpg\"\n\t\t\t);\n\n\n\t$icon_basedir = MODX_BASE_PATH.'manager/media/browser/mcpuk/connectors/php/images/';\n\n\tif ($mime!=\"text/plain\") {\t\n\t\t//Check specific cases\n\t\t$mimes=array_keys($mimeIcons);\n\t\tif (in_array($mime,$mimes)) {\n\t\t\treturn $icon_basedir.$mimeIcons[$mime];\n\t\t} else {\n\t\t\t//Check for the generic mime type\n\t\t\t$mimePrefix=\"text\";\n\t\t\t$firstSlash=strpos($mime,\"/\"); \n\t\t\tif ($firstSlash!==false) $mimePrefix=substr($mime,0,$firstSlash);\n\t\t\t\n\t\t\tif (in_array($mimePrefix,$mimes)) {\n\t\t\t\treturn $icon_basedir.$mimeIcons[$mimePrefix];\n\t\t\t} else {\n\t\t\t\treturn $icon_basedir.\"empty.jpg\";\t\n\t\t\t}\n\t\t}\n\t} else {\n\t\t$extensions=array_keys($extIcons);\n\t\tif (in_array($ext,$extensions)) {\n\t\t\treturn $icon_basedir.$extIcons[$ext];\n\t\t} else {\n\t\t\treturn $icon_basedir.\"empty.jpg\";\n\t\t}\n\t}\n\n\treturn $icon_basedir.\"empty.jpg\";\n}", "title": "" }, { "docid": "2b87aa00d6d11843d0c8bb6e7b57a502", "score": "0.4541939", "text": "function apiKey($session_uid)\n{\n$key=md5(SITE_KEY.$session_uid);\nreturn hash('sha256', $key.$_SERVER['REMOTE_ADDR']);\n}", "title": "" }, { "docid": "464a36b782953b1296b3bf11e2246eb2", "score": "0.45221224", "text": "protected function generateHash() {\n\t\t// TODO: Emulate orginal Google Analytics client library generation more closely\n\t\t$string = $this->userAgent;\n\t\t$string .= $this->screenResolution . $this->screenColorDepth;\n\t\treturn Util::generateHash($string);\n\t}", "title": "" }, { "docid": "c629968164b2ca2d130c0a1883a490a0", "score": "0.45165214", "text": "static function signature()\r\n {\r\n return $_SERVER['SERVER_SIGNATURE'];\r\n }", "title": "" }, { "docid": "d1f6fc290d976196b6e4d11b21f786c5", "score": "0.45120344", "text": "public static function _desc() { return 'Image maptcha for forms'; }", "title": "" } ]
789eade5c0f1696efd2624bcc8e517f9
Returns last key of a given dictionary.
[ { "docid": "2b1c826f388bdee397d2c4222ff6c980", "score": "0.7188897", "text": "public function getLastKey(): string\n\t{\n\t\treturn array_key_last($this->data);\n\t}", "title": "" } ]
[ { "docid": "b09bcf85d0b9b9275af63849031dbba1", "score": "0.7216651", "text": "protected function lastKey() {\n\t\t\tif(!count($this->_map)) return null;\n\n\t\t\treturn $this->_data[end($this->_map)]['position'];\n\t\t}", "title": "" }, { "docid": "0b23b5900a19684c7cd5fadb66f38778", "score": "0.72016007", "text": "function last_key(array $array)\n{\n $keys = array_keys($array);\n\n return array_pop($keys);\n}", "title": "" }, { "docid": "bbcf07f25103a2f4deffdfb8d07da1bc", "score": "0.70526075", "text": "public static\n function LastKey(array $array)\n {\n end($array);\n return key($array);\n }", "title": "" }, { "docid": "80c8710b3699ed3e770ab7ee61cae1f0", "score": "0.7012393", "text": "public function lastKey()\n {\n return end($this->key);\n }", "title": "" }, { "docid": "57d0fa213536b0fb5f61f83e14c597eb", "score": "0.69751644", "text": "public function lastKey();", "title": "" }, { "docid": "170e0c1de7ddc4e28de616c58879f7b4", "score": "0.67868286", "text": "public function lastKey(): int|string|null;", "title": "" }, { "docid": "16fafa28a5b0848a2723d10a4a3df8b9", "score": "0.6564427", "text": "public static function lastKey(array $array): int|string|null\n {\n \\end($array);\n\n return \\key($array);\n }", "title": "" }, { "docid": "e94ee8b65058b49b24d55d9327bdd7c6", "score": "0.65586764", "text": "final static function getLastKeyOfArray($arr){\n\t\tif (is_array($arr)) {\n\t\t\tif (count($arr) > 0) {\n\t\t\t\t$keys = array_keys($arr);\n\t\t\t\t$keys = array_reverse($keys);\n\t\t\t\treturn $keys[0];\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c4b7568361baa40d900aa123069a5bae", "score": "0.6344313", "text": "protected static function _keyLast(array $from){\n return array_keys($from)[count($from) - 1] ?? null;\n }", "title": "" }, { "docid": "a50c66d5b20e29d329af1b5f51ffb813", "score": "0.616114", "text": "private function _array_key_last(array $array){\r\n return (!empty($array)) ? array_keys($array)[count($array)-1] : null;\r\n }", "title": "" }, { "docid": "35eb862ca3db46d23f1b242aa9c1be4c", "score": "0.61114895", "text": "private function endKey($array){\n end($array);\n return key( $array ); \n }", "title": "" }, { "docid": "eeb29985bf713adee2762cc5aa7fdbbc", "score": "0.5966816", "text": "public function getMaxKey()\n {\n $value = null;\n foreach ($this->data as $item) {\n if ($value === null or $item['key'] > $value) {\n $value = $item['key'];\n }\n }\n return $value;\n }", "title": "" }, { "docid": "bbdc54ea02d7784dc5e26648a9b9df8a", "score": "0.59269303", "text": "function endKey($array){\nend($array);\nreturn key($array);\n}", "title": "" }, { "docid": "47b38768ca1c3b0eb08c3324a5fd975b", "score": "0.58522046", "text": "public function popKey()\n {\n return array_pop($this->key);\n }", "title": "" }, { "docid": "8690207871dee928766ebeb90e564701", "score": "0.58034724", "text": "public function lastKey()\n {\n $c = new Collection([1,2,3]);\n $this->assertEquals(2,$c->lastKey());\n }", "title": "" }, { "docid": "be8f748919201511b9a298b652bf56c0", "score": "0.5729498", "text": "public function higherKey($key);", "title": "" }, { "docid": "c8e8f1606f5a25bd80ebb59023bf561e", "score": "0.5708494", "text": "public function getKey(Template $template)\n\t{\n\t\tforeach ($template->objects as $key => $array) {\n\t\t\tif (is_array($array) && $key) {\n\t\t\t\treturn $template->var_names[$key - 1];\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "0f3117058b5b9719e3da923100e30a8c", "score": "0.55781245", "text": "function get_next_key($key,$array)\r\n {\r\n $keys = array_keys($array);\r\n return $keys[array_search($key,$keys)+1];\r\n }", "title": "" }, { "docid": "eb9137e04e0d25b5ae15dd7fd698c67b", "score": "0.55394274", "text": "public function key()\n {\n reset($this->container[$this->pointer]);\n list($key,$value)=each($this->container[$this->pointer]);\n return $key;\n }", "title": "" }, { "docid": "8f7d01cfd4391a922dcc7cb266d4aa07", "score": "0.5498522", "text": "public function key()\n {\n return $this->itKeys[$this->it];\n }", "title": "" }, { "docid": "02dcd83369f6888679d43b2bce16bf59", "score": "0.54949087", "text": "function last(iterable $collection)\n{\n assert(!is_empty($collection));\n\n if ($collection instanceof Sequence) {\n return $collection->last();\n } elseif ($collection instanceof \\Iterator) {\n do {\n $last = $collection->current();\n } while ($collection->valid());\n // @TODO: this will catch a generator, generators are not rewindable\n //$collection->rewind();\n return $last;\n } elseif ($collection instanceof \\Traversable) {\n $collection = iterator_to_array($collection);\n }\n\n assert(is_array($collection)); // just in case of future weirdness\n $key = array_keys($collection)[count($collection) - 1];\n // $key = array_key_last($collection); // PHP 7.3 ;_;\n return $collection[$key];\n}", "title": "" }, { "docid": "fa128dc2d6211aab4b3cd5e3e7eb2c7b", "score": "0.5476711", "text": "public function getNextKey() {\r\n\t\treturn $this->_currentKey;\r\n\t}", "title": "" }, { "docid": "0fefd8627a99729322806597c6020d49", "score": "0.5455412", "text": "static function getLastArrayEntry($array) {\n return $array[count($array) - 1];\n }", "title": "" }, { "docid": "1353f19461d037d99863892d42203ae4", "score": "0.54489464", "text": "public function key() {\n\t\treturn key($this->map);\n\t}", "title": "" }, { "docid": "ce5a590073a5e6de66e3c69c29ffe0ca", "score": "0.5444483", "text": "public function GetMaxKey()\n {\n if(!is_null($this->max_key))\n return $this->max_key;\n \n $max = array();\n for($i = 0; $i < $this->datasets; ++$i)\n $max[] = $this->values->GetMaxKey($i);\n $this->max_key = max($max);\n return $this->max_key;\n }", "title": "" }, { "docid": "7b8532b6421174f4af80746c99c4baa3", "score": "0.54199225", "text": "public function getLast()\n {\n return $this->mappingList[count($this->mappingList) - 1];\n }", "title": "" }, { "docid": "7ba283da14685f2b2b9a2a19d917bad9", "score": "0.5411314", "text": "public function getAfterIndexKey()\n {\n $value = $this->get(self::AFTERINDEXKEY);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "58a7d42d21ac4e8f8895567579b4c47a", "score": "0.5406713", "text": "function getFirstKey()\n\t{\n\t\t$keys = $this->keys() ;\n\t\tif (count($keys) == 0) return \"\" ;\n\t\telse return $keys[0] ;\n\t}", "title": "" }, { "docid": "f84e273bfa3b4864a4bd2b63ddfb4ea8", "score": "0.5400258", "text": "public function getLastUnNamedParam(){\n\t\tforeach(array_reverse($this->_parameters) as $key => $value){\n\t\t\tif(is_numeric($key)){\n\t\t\t\treturn $value;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "6d5dd5141cef25977ac20c8c02401f2e", "score": "0.53345466", "text": "public function key(): ?string\n\t{\n\t\treturn $this->items[$this->pointer];\n\t}", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.5309138", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.5309138", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.5309138", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.5309138", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.5309138", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.5309138", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.5309138", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.5309138", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.5309138", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.5309138", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.5309138", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.5309138", "text": "public function getKey();", "title": "" }, { "docid": "555dac8f9779d69d9242d15d94ac7a6a", "score": "0.5308695", "text": "public function key() {\n\t\treturn key($this->_values);\n\t}", "title": "" }, { "docid": "d1750b58c384a3c5ad9b29135d086c99", "score": "0.530565", "text": "public function getLastId()\n\t{\n\t\tif (empty($this->container)) {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn end($this->container)[$this->indexKey];\n\t}", "title": "" }, { "docid": "a5911fa68229da494839169081440ab1", "score": "0.52862036", "text": "public static function getKey()\n {\n return null;\n }", "title": "" }, { "docid": "440e0d899389e8e63ba07f35e5a4d6f9", "score": "0.52761215", "text": "public function get_key(string $key): mixed;", "title": "" }, { "docid": "a06b7fea4d51d6dc135733d0f03fd76e", "score": "0.52705735", "text": "function get_next_key($array, $current_key)\n {\n $keys = array_keys($array);\n $count = count($keys);\n\n $nextkey = \"\";\n foreach (array_keys($keys) As $k) {\n $this_value = $keys[$k];\n\n\n if ($this_value == $current_key) {\n\n if ($k + 1 < $count) {\n $nextkey = $keys[$k + 1];\n\n } else {\n $nextkey = $keys[0];\n }\n\n break;\n }\n }\n return $nextkey;\n }", "title": "" }, { "docid": "3a3fb738f60b606bfafc4b3873f904b7", "score": "0.5262997", "text": "abstract protected function getKey();", "title": "" }, { "docid": "6e2828642314526dad92e52818cf69f8", "score": "0.52584404", "text": "private function getFreeKey()\n {\n $index = count($this->maps);\n\n while (isset($this->maps[$index]))\n $index++;\n\n return $index;\n }", "title": "" }, { "docid": "479ec3b31ec3e4a834641fa6109ee221", "score": "0.5254615", "text": "#[\\ReturnTypeWillChange]\n public function key()\n {\n return key( $this->variables );\n }", "title": "" }, { "docid": "cdeb68f07a4b611106c1c4720dad6c84", "score": "0.5244524", "text": "function last(array $array)\n{\n return array_values(array_slice($array, -1))[0];\n}", "title": "" }, { "docid": "3871ff7a0ea17984978fdcdfa1a19e8c", "score": "0.5243947", "text": "abstract public function getKey();", "title": "" }, { "docid": "3871ff7a0ea17984978fdcdfa1a19e8c", "score": "0.5243947", "text": "abstract public function getKey();", "title": "" }, { "docid": "0c003bed2fc62e2093bde926aa11862a", "score": "0.5214186", "text": "public function key() {\n return key($this->data['parameters']);\n }", "title": "" }, { "docid": "ff658b4981a9280f62712289eb0e6629", "score": "0.52094865", "text": "public function key ()\n {\n if (is_array($this->data))\n return key($this->data);\n\n if ($this->result)\n return $this->result->key();\n }", "title": "" }, { "docid": "33228302bf5d28b965ab53d5106fefa3", "score": "0.52089226", "text": "public function getFirstKey(): string\n\t{\n\t\treturn array_key_first($this->data);\n\t}", "title": "" }, { "docid": "09d19d65f3eb3cde5d4fb5ec0efa6328", "score": "0.5206878", "text": "protected function firstKey($noreset=false) {\n\t\t\tif(!count($this->_map)) return null;\n\n\t\t\treturn $this->_data[$this->first($noreset)]['position'];\n\t\t}", "title": "" }, { "docid": "dd29360aa9ebd73b3a5e485f1880b86e", "score": "0.5200608", "text": "function getDegreeKey() {\n\t\t$degreeMap =& $this->getDegreeMap();\n\t\treturn $degreeMap[$this->getDegree()];\n\t}", "title": "" }, { "docid": "b270cc23787d0878f695f2a4b5d5eff0", "score": "0.51987016", "text": "public function last()\n\t{\n\t\treturn $this->map->first();\n\t}", "title": "" }, { "docid": "9d31594c4baebd3912a59d492628c90a", "score": "0.5191931", "text": "public function key()\n {\n return key($this->values);\n }", "title": "" }, { "docid": "e4c2ce46fca674b16212f29e6f6ee036", "score": "0.51754636", "text": "public function firstKey(): int|string|null;", "title": "" }, { "docid": "0d73cee556140cb7b9ea6a21d2faa255", "score": "0.51656103", "text": "function getNationwideKey() {\n\t\t$nationwideMap =& $this->getNationwideMap();\n\t\treturn $nationwideMap[$this->getNationwide()];\n\t}", "title": "" }, { "docid": "4cafd3a5dfa437c110bfd480b09e2dd3", "score": "0.5147747", "text": "public function key()\n {\n return $this->keys[$this->position];\n }", "title": "" }, { "docid": "5c2acf5a59f83c6f32c91d067037c344", "score": "0.5131804", "text": "public function getKey()\n {\n return static::search($this->value);\n }", "title": "" }, { "docid": "ab9098e5d800968356a503160842fc45", "score": "0.51264966", "text": "public function get_key( $key ) {\n return $this[$key];\n }", "title": "" }, { "docid": "95e2589f78d7b901cbd4ed876179b90f", "score": "0.5122255", "text": "function maxKey(Array $tab){\r\n $val = maxValue($tab);\r\n $maxKey = null;\r\n foreach ($tab as $key => $value) {\r\n if ($val == $value){\r\n $maxKey = $key;\r\n }\r\n }\r\n return $maxKey;\r\n }", "title": "" }, { "docid": "9f33fed3edaceb4a9adc2db9bf48a3ca", "score": "0.5121732", "text": "public function otherKey()\n\t{\n\t\treturn explode('.', $this->getOtherKey())[1];\n\t}", "title": "" }, { "docid": "40ddef9d2f1bdd752a969935891e9af3", "score": "0.5105553", "text": "public function key(){\r\n\t\t$key = key($this->_entities);\r\n return $key;\r\n }", "title": "" }, { "docid": "2461d0e92f9e1171779f44afd873b25e", "score": "0.508519", "text": "function getCommitteeReviewedKey() {\n $committeeReviewed = $this->getCommitteeReviewed();\n\t\t$committeeReviewedMap =& $this->getCommitteeReviewedMap();\n\t\treturn $committeeReviewedMap[$committeeReviewed];\n\t}", "title": "" }, { "docid": "9d56a3fcf8ad8d8759015466512cd361", "score": "0.50821036", "text": "public function key()\n {\n return key($this->internalArray);\n }", "title": "" }, { "docid": "c3beec55b6cc6d52aa974ff120436d09", "score": "0.507092", "text": "public static function lastRunKey($idSite, $period)\n {\n return \"lastRunArchive\" . $period . \"_\" . $idSite;\n }", "title": "" }, { "docid": "9a0fc117610a2bb158d751cb9a42f91e", "score": "0.50644654", "text": "public function key()\n {\n if (empty($this->data)) {\n return null;\n }\n\n return key($this->data);\n }", "title": "" }, { "docid": "61acca18da0582deba63f7f05d57769a", "score": "0.50621074", "text": "public function key()\n {\n $var = key($this->var);\n return $var;\n }", "title": "" }, { "docid": "6d56249dea37e7ca46a5774039b9af25", "score": "0.5057336", "text": "public function key()\n\t{\n\t\treturn $this->iter->key();\n\t}", "title": "" }, { "docid": "2d8be7514b981107795c469f2db7f6b3", "score": "0.5056674", "text": "public function getKey()\n {\n return $this->get(self::KEY);\n }", "title": "" }, { "docid": "2760791bcfb1e6114be3fb2632daa974", "score": "0.5055507", "text": "protected function _longestKey($array) {\n\t\t$longest = 0;\n\t\tforeach($array as $key=>$array) {\n\t\t\t$len = strlen($key);\n\t\t\tif($len > $longest) {\n\t\t\t\t$longest = $len;\n\t\t\t}\n\t\t}\n\t\treturn $longest;\n\t}", "title": "" }, { "docid": "2865c545c72126998bda782010009da0", "score": "0.50546", "text": "public function key()\n {\n try {\n return $this->fields->getKeyAtPosition($this->position);\n } catch (OutOfBoundsException $e) {\n return parent::key();\n }\n }", "title": "" }, { "docid": "8f9462c6f83abae3e055d5aeec031d4d", "score": "0.5049127", "text": "private function getLexicalKey(): string\n {\n return key($this->lexicalTable->current());\n }", "title": "" }, { "docid": "a2fb803e25babc6cdd91bae6243b5c9b", "score": "0.50458175", "text": "function getFirstKey($array)\n{\n reset($array);\n return key($array);\n}", "title": "" }, { "docid": "33362d41f5af29fd59d6f092dabae0ab", "score": "0.5044304", "text": "public function key() {\n\t\treturn key($this->objects);\n\t}", "title": "" }, { "docid": "76b1eb73355b0418eb2096a6e99696f2", "score": "0.5042512", "text": "public function key(){\n\n\t\treturn $this->_keys[$this->_currIndex];\n\t\n\t}", "title": "" }, { "docid": "7a7c1f1558f400fcfabdcb4c00bec502", "score": "0.50346345", "text": "public function key()\n {\n return basename($this->_info[parent::key()]['name']);\n }", "title": "" }, { "docid": "680d7a8a1f78640688d8812ce84b23ca", "score": "0.5031953", "text": "public function key() {\n\t\treturn key($this->_data);\n\t}", "title": "" }, { "docid": "680d7a8a1f78640688d8812ce84b23ca", "score": "0.5031953", "text": "public function key() {\n\t\treturn key($this->_data);\n\t}", "title": "" }, { "docid": "184fb9f867e1538f5e5ca3c501a7460b", "score": "0.5031875", "text": "private function getActualKey($key) {\n\n\t\treturn CACHE_INITIAL_KEY . '/' . $key;\n\t}", "title": "" }, { "docid": "3233101a833b61b106efcf75b5183c5b", "score": "0.5030559", "text": "protected function getKeyForSaveQuery()\n {\n $key = $this->getKeyName();\n\n if (isset($this->original[$key])) {\n return $this->original[$key];\n }\n\n return $this->getAttribute($key);\n }", "title": "" }, { "docid": "c833ab6ca58954b7e82910ef7e3bd52f", "score": "0.5029192", "text": "function last($array)\r\n {\r\n return end($array);\r\n }", "title": "" }, { "docid": "f8e02ebb39bb88e657daf800369d4c05", "score": "0.50269926", "text": "function getStatusKey() {\r\n\t\t$statusMap =& $this->getStatusMap();\r\n\t\treturn $statusMap[$this->getStatus()];\r\n\t}", "title": "" }, { "docid": "8b6b09b4d4004a35a6b143d2c8bb36e0", "score": "0.50100476", "text": "function last($array)\n {\n return end($array);\n }", "title": "" }, { "docid": "8b6b09b4d4004a35a6b143d2c8bb36e0", "score": "0.50100476", "text": "function last($array)\n {\n return end($array);\n }", "title": "" }, { "docid": "8336480da73a2f18078aa18969c8e58a", "score": "0.5006263", "text": "public function key()\n {\n return key($this->var);\n }", "title": "" }, { "docid": "c54bcf45b5d99430e3b658ff27fa9620", "score": "0.49999845", "text": "public function lastIndexOf($value);", "title": "" }, { "docid": "8718b01aefc828dc0887e06890d62ef0", "score": "0.49993867", "text": "public function key()\n\t{\n\t\treturn $this->_currentKey;\n\t}", "title": "" }, { "docid": "ce96747ec99ac2711c2703d34dc92cb4", "score": "0.4987213", "text": "public function get_key() {\n return $p_key;\n }", "title": "" }, { "docid": "fea871bd32f557572db47ecc14cc5177", "score": "0.49843258", "text": "function MyHash_Key($hash,$key)\n {\n if (isset($hash[ $key ])) { return $hash[ $key ]; }\n\n return NULL;\n }", "title": "" }, { "docid": "0ca9dfdb1e5091b8dbdb1712b3c62dba", "score": "0.49798346", "text": "public function key()\n {\n return key($this->list);\n }", "title": "" }, { "docid": "6f06eced1ee1d1a993ec48b996072ba4", "score": "0.49796274", "text": "function get_last_entity() {\n\t\t$sql = \"select entity_id from pbf_entities ORDER BY entity_id DESC LIMIT 1\";\n\t\t$res = $this->db->query ( $sql )->row_array ();\n\t\t\n\t\treturn $res ['entity_id'];\n\t}", "title": "" }, { "docid": "87536d7b2fc36d1fb6c40b51f8bb0bf5", "score": "0.497867", "text": "public function key()\n\t{\n\t\t//\n\t\t// Init local storage.\n\t\t//\n\t\t$current = $this->mCursor->current();\n\t\t\n\t\t//\n\t\t// Determine actual key.\n\t\t//\n\t\tif( array_key_exists( $this->mKey, $current ) )\n\t\t\treturn $current[ $this->mKey ];\t\t\t\t\t\t\t\t\t\t\t// ==>\n\t\t\n\t\treturn $this->mCursor->key();\t\t\t\t\t\t\t\t\t\t\t\t// ==>\n\t\n\t}", "title": "" }, { "docid": "339f81c12ee1484834e594f5c5ee2d8e", "score": "0.49773538", "text": "public function getKey($key)\n {\n if (!array_key_exists($key, self::$varyKeys)) {\n return false;\n }\n\n return self::$varyKeys[$key];\n }", "title": "" }, { "docid": "edda8c1022e1cfccf77a85476cfe85de", "score": "0.49756834", "text": "public static function getLastPathElement() { \n $els = NavigationPath::getPathElements();\n return $els[count($els) - 1];\n }", "title": "" } ]
509e662a7ae3a5a78d511044718d6c2a
/ reference the modal
[ { "docid": "07afa22321dfbac6f010dfee917d6b5c", "score": "0.0", "text": "private function createModel()\n\t{\n\t\treturn new Users();\t\t\n\t}", "title": "" } ]
[ { "docid": "08126a2322e6c322fe4fad618038edde", "score": "0.78589576", "text": "public function post_modal(){\n\t\t\n\t}", "title": "" }, { "docid": "736d6dc3ce6efe9f0e6e2493781354a9", "score": "0.7678825", "text": "public function openModal()\n {\n $this->isModal = true;\n }", "title": "" }, { "docid": "452038554cb37287575693f3651ea539", "score": "0.76452243", "text": "public function openModal()\n {\n $this->isModal = true;\n }", "title": "" }, { "docid": "fc96a1c9d76fa9c8a6d1766f4c5aa76c", "score": "0.750112", "text": "public function showModal(){\n $this->showModal = true;\n }", "title": "" }, { "docid": "989523d3d888772b31e950c6144ae3f9", "score": "0.72785014", "text": "public function inModal()\n {\n return $this->prepareAction('fillModalNew');\n }", "title": "" }, { "docid": "898f20b9f7863660333da5d5eac2d9b7", "score": "0.7232489", "text": "public function openModal() \n { $this->isOpen = true; }", "title": "" }, { "docid": "898f20b9f7863660333da5d5eac2d9b7", "score": "0.7232489", "text": "public function openModal() \n { $this->isOpen = true; }", "title": "" }, { "docid": "1e6a030184454ad1ac8ee010e3932b50", "score": "0.69866467", "text": "public function openModal()\n {\n $this->isOpen = true;\n }", "title": "" }, { "docid": "937f156d75c9d5984f04adb31212e486", "score": "0.69804543", "text": "public function openModal()\n {\n $this->isOpen = true;\n }", "title": "" }, { "docid": "937f156d75c9d5984f04adb31212e486", "score": "0.69804543", "text": "public function openModal()\n {\n $this->isOpen = true;\n }", "title": "" }, { "docid": "937f156d75c9d5984f04adb31212e486", "score": "0.69804543", "text": "public function openModal()\n {\n $this->isOpen = true;\n }", "title": "" }, { "docid": "17b89035fcefb3693fcf2f16bf2b44c8", "score": "0.69717073", "text": "public function createShowModal()\n {\n $this->resetValidation();\n $this->reset();\n $this->modalFormVisible = true;\n }", "title": "" }, { "docid": "6b004dc50e6cd6ac054d97f8bee6a06d", "score": "0.6956546", "text": "public function modal()\n {\n return $this->_View->element('Bootstrap.BsHtml/modal');\n }", "title": "" }, { "docid": "d9b7b153f1aa8bdccb2f19bbd1fcd367", "score": "0.695275", "text": "public function createShowModal()\n {\n $this->reset();\n $this->modalFormVisible = true;\n }", "title": "" }, { "docid": "8e4f1a4aa45fc4b4ca6cf6296e3a52e4", "score": "0.6867893", "text": "public function ajoutPartenaireModal()\n {\n $this->modal();\n }", "title": "" }, { "docid": "892cdaf105b9c1302bafe0f12afa70c3", "score": "0.6792691", "text": "function modal_form() {\n $intake_id = $this->request->getPost('id');\n $this->can_access_this_intake($intake_id);\n $view_data = $this->make_intake_modal_form_data($intake_id);\n return $this->template->view('intake/modal_form', $view_data);\n }", "title": "" }, { "docid": "2f59b615a90efe6c3a6e9c51dab8450c", "score": "0.6733259", "text": "public function modalAdd(){\n /** atribut identitas modal */\n\t\t$data = array(\n 'modalTitle' => 'Add New Device',\n 'formAction' => base_url('device/do_save'),\n\t\t\t\t'Req' => ''\n );\n /** load view untuk modal */\n\t\t$this->load->view('pages/device/modal_form', $data);\n }", "title": "" }, { "docid": "fdc80967da51a19445b25369c78e3bac", "score": "0.6731721", "text": "function _uber_include_modal() {\n static $added = FALSE;\n if (!$added) {\n // Подключаем библиотеки только один раз.\n $added = TRUE;\n // Подключаем библиотеки.\n ctools_include('modal');\n ctools_include('ajax');\n ctools_modal_add_js();\n\n // Создаем массив с настройками для модального окна.\n $script = array(\n 'uber' => array(\n 'modalSize' => array(\n 'type' => 'fixed',\n 'width' => 450,\n 'height' => 'auto',\n 'contentRight' => 0,\n 'contentBottom' => 0,\n ),\n 'modalOptions' => array(\n 'opacity' => (float) 0.4,\n 'background-color' => '#000000',\n ),\n 'closeText' => '',\n 'animation' => 'fadeIn',\n 'animationSpeed' => 'fast',\n ),\n );\n drupal_add_js($script, 'setting');\n }\n}", "title": "" }, { "docid": "458ed0a9fb16be14fd4e174dc5a3f742", "score": "0.6725758", "text": "function cp_display_preview_modal()\n {\n require_once(CP_BASE_DIR . '/modules/modal/style-preview-ajax.php');\n die();\n }", "title": "" }, { "docid": "eb0bae4bed51f09250d451a9d9892a35", "score": "0.66901094", "text": "function SetModal($bolModal)\n\t{\n\t\t$this->_bolModal = $bolModal;\n\t}", "title": "" }, { "docid": "18d6ac1a59a5872cb570c0f3c3662417", "score": "0.6683119", "text": "function who_shared_activity_modal() {\n\n\t\t// Get Modal Args\n\t\t$args = array(\n\t\t\t'item_id' => $_POST['post_id'],\n\t\t\t'function' => array( $this, 'get_users_list' ),\n\t\t\t'title' => __( 'People Who Shared This', 'youzer' )\n\t\t);\n\n\t\t// Get Modal Content\n\t\tyz_wall_modal( $args );\n\n\t\tdie();\n\t}", "title": "" }, { "docid": "caf10cf1649cfc7c4c37ac5761b3ada0", "score": "0.66416454", "text": "public function modalEdit(){\n /** array post id */\n $ID = explode('~',$this->input->post('id'));\n /** atribut modal edit */\n $data = array(\n 'modalTitle' => 'Edit '.$ID[1],\n 'formAction' => base_url('device/do_edit'),\n 'dMaster' => $this->mod->getData('row','*','device_tc',null,null,null,array('id_device'=>base64_decode($ID[0]))),\n\t\t\t\t'Req' => ''\n );\n /** load view modal */\n\t\t$this->load->view('pages/device/modal_form', $data);\n }", "title": "" }, { "docid": "d5fb55b47f61bedd9f50f1ae5c84d9ae", "score": "0.66296554", "text": "public function setModal($value) {\n $this->property->modal = $value;\n }", "title": "" }, { "docid": "265e5be141dd1152f651f6d8ad2f1832", "score": "0.6557113", "text": "function modal_form() {\n validate_submitted_data(array(\n \"id\" => \"numeric\"\n ));\n\n //client should not be able to edit ticket\n if ($this->login_user->user_type === \"client\" && $this->input->post('id')) {\n redirect(\"forbidden\");\n }\n\n \n $view_data['model_info'] = $this->Location_model->get_one($this->input->post('id'));\n\n if ($this->login_user->user_type == \"client\") {\n \n $view_data['client_id'] = $this->login_user->client_id;;\n }\n\n \n\n $this->load->view('locations/modal_form', $view_data);\n }", "title": "" }, { "docid": "ead44489dcda140f866f97e8cef64cb0", "score": "0.65159726", "text": "public function getModal() {\n if (!isset($this->modal)) {\n $this->modal = \\Drupal::service('exo_modal.generator')->generate(\n $this->id,\n ['modal' => $this->getOptions()],\n $this->content\n );\n }\n return $this->modal;\n }", "title": "" }, { "docid": "a9cdb27c87db191b67169545c4bd601a", "score": "0.6488154", "text": "function openmodal($id, $title, $options = []) {\n $locale = fusion_get_locale();\n $options += [\n 'class' => !empty($options['class']) ?: 'modal-lg',\n 'button_id' => '',\n 'button_class' => '',\n 'static' => FALSE,\n 'hidden' => FALSE, // force a modal to be hidden at default, you will need a jquery trigger $('#your_modal_id').modal('show'); manually\n ];\n\n $modal_trigger = '';\n if (!empty($options['button_id']) || !empty($options['button_class'])) {\n $modal_trigger = !empty($options['button_id']) ? \"#\".$options['button_id'] : \".\".$options['button_class'];\n }\n\n if ($options['static'] && !empty($modal_trigger)) {\n OutputHandler::addToJQuery(\"$('\".$modal_trigger.\"').bind('click', function(e){ $('#\".$id.\"-Modal').modal({backdrop: 'static', keyboard: false}).modal('show'); e.preventDefault(); });\");\n } else if ($options['static'] && empty($options['button_id'])) {\n OutputHandler::addToJQuery(\"$('#\".$id.\"-Modal').modal({\tbackdrop: 'static',\tkeyboard: false }).modal('show');\");\n } else if ($modal_trigger && empty($options['static'])) {\n OutputHandler::addToJQuery(\"$('\".$modal_trigger.\"').bind('click', function(e){ $('#\".$id.\"-Modal').modal('show'); e.preventDefault(); });\");\n } else {\n if (!$options['hidden']) {\n OutputHandler::addToJQuery(\"$('#\".$id.\"-Modal').modal('show');\");\n }\n }\n $html = '';\n $html .= \"<div class='modal' id='$id-Modal' tabindex='-1' role='dialog' aria-labelledby='$id-ModalLabel' aria-hidden='true'>\\n\";\n $html .= \"<div class='modal-dialog \".$options['class'].\"' role='document'>\\n\";\n $html .= \"<div class='modal-content'>\\n\";\n if ($title) {\n $html .= \"<div class='modal-header'>\";\n $html .= \"<div class='modal-title pull-left' id='$id-title'>$title</div>\\n\";\n $html .= ($options['static'] ? '' : \"<button type='button' class='btn btn-default btn-sm pull-right' data-dismiss='modal'><i class='fa fa-times'></i> \".$locale['close'].\"</button>\\n\");\n $html .= \"</div>\\n\";\n }\n $html .= \"<div class='modal-body'>\\n\";\n\n return $html;\n }", "title": "" }, { "docid": "9a3bae21b23a86e31f03e2c07e93a118", "score": "0.64810234", "text": "public function action_modal()\n\t{\n\t\t$this->access('admin.'.strtolower($this->_admin->resource).'.manage');\n\t\t$id = $this->request->param('id');\n\n\t\tif(!$this->request->is_ajax())\n\t\t{\n\t\t\tthrow new Kohana_HTTP_Exception_404;\n\t\t}\n\n\t\t// Needs to be a GET request\n\t\tif($this->request->method() != Request::GET)\n\t\t{\n\t\t\tthrow new Kohana_HTTP_Exception_403('No data was requested.');\n\t\t}\n\n\t\t$record = $this->_admin->model->where($this->_admin->primary_key, '=', $id)->find();\n\n\t\tif($record->loaded())\n\t\t{\n\t\t\t//set the images' full path\n\t\t\t$images = [];\n\t\t\tif($this->_admin->images != false && count($this->_admin->images) > 0)\n\t\t\t{\n\t\t\t\tforeach($this->_admin->images as $name => $def)\n\t\t\t\t{\n\t\t\t\t\t$images[$name] = call_user_func($def['web'], $record);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$orm = $record->as_array();\n\t\t\tRD::set(RD::SUCCESS, ':resource #:id has loaded.', array(\n\t\t\t\t\t':resource' => Inflector::singular($this->_resource),\n\t\t\t\t\t':id' => $id\n\t\t\t\t),\n\t\t\t\tarray_merge($orm, $images, $this->_admin->load($record))\n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tRD::set(RD::WARNING, ':resource can\\'t be found.', array(\n\t\t\t\t':resource' => Inflector::singular($this->_resource),\n\t\t\t\t':id' => $id\n\t\t\t));\n\t\t}\n\t}", "title": "" }, { "docid": "1a020a9e56f35dd7b5a599af172edeac", "score": "0.64726317", "text": "public function get_modal($id)\n\t{\t\n\t\t// $action = $this->input->post('action');\n\t\t// $action_parts = explode('_', $action);\n\t\t// $entity = (!empty($action_parts[2]) ? $action_parts[1] . '_' . $action_parts[2] : $action_parts[1]); \n\t\t$data['column'] = $this->get_column_by_id_lookup($id);\t\n\t\t$this->load->view('templates/admin/column_modal', $data);\t\t\n\t}", "title": "" }, { "docid": "2a23f8ccb92357e6a222707157292326", "score": "0.64682037", "text": "function file_modal_form() {\n $view_data['model_info'] = $this->General_files_model->get_one($this->request->getPost('id'));\n $bu_id = $this->request->getPost('bu_id') ? $this->request->getPost('bu_id') : $view_data['model_info']->bu_id;\n\n $this->access_only_allowed_members();\n $this->can_access_this_intake($bu_id);\n\n $view_data['bu_id'] = $bu_id;\n return $this->template->view('intake/files/modal_form', $view_data);\n }", "title": "" }, { "docid": "02f1109178e69a46d9eb3bbd405e91e9", "score": "0.643981", "text": "function modal_form() {\n //get custom fields\n\n $view_data['model_info'] = $this->Purchase_Payments_model->get_one($this->input->post('id'));\n $view_data['taxes_dropdown'] = array(\"\" => \"-\") + $this->Taxes_model->get_dropdown_list(array(\"title\"));\n \n $view_data['clients_dropdown'] = array(\"\" => \"-\") + $this->Master_Vendors_model->get_dropdown_list(array(\"name\"));\n\n $this->load->view('payments/modal_form',$view_data);\n }", "title": "" }, { "docid": "d324867e2418cda003a5c70a285b819f", "score": "0.63959277", "text": "public static function modal($data=array())\n {\n $data['start'] = true;\n\n $view = View::make('core::elements.modal')->with('data', $data);\n return $view;\n }", "title": "" }, { "docid": "5ada7f84f111c5d613abf46eadec8b54", "score": "0.63884", "text": "public function run()\n {\n/*\t\t// set focus to first suitable field when modal opens\n\t\tYii::app()->clientScript->registerScript('focus',\n\t\t\t\"$('form input:not([class=\\\"hasDatepicker\\\"]):visible:enabled:first, textarea:first').first().focus();\",\n\n\t\t\tCClientScript::POS_READY);*/\n\t\techo $this->controller->render('_form',array(\n\t\t\t'model'=>$this->model,\n\t\t\t'models'=>$this->models,\n\t\t\t'parent_fk'=>$this->parent_fk,\n\t\t));\n\t}", "title": "" }, { "docid": "8f3f93b12df5fb8b8a822c8dc2bf39b6", "score": "0.6385728", "text": "public function create()\n {\n // will be using a modal for the functionality\n\n\n\n }", "title": "" }, { "docid": "e2e7adfa47623a8f86e63e08ccc7e4a8", "score": "0.63830996", "text": "function modal_form()\r\n {\r\n\r\n validate_submitted_data(array(\r\n \"id\" => \"numeric\"\r\n ));\r\n\r\n $view_data['model_info'] = $this->Roles_model->get_one($this->input->post('id'));\r\n $view_data['roles_dropdown'] = array(\"\" => \"-\") + $this->Roles_model->get_dropdown_list(array(\"title\"), \"id\");\r\n $this->load->view('roles/modal_form', $view_data);\r\n }", "title": "" }, { "docid": "2f9fee7b575326b783be4874516704f4", "score": "0.631413", "text": "public function add_modal(){\n return view('backend.modules.role_management.modals.create');\n }", "title": "" }, { "docid": "3be2db195551f5ab17343da5e008dc3f", "score": "0.6305178", "text": "function fusion_element_modal() {\n\n\tglobal $fusion_settings;\n\n\tfusion_builder_map(\n\t\tfusion_builder_frontend_data(\n\t\t\t'FusionSC_Modal',\n\t\t\t[\n\t\t\t\t'name' => esc_attr__( 'Modal', 'fusion-builder' ),\n\t\t\t\t'shortcode' => 'fusion_modal',\n\t\t\t\t'icon' => 'fusiona-external-link',\n\t\t\t\t'preview' => FUSION_BUILDER_PLUGIN_DIR . 'inc/templates/previews/fusion-modal-preview.php',\n\t\t\t\t'preview_id' => 'fusion-builder-block-module-modal-preview-template',\n\t\t\t\t'allow_generator' => true,\n\t\t\t\t'help_url' => 'https://theme-fusion.com/documentation/fusion-builder/elements/modal-element/',\n\t\t\t\t'inline_editor' => true,\n\t\t\t\t'params' => [\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Name Of Modal', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Needs to be a unique identifier (lowercase), used for button or modal_text_link element to open the modal. ex: mymodal.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'name',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Modal Heading', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Heading text for the modal.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'title',\n\t\t\t\t\t\t'value' => esc_attr__( 'Your Content Goes Here', 'fusion-builder' ),\n\t\t\t\t\t\t'placeholder' => true,\n\t\t\t\t\t\t'dynamic_data' => true,\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'radio_button_set',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Size Of Modal', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Select the modal window size.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'size',\n\t\t\t\t\t\t'value' => [\n\t\t\t\t\t\t\t'small' => esc_attr__( 'Small', 'fusion-builder' ),\n\t\t\t\t\t\t\t'large' => esc_attr__( 'Large', 'fusion-builder' ),\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'default' => 'small',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'colorpickeralpha',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Background Color', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Controls the modal background color. ', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'background',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'default' => $fusion_settings->get( 'modal_bg_color' ),\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'colorpickeralpha',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Border Color', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Controls the modal border color. ', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'border_color',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'default' => $fusion_settings->get( 'modal_border_color' ),\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'radio_button_set',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Show Footer', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Choose to show the modal footer with close button.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'show_footer',\n\t\t\t\t\t\t'value' => [\n\t\t\t\t\t\t\t'yes' => esc_attr__( 'Yes', 'fusion-builder' ),\n\t\t\t\t\t\t\t'no' => esc_attr__( 'No', 'fusion-builder' ),\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'default' => 'yes',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'tinymce',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Contents of Modal', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Add your content to be displayed in modal.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'element_content',\n\t\t\t\t\t\t'value' => esc_attr__( 'Your Content Goes Here', 'fusion-builder' ),\n\t\t\t\t\t\t'placeholder' => true,\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => esc_attr__( 'CSS Class', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Add a class to the wrapping HTML element.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'class',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'group' => esc_attr__( 'General', 'fusion-builder' ),\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => esc_attr__( 'CSS ID', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Add an ID to the wrapping HTML element.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'id',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'group' => esc_attr__( 'General', 'fusion-builder' ),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t]\n\t\t)\n\t);\n}", "title": "" }, { "docid": "1ed7ff6020165e5a9e9ae99563c6e2f4", "score": "0.6268673", "text": "function modal_form() {\n\n $this->validate_submitted_data(array(\n \"id\" => \"numeric\"\n ));\n\n $view_data['model_info'] = $this->Payment_methods_model->get_one_with_settings($this->request->getPost('id'));\n\n //get seetings associtated with this payment type\n $view_data['settings'] = $this->Payment_methods_model->get_settings($view_data['model_info']->type);\n\n return $this->template->view('payment_methods/modal_form', $view_data);\n }", "title": "" }, { "docid": "0f012163d8ff5fdb905d6f9f1e8706ce", "score": "0.62447923", "text": "public function getName()\n {\n\n return 'modal';\n }", "title": "" }, { "docid": "2d3cdf1e26b4c2698ddf102b57c28e53", "score": "0.6209594", "text": "function CrearModalAmplio($id,$title,$Vector){\r\n\t\t\r\n print('<div id=\"'.$id.'\" class=\"modal fade\" role=\"dialog\" data-backdrop=\"static\" data-keyboard=\"false\" tabindex=\"-1\" style=\"width:90%;left:5%;margin:0\">');\r\n\t\t\r\n print('<div class=\"modal-dialog\">');\r\n \r\n print('<div class=\"modal-content\">\r\n <div class=\"modal-header\">\r\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\">&times;</button>\r\n <h4 class=\"modal-title\">'.$title.'</h4>\r\n </div>\r\n <div class=\"modal-body\">');\r\n\t\t\r\n\t}", "title": "" }, { "docid": "fdd0f163e5e8fc79ad9dd41827de2a95", "score": "0.6197759", "text": "public function create(){\n $this->openModal();\n $this->resetInputFields();\n }", "title": "" }, { "docid": "32c457c0ab18cd891baea0de99137365", "score": "0.6197422", "text": "function wpmodal_generator_func() {\n\n\t\tglobal $modal_vars; // Access the global created by wp_modal_shortcode_func method, containing all information about all the existant modals for this page.\n\n\t\tif ( isset( $modal_vars['modals'] ) && is_array( $modal_vars['modals'] ) ) {\n\t\t\tforeach ( $modal_vars['modals'] as $i => $atts ) {\n\t\t\t\tinclude( $this -> shortcode_template_file );\n\t\t\t} // End foreach().\n\t\t} // End if().\n\t}", "title": "" }, { "docid": "4eb4ac46b69e5e327aa0719effa11888", "score": "0.6164008", "text": "function showModal($title,$message,$destination=''){\n \n echo \"<html><head>\n <link rel='stylesheet' type='text/css' href='\".base_url().'css/jquery-ui-1.10.3.custom.min.css'.\"' />\n <link rel='stylesheet' type='text/css' href='\".base_url().'css/my.css'.\"' />\n <script type='text/javascript' src='\".base_url().\"/js/jquery.min.js'></script>\n <script type='text/javascript' src='\".base_url().\"/js/jquery-ui-1.10.3.custom.min.js'></script>\n <script type='text/javascript' src='\".base_url().\"/js/my.js'></script></head><body>\";\n echo \"<script type='text/javascript'>myModalMessage('$title','$message','$destination');</script>\";\n echo \"</body></html>\";\n}", "title": "" }, { "docid": "6a050d9a6e706e6501e0ff8f7490cde9", "score": "0.6151438", "text": "public function Modals()\n {\n return ModalController::create($this, \"Modals\");\n }", "title": "" }, { "docid": "d80897b444b3e54ab0dc8f48477a0770", "score": "0.6126109", "text": "function bf_enqueue_modal( $modal_key = '' ) {\n\n\t\tBetter_Framework::assets_manager()->add_modal( $modal_key );\n\n\t}", "title": "" }, { "docid": "59db2ec2bb6338f023d72461ca432a6e", "score": "0.6122842", "text": "public function create()\n {\n //form showing by modal, without controller or ajax\n }", "title": "" }, { "docid": "c96165628744e61215499297b0fad1ca", "score": "0.60928255", "text": "public function create()\n { $this->resetInputFields();\n $this->openModal();\n }", "title": "" }, { "docid": "c96165628744e61215499297b0fad1ca", "score": "0.60928255", "text": "public function create()\n { $this->resetInputFields();\n $this->openModal();\n }", "title": "" }, { "docid": "389de76a4e2e5c5dca39f67c6ce9fd26", "score": "0.6084355", "text": "public function viewAddSectionModal()\n {\n $this->render(\"backoffice/Section/view_add_section\", FALSE);\n }", "title": "" }, { "docid": "48531c0eedffc1ff48273b74a1ef0047", "score": "0.60816526", "text": "function IsModal()\n\t{\n\t\treturn $this->_bolModal;\n\t}", "title": "" }, { "docid": "dcce5f11e0e473ceeb71e8e9abf5c6b8", "score": "0.6044665", "text": "public function modal_mixed_slide_edit(){\n\t\tif( defined('FAPRO_IFRAME') ){\n\t\t\tiframe_header();\n\t\t}\n\t\t\n\t\t$post_id = absint( $_GET['post_id'] );\n\t\t$post = get_post( $post_id );\n\t\tif( !$post ){\n\t\t\twp_die( __('Post not found.', 'fapro') );\t\t\t\n\t\t}\n\t\t\n\t\t$slider_id = absint( $_GET['slider_id'] );\n\t\t$slider = get_post( $slider_id );\n\t\tif( !$slider ){\n\t\t\twp_die( __('Slider not found.', 'fapro') );\n\t\t}\n\t\t\n\t\t$options = fa_get_slide_options( $post_id );\n\t\t\n\t\tif( 'auto-draft' == $post->post_status ){\n\t\t\t$post->post_title = '';\n\t\t\t$options['title'] = '';\n\t\t}\n\t\t\n\t\t$screen = get_current_screen();\n\t\t$screen_id = $screen->id;\n\t\t\n\t\t$this->remove_meta_boxes( null, false );\n\t\t\n\t\t$modal = fa_modal_path('slide-settings');\n\t\tinclude_once $modal;\n\t\t \n\t\tif( defined('FAPRO_IFRAME') ){\n\t\t\tiframe_footer();\n\t\t\texit();\n\t\t}\n\t}", "title": "" }, { "docid": "c2601f83687e8cfd4f874943e952ab4e", "score": "0.604415", "text": "function modal($mid, $title, $body, $buttonid, $button = '')\n{\n $start = '\n <button type=\"button\" id=\"showMessage\" class=\"btn btn-primary\" data-bs-toggle=\"modal\" data-bs-target=\"#' . $mid . '\" hidden></button>\n <div class=\"modal fade\" id=\"' . $mid . '\" tabindex=\"-1\" aria-labelledby=\"ModalLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\" id=\"ModalLabel\">' . $title . '</h5>\n <button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>\n </div>\n <div class=\"modal-body\">' . $body . '</div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Close</button>\n ';\n if ($buttonid != 'blank') {\n $submit = '<button type=\"button\" id=\"' . $buttonid . '\" class=\"btn btn-primary\" data-bs-dismiss=\"modal\">' . $button . '</button>';\n } else {\n $submit = '';\n }\n $end = '</div>\n </div>\n </div>\n </div>\n <script>document.getElementById(\"showMessage\").click();</script>';\n $total = $start . $submit . $end;\n return $total;\n}", "title": "" }, { "docid": "450b4c0e4fe0dcb392c9c167dd9939dc", "score": "0.6005401", "text": "public function create()\n {\n //see modal controller\n }", "title": "" }, { "docid": "450b4c0e4fe0dcb392c9c167dd9939dc", "score": "0.6005401", "text": "public function create()\n {\n //see modal controller\n }", "title": "" }, { "docid": "6ee506dc4201795fdffbe504cef72981", "score": "0.59930027", "text": "public function create()\n {\n return view('inc.modalRe');\n \n }", "title": "" }, { "docid": "d770e01d4aade461ddab46b5e7c73e25", "score": "0.59904695", "text": "public function modalLogin($color, $n)\n {\n echo \"<div class='modal fade' id='modal-login' tabindex='-1' style='display: block;' data-keyboard='false' data-backdrop='static'>\";\n echo \"<div class='modal-dialog modal-dialog-centered'>\";\n echo \"<div class='modal-content pt-4 modal-md'>\";\n echo \"<div class='row'>\";\n echo \"<div class='col-12 d-flex justify-content-center'>\";\n echo \"<h4 class='mb-0'>Bienvenido a</h4>\";\n echo \"</div>\";\n echo \"<div class='col-12'>\";\n echo \"<p class='text-center text-weight-light' style='font-size: 25px;'>Flores Isabelita S.A.S<p>\";\n echo \"</div>\";\n echo \"</div>\";\n echo \"<div class='modal-body d-flex justify-content-center'>\";\n echo \"<img src='img/flower.gif' style='width: 80%'>\";\n echo \"</div>\";\n echo \"<div class='modal-body'>\";\n echo \"<div class='form-group d-flex justify-content-center'>\";\n echo \"<input type='button' class='btn btn-success btn-lg px-5' id='continuar' value='Ingresar'>\";\n echo \"</div>\";\n echo \"</div>\";\n echo \"</div>\";\n echo \"</div>\";\n echo \"<script>$('#modal-login').modal('show')</script>\";\n echo \"<script>$('#cerrar').click(function(){location.href='reportes/vista/reportesVista.php'})</script>\";\n echo \"<script>$('#continuar').click(function(){location.href='reportes/vista/reportesVista.php'})</script>\";\n }", "title": "" }, { "docid": "4a6314470402c78ef3aff927b89204f5", "score": "0.59758455", "text": "public function edit($id) \n { \n $achattickets = AchatTicket::findOrFail($id); \n $this->achatticket_id = $id; \n \n $this->montant = $achattickets->montant; \n $this->qr_code = $achattickets->qr_code; \n $this->email_acheteur = $achattickets->email_acheteur; \n $this->evenement_id = $achattickets->evenement_id; \n $this->admin_id = $achattickets->admin_id; \n\n $this->openModal(); \n }", "title": "" }, { "docid": "32d8bfe0dcc90c5fc4144d56640b869a", "score": "0.5940526", "text": "public function modal(Request $request){\n if($request->has(['edit','account'])){\n $company= Company::where('id', $request->account)\n ->where('is_deleted',0)\n ->first();\n return view('supportNew.pages.account.modal.editForm', compact('company'));\n }\n return view('supportNew.pages.account.modal.form');\n }", "title": "" }, { "docid": "9924b063f73560762da6cd5f9064375f", "score": "0.5923608", "text": "public function closeModal() \n { $this->isOpen = false; }", "title": "" }, { "docid": "9924b063f73560762da6cd5f9064375f", "score": "0.5923608", "text": "public function closeModal() \n { $this->isOpen = false; }", "title": "" }, { "docid": "4ef9ec2c5d05af39ae579e5ddc37457a", "score": "0.59233636", "text": "public function Assignment_Modal($username, $monarch){\n \t$trigger=\"'#input-file'\";\n\t\t$query = $this->db->prepare(\"SELECT class.class_name AS class_name, class.id AS id_class FROM enrolled_user, users, class\n \t WHERE users.username= :username AND class.monarch= :monarch AND enrolled_user.id_user=users.id AND enrolled_user.id_class=class.id\");\n\t\t$query->bindParam(\"username\", $username, PDO::PARAM_STR);\n\t\t$query->bindParam(\"monarch\", $monarch, PDO::PARAM_STR);\n $query->execute();\n $codes = array();\n while ($row = $query->fetch(PDO::FETCH_ASSOC)) {\n $codes[] = $row;\n }\n $data_code=\"\";\n if(count($codes)>0){\n \t\n \tforeach($codes as $code){\n \t\t$data_code.='<option value=\"'. $code['id_class'] .'\"\">'. $code['class_name'] .'</option>';\n \t}\n }\n\n\t\t$data='\n\t\t<!--<div class=\"modal fade\" id=\"assignment_modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myModalLabel\">\n\t\t <div class=\"modal-dialog\" role=\"document\">\n\t\t <div class=\"modal-content\">\n\t\t <div class=\"modal-header\">\n\t\t <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n\t\t <h4 class=\"modal-title\" id=\"myModalLabel\">Show Assignment</h4>\n\t\t </div>\n\t\t <div class=\"modal-body\">\n\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t<label for=\"code\">Show Subject:</label>\n\t\t <select name=\"code\" id=\"code\" class=\"form-control\">\n\t\t\t\t\t\t\t\t<option value=\"\">Choose Subject:</option>\n\t\t\t\t\t\t\t\t'. $data_code .'\n\t\t\t\t\t\t\t</select>\n\t\t </div>\n\t\t\t\t\t</div>\n\t\t <div class=\"modal-footer\">\n\t\t <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Cancel</button>\n\t\t <button type=\"button\" class=\"btn btn-primary\" onclick=\"show_assignment()\">Show</button>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t</div>-->\n\t\t\n\t\t<div class=\"modal fade\" id=\"upload_assignment_modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myModalLabel\">\n\t\t <div class=\"modal-dialog\" role=\"document\">\n\t\t <div class=\"modal-content\">\n\t\t <div class=\"modal-header\">\n\t\t <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n\t\t <h4 class=\"modal-title\" id=\"myModalLabel\">Upload Assignment</h4>\n\t\t </div>\n\t\t <div class=\"modal-body\">\n\t\t\t\t\t\t<!--<div class=\"form-group\">\n\t\t\t\t\t\t\t<label for=\"code\">Show Subject:</label>\n\t\t <select name=\"class_id\" id=\"class_id\" class=\"form-control\" onchange=\"get_assignment_number()\">\n\t\t\t\t\t\t\t\t<option value=\"\">Choose Subject:</option>\n\t\t\t\t\t\t\t\t'. $data_code .'\n\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t</div>-->\n\t\t\t\t\t\t<!--<div class=\"form-group\">\n\t\t\t\t\t\t\t<label for=\"code\">Assignment Number:</label>\n\t\t <select name=\"assignment_number\" id=\"assignment_number\" class=\"form-control\" onchange=\"get_assignment_id()\">\n\t\t\t\t\t\t\t\t<option value=\"\">Assignment Number:</option>\n\t\t\t\t\t\t\t</select>\n\t\t </div>-->\n\t\t <div class=\"form-group\">\n\t\t \t<label for=\"assignment_title\">Assignment Title</label>\n\t\t \t<input type=\"text\" id=\"assignment_title\" class=\"form-control\" placeholder=\"Input Title\">\n\t\t \t<input type=\"hidden\" id=\"hidden_assignment_id\" value=\"\"/>\n\t\t </div>\n\t\t <div class=\"form-group\">\n\t\t \t<label for=\"input-file\">Select File to Upload:</label>\n\t\t \t<input type=\"file\" id=\"input-file\" name=\"input-file\" accept=\"application/pdf, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document\" required=\"required\">\n\t\t\t\t\t\t\t\n\t\t </div>\n\t\t\t\t\t</div>\n\t\t <div class=\"modal-footer\" id=\"button_div\">\n\t\t <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Cancel</button>\n\t\t <button id=\"upload_student\" type=\"button\" class=\"btn btn-primary\" onclick=\"validate_file_name()\">Upload Assignment</button>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t</div>\n\t\t\n\t\t<!--<div class=\"modal fade\" id=\"submitted_assignment_modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myModalLabel\">\n\t\t <div class=\"modal-dialog\" role=\"document\">\n\t\t <div class=\"modal-content\">\n\t\t <div class=\"modal-header\">\n\t\t <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n\t\t <h4 class=\"modal-title\" id=\"myModalLabel\">Submitted Assignment</h4>\n\t\t </div>\n\t\t <div class=\"modal-body\">\n\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t<label for=\"class_code\">Show Subject:</label>\n\t\t <select name=\"class_code\" id=\"class_code\" class=\"form-control\">\n\t\t\t\t\t\t\t\t<option value=\"\">Choose Subject:</option>\n\t\t\t\t\t\t\t\t'. $data_code .'\n\t\t\t\t\t\t\t</select>\n\t\t </div>\n\t\t\t\t\t</div>\n\t\t <div class=\"modal-footer\">\n\t\t <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Cancel</button>\n\t\t <button type=\"button\" class=\"btn btn-primary\" onclick=\"submitted_assignment()\">Show</button>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t</div>-->\n\t\t';\n\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "7bc67de3dc0bdb9f49aca60e2de0e3f0", "score": "0.5912264", "text": "public function store_modal()\n {\n $modalSize = $this->get_option('buttonModalSize');\n\n // Only render Maps Plugin on Product Page (Performance)\n if (!is_product()) {\n return false;\n }\n ?>\n\n\t\t<!-- WordPress Store Locator Modal -->\n\t\t<div id=\"store_modal\" class=\"store_modal store-locator-modal store-locator-fade\" tabindex=\"-1\" role=\"dialog\">\n\t\t\t<div class=\"modal-dialog <?php echo $modalSize ?>\" role=\"document\">\n\t\t\t\t<div class=\"modal-content\">\n\t\t\t\t\t<?php echo $this->get_store_locator(); ?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t<?php\n }", "title": "" }, { "docid": "4d2d88dbfb82eeb68abdf432f1c329fe", "score": "0.59099066", "text": "public function modalDelete(){\n /** array post id */\n $ID = explode('~',$this->input->post('id'));\n /** atribut modal delete */\n $data = array(\n 'modalTitle' => 'Delete '.$ID[1],\n 'id' => $ID[0],\n\t\t\t\t'formAction' => base_url('device/do_delete'),\n\t\t\t\t'Req' => ''\n );\n /** load modal view confirm */\n\t\t$this->load->view('pages/device/modal_confirm', $data);\n }", "title": "" }, { "docid": "c3590e5ea3ae8ed263feca55a21fffcd", "score": "0.585915", "text": "function ws_add_modal_welcome() {\r\n\trequire_once( WS_PATH . 'partials/modal-welcome.php');\r\n}", "title": "" }, { "docid": "523582c98b1e5ad6e74ee87cabb3c860", "score": "0.58430445", "text": "public function index()\n {\n //return view('site.admin.adminModal.edit'); \n /* \n $modal = DB::table('modals')->where('id', '=', 1)->get(); \n return view('site.pages.accueil', [\n 'modal' => $modal\n ]); \n */\n return redirect()->route('modal.edit', ['modal' => 1]);\n }", "title": "" }, { "docid": "c563c97e684f0d00e7d33d3ca6f08790", "score": "0.58261377", "text": "public function process()\n{ \n\n // Set response content-type to text/json, so\n // in case of error, a JSON response is returned.\n app::set_res_content_type('application/json');\n\n // Ensure a proper modal was defined in URI\n if (!isset(app::get_uri_segments()[0])) { \n throw new ApexException('error', \"Invalid request. No modal defined.\");\n }\n\n // Get package / alias\n if (!list($package, $parent, $alias) = components::check('modal', app::get_uri_segments()[0])) { \n throw new ComponentException('not_exists', 'modal', app::get_uri_segments()[0]);\n }\n\n // Get TPL code\n $tpl_file = SITE_PATH . '/' . components::get_tpl_file('modal', $alias, $package);\n if (!file_exists($tpl_file)) { \n throw new ApexException('error', \"The TPL file does not exist for the modal, $parts[0]\", E_USER_ERROR); \n }\n $tpl_code = file_get_contents($tpl_file);\n\n // Get title\nif (preg_match(\"/<h1>(.+?)<\\/h1>/i\", $tpl_code, $match)) { \n $title = $match[1];\n $tpl_code = str_replace($match[0], \"\", $tpl_code);\n } else { $title = tr('Dialog'); }\n\n // Load component\n if (!$client = components::load('modal', $alias, $package)) { \n throw new ComponentException('no_load', 'modal', '', $alias, $package);\n }\n\n // Execute show() method, if exists\n if (method_exists($client, 'show')) { \n components::call('show', 'modal', $alias, $package); \n }\n\n // Parse HTML\n view::initialize();\n view::load_base_variables();\n $html = view::parse_html($tpl_code);\n\n // Set results array\n $results = array(\n 'title' => view::parse_html($title),\n 'body' => $html\n );\n\n // Set response\n app::set_res_body(json_encode($results));\n}", "title": "" }, { "docid": "0f20143eef7ceb4e0437e18c597d4ae7", "score": "0.58255774", "text": "public function dialog_view()\n {\n // resolve message reference\n if ($msgref = rcube_utils::get_input_value('_msg', rcube_utils::INPUT_GPC, true)) {\n $storage = $this->rc->get_storage();\n list($uid, $folder) = explode('-', $msgref, 2);\n if ($message = $storage->get_message_headers($msgref)) {\n $this->rc->output->set_env('kolab_notes_template', array(\n '_from_mail' => true,\n 'title' => $message->get('subject'),\n 'links' => array(kolab_storage_config::get_message_reference(\n kolab_storage_config::get_message_uri($message, $folder),\n 'note'\n )),\n ));\n }\n }\n\n $this->ui->init_templates();\n $this->rc->output->send('kolab_notes.dialogview');\n }", "title": "" }, { "docid": "12ce63b28375b0ce61ce29da6b4b51ee", "score": "0.5813469", "text": "function modal_buddy_screen() {\n\tif ( ! modal_buddy_is_modal() ) {\n\t\treturn;\n\t}\n\n\t// Get BuddyPress\n\t$bp = buddypress();\n\n\t// User\n\tif ( bp_is_user() && ( 'modal-buddy' === bp_current_component() || 'modal-buddy' === bp_current_action() ) ) {\n\t\tif ( ! empty( $_GET['action'] ) ) {\n\t\t\t$bp->current_action = sanitize_file_name( $_GET['action'] );\n\t\t}\n\n\t\t$has_access = bp_is_item_admin();\n\n\t// Group\n\t} elseif ( bp_is_group() && ( 'modal-buddy' === bp_action_variable( 0 ) || 'modal-buddy' === bp_current_action() ) ) {\n\n\t\tif ( 'modal-buddy' === bp_current_action() ) {\n\t\t\tif ( ! empty( $_GET['action'] ) ) {\n\t\t\t\t$bp->current_action = sanitize_file_name( $_GET['action'] );\n\t\t\t}\n\n\t\t} elseif ( bp_action_variable( 0 ) ) {\n\t\t\tif ( ! empty( $_GET['action'] ) ) {\n\t\t\t\t$bp->action_variables = array( sanitize_file_name( $_GET['action'] ) );\n\t\t\t}\n\t\t}\n\n\t\t$has_access = bp_is_item_admin();\n\n\t// Do what you need!\n\t} else {\n\t\t$has_access = apply_filters( 'modal_buddy_screen_has_access', false );\n\t}\n\n\tif ( ! empty( $has_access ) ) {\n\t\tbp_core_load_template( 'assets/modal' );\n\t} else {\n\t\twp_die( __( 'You are not allowed to access to this page.', 'modal-buddy') , __( 'Modal Buddy Failure', 'modal-buddy' ), 403 );\n\t}\n}", "title": "" }, { "docid": "52e47e96fed0cbabf7a8e5f4da3d093a", "score": "0.5799349", "text": "public function closeModal()\n {\n $this->isOpen = false;\n $this->FrmCreateService=false;\n $this->FrmConsultService=false;\n $this->FrmEditService=false;\n }", "title": "" }, { "docid": "c022ef5ab0cbfb245736091304e51179", "score": "0.57990444", "text": "public function index()\n\t{\n\t\t//init modal\n\t\t\n\t\t$this->fn->getheader();\t\n\t\t$this->load->view('Admcalendartracking');\n $this->fn->getfooter();\n \t\n }", "title": "" }, { "docid": "32a74526f0bce5c65448280c150b77fc", "score": "0.5794044", "text": "public function modal_mixed_content(){\n\t\tif( defined('FAPRO_IFRAME') ){\n\t\t\tiframe_header();\n\t\t}\n\t\t\n\t\trequire_once fa_get_path('includes/admin/libs/class-fa-posts-list-table.php');\n\t\t$tbl = new FA_Posts_List_Table();\n\t\t$tbl->prepare_items();\n\t\t?>\n\t\t<form method=\"get\" action=\"\">\n\t\t\t<input type=\"hidden\" name=\"page\" value=\"fa-mixed-content-modal\" />\n\t\t\t<input type=\"hidden\" name=\"fapro_inline\" value=\"true\" />\n\t\t\t<input type=\"hidden\" name=\"post_type\" value=\"<?php echo $tbl->get_post_type();?>\" />\t\t\t\n\t\t\t<?php $tbl->views();?>\n\t\t\t<?php $tbl->search_box(__('search', 'fapro'), 'id');?>\n\t\t\t<?php $tbl->display();?>\n\t\t</form>\n\t\t<?php \n\t\tif( defined('FAPRO_IFRAME') ){\n\t\t\tiframe_footer();\n\t\t\texit();\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "5e292e21ff3e18e33d53dc581332ffec", "score": "0.5793237", "text": "public function acheter($id) \n { \n $achattickets = AchatTicket::findOrFail($id); \n $this->achatticket_id = $id; \n \n $this->montant = $achattickets->montant; \n $this->qr_code = $achattickets->qr_code; \n $this->email_acheteur = $achattickets->email_acheteur; \n $this->evenement_id = $achattickets->evenement_id; \n $this->admin_id = $achattickets->admin_id; \n\n $this->openModal(); \n }", "title": "" }, { "docid": "a278a0c449b0d9b18d2e098a76d7bc61", "score": "0.5781926", "text": "public function tambah_modal()\n {\n $tambahModal = $this->tambahModal;\n $tambahModal->jumlah = remove_dot(request('jumlah'));\n $tambahModal->tanggal = Carbon::now()->format('Y-m-d');\n $tambahModal->id_cabang = $this->id_cabang();\n $tambahModal->keterangan= request('keterangan');\n $tambahModal->save();\n }", "title": "" }, { "docid": "de08bdf904fa7b12a13f1b999558bef6", "score": "0.57745606", "text": "public function load_modal_item() {\n\n\t\t$attr = array(\n\t\t\t\t\t\t'item' => $this->db->query(\"SELECT item.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t CONCAT(item.name, ' (', itemcolor.name, ')') AS 'item_name',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t item.code\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t FROM item\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t JOIN itemcolor ON itemcolor.id = JSON_UNQUOTE(JSON_EXTRACT(attribute, '$.color_id'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t WHERE dept_id = \" . $this->session->userdata('dept_id') . \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ORDER BY item.name ASC\")->result()\n\t\t\t\t\t);\n\n\t\t$this->load->view('transaction/sales/modal-load-item', $attr);\n\t\t\n\t}", "title": "" }, { "docid": "8533e8da12fbfbfbb4defececa4b3875", "score": "0.5771308", "text": "function view_item_kit_modal($item_kit_id)\n\t{\n\t\t// Fetching Kit information using kit_id\n\t\t$data['item_kit_info']=$this->Item_kit->get_info($item_kit_id);\n\t\t\n\t\t$this->load->view(\"item_kits/items_modal\",$data);\n\t}", "title": "" }, { "docid": "68ce72c02e31a8b1a9b8d915a05e0acd", "score": "0.5758401", "text": "public function load_modal_template() {\n\n\t\t$attr = array(\n\t\t\t\t\t\t'template' => $this->db->query(\"SELECT id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t brand,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t tipe,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t CONCAT(brand, ' ', tipe) AS 'template_name',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t detail\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t FROM template_item\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t WHERE dept_id = \" . $this->session->userdata('dept_id') . \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t AND (detail IS NOT NULL\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t OR detail != '')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ORDER BY brand, tipe ASC\")->result_array(),\n\t\t\t\t\t\t'item'\t\t=> $this->db->query(\"SELECT id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcode,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tname\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM item\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE dept_id = \" . $this->session->userdata('dept_id') . \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tORDER BY name ASC\")->result()\n\t\t\t\t\t);\n\n\t\t$this->load->view('transaction/sales/modal-load-template', $attr);\n\t\t\n\t}", "title": "" }, { "docid": "a848b92ec6af43b070084746ea8d21a4", "score": "0.57563245", "text": "public function studentSignupModal()\n {\n \n // set up our modal\n $this->view->headScript()->appendFile(\"/js/library/Scheduler/View/Helper/student-signup-modal.js\");\n $this->view->headLink()->appendStylesheet(\"/css/library/Scheduler/View/Helper/student-signup-modal.css\");\n \n $this->_html = \"<div id='studentSignupDialog'>\";\n $this->_html .= \t\"<div id='signup-modal-content'></div>\";\n $this->_html .= \"</div>\";\n \n return $this->_html;\n }", "title": "" }, { "docid": "5498303f72d70064eed942026dcf7a1e", "score": "0.57545954", "text": "public function create()\n {\n $this->openModal();\n $this->resetInputFields();\n }", "title": "" }, { "docid": "b061e7afaebb73821909b7954401dcbc", "score": "0.5751389", "text": "function ca_modal($content){\n\t\t//this is the jquery pop up case(inline banner is always inline with this)\n\t\tif(ctype_space(get_option('ca_inline_banner_code')['text']) || get_option('ca_inline_banner_code')['text'] == '' || !isset(get_option('ca_inline_banner_code')['text'])){\n\t\t\t$warn_html = ca_default_inline_banner();\n\t\t}else{\n\t\t\t$warn_html = get_option('ca_inline_banner_code')['text'];\n\t\t}\n\n\t\tif(ctype_space(get_option('ca_modal_code')['text']) || get_option('ca_modal_code')['text'] == '' || !isset(get_option('ca_modal_code')['text'])){\n\t\t\t$modal_html = ca_default_modal();\n\t\t}else{\n\t\t\t$modal_html = get_option('ca_modal_code')['text'];\n\t\t}\n\n\t\treturn ca_modal_js($warn_html, $content, admin_url( 'admin-ajax.php' ), $modal_html);\n\t}", "title": "" }, { "docid": "1d05e1f6def1ce5d9ed6309069a3432e", "score": "0.5748874", "text": "protected function render() {\r\n\t\t$settings = $this->get_settings();\r\n\r\n\t\t$simple_modal \t= '';\r\n\r\n\t\t$modal_name \t\t= $settings['unique_identifier'];\r\n\t\t$open_modal_text \t= $settings['open_modal_text'];\r\n\t\t$modal_content \t\t= $settings['modal_content'];\r\n\t\t$close_modal_text \t= $settings['close_modal_text'];\r\n\r\n\t\tswitch ( $settings['open_modal_type'] ) {\r\n\t\t\tcase 'text':\r\n\t\t\t\t$simple_modal .= '<a data-modal-open=\"' . $modal_name . '\">' . $open_modal_text . '</a>';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'button':\r\n\t\t\t\t$simple_modal .= '<button data-modal-open=\"' . $modal_name . '\">' . $open_modal_text . '</button>';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'btn_primary':\r\n\t\t\t\t$simple_modal .= '<a class=\"btn btn-primary\" data-modal-open=\"' . $modal_name . '\">' . $open_modal_text . '</a>';\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\t$simple_modal .= '<a class=\"btn btn-default\" data-modal-open=\"' . $modal_name . '\">' . $open_modal_text . '</a>';\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\t$simple_modal .= '<div class=\"modal\" data-modal=\"' . $modal_name . '\">';\r\n\t\t$simple_modal .= \t'<div class=\"modal-inner\">';\r\n\t\t$simple_modal .= \t\t'<a class=\"modal-close\" data-modal-close=\"' . $modal_name . '\" href=\"\"> X </a>';\r\n\t\t$simple_modal .= \t\t$modal_content;\r\n\r\n\t\tif ( $settings['extra_modal_close'] == 'yes' ) {\r\n\t\t\tswitch ( $settings['close_modal_type'] ) {\r\n\t\t\t\tcase 'text':\r\n\t\t\t\t\t$simple_modal .= '<a data-modal-close=\"' . $modal_name . '\">' . $close_modal_text . '</a>';\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'button':\r\n\t\t\t\t\t$simple_modal .= '<button data-modal-close=\"' . $modal_name . '\">' . $close_modal_text . '</button>';\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'btn_primary':\r\n\t\t\t\t\t$simple_modal .= '<a class=\"btn btn-primary\" data-modal-close=\"' . $modal_name . '\">' . $close_modal_text . '</a>';\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\t$simple_modal .= '<a class=\"btn btn-default\" data-modal-close=\"' . $modal_name . '\">' . $close_modal_text . '</a>';\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$simple_modal .= \t'</div>';\r\n\t\t$simple_modal .= '</div>';\r\n\r\n\t\techo $simple_modal;\r\n\t}", "title": "" }, { "docid": "bb9aaa06a6824cb675e95169fe6f5f05", "score": "0.5739932", "text": "public function index()\n {\n return view('modal.index');\n }", "title": "" }, { "docid": "fcff96faf9877acff674651ec2e7bf0e", "score": "0.5734396", "text": "function partial_dialog()\n {\n return $this->renderAddDialog();\n }", "title": "" }, { "docid": "7f6bd6e92877ca1aa5c4a069c29ad39e", "score": "0.5729522", "text": "function fusion_element_modal_link() {\n\tfusion_builder_map(\n\t\tfusion_builder_frontend_data(\n\t\t\t'FusionSC_ModalTextLink',\n\t\t\t[\n\t\t\t\t'name' => esc_attr__( 'Modal Text / HTML Link', 'fusion-builder' ),\n\t\t\t\t'shortcode' => 'fusion_modal_text_link',\n\t\t\t\t'icon' => 'fusiona-external-link',\n\t\t\t\t'inline_editor' => true,\n\t\t\t\t'params' => [\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Name Of Modal', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Unique identifier of the modal to open on click.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'name',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Text or HTML code', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Insert text or HTML code here (e.g: HTML for image). This content will be used to trigger the modal popup.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'element_content',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'dynamic_data' => true,\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => esc_attr__( 'CSS Class', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'class',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'description' => esc_attr__( 'Add a class to the wrapping HTML element.', 'fusion-builder' ),\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => esc_attr__( 'CSS ID', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'id',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'description' => esc_attr__( 'Add an ID to the wrapping HTML element.', 'fusion-builder' ),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t]\n\t\t)\n\t);\n}", "title": "" }, { "docid": "51dbb3641cad2bccac4c14589ffbfd78", "score": "0.57242054", "text": "public function create()\n {\n $this->resetInputFields();\n $this->openModal();\n }", "title": "" }, { "docid": "6d28cf954b3804ecba81ff5f34ef704a", "score": "0.57226825", "text": "public function create()\n {\n //return view('site.admin.adminModal.create');\n }", "title": "" }, { "docid": "1f4df33694eb37873ba32c77969a1594", "score": "0.5714485", "text": "public function ModalProduct($id = null){\n if($id != null)\n $product = Product::where([['id','=',$id],['status','=',1]])->first();\n else\n $product = new Product();\n\n return view('product.product_form',['product'=>$product])->render();\n }", "title": "" }, { "docid": "be38aea9f688639c0275469218c7e48f", "score": "0.57056737", "text": "function imic_modal_box($atts, $content = null) {\n extract(shortcode_atts(array(\n \"id\" => \"\",\n \"title\" => \"\",\n \"text\" => \"\",\n \"button\" => \"\"\n ), $atts));\n $modalBox = '<button class=\"btn btn-primary btn-lg\" data-toggle=\"modal\" data-target=\"#' . $id . '\">' . $button . '</button>\n <div class=\"modal fade\" id=\"' . $id . '\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"' . $id . 'Label\" aria-hidden=\"true\">\n <div class=\"modal-dialog\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\">&times;</button>\n <h4 class=\"modal-title\" id=\"' . $id . 'Label\">' . $title . '</h4>\n </div>\n <div class=\"modal-body\"> ' . $text . ' </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-default inverted\" data-dismiss=\"modal\">'.__('Close','framework').'</button>\n </div>\n </div>\n </div>\n </div>';\n return $modalBox;\n}", "title": "" }, { "docid": "f45506e1eb4c9818c7c6486f9f220b97", "score": "0.57051563", "text": "public function edit($id)\n {\n //see modal controller\n }", "title": "" }, { "docid": "f45506e1eb4c9818c7c6486f9f220b97", "score": "0.57051563", "text": "public function edit($id)\n {\n //see modal controller\n }", "title": "" }, { "docid": "97d08adae628eca004a399c31c9a0479", "score": "0.57019687", "text": "public function cargarModalCheckout() \n\t{\n\t\t\theader(\"Content-Type: text/plain; charset=utf-8\"); //Para evitar problemas de acentos\n\t\t\t\n\t\t\t$data['information'] = FALSE;\n\t\t\t$data[\"idCheckin\"] = $this->input->post(\"idCheckin\");\t\n\n\t\t\tif ($data[\"idCheckin\"] != 'x') {\n\t\t\t\t$arrParam = array(\n\t\t\t\t\t\"idCheckin\" => $data[\"idCheckin\"]\n\t\t\t\t);\n\t\t\t\t$data['information'] = $this->general_model->get_checkin($arrParam);\n\t\t\t}\n\t\t\t$this->load->view(\"checkout_modal\", $data);\n }", "title": "" }, { "docid": "889c2f3224dec1e9de755f494b696bb3", "score": "0.56893104", "text": "public function create()\n {\n $this->resetInputFields();\n $this->openModal();\n }", "title": "" }, { "docid": "889c2f3224dec1e9de755f494b696bb3", "score": "0.56893104", "text": "public function create()\n {\n $this->resetInputFields();\n $this->openModal();\n }", "title": "" }, { "docid": "889c2f3224dec1e9de755f494b696bb3", "score": "0.56893104", "text": "public function create()\n {\n $this->resetInputFields();\n $this->openModal();\n }", "title": "" }, { "docid": "795a67ee6925b508488ed341235ce5eb", "score": "0.5679617", "text": "public function create()\n {\n // return View::make('producto.partial.modal-producto');\n\n }", "title": "" }, { "docid": "0217c58256fa6a00ab87f11ac793b0ab", "score": "0.56642246", "text": "function add_shortcode_interface_modal() {\n\t$page = basename( $_SERVER['PHP_SELF'] );\n\tif ( in_array( $page, array( 'post.php', 'page.php', 'page-new.php', 'post-new.php' ) ) ) {\n\t\tinclude_once( THEME_DIR.'/includes/shortcode-interface.php' );\n\t}\n}", "title": "" }, { "docid": "3684deb1646e8e05cf0d59a8ff66c73d", "score": "0.5657309", "text": "public function updateShowModal($id)\n {\n $this->modalFormVisible = true;\n $this->modelId = $id;\n $this->loadModel();\n }", "title": "" }, { "docid": "3684deb1646e8e05cf0d59a8ff66c73d", "score": "0.5657309", "text": "public function updateShowModal($id)\n {\n $this->modalFormVisible = true;\n $this->modelId = $id;\n $this->loadModel();\n }", "title": "" }, { "docid": "4add19a436541c9e137c6da08b7ceda7", "score": "0.5649518", "text": "public function actionViewPreLicenciaModal()\r\n\t\t{\r\n\t\t\t$request = Yii::$app->request;\r\n\t\t\t$postGet = $request->get();\r\n\r\n\t\t\t// Identificador del contribuyente\r\n\t\t\t$id = $postGet['id'];\r\n\r\n\t\t\t// Año impositivo\r\n\t\t\t$añoImpositivo = $postGet['a'];\r\n\r\n\t\t\t// Periodo\r\n\t\t\t$periodo = $postGet['p'];\r\n\r\n\t\t\t// Numero de solicitud\r\n\t\t\t$nroSolicitud = $postGet['nro'];\r\n\r\n\t\t\t$licenciaSearch = New LicenciaSolicitudSearch($id);\r\n\t\t\t$dataProvider = $licenciaSearch->getDataProviderRubroSegunSolicitud($nroSolicitud);\r\n\r\n\t\t\t$models = $dataProvider->getModels();\r\n\t\t\t$model = $models[0]['datosContribuyente'];\r\n\r\n\t\t\treturn $this->renderAjax('/aaee/licencia/pre-view-datos-licencia',[\r\n\t\t\t\t\t\t\t'model' => $model,\r\n\t\t\t\t\t\t\t'models' => $models,\r\n\t\t\t\t\t\t\t'dataProvider' => $dataProvider,\r\n\t\t\t\t\t]);\r\n\r\n\t\t}", "title": "" }, { "docid": "0dc164c9ba8e2e2abaaedd85058ca42a", "score": "0.5647904", "text": "function obtenerModalidad(){\n $this->objFunc=$this->create('MODSolicitud');\n $this->res=$this->objFunc->obtenerModalidad($this->objParam);\n $this->res->imprimirRespuesta($this->res->generarJson());\n }", "title": "" }, { "docid": "37633425222a8f33990d5029657bec75", "score": "0.5636894", "text": "public function closeModal()\n {\n $this->isOpen = false;\n }", "title": "" }, { "docid": "53297132b30f206e63acb089fed6e928", "score": "0.5634137", "text": "function Warning($titel, $info, $coler){\n\n print('<!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n <script src=\"https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js\"></script>\n <script>\n $(document).ready(function(){\n $(\"#Warning\").modal(\"show\");\n });\n </script>\n </head>\n <body>\n <!-- The Modal -->\n <div class=\"modal fade\" id=\"Warning\">\n <div class=\"modal-dialog modal-dialog-centered\">\n <div class=\"modal-content\">\n \n <!-- Modal Header -->\n <div class=\"modal-header\">\n <h4 class=\"modal-title\">'.$titel.'</h4>\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\">&times;</button>\n </div>\n \n <!-- Modal body -->\n <div class=\"modal-body\">\n '.$info.'\n </div>\n \n <!-- Modal footer -->\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-'.$coler.'\" data-dismiss=\"modal\">Sluiten</button>\n </div>\n \n </div>\n </div>\n </div>\n </body>\n </html>');\n }", "title": "" }, { "docid": "bf4c331bbc633ffdd2edf4addd5969ae", "score": "0.5632223", "text": "public function cargarModalCorrectiveMaintenance() \n\t{\n\t\t\theader(\"Content-Type: text/plain; charset=utf-8\"); //Para evitar problemas de acentos\n\t\t\t\n\t\t\t$data['information'] = FALSE;\n\t\t\t$data[\"idMaintenance\"] = $this->input->post(\"idMaintenance\");\n\t\t\t\n\t\t\tif ($data[\"idMaintenance\"] != 'x') {\n\t\t\t\t$arrParam = array(\n\t\t\t\t\t\"idMaintenance\" => $data[\"idMaintenance\"]\n\t\t\t\t);\t\t\t\t\n\t\t\t\t$data['information'] = $this->serviceorder_model->get_corrective_maintenance($arrParam);\n\t\t\t}\n\t\t\t\n\t\t\t$this->load->view(\"corrective_maintenance_modal\", $data);\n }", "title": "" } ]
2b5af9245a6ed969769ee463fd3e54dc
3. FUNGSI UNTUK UPDATE DATA LABEL :
[ { "docid": "e277461b3b8b41f32152e833a6edfdc9", "score": "0.68662107", "text": "function update_label($apikode, $apisubkode, $data)\n\t\t{\n\t\t\t$CI =& get_instance();\n\t\t\t$data = $CI->s00_lib_api->get_api_json(\n\t\t\t\t\tURL_API_SKPI.'/skpi_label/update',\n\t\t\t\t\t'POST',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'api_kode'\t\t=> $apikode,\n\t\t\t\t\t\t'api_subkode'\t=> $apisubkode,\n\t\t\t\t\t\t'api_search'\t=> $data\n\t\t\t\t\t)\n\t\t\t);\n\n\t\t\treturn $data;\t\n\t\t}", "title": "" } ]
[ { "docid": "94dae049daf22e799dcdf6eaba1540c8", "score": "0.7086309", "text": "function auto_update_label()\n\t\t{\n\t\t\t$CI =& get_instance();\n\t\t\t$data = $CI->s00_lib_api->get_api_json(\n\t\t\t\t\tURL_API_SKPI.'/skpi_label/update',\n\t\t\t\t\t'POST',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'api_kode'\t\t=> 1500,\n\t\t\t\t\t\t'api_subkode'\t=> 4,\n\t\t\t\t\t\t'api_search'\t=> array()\n\t\t\t\t\t)\n\t\t\t);\n\n\t\t\treturn $data;\n\t\t}", "title": "" }, { "docid": "d231b8fbb73e72cbae7239254dcc35f1", "score": "0.6856193", "text": "public static function updateLabel($data, $id){\n\t\tif (empty($data)) return false;\n\t\t$data = self::_cookData($data);\n\t\treturn self::_getDao()->update($data, intval($id));\n\t}", "title": "" }, { "docid": "5e423b7300dded124f9d6d84726d2a8b", "score": "0.66223377", "text": "public function updateData();", "title": "" }, { "docid": "e1782cd499f0fe4aa3b48166cdae32ee", "score": "0.6505916", "text": "public function updatetData(){\n }", "title": "" }, { "docid": "2864a4f645409f72d08a0327c9d956ed", "score": "0.6491368", "text": "public function testUpdateDatatable()\n {\n }", "title": "" }, { "docid": "52925d0872111e5894fd83800e1f07fe", "score": "0.63334435", "text": "protected function _update()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "7901ad6f5420a01c2ce5159828a5e476", "score": "0.62001795", "text": "function setSinInformacion($data) {\r\n $query = \"UPDATE usuario_x_evaluacion set realimentacion='Sin resolver'\r\n WHERE id_usuario_evaluacion='{$data['id_usuario_evaluacion']}' AND realimentacion=''\";\r\n $this->db->query($query);\r\n }", "title": "" }, { "docid": "ee7b64ea568e669f8086eb4cbfb3154f", "score": "0.611886", "text": "function update($data) {}", "title": "" }, { "docid": "72173478996bfdd638aeb9ced310b75e", "score": "0.61121875", "text": "public function testUpdateDatatableEntryOnetoOne()\n {\n }", "title": "" }, { "docid": "65af506fd4d6b905248f52f562bc531e", "score": "0.60773623", "text": "function updateRecord()\r\n {\r\n if (($this->State!=dsEdit) && ($this->State!=dsInsert) && ($this->State!=dsSetKey)) DatabaseError(_(\"Dataset not in edit or insert mode\"), $this);\r\n $this->DataEvent(deUpdateRecord,0);\r\n }", "title": "" }, { "docid": "6896b4b75ee0f53bdbd226b5ab96464f", "score": "0.6045126", "text": "function batalPenerimaan_benang($no_tr_benang,$table,$data){\n\n\t\t\t$this->db->where('no_tr_benang', $no_tr_benang);\n\n\t\t\t$query = $this->db->update($table, $data);\n\n\t\t\treturn $query;\n\n\t}", "title": "" }, { "docid": "3d09bf8ec25a9fe891b92a375684acf6", "score": "0.60411173", "text": "function updateDataField($value)\n {\n if ($this->_datafield!=\"\")\n {\n if ($this->_datasource!=null)\n {\n if ($this->_datasource->Dataset!=null)\n {\n //Check here for the index fields\n $keyfields=$this->Name.\"_key\";\n $keys=$this->input->$keyfields;\n // check if the keys were posted\n if (is_object($keys))\n {\n $fname=$this->DataField;\n\n //Set in Edit State\n $this->_datasource->Dataset->edit();\n\n\n $values=$keys->asStringArray();\n\n //Sets the key values\n reset($values);\n while (list($k,$v)=each($values))\n {\n $this->_datasource->Dataset->$k=$v;\n }\n\n //Set the field value\n $this->_datasource->Dataset->$fname=$value;\n }\n else $this->_datasource->Dataset->{$this->_datafield}=$value;\n }\n }\n }\n }", "title": "" }, { "docid": "0a1d3c0bf32525cc151b1669d46d0e2f", "score": "0.60131586", "text": "public function update( &$data );", "title": "" }, { "docid": "7269268d8ff6b2acd85c5561008c6d2a", "score": "0.6008127", "text": "function update_data($where,$data,$table){\n\t\t$this->db->where($where); //\n\t\t$this->db->update($table,$data); // update data ke tabel yang dituju\n\t}", "title": "" }, { "docid": "8042df06cb882c78c714b1b7ecbab11f", "score": "0.5987266", "text": "function updateLabel($test_guid, $label, $test_uid, $cur_user, $test_owner) {\n if (!class_exists(\"SQLite3\")) {\n return \"SQLite3 must be installed to update test labels\";\n }\n\n // Connect to the SQLite DB, and make sure that the table exists\n $db = new SQLite3('./dat/labels.db');\n $result = $db->query(\"CREATE TABLE IF NOT EXISTS labels (test_id STRING, label STRING, user_updated STRING);\");\n\n $result = $db->query('INSERT OR IGNORE INTO labels (test_id, label, user_updated)\n VALUES (\"' . $db->escapeString($test_guid) . '\", \"' . $db->escapeString($label) . '\", \"' . $db->escapeString($cur_user) . '\")');\n\n $result = $db->query('UPDATE labels SET label=\"' . $db->escapeString($label) . '\"\n WHERE test_id=\"' . $db->escapeString($test_guid) . '\"\n AND user_updated=\"' . $db->escapeString($cur_user) . '\"');\n\n return $result !== false;\n}", "title": "" }, { "docid": "81059e6310d11a846def30742a6508e8", "score": "0.5969048", "text": "function batalPenerimaan_jarum($no_tr_jarum,$table,$data){\n\n\t\t\t$this->db->where('no_tr_jarum', $no_tr_jarum);\n\n\t\t\t$query = $this->db->update($table, $data);\n\n\t\t\treturn $query;\n\n\t}", "title": "" }, { "docid": "be6414fb22c1a684cf92fcf817e41873", "score": "0.5949926", "text": "function updateData($update, $db, $log) {\n\t\t$db->exec($update);\n\t\t// WRITE OUT CONFIRMATION\n\t\tfwrite($log, \"OK, UPDATE WORKED\\n\");\n\t}", "title": "" }, { "docid": "d91265892801bba677b57268275022b0", "score": "0.5949665", "text": "function konfirmasi_update($id, $inst, $jumlah, $steril, $tgl_kembali, $pegawai_cssd) {\r\n $val1 = intval($steril);\r\n $val2 = intval($jumlah);\r\n $total = $val1 - $val2;\r\n //update jumlah steril\r\n $update_instrumen = \"UPDATE INSTRUMEN SET STERIL=$total WHERE ID_INSTRUMEN='$inst' AND STERIL>=$val2\";\r\n $this->db->query($update_instrumen);\r\n if ($jumlah == 0) {\r\n $update_instrumen = \"UPDATE PEMINJAMAN SET JUMLAH_PINJAM=$jumlah, STATUS_PEMINJAMAN=3 , \"\r\n . \"TANGGAL_KEMBALI=STR_TO_DATE('$tgl_kembali', '%m/%d/%Y'), ID_CSSD = '$pegawai_cssd', waktu_approve = sysdate()\"\r\n . \"WHERE (ID_TRANSAKSI='$id' AND ID_INSTRUMEN='$inst')\";\r\n } else {\r\n $update_instrumen = \"UPDATE PEMINJAMAN SET JUMLAH_PINJAM=$jumlah, STATUS_PEMINJAMAN=1 , \"\r\n . \"TANGGAL_KEMBALI=STR_TO_DATE('$tgl_kembali', '%m/%d/%Y'), ID_CSSD = '$pegawai_cssd', waktu_approve = sysdate()\"\r\n . \"WHERE (ID_TRANSAKSI='$id' AND ID_INSTRUMEN='$inst')\";\r\n }\r\n $this->db->query($update_instrumen);\r\n return TRUE;\r\n }", "title": "" }, { "docid": "35d2dd3a889ca7ea6a329af9cb549751", "score": "0.5942016", "text": "public function testUpdateTreatedKeo()\n {\n }", "title": "" }, { "docid": "fb4bc8ed92971f4d34d2fbc35c827bea", "score": "0.59222454", "text": "function setLabel();", "title": "" }, { "docid": "5e5d27efeb195d48420f3af9cc333d9f", "score": "0.5922115", "text": "abstract protected function update ();", "title": "" }, { "docid": "bbe445d7f13a5d3bcfa198a54d202953", "score": "0.5917697", "text": "public function updateInd($data){\n try {\n $sql = \"UPDATE indicator SET\n ind_typeIn_code = ?,\n ind_nombre = ?,\n ind_fechaActualizacion = ?,\n ind_categoria = ?,\n ind_subCategoria = ?,\n ind_definicion = ?,\n ind_objetivo = ?,\n ind_metodoMedicion = ?,\n ind_unidadMedida = ?,\n ind_formulaMedida = ?,\n ind_variable1 = ?,\n ind_conceptoEstadistico = ?,\n ind_frecuenciaCalculoVariable = ?,\n ind_fuenteInformacion = ?,\n ind_serieDisponible = ?,\n ind_desagracionTematica = ?,\n ind_desagracionGeografica = ?,\n ind_limitaciones = ?,\n ind_responsable = ?,\n ind_observaciones = ?\n WHERE ind_code = ?\";\n $query = $this->pdo->prepare($sql);\n $query->execute(array($data[0],$data[1],$data[2],$data[3],$data[4],$data[5],$data[6],$data[7],$data[8],$data[9],$data[10],$data[11],$data[12],$data[13],$data[14],$data[15],$data[16],$data[17],$data[18],$data[19],$data[20]));\n $result = \"Datos actualizados correctamente\";\n } catch (PDOException $e) {\n die($e->getMessage().\" \".$e->getLine().\" \".$e->getFile());\n }\n return $result;\n }", "title": "" }, { "docid": "1887017fcd42f7cd5b48f07f3af5866e", "score": "0.5904297", "text": "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set nombre=\\\"$this->nombre\\\",calle=\\\"$this->calle\\\",comuna=\\\"$this->comuna\\\",ciudad=\\\"$this->ciudad\\\",is_active=\\\"$this->is_active\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "title": "" }, { "docid": "3453e830bff81186445d3fa8b0c61de4", "score": "0.5896575", "text": "function addressbook_adminapi_updatelabels($args)\n{\n\n // var defines\n $dels = '';\n\n /**\n * Security check\n */\n if (!xarSecurityCheck('AdminAddressBook',0)) return FALSE;\n\n extract($args);\n\n $invalid = array();\n if (!isset($id)) { $invalid[] = 'id'; }\n if (!isset($del)) { $invalid[] = 'del'; }\n if (!isset($name)) { $invalid[] = 'name'; }\n if (count($invalid) > 0) {\n $msg = xarML('Invalid #(1) in function #(2)() in module #(3)',\n join(', ',$invalid), 'updatelabels', __ADDRESSBOOK__);\n xarErrorSet(XAR_SYSTEM_EXCEPTION, 'BAD_PARAM',\n new SystemException($msg));\n return FALSE;\n }\n\n if(is_array($del)) {\n $dels = implode(',',$del);\n }\n $modID = $modName = array();\n\n if(isset($id) && is_array($id)) {\n foreach($id as $k=>$i) {\n $found = false;\n if(!empty($dels) && count($del)) {\n foreach($del as $d) {\n if($i == $d) {\n $found = true;\n break;\n }\n }\n }\n if(!$found) {\n array_push($modID,$i);\n array_push($modName,$name[$k]);\n }\n }\n }\n\n $xarTables =& xarDBGetTables();\n $labelTable = $xarTables['addressbook_labels'];\n\n $updates = array();\n foreach($modID as $k=>$id) {\n array_push($updates,array('sql'=>\"UPDATE $labelTable\n SET name = ?\n WHERE nr = ?\"\n ,'bindvars'=>array($modName[$k],$id)));\n }\n\n if(xarModAPIFunc(__ADDRESSBOOK__,'admin','updateitems',array('tablename'=>'labels','updates'=>$updates))) {\n xarErrorSet(XAR_USER_EXCEPTION,\n _AB_ERR_INFO,\n new abUserException('UPDATE - '._AB_SUCCESS));\n }\n\n if(!empty($dels)) {\n $delete = \"DELETE FROM $labelTable WHERE nr IN ($dels)\";\n if(xarModAPIFunc(__ADDRESSBOOK__,'admin','deleteitems',array('tablename'=>'labels','delete'=>$delete))) {\n xarErrorSet(XAR_USER_EXCEPTION,\n _AB_ERR_INFO,\n new abUserException('DELETE - '._AB_SUCCESS));\n }\n }\n\n if( (isset($newname)) && ($newname != '') ) {\n if(xarModAPIFunc(__ADDRESSBOOK__,'admin','additems',array('tablename'=>'labels','name'=>$newname))) {\n xarErrorSet(XAR_USER_EXCEPTION,\n _AB_ERR_INFO,\n new abUserException('INSERT - '._AB_SUCCESS));\n }\n }\n\n // Return\n return TRUE;\n\n}", "title": "" }, { "docid": "e296817e5fd38c05d19c3234c70073ba", "score": "0.58905816", "text": "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set cedula=\\\"$this->cedula\\\",carnet=\\\"$this->carnet\\\",title=\\\"$this->title\\\",edad=\\\"$this->edad\\\",direccion=\\\"$this->direccion\\\",telefono=\\\"$this->telefono\\\",cargaFam=\\\"$this->cargaFam\\\",category_id=\\\"$this->category_id\\\",project_id=\\\"$this->project_id\\\",priority_id=\\\"$this->priority_id\\\",description=\\\"$this->description\\\",asigned_id=\\\"$this->asigned_id\\\", status_id=\\\"$this->status_id\\\",kind_id=\\\"$this->kind_id\\\",updated_at=NOW() where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "title": "" }, { "docid": "8d5df406f4f1f600076ff85922765713", "score": "0.5885699", "text": "public function testUpdateKeo()\n {\n }", "title": "" }, { "docid": "a0aaafd2015a870bbdb5ecb3b43532ef", "score": "0.58786356", "text": "public function db_update() {\r\r\n }", "title": "" }, { "docid": "ed3118ed17a7cc0add81cd03c2226fc7", "score": "0.58714443", "text": "function update_func($table = null, $idf = 0, $data = null) {\n\t\t$database = open_database();\n\t\t$items = null;\n\n\t\tforeach ($data as $key => $value)\n\t\t\t$items .= \"`\" . trim($key, \"'\") . \"` = '$value',\";\n\t\t$items = rtrim($items, ',');\n\n\t\ttry {\n\n\t\t\t$sql = \"UPDATE $table SET $items WHERE 'COD_FUNC' = $idf\";\n\t\t\t$database->query($sql);\n\n\t\t\t$_SESSION['message'] = 'Registro atualizado com sucesso';\n\t\t\t$_SESSION['type'] = 'success';\n\t\t\n\t\t} catch (Exception $e) {\n\n\t\t\t$_SESSION['message'] = 'Não foi possível realizar a operação.';\n\t\t\t$_SESSION['type'] = 'danger';\n\t\t\n\t\t}\n\n\t\tclose_database($database);\n\t}", "title": "" }, { "docid": "375e43248d2da7399d44683e71621019", "score": "0.5869883", "text": "function update_data($id,$namagrup,$syaratkelulusan){\n\t\t$query = \"UPDATE grup_kursus\n\t\t\t\t\t\tSET \n\t\t\t\t\t\t\tnamagrup = '{$namagrup}',\n\t\t\t\t\t\t\tsyaratkelulusan = '\".addslashes(html_entity_decode($syaratkelulusan)).\"'\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\tidGrup_kursus = '{$id}'\";\n\t\t$result = $this->query($query);\t\t\t\t\t\n\t}", "title": "" }, { "docid": "d850088a401083e2da6ae1cfbcf0c158", "score": "0.5861854", "text": "function status_db($data, $id) {\n $this->db->where('id_trans', $id);\n $this->db->update('transaksi', $data);\n }", "title": "" }, { "docid": "da15334355b4376993285c430d3d96b1", "score": "0.5861129", "text": "function update($data){\n $this->db->where('Package_Id',$data['curr_package_id']);\n $this->db->update(\"packages\",array(\"Package_Id\"=>$data['package_id'],\n \"Package_type\" => $data['package_type'], \n \"Price\" => $data['price'],\n \"Day_count\" => $data['day_count'], \n \"Description\" => $data['description']));\n }", "title": "" }, { "docid": "daa0a7fe66ad01ee8d15a188d10aceff", "score": "0.58554614", "text": "public function update()\n\t{\n\n\t}", "title": "" }, { "docid": "c34b7e7b084adad3c63e08b007e4547a", "score": "0.5850016", "text": "function update()\n\t{\n\t}", "title": "" }, { "docid": "77b255fd85f3c31162e0f843c3d6f947", "score": "0.58499277", "text": "public function update($data)\n {\n # mengubah data nama jalan yang tersimpan dalam basis data\n $where = array('id_nama_jalan' => $data->id_nama_jalan);\n unset($data->id_nama_jalan);\n if (!$this->db->update('nama_jalan',$data,$where)) {\n return $this->db->error();\n }else{\n return true;\n }\n }", "title": "" }, { "docid": "ba10f3991fb1855d5d0af447f67becc0", "score": "0.5838648", "text": "function update_data($data = '') {\n\n\t\t$this->db->where($this->primaryKey, '1');\n\t\t$this->db->update($this->table, $data);\n\n\t}", "title": "" }, { "docid": "8c3d5f4ee5706122765c9699e64f2507", "score": "0.58372223", "text": "public function update()\n\t{\n\t}", "title": "" }, { "docid": "899f5ef5bdb1086df7d155cb16e8cb1c", "score": "0.58321553", "text": "function evaluasi_label_prodi($kd_prodi, $id_l, $label) // $label = array hasil seleksi checkbox oleh admin\n\t\t{\n\t\t\t$sys_label = $this->get_label(1500, 4, array($id_l));\n\t\t\t$i=0;\n\t\t\t$sys_id_ld = array();\n\t\t\tforeach ($sys_label as $key) {\n\t\t\t\t$sys_id_ld[$i] = $key['id_ld'];\n\t\t\t\t$i++;\n\t\t\t}\n\n\t\t\t$unused = array_diff($sys_id_ld, $label);\n\n\t\t\tforeach($unused as $key => $value){\n\t\t\t\t//cek dulu apakah sudah ada apa belum di sistem, jika sudah ada maka do nothing; jika belum ada maka disimpan di sistem\n\t\t\t\t$temp = $this->cek_unused_label($kd_prodi, $value);\n\t\t\t\tif($temp==0){\n\t\t\t\t\t$tmp = $this->insert_unused_label($kd_prodi, $value);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tforeach($label as $key => $value){\n\t\t\t\t//cek dulu, jika data tersimpan di sistem, maka akan dihapus\n\t\t\t\t$temp = $this->cek_unused_label($kd_prodi, $value);\n\t\t\t\tif($temp==1){\n\t\t\t\t\t$tmp = $this->delete_unused_label($kd_prodi, $value);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn null;\n\n\t\t}", "title": "" }, { "docid": "d2bed2225207a89fea4dfbe3a56678d3", "score": "0.5825037", "text": "public function updating();", "title": "" }, { "docid": "6044311a1bc1b3550ed3470d847fb256", "score": "0.5824039", "text": "function sync_final_update_attendance($absent_id,$kd_aktual,$terlambat,$pulangcepat,$jamkerja) {\n\t\t$swbquery1 = \"UPDATE `t_employee_absent` SET `kd_aktual`='\".$kd_aktual.\"', `kd_aktual_temp`='\".$kd_aktual.\"', `terlambat`=\".$terlambat.\", `pulang_cepat`=\".$pulangcepat.\", `jam_kerja`=\".$jamkerja.\", `on_process`=0 WHERE `absent_id`=\".$absent_id.\" AND `eod_lock`=0;\";\n\t\t$this->db->query($swbquery1);\n\t}", "title": "" }, { "docid": "a86cfca9ff8e3c26c6647c4d408b9d7f", "score": "0.5823325", "text": "public function updateApply($data) {\n date_default_timezone_set('Asia/Dhaka');\n $formid = $this->helpObj->validAndEscape($data['formid']);\n\n //sharok bisoi t porobortite thakbe na\n //ata edit sharok thek update hobe. \n $sharok = $this->helpObj->validAndEscape($data['sharok']);\n $sharokdate = $this->helpObj->validAndEscape($data['sharokdate']); //add to last update column\n $subject = $this->helpObj->validAndEscape($data['subject']);\n $source = $this->helpObj->validAndEscape($data['source']);\n\n $fileno = $this->helpObj->validAndEscape($data['fileno']);\n $date = $this->helpObj->validAndEscape($data['date']);\n $name = $this->helpObj->validAndEscape($data['name']);\n $gurdian = $this->helpObj->validAndEscape($data['gurdian']);\n $mother = $this->helpObj->validAndEscape($data['mother']);\n\n $chome = $this->helpObj->validAndEscape($data['chome']);\n $cpost = $this->helpObj->validAndEscape($data['cpost']);\n $cdist = $this->helpObj->validAndEscape($data['cdist']);\n $cvill = $this->helpObj->validAndEscape($data['cvill']);\n $cps = $this->helpObj->validAndEscape($data['cps']);\n\n $phome = $this->helpObj->validAndEscape($data['phome']);\n $ppost = $this->helpObj->validAndEscape($data['ppost']);\n $pdist = $this->helpObj->validAndEscape($data['pdist']);\n $pvill = $this->helpObj->validAndEscape($data['pvill']);\n $pps = $this->helpObj->validAndEscape($data['pps']);\n\n $mobile = $this->helpObj->validAndEscape($data['mobile']);\n $design = $this->helpObj->validAndEscape($data['design']);\n \n $building_type = $this->helpObj->validAndEscape($data['building_type']);\n \n //$length = $this->helpObj->validAndEscape($data['length']);\n //$width = $this->helpObj->validAndEscape($data['width']);\n //$area = $this->helpObj->validAndEscape($data['area']);\n\n //$present_app_floor = $this->helpObj->validAndEscape($data['present_app_floor']);\n \n $rlength = $this->helpObj->validAndEscape($data['rlength']);\n $rwidth = $this->helpObj->validAndEscape($data['rwidth']);\n $rnumber = $this->helpObj->validAndEscape($data['rnumber']);\n $rarea = $this->helpObj->validAndEscape($data['rarea']);\n $rbuildingdetails = $this->helpObj->validAndEscape($data['rbuildingdetails']);\n \n $clength = $this->helpObj->validAndEscape($data['clength']);\n $cwidth = $this->helpObj->validAndEscape($data['cwidth']);\n $cnumber = $this->helpObj->validAndEscape($data['cnumber']);\n $carea = $this->helpObj->validAndEscape($data['carea']);\n $cbuildingdetails = $this->helpObj->validAndEscape($data['cbuildingdetails']);\n\n //recidnecial-border area\n $rblength = $this->helpObj->validAndEscape($data['rblength']);\n $rbwidth = $this->helpObj->validAndEscape($data['rbwidth']);\n $rbnumber = $this->helpObj->validAndEscape($data['rbnumber']);\n $rbarea = $this->helpObj->validAndEscape($data['rbarea']);\n $rbbuildingdetails = $this->helpObj->validAndEscape($data['rbbuildingdetails']);\n \n \n //border area\n $blength = $this->helpObj->validAndEscape($data['blength']);\n $bwidth = $this->helpObj->validAndEscape($data['bwidth']);\n $bnumber = $this->helpObj->validAndEscape($data['bnumber']);\n $barea = $this->helpObj->validAndEscape($data['barea']);\n $bbuildingdetails = $this->helpObj->validAndEscape($data['bbuildingdetails']);\n\n //other area\n $olength = $this->helpObj->validAndEscape($data['olength']);\n $owidth = $this->helpObj->validAndEscape($data['owidth']);\n $onumber = $this->helpObj->validAndEscape($data['onumber']);\n $oarea = $this->helpObj->validAndEscape($data['oarea']);\n $obuildingdetails = $this->helpObj->validAndEscape($data['obuildingdetails']);\n \n $approve_fee = $this->helpObj->validAndEscape($data['approve_fee']);\n $approve_vat = $this->helpObj->validAndEscape($data['approve_vat']);\n \n $order_no = $this->helpObj->validAndEscape($data['order_no']);\n $bank_name = $this->helpObj->validAndEscape($data['bank_name']);\n $mouja = $this->helpObj->validAndEscape($data['mouja']);\n $dno = $this->helpObj->validAndEscape($data['dno']);\n $khotian = $this->helpObj->validAndEscape($data['khotian']);\n $wardno = $this->helpObj->validAndEscape($data['wardno']);\n $location = $this->helpObj->validAndEscape($data['location']);\n \n //$last_update = $date.\" 00:00:00\"; //will be used after inserted 2000 data\n $query = \"update apply set \n fileno = '$fileno',sharok='$sharok', date='$date',subject='$subject',name='$name',gurdian='$gurdian',mother='$mother',\n building_type='$building_type',source='$source',chome='$chome',cvill='$cvill',cpost='$cpost',cps='$cps',cdist='$cdist',\n phome='$phome',pvill='$pvill',ppost='$ppost',pps='$pps',pdist='$pdist',\n mobile='$mobile',design='$design',\n rlength='$rlength',rwidth='$rwidth',rnumber='$rnumber',rarea='$rarea',rbuildingdetails='$rbuildingdetails',\n clength='$clength',cwidth='$cwidth',cnumber='$cnumber',carea='$carea',cbuildingdetails='$cbuildingdetails',\n rblength='$rblength',rbwidth='$rbwidth',rbnumber='$rbnumber',rbarea='$rbarea',rbbuildingdetails='$rbbuildingdetails',\n blength='$blength',bwidth='$bwidth',bnumber='$bnumber',barea='$barea',bbuildingdetails='$bbuildingdetails',\n olength='$olength',owidth='$owidth',onumber='$onumber',oarea='$oarea',obuildingdetails='$obuildingdetails',\n approve_fee='$approve_fee',order_no='$order_no',bank_name='$bank_name',\n mouja='$mouja',dno='$dno',khotian='$khotian',wardno='$wardno',location='$location',last_update='$sharokdate' where id='$formid'\";\n\n $stmt = $this->dbObj->update($query);\n $stmt = $this->dbObj->update(\"update fee set vat='$approve_vat' where applyid='$formid'\");\n if($stmt){\n $status = $this->dbObj->link->query(\"select * from apply where id='$formid'\");\n\n if ($status) {\n $data = $status->fetch_assoc();\n $applyid = $data['id'];\n\n\n $siteplan = 'attach_siteplan';\n $sitephoto = $data['attach_siteplan'];\n\n $groundfloor = 'attach_groundfloor';\n $groundphoto = $data['attach_groundfloor'];\n \n $otherfloor = 'attach_otherfloor';\n $otherphoto = $data['attach_otherfloor'];\n \n //$stmt = $this->dbObj->insert(\"insert into fee(applyid,vat) values('$applyid','$approve_vat')\");\n $this->updateApplicantPhoto($data,$applyid,$data['applicant_photo']);\n $this->updateAttachment($data,$siteplan,$sitephoto,$applyid); //save siteplan attachment\n $this->updateAttachment($data,$groundfloor,$groundphoto,$applyid); //save groundfloor attachment\n $this->updateAttachment($data,$otherfloor,$otherphoto,$applyid); //save otherfloor attachment\n }\n return true;\n }\n }", "title": "" }, { "docid": "20ec0b644a537d7c062e4bc6364d670e", "score": "0.5817397", "text": "function upd_tsel()\n {\n if ($_POST['data'] == 'value')\n $query = \"update csct_dtmpl_fsel set name=:name where id=\" . $_POST['pk'];\n else\n $query = \"update csct_dtmpl_fsel set cname=:name where id=\" . $_POST['pk'];\n $sql = $this->dbh->prepare($query);\n $sql->bindParam(':name', $_POST['value'], PDO::PARAM_STR);\n $sql->execute();\n $sql->closeCursor();\n }", "title": "" }, { "docid": "7c6b3522ab85c97a7e5b730da26d02e9", "score": "0.58086044", "text": "function updateData(){\r\n $bookid = textboxValue(\"book_id\");\r\n $bookname = textboxValue(\"book_name\");\r\n $bookpublisher = textboxValue(\"book_publisher\");\r\n $bookprice = textboxValue(\"book_price\");\r\n\r\n if($bookname && $bookpublisher && $bookprice){\r\n $sql_update = \"UPDATE tb_books SET book_name = '$bookname',\r\n book_publisher = '$bookpublisher',\r\n book_price = '$bookprice'\r\n WHERE book_id = '$bookid'\";\r\n\r\n $result = mysqli_query($GLOBALS['con'],$sql_update);\r\n\r\n if($result){\r\n textNode(\"Success\",\"Data successfully updated.\");\r\n }\r\n else{\r\n textNode(\"Error.....!\",\"Unable to update data.\");\r\n }\r\n }\r\n else{\r\n textNode(\"Error.....!\",\"Select data using edit icon.\");\r\n }\r\n }", "title": "" }, { "docid": "f0d7544e2c5f74cc89837231826ca791", "score": "0.5802254", "text": "function update2($id_lapor){\n $data['hasil'] = $this->M_lapor->get_data($id_lapor);\n $this->load->view('v_laporan/update', $data);\n }", "title": "" }, { "docid": "f71722bd55d196cb90cc28821bc87a12", "score": "0.5788245", "text": "public function update_data($where,$data,$table) {\n $this->db->where($where); //WHERE = $where\n $this->db->update($table, $data); //UPDATE t_siswa SET nama = {$nama}, tanggal_lahir = {$tanggal_lahir}\n }", "title": "" }, { "docid": "03982c31bf19148ba565bff687f0aac6", "score": "0.5773444", "text": "protected function update()\n {\n \n }", "title": "" }, { "docid": "25408f91964f884987f91818bd4cd2e1", "score": "0.5773146", "text": "function predefinedlabels_update_instance($predefinedlabels) {\n global $DB;\n\n $data = new stdClass();\n $data->id = $predefinedlabels->instance;\n $data->course = $predefinedlabels->course;\n $data->timemodified = time();\n $data->templateid = (int) $predefinedlabels->radioar['yesno'];\n\n return $DB->update_record(\"predefinedlabels\", $data);\n}", "title": "" }, { "docid": "5c72686699f818543ea312f6a3577d34", "score": "0.5769003", "text": "public function update()\n\t{\n\t\techo 'Fonctionnalité ne nécessitant pas encore d\\'être implémentée.<br />';\n\t}", "title": "" }, { "docid": "5c12192c5d827bd440de809e2db858de", "score": "0.57624954", "text": "public function update_data($table, $data, $id_name, $id) {\n $update = \"set \";\n $i = 0;\n foreach ($data as $key => $value) {\n if ($i) {\n $value2 = str_replace(\"'\", '\"', $value);\n $update.=\" ,`\" . $key . \"` = '\" . $value2 . \"' \";\n } else {\n $value2 = str_replace(\"'\", '\"', $value);\n $update.=\" `\" . $key . \"` = '\" . $value2 . \"' \";\n }\n $i++;\n }\n\n if ($update != \"\" && $id_name != \"\" && $id != \"\") {\n\n $sql = 'UPDATE ' . $table . ' ' . $update . ' WHERE ' . $id_name . ' = \"' . $id . '\" ';\n\n $log_model = new Admin_ajax;\n $log_model->addLog(\"Update\", $table, $id, \"Performed UPDATE Operation\");\n\n $update_status = Yii::app()->db->createCommand($sql)->execute();\n\n\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "f4fb69379389687202704973bfe64347", "score": "0.57552755", "text": "public function quickedit_label()\n {\n $this->_setModalLayout();\n if (isset($_REQUEST['id']) || isset($_REQUEST['selectall'])) {\n $target_id = isset($_REQUEST['id']) ? $_REQUEST['id'] : '';\n $selectall = isset($_REQUEST['selectall']) ? $_REQUEST['selectall'] : '0';\n //Get List Label Hierachi\n $labels = $this->Label->getLabelsArray('TagModel');\n $listLabelHierachy = $this->Label->makeNestedLabels($this->Label->getLabelHierarchy($labels));\n\n $this->set(array(\n 'labels' => $listLabelHierachy,\n 'target_id' => $target_id,\n 'selectall' => $selectall\n ));\n return $this->render('quickedit_label', 'ajax');\n }\n if (isset($this->request->data['Tag'])) {\n $rq_label = $this->request->data['Tag'];\n $label_ids = explode(',', $rq_label['label_id']);\n $target_ids = array();\n $selectall = $this->request->data['Tag']['selectall'];\n if($selectall == '1') {\n $tagData = $this->Session->read(\"Tag\");\n if (isset($tagData)) {\n foreach ($this->Session->read(\"Tag\") as $key => $value) {\n array_push($target_ids, $value['Tag']['id']);\n }\n }\n } else {\n $target_ids = explode(',', $this->request->data['Tag']['target_id']);\n }\n\n $old_label = $this->Label->label_id_Query($target_ids, 'TagModel');\n // Delete old records\n $this->Label->LabelData->deleteAll(array('target_id' => $target_ids, 'label_id' => $old_label), false);\n\n // Insert new records\n foreach ($label_ids as $label_id) {\n foreach ($target_ids as $target_id) {\n $this->Label->LabelData->save(array('label_id' => $label_id, 'target_id' => $target_id, 'cdate' => date('Y-m-d H:i:s')));\n }\n }\n $this->Session->setFlash(__('プレートのアップデートに成功しました。'), 'alert-box', array('class' => 'alert-success'));\n }\n\n $this->redirect(array('controller' => 'tags', 'action' => 'index'));\n }", "title": "" }, { "docid": "41e5aa8cc50b325703ea18d6a3af93d3", "score": "0.5753451", "text": "public function updateData()\n {\n if ($this->validation()) {\n $this->M_Penjadwalan->updateMahasiswa();\n $this->session->set_flashdata('flash_penjadwalan', 'Diupdate');\n redirect('Penjadwalan');\n } else {\n $this->ubah($this->input->post('id'));\n }\n }", "title": "" }, { "docid": "ce60511ef06ffac8d13f3ee65dbeac59", "score": "0.5753374", "text": "function cek_label_aktif()\n\t\t{\n\t\t\t$CI =& get_instance();\n\t\t\t$data = $CI->s00_lib_api->get_api_json(\n\t\t\t\t\tURL_API_SKPI.'/skpi_label/lihat',\n\t\t\t\t\t'POST',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'api_kode'\t\t=> 1500,\n\t\t\t\t\t\t'api_subkode'\t=> 2,\n\t\t\t\t\t\t'api_search'\t=> array()\n\t\t\t\t\t)\n\t\t\t);\n\n\t\t\tif($data){\n\t\t\t\t$temp = 1;\n\t\t\t}else{\n\t\t\t\t$temp = 0;\n\t\t\t}\n\n\t\t\treturn $temp;\n\t\t}", "title": "" }, { "docid": "440184d85cec09870a85c9362865c7f6", "score": "0.5738177", "text": "public function updateDataKontrol()\n {\n //get data\n $create_by \t\t= $this->app_loader->current_account();\n $create_date \t\t= date('Y-m-d H:i:s');\n $create_ip \t\t= $this->input->ip_address();\n\n\t\t$id_kontrol\t\t\t\t\t= html_escape($this->input->post('kontrol', TRUE));\n $nama_kontrol\t\t\t\t= html_escape($this->input->post('nama_kontrol', TRUE));\n $label_kontrol \t\t= html_escape($this->input->post('label_kontrol', TRUE));\n $url_kontrol \t\t= html_escape($this->input->post('url_kontrol', TRUE));\n\t\t$deskripsi_kontrol \t= html_escape($this->input->post('deskripsi_kontrol', TRUE));\n $status \t\t= html_escape($this->input->post('status', TRUE));\n\n $data = array(\n 'nama_kontrol' => $this->db->escape_str($nama_kontrol),\n 'label_kontrol' => $this->db->escape_str($label_kontrol),\n 'url_kontrol' => $this->db->escape_str($url_kontrol),\n\t\t\t'deskripsi_kontrol' => $this->db->escape_str($deskripsi_kontrol),\n 'mod_by' => $this->db->escape_str($create_by),\n 'mod_date' => $this->db->escape_str($create_date),\n 'mod_ip' => $this->db->escape_str($create_ip),\n 'id_status' => $this->db->escape_str($status),\n );\n\n\t\t//cek nama fungsi biar tidak terjadi duplikat data\n\t\t$this->db->where('id_kontrol <>', abs($id_kontrol));\n\t\t$this->db->where('nama_kontrol', $this->db->escape_str($nama_kontrol));\n\t\t$count = $this->db->count_all_results('xi_sa_kontrol');\n\t\tif($count > 0)\n\t\t\treturn FALSE;\n\t\telse {\n\t\t\t/*query update*/\n\t\t\t$this->db->where('id_kontrol', abs($id_kontrol));\n\t\t\t$this->db->update('xi_sa_kontrol', $data);\n\t\t\treturn TRUE;\n\t\t}\n }", "title": "" }, { "docid": "f20055968af3fccca7a6808e19881f41", "score": "0.57339", "text": "function update( )\n {\n \n }", "title": "" }, { "docid": "9d7c2f4c38fa6cf92e2ee2fe2067acf6", "score": "0.5733814", "text": "protected abstract function update();", "title": "" }, { "docid": "4302e0bcac62b429961ed2569891140a", "score": "0.5729392", "text": "public function update_after_new()\r\n {\r\n $sSQL=\"UPDATE MTB_Clientes \r\n SET Validado='0',\r\n Ultima_Operacion='A'\r\n WHERE Ultima_Operacion IS NULL\";\r\n $this->oDB->execute($sSQL);\r\n }", "title": "" }, { "docid": "490346453139484f38354a5c794f4849", "score": "0.5720771", "text": "function update($nama_tabel, $form_data, $where_clause='')\n {\n $whereSQL = '';\n if(!empty($where_clause))\n {\n // mengecek apakah terdapat klausa where\n if(substr(strtoupper(trim($where_clause)), 0, 5) != 'WHERE')\n {\n // jika tidak ditemukan keyword where, menambah keyword\n $whereSQL = \" WHERE \".$where_clause;\n } else\n {\n $whereSQL = \" \".trim($where_clause);\n }\n }\n // memulai statement sql\n $sql = \"UPDATE \".$nama_tabel.\" SET \";\n\n // perulangan untuk membuat set pada kolom /\n $sets = array();\n foreach($form_data as $column => $value)\n {\n $sets[] = \"`\".$column.\"` = '\".$value.\"'\";\n }\n $sql .= implode(', ', $sets);\n\n // menambah statement ke where\n $sql .= $whereSQL;\n\n // mengembalikan nilai sql\n return $sql;\n }", "title": "" }, { "docid": "f6bf8ac281818ddf5309aa662eabc1a9", "score": "0.5699186", "text": "public function update_data($tb_name,$col,$val,$updated_col,$new_val)\n\t{\n\t\t$symt3 = $this->pdo->prepare(\"UPDATE $tb_name SET $updated_col='$new_val' WHERE $col='$val'\");\n\t $symt3 -> execute();\n\t}", "title": "" }, { "docid": "966942c7d1a80da9ef54085ffbe885a4", "score": "0.5698477", "text": "function ubah_validasiperpus($data_validasiperpus) {\n\t\t\t$id_validasiperpus = $data_validasiperpus['id_validasiperpus'];\n\t\t\t$id_mhs = $data_validasiperpus['id_mhs'];\n\t\t\t$id_pegawaiperpus = $data_validasiperpus['id_pegawaiperpus'];\n\t\t\t$id_validasiperpus = $data_validasiperpus['id_validasiperpus']; \n\t\t\t$tgl_validasiperpus = $data_validasiperpus['tgl_validasiperpus']; \n\t\n\t\t\tmysqli_query($con, \"update tambah_validasiperpus set id_mhs='$id_mhs', id_pegawaiperpus='$id_pegawaiperpus', id_validasiperpus='$id_validasiperpus', tgl_validasiperpus='$tgl_validasiperpus'\");\n\t\t}", "title": "" }, { "docid": "e1843bdb7fb6067e79167fe7bca8d2ab", "score": "0.56912065", "text": "public function update($id,$data)\n\t\t{\n\t\t\t$this->db->where('idlelang', $id);\n\t\t\t$this->db->update('tlelang', $data); \n\t\t}", "title": "" }, { "docid": "16f61d69d9412cb8e7220c2921216a4a", "score": "0.5685181", "text": "function cek_unused_label($kd_prodi, $id_ld)\n\t\t{\n\t\t\t$CI =& get_instance();\n\t\t\t$data = $CI->s00_lib_api->get_api_json(\n\t\t\t\t\tURL_API_SKPI.'/skpi_label/lihat',\n\t\t\t\t\t'POST',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'api_kode'\t\t=> 1500,\n\t\t\t\t\t\t'api_subkode'\t=> 9,\n\t\t\t\t\t\t'api_search'\t=> array($kd_prodi, $id_ld)\n\t\t\t\t\t)\n\t\t\t);\n\n\t\t\tif($data){ $value = 1; } else { $value = 0; }\n\t\t\treturn $value;\n\t\t}", "title": "" }, { "docid": "b6da6209e389ee423856f03771bc6fa2", "score": "0.5682497", "text": "public function system_quickedit_label()\n {\n $this->quickedit_label();\n }", "title": "" }, { "docid": "054aa77581c87569dc1a3bafe4887e59", "score": "0.56824195", "text": "protected final function _get_field_label($data){\n $this->label = $this->get_field_label($data);\n }", "title": "" }, { "docid": "83c2944b3bc789ad84a2151252ab58e0", "score": "0.5681705", "text": "function update_data($id,$judul,$keterangan, $wilayah=false){\n\t\t\n\t\tif ($wilayah){\n\t\t\t$query = \"UPDATE wilayah\n\t\t\t\t\t\tSET \n\t\t\t\t\t\t\tkode_wilayah = '{$judul}',\n\t\t\t\t\t\t\tnama_wilayah = '\".addslashes(html_entity_decode($keterangan)).\"'\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\tkode_wilayah = '{$id}'\";\n\t\t}else{\n\t\t\t$query = \"UPDATE catatan\n\t\t\t\t\t\tSET \n\t\t\t\t\t\t\tjudul = '{$judul}',\n\t\t\t\t\t\t\tketerangan = '\".addslashes(html_entity_decode($keterangan)).\"'\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\tidCatatan = '{$id}'\";\n\t\t}\n\t\t\n\t\t$result = $this->query($query);\t\t\t\t\t\n\t}", "title": "" }, { "docid": "b0cb87ce46fa90c1110686de8ec06b68", "score": "0.56790257", "text": "public function update(){\n\n\t}", "title": "" }, { "docid": "44dcb3d60d38e4cb5d6d8f039edcf5f5", "score": "0.5677581", "text": "function _triggerUpdate($fid_header,$fid_coa){\n // if($check){\n // return false;\n // }\n $data = $this->db->query(\"SELECT SUM(a.debet) AS debet,a.fid_header,b.* FROM transaction_journal a JOIN transaction_journal_header b ON a.fid_header = b.id WHERE a.fid_header = $fid_header AND a.deleted = 0 AND a.type = 'pengeluaran' \")->row();\n\n if($data == true){\n $query = $this->db->query(\"UPDATE transaction_journal SET credit = $data->debet WHERE fid_header = $data->fid_header AND fid_coa = $fid_coa \");\n }\n if($query == true){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "3ca21ec9cd52c927832e2f9759e2d7bc", "score": "0.5666688", "text": "function UpdateObjectLabels($db, $pmf, $rating, $comment, $author)\n{\n if ((int)$rating == 0) $rating = 'NULL';\n $comment = trim($comment);\n\n $deleting = $rating == 'NULL' & $comment == '';\n\n $cmd = sprintf(\"SELECT count(pmf) FROM object_label where pmf=%s AND author='%s';\", $pmf, $author);\n $result = QueryScalar($db, $cmd);\n\n $cmd = '';\n if ($result == 0) { // add new\n if (!$deleting) {\n $cmd = sprintf(\"INSERT INTO object_label\n(pmf, rating, comment, author, last_update)\nVALUES \n(%s, %s, '%s', '%s', '%s')\n\", $pmf, $rating, $comment, $author, date(\"y-m-d G:i:s\"));\n }\n } else { // update\n if (!$deleting) {\n $cmd = sprintf(\"\nUPDATE object_label\nSET rating=%s, comment='%s', last_update='%s'\nWHERE pmf=%s AND author='%s'\n\", $rating, $comment, date(\"y-m-d G:i:s\"), $pmf, $author);\n } else {\n $cmd = sprintf(\"DELETE FROM object_label WHERE pmf=%s AND author='%s'\",$pmf,$author);\n }\n }\n\n if ($cmd != '') {\n return Execute($db, $cmd, true);\n } else {\n return true;\n }\n}", "title": "" }, { "docid": "62764b558f07400797c7be47d02cb65a", "score": "0.565843", "text": "abstract public function update(Dbi_Model $model, array $data);", "title": "" }, { "docid": "4d90181635ca333e4e3c63a98709b7de", "score": "0.5657663", "text": "function setLabel($label)\n\t{\n\t\t$this->da[\"label\"]=$label;\n\t}", "title": "" }, { "docid": "7bed569be19e07509f956d399c2fee38", "score": "0.5657095", "text": "public static function updateData()\n {\n $databackend = new BAV_DataBackend_PDO(new PDO(sfConfig::get('bavPdoDriver')\n . ':host=' . sfConfig::get('bavHost')\n . ';dbname=' . sfConfig::get('bavDatabase'),\n sfConfig::get('bavUsername'),\n sfConfig::get('bavPassword')));\n $databackend->update();\n }", "title": "" }, { "docid": "c37580590cfb1b1fabab8a3db5c6b913", "score": "0.5654733", "text": "protected function update()\n {\n }", "title": "" }, { "docid": "84576c3acfd5f27fedee7d292fbe70fe", "score": "0.56522477", "text": "function update()\n {\n }", "title": "" }, { "docid": "45d12f4b06cc92411e016f2c942bddba", "score": "0.56464875", "text": "public function update(){\n\t}", "title": "" }, { "docid": "ab5a43544989a69e778b109bf7ca307b", "score": "0.56412494", "text": "public function testUpdateExcavatedKeo()\n {\n }", "title": "" }, { "docid": "30a1b92f4fef0b9009e190f891cc53bd", "score": "0.56346065", "text": "public function updated_notice() {\n ?>\n <div id=\"message\" class=\"updated\">\n <p><?php _e('Data update have been successfully applied!', 'wc_warranty'); ?></p>\n </div>\n <?php\n }", "title": "" }, { "docid": "7cac30ee4662d81227f2a40450b9339c", "score": "0.56345147", "text": "function afficher_updatepatient() {\r\n\r\n return '<h1>les informations Modifier avec succés<h1>';\r\n}", "title": "" }, { "docid": "72075769bba8e24d8dd97246538c638c", "score": "0.562371", "text": "public static function updated(){\r\n $id = $_POST['id'];\r\n $depart = $_POST['depart'];\r\n $arrive = $_POST['arrive'];\r\n $dated = $_POST['dated'];\r\n $nbplaces = $_POST['nbplaces'];\r\n $prix = $_POST['prix'];\r\n $conducteur_login = $_POST['conducteur_login'];\r\n\r\n $values = array(\r\n \"id\" => $id,\r\n \"depart\" => $depart,\r\n \"arrive\" => $arrive,\r\n \"dated\" => $dated,\r\n \"nbplaces\" => $nbplaces,\r\n \"prix\" => $prix,\r\n \"conducteur_login\" => $conducteur_login);\r\n \r\n $umod = ModelTrajet::update($values);\r\n $tab_u = ModelTrajet::selectall();\r\n $controller ='trajet';\r\n $view = 'updated';\r\n $pagetitle='modification utilisateur';\r\n require(File::build_path([\"view\",\"view.php\"]));\r\n }", "title": "" }, { "docid": "19988f2294974f8c63b4462419e01228", "score": "0.56226295", "text": "function update_position(&$params){\n\t\t$labels=array();\n\t\t$i=0;\n\t\t#if (is_array($params) && ($params['table']=='tx_civserv_service' || $params['table']=='tx_civserv_service_sv_position_mm')) {\t\n\n\t\tif (is_array($params) && ($params['table']=='tx_civserv_service' && substr($params['uid'],0,3)!='NEW')) {\t\n\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(\n\t\t\t\t'tx_civserv_service_sv_position_mm.uid as svpos_uid, \t\n\t\t\t\t tx_civserv_position.uid as pos_uid, \n\t\t\t\t sv_name, \n\t\t\t\t po_name, \n\t\t\t\t tx_civserv_service.pid',\t\t\t\t// select\n\t\t\t\t'tx_civserv_service', \t\t\t\t\t// local\n\t\t\t\t'tx_civserv_service_sv_position_mm',\t// mm\n\t\t\t\t'tx_civserv_position', \t\t\t\t\t// foreign\n\t\t\t\t#'',\t\t\t\t\t\t\t\t\t// where --> all records\n\t\t\t\t' AND uid_local='.$params['uid'],\t\t// where --> only this record!\n\t\t\t\t'', \n\t\t\t\t'', \n\t\t\t\t'');\n\t\t\twhile ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n\t\t\t\t#$GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_civserv_service_sv_position_mm', 'uid = '.intval($row['svpos_uid']), array (\"sp_label\" => $row['sv_name'].', '.$row['po_name'], \"pid\" => $row['pid']));\n\t\t\t\t$labels[$i]['svpos_uid']=$row['svpos_uid'];\n\t\t\t\t$labels[$i]['pos_uid']=$row['pos_uid'];\n\t\t\t\t$labels[$i]['sv_name']=$row['sv_name'];\n\t\t\t\t$labels[$i]['po_name']=$row['po_name'];\n\t\t\t\t$labels[$i]['pid']=$row['pid'];\n\t\t\t\t$labels[$i]['names']=array('unbekannt');\n\t\t\t\t$em_count=0;\n\t\t\t\t$res2 = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(\n\t\t\t\t\t\t'tx_civserv_employee.em_name',\t\t\t// select\n\t\t\t\t\t\t'tx_civserv_employee', \t\t\t\t\t// local\n\t\t\t\t\t\t'tx_civserv_employee_em_position_mm',\t// mm\n\t\t\t\t\t\t'tx_civserv_position', \t\t\t\t\t// foreign\t\n\t\t\t\t\t\t' AND tx_civserv_position.uid='.$row['pos_uid'], \t// where\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\twhile ($row2 = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res2)) {\n\t\t\t\t\t$labels[$i]['names'][$em_count]=$row2['em_name'];\n\t\t\t\t\t$em_count++;\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\tforeach($labels as $label){\n\t\t\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_civserv_service_sv_position_mm', 'uid = '.intval($label['svpos_uid']), array (\"sp_label\" => $label['sv_name'].', '.$label['po_name'].' ('.implode(',',$label['names']).')', \"pid\" => $label['pid']));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "50931fec179b9ae8d43494cbbeae6e69", "score": "0.56218046", "text": "public function updateLabels()\n {\n $this->widgetSchema->setNameFormat(sprintf('%s[%%s]', $this->getName()));\n \n if ($this->getOption('required_labels'))\n {\n $this->updateRequiredLabels();\n }\n \n $this->widgetSchema->setLabels($this->labels);\n }", "title": "" }, { "docid": "bd7ba4fae69e7dbaa2e7e997ab76f6a3", "score": "0.5612202", "text": "function dataUpdate($id,$nama_profil,$judul,$provinsi,$kota,$alamat,$foto,$lokasi,$fb,$twitter,$ig,$fotox) {\n\t\t\t\t$koneksi = $this->koneksi;\n\t\t\t\t// SQL\n\t\t\t\tif(empty($fotox))\n\t\t\t\t {\n\t\t\t\t$query\t\t= \"UPDATE profil SET\n\t\t\t\t\t\t\t\tnama\t \t= '$nama_profil',\n\t\t\t\t\t\t\t\tinstansi \t= '$judul',\n\t\t\t\t\t\t\t\talamat\t\t= '$alamat',\n\t\t\t\t\t\t\t\tprovinsi\t= '$provinsi',\n\t\t\t\t\t\t\t\tkota = '$kota',\n\t\t\t\t\t\t\t\tfb \t\t\t= '$fb',\n\t\t\t\t\t\t\t\ttwitter\t\t= '$twitter',\n\t\t\t\t\t\t\t\tig \t\t\t= '$ig'\n\t\t\t\t\t\t\t WHERE id\t= '$id'\";\n\t\t\t\t\n\t\t\t\t$sql\t\t= mysqli_query($koneksi,$query);\n\t\t\t\t\n\t\t\t\t// CEK SQL\n\t\t\t\tif($sql == TRUE) {\n\t\t\t\t\treturn TRUE;\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// SQL\n\t\t\t\t\t$query2 = \"SELECT * FROM profil\";\n\t\t\t\t\t$sql2\t= mysqli_query($koneksi,$query2);\n\t\t\t\t\t$dt \t= mysqli_fetch_array($sql2);\n\n\t\t\t\t\tif($dt['logo']==\"\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$q1 \t= mysqli_query($koneksi,\"SELECT * FROM profil ORDER BY id DESC\");\n\t\t\t\t\t\t$dtx \t= mysqli_fetch_array($q1);\n\t\t\t\t\t\t$idx\t\t= $dtx['id']+1;\n\n\t\t\t\t\t\t$id_f = $idx.\"_\".$foto;\n\n\t\t\t\t\t\tmove_uploaded_file($lokasi, \"logo/\".$id_f);\n\t\t\t\t\t}else\n\t\t\t\t\t {\n\t\t\t\t\t //nama field foto\n\t\t\t\t\t\t$tag\t\t= $dt['logo'];\n\t\t\t\t\t\t// alamat folder foto\n\t\t\t\t\t\t$hapus\t\t= \"logo/$tag\";\n\t\t\t\t\t\t// script hapus gambar dari foleder\n\t\t\t\t\t\t\n\t\t\t\t\t\tunlink($hapus);\n\t\t\t\t\t\t// simpan foto baru\n\t\t\t\t\t\t$q1 \t= mysqli_query($koneksi,\"SELECT * FROM profil ORDER BY id DESC\");\n\t\t\t\t\t\t$dtx \t= mysqli_fetch_array($q1);\n\t\t\t\t\t\t$idx\t\t= $dtx['id']+1;\n\n\t\t\t\t\t\t$id_f = $idx.\"_\".$foto;\n\n\t\t\t\t\t\tmove_uploaded_file($lokasi, \"logo/\".$id_f);\n\t\t\t\t\t}\n\n\t\t\t\t$query\t\t= \"UPDATE profil SET\n\t\t\t\t\t\t\t\tnama\t \t= '$nama_profil',\n\t\t\t\t\t\t\t\tinstansi \t= '$judul',\n\t\t\t\t\t\t\t\talamat\t\t= '$alamat',\n\t\t\t\t\t\t\t\tprovinsi\t= '$provinsi',\n\t\t\t\t\t\t\t\tkota = '$kota',\n\t\t\t\t\t\t\t\tlogo\t\t= '$id_f',\n\t\t\t\t\t\t\t\tfb \t\t\t= '$fb',\n\t\t\t\t\t\t\t\ttwitter\t\t= '$twitter',\n\t\t\t\t\t\t\t\tig \t\t\t= '$ig'\n\t\t\t\t\t\t\t WHERE id\t= '$id'\";\n\t\t\t\t\n\t\t\t\t$sql\t\t= mysqli_query($koneksi,$query);\n\t\t\t\t\n\t\t\t\t// CEK SQL\n\t\t\t\tif($sql == TRUE) {\n\t\t\t\t\treturn TRUE;\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "e53ca6ad5d8e7cb2065490b1f4e70ed8", "score": "0.5611402", "text": "abstract function update();", "title": "" }, { "docid": "e53ca6ad5d8e7cb2065490b1f4e70ed8", "score": "0.5611402", "text": "abstract function update();", "title": "" }, { "docid": "4b68ae9e04edfa65d8e60083d7127c4c", "score": "0.56057525", "text": "public function testUpdateMetadata1()\n {\n }", "title": "" }, { "docid": "25183274739edbfe7f57f554ed997e05", "score": "0.5597076", "text": "function update($parent) {\n\t\techo '<p>' . JText::_('Update of DbApp') . '</p>';\n\t}", "title": "" }, { "docid": "1ecb522441ccd23502b02d24f1bb20a3", "score": "0.55968505", "text": "public function testUpdateSetting()\n {\n }", "title": "" }, { "docid": "c17c5a022b355b6be03bb8d513d0f81e", "score": "0.55949783", "text": "function label($id) {\r\n\t\t$this->data = $this->tag(\"label\", array(\"#\" => $this->data, \"for\" => $id));\r\n\t}", "title": "" }, { "docid": "edc014c7f28e7a1a891a693fc965c456", "score": "0.5592415", "text": "public function update($data)\n {\n }", "title": "" }, { "docid": "255c7e26b97dac821098cbcb6e65cddb", "score": "0.559", "text": "function set_lebals($cur_label, $value){ \n $this->label[$cur_label] = $value;\n\n }", "title": "" }, { "docid": "aa1bfc8c161287c3fa23546a32e43097", "score": "0.5585672", "text": "public function update(){//ACTUALIZAR LOS ATRIBUTOS DIRECTAMENTE EN LA BASE DE DATOS \n\t\t$sql = \"update club set \n\t\tid_conductor='\".$this->id_conductor.\"',\n\t\tentradas='\".$this->entradas.\"',\n\t\tdate_at='\".$this->date_at.\"'\n\t\twhere id='\".$this->id.\"'\";\n\t\treturn\tExecutor::doit($sql);\n\t}", "title": "" }, { "docid": "13cb8e2b8a0787aab8373597a3a60e25", "score": "0.5577998", "text": "public function update(){\n\t\t\n\t\tif ($this->_id == -1)\n\t\t\tthrow new RuntimeException(\"ClubFunction/update()\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"this object wasn't saved in database !\");\n\t\t\n\t\t$label = Database::escape($this->_label);\n\t\t$seasonId = Database::escape($this->_seasonId);\n\t\t$value = Database::escape($this->_value);\n\t\t$sql = \"UPDATE `club_function` SET \\n\";\n\t\t$sql .= \" `label` = '$label' ,\\n\";\n\t\t$sql .= \" `season_id` = '$seasonId' ,\\n\";\n\t\t$sql .= \" `value` = '$value' \\n\";\n\t\t$sql .= \" WHERE `id` = $this->_id\";\n\t\t\n\t\t$myDb = Database::getSingleton();\n\t\t$myDb->execute($sql);\n\t\n\t}", "title": "" }, { "docid": "adb10df9a4b081d706aba4a83ebec4c4", "score": "0.5577283", "text": "function accUpdate1($arr){\r\n $pCtrlID\t\t\t= $arr['pCtrlID'];\r\n \t$pCtrlCheck1 \t\t= $arr['pCtrlCheck1'];\r\n \t$pCtrlCheck2 \t\t= $arr['pCtrlCheck2'];\r\n \t$pCtrlLokal \t\t= $arr['pCtrlLokal'];\r\n \t$pCtrlSljj \t\t\t= $arr['pCtrlSljj'];\r\n \t$pCtrlSli \t\t\t= $arr['pCtrlSli'];\r\n \t$pCtrlCardFloor \t= $arr['pCardFloor'];\r\n \t$pCtrlUserType \t\t= $arr['pCtrlUserType'];\r\n \t$pCtrlUserName \t\t= $arr['pNameFor'];\r\n \t$pCtrlVendor\t\t= $arr['pDepartemenFor'];\r\n \t$pCtrlDesc \t\t\t= $arr['pCtrlDesc'];\r\n \t$pAtasanNik\t\t\t= $arr['pAtasanNik'];\r\n \t$pCtrlSik\t\t\t= $arr['pCtrlSik'];\r\n \t$pDate1\t\t\t\t= $arr['pDate1'];\r\n \t$pDate2\t\t\t\t= $arr['pDate2'];\r\n \t$pNikFor\t\t\t= $arr['pNikFor'];\r\n \t$pFloor\t\t\t\t= $arr['pFloor'];\r\n $pPhoneFisik\t\t= $arr['pPhoneFisik'];\r\n \t$pCardFisik\t\t\t= $arr['pCardFisik'];\r\n $vDate1 = $arr['vDate1'];\r\n \t$vDate2 = $arr['vDate2'];\r\n $sql \t= \"\r\n update fm_access_control set ctrl_description = '$pCtrlDesc', \r\n \t\t\t\t\t\t\t\t\t\t\t\t CTRL_ATASAN_ID = '$pAtasanNik', \r\n \t\t\t\t\t\t\t\t\t\t\t\t CTRL_DATE_AWAL = to_date('$vDate1','dd/mm/yyyy'), \r\n \t\t\t\t\t\t\t\t\t\t\t\t CTRL_DATE_AKHIR = to_date('$vDate2','dd/mm/yyyy'), \r\n \t\t\t\t\t\t\t\t\t\t\t\t CTRL_SIK_NO = '$pCtrlSik',\r\n \t\t\t\t\t\t\t\t\t\t\t\t CTRL_TELP_FISIK = '$pPhoneFisik',\r\n \t\t\t\t\t\t\t\t\t\t\t\t CTRL_CARD_FISIK = '$pCardFisik'\r\n \t\t\t\t\t where ctrl_id = '$pCtrlID'\r\n \"; \r\n //echo $sql; \r\n $query = $this->db->query($sql);\r\n }", "title": "" }, { "docid": "7d028ab3bacabbaed5efac77cadd0794", "score": "0.55749655", "text": "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" \n\t\tset name=\\\"$this->name\\\", diasmax=\\\"$this->diasmax\\\", montomax=\\\"$this->montomax\\\", is_active=$this->is_active \n\t\twhere id_perfil=$this->id_perfil\";\n\t\tExecutor::doit($sql);\n\t}", "title": "" }, { "docid": "bd4a910d670bad01407b5dc0f5acd173", "score": "0.5573211", "text": "public function update(){\n\t $a = $_POST['total_penjualan'];\n\t $b = $_POST['bonus'];\n\t $c = $a * ($b / 100);\n $data = array();\n $data['id_perusahaan'] = $_POST['id_perusahaan'];\n\t $data['id_merk'] = $_POST['id_merk'];\n\t $data['total_penjualan'] = $_POST['total_penjualan'];\n\t $data['bonus'] = $_POST['bonus'];\n\t $data['total_bonus'] = $c;\n\t $data['bulan_bonus'] = $_POST['bulan_bonus'];\n\t $data['tgl_ubah'] = date('Y-m-d H:i:s');\n\t $data['pengubah'] = $_SESSION['username'];\n\t \n $id = $_POST['id'];\n $simpan = $this->penjualan->update($data, array('id_penjualan'=>$id));\n }", "title": "" }, { "docid": "17bbdf8b5f23de76afacea00832d9ced", "score": "0.55716467", "text": "public function update();", "title": "" }, { "docid": "17bbdf8b5f23de76afacea00832d9ced", "score": "0.55716467", "text": "public function update();", "title": "" }, { "docid": "17bbdf8b5f23de76afacea00832d9ced", "score": "0.55716467", "text": "public function update();", "title": "" }, { "docid": "17bbdf8b5f23de76afacea00832d9ced", "score": "0.55716467", "text": "public function update();", "title": "" }, { "docid": "17bbdf8b5f23de76afacea00832d9ced", "score": "0.55716467", "text": "public function update();", "title": "" }, { "docid": "17bbdf8b5f23de76afacea00832d9ced", "score": "0.55716467", "text": "public function update();", "title": "" }, { "docid": "17bbdf8b5f23de76afacea00832d9ced", "score": "0.55716467", "text": "public function update();", "title": "" }, { "docid": "6a72cb5b84c85145f083ac94b46b6858", "score": "0.55700445", "text": "function update_syllabus($data, $id) {\n $this->db->update(\"smart_syllabus\", $data, array(\"syllabus_id\" => $id));\n }", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "0d4dcd8024126c9a0288723103938ae6", "score": "0.0", "text": "public function edit($id)\n {\n $soaljawaban = SoalJawaban::findOrFail($id);\n $jenisbantuan = JenisBantuan::where('id',$soaljawaban->jenis_bantuan_id)->get()->first();\n $jenisbantuans = JenisBantuan::pluck('name','id');\n $tipes = SoalJawaban::tipes();\n $bobot = SoalJawaban::where('id','!=',$id)->where('jenis_bantuan_id',$soaljawaban->jenis_bantuan_id)->pluck('bobot');\n if($bobot){\n $bob = 100;\n foreach ($bobot as $b) {\n $bob -= (int) $b;\n }\n $bobot = $bob;\n }else{\n $bobot = 100;\n }\n return view('admin.soaljawabans.form',compact('soaljawaban','jenisbantuans','jenisbantuan','bobot','tipes'));\n }", "title": "" } ]
[ { "docid": "b8b614ce042ab5ea8a3e6ef84e6e7778", "score": "0.713407", "text": "public function edit($id)\n {\n $res = Resource::find($id);\n return view('resource.edit')->withResource($res);\n }", "title": "" }, { "docid": "f2b550245f3055e9568b85c7fbb1163e", "score": "0.7120567", "text": "public function edit(int $id)\n {\n $resource = Resource::findOrFail($id);\n\n return view('admin.resource.edit', [\n 'resource' => $resource\n ]);\n }", "title": "" }, { "docid": "361abed2cb852975c0683ccd26ce7d82", "score": "0.70657694", "text": "public function edit($id)\n {\n $data['module'] = array_merge($this->module(),[\n 'action' => 'update'\n ]);\n $data['data'] = Resources::findOrFail($id);\n return view(\"backend.{$this->module()['module']}.create-edit\", $data);\n }", "title": "" }, { "docid": "891c210c201321a89e1c31a5c64a0477", "score": "0.70210785", "text": "public function edit($id)\n {\n //FormEditar\n $professor = Professor::find($id);\n $action = route('professor.update', $professor->id);\n return view('admin.professores.form', compact('professor', 'action'));\n }", "title": "" }, { "docid": "400de17791b9ff6da093a138ebf4ccdc", "score": "0.70019853", "text": "public function edit($id)\n {\n $resource = Resource::findOrFail($id);\n\n return view('admin.resources.edit', [\n 'resource' => $resource,\n 'teachers' => Teacher::all(),\n 'courses' => Course::all(),\n 'types' => Type::all()\n ]);\n }", "title": "" }, { "docid": "96884a0d55f36349b743e3d913248156", "score": "0.70006657", "text": "function edit()\n {\n $this->_view_edit('edit');\n }", "title": "" }, { "docid": "b7a9dbd94e4c376397338c3286f585f3", "score": "0.6979171", "text": "public function action_edit() {\n $article_id = $this->request->param('id');\n $article = new Model_Article($article_id);\n\n $this->template->title = \"Editar Art&iacute;culo\";\n $this->template->content = View::factory('article/dashboard/form')\n ->bind('article', $article);\n }", "title": "" }, { "docid": "54bd15e9dccbc11ab9791830a78b15b6", "score": "0.69532436", "text": "public function edit($id) {\n $viewData = $this->getDefaultFormViewData();\n $viewData[\"mode\"] = \"edit\";\n $viewData[\"supplier\"] = Supplier::find($id);\n\n return view(\"{$this->viewPath}.form\", $viewData);\n }", "title": "" }, { "docid": "989918b39caf8ede67ab11ef4dc4a651", "score": "0.69339967", "text": "public function editresourceAction() {\n\t\t$resourceid = $this->_request->getParam('resourceid');\n\t\t$srlink = new StudentResourceLink();\n\t\t$select = $srlink->select()->where($srlink->getAdapter()->quoteInto('auto_id = ?', $resourceid));\n\t\t$rows = $srlink->fetchAll($select);\n\t\t$therow = null;\n\t\tforeach ($rows as $row) {\n\t\t\t$therow=$row;\n\t\t}\n\t\t//print_r($therow);\n\t\t$this->view->resourcelink = $therow;\n\t\t\n\t\t$mediabankUtility = new MediabankUtility();\n\t\tob_start();\n\t\t$mediabankUtility->curlDownloadResource($therow['mid'],false);\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\t\t$this->view->content = $content;\t\t\n\t\t$this->view->redirect_to = $_SERVER[\"HTTP_REFERER\"];\n\t\tStudentResourceService::prepStudentResourceView($this, $this->_request, $therow->loid);\n\t\tif($therow['category']=='Summary') //summary has been stripped out since a summary exists; add it back in if this one is a summary\n\t\t\t$this->view->studentResourceCategories[6]='Summary';\n\t}", "title": "" }, { "docid": "60cbf7aaa1aa0791c0914ed1dcab803f", "score": "0.6928311", "text": "public function edit($id) {\n $resource = static::$resource::findOrFail($id);\n return view($this->getView('edit'), [static::$varName[0] ?? $this->getResourceName() => $resource]);\n }", "title": "" }, { "docid": "d7aa2e5a119120de3c3ba215c6a55f12", "score": "0.6926486", "text": "public function showEdit($id)\n {\n $form = $this->singleRow($id);\n return view('forms.edit', compact('form'));\n }", "title": "" }, { "docid": "18527251f9ef186ce3fe75e5b272924a", "score": "0.69218755", "text": "public function edit()\n {\n return view('rms::edit');\n }", "title": "" }, { "docid": "18527251f9ef186ce3fe75e5b272924a", "score": "0.69218755", "text": "public function edit()\n {\n return view('rms::edit');\n }", "title": "" }, { "docid": "c9421b4fa4aa3c3e040943555db34250", "score": "0.6921793", "text": "public function editAction() {\n // get contact id from request params (get param)\n $id = $this->route_params[\"id\"];\n // if id is invalid redirect to 404 page\n if (filter_var($id, FILTER_VALIDATE_INT) === false) {\n $this->show404();\n return;\n }\n\n $contact_obj = new Contact();\n // find the contact details by id\n $contact = $contact_obj->findById($id);\n\n if ($contact == false) {\n //set error message in session\n $_SESSION[\"error_message\"] = \"Contact not found or deleted\";\n // redirect to show all contacts if contacts not found\n header(\"Location: /contacts\");\n return;\n }\n // render the edit form \n View::renderTemplate(\"contacts/edit.twig.php\", [\n \"contact\" => $contact\n ]);\n }", "title": "" }, { "docid": "6bfd6ee5429b006ef8ac6c80e55dd39b", "score": "0.6914203", "text": "public function edit($id)\n {\n $oItem = $this->oRepository\n ->getFillFromView($this->sPath.'/form')\n ->find($id);\n \n $sPageTitle = $this->sName;\n \n return view($this->sPath.'/form', compact('oItem','sPageTitle'));\n }", "title": "" }, { "docid": "993ec48b05f84a94a2a0a460cccbede3", "score": "0.68929994", "text": "public function editAction() {\n\t\t$this->loadLayout(); \n\t\t$this->renderLayout();\n\t}", "title": "" }, { "docid": "0602544d24c996605ea507ebb7ee3e56", "score": "0.6878878", "text": "public function edit($id)\n\t{\n return $this->showForm( $id, 'update' );\n\t}", "title": "" }, { "docid": "a71e27a959041b3dc97b873e60de94e7", "score": "0.68629944", "text": "public function showEditForm()\n {\n return view('profile.edit');\n }", "title": "" }, { "docid": "701c592af1d277babf262ba31d833e6d", "score": "0.6843164", "text": "public function edit()\n {\n return view('fehome::edit');\n }", "title": "" }, { "docid": "d38180038ed5b6fde7cb6b7829d278fc", "score": "0.6835701", "text": "public function edit()\n {\n JRequest::setVar( 'view', 'actions' );\n JRequest::setVar( 'layout', 'form' );\n JRequest::setVar( 'hidemainmenu', 1 );\n\n parent::display();\n }", "title": "" }, { "docid": "a695b4f4340bb78a765476c7a7b02c4c", "score": "0.68351203", "text": "public function edit()\n {\n return view('clientapp::edit');\n }", "title": "" }, { "docid": "1816939dd0a3de7ecf446799caf8016c", "score": "0.68238723", "text": "public function edit($id)\n {\n $data = $this->model->findOrFail($id);\n\n View::share(\"data\", $data);\n View::share(\"pageTitle\", $this->pageTitle);\n View::share(\"pageUrl\", $this->pageUrl);\n View::share(\"formFields\", $this->form->getFields());\n return View::make('admin.form.form');\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.68047357", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.68047357", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.68047357", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "06c02e9061fd35c64388a48995f01327", "score": "0.6796334", "text": "public function edit($id)\n\t{\n\t\t//\n\t\t$resource = \\App\\Resource::find($id);\n\n\n\t\t$categories = \\App\\Category::lists('name','id');\n\n\t\treturn view('editResource', array( 'resource' => $resource , 'categories'=>$categories) );\n\t}", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "d2626096b25b928d4917d532209d348f", "score": "0.67897326", "text": "public function editAction()\n {\n Zend_Controller_Action_HelperBroker::removeHelper('Layout');\n\n $id = $this->_getParam(\"id\");\n $question = $this->em()->find(\"\\Classified\\Entity\\Question\", $id);\n $this->view->question = $question->getArrayCopy();\n }", "title": "" }, { "docid": "66cbaef1a04d9a9869e113dad5721e8f", "score": "0.67836845", "text": "public function edit()\n {\n return view('admin.control.modify.edit');\n }", "title": "" }, { "docid": "0fdfb7896627d57b20ef6a7a133e9ab6", "score": "0.67780584", "text": "public function edit()\n {\n return view('endproject::edit');\n }", "title": "" }, { "docid": "8ca6a3fffdb80c62aabbae4f640f1300", "score": "0.6762604", "text": "public function edit()\n {\n return view('mobileapi::edit');\n }", "title": "" }, { "docid": "8202b11a0ebab1ee33526e691e4d3eed", "score": "0.6755838", "text": "public function edit()\n {\n return view('frontend.edit');\n }", "title": "" }, { "docid": "4e09d9c17a6aceefb0b461c0178bb595", "score": "0.6745991", "text": "public function edit(Form $form)\n {\n $this->authorize('view', $form);\n return view('forms.edit')->with(['form' => $form]);\n }", "title": "" }, { "docid": "e8b8e4e6e0de5334c231638d9e5edaec", "score": "0.67336184", "text": "public function editAction()\n {\n $package = $this->_helper->db->findById();\n $form = $this->_getForm($package);\n $this->view->form = $form;\n $this->_processPackageForm($package, $form, 'edit');\n }", "title": "" }, { "docid": "bd2fa3091bd5f4d5d7131993954714c6", "score": "0.6730772", "text": "public function editForm($id) {\n $form = Form::find($id);\n return view('admin/edit')->with(compact('form'));\n }", "title": "" }, { "docid": "45d14265a720e166c9faaffd3c7c749b", "score": "0.67299604", "text": "public function actionEdit()\n\t{\n\t \t// render the template, pass model on render template\n \t$this->renderTemplate('weatheroots/_edit');\n\t}", "title": "" }, { "docid": "98d7ef7a4eb9037da08b3ceca30156a2", "score": "0.6724361", "text": "public function edit()\n {\n return view('psb::edit');\n }", "title": "" }, { "docid": "36e81b336316946d6eebd6bc3678ef52", "score": "0.67227334", "text": "public function edit($id)\r\n {\r\n return view('superadmin::edit');\r\n }", "title": "" }, { "docid": "cc3ac1fb298eb2529737eea416d7a6cb", "score": "0.6717319", "text": "public function edit($id)\n {\n // get the product\n $product = Product::find($id);\n \n // show the edit form and pass the product\n return view('admin.edit')->with('product', $product);\n }", "title": "" }, { "docid": "2b96e953246fda0c5243448568a7c515", "score": "0.67088807", "text": "public function edit($id)\n {\n $entreprise = Entreprise::find($id);\n return view('entreprises.formEdit', ['entreprise' => $entreprise]);\n }", "title": "" }, { "docid": "5512bd5309a80dffa55b5a64d0cf3063", "score": "0.66912645", "text": "public function editForm($id)\n {\n /* Check if instance exists, will throw if not existing */\n $homework = $this->homework->findOrFail($id);\n\n /* If current user is the owner or has permission for this action */\n if( Auth::user()->id !== $homework->author && !Auth::user()->has('edit-homework') )\n return $this->notFound();\n\n $subjects = $this->subject->options();\n\n return View::make('edit-homework')\n ->with('title', 'Huiswerk bewerken')\n ->with('homework', $homework)\n ->with('subjects', $subjects);\n }", "title": "" }, { "docid": "c4c379abb53b2ca3c6d6cbd170b55609", "score": "0.6686614", "text": "public function edit($id)\n {\n \n \t$model = $this->user->find($id);\n return view('dashboard.model.form', ['modelId'=>$id, 'model'=>$model]);\n }", "title": "" }, { "docid": "e12e61afec6117ea96b6103dec4dfafb", "score": "0.66596234", "text": "public function edit($id)\n {\n return view('post::forms');\n }", "title": "" }, { "docid": "aecac872c5871a37f7794940474724af", "score": "0.6651918", "text": "public function edit($id)\n\t{\n\t\t//\n\t\t$employee = Employee::find($id);\n\t\treturn view('employee.edit')->with('employee', $employee);\n\t}", "title": "" }, { "docid": "5abc6953fae7162215480b7a9fef57c1", "score": "0.66518015", "text": "public function edit()\n {\n return view('collection::edit');\n }", "title": "" }, { "docid": "f03c98b1ded6cb4c6e6e2fc27daed613", "score": "0.66491336", "text": "public function edit(Question $question)\n {\n $this->authorize('update',$question);//update name is taken from questionpolicy.\n return view('questions.edit',compact('question'));\n }", "title": "" }, { "docid": "b8d8f7bcf858b30b9d3fd07cde03c478", "score": "0.66466177", "text": "public function edit($id)\n {\n return view('pemilih::edit');\n }", "title": "" }, { "docid": "f7bd52c4216f50ae40e29aa9291a3153", "score": "0.66463226", "text": "public function edit($id) {}", "title": "" }, { "docid": "63f1e37a24aa6def21bcc055ba5d03fa", "score": "0.66368926", "text": "public function edit($id)\n {\n $emprestimo = Emprestimo::findOrFail($id);\n return view('emprestimos.form', compact('emprestimo'));\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6627662", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "34b21fe71b4142863d1302f360b4a15e", "score": "0.66252655", "text": "public function editAction()\n {\n View::renderTemplate('Profile/edit.html.twig', [\n 'user' => $this->user\n ]);\n }", "title": "" }, { "docid": "0132281e923c663960827a2dba422346", "score": "0.6624558", "text": "public function edit(form $form)\n {\n return view('forms.edit',compact('form'));\n }", "title": "" }, { "docid": "c5e6fb8c3a6f53103bcd8c305c0be357", "score": "0.6624066", "text": "public function edit(Family $family)\n {\n return view('humanresources::edit');\n }", "title": "" }, { "docid": "892b227aa26c3b6d3701690609dfa3a0", "score": "0.662098", "text": "public function edit($id)\n {\n $this->data['titlePage'] = trans('admin.obj_edit',['obj' => trans('admin.'.$this->titleSingle)]);\n $breadcrumbs = array();\n $breadcrumbs[] = [ 'title' => trans('admin.home'), 'link' => route($this->routeRootAdmin), 'icon' => $this->iconDashboard ];\n $breadcrumbs[] = [ 'title' => trans('admin.'.$this->titlePlural), 'link' => route(GetRouteAdminResource($this->resourceRoute)), 'icon' => $this->iconMain ];\n $breadcrumbs[] = [ 'title' => $this->data['titlePage'], 'icon' => $this->iconEdit ];\n $this->data['breadcrumbs'] = $breadcrumbs;\n\n $this->data['data'] = $this->model->find($id);\n\n return view(GetViewAdminResource($this->resourceView, 'edit'))->with($this->data);\n }", "title": "" }, { "docid": "223a4b2e951b2071b1a916b352d3f758", "score": "0.66207314", "text": "public function edit($id)\n {\n $columns = $this->columnsExtractor->getUpdateFormFields($this->columnParams);\n $entity = $this->getEntity($id);\n $mediaExtractor = new MediaExtractor($entity);\n\n return view(AdminGeneratorServiceProvider::VIEWS_NAME . '::forms.edit')\n ->with([\n 'columns' => $columns,\n 'entity' => $entity,\n 'titleSingular' => $this->titleSingular,\n 'titlePlural' => $this->titlePlural,\n 'url' => $this->getUrl(),\n 'mediaExtractor' => $mediaExtractor,\n ]);\n }", "title": "" }, { "docid": "2632981557af6d87fc0ef718c76a60a5", "score": "0.6616139", "text": "public function edit($id)\n\t{\n\t\t//\n\t\treturn View::make('invfor.edit');\n\n\t}", "title": "" }, { "docid": "e7eb022f99d007266654247f8c875bb2", "score": "0.6612846", "text": "public function edit()\n {\n return view('leaveapplication::edit');\n }", "title": "" }, { "docid": "73eac20ddaa6b78ea1224540dfac5019", "score": "0.6609262", "text": "public function edit($id)\n {\n $record = Record::findOrFail($id);\n return view('admin.edit', compact('record'));\n\n }", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "e937eaa0e0fcf089865103d5fbd26d96", "score": "0.6606668", "text": "public function edit($id)\n\t{\n\t\t$data = $this->model->find($id);\n\t\t$session = $this->session;\n\t\t$form = $this->formLocation;\n\t\treturn view('kabupaten.edit',compact('form','session','data'));\n\t}", "title": "" }, { "docid": "2790693179bc50aeb55e8cf2863210a1", "score": "0.66045636", "text": "public function editAction()\n {\n $this->_forward('new');\n }", "title": "" }, { "docid": "7ab95f92e0c5336dc4c9bac9947d8e10", "score": "0.6604002", "text": "public function edit($id)\n\t{\n\t\t$form = \\View::make('milestone.form');\n\t\t$form->milestone = Milestone::find($id);\n\t\t$form->action = array('action' => array('Toomdrix\\Pm\\MilestoneController@update', $form->milestone->id),'class'=>'form-signup');\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "eda065f96a6d12f0f767633c98f9c541", "score": "0.6597777", "text": "public function edit($id)\n\t{\n\t\t$model = Proyecto::find($id);\n\t\tif (is_null ($model)){\n\t\t\tApp::abort(404);\n\t\t}\n\n\t\t$form_data = array('route' => array('admin.proyectos.update', $model->id), 'method' => 'PATCH');\n $actionName = 'Editar';\n $action = 'edit';\n $estadoid = 'disabled';\n $modelsName = 'proyectos';\n $proyectosSelect = null;\n return View::make('admin/layoutform', compact('model', 'form_data', 'modelsName', 'action', 'actionName', 'estadoid', 'proyectosSelect'));\n\t}", "title": "" }, { "docid": "203016e427fa0c848cb2dfcb175f5f26", "score": "0.65909845", "text": "public function edit($id)\n\t{\n\t\t//\n\t\treturn \"Se muestra formulario para editar Fabricante con id: $id\";\n\t}", "title": "" }, { "docid": "f8aee712021a0a05cbe7c94c60ca6d93", "score": "0.6588382", "text": "public function edit($id) {\n //\n $resource = Resource::find($id);\n return back()->with('editresource',$resource);\n }", "title": "" }, { "docid": "86d1f75f514c3b131adae0c8cebb7e03", "score": "0.6585817", "text": "public function edit($id) {\n $job = Job::where('id', $id)->first();\n\n return view('forms.editJobForm', ['job' => $job]);\n }", "title": "" }, { "docid": "7baa4af537e518c08847e96779f42d77", "score": "0.65843874", "text": "public function edit($id)\n {\n $major = Major::where('id', '=', $id)->first();\n return view('admin.major.form', ['major' => $major]);\n }", "title": "" }, { "docid": "63b009873bce5c7c95fc27d34eb2c977", "score": "0.6583854", "text": "public function edit($id)\n\t{\n\t\t// get the genero\n\t\t$genero = Genero::find($id);\n\n\t\t// show the edit form and pass the genero\n\t\t$this->layout->content = View::make('genero.edit')\n\t\t\t->with('genero', $genero);\n\t}", "title": "" }, { "docid": "2036ec29cbad4ebb5c2e9ffca9c418ae", "score": "0.65807027", "text": "public function edit($id)\n\t{\n\t\t$oficina = Oficina::findOrFail($id);\n\n\t\treturn view('admin.oficinas.edit', compact('oficina'));\n\t}", "title": "" }, { "docid": "bbd0cad2e80812e64ded040020148d94", "score": "0.6580386", "text": "public function edit()\n {\n $jobId = Helper::getIdFromUrl('job');\n $job = JobModel::load()->get($jobId);\n\n Helper::checkIdsFromSessionAndUrl($job->user_id);\n\n View::render('jobs/edit.view', [\n 'method' => 'POST',\n 'action' => '/job/' . $jobId . '/update',\n 'job' => $job\n ]); \n }", "title": "" }, { "docid": "a6c6b148776a004b9feea4845a365f72", "score": "0.65799844", "text": "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "title": "" }, { "docid": "ff31c9fe6a0066f10f83d40443f2a001", "score": "0.65770376", "text": "public function edit($id, Request $request)\n {\n $resource = $this->resources->findOrFail($id);\n\n $category = $this->categories->findBySlug(Category::SLUG_RESOURCES);\n\n abort_unless($category, 404);\n\n $categoryId = $request->query('category_id', null);\n if ($categoryId) {\n $resource->category_id = $categoryId;\n }\n\n $categories = $this->categories->getChildrenByParent($category);\n $authors = $this->authors->all();\n $statuses = Resource::getAllStatuses();\n\n return view('spark::kiosk.resource.edit', compact('resource', 'categories', 'authors', 'statuses'));\n }", "title": "" }, { "docid": "5d95ad49eb9dde72f7bad4139e934d2a", "score": "0.6575461", "text": "public function edit(Product $product)\n {\n //\n return $this->formView($product);\n }", "title": "" }, { "docid": "32a2288a9719adb61281e330dcfcb6be", "score": "0.6572076", "text": "public function edit()\n {\n return view('post::edit');\n }", "title": "" }, { "docid": "87f80527ccf944a69125ffa41418e52d", "score": "0.656931", "text": "public function edit()\n {\n return view('inventory::edit');\n }", "title": "" }, { "docid": "87f80527ccf944a69125ffa41418e52d", "score": "0.656931", "text": "public function edit()\n {\n return view('inventory::edit');\n }", "title": "" }, { "docid": "87f80527ccf944a69125ffa41418e52d", "score": "0.656931", "text": "public function edit()\n {\n return view('inventory::edit');\n }", "title": "" }, { "docid": "ce8838daca364c19746373e3d442ca46", "score": "0.65663105", "text": "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "title": "" }, { "docid": "5612f7342c86406c173280e0606947ef", "score": "0.65648115", "text": "public function editAction(){\n $this->title = 'Edit privilege';\n \n $form = new PrivilegeForm();\n $privilegeModel = new Privilege();\n \n if($this->getRequest()->isPost()){\n if($form->isValid($this->getRequest()->getPost())){\n $privilegeModel->save($form->getValues());\n $this->_helper->FlashMessenger(\n array(\n 'msg-success' => 'The privilege was successfully edited.',\n )\n );\n \n //Regenerate Flag and Flippers\n App_FlagFlippers_Manager::save();\n \n $this->_redirect('/privileges/');\n }\n }else{\n $id = $this->_getParam('id');\n \n if (!is_numeric($id)) {\n $this->_helper->FlashMessenger(\n array(\n 'msg-error' => 'The provided privilege_id is invalid.',\n )\n );\n \n $this->_redirect('/privileges/');\n }\n \n $row = $privilegeModel->findById($id);\n \n if (empty($row)) {\n $this->_helper->FlashMessenger(\n array(\n 'msg-warning' => 'The requested privilege could not be found.',\n )\n );\n \n $this->_redirect('/privileges/');\n }\n \n $form->populate($row->toArray());\n $this->view->item = $row;\n }\n \n $this->view->form = $form;\n }", "title": "" }, { "docid": "5775aa0e917620a07289496795e159aa", "score": "0.6558975", "text": "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CabinetPatientBundle:Patient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Patient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CabinetPatientBundle:Patient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "5a4fa29c8ead075ce097e439b6230e7f", "score": "0.6557373", "text": "public function edit() {\n return view('page::edit');\n }", "title": "" }, { "docid": "7036da046bffbfc19788a64f352479f1", "score": "0.6556628", "text": "public function edit($id)\n {\n $this->data['mode'] = 'edit';\n $this->data['headline'] = 'Update Informtation';\n $this->data['button'] = 'Update';\n\n $this->data['categories'] = Category::arrayForSelect();\n $this->data['product'] = Product::findorfail($id);\n\n return view('products.form',$this->data);\n }", "title": "" }, { "docid": "ecfdd631006d8c344ce9b93aee1f9efe", "score": "0.65558314", "text": "public function editForm($id)\n\t {\n\t \t$page = Page::find($id);\n\n\t \tif(!$page)\n\t \t{\n\t \t\tApp::abort(404);\n\t \t}\n\n\t \treturn View::make('admin.pages.edit')->with(array(\n\t \t\t'title' => $page->title,\n\t \t\t'page' => $page,\n\t \t\t'breadcrumb' => array('edit-page', array($page))\n\t \t));\n\t }", "title": "" }, { "docid": "b1e091bc34289ce5815c7d0b31f9819f", "score": "0.6555672", "text": "public function edit()\n {\n return view('penerimaanbarangpo::edit');\n }", "title": "" }, { "docid": "1bf97160345191ce099650d7d6e00526", "score": "0.6553838", "text": "public function edit($id)\n {\n $formulario = Formulario::find($id);\n\n return view('formulario/edit')->with('formulario', $formulario);\n }", "title": "" }, { "docid": "b1a3f3ce92584deb6d9ca02e12c64273", "score": "0.654789", "text": "public function edit($id)\n\t{\n return View::make('qualimandroids.edit');\n\t}", "title": "" }, { "docid": "151edb16858cb744e42ff9328609d7c5", "score": "0.65452754", "text": "public function edit($id)\n {\n $info = $this->tableService->find($id);\n return view('backend.table.form',compact('info'));\n }", "title": "" }, { "docid": "5bfd503c4d418b21289e0965a996d9ce", "score": "0.6544858", "text": "public function edit($id)\n\t{\n return View::make('documentos.edit');\n\t}", "title": "" }, { "docid": "6570633357464ecea69f2020f246786b", "score": "0.654094", "text": "private function editForm($id) {\n\n $this->getView($id);\n }", "title": "" }, { "docid": "63bf6338921c0ecb6e450b96aa113d99", "score": "0.653981", "text": "public function edit($id) {\n $viewData = $this->getDefaultViewData();\n $viewData[\"salesInvoice\"] = SalesInvoice::find($id);\n $viewData[\"mode\"] = \"EDIT\";\n\n return view('pages.sales-invoices.form', $viewData);\n }", "title": "" }, { "docid": "f45506e1eb4c9818c7c6486f9f220b97", "score": "0.65383214", "text": "public function edit($id)\n {\n //see modal controller\n }", "title": "" }, { "docid": "f45506e1eb4c9818c7c6486f9f220b97", "score": "0.65383214", "text": "public function edit($id)\n {\n //see modal controller\n }", "title": "" }, { "docid": "d42a538a54c180b9f8f4959cb25a5052", "score": "0.65358734", "text": "public function edit()\n {\n return view('codeeduuser::edit');\n }", "title": "" }, { "docid": "0d90167849667f1948aae3e6235e54d6", "score": "0.65328497", "text": "public function edit($id)\n {\n $data = $this->main_model->findOrFail($id);\n $validator = JsValidator::formRequest('App\\Http\\Requests\\\\' . $this->validate);\n return view($this->view . '.edit')->with(compact('validator', 'data'));\n\n }", "title": "" }, { "docid": "84d9018597a19c73dbebf5d06a3be9a2", "score": "0.65322036", "text": "public function edit($id)\n {\n //\n $enterprise= enterprise::find($id);\n return view('Enterprise.edit',compact('enterprise'));\n }", "title": "" }, { "docid": "947653e61d0da11a491ac8f8ab4c2834", "score": "0.6529227", "text": "public function edit($id)\n {\n $requicisao = $this->requicisaoRepository->find($id);\n\n if (empty($requicisao)) {\n Flash::error(__('messages.not_found', ['model' => __('models/requicisaos.singular')]));\n\n return redirect(route('requicisaos.index'));\n }\n\n return view('requicisaos.edit')->with('requicisao', $requicisao);\n }", "title": "" }, { "docid": "8720fc9c034d2db005346ebf128debb7", "score": "0.6529178", "text": "public function edit($id)\n {\n $worker=Worker::find($id);\n return view('Worker.updateform')->with('worker',$worker);\n }", "title": "" }, { "docid": "3cc92efd165a27a9567115e63d5afc4f", "score": "0.65289825", "text": "public function edit($id)\n {\n //formulario que permite modificar los datos \n }", "title": "" }, { "docid": "003b6711d6f29181a45b0161a4d2d580", "score": "0.65280944", "text": "public function edit($id)\n {\n $this->view->line = $this->model->edit($id);\n $this->view->render($this->path . '/edit');\n \n }", "title": "" }, { "docid": "1f1fbaf4a6b16a7929b4ed49489555ed", "score": "0.6526529", "text": "public function edit($id)\n {\n $model = Kain::findOrFail($id);\n return view('adminstok.stokkain.form', compact('model'));\n }", "title": "" }, { "docid": "3879ef1057cb6d800b8feacf86ae0303", "score": "0.652171", "text": "public function actionEdit()\t\n\t{\t\t\t\t\t\t\n\t\t$id = trim($_POST['id']);\n\t\t\t\t\t\t\n\t\t$this->renderPartial($id,array('model'=>$model));\t\n\t}", "title": "" } ]
bd1a9b2abff5c006fb433353ccadc1c5
Sets Time Periods. A list of [iCalendar (RFC 5545) events]( (`VEVENT`). Each event represents an available time period per day or days of the week. A day can have a maximum of one available time period. Only `DTSTART`, `DURATION`, and `RRULE` are supported. `DTSTART` and `DURATION` are required and timestamps must be in local (unzoned) time format. Include `RRULE` to specify recurring promotions, an end date (using the `UNTIL` keyword), or both. For more information, see [Available time]( Note that `BEGIN:VEVENT` and `END:VEVENT` are optional in a `CreateLoyaltyPromotion` request but are always included in the response.
[ { "docid": "863a47093c5e25e819f7f911f17e4293", "score": "0.564826", "text": "public function setTimePeriods(array $timePeriods): void\n {\n $this->timePeriods = $timePeriods;\n }", "title": "" } ]
[ { "docid": "e68678557f662ef60430a5a7da532110", "score": "0.5281138", "text": "public function getNewsEventsByPeriod($options = array())\n\t{\n\t\t/* Check integrety of input */\n\t\tif (empty($options))\n\t\t\tthrow new Exception( 'The options given is empty ' );\n\t\t\n\t\tif (!array_key_exists('view', $options))\n\t\t\tthrow new Exception('Required \\'view\\' argument in Option missing.');\t\t\t\n\t\t\n\t\tif (!array_key_exists('time', $options))\n\t\t\tthrow new Exception('Required \\'time\\' argument in Option missing.');\n\t\t\n\t\t$time\t= $view\t=\t$result_content_type\t= null;\n\t\t\n\t\t/* Retrieve values */\n\t\t$view\t\t\t\t\t=\tgetArrayVar($options, 'view', Point_Model_NewsEvents::VIEW_MONTH);\n\t\t$time\t\t\t\t\t=\tgetArrayVar($options, 'time', strtotime($view));\t\t// Use current time if none is specified\n\t\t$result_content_type\t=\tgetArrayVar($options, 'result', Point_Model_NewsEvents::RESULT_BOTH);\t\t// Use current time if none is specified\n\t\t\n\t\t/* Get period */\n\t\t$start_time\t\t\t\t= date('Y-m-d h:i:s',$time);\n\t\t$end_time\t\t\t\t= date('Y-m-d h:i:s',strtotime('+1 '. $view, $time));\n\n//\t\tvp($start_time);\n//\t\tvp($end_time);\n\n\t\t$events_obj\t\t\t\t= $this->_get_events_model();\n\t\t$news_obj\t\t\t\t= $this->_get_news_model();\n\t\t\n\t\t/* Get the news */\n\t\t$news_result\t\t\t= $news_obj->getNewsByPeriod($start_time, $end_time);\t\n\t\t\n\t\t/* Get the events */\n\t\t$events_result\t\t\t= $events_obj->getEventsWithinRange($start_time, $end_time);\t\n\t\n\t\t/* Generate the Navigation */\n\t\t$view_obj\t\t\t\t= Zend_Controller_Front::getInstance()->getParam('bootstrap')->getResource('view');\n\t\t//Monthly\n\t\t$monthly_nav\t\t\t= array('href' \t=> $view_obj->fullUrl(array('controller' => 'events', 'action' => 'month', 'ojo' => strtotime($start_time))),\n\t\t\t\t\t\t\t\t\t\t'title'\t=> 'View by month',\n\t\t\t\t\t\t\t\t\t\t'name'\t=> 'Months',\n\t\t\t\t\t\t\t\t\t\t'action'=> 'month');\n\t\t//Weekly\n\t\t$weekly_nav\t\t\t\t= array('href' \t=> $view_obj->fullUrl(array('controller' => 'events', 'action' => 'week', 'ojo' => strtotime($start_time))),\n\t\t\t\t\t\t\t\t\t\t'title'\t=> 'View by week',\n\t\t\t\t\t\t\t\t\t\t'name'\t=> 'Weeks',\n\t\t\t\t\t\t\t\t\t\t'action'=> 'week');\n\t\t//Daily\n\t\t$daily_nav\t\t\t\t= array('href' \t=> $view_obj->fullUrl(array('controller' => 'events', 'action' => 'day', 'ojo' => strtotime($start_time))),\n\t\t\t\t\t\t\t\t\t\t'title'\t=> 'View by day',\n\t\t\t\t\t\t\t\t\t\t'name'\t=> 'Days',\n\t\t\t\t\t\t\t\t\t\t'action'=> 'day');\n\t\t\n\t\t$side_url_result\t\t= array('day'\t=> $daily_nav,\n\t\t\t\t\t\t\t\t\t\t'week'\t=> $weekly_nav,\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t'month'\t=> $monthly_nav);\n\t\t\n\t\t/* remove current view */\n\t\tunset($side_url_result[$view]);\n\t\t\n\t\treturn array(\n\t\t\t\t'news'\t\t=> $news_result,\n\t\t\t\t'events'\t=> $events_result,\n\t\t\t\t'side_url'\t=> $side_url_result,\n\t\t\t\t'time'\t\t=> $time\n\t\t);\n\t}", "title": "" }, { "docid": "ddb4324849f46d1cbe2f15aa502a30da", "score": "0.52202404", "text": "public function getTimeperiods()\n {\n $query = \"SELECT $this->attributesSelect FROM timeperiod\";\n $stmt = $this->backendInstance->db->prepare($query);\n $stmt->execute();\n $this->timeperiods = $stmt->fetchAll(PDO::FETCH_GROUP | PDO::FETCH_UNIQUE | PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "36757eba46185a7379ebc35f270ecc49", "score": "0.5115687", "text": "protected function getTimePeriods() {\n return array(\n '604800', //7 days \n '2678400', //31 days\n '15552000' //180 dats\n );\n }", "title": "" }, { "docid": "f4d5ba0be3dfc6a6626c65bdac0ae4ae", "score": "0.510877", "text": "function timesheet_set($data)\n\t{\n\t\t$set = array();\n\t\tlist($id,$recurrence) = explode(':',$data['id']);\n\t\tif ((int)$id && ($event = $this->read($id,$recurrence)))\n\t\t{\n\t\t\t$set['ts_start'] = $event['start'];\n\t\t\t$set['ts_title'] = $this->link_title($event);\n\t\t\t$set['start_time'] = egw_time::to($event['start'],'H:i');\n\t\t\t$set['ts_description'] = $event['description'];\n\t\t\tif ($this->isWholeDay($event)) $event['end']++;\t// whole day events are 1sec short\n\t\t\t$set['ts_duration']\t= ($event['end'] - $event['start']) / 60;\n\t\t\t$set['ts_quantity'] = ($event['end'] - $event['start']) / 3600;\n\t\t\t$set['end_time'] = null;\t// unset end-time\n\t\t\t$set['cat_id'] = (int)$event['category'];\n\n\t\t\tforeach(egw_link::get_links('calendar',$id,'','link_lastmod DESC',true) as $link)\n\t\t\t{\n\t\t\t\tif ($link['app'] != 'timesheet' && $link['app'] != egw_link::VFS_APPNAME)\n\t\t\t\t{\n\t\t\t\t\t$set['link_app'][] = $link['app'];\n\t\t\t\t\t$set['link_id'][] = $link['id'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $set;\n\t}", "title": "" }, { "docid": "41c00590cbb14c38f0445c422c9efcb4", "score": "0.49417257", "text": "public function getTimePeriods(): array\n {\n return $this->timePeriods;\n }", "title": "" }, { "docid": "46e33845f805fcd17ae4c24c398fab0e", "score": "0.49041247", "text": "public function createFromDatePeriodProvider()\n {\n $start[0] = new DateObject('2021-05-01');\n $end[0] = new DateObject('2021-11-01');\n $interval[0] = new DateIntervalObject('P1M');\n $option[0] = 0;\n\n //end is DateObject option EXCLUDE_START_DATE\n $start[1] = new DateObject('2021-05-01');\n $end[1] = new DateObject('2021-11-01');\n $interval[1] = new DateIntervalObject('P1M');\n $option[1] = DatePeriod::EXCLUDE_START_DATE;\n\n //end is recurrence option 0\n $start[2] = new DateObject('2021-05-01');\n $end[2] = 9;\n $interval[2] = new DateIntervalObject('P1M');\n $option[2] = 0;\n\n //end is recurrence option EXCLUDE_START_DATE\n $start[1] = new DateObject('2021-05-01');\n $end[1] = 9;\n $interval[1] = new DateIntervalObject('P1M');\n $option[1] = DatePeriod::EXCLUDE_START_DATE;\n\n return array_map(\n function (\n $start,\n $interval,\n $end,\n $option,\n ) {\n return [\n new DatePeriod(\n $start->toDateTimeImmutable(),\n $interval->toDateInterval(),\n is_int($end) ?\n $end :\n $end->toDateTimeImmutable(),\n $option,\n ),\n $option,\n new DatePeriod(\n $start->toDateTimeImmutable(),\n $interval->toDateInterval(),\n is_int($end) ?\n $end :\n $end->toDateTimeImmutable(),\n $option,\n ),\n ];\n },\n $start,\n $interval,\n $end,\n $option,\n );\n }", "title": "" }, { "docid": "e2603fae42342a2e3e3e96c31cc7f665", "score": "0.48813608", "text": "function get_times($starttime,$endtime){\r\n\t$begin = new DateTime(date(\"H:i\", strtotime($starttime)));\r\n\t$end = new DateTime(date(\"H:i\", strtotime($endtime)));\r\n\r\n$timerange = new DatePeriod($begin, new DateInterval('PT900S'), $end);\r\n\r\nforeach($timerange as $time){\r\n\t$atimes[] =$time->format(\"H:i A\");\r\n}\r\n$atimes[] =date(\"H:i A\", strtotime($enddate)) ;\r\nreturn $atimes; \r\n}", "title": "" }, { "docid": "d8b4c2ce4f4c3f992d864304a0b47666", "score": "0.48775542", "text": "public function set_lifespan_period($value)\n {\n\n // Sanitize and validate value\n $value = $this->sanitize_lifespan_period($value);\n\n // Set property\n $this->set_property('lifespan_period', $value);\n }", "title": "" }, { "docid": "35392bf7ac3c7b2817dced6f12d98b58", "score": "0.48390317", "text": "public function setAllTime(\\stdClass $data)\n {\n $this->allTime = Period::createFromJson($data);\n }", "title": "" }, { "docid": "46deaca21e76c0ef2097265b0f5e92ff", "score": "0.4782135", "text": "public function periods(array $periods)\n {\n $this->periods = $periods;\n\n return $this;\n }", "title": "" }, { "docid": "e112342ca3bae8d12c8c853701510a19", "score": "0.47549468", "text": "public function run()\n\t{\n\t\tDB::table('periods')->truncate();\n\n\t\t$periods = array(\n\t\t\t[\n\t\t\t\t'period' => '1',\n\t\t\t\t'startTime' => date(\"H:i:s\", strtotime(\"7:25 am\"))\n\t\t\t],\n\t\t\t[\n\t\t\t\t'period' => '2',\n\t\t\t\t'startTime' => date(\"H:i:s\", strtotime(\"8:30 am\"))\n\t\t\t],\n\t\t\t[\n\t\t\t\t'period' => '3',\n\t\t\t\t'startTime' => date(\"H:i:s\", strtotime(\"9:35 am\"))\n\t\t\t],\n\t\t\t[\n\t\t\t\t'period' => '4',\n\t\t\t\t'startTime' => date(\"H:i:s\", strtotime(\"10:40 am\"))\n\t\t\t],\n\t\t\t[\n\t\t\t\t'period' => '5',\n\t\t\t\t'startTime' => date(\"H:i:s\", strtotime(\"11:45 am\"))\n\t\t\t],\n\t\t\t[\n\t\t\t\t'period' => '6',\n\t\t\t\t'startTime' => date(\"H:i:s\", strtotime(\"12:50 pm\"))\n\t\t\t],\n\t\t\t[\n\t\t\t\t'period' => '7',\n\t\t\t\t'startTime' => date(\"H:i:s\", strtotime(\"1:55 pm\"))\n\t\t\t],\n\t\t\t[\n\t\t\t\t'period' => '8',\n\t\t\t\t'startTime' => date(\"H:i:s\", strtotime(\"3:00 pm\"))\n\t\t\t],\n\t\t\t[\n\t\t\t\t'period' => '9',\n\t\t\t\t'startTime' => date(\"H:i:s\", strtotime(\"4:05 pm\"))\n\t\t\t],\n\t\t\t[\n\t\t\t\t'period' => '10',\n\t\t\t\t'startTime' => date(\"H:i:s\", strtotime(\"5:10 pm\"))\n\t\t\t],\n\t\t\t[\n\t\t\t\t'period' => '11',\n\t\t\t\t'startTime' => date(\"H:i:s\", strtotime(\"6:15 pm\"))\n\t\t\t],\n\t\t\t[\n\t\t\t\t'period' => 'E1',\n\t\t\t\t'startTime' => date(\"H:i:s\", strtotime(\"7:20 pm\"))\n\t\t\t],\n\t\t\t[\n\t\t\t\t'period' => 'E2',\n\t\t\t\t'startTime' => date(\"H:i:s\", strtotime(\"8:20 pm\"))\n\t\t\t],\n\t\t\t[\n\t\t\t\t'period' => 'E3',\n\t\t\t\t'startTime' => date(\"H:i:s\", strtotime(\"9:20 pm\"))\n\t\t\t]\n\t\t);\n\n\t\t// Uncomment the below to run the seeder\n\t\tDB::table('periods')->insert($periods);\n\t}", "title": "" }, { "docid": "14999fed035f6193fea5850cd703fd18", "score": "0.4709221", "text": "public function getEventsAction($start, $repeatingEnd)\n {\n $em = $this->getDoctrine()->getManager();\n\n $events = $em->getRepository('HospiceSiteBundle:Event')->findAllBetweenStartAndRepeatingEndDate($start, $repeatingEnd);\n \t$response = new JsonResponse();\n \n \t$jsonArray = array();\n \n \tforeach ($events as $event) {\n $dateDiff = null;\n $r = $event->getRecurOptions();\n if ($r != null) {\n $firstEventStart;\n $dateStart = new \\DateTime($start);\n $dateEnd = new \\DateTime($repeatingEnd);\n $dateStep = new \\DateInterval(\"P0D\");\n $dateDiff = date_diff($event->getStart(), $dateStart);\n\n $name = $r->getFrequency()->getName();\n if ($name === 'PER_DAY') {\n if ($r->getInterval() > 0) {\n $e = $this->getEventsSeriesStart($dateStart, $event);\n $dateStep->d = $r->getInterval();\n while ($e->getStart() < $dateEnd) {\n \t array_push($jsonArray, $e->toJSON());\n $e->getStart()->add($dateStep);\n $e->getEnd()->add($dateStep);\n }\n }\n } elseif ($name === 'PER_WEEK') {\n if ($r->getInterval() > 0) {\n $firstEventInWeek = $this->getEventsSeriesStart($dateStart, $event);\n\n $eventInWeek = array();\n $flags = intval($r->getIntervalFlags());\n if ($flags != 0) {\n $opts_arr = $this->getPerDayOptions($r->getFrequency());\n $dateStep->d = intval($firstEventInWeek->getStart()->format(\"N\")) - self::DAY_MONDAY;\n $firstEventInWeek->getStart()->sub($dateStep);\n $firstEventInWeek->getEnd()->sub($dateStep);\n if ($flags & $opts_arr[\"ON_MONDAY\"]->getValue()) {\n $e = $this->createEvent($firstEventInWeek, 0);\n array_push($eventInWeek, $e);\n }\n if ($flags & $opts_arr[\"ON_TUSEDAY\"]->getValue()) {\n $e = $this->createEvent($firstEventInWeek, 1);\n array_push($eventInWeek, $e);\n }\n if ($flags & $opts_arr[\"ON_WEDNESDAY\"]->getValue()) {\n $e = $this->createEvent($firstEventInWeek, 2);\n array_push($eventInWeek, $e);\n }\n if ($flags & $opts_arr[\"ON_THURSDAY\"]->getValue()) {\n $e = $this->createEvent($firstEventInWeek, 3);\n array_push($eventInWeek, $e);\n }\n if ($flags & $opts_arr[\"ON_FRIDAY\"]->getValue()) {\n $e = $this->createEvent($firstEventInWeek, 4);\n array_push($eventInWeek, $e);\n }\n if ($flags & $opts_arr[\"ON_SATURDAY\"]->getValue()) {\n $e = $this->createEvent($firstEventInWeek, 5);\n array_push($eventInWeek, $e);\n }\n if ($flags & $opts_arr[\"ON_SUNDAY\"]->getValue()) {\n $e = $this->createEvent($firstEventInWeek, 6);\n array_push($eventInWeek, $e);\n }\n } else {\n $e = /* clone */ $firstEventInWeek;\n array_push($eventInWeek, $e);\n }\n\n $dateStep->d = $r->getInterval() * 7;\n\n $contFlag = true;\n while ($contFlag) {\n \t foreach ($eventInWeek as $e) {\n if ($e->getStart() > $dateEnd) {\n $contFlag = false;\n break;\n }\n if ($e->getEnd() >= $dateStart) {\n array_push($jsonArray, $e->toJSON());\n }\n $e->getStart()->add($dateStep);\n $e->getEnd()->add($dateStep);\n }\n }\n }\n } elseif ($name === 'PER_MONTH') {\n $e = $this->getEventsSeriesStart($dateStart, $event);\n $dateStep->m = $r->getInterval();\n while ($e->getStart() < $dateEnd) {\n array_push($jsonArray, $e->toJSON());\n $e->getStart()->add($dateStep);\n $e->getEnd()->add($dateStep);\n }\n } elseif ($name === 'PER_YEAR') {\n $e = $this->getEventsSeriesStart($dateStart, $event);\n $dateStep->y = $r->getInterval();\n while ($e->getStart() < $dateEnd) {\n array_push($jsonArray, $e->toJSON());\n $e->getStart()->add($dateStep);\n $e->getEnd()->add($dateStep);\n }\n }\n } else {\n \t array_push($jsonArray, $event->toJSON());\n }\n \t}\n \t$response->setData($jsonArray);\n \t$response->setStatusCode(Response::HTTP_OK);\n \treturn $response;\n\n }", "title": "" }, { "docid": "e5cab9cfc4a9d1295be47f45269cf94c", "score": "0.4707195", "text": "function TimeIt_createIcal($events, $single=false)\n{\n Loader::requireOnce('modules/TimeIt/pnincludes/iCalcreator.class.php');\n //print_r($events); exit();\n if($single) {\n $events = array($events);\n }\n\n $v = new vcalendar();\n $v->setConfig( 'unique_id', 'TimeIt 2.0 Calendar' );\n $v->setProperty( 'method', 'PUBLISH' );\n\n $ids_already_done = array();\n foreach($events AS $_week) {\n foreach($_week AS $_day) {\n if(empty($_day)) continue;\n foreach($_day AS $cat) {\n foreach ($cat['data'] AS $obj) {\n // ignore recurrences of an event\n if(in_array($obj['id'], $ids_already_done)) {\n continue;\n }\n $ids_already_done[] = $obj['id'];\n\n $vevent = new vevent();\n\n $h = 0;\n $m = 0;\n $h2 = 0;\n $m2 = 0;\n\n if(!$obj['allDay']) {\n $temp = explode(':', $obj['allDayStart']);\n $h = (int)$temp[0];\n $m = (int)$temp[1];\n\n $temp = !is_array($obj['allDayDur'])? explode(',', $obj['allDayDur']) : $obj['allDayDur'];\n $t_h = (int)$temp[0];\n $t_m = (int)$temp[1];\n\n $h2 = $h + $t_h;\n $m2 = $m + $t_m;\n\n if($m2 >= 60) {\n $h2++;\n $m2 = $m2 - 60;\n }\n }\n\n $startDate1 = explode('-', $obj['startDate']);\n $startDate = array( \"year\" => (int)$startDate1[0] ,\n \"month\" => (int)$startDate1[1] ,\n \"day\" => (int)$startDate1[2],\n 'hour' => $h,\n 'min' => $m,\n 'sec'=>0);\n //print_r($startDate);exit();\n $vevent->setProperty( \"dtstart\", $startDate);\n\n if($obj['allDay']) {\n // if the event is a all day event the end date is the next day.\n $endDate = DateUtil::getDatetime(strtotime('+1 day', strtotime($obj['endDate'])), _DATEINPUT);\n }\n\n $endDate = explode('-', $obj['endDate']);\n $endDate = array( \"year\" => (int)$endDate[0],\n \"month\" => (int)$endDate[1],\n \"day\" => (int)$endDate[2],\n 'hour' =>$h2,\n 'min' =>$m2,\n 'sec'=>0);\n $vevent->setProperty( \"dtend\", $endDate);\n\n $vevent->setProperty( \"summary\", $obj['title']);\n $vevent->setProperty( \"description\", $obj['text']);\n\n if($obj['plugins']['location']['name'] || $obj['plugins']['location']['name']) {\n $value = $obj['plugins']['location']['name'].', '.$obj['plugins']['location']['street'].' '.$obj['plugins']['location']['houseNumber'].', '.$obj['plugins']['location']['zip'].' '.$obj['plugins']['location']['city'].' '.$obj['plugins']['location']['country'];\n $vevent->setLocation($value);\n }\n\n if($obj['plugins']['location']['lat'] && $obj['plugins']['location']['lng']) {\n $vevent->setGeo($obj['plugins']['location']['lat'], $obj['plugins']['location']['lng']);\n }\n\n if($obj['plugins']['contact']['contactPerson'] || $obj['plugins']['contact']['email'] || $obj['plugins']['contact']['phoneNr']) {\n $value = $obj['plugins']['contact']['contactPerson'].', '.$obj['plugins']['contact']['address'].', '.$obj['plugins']['contact']['zip'].' '.$obj['plugins']['contact']['city'].' '.$obj['plugins']['contact']['country'].', '.$obj['plugins']['contact']['email'].', '.$obj['plugins']['contact']['phoneNR'];\n $vevent->setContact($value);\n }\n\n\n $vevent->setProperty( \"uid\", $obj['id'].'@'.pnServerGetVar('HTTP_HOST').pnGetBaseURI());\n $vevent->setProperty( \"url\", pnModURL('TimeIt','user','event', array('id'=>(int)$obj['id']), null, null, true));\n\n $cr_date = getdate(strtotime($obj['endDate']));\n $vevent->setProperty( \"dtstamp\", array( \"year\" => (int)$cr_date['year'] ,\n \"month\" => (int)$cr_date['mon'] ,\n \"day\" => (int)$cr_date['mday'],\n 'hour' => (int)$cr_date['hours'],\n 'min' => (int)$cr_date['minutes'],\n 'sec' => (int)$cr_date['seconds']));\n\n $cats = array();\n foreach($obj['__CATEGORIES__'] as $cat) {\n $cats[] = $cat['name'];\n }\n if(!empty($cats)) {\n $vevent->setProperty( \"categories\", $cats);\n }\n\n if($obj['sharing'] == '1')\n {\n $vevent->setProperty( \"class\", 'PRIVATE');\n } else if($obj['sharing'] == '2' || $obj['sharing'] == '3')\n {\n $vevent->setProperty( \"class\", 'PUBLIC');\n } else if($obj['sharing'] == '4')\n {\n $vevent->setProperty( \"class\", 'CONFIDENTIAL');\n }\n\n if((int)$obj['repeatType'] == 1)\n {\n if($obj['repeatSpec'] == 'year')\n {\n $freq = 'YEARLY';\n } else if($obj['repeatSpec'] == 'month')\n {\n $freq = 'MONTHLY';\n } else if($obj['repeatSpec'] == 'day')\n {\n $freq = 'DAILY';\n }\n\n $vevent->setProperty( \"dtend\", $startDate);\n $vevent->setProperty(\"RRULE\", array('FREQ'=>$freq,'INTERVAL'=>$obj['repeatFrec'],'UNTIL'=>$endDate));\n } else if((int)$obj['repeatType'] == 2)\n {\n $data = explode(' ', $obj['repeatSpec']);\n if($data[0] == '5')\n {\n $data[0] = '-1';\n }\n $byday = $data[0];\n if($data[1] == '0')\n {\n $byday .= 'SO';\n } else if($data[1] == '1')\n {\n $byday .= 'MO';\n } else if($data[1] == '2')\n {\n $byday .= 'TU';\n } else if($data[1] == '3')\n {\n $byday .= 'WE';\n } else if($data[1] == '4')\n {\n $byday .= 'TH';\n } else if($data[1] == '5')\n {\n $byday .= 'FR';\n } else if($data[1] == '6')\n {\n $byday .= 'SA';\n }\n\n $vevent->setProperty( \"dtend\", $startDate);\n $vevent->setProperty(\"RRULE\", array('FREQ'=>'MONTHLY','BYDAY'=>$byday,'INTERVAL'=>$obj['repeatFrec'],'UNTIL'=>$endDate));\n } else if((int)$obj['repeatType'] == 3)\n {\n $dates = array();\n $datesExp = explode(',',$obj['repeatSpec']);\n foreach($datesExp AS $d)\n {\n $d = explode('-', $d);\n $dates[] = array( \"year\" => (int)$d[0],\n \"month\" => (int)$d[1] ,\n \"day\" => (int)$d[2]);\n }\n\n $vevent->setProperty(\"RDATE\", $dates);\n } else if((int)$obj['repeatType'] == 4)\n {\n $vevent->setProperty(\"RRULE\", unserialize($obj['repeatSpec']));\n }\n\n\n //print_r($vevent);\n $v->setComponent($vevent);\n }\n }\n }\n }\n\n $v->returnCalendar();\n}", "title": "" }, { "docid": "1092fdbb306529e92d1e0e710afff7f2", "score": "0.4701759", "text": "public function actionEmploymentPeriods() {\n StaticMethods::populateDropDown(ApplicantsEmployment::employmentPeriod($_POST['terms']), 'Duration', $_POST['period']);\n }", "title": "" }, { "docid": "c47977184c5cc98a8d7cfee22475284f", "score": "0.46577132", "text": "function _available_durations($start = '', $uid = '', $type = \"\", $verify_block = TRUE) {\n\n if (!$start) {\n // return everything\n return array(15 => 15, 30 => 30, 45 => 45, 60 => 60);\n }\n // get the next appointment scheduled after this one\n $appointment = sb_appointment_next_appointment_load($uid, $start, TRUE);\n // we also need our block end if relevant\n if ($verify_block) {\n $block = sb_schedule_event_time_load($uid, $start, TRUE);\n $block_date = date_make_date($block->end_datetime_utc, \"UTC\");\n }\n $start_date = date_make_date($start, \"UTC\");\n if ($appointment) {\n $app_date = date_make_date($appointment->start_datetime_utc, \"UTC\");\n }\n else {\n $app_date = '';\n }\n\n // our comparison date is whichever happens first: next appointment or end of our block of time\n if (! $app_date) {\n if ($verify_block) {\n $limit_date = $block_date;\n }\n else {\n $limit_date = -1;\n }\n } else if ( ( $app_date > $block_date) && $verify_block) {\n $limit_date = $block_date;\n } else {\n $limit_date = $app_date;\n }\n\n // get the number of seconds between them if we can\n if ($limit_date != -1) {\n $seconds = date_format($limit_date, \"U\") - date_format($start_date, \"U\");\n }\n else {\n // no limit at all, since we don't have anything scheduled after this\n $seconds = 86400; // arbitrarily large number\n }\n\n $minutes = $seconds / 60;\n\n // round up to the nearest multiple of 15\n $minutes = 15 * ceil($minutes/15);\n\n // we can go up to $minutes in increments of 15, to a max of 4 (for 60 minutes) unless it's a personal session\n if ($type == PERSONAL_SESSION) {\n $max = 16;\n } else {\n $max = 4;\n }\n $intervals = ( ($minutes / 15) > $max ? $max : ($minutes / 15) );\n\n $available = array_slice ( array(15 => 15, 30 => 30, 45 => 45, 60 => 60, 75 => 75, 90 => 90, 105 => 105, 120 => 120, 135 => 135, 150 => 150, 165 => 165, 180 => 180),\n\t\t\t 0,\n\t\t\t $intervals,\n\t\t\t TRUE);\n\n return $available;\n}", "title": "" }, { "docid": "3d36a9374b5802f2f835ea799526b425", "score": "0.4654531", "text": "public function appointments()\n\t{\n\t\tif (!is_cli())\n\t\t{\n\t\t\techo \"This script can only be accessed via the command line\" . PHP_EOL;\n\t\t\treturn;\n\t\t}\n\n\t\t$participations = $this->participationModel->get_confirmed_participations();\n\t\tforeach ($participations as $participation)\n\t\t{\n\t\t\t$appointment = strtotime($participation->appointment); \n\t\t\tif ($appointment > strtotime('tomorrow') && $appointment <= strtotime('tomorrow + 1 day')) \n\t\t\t{\t\t\t\t\t\n\t\t\t\treset_language(L::DUTCH);\n\t\t\t\t\n\t\t\t\t$participant = $this->participationModel->get_participant_by_participation($participation->id);\n\t\t\t\t$experiment = $this->participationModel->get_experiment_by_participation($participation->id);\n\t\t\t\t$message = email_replace('mail/reminder', $participant, $participation, $experiment);\n\t\t\n\t\t\t\t$this->email->clear();\n\t\t\t\t$this->email->from(FROM_EMAIL, FROM_EMAIL_NAME);\n\t\t\t\t$this->email->to(in_development() ? TO_EMAIL_DEV_MODE : $participant->email);\n\t\t\t\t$this->email->subject('Babylab Utrecht: Herinnering deelname');\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\t\t\t\t// DEBUG: $this->email->print_debugger();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c3ecc873b8ba15b7c3e55e3b7d8c8191", "score": "0.45844528", "text": "public function setAllDataPeriod($period)\n {\n $payload = '';\n $payload .= pack('V', $period);\n\n $this->sendRequest(self::FUNCTION_SET_ALL_DATA_PERIOD, $payload);\n }", "title": "" }, { "docid": "c3ecc873b8ba15b7c3e55e3b7d8c8191", "score": "0.45844528", "text": "public function setAllDataPeriod($period)\n {\n $payload = '';\n $payload .= pack('V', $period);\n\n $this->sendRequest(self::FUNCTION_SET_ALL_DATA_PERIOD, $payload);\n }", "title": "" }, { "docid": "752a119b6a330be17aa4fb0df89a1d80", "score": "0.45607468", "text": "function set_recurrences($event,$start=0)\n\t{\n\t\tif ($this->debug && ((int) $this->debug >= 2 || $this->debug == 'set_recurrences' || $this->debug == 'check_move_horizont'))\n\t\t{\n\t\t\t$this->debug_message('calendar_bo::set_recurrences(%1,%2)',true,$event,$start);\n\t\t}\n\t\t// check if the caller gave us enough information and if not read it from the DB\n\t\tif (!isset($event['participants']) || !isset($event['start']) || !isset($event['end']))\n\t\t{\n\t\t\tlist(,$event_read) = each($this->so->read($event['id']));\n\t\t\tif (!isset($event['participants']))\n\t\t\t{\n\t\t\t\t$event['participants'] = $event_read['participants'];\n\t\t\t}\n\t\t\tif (!isset($event['start']) || !isset($event['end']))\n\t\t\t{\n\t\t\t\t$event['start'] = $event_read['start'];\n\t\t\t\t$event['end'] = $event_read['end'];\n\t\t\t}\n\t\t}\n\t\tif (!$start) $start = $event['start'];\n\n\t\t$events = array();\n\t\t$this->insert_all_recurrences($event,$start,$this->date2usertime($this->config['horizont']),$events);\n\n\t\t$exceptions = array();\n\t\tforeach((array)$event['recur_exception'] as $exception)\n\t\t{\n\t\t\t$exceptions[] = egw_time::to($exception, true);\t// true = date\n\t\t}\n\t\t//error_log(__METHOD__.\"(\".array2string($event).\", $start) exceptions=\".array2string($exceptions));\n\t\tforeach($events as $event)\n\t\t{\n\t\t\t$is_exception = in_array(egw_time::to($event['start'], true), $exceptions);\n\t\t\t$start = $this->date2ts($event['start'],true);\n\t\t\tif ($event['whole_day'])\n\t\t\t{\n\t\t\t\t$time = $this->so->startOfDay(new egw_time($event['end'], egw_time::$user_timezone));\n\t\t\t\t$time->setTime(23, 59, 59);\n\t\t\t\t$end = $this->date2ts($time,true);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$end = $this->date2ts($event['end'],true);\n\t\t\t}\n\t\t\t//error_log(__METHOD__.\"() start=\".egw_time::to($start).\", is_exception=\".array2string($is_exception));\n\t\t\t$this->so->recurrence($event['id'], $start, $end, $event['participants'], $is_exception);\n\t\t}\n\t}", "title": "" }, { "docid": "4d6b31be32626caff745de974699ac07", "score": "0.45291972", "text": "public static function hook_calendar_events($callback, $start_time, $end_time){\n\t\t$calendar_events = array();\n\t\tif(module_config::c('notes_show_reminders_on_calendar',1)) {\n\n\t\t\t$sql = \"SELECT * FROM `\"._DB_PREFIX.\"note` n \";\n\t\t\t$sql .= \" WHERE n.`reminder` = 1 AND n.note_time >= \".(int)$start_time.\" AND n.note_time <= \".(int)$end_time.\"\";\n\t\t\t//$sql .= \" AND ( n.`user_id` = 0 OR n.`user_id` = \".module_security::get_loggedin_id().\")\";\n\t\t\t$sql .= \" ORDER BY n.note_time ASC\";\n\t\t\t$notes = qa($sql);\n\n\t\t\tforeach ( $notes as $note ) {\n\t\t\t\t$alert_res = self::process_note_permissions(array(), $note);\n\t\t\t\tif($alert_res) {\n\t\t\t\t\t$calendar_events[] = array(\n\t\t\t\t\t\t'subject' => $note['note'],\n\t\t\t\t\t\t'customer_id' => $note['owner_table'] == 'customer' ? $note['owner_id'] : 0,\n\t\t\t\t\t\t'start_time' => $note['note_time'],\n\t\t\t\t\t\t'end_time' => $note['note_time'],\n\t\t\t\t\t\t'all_day' => true,\n\t\t\t\t\t\t'user_id' => $note['user_id'],\n\t\t\t\t\t\t'description' => 'Test Description',\n\t\t\t\t\t\t'link' => '',\n\t\t\t\t\t\t'other_details' => ucwords($note['owner_table']) . ': ' . (!empty($alert_res['type']) ? $alert_res['type'] .': ' : '') .''.(!empty($alert_res['full_link']) ? $alert_res['full_link'] : ''),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $calendar_events;\n\t}", "title": "" }, { "docid": "cd09f0abefa7a339d5648f6492b480e9", "score": "0.4512138", "text": "function exponent_datetime_recurringDailyDates($start,$end,$freq) {\n\t$dates = array();\n\t$curdate = $start;\n\tdo {\n\t\t$dates[] = $curdate;\n\t\t$curdate = exponent_datetime_startOfDayTimestamp($curdate + ((86400) * $freq)+3601);\n\t} while ($curdate <= $end);\n\treturn $dates;\n}", "title": "" }, { "docid": "4721d7633604700f4187cf1d570e7606", "score": "0.45079648", "text": "public function dateRanges(Period ...$items): self\n {\n foreach ($items as $item) {\n $this->dateRange($item);\n }\n\n return $this;\n }", "title": "" }, { "docid": "b10850f0e8c1af40536ebbc1d175c80a", "score": "0.45039368", "text": "public function create_times($from, $to)\n {\n $start = new DateTime($from);\n $end = new DateTime($to);\n $interval = MINIMUM_INTERVAL;\n\n while ($start <= $end)\n {\n $sd = $start->format(\"Y-m-d H:i:s\");\n $q = $this->db->prepare(\"SELECT * FROM TimeSlot WHERE dateTime = ?;\");\n $q->bind_param('s', $sd);\n \n if (!$q->execute())\n die();\n \n $result = $q->get_result();\n\n if (mysqli_num_rows($result) == 0) // check appointment doesn't already exist\n {\n $q = $this->db->prepare(\"INSERT INTO TimeSlot (dateTime) VALUES ('$sd')\");\n \n if (!$q->execute())\n die();\n }\n \n $start->modify('+'.$interval.' minutes');\n }\n }", "title": "" }, { "docid": "9db6e85c36008bc37c5598129c6b0748", "score": "0.44700027", "text": "function the_date_range($start_dt,$end_dt, $one_day = false){\r\n\t\r\n\t$duration = $start_dt->diff($end_dt);\r\n\t$start = explode(\" \",$start_dt->format('l F j Y g i a'));\r\n\t$end = explode(\" \",$end_dt->format('l F j Y g i a'));\r\n\t\r\n\t//happening at the same time\r\n\tif($start == $end){\r\n\t\treturn array(\r\n\t\t\t\"date\"\t=>\tsprintf(\r\n\t\t\t\t\"%s, %s %s\",\r\n\t\t\t\t$start[0], //day of week\r\n\t\t\t\t$start[1], //month\r\n\t\t\t\t$start[2] //day of month\r\n\t\t\t\t),\r\n\t\t\t\"duration\"\t=>\t$duration,\r\n\t\t\t\"time\"\t=>\teo_is_all_day() ? 'all day' : time_compact_ap_format($start[4],$start[5],$start[6])\r\n\t\t);\r\n\t}\t\r\n\t//happening on the same day\r\n\telseif($start[2] == $end[2] || ($duration->days < 1 && $duration->h < 24)){\r\n\t\t//Monday, March 4; 9:00 p.m.\r\n\t\treturn array(\r\n\t\t\t\"date\"\t=>\tsprintf(\r\n\t\t\t\t\"%s, %s %s\",\r\n\t\t\t\t$start[0], //day of week\r\n\t\t\t\t$start[1], //month\r\n\t\t\t\t$start[2] //day of month\r\n\t\t\t\t),\r\n\t\t\t\"duration\"\t=>\t$duration,\r\n\t\t\t\"time\"\t=>\teo_is_all_day() ? 'all day' : sprintf(\r\n\t\t\t\t\"%s&ndash;%s\",\r\n\t\t\t\ttime_compact_ap_format($start[4],$start[5],$start[6]),\r\n\t\t\t\ttime_compact_ap_format($end[4],$end[5],$end[6])\t //formatted date\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t}\r\n\t//happening in the same month\r\n\t//check if happening all day; if not, return eo_all_day ? : \r\n\telseif($start[1] == $end[1]){\r\n\t\treturn (eo_is_all_day() || $one_day) ? \r\n\t\tsprintf(\r\n\t\t\t\"%s %s&ndash;%s\",\r\n\t\t\t$start[1], //month\r\n\t\t\t$start[2], //day of month\r\n\t\t\t$end[2]\r\n\t\t)\r\n\t\t: \r\n\t\tarray(\r\n\t\t\t\"date\" => sprintf(\r\n\t\t\t\t\"%s %s&ndash;%s\",\r\n\t\t\t\t$start[1],\r\n\t\t\t\t$start[2],\r\n\t\t\t\t$end[2]\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t\"datetime\" => sprintf(\r\n\t\t\t\t\"%s, %s %s&ndash;%s, %s %s\",\r\n\t\t\t\ttime_compact_ap_format($start[4],$start[5],$start[6]),\r\n\t\t\t\t$start[1],\r\n\t\t\t\t$start[2],\r\n\t\t\t\ttime_compact_ap_format($end[4],$end[5],$end[6]),\r\n\t\t\t\t$end[1],\r\n\t\t\t\t$end[2]\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t\"duration\"\t=>\t$duration,\r\n\t\t\t\"time\"\t=>\tsprintf(\r\n\t\t\t\t\"%s&ndash;%s\",\r\n\t\t\t\ttime_compact_ap_format($start[4],$start[5],$start[6]),\r\n\t\t\t\ttime_compact_ap_format($end[4],$end[5],$end[6])\r\n\t\t\t)\r\n\t\t);\r\n\t}\r\n\t//happening in the same year\r\n\telseif($start[3] == $end[3]){\r\n\t\treturn (eo_is_all_day() || $one_day) ?\r\n\t\t\tsprintf(\r\n\t\t\t\t\"%s, %s %s&ndash;%s, %s %s\",\r\n\t\t\t\t$start[0], //day of week\r\n\t\t\t\t$start[1], //month\r\n\t\t\t\t$start[2], //day of month\r\n\t\t\t\t$end[0],\r\n\t\t\t\t$end[1],\r\n\t\t\t\t$end[2]\r\n\t\t\t)\r\n\t\t\t:\r\n\t\t\tarray(\r\n\t\t\t\t\"date\"\t=>\tsprintf(\r\n\t\t\t\t\t\"%s %s&ndash;%s %s\",\r\n\t\t\t\t\t$start[1],\r\n\t\t\t\t\t$start[2],\r\n\t\t\t\t\t$end[1],\r\n\t\t\t\t\t$end[2]\r\n\t\t\t\t),\r\n\t\t\t\t\"datetime\"\t=>\tsprintf(\r\n\t\t\t\t\t\"%s, %s, %s %s&ndash;%s, %s, %s %s\",\r\n\t\t\t\t\ttime_compact_ap_format($start[4],$start[5],$start[6]),\r\n\t\t\t\t\t$start[0],\r\n\t\t\t\t\t$start[1],\r\n\t\t\t\t\t$start[2],\r\n\t\t\t\t\ttime_compact_ap_format($end[4],$end[5],$end[6]),\r\n\t\t\t\t\t$end[0],\r\n\t\t\t\t\t$end[1],\r\n\t\t\t\t\t$end[2]\r\n\t\t\t\t),\r\n\t\t\t\t\"duration\"\t=>\t$duration,\r\n\t\t\t\t\"time\"\t=>\tsprintf(\"%s&ndash;%s\",\r\n\t\t\t\t\ttime_compact_ap_format($start[4],$start[5],$start[6]),\r\n\t\t\t\t\ttime_compact_ap_format($end[4],$end[5],$end[6])\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t}\r\n\t//just plain happening\r\n\r\n\telse{\r\n\t\treturn (eo_is_all_day() || $one_day) ? \r\n\t\t\tsprintf(\r\n\t\t\t\t\"%s, %s %s&ndash;%s, %s %s\",\r\n\t\t\t\t$start[0], //day of week\r\n\t\t\t\t$start[1], //month\r\n\t\t\t\t$start[2], //day of month\r\n\t\t\t\t$end[0],\r\n\t\t\t\t$end[1],\r\n\t\t\t\t$end[2]\r\n\t\t\t)\r\n\t\t\t:\r\n\t\t\tarray(\r\n\t\t\t\t\"date\"\t=>\tsprintf(\r\n\t\t\t\t\t\"%s, %s %s&ndash;%s, %s %s\",\r\n\t\t\t\t\t$start[0],\r\n\t\t\t\t\t$start[1],\r\n\t\t\t\t\t$start[2],\r\n\t\t\t\t\t$end[0],\r\n\t\t\t\t\t$end[1],\r\n\t\t\t\t\t$end[2]\r\n\t\t\t\t),\r\n\t\t\t\t\"datetime\"\t=>\tsprintf(\r\n\t\t\t\t\t\"%s, %s, %s %s&ndash;%s, %s, %s %s\",\r\n\t\t\t\t\ttime_compact_ap_format($start[4],$start[5],$start[6]),\r\n\t\t\t\t\t$start[0],\r\n\t\t\t\t\t$start[1],\r\n\t\t\t\t\t$start[2],\r\n\t\t\t\t\ttime_compact_ap_format($end[4],$end[5],$end[6]),\r\n\t\t\t\t\t$end[0],\r\n\t\t\t\t\t$end[1],\r\n\t\t\t\t\t$end[2]\r\n\t\t\t\t),\r\n\t\t\t\t\"duration\"\t=>\t$duration,\r\n\t\t\t\t\"time\"\t=>\tsprintf(\"%s&ndash;%s\",\r\n\t\t\t\t\ttime_compact_ap_format($start[4],$start[5],$start[6]),\r\n\t\t\t\t\ttime_compact_ap_format($end[4],$end[5],$end[6])\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t}\r\n}", "title": "" }, { "docid": "3efed3dd3658f04fd4266d8591916583", "score": "0.44690344", "text": "public static function cron_expiration_reminder() {\n $domains = Domain::get_domain_expirations();\n $distances = self::get_reminder_distance();\n $expiring_soon = array();\n foreach( $domains as $dom ) {\n $m = new Moment( $dom->expiration );\n $momentFromVo = $m->fromNow();\n foreach( $distances as $min_distance ) {\n $distance = $momentFromVo->getWeeks();\n //Subtract the time until expiration from the minimum warning window (weeks in advance to send reminders)\n $diff = $min_distance + $distance;\n //If the difference is greater than or equal to 0, expiration is closing in and we need to send a reminder.\n if( $diff >= 0 && $distance < 0 ) {\n $expiring_soon[] = $dom->ID;\n }\n }\n }\n $expiring_soon = array_unique( $expiring_soon );\n if( !empty( $expiring_soon ) ) {\n self::send_reminder_digest( $expiring_soon );\n }\n }", "title": "" }, { "docid": "70001d09d54a98d8a06ebd23e0c5b470", "score": "0.44658688", "text": "public function testDateTimeInterval()\n {\n //Load a BpmnFile Repository\n $bpmnRepository = new BpmnDocument();\n $bpmnRepository->setEngine($this->engine);\n $bpmnRepository->setFactory($this->repository);\n $bpmnRepository->load(__DIR__ . '/files/Timer_StartEvent_TimeDateInterval.bpmn');\n\n //Load a process from a bpmn repository by Id\n $process = $bpmnRepository->getProcess('Process');\n $timerEventDefinition = $bpmnRepository->getTimerEventDefinition('_9_ED_1');\n\n //Set an date time interval\n $interval = 'PT1H';\n $expression = $this->repository->createFormalExpression();\n $expression->setRepository($this->repository);\n $expression->setProperty('body', $interval);\n $timerEventDefinition->setTimeDuration($expression);\n\n $this->engine->loadProcess($process);\n\n //Get scheduled job information\n $job = $this->jobs[0];\n $duration = $job['timer'];\n\n //Assertion: The duration must be the specified date time interval.\n $expected = new DateInterval($interval);\n $this->assertEquals($expected, $duration);\n }", "title": "" }, { "docid": "5ca3fb19d40f28676db8a64afab9c103", "score": "0.44601196", "text": "public function testAttendeeSetStatusRecurExceptionAllFollowing()\n {\n $from = new Tinebase_DateTime('2012-02-01 00:00:00');\r\n $until = new Tinebase_DateTime('2012-02-29 23:59:59');\r\n \r\n $event = new Calendar_Model_Event(array(\r\n 'summary' => 'Some Daily Event',\r\n 'dtstart' => '2012-02-03 09:00:00',\r\n 'dtend' => '2012-02-03 10:00:00',\r\n 'rrule' => 'FREQ=DAILY;INTERVAL=1',\r\n 'container_id' => $this->_testCalendar->getId(),\r\n 'attendee' => $this->_getAttendee(),\r\n ));\r\n \r\n $persistentEvent = $this->_controller->create($event);\n \n $exceptions = new Tinebase_Record_RecordSet('Calendar_Model_Event');\r\n $recurSet = Calendar_Model_Rrule::computeRecurrenceSet($persistentEvent, $exceptions, $from, $until);\r\n \n // accept for sclever thisandfuture\n $start = $recurSet[10];\n $sclever = Calendar_Model_Attender::getAttendee($start->attendee, $event->attendee[1]);\r\n $sclever->status = Calendar_Model_Attender::STATUS_ACCEPTED;\r\n $this->_controller->attenderStatusCreateRecurException($start, $sclever, $sclever->status_authkey, TRUE);\r\n \n $events = $this->_controller->search(new Calendar_Model_EventFilter(array(\r\n array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_testCalendar->getId())\r\n )))->sort('dtstart', 'ASC');\n \n // assert two baseEvents\n $this->assertTrue($events[0]->rrule_until instanceof Tinebase_DateTime, 'rrule_until of first baseEvent is not set');\n $this->assertTrue($events[0]->rrule_until < new Tinebase_DateTime('2012-02-14 09:00:00'), 'rrule_until of first baseEvent is not adopted properly');\n $this->assertEquals(Calendar_Model_Attender::STATUS_NEEDSACTION, Calendar_Model_Attender::getAttendee($events[0]->attendee, $event->attendee[1])->status, 'first baseEvent status must not be touched');\n \n $this->assertEquals($events[1]->dtstart, new Tinebase_DateTime('2012-02-14 09:00:00'), 'start of second baseEvent is wrong');\n $this->assertTrue(empty($events[1]->recurid), 'second baseEvent is not a baseEvent');\n $this->assertEquals($events[1]->rrule, $event->rrule, 'rrule of second baseEvent must be set');\n $this->assertFalse($events[1]->rrule_until instanceof Tinebase_DateTime, 'rrule_until of second baseEvent must not be set');\n $this->assertEquals(Calendar_Model_Attender::STATUS_ACCEPTED, Calendar_Model_Attender::getAttendee($events[1]->attendee, $event->attendee[1])->status, 'second baseEvent status is not touched');\n }", "title": "" }, { "docid": "a191f678b20e6ce8271172e7391e06c8", "score": "0.4429377", "text": "function exponent_datetime_recurringMonthlyDates($start,$end,$freq,$by_day=false) {\n\t// Holding array, for keeping all of the matching timestamps\n\t$dates = array();\n\t// Date to start on.\n\t$curdate = $start;\n\t\n\t// Get the date info, including the weekday.\n\t$dateinfo = getdate($curdate);\n\t\n\t// Store the month day. If we are not doing by day monthly recurrence,\n\t// then this will be used unchanged throughout the do .. while loop.\n\t$mdate = $dateinfo['mday'];\n\t\t\n\t$week = 0; // Only used for $by_day;\n\t$wday = 0; // Only used for $by_day;\n\tif ($by_day) {\n\t\t// For by day recurrence, we need to know what week it is, and what weekday.\n\t\t// (i.e. the 3rd Thursday of the month)\n\t\t\n\t\t// Calculate the Week Offset, as the ceilling value of date / DAYS_PER_WEEK\n\t\t$week = ceil($mdate / 7);\n\t\t// Store the weekday\n\t\t$wday = $dateinfo['wday'];\n\t}\n\n\teDebug($dateinfo);\n\t// Loop until we exceed the until date.\n\tdo {\n\t\t// Append the current date to the list of dates. $curdate will be updated\n\t\t// in the rest of the loop, so that it contains the next date. This next date will\n\t\t// be checked in the while condition, and if it is still before the until date,\n\t\t// the loop iterates back here again for another go.\n\t\t$dates[] = $curdate;\n\t\t\n\t\t// Grab the date information for $curdate. This gives us the current month\n\t\t// information, for the next jump.\n\t\t//$dateinfo = getdate($curdate);\n\t\t\n\t\t// Make the next month's timestamp, by adding frequency to the month. \n\t\t// PHP can pick up on the fact that the 13th month of this year is the 1st\n\t\t// month of the next year.\n\t\t$curdate = mktime(8,0,0,$dateinfo['mon']+$freq,1,$dateinfo['year']);\n\t\t$dateinfo = getdate($curdate);\n\t\t//eDebug($dateinfo);\n\t\t\n\t\t// Manually update the month and monthday.\n\t\t//eDebug($dateinfo);\n\t\t//$dateinfo['mon'] += $freq; \t//Bump the month to next month\n\t\t//eDebug($freq);\n\t\t//eDebug($dateinfo);\n\t\t//$dateinfo['mday'] = 1;\t\t//Set the day of the month to the first.\n\t\t//eDebug($dateinfo);\n\t\t//exit();\n\t\t\n\t\tif ($by_day) {\n\t\t\tif ($dateinfo['wday'] > $wday) {\n\t\t\t\t$mdate = $wday - $dateinfo['wday'] + ( 7 * $week ) + 1;\t\n\t\t\t\t//echo \"month day: \".$mdate.\"<br>\";\n\t\t\t} elseif ($dateinfo['wday'] <= $wday) {\n\t\t\t\t$mdate = $wday - $dateinfo['wday'] + ( 7 * ( $week - 1 ) ) + 1;\n\t\t\t\t//echo \"month day: \".$mdate.\"<br>\";\n\t\t\t}\n\t\t\n\t\t\t// For by day recurrence (first tuesday of every month), we need to do a\n\t\t\t// little more fancy footwork to determine the next timestamp, since there\n\t\t\t// is no easy mathematical way to advance a whole month and land on\n\t\t\t// the same week offset and weekday.\n\t\t\t\n\t\t\t// Calculate the next month date.\n\t\t\t//echo \"Weekday is: \".$wday.\"<br>\";\n\t\t\t//if ($dateinfo['wday'] > $wday) {\n\t\t\t\t// The month starts on a week day that is after the target week day.\n\t\t\t\t// For more detailed discussion of the following formula, see the\n\t\t\t\t// analysis docs, sdk/analysis/subsystems/datetime.txt\n\t\t\t\t\n\t\t\t\t// TARGET_WDAY is $wday\n\t\t\t\t// START_WDAY is $startmonthinfo['wday']\n\t\t\t\t//eDebug($dateinfo); \n\t\t\t\t//echo 'mdate = $wday - $dateinfo[\\'wday\\'] + ( 7 * $week ) + 1;<br>';\n\t\t\t\t//echo \"mdate = \".$wday.\" - \".$dateinfo['wday'].\" + ( 7 * \".$week.\" ) + 1<br>\";\n\t\t\t\t//$mdate = $wday - $dateinfo['wday'] + ( 7 * $week ) + 1;\n\t\t\t\t//echo \"mdate: \".$mdate.\"<br>\";\n\t\t\t//} else {\n\t\t\t\t// The month starts on a week day that is before or equal to the\n\t\t\t\t// target week day. This formula is identical to the one above,\n\t\t\t\t// except that we subtract one from the week offset\n\t\t\t\t// For more detailed discussion of the following formula, see the\n\t\t\t\t// analysis docs, sdk/analysis/subsystems/datetime.txt\n\t\t\t\t\n\t\t\t\t// TARGET_WDAY is $wday\n\t\t\t\t// START_WDAY is $startmonthinfo['wday']\n\t\t\t\t//$mdate = $wday - $dateinfo['wday'] + ( 7 * ( $week - 1 ) ) + 1;\n\t\t\t//}\n\t\t\t\n\t\t}\n\t\t\n\t\t// Re-assemble the $curdate value, using the correct $mdate. If not doing by_day\n\t\t// recurrence, this value remains essentially unchanged. Otherwise, it will be\n\t\t// set to reflect the new day of the Nth weekday.\n\t\t//echo \"month: \".$dateinfo['mon'].\"<br>\";\n\t\t//echo \"mdate: \".$mdate.\"<br>\";\n\t\t$curdate = exponent_datetime_startOfDayTimestamp(mktime(8,0,0,$dateinfo['mon'],$mdate,$dateinfo['year']));\n\t} while ($curdate <= $end);\n\t\n\t//exit();\n\treturn $dates;\n}", "title": "" }, { "docid": "f2889be440788641a8513bbb819d4a0b", "score": "0.4418284", "text": "public function createPeriod() {\n //Create a period for the schedule\n $input = Input::all();\n $schedulePeriod = new SchedulePeriodModel();\n $schedulePeriod->schedule_id = $input['scheduleSelect'];\n $schedulePeriod->description = $input['description'];\n $schedulePeriod->start_date = $input['start_date'];\n $schedulePeriod->end_date = $input['end_date'];\n $schedulePeriod->save();\n\n //Hardcoded list of weekday abbreviations used in html form\n $myList = ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun'];\n\n //Create 7 weekdays per period\n for ($x = 0; $x < 7; $x++) {\n //$nr indicates the amount of different worktimes for that weekday during that period\n $nr = $input['repeat_number_'.$myList[$x]];\n //If the day is fixed throughout the period\n if($nr == 0) {\n //Create weekday and update db\n $scheduleWeekday = new ScheduleWeekdayModel();\n $scheduleWeekday->period_id = $schedulePeriod->id;\n $scheduleWeekday->start_time = $input['start_time_'.$myList[$x].'_0'];\n $scheduleWeekday->end_time = $input['end_time_'.$myList[$x].'_0'];\n $scheduleWeekday->repeat = $nr;\n $scheduleWeekday->day = $myList[$x];\n $scheduleWeekday->save();\n } \n //If the worktimes are different on the same weekday depending on the week\n else {\n for($i = 0; $i < $nr + 1; $i++) {\n //Create weekday and update db\n $scheduleWeekday = new ScheduleWeekdayModel();\n $scheduleWeekday->period_id = $schedulePeriod->id;\n $scheduleWeekday->start_time = $input['start_time_'.$myList[$x].'_'.$i];\n $scheduleWeekday->end_time = $input['end_time_'.$myList[$x].'_'.$i];\n $scheduleWeekday->repeat = $nr;\n $scheduleWeekday->day = $myList[$x];\n $scheduleWeekday->save();\n\n //Create link entry in repeat table\n $scheduleRepeat = new ScheduleRepeatModel();\n $scheduleRepeat->weekday_id = $scheduleWeekday->id;\n $scheduleRepeat->start_date = $input['date_'.$i];\n $scheduleRepeat->save();\n }\n }\n } \n return view('welcome');\n }", "title": "" }, { "docid": "f899054c3f92c8b22a7210265908a0c5", "score": "0.4415205", "text": "public function getTimePeriods()\r\n {\r\n return TimeHelper::timePeriods();\r\n }", "title": "" }, { "docid": "9cf6e177efe9a07aaa6c7b4722940c57", "score": "0.44012812", "text": "public function setTimeLimits($s = null, $e = null)\n {\n if ($s && is_string($s)) {\n $times = $this->genTime($s);\n $this->options['RequestedFromDate'] = $times;\n }\n if ($e && is_string($e)) {\n $timee = $this->genTime($e);\n $this->options['RequestedToDate'] = $timee;\n }\n if (isset($this->options['RequestedFromDate']) &&\n isset($this->options['RequestedToDate']) &&\n $this->options['RequestedFromDate'] > $this->options['RequestedToDate']\n ) {\n $this->setTimeLimits($this->options['RequestedToDate'].' - 1 second');\n }\n }", "title": "" }, { "docid": "70876665f20fd894892ecaf26f2b0934", "score": "0.43848696", "text": "public function periodRanges(): Collection\n {\n return Period::makeRanges($this->getConfig('strategy.keep-backups', []));\n }", "title": "" }, { "docid": "1a0fa0de08502b96c2f22c3589fe1da9", "score": "0.43659687", "text": "function exponent_datetime_recurringYearlyDates($start,$end,$freq) {\n\t$dates = array();\n\n\t$freq = '+'.$freq.' year';\n\twhile ($start <= $end) {\n\t\t$dates[] = $start;\n\t\t$start = strtotime($freq,$start);\n\t}\n\n\treturn $dates;\n}", "title": "" }, { "docid": "50c173fed38a1372d116828c63d0e791", "score": "0.43652114", "text": "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}", "title": "" }, { "docid": "32846ecc80f35a03588da1d1fb43a0fc", "score": "0.43646735", "text": "function insert_all_recurrences($event,$_start,$end,&$events)\n\t{\n\t\tif ((int) $this->debug >= 3 || $this->debug == 'set_recurrences' || $this->debug == 'check_move_horizont' || $this->debug == 'insert_all_recurrences')\n\t\t{\n\t\t\t$this->debug_message(__METHOD__.'(%1,%2,%3,&$events)',true,$event,$_start,$end);\n\t\t}\n\t\t$end_in = $end;\n\n\t\t$start = $this->date2ts($_start);\n\t\t$event_start_ts = $this->date2ts($event['start']);\n\t\t$event_length = $this->date2ts($event['end']) - $event_start_ts;\t// we use a constant event-length, NOT a constant end-time!\n\n\t\t// if $end is before recur_enddate, use it instead\n\t\tif (!$event['recur_enddate'] || $this->date2ts($event['recur_enddate']) > $this->date2ts($end))\n\t\t{\n\t\t\t//echo \"<p>recur_enddate={$event['recur_enddate']}=\".egw_time::to($event['recur_enddate']).\" > end=$end=\".egw_time::to($end).\" --> using end instead of recur_enddate</p>\\n\";\n\t\t\t// insert at least the event itself, if it's behind the horizont\n\t\t\t$event['recur_enddate'] = $this->date2ts($end) < $this->date2ts($event['end']) ? $event['end'] : $end;\n\t\t}\n\t\t// unset exceptions, as we need to add them as recurrence too, but marked as exception\n\t\tunset($event['recur_exception']);\n\t\t// loop over all recurrences and insert them, if they are after $start\n\t\t$rrule = calendar_rrule::event2rrule($event, true);\t// true = we operate in usertime, like the rest of calendar_bo\n\t\tforeach($rrule as $time)\n\t\t{\n\t\t\t$time->setUser();\t// $time is in timezone of event, convert it to usertime used here\n\t\t\tif (($ts = $this->date2ts($time)) < $start-$event_length)\n\t\t\t{\n\t\t\t\t//echo \"<p>\".$time.\" --> ignored as $ts < $start-$event_length</p>\\n\";\n\t\t\t\tcontinue;\t// to early or original event (returned by interator too)\n\t\t\t}\n\n\t\t\t$ts_end = $ts + $event_length;\n\t\t\t// adjust ts_end for whole day events in case it does not fit due to\n\t\t\t// spans over summer/wintertime adjusted days\n\t\t\tif($event['whole_day'] && ($arr_end = $this->date2array($ts_end)) &&\n\t\t\t\t!($arr_end['hour'] == 23 && $arr_end['minute'] == 59 && $arr_end['second'] == 59))\n\t\t\t{\n\t\t\t\t$arr_end['hour'] = 23;\n\t\t\t\t$arr_end['minute'] = 59;\n\t\t\t\t$arr_end['second'] = 59;\n\t\t\t\t$ts_end_guess = $this->date2ts($arr_end);\n\t\t\t\tif($ts_end_guess - $ts_end > DAY_s/2)\n\t\t\t\t{\n\t\t\t\t\t$ts_end = $ts_end_guess - DAY_s; // $ts_end_guess was one day too far in the future\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$ts_end = $ts_end_guess; // $ts_end_guess was ok\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$event['start'] = $ts;\n\t\t\t$event['end'] = $ts_end;\n\t\t\t$events[] = $event;\n\t\t}\n\t\tif ($this->debug && ((int) $this->debug > 2 || $this->debug == 'set_recurrences' || $this->debug == 'check_move_horizont' || $this->debug == 'insert_all_recurrences'))\n\t\t{\n\t\t\t$event['start'] = $event_start_ts;\n\t\t\t$event['end'] = $event_start_ts + $event_length;\n\t\t\t$this->debug_message(__METHOD__.'(%1,start=%2,end=%3,events) events=%5',True,$event,$_start,$end_in,$events);\n\t\t}\n\t}", "title": "" }, { "docid": "5c415b5764aa12d82489bb2e08cc82d7", "score": "0.43423975", "text": "function nsp_cron_intervals( $schedules ) {\n\t$schedules['fourlybyday'] = array(\n\t\t'interval' => 21600, // seconds.\n\t\t'display' => __( 'Four time by Day', 'newstatpress' ),\n\t);\n\t$schedules['weekly'] = array(\n\t\t'interval' => 604800,\n\t\t'display' => __( 'Once a Week', 'newstatpress' ),\n\t);\n\t$schedules['monthly'] = array(\n\t\t'interval' => 2635200,\n\t\t'display' => __( 'Once a Month', 'newstatpress' ),\n\t);\n\treturn $schedules;\n}", "title": "" }, { "docid": "3b60289d54e00ff737cb9621f92d855f", "score": "0.43408749", "text": "function tfls_cron_schedules( $schedules ) {\n\n\tif ( ! array_key_exists( '4weeks', $schedules ) ) {\n\t\t$schedules['4weeks'] = array(\n\t\t\t'interval' => 2419200,\n\t\t\t'display' => __( 'Once every 4 weeks.' )\n\t\t);\n\t}\n\n\treturn $schedules;\n}", "title": "" }, { "docid": "9709d33ac4374cb918abfa5690031e0c", "score": "0.43251464", "text": "function mrbsCreateRepeatingEntrys($starttime, $endtime, $rep_type, $rep_enddate, $rep_opt,\n $room_id, $owner, $name, $type, $description, $rep_num_weeks)\n{\n\tglobal $max_rep_entrys;\n\t\n\t$reps = mrbsGetRepeatEntryList($starttime, $rep_enddate, $rep_type, $rep_opt, $max_rep_entrys, $rep_num_weeks);\n\tif(count($reps) > $max_rep_entrys)\n\t\treturn 0;\n\t\n\tif(empty($reps))\n\t{\n\t\t$ent = mrbsCreateSingleEntry($starttime, $endtime, 0, 0, $room_id, $owner, $name, $type, $description);\n\t\treturn $ent;\n\t}\n\t\n\t$ent = mrbsCreateRepeatEntry($starttime, $endtime, $rep_type, $rep_enddate, $rep_opt, $room_id, $owner, $name, $type, $description, $rep_num_weeks);\n\tif($ent)\n\t{\n\t\n\t\tfor($i = 0; $i < count($reps); $i++)\n\t\t{\n\t\t\t# calculate diff each time and correct where events\n\t\t\t# cross DST\n\t\t\t$diff = $endtime - $starttime;\n\t\t\t$diff += cross_dst($reps[$i], $reps[$i] + $diff);\n\t \n\t\t\tmrbsCreateSingleEntry($reps[$i], $reps[$i] + $diff, 1, $ent,\n\t\t\t\t $room_id, $owner, $name, $type, $description);\n\t\t}\n\t}\n\treturn $ent;\n}", "title": "" }, { "docid": "6c4bddf823932dd93f930bf90b80a530", "score": "0.432199", "text": "function recurring_period($recurringstart,$frequency)\n {\n if ($frequency == ILP_RECURRING_DAY){\n //$start\n $strstart = date(\"d-m-Y\",$recurringstart);\n $recurringend = strtotime(\"{$strstart} + 1 day\");\n if ( time() > $recurringstart && time() < $recurringend ) {\n return array('start'=>$recurringstart,'end'=>$recurringend);\n } else {\n return $this->recurring_period($recurringend,$frequency);\n }\n } else {\n $strstart = date(\"d-m-Y\",$recurringstart);\n $recurringend = strtotime(\"{$strstart} + $frequency weeks\");\n if ( time() > $recurringstart && time() < $recurringend ) {\n return array('start'=>$recurringstart,'end'=>$recurringend);\n } else {\n return $this->recurring_period($recurringend,$frequency);\n }\n }\n }", "title": "" }, { "docid": "0cde1368205199015bb7d9054161d163", "score": "0.43119925", "text": "public function getPeriodAllowableValues()\n {\n return [\n self::PERIOD_MINUTE,\n self::PERIOD_DAY,\n self::PERIOD_WEEK,\n self::PERIOD_MONTH,\n self::PERIOD_YEAR,\n ];\n }", "title": "" }, { "docid": "0fcf75846f8d0ca6e36d0667def9fc12", "score": "0.4307981", "text": "public function setAbsencePeriod($thermostatId, \\DateTimeInterface $startDate, \\DateTimeInterface $endDate) {\n $body = \\GuzzleHttp\\json_encode([\n 'start_date' => $startDate->format('YmdHi'),\n 'end_date' => $endDate->format('YmdHi'),\n ]);\n $request = new Request('POST', sprintf('/devices/thermostats/%s/absence', $thermostatId), ['Content-Type' => 'application/json'], $body);\n return new Message($request);\n }", "title": "" }, { "docid": "d1bfc7039c40b5b936c48a052970d9f7", "score": "0.4295719", "text": "public function getPeriodAllowableValues() : array\n {\n return [\n self::PERIOD_PT5_M,\n self::PERIOD_PT15_M,\n self::PERIOD_PT30_M,\n self::PERIOD_PT1_H,\n self::PERIOD_PT2_H,\n self::PERIOD_PT4_H,\n self::PERIOD_PT8_H,\n self::PERIOD_PT12_H,\n self::PERIOD_P1_D,\n self::PERIOD_P2_D,\n self::PERIOD_P3_D,\n self::PERIOD_PT84_H,\n self::PERIOD_P7_D,\n self::PERIOD_P14_D,\n self::PERIOD_P15_D,\n self::PERIOD_P18_D,\n self::PERIOD_P30_D,\n self::PERIOD_P1_M,\n ];\n }", "title": "" }, { "docid": "f54640676c0cf304aafcd4b43623697c", "score": "0.42952988", "text": "private static function get_events() {\n\t\treturn array(\n\t\t\t'formidable_send_usage' => 'weekly',\n\t\t);\n\t}", "title": "" }, { "docid": "82ae752a2ce08e36211ee29816a2567a", "score": "0.42837375", "text": "public function get_test_scheduled_events()\n {\n }", "title": "" }, { "docid": "9f133e7fd04c1476b5fcf2b4b18bc4ad", "score": "0.42542604", "text": "public function rangesToDates(){\n $carbones=[];\n $CarbonInicio=$this->toCarbon('finicitas');\n $rangos=$this->rangesArray();\n $nsemanas=h::getIfNotPutSetting('sta','nSemanasParaCitas',3,SettingType::INTEGER_TYPE);\n $periodo=\\Carbon\\CarbonPeriod::create(\n $this->swichtDate('finicitas', false),\n $CarbonInicio->addWeek($nsemanas)->format('Y-m-d'));\n foreach($periodo as $CarbonP){ \n if($rangos[$CarbonP->dayOfWeek]['activo']=='1' &&\n !$this->isHolyDay($CarbonP)){\n $hinicio=(integer)substr($rangos[$CarbonP->dayOfWeek]['hinicio'],0,2);\n $minicio=(integer)substr($rangos[$CarbonP->dayOfWeek]['hinicio'],3,2);\n $hfinal=(integer)substr($rangos[$CarbonP->dayOfWeek]['hfin'],0,2);\n $mfinal=(integer)substr($rangos[$CarbonP->dayOfWeek]['hfin'],3,2);\n $carbones[]=new RangeDates([\n $CarbonP->hour($hinicio)->minute($minicio)->copy(),\n $CarbonP->hour($hfinal)->minute($mfinal)->copy()\n ]);\n }\n }\n return $carbones; \n \n }", "title": "" }, { "docid": "a1667e987a799f084a8a3331d465f3f8", "score": "0.42502028", "text": "private function fillDayPeriods($startDate, $endDate)\n {\n while (($startDate->isEarlier($endDate) || $startDate == $endDate)) {\n $this->addSubperiod(new Day($startDate));\n $startDate = $startDate->addDay(1);\n }\n }", "title": "" }, { "docid": "033d8516c9f0d3ab525cc8d8216dc457", "score": "0.42372108", "text": "function exponent_datetime_recurringWeeklyDates($start,$end,$freq,$days) {\n\t// Holding array, for keeping the timestamps of applicable dates.\n\t// This variable will be returned to the calling scope.\n\t$dates = array();\n\n\t// Need to figure out which weekday occurs directly after the specified\n\t// start date. This will be our launching point for the recurrence calculations.\n\t$dateinfo = getdate($start);\n\n\t// Finding the Start Date\n\t//\n\t// Start at the first weekday in the list ($days[$counter] where $counter is 0)\n\t// and go until we find a weekday greater than the weekday of the $start date.\n\t//\n\t// So, if we start on a Tuesday, and want to recur weekly for a MWF rotation,\n\t// This would check Monday, then Wednesday and stop, using wednesday for the\n\t// recacluated start date ($curdate)\n\tfor ($counter = 0; $counter < count($days); $counter++) {\n\t\tif ($days[$counter] >= $dateinfo['wday']) {\n\t\t\t// exit loop, we found the weekday to use ($days[$counter])\n\t\t\tbreak;\n\t\t}\n\t}\n\tif ($days[$counter] < $dateinfo['wday']) {\n\t\t// in case we did MWF and started on a Saturday...\n\t\t$counter = 0; // reset to first day of next week\n\t\t$start += 86400 * (7-$dateinfo['wday']+$days[$counter]);\n\t} else if ($days[$counter] > $dateinfo['wday']) {\n\t\t// 'Normal' case, in which we started before one of the repeat days.\n\t\t$start += 86400 * ($days[$counter] - $dateinfo['wday']);\n\t}\n\t// Found start date. Set curdate to the start date, so it gets picked\n\t// up in the do ... while loop.\n\t$curdate = $start;\n\n\t// Find all of the dates that match the recurrence criteria, within the\n\t// specified recurrence range. Implemented as a do ... while loop because\n\t// we always need at least the start date, and we have already determined\n\t// that with the code above (the $curdate variable)\n\tdo {\n\t\t// Append $curdate to the array of dates. $curdate will be changed\n\t\t// at the end of the loop, to be equal to the next date meeting the\n\t\t// criteria. If $curdate ever falls outside the recurrence range, the\n\t\t// loop will exit.\n\t\t$dates[] = $curdate;\n\t\t$curdate += 8*3600; // Add 8 hours, to avoid DST problems\n\t\t// Grab the date information (weekday, month, day, year, etc.) for\n\t\t// the current date, so we can ratchet up to the next date in the series.\n\t\t$dateinfo = getdate($curdate);\n\t\t// Get the current weekday.\n\t\t$day = $days[$counter];\n\t\t// Increment the counter so that the next time through we get the next\n\t\t// weekday. If the counter moves off the end of the list, reset it to 0.\n\t\t$counter++;\n\t\tif ($counter >= count($days)) {\n\t\t\t// Went off the end of the week. Reset the pointer to the beginning\n\t\t\t$counter = 0;\n\t\t\t// Difference in number of days between the last day in the rotation\n\t\t\t// and the first day (for recacluating the $curdate value)\n\t\t\t#$daydiff = $days[count($days)-1]-$days[0];\n\n\t\t\t$daydiff = 7 + $days[0] - $days[count($days)-1];\n\n\t\t\tif ($daydiff == 0) {\n\t\t\t\t// In case we are in a single day rotation, the difference will be 0.\n\t\t\t\t// It needs to be 7, so that we skip ahead a full week.\n\t\t\t\t$daydiff = 7;\n\t\t\t}\n\t\t\t// Increment the current date to go off to the next week, first weekday\n\t\t\t// in the rotation.\n\t\t\t$curdate += 7 * 86400 * ($freq-1) + 86400 * $daydiff; // Increment by number of weeks\n\t\t} else {\n\t\t\t// If we haven't gone off the end of the week, we just need to add the number\n\t\t\t// of days between the next weekday in the rotation ($days[$counter] - because\n\t\t\t// $counter was incremented above) and the $curdate weekday (store in the\n\t\t\t// $dateinfo array returned from the PHP call to getdate(), aboce).\n\t\t\t$curdate += 86400 * ($days[$counter] - $dateinfo['wday']);\n\t\t}\n\t\t// Round down to the start of the day (12:00 am) for $curdate, in case something\n\t\t// got a little out of whack thanks to DST.\n\t\t$curdate = exponent_datetime_startOfDayTimestamp($curdate);\n\t} while ($curdate <= $end); // If we go off the end of the recurrence range, ext.\n\n\t// We have no fully calculated the dates we need. Return them to the calling scope.\n\treturn $dates;\n}", "title": "" }, { "docid": "52d69a2a3c4ba4b290035efd5886e86d", "score": "0.42335427", "text": "public function createEvent($calendarID, $start, $end = false, $options = array(), $timezone = false, $allday = false, $notify = false)\n\t{\n\t\tif ($this->isAuthenticated())\n\t\t{\n\t\t\tif (!$start)\n\t\t\t{\n\t\t\t\t$startobj = new DateTime;\n\t\t\t}\n\t\t\telseif (is_int($start))\n\t\t\t{\n\t\t\t\t$startobj = new DateTime;\n\t\t\t\t$startobj->setTimestamp($start);\n\t\t\t}\n\t\t\telseif (is_string($start))\n\t\t\t{\n\t\t\t\t$startobj = new DateTime($start);\n\t\t\t}\n\t\t\telseif (is_a($start, 'DateTime'))\n\t\t\t{\n\t\t\t\t$startobj = $start;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new InvalidArgumentException('Invalid event start time.');\n\t\t\t}\n\n\t\t\tif (!$end)\n\t\t\t{\n\t\t\t\t$endobj = $startobj;\n\t\t\t}\n\t\t\telseif (is_int($end))\n\t\t\t{\n\t\t\t\t$endobj = new DateTime;\n\t\t\t\t$endobj->setTimestamp($end);\n\t\t\t}\n\t\t\telseif (is_string($end))\n\t\t\t{\n\t\t\t\t$endobj = new DateTime($end);\n\t\t\t}\n\t\t\telseif (is_a($end, 'DateTime'))\n\t\t\t{\n\t\t\t\t$endobj = $end;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new InvalidArgumentException('Invalid event end time.');\n\t\t\t}\n\n\t\t\tif ($allday)\n\t\t\t{\n\t\t\t\t$options['start'] = array('date' => $startobj->format('Y-m-d'));\n\t\t\t\t$options['end'] = array('date' => $endobj->format('Y-m-d'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$options['start'] = array('dateTime' => $startobj->format(DateTime::RFC3339));\n\t\t\t\t$options['end'] = array('dateTime' => $endobj->format(DateTime::RFC3339));\n\t\t\t}\n\n\t\t\tif ($timezone === true)\n\t\t\t{\n\t\t\t\t$options['start']['timeZone'] = $startobj->getTimezone()->getName();\n\t\t\t\t$options['end']['timeZone'] = $endobj->getTimezone()->getName();\n\t\t\t}\n\t\t\telseif (is_a($timezone, 'DateTimeZone'))\n\t\t\t{\n\t\t\t\t$options['start']['timeZone'] = $timezone->getName();\n\t\t\t\t$options['end']['timeZone'] = $timezone->getName();\n\t\t\t}\n\t\t\telseif (is_string($timezone))\n\t\t\t{\n\t\t\t\t$options['start']['timeZone'] = $timezone;\n\t\t\t\t$options['end']['timeZone'] = $timezone;\n\t\t\t}\n\n\t\t\t$url = 'https://www.googleapis.com/calendar/v3/calendars/' . urlencode($calendarID) . '/events' . ($notify ? '?sendNotifications=true' : '');\n\t\t\t$jdata = $this->query($url, json_encode($options), array('Content-type' => 'application/json'), 'post');\n\n\t\t\tif ($data = json_decode($jdata->body, true))\n\t\t\t{\n\t\t\t\treturn $data;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new UnexpectedValueException(\"Unexpected data received from Google: `{$jdata->body}`.\");\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "2fe290252d5546bdba8e074ecd73bf8a", "score": "0.42327836", "text": "function datePeriod_start_end($begin, $end)\n{\n $begin = new DateTime($begin);\n\n $end = new DateTime($end.' +1 day');\n\n $daterange = new DatePeriod($begin, new DateInterval('P1D'), $end);\n\n foreach ($daterange as $date) {\n $dates[] = $date->format(\"Y-m-d\");\n }\n return $dates;\n}", "title": "" }, { "docid": "78a3d7872675a06c4c8231dfedb840ed", "score": "0.4227162", "text": "public function findByPeriod(DateTimeInterface $periodStart, DateTimeInterface $periodEnd = null, Service $service = null, int $limit = null): array {\n $em = $this->getEntityManager();\n\n $params = [\n 'periodStart' => $periodStart,\n ];\n\n $dql = 'SELECT r\n FROM App\\Entity\\Rapport r\n WHERE r.dateDebutMission >= :periodStart'\n ;\n\n if(null !== $periodEnd) {\n $dql .= ' AND r.dateDebutMission < :periodEnd';\n $params['periodEnd'] = $periodEnd;\n }\n\n if(null !== $service) {\n $dql .= ' AND r.serviceCreateur = :service';\n $params['service'] = $service;\n }\n\n $dql .= ' ORDER BY r.dateDebutMission DESC';\n\n $query = $em->createQuery($dql)->setParameters($params);\n\n if(null !== $limit) {\n $query->setMaxResults($limit);\n }\n\n // returns an array of Product objects\n return $query->getResult();\n }", "title": "" }, { "docid": "6604d55d1acf22dcf652957882381ea6", "score": "0.42248937", "text": "public function setEvents(array $events)\n\t{\n\t\t$this->_events = $events;\n\t}", "title": "" }, { "docid": "7e64987dbc438a163d7a2e3bf18fdf43", "score": "0.42138293", "text": "function getDatesFromRange($start, $end, $format = 'Y-m-d') { \n \n // Declare an empty array \n $array = array(); \n \n // Variable that store the date interval \n // of period 1 day \n $interval = new DateInterval('P1D'); \n \n $realEnd = new DateTime($end); \n $realEnd->add($interval); \n \n $period = new DatePeriod(new DateTime($start), $interval, $realEnd); \n \n // Use loop to store date into array \n foreach($period as $date) { \n $array[] = $date->format($format); \n } \n \n // Return the array elements \n return $array; \n}", "title": "" }, { "docid": "24c667a350e2f11b5a0f9db922d3fbcb", "score": "0.4206903", "text": "public static function getActivityOptions(array $definitions) {\r\n\t\t$options\t= array();\r\n\t\t$activities\t= TodoyuProjectActivityManager::getAllActivities();\r\n\r\n//\t\t$selected\t= TodoyuArray::intExplode(',', $definitions['value'], true, true);\r\n//\t\t@todo check - selection needed? it's currently unused\r\n\r\n\t\tforeach($activities as $activity) {\r\n\t\t\t$options[] = array(\r\n\t\t\t\t'label'\t=> $activity['title'],\r\n\t\t\t\t'value'\t=> $activity['id']\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t$definitions['options'] = $options;\r\n\r\n\t\treturn $definitions;\r\n\t}", "title": "" }, { "docid": "32adb442d3d1f3db4950606b70a2ff7f", "score": "0.42004785", "text": "public function createEventsFromValidInputs($variables)\n {\n $startDate = new \\DateTime($variables['start'], new \\DateTimeZone($this->timezone));\n $endDate = new \\DateTime($variables['end'], new \\DateTimeZone($this->timezone));\n $rule = new Rule('FREQ='.$variables['freq'].';INTERVAL='.$variables['interval'], $startDate, $endDate, $this->timezone);\n\n // apply constraint - before end date\n $constraint = new BeforeConstraint(new \\DateTime($variables['end']));\n\n $events = $this->transformer->transform($rule, $constraint);\n\n // check expected event types by frequency, reccurence_count\n // helps achieve no of occurrence per interval e.g 'two times every 2 weeks' schedule\n // the functionality lacks in recurr, which is why I've added this little library\n if (isset($variables['recurrence_count']) && is_int($variables['recurrence_count'])) {\n return $this->createEventsByReccurenceCount($variables, $events);\n }\n\n return $this->eventsAsArray($events);\n }", "title": "" }, { "docid": "117da584813bba55f128cf3aea6426d6", "score": "0.41846916", "text": "public function reportsInPeriodScope($dateStart, $dateEnd);", "title": "" }, { "docid": "ec60aa70e51e1aab16d3261f0a1ea8cd", "score": "0.41842917", "text": "private function generatePeriod(\n \\DateTimeInterface $startDate,\n \\DateTimeInterface $endDate\n ): array {\n if ($endDate < $startDate) {\n throw new \\InvalidArgumentException(sprintf('The end date must not be before the start date'));\n }\n\n // By default diff and intervals don't include the last date. Extend\n // by one day so we are inclusive of the end date. We need to clone in\n // the case that $endDate is a \\DateTime and not \\DateTimeImmutable.\n $cloned = clone $endDate;\n $cloned = $cloned->modify('+1 day');\n\n // Include start and end, as we check them below for if they are working\n // days.\n // https://stackoverflow.com/questions/30446918/what-is-the-difference-between-the-days-and-d-property-in-dateinterval\n // documents the difference between 'd' (days past number of months) and\n // 'days' which is the total number of days.\n $days = $startDate->diff($cloned)->days;\n\n $period = new \\DatePeriod(\n $startDate, new \\DateInterval('P1D'), $cloned\n );\n\n return [$days, $period];\n }", "title": "" }, { "docid": "b40d2614de6856e00bfa3a1a46231dcd", "score": "0.41837347", "text": "public function setExpirationDate(string $purchased_time_period, int $uid = NULL): void;", "title": "" }, { "docid": "0bb9687f8afdc32167a533dc81dfcd22", "score": "0.4182823", "text": "function CalculateWeeklyRecurrancesInRange($startTime, $endTime, $event, $recurrance, $absoluteEnd)\r\n{\r\n\t$ret = array();\r\n\t\t\r\n\tif(strpos($recurrance,\"Every week\") === false || $endTime < $event->startTime || $absoluteEnd < $startTime){\r\n\t\treturn $ret;\r\n\t}\r\n\r\n\t$searchDate1 = clone $startTime;\r\n\t$searchDate2;\r\n\t\r\n\tfor($i = 0; $i < 7; $i++){\r\n\t\tif($searchDate1 > $endTime)\r\n\t\t\tbreak;\r\n\t\tif(strpos($recurrance,$searchDate1->format(\"l\")) !== false)\r\n\t\t{\r\n\t\t\t$searchDate2 = clone $searchDate1;\r\n\t\t\twhile($searchDate2 <= $endTime){\r\n\t\t\t\tif($searchDate2 > $endTime)\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t$newEvent = clone $event;\r\n\t\t\t\t$newEvent->startTime = date_create_from_format(\"Y-m-d H:i:s\", $searchDate2->format(\"Y-m-d\").\" \".$event->startTime->format(\"H:i:s\"));\r\n\t\t\t\t$newEvent->endTime = date_create_from_format(\"Y-m-d H:i:s\", $searchDate2->format(\"Y-m-d\").\" \".$event->endTime->format(\"H:i:s\"));\r\n\t\t\t\t//Checks: don't duplicate the original event, verify start & end time range\r\n\t\t\t\tif($newEvent->startTime->format(\"Y-m-d\") != $event->startTime->format(\"Y-m-d\") && $newEvent->startTime < $endTime && $newEvent->endTime > $startTime && !isException($newEvent->startTime, $event) && $newEvent->startTime > $event->startTime && $newEvent->endTime <= $absoluteEnd)\r\n\t\t\t\t\tarray_push($ret, $newEvent);\r\n\t\t\t\t$searchDate2->add(date_interval_create_from_date_string('7 days'));\r\n\t\t\t}\r\n\t\t}\r\n\t\t$searchDate1->add(date_interval_create_from_date_string('1 day'));\r\n\t}\r\n\treturn $ret;\r\n}", "title": "" }, { "docid": "1e3727dd6184bfd3674b76ee87ac722c", "score": "0.41809943", "text": "private function addMultipleWeekItem($ItemData, $DataStartDate, $DataStopDate, $set) {\r\n\t\r\n\t\t// add items to each day of week\r\n\t\twhile(list($ind, $start_day) = each($set)) {\r\n\t\t\t\r\n\t\t\t// add item to the week\r\n\t\t\t$this->addWeekly($ItemData, $DataStartDate, $DataStopDate, $start_day, $stop_day);\t\t\r\n\t\t\r\n\t\t}\r\n\t\r\n\t}", "title": "" }, { "docid": "4ee2cfda7e61f51b617b2d9854d5e743", "score": "0.41718546", "text": "public function setPeriodLength($period_length){\n if(!is_int($period_length)){\n throw new PhedorabotAPIError('Period length must be an integer');\n }\n return $this->setParameter('period_length',$period_length);\n }", "title": "" }, { "docid": "4bc8852e9bec42112a99562c89775bb0", "score": "0.41657984", "text": "function _whatsup_event_get_dates_and_times($start_only = FALSE) {\n\n $prompt_date_start = v(\"Please enter the date your event begins. Use two digits for the month, two digits for the day and four digits for the year.\");\n $prompt_date_end = v(\"Please enter the date your event ends. Use two digits for the month, two digits for the day and four digits for the year.\");\n $invalid_date_msg = v(\"Invalid date. Please try again.\");\n \n $prompt_time_start = v(\"Please enter the time your event starts. Use two digits for the hour and two digits for the minutes.\");\n $prompt_time_end = v(\"Please enter the time your event ends. Use two digits for the hour and two digits for the minutes.\");\n $invalid_time_msg = v(\"Invalid time. Please try again.\");\n \n $choices_end_date = array(1 => v('Does your event end on the same day it starts? If so, press 1.'),\n 2 => v('To define a new end date, press 2.'));\n \n $prompt_cancel_txt = 'To cancel the creation of this event'; \n\n $valid_dates = FALSE;\n while (!$valid_dates) {\n // record the start date and time\n $start_date = _whatsup_get_date($prompt_date_start, $invalid_date_msg, $prompt_cancel_txt); \n if (!is_array($start_date)) {\n return $start_date;\n } \n $start_time = _whatsup_get_time($prompt_time_start, $invalid_time_msg, $prompt_cancel_txt); \n if (!is_array($start_time)) {\n return $start_time;\n } \n $timestamp_start = mktime($start_time['hour'], $start_time['minute'], $start_time['second'], $start_date['month'], $start_date['day'], $start_date['year']); \n $array_start = array_merge($start_date, $start_time);\n\n if ($start_only) {\n $valid_end_date = TRUE;\n $timestamp_end = $timestamp_start; \n $array_end = $array_start;\n $valid_dates = TRUE;\n }\n else {\n $valid_end_date = FALSE;\n }\n\n while (!$valid_end_date) {\n // record the end date\n $choice = vio_menu($choices_end_date);\n if ($choice == 1) {\n $end_date = $start_date;\n }\n else {\n // record the end date\n $end_date = _whatsup_get_date($prompt_date_end, $invalid_date_msg, $prompt_cancel_txt); \n if (!is_array($end_date)) {\n return $end_date;\n } \n } \n\n // make sure end date happens after start date...\n $timestamp_start_date = mktime(0, 0, 0, $start_date['month'], $start_date['day'], $start_date['year']); \n $timestamp_end_date = mktime(0, 0, 0, $end_date['month'], $end_date['day'], $end_date['year']); \n if ($timestamp_start_date <= $timestamp_end_date) {\n $valid_end_date = TRUE;\n }\n else {\n $choices_invalid_end_date = array();\n $choices_invalid_end_date[1] = v('Your event end date is happening before the start date. To input a new end date, press 1.');\n $choices_invalid_end_date[2] = v('To record all the event dates and times once again, press 2.');\n $choice = vio_menu($choices_invalid_end_date);\n switch ($choice) {\n case 1: // re-record end date\n break;\n case 2: // re-record all dates and times\n $valid_end_date = TRUE;\n break;\n default:\n eh_error(\"Invalid choice selected when confirming invalid end event date: $choice\");\n vio_say('Processing error. Please contact your system administrator.');\n return -1;\n }\n }\n\n $valid_end_time = FALSE;\n while ((!$valid_end_time) && $valid_end_date) { \n // record the end time\n $end_time = _whatsup_get_time($prompt_time_end, $invalid_time_msg, $prompt_cancel_txt); \n if (!is_array($end_time)) {\n return $end_time;\n } \n $timestamp_end = mktime($end_time['hour'], $end_time['minute'], $end_time['second'], $end_date['month'], $end_date['day'], $end_date['year']); \n $array_end = array_merge($end_date, $end_time);\n // if singleday event, make sure end time is not before start time\n if ($timestamp_end > $timestamp_start) {\n $valid_end_time = TRUE;\n $valid_dates = TRUE;\n }\n else {\n $choices_invalid_end_time = array();\n $choices_invalid_end_time[1] = t('Your event end time is happening before the start time. To record a new end time, press 1.');\n $choices_invalid_end_time[2] = t('To re-record all the event dates and times once again, press 2.');\n $choice = vio_menu($choices_invalid_end_time);\n switch ($choice) {\n case 1: // re-record end time\n break;\n case 2: // re-record all dates and times\n $valid_end_time = TRUE;\n break;\n default:\n eh_error(\"Invalid choice selected when confirming invalid end event date: $choice\");\n vio_say('Processing error. Please contact your system administrator.');\n return -1;\n } \n }\n } // while $valid_end_time\n } // while $valid_end_date\n } // while $valid_dates\n\n $start_format = ($timestamp_start % 3600) ? 'l, M j, Y @ g:i A' : 'l, M j, Y @ g A';\n if ($start_only) {\n $prompt = t('Your event is planned for %event_start', array('%event_start' => date($start_format, $timestamp_start)));\n }\n else {\n $end_format = ($timestamp_end % 3600) ? 'l, M j, Y @ g:i A' : 'l, M j, Y @ g A';\n $prompt = t('Your event is planned to start %event_start and to end %event_end.', \n array('%event_start' => date($start_format, $timestamp_start), '%event_end' => date($end_format, $timestamp_end)));\n }\neh_log(\"$prompt\");\n vio_say($prompt);\n\n $rc = array('timestamp_start' => $timestamp_start, 'array_start' => $array_start, 'timestamp_end' => $timestamp_end, 'array_end' => $array_end);\n return $rc; \n}", "title": "" }, { "docid": "1e2009e08416e4c89850e0098eef86c6", "score": "0.4156435", "text": "public function get_periods($identifier) {\n $account = &$this->accounts[$identifier];\n $service_start_date = new DateTime($account['registered']);\n $next_due_date = $account['next_due_date'];\n $next_due_day = explode('-', $next_due_date);\n $next_due_day = $next_due_day[2];\n\n if ($service_start_date->format('d') > $next_due_day) {\n $service_start_date->modify('+1 month');\n }\n\n $start = new DateTime($service_start_date->format('Y-m-' . $next_due_day));\n\n $end = new DateTime();\n // $interval = DateInterval::createFromDateString('1 month');\n $interval = new DateInterval('P1M');\n $dtperiod = new DatePeriod($start, $interval, $end);\n foreach ($dtperiod as $date) {\n $d1 = clone $date;\n $d1->add($interval);\n $d1->modify('-1 second');\n $billing_dates[] = array('start' => $date , 'end' => $d1);\n }\n \n $billing_periods = array_slice($billing_dates,-14,14);\n\n return $billing_periods;\n }", "title": "" }, { "docid": "377d3bc0c9b95e6c6513ed459acbee25", "score": "0.41548327", "text": "public function testSetNewTime()\n {\n // 'time_end' => '2015-10-15 11:45:00',\n $app = new \\Application\\AppointmentItem(self::$arrayToTest);\n $app->setNewTime('12:30', '13:05');\n $this->assertEquals(new \\DateTime('2015-10-15 12:30:00'), $app->getTimeStart());\n $this->assertEquals(new \\DateTime('2015-10-15 13:05:00'), $app->getTimeEnd());\n $app->setNewTime('08:15', '00:00');\n $this->assertEquals(new \\DateTime('2015-10-15 08:15:00'), $app->getTimeStart());\n $this->assertEquals(new \\DateTime('2015-10-16 00:00:00'), $app->getTimeEnd());\n }", "title": "" }, { "docid": "1de9da37c00758d893ca8f5bab22915a", "score": "0.4154817", "text": "public static function setOptions(array $options)\n {\n foreach ($options as $key => $value) {\n Zend_TimeSync::$options[$key] = $value;\n }\n }", "title": "" }, { "docid": "a59d1051454f4a190ba8b574e6bb3c2d", "score": "0.4148372", "text": "public function setPeriod($value)\n {\n return $this->set('Period', $value);\n }", "title": "" }, { "docid": "a59d1051454f4a190ba8b574e6bb3c2d", "score": "0.4148372", "text": "public function setPeriod($value)\n {\n return $this->set('Period', $value);\n }", "title": "" }, { "docid": "a59d1051454f4a190ba8b574e6bb3c2d", "score": "0.4148372", "text": "public function setPeriod($value)\n {\n return $this->set('Period', $value);\n }", "title": "" }, { "docid": "67e74647032ca20be2ee3c550fd57849", "score": "0.41263604", "text": "private function setSchedule(array $schedule): void {\n $this->startAt = $schedule[\"start_at\"];\n $this->endAt = $schedule[\"end_at\"];\n }", "title": "" }, { "docid": "162d3f3e58c33ff6733d056570bab83b", "score": "0.41251084", "text": "public function setTimeSlots($val)\n {\n $this->_propDict[\"timeSlots\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "99c301bd03fd6435390099ed7ee2a350", "score": "0.4122071", "text": "public function getPeriodDatesProperty()\n {\n $now = Carbon::now()->timezone(\"America/Bogota\");\n $min = $now->copy();\n $max = $now->copy();\n\n switch ($this->period) {\n case 'today':\n break;\n case 'yesterday':\n $min->subDay();\n $max->subDay();\n break;\n case 'thisWeek':\n $min->startOfWeek();\n $max->endOfWeek();\n break;\n case 'lastWeek':\n $min->subWeek()->startOfWeek();\n $max->subWeek()->endOfWeek();\n break;\n case 'thisFortnight':\n if ($min->day > 15) {\n $min->day(16);\n $max->endOfMonth();\n } else {\n $min->startOfMonth();\n $max->startOfMonth()->addDays(14);\n }\n break;\n case 'lastFortnight':\n if ($min->day > 15) {\n $min->startOfMonth();\n $max->startOfMonth()->addDays(14);\n } else {\n $min->subMonth()->day(16);\n $max->subMonth()->endOfMonth();\n }\n break;\n case 'thisMonth':\n $min->startOfMonth();\n $max->endOfMonth();\n break;\n case 'lastMonth':\n $min->subMonth()->startOfMonth();\n $max->subMonth()->endOfMonth();\n break;\n\n default:\n # code...\n break;\n }\n\n $min->startOfDay();\n $max->endOfDay();\n $format = 'd-m-y H:i:s';\n\n return [\n 'min' => $min,\n 'minView' => $min->format($format),\n 'max' => $max,\n 'maxView' => $max->format($format),\n ];\n }", "title": "" }, { "docid": "5e836149f905ef7a8ead176088988906", "score": "0.41140935", "text": "public static function getDateRange($user, $timePeriod, $startDate = null, $endDate = null, $format = 'Y-m-d H:i:s')\n {\n switch ($timePeriod) {\n case 'week to date':\n if ($format === 'unixTimestamp') {\n $startTime = UnixTimestamp::createFromString(date('Y-m-d H:i:s', strtotime('this week midnight')), $user->profile->timezone, 'UTC');\n } else {\n $startTime = date($format, strtotime('this week midnight'));\n }\n break;\n case 'month to date':\n if ($format === 'unixTimestamp') {\n $startTime = UnixTimestamp::createFromString(date('Y-m-d H:i:s', strtotime('first day of this month midnight')), $user->profile->timezone, 'UTC');\n } else {\n $startTime = date($format, strtotime('first day of this month midnight'));\n }\n break;\n case 'quarter to date':\n // quarters are Jan 1, Apr 1, Jul 1, Oct 1\n $quarters = ['January 1 midnight', 'April 1 midnight', 'July 1 midnight', 'October 1 midnight'];\n $today = new Carbon();\n foreach ($quarters as $quarter) {\n $quarterDate = new Carbon($quarter);\n if ($quarterDate < $today && $today->diffInDays($quarter) < 100) {\n if ($format === 'unixTimestamp') {\n $startTime = UnixTimestamp::createFromString(date('Y-m-d H:i:s', strtotime($quarter)), $user->profile->timezone, 'UTC');\n } else {\n $startTime = date($format, strtotime($quarter));\n }\n break;\n }\n }\n break;\n case 'year to date':\n if ($format === 'unixTimestamp') {\n $startTime = UnixTimestamp::createFromString(date('Y-m-d H:i:s', strtotime('first day of January midnight')), env('USER_DEFAULT_TZ'), 'UTC');\n } else {\n $startTime = date($format, strtotime('first day of January midnight'));\n }\n break;\n case 'date range':\n if ($startDate) {\n if ($format === 'unixTimestamp') {\n $startTime = UnixTimestamp::createFromString($startDate, $user->profile->timezone, 'UTC');\n } else {\n $startTime = date($format, strtotime($startDate));\n }\n }\n if ($endDate) {\n if ($format === 'unixTimestamp') {\n $endTime = UnixTimestamp::createFromString($endDate, $user->profile->timezone, 'UTC');\n } else {\n $startTime = date($format, strtotime($endDate));\n }\n }\n break;\n default:\n if ($format === 'unixTimestamp') {\n $startTime = UnixTimestamp::createFromString(date('Y-m-d H:i:s', strtotime($timePeriod . ' midnight')), $user->profile->timezone, 'UTC');\n } else {\n $startTime = date($format, strtotime($timePeriod . ' midnight'));\n }\n }\n\n $dateRange = [];\n if (isset($startTime)) {\n $dateRange['start'] = $startTime;\n }\n if (isset($endTime)) {\n $dateRange['end'] = $endTime;\n }\n\n return $dateRange;\n }", "title": "" }, { "docid": "f3fbad097b0fa9b1cebf39ff8be68e82", "score": "0.4110669", "text": "public function setPeriod($var)\n {\n GPBUtil::checkEnum($var, \\Google\\Cloud\\ErrorReporting\\V1beta1\\QueryTimeRange\\Period::class);\n $this->period = $var;\n\n return $this;\n }", "title": "" }, { "docid": "88d8905d9993ff5e4d358436765a3c2b", "score": "0.41074833", "text": "public function definition(): array\n {\n return [\n 'started_at' => $startedAt = $this->faker->dateTimeThisYear(),\n 'ended_at' => $startedAt->add(DateInterval::createFromDateString('8 hours')),\n 'description' => $this->faker->realText(),\n 'is_pause' => $this->faker->boolean(25),\n ];\n }", "title": "" }, { "docid": "3e995c599272d26f879616dd6c4dc225", "score": "0.4104927", "text": "public function setUntil(DateTime $oUntil)\n\t{\n\t\t$this->aParameters['until'] = $oUntil->format('Y-m-d');\n\t}", "title": "" }, { "docid": "b1268e4299105cc41da1a7f0da2bb671", "score": "0.41029143", "text": "function emp_cron_schedules($schedules){\n\t$schedules['em_minute'] = array(\n\t\t'interval' => 60,\n\t\t'display' => 'Every Minute'\n\t);\n\treturn $schedules;\n}", "title": "" }, { "docid": "54d54c6b3e099653b86339c75469f56a", "score": "0.40969038", "text": "function setItems($item,$from,$to,$exc_entries){\n if ($item['allday'] > 0) {\n\t\t\t$item['begin'] = strtotime(strftime('%Y-%m-%d', $item['begin']));\n\t\t\tif ($item['begin'] > $item['end'])\n\t\t\t\t$item['end'] = strtotime(strftime('%Y-%m-%d', $item['begin']).'+1day')-1;\n\t\t\telse\n\t\t\t\t$item['end'] = strtotime(strftime('%Y-%m-%d', $item['end']).'+1day')-1;\n\t\t}\n\n\t\tif($item['event_type'] > 0)\n return $this->setRecurItemsList($item, $from, $to, $exc_entries);\n $itemarray = array();\n if(strtotime(strftime('%Y-%m-%d', $item['begin']))== strtotime(strftime(\"%Y-%m-%d\", $item['end']))){\n\t\t\t$itemarray[]=$item;\n return $itemarray;\n }\n if(($item['end'] && $item['begin'] != $item['end']) AND $this->conf['showMultiDayOnlyOnce'] == 0){\n\t\t\t\t$new_item = $item;\n\t\t\t\t$lastday = $item['end'];\n\t\t\t\t$firstday = $item['begin'];\n\t\t\t\t$time = $item['begin'];\n\t\t\t\t$new_item['mday']= $item['begin'];\n\t\t\t\t$i=0;\n\t\t\t\twhile($firstday<$lastday){\n\t\t\t\t\t$new_item['begin'] = $firstday;\n\t\t\t\t\t$new_item['end'] = $lastday;\n\t\t\t\t\t$new_item['i'] = $i;\n\t\t\t\t\t$itemarray[]= $new_item;\n\t\t\t\t\t$i++;\n\t\t\t\t\t$firstday = strtotime(strftime('%Y-%m-%d', $time).'+'.$i.'days');\n\t\t\t\t}\n } else\n\t\t\t$itemarray[]=$item;\n\t\treturn $itemarray;\n }", "title": "" }, { "docid": "04de1797d344d6b7de7381a84e9bd7d0", "score": "0.4094275", "text": "public function test_get_calendar_action_events_by_course_time_range() {\n $user = $this->getDataGenerator()->create_user();\n $course1 = $this->getDataGenerator()->create_course();\n $course2 = $this->getDataGenerator()->create_course();\n $generator = $this->getDataGenerator()->get_plugin_generator('mod_assign');\n $moduleinstance1 = $generator->create_instance(['course' => $course1->id]);\n $moduleinstance2 = $generator->create_instance(['course' => $course2->id]);\n\n $this->getDataGenerator()->enrol_user($user->id, $course1->id);\n $this->getDataGenerator()->enrol_user($user->id, $course2->id);\n $this->resetAfterTest(true);\n $this->setUser($user);\n\n $params = [\n 'type' => CALENDAR_EVENT_TYPE_ACTION,\n 'modulename' => 'assign',\n 'instance' => $moduleinstance1->id,\n 'userid' => $user->id,\n 'courseid' => $course1->id,\n 'eventtype' => 'user',\n 'repeats' => 0,\n 'timestart' => 1,\n ];\n\n $event1 = create_event(array_merge($params, ['name' => 'Event 1', 'timesort' => 1]));\n $event2 = create_event(array_merge($params, ['name' => 'Event 2', 'timesort' => 2]));\n $event3 = create_event(array_merge($params, ['name' => 'Event 3', 'timesort' => 3]));\n $event4 = create_event(array_merge($params, ['name' => 'Event 4', 'timesort' => 4]));\n $event5 = create_event(array_merge($params, ['name' => 'Event 5', 'timesort' => 5]));\n $event6 = create_event(array_merge($params, ['name' => 'Event 6', 'timesort' => 6]));\n $event7 = create_event(array_merge($params, ['name' => 'Event 7', 'timesort' => 7]));\n $event8 = create_event(array_merge($params, ['name' => 'Event 8', 'timesort' => 8]));\n\n $params['courseid'] = $course2->id;\n $params['instance'] = $moduleinstance2->id;\n $event9 = create_event(array_merge($params, ['name' => 'Event 9', 'timesort' => 1]));\n $event10 = create_event(array_merge($params, ['name' => 'Event 10', 'timesort' => 2]));\n $event11 = create_event(array_merge($params, ['name' => 'Event 11', 'timesort' => 3]));\n $event12 = create_event(array_merge($params, ['name' => 'Event 12', 'timesort' => 4]));\n $event13 = create_event(array_merge($params, ['name' => 'Event 13', 'timesort' => 5]));\n $event14 = create_event(array_merge($params, ['name' => 'Event 14', 'timesort' => 6]));\n $event15 = create_event(array_merge($params, ['name' => 'Event 15', 'timesort' => 7]));\n $event16 = create_event(array_merge($params, ['name' => 'Event 16', 'timesort' => 8]));\n\n $result = \\core_calendar\\local\\api::get_action_events_by_course($course1, 3, 6);\n\n $this->assertCount(4, $result);\n $this->assertEquals('Event 3', $result[0]->get_name());\n $this->assertEquals('Event 4', $result[1]->get_name());\n $this->assertEquals('Event 5', $result[2]->get_name());\n $this->assertEquals('Event 6', $result[3]->get_name());\n\n $result = \\core_calendar\\local\\api::get_action_events_by_course($course1, 10, 15);\n\n $this->assertEmpty($result);\n }", "title": "" }, { "docid": "d3685eb9c7cea0cecd3e67625c882db3", "score": "0.4093951", "text": "public function getPeriod();", "title": "" }, { "docid": "d1ed99db6b18bc5dccfb2c844989598a", "score": "0.40921107", "text": "private function _make_task_event($data, $start_date_event = false) {\n $event_type = \"task_deadline\";\n $event_custom_class = \"event-deadline-border\";\n if ($start_date_event) {\n $event_type = \"task_start_date\";\n $event_custom_class = \"\";\n }\n\n return array(\n \"title\" => $data->title,\n \"start\" => ($start_date_event ? $data->start_date : $data->deadline) . \" \" . \"00:00:00\",\n \"end\" => ($start_date_event ? $data->start_date : $data->deadline) . \" \" . \"23:59:59\", //show task deadline for the full day\n \"backgroundColor\" => $data->status_color,\n \"borderColor\" => $data->status_color,\n \"classNames\" => $event_custom_class,\n \"extendedProps\" => array(\n \"icon\" => \"list\",\n \"task_id\" => $data->id,\n \"cycle\" => 0,\n \"event_type\" => $event_type,\n )\n );\n }", "title": "" }, { "docid": "8691fdb9bc2945f0cc7403ec6202944a", "score": "0.40914226", "text": "function agenda_update_item($event_id, $title=NULL,$description=NULL, $start_date=NULL, $end_date=NULL, $author_id=NULL, $course_id, $update_repeat='this', $visibility='SHOW')\n{\n\t$final_result = true;\n\t$result = array();\n\t$repeat_type = get_lang('Each week');\n\n\t$formated_start_day = date(\"Y-m-d\",$start_date);\n\t$formated_start_hour = date(\"H:i:s\",$start_date);\n\t$formated_end_day = date(\"Y-m-d\",$end_date);\n\t$formated_end_hour = date(\"H:i:s\",$end_date);\n\t$today = date(\"Y-m-d H:i:s\",mktime());\n\n $sqlSet = array();\n if(!is_null($course_id)) $sqlSet[] = \"rel_event_recipient.course_id \t = '\" . addslashes(trim($course_id)) . \"' \";\n if(!is_null($title)) $sqlSet[] = \"event.title \t\t\t\t\t\t = '\" . addslashes(trim($title)) . \"' \";\n if(!is_null($description))$sqlSet[] = \"event.description \t\t\t\t = '\" . addslashes(trim($description)) . \"' \";\n if(!is_null($author_id)) $sqlSet[] = \"event.author_id \t\t\t\t = '\" . addslashes(trim($author_id)) . \"' \";\n\tif(!is_null($visibility)) $sqlSet[] = \"rel_event_recipient.visibility = '\" . ($visibility=='HIDE'?'HIDE':'SHOW') . \"'\";\n\tif(!is_null($start_date)) $sqlSet[] = \"event.start_date = '\" . $formated_start_day . ' ' . $formated_start_hour . \"' \";\n\tif(!is_null($end_date)) $sqlSet[] = \"event.end_date = '\" . $formated_end_day . ' ' . $formated_end_hour . \"' \";\n\n\tif ($update_repeat == 'this') //update this event\n\t{\n\t\tif (count($sqlSet)>0)\n\t\t{\n\t\t\t$sqlSet[] = \"event.master_event_id\t= NULL \"; //separates this event from a group of events \n\n\t\t\t$tbl = get_conf('mainTblPrefix') . 'event AS event INNER JOIN ' \n\t\t\t\t. get_conf('mainTblPrefix') . 'rel_event_recipient AS rel_event_recipient' \n\t\t\t\t. ' ON event.id = rel_event_recipient.event_id'; //update only the selected event\n\n\t\t\t$sql = \"UPDATE \" . $tbl . \"\n \t\t\t\tSET \" . implode(', ',$sqlSet) .\"\n \t\t\t\tWHERE event.id = \" . (int) $event_id ;\n\t\t\t$result[] = claro_sql_query($sql);\t\t\t\n\t\t}\n\t}\n\tif ($update_repeat=='from_this') //update from the selected event\n\t{\n\t\t$tbl = get_conf('mainTblPrefix') . 'event'; //get the master_event_id and the start_date from the selected event\n\t\t$sql = \"SELECT master_event_id,\n\t\t\t\t\t\t start_date\n\t\t\t FROM \" . $tbl . \"\n\t\t\t WHERE id = \" .(int) $event_id;\n\t\t$original_event = claro_sql_query_fetch_all($sql);\n\t\tif ($original_event == false)$result[] = $original_event;\n\n\t\tforeach($original_event as $this_original_event)\n\t\t{\n\t\t\t$tbl = get_conf('mainTblPrefix') . 'event'; //find the id of all events after the selected event\n\t\t\t$sql = \"SELECT id,\n\t\t\t\t\t\t\tstart_date,\n\t\t\t\t\t\t\tend_date\n\t\t\t\t\tFROM \" . $tbl . \"\n\t\t\t\t\tWHERE master_event_id = \" .(int) $this_original_event['master_event_id'] .\"\n\t\t\t\t\t\tAND start_date >= '\" . $this_original_event['start_date'] . \"'\n\t\t\t\t\tORDER BY start_date ASC\";\n\t\t\t$event_id_list = claro_sql_query_fetch_all($sql);\n\n\t\t\tif ($event_id_list == false)$result[] = $event_id_list;\n\t\t\t$nb_event = count($event_id_list);\n\n\t\t\tif ($nb_event>1) //find the repeat_type for this event\n\t\t\t{\n\t\t\t\t$first_comp = strtotime($event_id_list[0]['start_date']);\n\t\t\t\t$second_comp = strtotime($event_id_list[1]['start_date']);\n\t\t\t\t$day_numbers =($second_comp-$first_comp)/(24*60*60);\n\n\t\t\t\tif ($day_numbers==7) $repeat_type=get_lang('Each week');\n\t\t\t\tif ($day_numbers==1) $repeat_type=get_lang('Each day');\n\t\t\t\tif ($day_numbers==28 || $day_numbers==29 || $day_numbers==30 || $day_numbers==31) $repeat_type=get_lang('Each month');\n\t\t\t}\t\t\n\n\t\t\tforeach($event_id_list as $this_event_id)\n\t\t\t{\n\t\t\t\t$result[] = agenda_delete_item($this_event_id['id'],'this'); //delete the events after the selected event\n\t\t\t}\n\t\t\t$result[] = agenda_add_item($course_id, $author_id, $title, $description, $start_date, $end_date, $nb_event,$repeat_type, $visibility ); //create the new updated events\n\t\t}\n\t}\n\tif (is_array($result) && !empty($result))\n\t{\n\t\tforeach($result as $this_result)\n\t\t{\n\t\t\tif ($this_result==false) $final_result=false;\n\t\t}\n\t}\n return $final_result;\n}", "title": "" }, { "docid": "a6981e71657d493164001c1a8c938bd9", "score": "0.4090528", "text": "public function getPeriodDateRange($period, $dateFormat = false)\r\n {\r\n if ($dateFormat === false)\r\n {\r\n $dateFormat = DATE_FORMAT_YYYYMMDD;\r\n }\r\n\r\n $currentUnixTime = time();\r\n $currentDay = date('j', $currentUnixTime);\r\n $currentMonth = date('m', $currentUnixTime);\r\n $currentYear = date('Y', $currentUnixTime);\r\n\r\n switch ($period)\r\n {\r\n case TIME_PERIOD_TODAY:\r\n $startDate = self::getFormattedDate($currentUnixTime, $dateFormat);\r\n $endDate = $startDate;\r\n break;\r\n\r\n case TIME_PERIOD_YESTERDAY:\r\n $startUnixTime = mktime(\r\n 0,\r\n 0,\r\n 0,\r\n date('m', $currentUnixTime),\r\n date('j', $currentUnixTime) - 1,\r\n date('Y', $currentUnixTime)\r\n );\r\n\r\n $startDate = self::getFormattedDate($startUnixTime, $dateFormat);\r\n $endDate = $startDate;\r\n break;\r\n\r\n case TIME_PERIOD_THISWEEK:\r\n $currentWeekday = date('w', $currentUnixTime);\r\n $startUnixTime = mktime(\r\n 0,\r\n 0,\r\n 0,\r\n date('m', $currentUnixTime),\r\n date('j', $currentUnixTime) - $currentWeekday,\r\n date('Y', $currentUnixTime)\r\n );\r\n\r\n $endUnixTime = mktime(\r\n 0,\r\n 0,\r\n 0,\r\n date('m', $currentUnixTime),\r\n date('j', $currentUnixTime) - $currentWeekday + 6,\r\n date('Y', $currentUnixTime)\r\n );\r\n\r\n $startDate = self::getFormattedDate($startUnixTime, $dateFormat);\r\n $endDate = self::getFormattedDate($endUnixTime, $dateFormat);\r\n break;\r\n\r\n case TIME_PERIOD_LASTWEEK:\r\n $currentWeekday = date('w', $currentUnixTime);\r\n $startUnixTime = mktime(\r\n 0,\r\n 0,\r\n 0,\r\n date('m', $currentUnixTime),\r\n date('j', $currentUnixTime) - $currentWeekday - 7,\r\n date('Y', $currentUnixTime)\r\n );\r\n\r\n $endUnixTime = mktime(\r\n 0,\r\n 0,\r\n 0,\r\n date('m', $currentUnixTime),\r\n date('j', $currentUnixTime) - $currentWeekday - 1,\r\n date('Y', $currentUnixTime)\r\n );\r\n\r\n $startDate = self::getFormattedDate($startUnixTime, $dateFormat);\r\n $endDate = self::getFormattedDate($endUnixTime, $dateFormat);\r\n break;\r\n\r\n case TIME_PERIOD_LASTTWOWEEKS:\r\n $currentWeekday = date('w', $currentUnixTime);\r\n $startUnixTime = mktime(\r\n 0,\r\n 0,\r\n 0,\r\n date('m', $currentUnixTime),\r\n date('j', $currentUnixTime) - $currentWeekday - 7,\r\n date('Y', $currentUnixTime)\r\n );\r\n\r\n $endUnixTime = mktime(\r\n 0,\r\n 0,\r\n 0,\r\n date('m', $currentUnixTime),\r\n date('j', $currentUnixTime) - $currentWeekday + 6,\r\n date('Y', $currentUnixTime)\r\n );\r\n\r\n $startDate = self::getFormattedDate($startUnixTime, $dateFormat);\r\n $endDate = self::getFormattedDate($endUnixTime, $dateFormat);\r\n break;\r\n\r\n case TIME_PERIOD_THISMONTH:\r\n $startUnixTime = mktime(\r\n 0,\r\n 0,\r\n 0,\r\n date('m', $currentUnixTime),\r\n 1,\r\n date('Y', $currentUnixTime)\r\n );\r\n\r\n $lastDayOfMonth = self::getDaysInMonth(\r\n $currentMonth,\r\n $currentYear\r\n );\r\n $endUnixTime = mktime(\r\n 0,\r\n 0,\r\n 0,\r\n date('m', $currentUnixTime),\r\n $lastDayOfMonth,\r\n date('Y', $currentUnixTime)\r\n );\r\n\r\n $startDate = self::getFormattedDate($startUnixTime, $dateFormat);\r\n $endDate = self::getFormattedDate($endUnixTime, $dateFormat);\r\n break;\r\n\r\n case TIME_PERIOD_LASTMONTH:\r\n /* The 1st of 1 month ago. */\r\n $startUnixTime = mktime(\r\n 0,\r\n 0,\r\n 0,\r\n date('m', $currentUnixTime) - 1,\r\n 1,\r\n date('Y', $currentUnixTime)\r\n );\r\n\r\n /* The last day of 1 month ago. */\r\n $lastDayOfMonth = self::getDaysInMonth(\r\n date('m', $startUnixTime),\r\n date('Y', $startUnixTime)\r\n );\r\n $endUnixTime = mktime(\r\n 0,\r\n 0,\r\n 0,\r\n date('m', $currentUnixTime) - 1,\r\n $lastDayOfMonth,\r\n date('Y', $currentUnixTime)\r\n );\r\n\r\n $startDate = self::getFormattedDate($startUnixTime, $dateFormat);\r\n $endDate = self::getFormattedDate($endUnixTime, $dateFormat);\r\n break;\r\n\r\n case TIME_PERIOD_THISYEAR:\r\n /* January 1st of the current year. */\r\n $startUnixTime = mktime(\r\n 0,\r\n 0,\r\n 0,\r\n 1,\r\n 1,\r\n date('Y', $currentUnixTime)\r\n );\r\n\r\n /* December 31st of the current year. */\r\n $endUnixTime = mktime(\r\n 0,\r\n 0,\r\n 0,\r\n 12,\r\n 31,\r\n date('Y', $currentUnixTime)\r\n );\r\n\r\n $startDate = self::getFormattedDate($startUnixTime, $dateFormat);\r\n $endDate = self::getFormattedDate($endUnixTime, $dateFormat);\r\n break;\r\n\r\n case TIME_PERIOD_LASTYEAR:\r\n /* January 1st of the previous year. */\r\n $startUnixTime = mktime(\r\n 0,\r\n 0,\r\n 0,\r\n 1,\r\n 1,\r\n date('Y', $currentUnixTime) - 1\r\n );\r\n\r\n /* December 31st of the previous year. */\r\n $endUnixTime = mktime(\r\n 0,\r\n 0,\r\n 0,\r\n 12,\r\n 31,\r\n date('Y', $currentUnixTime) - 1\r\n );\r\n\r\n $startDate = self::getFormattedDate($startUnixTime, $dateFormat);\r\n $endDate = self::getFormattedDate($endUnixTime, $dateFormat);\r\n break;\r\n\r\n case TIME_PERIOD_TODATE:\r\n default:\r\n $startDate = false;\r\n $endDate = false;\r\n break;\r\n }\r\n\r\n return array(\r\n 'startDate' => $startDate,\r\n 'endDate' => $endDate\r\n );\r\n }", "title": "" }, { "docid": "adce8b010fb56620e690f459218ca5ec", "score": "0.40834266", "text": "function generateOptions()\n {\n $firstTime = strtotime($this->startTime);\n $lastTime = strtotime($this->endTime);\n $incrementMinutes = 60 / $this->incrementsPerHour;\n $incrementSeconds = 60 * $incrementMinutes;\n\n $options = array();\n $nextOption = $firstTime;\n do {\n $options[date('H:i:s', $nextOption)] = date($this->formatString, $nextOption);\n $nextOption += $incrementSeconds;\n } while ($nextOption <= $lastTime);\n $this->setOptions($options);\n }", "title": "" }, { "docid": "40c61030e28156c39fea2a919bb6a4b3", "score": "0.4077279", "text": "public function createCalendarOfLessons($weeklyFrequency, $duration, $startDate, $calendarToSave = array(), &$data=null)\n\t{\n\t\t$duration = (int)$duration * 60 * 60;//Convert duration from hours to seconds\n\n\t\t$totalDaysForWeek = array();\n\t\t$calendarOfLessons = array();\n\t\t$holidays = $this->getHolidays();\n\t\t$lessons = 0;\n\t\t\n\t\t$totalDaysAndHoursForWeek = $this->getTotalDaysAndHoursForWeek($weeklyFrequency);\n\t\t\n\t\t\n\t\tif (!empty($calendarToSave))\n\t\t\t$calendarOfLessons = $calendarToSave;\n\t\t\t\n\t\t$data['hours_for_week'] = $totalDaysAndHoursForWeek['totalHoursForWeek'];\n\t\t$totalDaysForWeek = $totalDaysAndHoursForWeek['totalDaysForWeek'];\n\t\t$data['days_for_week'] = implode(',', array_keys($totalDaysAndHoursForWeek['totalDaysForWeek']));\n\t\t\n\t\t//Calculate start date and end date \n\t\t$begin = new DateTime($startDate);\n\t\t$end = new DateTime($startDate);\n\t\t\n\t\t$end->modify('+52 weeks');\n\t\t$interval = new DateInterval('P1D');\n\t\t$daterange = new DatePeriod($begin, $interval ,$end);\n\t\t\n\t\t//Add at the end 10 hours to have some days \"free\"\n\t\t$extendDuration = (10 * 60 * 60) + $duration;//Convert duration from hours to seconds\n\t\t\n\t\t//Make calendar\n\t\tforeach($daterange as $date)\n\t\t{\t\n\t\t\t$key = strtoupper($date->format(\"F\"));\n\t\t\t\n\t\t\tif ($extendDuration > 0)\n\t\t\t{\n\t\t\t\tif (!isset($calendarOfLessons[$key]))\n\t\t\t\t{\n\t\t\t\t\t$calendarOfLessons[$key]['year'] = $date->format(\"Y\");\n\t\t\t\t\t$calendarOfLessons[$key]['days'] = array();\n\t\t\t\t}\n\n\t\t\t\tif (isset($totalDaysForWeek['day_of_week_'.$date->format(\"w\")])) \n\t\t\t\t{\n\t\t\t\t\t$day = $date->format(\"d-m-Y\");\n\t\t\t\t\t$calendarOfLessons[$key]['days'][$day] = new stdClass();\n\t\t\t\t\t$calendarOfLessons[$key]['days'][$day]->name = $date->format(\"D\");\n\t\t\t\t\t$calendarOfLessons[$key]['days'][$day]->number = $date->format(\"d\");\n\t\t\t\t\t$calendarOfLessons[$key]['days'][$day]->holiday = 0;\n\t\t\t\t\t$calendarOfLessons[$key]['days'][$day]->holidaytitle = '';\n\t\t\t\t\t$calendarOfLessons[$key]['days'][$day]->duration = $totalDaysForWeek['day_of_week_'.$date->format(\"w\")];\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//Check holidays\n\t\t\t\t\tif (isset($holidays[$key][$day]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$calendarOfLessons[$key]['days'][$day]->holiday = 1;\n\t\t\t\t\t\t$calendarOfLessons[$key]['days'][$day]->holidaytitle = $holidays[$key][$day][\"title\"];\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif ($calendarOfLessons[$key]['days'][$day]->holiday === 0 && $duration > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$calendarOfLessons[$key]['days'][$day]->checked = 1;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$duration -= $totalDaysForWeek['day_of_week_'.$date->format(\"w\")];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$extendDuration -= $totalDaysForWeek['day_of_week_'.$date->format(\"w\")];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $calendarOfLessons;\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t}", "title": "" }, { "docid": "ff6d45366b63d6731ad9f5f9da795601", "score": "0.4075279", "text": "public function get_events()\r\n\t {\r\n\t $start = $this->input->get(\"start\");\r\n\t $end = $this->input->get(\"end\");\r\n\r\n\t $startdt = new DateTime('now'); // setup a local datetime\r\n\t $startdt->setTimestamp($start); // Set the date based on timestamp\r\n\t $start_format = $startdt->format('Y-m-d H:i:s');\r\n\r\n\t $enddt = new DateTime('now'); // setup a local datetime\r\n\t $enddt->setTimestamp($end); // Set the date based on timestamp\r\n\t $end_format = $enddt->format('Y-m-d H:i:s');\r\n\r\n\t $events = $this->calendar_m->get_events($start_format, $end_format);\r\n\r\n\t $data_events = array();\r\n\r\n\t foreach($events->result() as $r) {\r\n\t $data_events[] = array(\r\n\t \"id\" => $r->id,\r\n\t \"title\" => $r->name,\r\n\t \"description\" => $r->description,\r\n\t \"end\" => date('Y-m-d', strtotime($r->end_date. ' + 1 day')),\r\n\t \"start\" => $r->start_date,\r\n\t \"event_time\" => $r->event_time,\r\n\t \"priest\" => $r->priest,\r\n\t );\r\n\t }\r\n\r\n\t echo json_encode(array(\"events\" => $data_events));\r\n\t exit();\r\n\t }", "title": "" }, { "docid": "6568fc4e374dc9361302662de562098d", "score": "0.40722623", "text": "public function testGetMessageListAppointments()\r\n\t{\r\n\t\t// Create an event to make sure we have at least one\r\n\t\t$obj = CAntObject::factory($this->dbh, \"calendar_event\", null, $this->user);\r\n\t\t$obj->setValue(\"name\", \"My Test Event\");\r\n\t\t$obj->setValue(\"ts_start\", date(\"m/d/Y\") . \" 12:00 PM\");\r\n\t\t$obj->setValue(\"ts_end\", date(\"m/d/Y\") . \" 01:00 PM\");\r\n\t\t$eid = $obj->save();\r\n\r\n\t\t// Get events\r\n\t\t$events = $this->backend->GetMessageList(\"calendar_root\", time()); // second param cuts off to today\r\n\t\t$found = false;\r\n\t\tforeach ($events as $evt)\r\n\t\t{\r\n\t\t\tif ($evt[\"id\"] == $eid)\r\n\t\t\t\t$found = true;\r\n\t\t}\r\n\t\t$this->assertTrue($found);\r\n\r\n\t\t// Cleanup\r\n\t\t$obj->removeHard();\r\n\t}", "title": "" }, { "docid": "e8b2fe13bf41d90cbde5f9c815649050", "score": "0.40719056", "text": "function get_new_events( $options=array() ){\n\t\t\n\t\tglobal $gamo, $dbh;\n\t\t\n\t\t$error_append = \" CLASS[\".__CLASS__.\"] METHOD[\".__METHOD__.\"] DATE[\".date('Y-m-d H:i:s').\"]\";\n\t\t\n\t\tCore::ensure_defaults(array(\n\t\t\t\t'start' => 0,\n\t\t\t\t'number' => 1\n\t\t\t),\n\t\t$options);\n\t\t\n\t\t$sql = \"SELECT id FROM \" . CORE_DB . \".\" . self::$table_name.\n\t\t\" WHERE active = 1 and hide = 0 ORDER BY date_time ASC LIMIT \".$options['start'].\",\".$options['number'];\n\n\t\t$sth = $dbh->prepare($sql);\n\n\t\t$vevents = array();\n\t\t$sth->execute();\n\n\t\twhile($row = $sth->fetch()) {\n\n\t\t\t$row = Core::r('virtual_events')->get_event(array(\n\t\t\t\t\t'id' => $row['id'],\n\t\t\t\t\t'public_has' => 1,\n\t\t\t\t\t'show_private_has' => 0\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tarray_push($vevents, $row);\n\n\t\t}\n\n\t\treturn $vevents;\n\t\t\n\t}", "title": "" }, { "docid": "c2008c0bf87fac25d1ee63da83cb20e5", "score": "0.40693223", "text": "function validate_notification_period( $notification_period, $default_notification_period, $valid_notification_periods ) {\n\n\tif ( in_array( $notification_period, $valid_notification_periods ) ) {\n\t\treturn true ;\n\t} else {\n\t\tprint \"# NOTE: Found notification_period \\\"$notification_period\\\" but skipping it because it is not in the list of valid_notification_periods. Using default \\\"$default_notification_period\\\".\" . PHP_EOL ;\n\t\treturn false ;\n\t}\n}", "title": "" }, { "docid": "87bcfc2766f6f648f20bdade1ddb9b91", "score": "0.4064764", "text": "public function getPeriodAllowableValues()\n {\n return [\n self::PERIOD_DAY,\n self::PERIOD_HALF_YEAR,\n self::PERIOD_MONTH,\n self::PERIOD_QUARTER,\n self::PERIOD_WEEK,\n self::PERIOD_ACADEMIC_TERM,\n self::PERIOD_YEAR,\n ];\n }", "title": "" }, { "docid": "c424718902c5946b476997c9adefc6a9", "score": "0.40631932", "text": "function setRecurItemsList($item, $from, $to,$exc_entries) {\n\t\t$begin = $item['begin'];\n\t\t$rec_end = $item['rec_end_date'];\n\t\t$itemarray = array();\n\n\t\tswitch ($item['event_type']){\n case 1:\n $steps = 'days';\n $repeat_time = $item['repeat_days']?$item['repeat_days']:1;\n\t\t\t\t$getdate = $this->getLastIntervalByDay($begin, $from, $repeat_time);\n\t\t\t\t$getdate['steps'] = 'days';\n break;\n case 2:\n $steps = 'days';\n $repeat_time = $item['repeat_weeks']?$item['repeat_weeks']*7:7;\n\t\t\t\t $getdate = $this->getLastIntervalByDay($begin, $from, $repeat_time);\n\t\t\t\t $getdate['steps'] = 'days';\n break;\n case 3:\n $steps = 'months';\n $repeat_time = $item['repeat_months']?$item['repeat_months']:1;\n\t\t\t\t$getdate = $this->getLastIntervalByMonth($begin, $from, $repeat_time);\n\t\t\t\t$getdate['steps']= 'months';\n break;\n case 4:\n $steps = 'months';\n $repeat_time = $item['repeat_years']?$item['repeat_years']*12:12;\n\t\t\t\t$getdate = $this->getLastIntervalByMonth($begin, $from, $repeat_time);\n\t\t\t\t$getdate['steps'] = 'months';\n\t\t\t\tbreak;\n }\n\n\t\tif($item['rec_time_x'] > 0){\n $x_end = strtotime(strftime('%Y-%m-%d %H:%M:0 ', $item['begin']).$item['rec_time_x']*$repeat_time.' '.$getdate['steps']);\n\t\t}\n\n\t\tif($x_end) {\n\t\t\tif($rec_end && $x_end > $rec_end)\n\t\t\t\t$getdate['end'] = $rec_end;\n else {\n\t\t\t\t$getdate['end'] = $x_end;\n\t\t\t\t$rec_end = 0;\n\t\t\t}\n\t\t} else {\n\t\t\t$getdate['end'] = $rec_end;\n\t\t}\n\n\t\tif($item['event_type'] == 2) {\n\t\t\tswitch ($item['rec_weekly_type']) {\n\t\t\t\tcase 1:\n\t\t\t\t\t$rwds = $weekdays = array(1,1,1,1,1,0,0);\n\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\t$rwds = array(0,0,0,0,0,1,1);\n\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$rwds = array($item['repeat_week_monday'],$item['repeat_week_tuesday'],$item['repeat_week_wednesday'],$item['repeat_week_thursday'],$item['repeat_week_friday'],$item['repeat_week_saturday'],$item['repeat_week_sunday']);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t/*----BUGFIX-----\n\t\t\t * If the interval is not set one back, the script skip the last days to be shown, if they are set to following month\n\t\t\t * If the interval is set one back, the script automatically jumps back two intervalls\n\t\t\t * ----------------------\n\t\t\t * don't know why... but it works. that's all, that counts...\n\t\t\t/--------------*/\n\n\t\t\t$getdate['lastint']--;\n\n\t\t\t$getdate['begin'] = $item['begin'];\n\n\t\t\t$item['begin'] = strtotime(strftime('%Y-%m-%d ', $item['begin']).$getdate['interval']*$getdate['lastint'].$getdate['steps'].' monday this week')+($item['begin']-strtotime(strftime('%Y-%m-%d', $item['begin'])));\n\t\t\t$item['end'] = $item['begin'] + ($item['end'] - $getdate['begin']);\n\n\t\t\tfor($add=0;$add<7;$add++){\n\t\t\t\tif($rwds[$add]){\n\t\t\t\t\t$item_array = $this->setRecItemArray($from, $to, $item, $getdate, $item_array, $exc_entries);\n\t\t\t\t}\n\t\t\t\t$item['begin'] = $item['begin'] + 86400;\n\t\t\t\t$item['end'] = $item['end'] + 86400;\n\t\t\t}\n\n\t\t} else {\n\t\t\t$item_array = $this->setRecItemArray($from, $to, $item, $getdate, $item_array,$exc_entries);\n\t\t}\n\t\treturn $item_array;\n\t}", "title": "" }, { "docid": "7b9f1bda951de02ea2d2ae452a401a51", "score": "0.40602207", "text": "public function setHolidayObjects(): void{\n $holidays = [ '01-01-2014','20-01-2014','17-02-2014',\n '26-05-2014','04-07-2014','01-09-2014',\n '13-10-2014','11-11-2014','27-11-2014',\n '25-12-2014','01-01-2015','19-01-2015',\n '16-02-2015','25-05-2015','03-07-2015',\n '07-09-2015','12-10-2015','11-11-2015',\n '26-11-2015','25-12-2015'];\n $holidayObjects = [];\n $format = 'd-m-Y';\n foreach($holidays as $date){\n $d = DateTime::createFromFormat($format, $date);\n array_push($holidayObjects,$d);\n }\n $this->holidayObjects = $holidayObjects;\n }", "title": "" }, { "docid": "41715ab5c268affa4f57613a33a86f54", "score": "0.40586156", "text": "function get_possible_times($transmit) {\n\t\tglobal $database, $conn, $response;\n\t\t// need a new PDO to make a new query\n\t\t$conn = $database->getConnection();\n\t\t$stmt = $conn->query(\"call getAppointmentTimes(\\\"{$transmit[\"date\"]}\\\")\");\n\n\n\n\t\t// expect at least one tuple returned\n\t\tif ($row = $stmt->fetch()) {\n\t\t\t// these fields are defined whether there are appointments scheduled or not\n\t\t\t$response->openTime = $row[\"openTime\"];\n\t\t\t$response->closeTime = $row[\"closeTime\"];\n\t\t\t$response->existsAppts = intval($row[\"existsAppts\"]);\n\n\t\t\t// A Workday may or may not have any scheduled appointments.\n\t\t\t// First, we read in all the appointments, then generate possible\n\t\t\t// appointment times in the gaps.\n\t\t\tif ($response->existsAppts == 1) {\n\t\t\t\t// Reading them in:\n\t\t\t\t// \t\tapts is a 2D array, the first indexes the appointment,\n\t\t\t\t// \t\tthe second accesses the start time [0] or end time [1]\n\t\t\t\t$response->appts = array(array());\n\t\t\t\t$i = 0;\n\n\t\t\t\t$response->appts[$i][0] = $row[\"startTime\"];\n\t\t\t\t$response->appts[$i][1] = $row[\"endTime\"];\n\n\t\t\t\twhile ($row = $stmt->fetch()) {\n\t\t\t\t\t$i++;\n\t\t\t\t\t$response->appts[$i][0] = $row[\"startTime\"];\n\t\t\t\t\t$response->appts[$i][1] = $row[\"endTime\"];\n\t\t\t\t}\n\n\t\t\t\t// Now we generate the possible appointments\n\t\t\t\t// STEP 1: GENERATE APPOINTMENTS BETWEEN THE SITE OWNER'S (openTime)\n\t\t\t\t// AND THE FIRST SCHEDULED APPOINTMENT\n\t\t\t\t$response->firstApptStart = new DateTimeImmutable(\"{$transmit[\"date\"]} {$response->appts[0][0]}\");\n\t\t\t\t$response->firstApptStart = $response->firstApptStart->modify(\"-5 minute\");\n\t\t\t\t// traverses all possible times and adds them to response\n\t\t\t\t$trav = new DateTimeImmutable(\"{$transmit[\"date\"]} {$response->openTime}\");\n\t\t\t\t$response->startTime = new DateTimeImmutable(\"{$transmit[\"date\"]} {$response->openTime}\");\n\t\t\t\t$interval_num = 0;\n\n\t\t\t\twhile ($trav->modify(\"+{$transmit[\"duration\"]} minute\") <= $response->firstApptStart)\n\t\t\t\t{\n\t\t\t\t\t$response->times[$interval_num][0] = $trav->format(\"H:i\");\n\t\t\t\t\t$response->times[$interval_num][1] = $trav->modify(\"+{$transmit[\"duration\"]} minute\")->format(\"H:i\");\n\n\n\t\t\t\t\t$trav = $trav->modify(\"+15 minute\");\n\n\t\t\t\t\t$interval_num++;\n\t\t\t\t}\n\n\t\t\t\t// STEP 2: GENERATE POSSIBLE APPOINTMENTS \"IN THE GAPS\" -> BETWEEN SCHEDULED APPOINTMENTS\n\n\t\t\t\tfor ($i = 0; $i < count($response->appts) - 1; $i++) {\n\t\t\t\t\t// next appt start time\n\t\t\t\t\t$response->nextApptStart = new DateTimeImmutable(\"{$transmit[\"date\"]} {$response->appts[$i + 1][0]}\");\n\t\t\t\t\t$response->nextApptStart = $response->nextApptStart->modify(\"-5 minute\");\n\t\t\t\t\t// traverses all possible times and adds them to response - starts with first appointment end time + buffer\n\t\t\t\t\t$trav = new DateTimeImmutable(\"{$transmit[\"date\"]} {$response->appts[$i][1]}\");\n\t\t\t\t\t$trav = $trav->modify(\"+5 minute\");\n\t\t\t\t\t$adjustIntervalVal = $interval_num;\n\t\t\t\t\twhile ($trav->modify(\"+{$transmit[\"duration\"]} minute\") <= $response->nextApptStart)\n\t\t\t\t\t{\n\t\t\t\t\t\t$response->times[$interval_num][0] = $trav->format(\"H:i\");\n\t\t\t\t\t\t$response->times[$interval_num][1] = $trav->modify(\"+{$transmit[\"duration\"]} minute\")->format(\"H:i\");\n\n\t\t\t\t\t\tif ($adjustIntervalVal == $interval_num){\n\t\t\t\t\t\t\t$trav = $trav->modify(\"+10 minute\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$trav = $trav->modify(\"+15 minute\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$interval_num++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// STEP 3: GENERATE POSSIBLE APPOINTMENTS BETWEEN THE LAST APPOINTMENT'S END TIME\n\t\t\t\t// AND THE SITE OWNER'S (closeTime)\n\t\t\t\t// site owner's close time\n\t\t\t\t$response->closingTimeObj = new DateTimeImmutable(\"{$transmit[\"date\"]} {$response->closeTime}\");\n\t\t\t\t// traverses all possible times and adds them to response -> starts with last appointment end time + buffer\n\t\t\t\t$trav = new DateTimeImmutable(\"{$transmit[\"date\"]} {$response->appts[count($response->appts) - 1][1]}\");\n\t\t\t\t$trav = $trav->modify(\"+5 minute\");\n\n\t\t\t\t$adjustIntervalVal = $interval_num;\n\t\t\t\twhile ($trav->modify(\"+{$transmit[\"duration\"]} minute\") <= $response->closingTimeObj)\n\t\t\t\t{\n\t\t\t\t\t$response->times[$interval_num][0] = $trav->format(\"H:i\");\n\t\t\t\t\t$response->times[$interval_num][1] = $trav->modify(\"+{$transmit[\"duration\"]} minute\")->format(\"H:i\");\n\n\t\t\t\t\tif ($adjustIntervalVal == $interval_num){\n\t\t\t\t\t\t$trav = $trav->modify(\"+10 minute\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$trav = $trav->modify(\"+15 minute\");\n\t\t\t\t\t}\n\t\t\t\t\t$interval_num++;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// if no appointments exist, generate possible appointments between openTime and endTime\n\t\t\t\t$response->times = array(array());\n\n\t\t\t\t$response->end = new DateTimeImmutable(\"{$transmit[\"date\"]} {$response->closeTime}\");\n\t\t\t\t$trav = new DateTimeImmutable(\"{$transmit[\"date\"]} {$response->openTime}\");\n\n\t\t\t\t$interval_num = 0;\n\t\t\t\twhile ($trav->modify(\"+{$transmit[\"duration\"]} minute\") <= $response->end)\n\t\t\t\t{\n\t\t\t\t\t$response->times[$interval_num][0] = $trav->format(\"H:i\");\n\t\t\t\t\t$response->times[$interval_num][1] = $trav->modify(\"+{$transmit[\"duration\"]} minute\")->format(\"H:i\");\n\n\t\t\t\t\t$trav = $trav->modify(\"+15 minute\");\n\t\t\t\t\t$interval_num++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$respones->error = 1;\n\t\t\t$response->text += \"unknown database error\";\n\t\t}\n\n\t}", "title": "" }, { "docid": "bab88dbbcadb93d74aa9d42f81d09efa", "score": "0.40582556", "text": "public static function validateMaintenancePeriodIdsForArrayConstraintsFromSetMaintenancePeriodIds(array $values = array())\n {\n $message = '';\n $invalidValues = [];\n foreach ($values as $processRepairTasksV2MaintenancePeriodIdsItem) {\n // validation for constraint: itemType\n if (!(is_int($processRepairTasksV2MaintenancePeriodIdsItem) || ctype_digit($processRepairTasksV2MaintenancePeriodIdsItem))) {\n $invalidValues[] = is_object($processRepairTasksV2MaintenancePeriodIdsItem) ? get_class($processRepairTasksV2MaintenancePeriodIdsItem) : sprintf('%s(%s)', gettype($processRepairTasksV2MaintenancePeriodIdsItem), var_export($processRepairTasksV2MaintenancePeriodIdsItem, true));\n }\n }\n if (!empty($invalidValues)) {\n $message = sprintf('The maintenancePeriodIds property can only contain items of type int, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));\n }\n unset($invalidValues);\n return $message;\n }", "title": "" }, { "docid": "fc63a25630dada26be283ea83c19524b", "score": "0.40546948", "text": "public function getDueDates(){\n\t\t$startDate = new DateTime($this->Params['start_date']);\n\t\t$monthDay = $startDate->format('d');\n\t\t$periodDueDate = new DateTime($this->Params['due_date']);\n\t\tswitch($this->Params['payment_mode']){\n\t\t\tcase 1: // DAILY\n\t\t\t\tif($this->Params['num'] > 1){\n\t\t\t\t\tif($this->Params['amortization_type'] == 2){ // STRAIGHT-LINE\n\t\t\t\t\t\t$periodDueDate->modify('+'.$this->Params['number_days'].' day');\n\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\t\t\t\t$datePeriodTimeStamp = strtotime($datePeriod);\n\t\t\t\t\t\t$getPeriodDay = date('D', $datePeriodTimeStamp);\n\t\t\t\t\t\tif($getPeriodDay === \"Sun\") $periodDueDate->modify('+1 day');\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$periodDueDate->modify('+'.$this->Params['number_days'].' day');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\tbreak;\n\t\t\tcase 2: // WEEKLY\n\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('+'.$this->Params['number_days'].' day');\n\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\tbreak;\n\t\t\tcase 3: // SEMI-MONTHLY\n\t\t\t\tswitch($this->Params['dd_type']){\n\t\t\t\t\tcase 3: // 15th and End of the Month\n\t\t\t\t\t\tif($monthDay <= 15){\n\t\t\t\t\t\t\t$dueDateDay = [1 => 15, 2 => 'last_day_month'];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$dueDateDay = [1 => 'last_day_month', 2 => 15];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$dueDatePeriod = $dueDateDay[$this->Params['count_reset']];\n\t\t\t\t\t\tif(is_int($dueDatePeriod)){\n\t\t\t\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('+'.$this->Params['number_days'].' day');\n\t\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-'.$dueDatePeriod);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$monthName = $periodDueDate->format('F');\n\t\t\t\t\t\t\t$periodDueDate->modify('last day of '.$monthName);\n\t\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 5: // 5th and 20th of the Month\n\t\t\t\t\t\tif($monthDay <= 5){\n\t\t\t\t\t\t\t$dueDateDay = [1 => '05', 2 => 20];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$dueDateDay = [1 => 20, 2 => '05'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$dueDatePeriod = $dueDateDay[$this->Params['count_reset']];\n\t\t\t\t\t\tif($dueDatePeriod == '05' && $this->Params['num'] > 1) $periodDueDate->modify('+1 month');\n\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-'.$dueDatePeriod);\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 6: // 10th and 25th of the Month\n\t\t\t\t\t\tif($monthDay <= 10){\n\t\t\t\t\t\t\t$dueDateDay = [1 => 10, 2 => 25];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$dueDateDay = [1 => 25, 2 => 10];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$dueDatePeriod = $dueDateDay[$this->Params['count_reset']];\n\t\t\t\t\t\tif($dueDatePeriod == 10 && $this->Params['num'] > 1) $periodDueDate->modify('+1 month');\n\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-'.$dueDatePeriod);\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 7: // 15th and 30th of the Month\n\t\t\t\t\t\tif($monthDay <= 15){\n\t\t\t\t\t\t\t$dueDateDay = [1 => 15, 2 => 30];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$dueDateDay = [1 => 30, 2 => 15];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$dueDatePeriod = $dueDateDay[$this->Params['count_reset']];\n\t\t\t\t\t\tif($dueDatePeriod == 15 && $this->Params['num'] > 1) $periodDueDate->modify('+28 days');\n\t\t\t\t\t\t\n\t\t\t\t\t\t$monthName = $periodDueDate->format('F');\n\t\t\t\t\t\tif($monthName == \"February\"){\n\t\t\t\t\t\t\tif($dueDatePeriod == 15){\n\t\t\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-'.$dueDatePeriod);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$periodDueDate->modify('last day of '.$monthName);\n\t\t\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-'.$dueDatePeriod);\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('+'.$this->Params['number_days'].' day');\n\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 4: // MONTHLY\n\t\t\t\tswitch($this->Params['dd_type']){\n\t\t\t\t\tcase 2: // END OF THE MONTH\n\t\t\t\t\t\tif($this->Params['num'] > 1){\n\t\t\t\t\t\t\t$periodDueDate->modify('+28 days');\n\t\t\t\t\t\t\t$periodDueDate->modify('last day of this month');\n\t\t\t\t\t\t}else{ // ALLOWANCE OF 15 DAYS\n\t\t\t\t\t\t\t$periodDueDate->modify('-1 month');\n\t\t\t\t\t\t\t$periodDueDate->modify('+15 days');\n\t\t\t\t\t\t\t$periodDueDate->modify('last day of this month');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4: // SAME DAY OF EACH MONTH\n\t\t\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('next month');\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(isset($this->Params['isFebruary']) && $this->Params['isFebruary']){\n\t\t\t\t\t\t\t$startDate = new DateTime($this->Params['due_date']);\n\t\t\t\t\t\t\t$periodDueDate->modify('-1 month');\n\t\t\t\t\t\t\t$periodDueDate->modify('last day of this month');\n\t\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\t\t\t\t\tunset($this->Params['isFebruary']);\n\t\t\t\t\t\t\t$this->Params['isFebruary'] = false;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$startDate = new DateTime($this->Params['start_date']);\n\t\t\t\t\t\t\t$monthDay = $startDate->format('d');\n\t\t\t\t\t\t\t$periodDueDate->format($monthDay);\n\t\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-'.$monthDay);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$monthName = $periodDueDate->format('F');\n\t\t\t\t\t\t$isLeapYear = $periodDueDate->format('L'); // CHECK IF LEAPYEAR\n\t\t\t\t\t\t$leapDays = ($isLeapYear > 0) ? 29 : 28;\n\t\t\t\t\t\tif($monthName == \"January\" && $monthDay > $leapDays){ // TO SET ON FEBRUARY\n\t\t\t\t\t\t\t$this->Params['isFebruary'] = true;\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('+'.$this->Params['number_days'].' day');\n\t\t\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\tbreak;\n\t\t\tcase 5: // QUARTERLY\n\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('+'.$this->Params['monthly_terms'].' month');\n\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\tbreak;\n\t\t\tcase 6: // SEMESTRAL\n\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('+'.$this->Params['monthly_terms'].' month');\n\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\tbreak;\n\t\t\tcase 7: // YEARLY\n\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('+1 year');\n\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\tbreak;\n\t\t\tcase 9: // LUMPSUM\n\t\t\t\tif($this->Params['num'] > 1) $periodDueDate->modify('next month');\n\t\t\t\t$datePeriod = $periodDueDate->format('Y-m-d');\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn $datePeriod;\n\t}", "title": "" }, { "docid": "bd31c0737d605540376f989230ee1a05", "score": "0.4052219", "text": "public static function getNumberEventsOfToday()\n {\n\n // this isn't really optimized but this is the real answer of the question\n $start_date = date(\"Y-m-d \") . \" 00:00:00\";\n $end_date = date('Y-m-d H:i:s', strtotime($start_date . ' +1 day'));\n\n // new way to manage events\n // we get the PDO for the Sabre connection from the Propel connection\n // We set the BackEnd for sabre Backends\n $calendarBackend = new CalDavPDO();\n\n // get all the calendars for the current user\n $calendars = $calendarBackend->getCalendarsForUser('principals/' . strtolower(SessionUser::getUser()->getUserName()), \"displayname\", false);\n\n $count = 0;\n\n $events = [];\n\n foreach ($calendars as $calendar) {\n $eventsForCal = $calendarBackend->getCalendarObjects($calendar['id']);\n\n foreach ($eventsForCal as $eventForCal) {\n\n $calObj = $calendarBackend->getCalendarObject($calendar['id'], $eventForCal['uri']);\n $vcalendar = VObject\\Reader::read($calObj['calendardata']);\n\n // we have to expand the event to get the right events in the range fixed over\n // the events are formatted with expand in Z DateTimeZone, so we have to change DateTimeZone, to the right date\n // TO DO : in rare cases the DateTimeZone isn't the same as the now time !!!!\n $newVCalendar = $vcalendar->expand(new \\DateTime($start_date), new \\DateTime($end_date), new \\DateTimeZone(SystemConfig::getValue('sTimeZone')));\n if (!is_null($newVCalendar->VEVENT)) {\n $count += count($newVCalendar->VEVENT);\n }\n\n if (!is_null($newVCalendar->VEVENT)) {\n foreach ($newVCalendar->VEVENT->VALARM as $alarm) {\n $attr = $alarm->children();\n foreach ($attr as $attrInfo) {\n if ($attrInfo->name == 'TRIGGER' && $attrInfo->getValue() != 'NONE') {\n $trigger = $attrInfo->getValue();\n $summary = $newVCalendar->VEVENT->summary->getValue();\n $event_Date = $newVCalendar->VEVENT->dtstart->getValue();\n\n $event_dateDT1 = new \\DateTime($event_Date);\n $event_dateDT0 = new \\DateTime($event_Date);\n\n // we've to format the DateTime in Z DateTimeZone, to compare them to the $newVCalendar\n $date_now = new \\DateTime(\"now\", new \\DateTimeZone('Z'));\n\n $difference = $date_now->diff($event_dateDT1);\n\n $in_time = '';\n $diplay_alarm = false;\n switch ($trigger) {\n case '-PT5M':\n $in_time = '5'.\" \"._(\"minutes\");\n $interval = new \\DateInterval(\"PT5M\");\n $event_dateDT0->sub($interval);\n $diff = $difference->format(\"%s\");\n $diff += $difference->format(\"%i\")*60;\n if ( $diff > 4*60 && $diff < 5*60 || $diff < SystemConfig::getValue('iDashboardPageServiceIntervalTime') ) {\n $diplay_alarm = true;\n }\n break;\n case 'PT10M':\n $in_time ='10'.\" \"._(\"minutes\");\n $interval = new \\DateInterval(\"PT10M\");\n $event_dateDT0->sub($interval);\n $diff = $difference->format(\"%s\");\n $diff += $difference->format(\"%i\")*60;\n if ( $diff > 9*60 && $diff < 10*60 || $diff < SystemConfig::getValue('iDashboardPageServiceIntervalTime') ) {\n $diplay_alarm = true;\n }\n break;\n case 'PT15M':\n $in_time ='15'.\" \"._(\"minutes\");\n $interval = new \\DateInterval(\"PT15M\");\n $event_dateDT0->sub($interval);\n $diff = $difference->format(\"%s\");\n $diff += $difference->format(\"%i\")*60;\n if ( $diff > 14*60 && $diff < 15*60 || $diff < SystemConfig::getValue('iDashboardPageServiceIntervalTime') ) {\n $diplay_alarm = true;\n }\n break;\n case 'PT30M':\n $in_time ='30'.\" \"._(\"minutes\");\n $interval = new \\DateInterval(\"PT30M\");\n $event_dateDT0->sub($interval);\n $diff = $difference->format(\"%s\");\n $diff += $difference->format(\"%i\")*60;\n if ( $diff > 29*60 && $diff < 30*60 || $diff < SystemConfig::getValue('iDashboardPageServiceIntervalTime') ) {\n $diplay_alarm = true;\n }\n break;\n case 'PT1H':\n $in_time ='1'.\" \"._(\"hour\");\n $interval = new \\DateInterval(\"PT1H\");\n $event_dateDT0->sub($interval);\n $diff = $difference->format(\"%s\");\n $diff += $difference->format(\"%i\")*60;\n if ( $diff > 59*60 && $diff < 60*60 || $diff < SystemConfig::getValue('iDashboardPageServiceIntervalTime') ) {\n $diplay_alarm = true;\n }\n break;\n case 'PT2H':\n $in_time ='2'.\" \"._(\"hour\");\n $interval = new \\DateInterval(\"PT2H\");\n $event_dateDT0->sub($interval);\n $diff = $difference->format(\"%s\");\n $diff += $difference->format(\"%i\")*60;\n if ( $diff > (60+59)*60 && $diff < 2*60*60 || $diff < SystemConfig::getValue('iDashboardPageServiceIntervalTime') ) {\n $diplay_alarm = true;\n }\n break;\n case 'P1D':\n $in_time ='1'.\" \"._(\"day\");\n $interval = new \\DateInterval(\"P1D\");\n $event_dateDT0->sub($interval);\n $diff = $difference->format(\"%s\");\n $diff += $difference->format(\"%i\")*60;\n if ( $diff > (23*60+59)*60 && $diff < 24*60*60 || $diff < SystemConfig::getValue('iDashboardPageServiceIntervalTime') ) {\n $diplay_alarm = true;\n }\n break;\n case 'P2D':\n $in_time ='2'.\" \"._(\"day\");\n $interval = new \\DateInterval(\"P2D\");\n $event_dateDT0->sub($interval);\n $diff = $difference->format(\"%s\");\n $diff += $difference->format(\"%i\")*60;\n if ( $diff > ((24+23)*60+59)*60 && $diff < 2*24*60*60 || $diff < SystemConfig::getValue('iDashboardPageServiceIntervalTime') ) {\n $diplay_alarm = true;\n }\n break;\n }\n\n if ($event_dateDT0 < $date_now && $date_now < $event_dateDT1) {\n $res = ['summary' => $summary,\n 'TRIGGER' => $trigger,\n 'in_time' => $in_time,\n 'diplayAlarm' => $diplay_alarm,\n 'diff' => $diff];\n\n $events[] = $res;\n }\n\n //$events[] = [$trigger, $event_dateDT0, $date_now, $event_dateDT1];\n }\n }\n }\n }\n }\n }\n\n return ['count' => $count, 'alarms' => $events];\n }", "title": "" }, { "docid": "9cd475dac8a132d9f68eda8938c9141a", "score": "0.4050182", "text": "public function assert_periods($times1, $times2)\n\t\t{\n\t\t\t# If array size is uneven, user is clocked in. Seperate asserts will be executed for this action.\n\t\t\t$size1 = sizeof($times1) - sizeof($times1) % 2;\n\t\t\t$size2 = sizeof($times2) - sizeof($times2) % 2;\n\n\t\t\t# Check every period against every other period\n\t\t\tfor($i = 0; $i < $size1; $i += 2)\n\t\t\t\tfor($j = 0; $j < $size2; $j += 2)\n\t\t\t\t\tif($this->check_overlap($times1[$i], $times1[$i + 1], $times2[$j], $times2[$j + 1]))\n\t\t\t\t\t\treturn false;\n\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "8674c731cf0240b2ec8ca4d017da8ec0", "score": "0.40430748", "text": "public function getAllDataPeriod()\n {\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_ALL_DATA_PERIOD, $payload);\n\n $payload = unpack('V1period', $data);\n\n return IPConnection::fixUnpackedUInt32($payload['period']);\n }", "title": "" }, { "docid": "8674c731cf0240b2ec8ca4d017da8ec0", "score": "0.40430748", "text": "public function getAllDataPeriod()\n {\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_ALL_DATA_PERIOD, $payload);\n\n $payload = unpack('V1period', $data);\n\n return IPConnection::fixUnpackedUInt32($payload['period']);\n }", "title": "" }, { "docid": "869f6721d99ac731e1cc203135ea3314", "score": "0.40420306", "text": "function ciniki_calendars_appointments($ciniki) {\n //\n // Find all the required and optional arguments\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'), \n 'date'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Date'), \n 'start_date'=>array('required'=>'no', 'blank'=>'yes', 'type'=>'datetimetoutc', 'name'=>'Start Date'), \n 'end_date'=>array('required'=>'no', 'blank'=>'yes', 'type'=>'datetimetoutc', 'name'=>'End Date'), \n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n\n //\n // Check access to the calendar, and which modules are turned on for the tenant\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'calendars', 'private', 'checkAccess');\n $rc = ciniki_calendars_checkAccess($ciniki, $args['tnid'], 'ciniki.calendars.appointments');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n // Store the appointments from different modules\n $lists = array();\n\n //\n // Check if any modules are currently using this subscription\n //\n foreach($ciniki['tenant']['modules'] as $module => $m) {\n list($pkg, $mod) = explode('.', $module);\n $rc = ciniki_core_loadMethod($ciniki, $pkg, $mod, 'hooks', 'appointments');\n if( $rc['stat'] == 'ok' ) {\n $fn = $rc['function_call'];\n $rc = $fn($ciniki, $args['tnid'], $args);\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.calendars.4', 'msg'=>'Error checking for appointments.', 'err'=>$rc['err']));\n }\n if( isset($rc['appointments']) ) {\n $lists = array_merge($lists, $rc['appointments']);\n }\n }\n }\n\n //\n // Sort appointments by start_ts\n //\n usort($lists, function($a, $b) {\n if( $a['start_ts'] == $b['start_ts'] ) {\n return 0;\n }\n return ($a['start_ts'] < $b['start_ts'])?-1:1;\n });\n\n return array('stat'=>'ok', 'appointments'=>$lists);\n\n\n// ciniki_core_loadMethod($ciniki, 'ciniki', 'calendars', 'private', 'mergeAppointments');\n// return ciniki_calendars_mergeAppointments($ciniki, $lists);\n}", "title": "" }, { "docid": "e0f6d4be46a17c773ffa423d26ecc577", "score": "0.40379527", "text": "public function getPeriods() {\n\t\treturn $this->periods;\n\t}", "title": "" }, { "docid": "e01059b8ef1a590057e26cd0817ff8e0", "score": "0.40300888", "text": "private function interviewDates()\n {\n $interview_options = json_decode(Config::valueOr('interview options', '[]'), true);\n $opts = [];\n foreach ($interview_options as $option) {\n $start = Carbon::parse($option['date'].' '.$option['start'].':00');\n $end = Carbon::parse($option['date'].' '.$option['end'].':00');\n $time = $start->copy();\n while ($time < $end) {\n $opts[] = $time->copy();\n $time->addMinutes(15);\n }\n }\n\n return $opts;\n }", "title": "" } ]
ea8e4237e9d230e8f27d27c3beeed75c
Returns an iterator containing only the keys for which the given predicate returns `true`. The default predicate is casting the key to boolean. Example: Iter\filter_keys([0 => 'a', 1 => 'b']) => Iter(1 => 'b') Iter\filter_keys([0 => 'a', 1 => 'b', 2 => 'c'], fn($key) => $key Iter(0 => 'a', 1 => 'b')
[ { "docid": "6ea97d8b79c1279d964356d23463a30e", "score": "0.8000592", "text": "function filter_keys(iterable $iterable, ?callable $predicate = null): Iterator\n{\n return Iterator::from(static function () use ($iterable, $predicate): Generator {\n /** @var (callable(Tk): bool) $predicate */\n $predicate = $predicate ?? Closure::fromCallable('Psl\\Internal\\boolean');\n foreach ($iterable as $k => $v) {\n if ($predicate($k)) {\n yield $k => $v;\n }\n }\n });\n}", "title": "" } ]
[ { "docid": "29dcfeef4dcfa6270df0c92c463a8e5f", "score": "0.63919336", "text": "function eachKey(callable $predicate): EachKey\n{\n return new EachKey($predicate);\n}", "title": "" }, { "docid": "9395dfa977453812fe44aa96327bccbf", "score": "0.63115245", "text": "public function filterKey(Closure $closure);", "title": "" }, { "docid": "6ff301053a03ec776a8a08e88d702926", "score": "0.62500787", "text": "public function filterKeys(callable $callback)\n {\n return $this->fresh(array_values(array_filter($this->keys, $callback)));\n }", "title": "" }, { "docid": "b13ecba2ce2586979b975c8142b18dc5", "score": "0.59688485", "text": "public function Filter(callable $Predicate): IEnumerable {\n $Dictionary = new static();\n foreach($this as $Key => $Value) {\n if($Predicate($Value, $Key, $this)) {\n $Dictionary->Add($Key, $Value);\n }\n }\n return $Dictionary;\n }", "title": "" }, { "docid": "c7b049bb07e42e0fdfe1a7317502a611", "score": "0.5862367", "text": "public function filter(Closure $predicate);", "title": "" }, { "docid": "4bbd2203df8a27c48767f2e9b143d223", "score": "0.5784161", "text": "public function filter(callable $predicate);", "title": "" }, { "docid": "4bbd2203df8a27c48767f2e9b143d223", "score": "0.5784161", "text": "public function filter(callable $predicate);", "title": "" }, { "docid": "38510cc86465ef0f2f25a49d29b754f3", "score": "0.5736888", "text": "function kfilter($iterable, $lambda) {\n $out = array();\n foreach ($iterable as $k => $v) if ($lambda($v)) $out[$k] = $v;\n return $out;\n}", "title": "" }, { "docid": "2e2db56414d094118a370040314c40ac", "score": "0.5547127", "text": "public function filter(callable $predicate): self;", "title": "" }, { "docid": "dad3babc0773bc4c26a4b5acfd03fd8d", "score": "0.5500616", "text": "function hasKey($key): Predicate\n{\n return new HasKey($key);\n}", "title": "" }, { "docid": "1bb5c51ce33c79966dea8a7932b72c72", "score": "0.54044396", "text": "public function filter($key, $value);", "title": "" }, { "docid": "20fb3ca0b6c4abd9970ec38d2203e99b", "score": "0.5394278", "text": "function doesNotHaveKey($key): Predicate\n{\n return not(hasKey($key));\n}", "title": "" }, { "docid": "d03b0237ebdaae7a5ec4e0254b4e4423", "score": "0.5382999", "text": "function key_filter(array $filter /*. ,$filter .*/) {\n\t\t$args = func_get_args ();\n\t\tarray_unshift ( $args, 'and' );\n\t\treturn call_user_func_array ( array (\n\t\t\t\t$this,\n\t\t\t\t'key_filter_operator' \n\t\t), $args );\n\t}", "title": "" }, { "docid": "69eaa59a9198c6c1522f6e1ca2410b3d", "score": "0.5364658", "text": "function filter(iterable $iterable, ?Closure $predicate = null): array\n{\n /** @var (Closure(Tv): bool) $predicate */\n $predicate = $predicate ?? static fn(mixed $value): bool => (bool) $value;\n\n if (is_array($iterable)) {\n return array_filter(\n $iterable,\n /**\n * @param Tv $v\n */\n static fn(mixed $v): bool => $predicate($v)\n );\n }\n\n $result = [];\n foreach ($iterable as $k => $v) {\n if ($predicate($v)) {\n $result[$k] = $v;\n }\n }\n\n return $result;\n}", "title": "" }, { "docid": "d4f276571df1b400ad0dfe75ce4277a2", "score": "0.5363487", "text": "public function findKeys(callable $predicate, int $limit = 0): array\n\t{\n\t\treturn $this->find($predicate, true, $limit);\n\t}", "title": "" }, { "docid": "cca46f61a1daec55a1aad8283e6b0cab", "score": "0.5307858", "text": "public function only($keys): CollectionInterface\n {\n $args = func_get_args();\n if (count($args) === 1) {\n $args = reset($args);\n }\n\n if ($args === null) {\n return $this;\n }\n\n return $this->wrap(function (Iterator $data) use ($args) {\n foreach ($data as $key => $datum) {\n if (in_array($key, $args, false)) {\n yield $key => $datum;\n }\n }\n });\n }", "title": "" }, { "docid": "0119a55d799a81775fc7f796bd7cc295", "score": "0.51688975", "text": "public function filter(callable $callback = null): CollectionInterface\n {\n if (!$callback) {\n $callback = function ($item) {\n return (bool)$item;\n };\n }\n\n return $this->wrap(function (Iterator $data) use ($callback) {\n foreach ($data as $key => $item) {\n if ($callback($item, $key)) {\n yield $key => $item;\n }\n }\n });\n }", "title": "" }, { "docid": "fbaef782071b7b2c6d08fd4a8233f39a", "score": "0.5157243", "text": "public function keys(): CollectionInterface\n {\n return $this->wrap(function (Iterator $data) {\n foreach ($data as $key => $value) {\n yield $key;\n }\n });\n }", "title": "" }, { "docid": "6cb261212ec645136f97e40fc227335f", "score": "0.5149434", "text": "function all($predicate = null)\n {\n $fn = static::identityFn($predicate);\n\n foreach ($this as $key => $val) {\n if (!$fn($val, $key)) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "ed163b3bca2e5836e92167499a9be847", "score": "0.5089586", "text": "public function every(callable $predicate): bool\n\t{\n\t\tforeach ($this->data as $key => $value)\n\t\t{\n\t\t\tif ($predicate($value, $key) === false)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "af28dd7934da5a3ca70825e6188a5234", "score": "0.50688434", "text": "public function keys () {\n\t\treturn new NativeIndexedArrayIterator(\\array_values($this->_keys));\n\t}", "title": "" }, { "docid": "edcf2114675b0f3e3472fa649f49344c", "score": "0.5036146", "text": "public function getPredicate();", "title": "" }, { "docid": "74f669f71047c3e8d129d830a1ca3165", "score": "0.5032599", "text": "public function filter(callable $callback): self\n {\n return new static(function () use ($callback) {\n foreach ($this as $key => $value) {\n if ($callback($value, $key)) {\n yield $key => $value;\n }\n }\n });\n }", "title": "" }, { "docid": "fa69fe526e5a78759497eaf6c5a4c2c9", "score": "0.50174713", "text": "public function except($keys): CollectionInterface\n {\n if (!is_callable($keys)) {\n if (!is_array($keys)) {\n $keys = func_get_args();\n }\n $keys = function ($item, $key) use ($keys) {\n return in_array($key, $keys, false);\n };\n }\n\n return $this->wrap(function (Iterator $data) use ($keys) {\n foreach ($data as $key => $item) {\n if (!$keys($item, $key)) {\n yield $key => $item;\n }\n }\n });\n }", "title": "" }, { "docid": "051e66788909bb16ef2d95a995948596", "score": "0.5005749", "text": "public function getIterator()\n {\n $options = $this->getOptions();\n $namespace = $options->getNamespace();\n $keys = [];\n\n $this->initAdminAuth();\n\n if ($namespace === '') {\n $cnt = xcache_count(XC_TYPE_VAR);\n for ($i=0; $i < $cnt; $i++) {\n $list = xcache_list(XC_TYPE_VAR, $i);\n foreach ($list['cache_list'] as & $item) {\n $keys[] = $item['name'];\n }\n }\n } else {\n $prefix = $namespace . $options->getNamespaceSeparator();\n $prefixL = strlen($prefix);\n\n $cnt = xcache_count(XC_TYPE_VAR);\n for ($i=0; $i < $cnt; $i++) {\n $list = xcache_list(XC_TYPE_VAR, $i);\n foreach ($list['cache_list'] as & $item) {\n $keys[] = substr($item['name'], $prefixL);\n }\n }\n }\n\n $this->resetAdminAuth();\n\n return new KeyListIterator($this, $keys);\n }", "title": "" }, { "docid": "7663acfb926747db7e71a7196a0d1b2c", "score": "0.5002952", "text": "function array_filter_key($callback, array $array)\n {\n $matchedKeys = array_filter(array_keys($array), $callback);\n\n return array_intersect_key($array, array_flip($matchedKeys));\n }", "title": "" }, { "docid": "eda467d36bf5bb41f4c7763acbdddf00", "score": "0.50027966", "text": "public function filter(callable $predicate): self\n {\n return $this->setCollection(Collections::filter($this->getCollection(), $predicate));\n }", "title": "" }, { "docid": "987466376e622408858c74324f547b4a", "score": "0.49904212", "text": "public function forAll(Closure $predicate);", "title": "" }, { "docid": "7fa304d6ace18a858647e48052441172", "score": "0.49700943", "text": "public function filter($predicate)\n {\n if (!$this->is()) {\n return $this;\n }\n if ($predicate($this->get())) {\n return $this;\n }\n return static::ofEmpty();\n }", "title": "" }, { "docid": "3163d08da402166c00dd74f352f3c353", "score": "0.49427593", "text": "function filter(callable $closure) {\n $new = array();\n foreach($this->data as $key => $val) {\n $feed = (bool) $closure($val, $key);\n if($feed) {\n $new[$key] = $val;\n }\n }\n \n return (new self($new));\n }", "title": "" }, { "docid": "b40997fba9a8bb1c35bce647fb5289ff", "score": "0.49162868", "text": "function array_filter_key($input, $callback)\n{\n\tif (!is_array($input)) {\n\t\ttrigger_error('array_filter_key() expects parameter 1 to be array, ' . gettype($input) . ' given', E_USER_WARNING);\n\t\treturn null;\n\t}\n\n\tif (empty($input)) {\n\t\treturn $input;\n\t}\n\n\t$filtered_keys = array_filter(array_keys($input), $callback);\n\tif (empty($filtered_keys)) {\n\t\treturn array();\n\t}\n\n\t$input = array_intersect_key(array_flip($filtered_keys), $input);\n\n\treturn $input;\n}", "title": "" }, { "docid": "674c28a22c697cce6770e29099c4e027", "score": "0.4889215", "text": "public function every(callable $predicate): bool;", "title": "" }, { "docid": "05c1f958cf435f423e3950de1e82ded6", "score": "0.4877455", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(InvitationPeer::INV_ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "a3b05c5195bfcd88d3321edc0af48dff", "score": "0.48471034", "text": "function some($predicate = null)\n {\n $fn = static::identityFn($predicate);\n\n foreach ($this as $key => $value) {\n if ($fn($value, $key)) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "4f2eadc23aefff48adb16cb817503b78", "score": "0.48331717", "text": "public function filterByPrimaryKeys($keys)\n {\n if (empty($keys)) {\n return $this->add(null, '1<>1', Criteria::CUSTOM);\n }\n foreach ($keys as $key) {\n $cton0 = $this->getNewCriterion(LockRecordTableMap::COL_FUNCTIONID, $key[0], Criteria::EQUAL);\n $cton1 = $this->getNewCriterion(LockRecordTableMap::COL_KEYID, $key[1], Criteria::EQUAL);\n $cton0->addAnd($cton1);\n $this->addOr($cton0);\n }\n\n return $this;\n }", "title": "" }, { "docid": "04c234e22412c127efea9d15d787bbee", "score": "0.48293892", "text": "public function forAll(callable $predicate): bool\n {\n $iterator = $this->iterator();\n while ($iterator->hasNext()) {\n if ($predicate($iterator->next()) === false) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "8d7d21d2765e4127dfcb801af5338729", "score": "0.48267087", "text": "public function filterByPrimaryKeys($keys)\n\t{\n\t\tif (empty($keys)) {\n\t\t\treturn $this->add(null, '1<>1', Criteria::CUSTOM);\n\t\t}\n\t\tforeach ($keys as $key) {\n\t\t\t$cton0 = $this->getNewCriterion(NewFinancecertsPeer::USER_ID, $key[0], Criteria::EQUAL);\n\t\t\t$cton1 = $this->getNewCriterion(NewFinancecertsPeer::CERT_DATE, $key[1], Criteria::EQUAL);\n\t\t\t$cton0->addAnd($cton1);\n\t\t\t$this->addOr($cton0);\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "1459d8ac6b2a0b8ef02e9110ee2dafa5", "score": "0.4817941", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(StaffTableMap::COL_ENTITY_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "aee4b1417cc38a7bc5c642bf11afad42", "score": "0.48153657", "text": "public function filterByPrimaryKeys($keys)\n\t{\n\t\treturn $this->addUsingAlias(InvitationPeer::INV_ID, $keys, Criteria::IN);\n\t}", "title": "" }, { "docid": "3a2b0bdd3a853ef9f5c13f311e746da2", "score": "0.48027083", "text": "public function filterExp($key, $value);", "title": "" }, { "docid": "3a4fbcccae232053f891cdc32064ce58", "score": "0.48006228", "text": "function firstOrNull(callable $predicate): callable\n{\n return static function (iterable $collection) use ($predicate) {\n foreach (filter($predicate)($collection) as $item) {\n return $item;\n }\n\n return null;\n };\n}", "title": "" }, { "docid": "37278652989d261ebffc3a4f6b07af62", "score": "0.4795325", "text": "public function filterByPrimaryKeys($keys)\r\n {\r\n\r\n return $this->addUsingAlias(KitsEnsaioPeer::ID, $keys, Criteria::IN);\r\n }", "title": "" }, { "docid": "154c245633f9d02dafb8064e4079c10a", "score": "0.4786531", "text": "public function filterByPrimaryKeys($keys)\n\t{\n\t\treturn $this->addUsingAlias(WorkflowratingPeer::ID, $keys, Criteria::IN);\n\t}", "title": "" }, { "docid": "fcbbccbdbd756f3c316eda0b96750899", "score": "0.4749431", "text": "public function filter($callback)\n {\n return $this->pipe(function ($key, $value) use ($callback) {\n if ((bool)$callback($key, $value) === true) {\n return array($key => $value);\n } else {\n return array();\n }\n });\n }", "title": "" }, { "docid": "6c00cfcd4d4fc046746d0e30f121a216", "score": "0.47386476", "text": "function key_filter_and(array $filter) {\n\t\t$args = func_get_args ();\n\t\tarray_unshift ( $args, 'and' );\n\t\treturn call_user_func_array ( array (\n\t\t\t\t$this,\n\t\t\t\t'key_filter_operator' \n\t\t), $args );\n\t}", "title": "" }, { "docid": "d1c4b70e26a7930dd3cca38704a1405c", "score": "0.47365478", "text": "public function filterByKey($key)\n {\n $this->filter[] = $this->field('key').' = '.$this->quote($key);\n return $this;\n }", "title": "" }, { "docid": "f151df62e728bbf1c12af15860fd2812", "score": "0.47343078", "text": "protected function filter_array_keys(array $args, array $keys) {\n return array_intersect_key($args, array_flip($keys));\n }", "title": "" }, { "docid": "3a1653a95953d358347fa54b13f0734a", "score": "0.47250938", "text": "public function filterByPrimaryKeys($keys)\n {\n\n return $this->addUsingAlias(InpassingPeer::INPASSING_ID, $keys, Criteria::IN);\n }", "title": "" }, { "docid": "601ad40519e6fd974b3d1f1cb9ce5818", "score": "0.47244912", "text": "static function identityFn($predicate, $inverse = false)\n {\n return function($val, $key) use ($predicate, $inverse) {\n if (is_callable($predicate)) {\n $returnValue = (bool) call_user_func($predicate, $val, $key);\n } elseif ($predicate === null) {\n $returnValue = $val == true;\n } else {\n $returnValue = $val === $predicate;\n }\n\n if ($inverse) {\n return !$returnValue;\n } else {\n return $returnValue;\n }\n };\n }", "title": "" }, { "docid": "186665e42fa0a3d202359f2ff4ef22c9", "score": "0.47032502", "text": "public function Every(callable $Predicate): bool {\n foreach($this as $Key => $Value) {\n if(!$Predicate($Value, $Key, $this)) {\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "15f8cb777091e87304f87b938f044c03", "score": "0.46907273", "text": "public function filter(Closure $closure);", "title": "" }, { "docid": "8de8e67f421e48f88374e6f8fde58e60", "score": "0.46813136", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(EventPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "d0d716fc8bac98af622b13a67e117a34", "score": "0.46798182", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(UsersTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "d3e35de0ce9c1c019a035a58151a7ea2", "score": "0.46756226", "text": "public function filterByPrimaryKeys($keys)\n {\n\n return $this->addUsingAlias(StaffTableMap::COL_ENTITY_ID, $keys, Criteria::IN);\n }", "title": "" }, { "docid": "d15491ad1a827296c3628df4f831b846", "score": "0.46753237", "text": "public function filterByPrimaryKeys($keys)\n\t{\n\t\treturn $this->addUsingAlias(ReservationCategoryPeer::ID, $keys, Criteria::IN);\n\t}", "title": "" }, { "docid": "a92e303894bef82a40680a4a677d0c07", "score": "0.46654284", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(MUtilisateurPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "1707dc7818519a3582c6ca683cd4d4f4", "score": "0.46630958", "text": "public function filterByPrimaryKey($key)\n {\n return $this->addUsingAlias(CollectorEmailPeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "a896920ba6599729e55c9b13db07d909", "score": "0.46595734", "text": "public function filterByPrimaryKey($key)\r\n {\r\n\r\n return $this->addUsingAlias(KitsEnsaioPeer::ID, $key, Criteria::EQUAL);\r\n }", "title": "" }, { "docid": "2f02efa48f511c14a9d439cf7b59ec9e", "score": "0.4658865", "text": "public function filterByPrimaryKeys($keys)\n\t{\n\t\treturn $this->addUsingAlias(EventPeer::ID, $keys, Criteria::IN);\n\t}", "title": "" }, { "docid": "af26bb7276a6ddf162068ad917a51a56", "score": "0.46403635", "text": "public function filterByPrimaryKeys($keys)\n {\n\n return $this->addUsingAlias(TrialTableMap::COL_ID, $keys, Criteria::IN);\n }", "title": "" }, { "docid": "e36e8941f1e3b8f8926c0d062957588b", "score": "0.46363714", "text": "public function filterByPrimaryKeys($keys)\n {\n\n return $this->addUsingAlias(ServicePeer::ID, $keys, Criteria::IN);\n }", "title": "" }, { "docid": "4bb5320eacdb87194cb4cc5412932c37", "score": "0.4634455", "text": "function filter(iterable $iterable, ?callable $closure = null): iterable\n{\n $new = [];\n $closure = $closure ?? static function ($item) {\n return $item;\n };\n\n foreach ($iterable as $index => $item) {\n if ($closure($item, $index, $iterable)) {\n $new[$index] = $item;\n }\n }\n\n return $new;\n}", "title": "" }, { "docid": "64e48a91acf2c668fed874ae0b8f817c", "score": "0.46334666", "text": "public function getPredicates()\n\t{\n\t\treturn $this->predicates;\n\t}", "title": "" }, { "docid": "b23c1d767fc5bf59da4ef8722fc1b61c", "score": "0.46287122", "text": "function key_filter_operator($operator, $filter /*. ,$filter .*/) {\n\t\t$filters = func_get_args ();\n\t\tarray_shift ( $filters );\n\t\tif ($this->input_mode != 'bucket')\n\t\t\tthrow new Exception ( \"Key filters can only be used in bucket mode\" );\n\t\tif (count ( $this->index ))\n\t\t\tthrow new Exception ( \"You cannot use index search and key filters on the same operation\" );\n\t\t\n\t\tif (count ( $this->key_filters ) > 0) {\n\t\t\t$this->key_filters = array (\n\t\t\t\t\tarray (\n\t\t\t\t\t\t\t$operator,\n\t\t\t\t\t\t\t$this->key_filters,\n\t\t\t\t\t\t\t$filters \n\t\t\t\t\t) \n\t\t\t);\n\t\t} else {\n\t\t\t$this->key_filters = $filters;\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "546f692b60ae883e8ef291966489fec1", "score": "0.4621151", "text": "public function filterByPrimaryKeys($keys)\n {\n\n return $this->addUsingAlias(PassoTableMap::COL_ID, $keys, Criteria::IN);\n }", "title": "" }, { "docid": "3947142f52a12f2768b27bc14837c773", "score": "0.46199018", "text": "function filter($closure);", "title": "" }, { "docid": "b0ed158b7d81049211cf93379f41a28d", "score": "0.46176788", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(PersonnePeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "7e6a1661c133ef833c885808db11b04d", "score": "0.46168575", "text": "public function partition(Closure $predicate);", "title": "" }, { "docid": "274d447d59ceaf47d84636e3aa502182", "score": "0.46159118", "text": "public function filterByPrimaryKeys($keys)\n {\n\n return $this->addUsingAlias(EventPeer::ID, $keys, Criteria::IN);\n }", "title": "" }, { "docid": "274d447d59ceaf47d84636e3aa502182", "score": "0.46159118", "text": "public function filterByPrimaryKeys($keys)\n {\n\n return $this->addUsingAlias(EventPeer::ID, $keys, Criteria::IN);\n }", "title": "" }, { "docid": "ee6c9627d67e8ac0c168c5eec098d1ce", "score": "0.46122503", "text": "public function only($keys);", "title": "" }, { "docid": "ee6c9627d67e8ac0c168c5eec098d1ce", "score": "0.46122503", "text": "public function only($keys);", "title": "" }, { "docid": "94b3f4e3d974fb0d08242ce14fb229a5", "score": "0.4607213", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(UserTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "94b3f4e3d974fb0d08242ce14fb229a5", "score": "0.4607213", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(UserTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "6241922f0c69c0f5f1b50dd2ca515470", "score": "0.45970038", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(UserFieldPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "28e2ac8fdb8f3711a87c8c84ea057708", "score": "0.45862526", "text": "public function Map(callable $Predicate): IEnumerable {\n $Dictionary = new static();\n foreach($this as $Key => $Value) {\n $Dictionary->Add($Key, $Predicate($Value, $Key, $this));\n }\n return $Dictionary;\n }", "title": "" }, { "docid": "71d48781dcc42f16cc0c1ff983c1d66a", "score": "0.45831692", "text": "public function filterByPrimaryKeys($keys)\n {\n\n return $this->addUsingAlias(UsersTableMap::COL_ID, $keys, Criteria::IN);\n }", "title": "" }, { "docid": "e4f6b11a16a96ad0f784f48084083cea", "score": "0.45825937", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(WorkflowratingPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "fb404b55b6a6eeacea95bd7f40ee9ddb", "score": "0.4582011", "text": "function filter(array $array, callable $predicate): array\n{\n\treturn values(\n\t\t\\array_filter($array, $predicate)\n\t);\n}", "title": "" }, { "docid": "49bd103f4087d8dbfd781aac42bcf0af", "score": "0.4579914", "text": "public function keyBy(callable $callback): self\n {\n return new static(function () use ($callback) {\n foreach ($this as $key => $value) {\n yield $callback($value, $key) => $value;\n }\n });\n }", "title": "" }, { "docid": "236105eeaa7951ec318f5f97d112bf98", "score": "0.4574502", "text": "public function filterByPrimaryKeys($keys)\n {\n\n return $this->addUsingAlias(FacturaPeer::IDFACTURA, $keys, Criteria::IN);\n }", "title": "" }, { "docid": "3b1b37aaab1211850009507765465ce1", "score": "0.45702264", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(CasoPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "72b83723e5935049dfc31c63cd4969cc", "score": "0.45644885", "text": "public function filter(callable $predicate)\n {\n if (null === $this->value) {\n return $this;\n }\n\n return $predicate($this->value)\n ? $this\n : self::ofEmpty();\n }", "title": "" }, { "docid": "b44f23b4b6ccc668460c3ff22229fc7e", "score": "0.45618248", "text": "public function filterByPrimaryKeys($keys)\n {\n\n return $this->addUsingAlias(PersonnePeer::ID, $keys, Criteria::IN);\n }", "title": "" }, { "docid": "1da6b21cf0def02566d21f1785cd63dc", "score": "0.455432", "text": "public function filterByPrimaryKeys($keys)\n {\n\n return $this->addUsingAlias(ProductPeer::PRODUCT_ID, $keys, Criteria::IN);\n }", "title": "" }, { "docid": "f39582786d4cbd035ae93b8bfbc19089", "score": "0.4549519", "text": "public function filterByPrimaryKeys($keys)\n\t{\n\t\treturn $this->addUsingAlias(Oops_Db_ProductAttributePeer::ID_PRODUCT_ATTRIBUTE, $keys, Criteria::IN);\n\t}", "title": "" }, { "docid": "aec554aa70a7438ea523212a376f2f00", "score": "0.45468402", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(UserTableMap::COL_USER_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "d6abfe7061e940ef2ab1719933a36fd4", "score": "0.45305482", "text": "public function filterByPrimaryKeys($keys)\n {\n\n return $this->addUsingAlias(CostPeer::ID, $keys, Criteria::IN);\n }", "title": "" }, { "docid": "b060fb0e4d695e37604a7d9e319f33f1", "score": "0.45303872", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(InpassingPeer::INPASSING_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "bbf22f32ea1baf1330c2acf552675633", "score": "0.45295557", "text": "public function filterByPrimaryKeys($keys)\n {\n\n return $this->addUsingAlias(UserTableMap::COL_ID, $keys, Criteria::IN);\n }", "title": "" }, { "docid": "bbf22f32ea1baf1330c2acf552675633", "score": "0.45295557", "text": "public function filterByPrimaryKeys($keys)\n {\n\n return $this->addUsingAlias(UserTableMap::COL_ID, $keys, Criteria::IN);\n }", "title": "" }, { "docid": "192e4d764633be4ef49bfe0103428bf7", "score": "0.45291513", "text": "public function filterByPrimaryKeys($keys)\n {\n\n return $this->addUsingAlias(CastleTypePeer::ID, $keys, Criteria::IN);\n }", "title": "" }, { "docid": "52917f6291004c7b7997977e2ef317b4", "score": "0.4528919", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(EventPeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "52917f6291004c7b7997977e2ef317b4", "score": "0.4528919", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(EventPeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "eea56ab488cf78eb5d7c4a88c6daf0c9", "score": "0.45218527", "text": "function from_keys(iterable $keys, Closure $value_func): array\n{\n $result = [];\n foreach ($keys as $key) {\n $result[$key] = $value_func($key);\n }\n\n return $result;\n}", "title": "" }, { "docid": "adc75028b9f1e63324431bbc3726fa7c", "score": "0.45199922", "text": "public function filterByPrimaryKeys($keys)\n {\n\n return $this->addUsingAlias(SessionPeer::SESSION_ID, $keys, Criteria::IN);\n }", "title": "" }, { "docid": "9d4a01d4e9ed99eaa40e1ebccb14265b", "score": "0.45186093", "text": "public function filter(callable $predicate): Listt\n {\n return $this;\n }", "title": "" }, { "docid": "8c22d4ece4ec9f50d33a4d5e9d9fe9b2", "score": "0.45142347", "text": "public function filterByPrimaryKeys($keys)\n\t{\n\t\treturn $this->addUsingAlias(TblEmployeurPeer::ID_EMPLOYEUR, $keys, Criteria::IN);\n\t}", "title": "" }, { "docid": "ef11cf33c91f9522f08820db04d2a798", "score": "0.45140553", "text": "public function filterByPrimaryKeys($keys)\n {\n\n return $this->addUsingAlias(AliMember20180525TableMap::COL_ID, $keys, Criteria::IN);\n }", "title": "" }, { "docid": "4f2cc40613c00a77fd7e902bb2946b4a", "score": "0.45107195", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(LibroPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" } ]
e41bdc39059df8245b8bd558ed015f9e
Render a template from a file or a given template with given parameters
[ { "docid": "6486dadb37ea9cb7d493699c01554d37", "score": "0.6252289", "text": "public static function getTemplate(string $path, string $html, array $params): string {\n\t\tif ($path!='') {\n\t\t\t$html = file_get_contents($path);\n\t\t}\n\n\t\tforeach ($params as $param_name => $param) {\n\t\t\t$html = str_ireplace('{{'.$param_name.'}}', $param, $html);\n\t\t}\n\n\t\treturn $html;\n\t}", "title": "" } ]
[ { "docid": "841f43765de81439368d7f585f9503d8", "score": "0.77151775", "text": "public function render($template_file, array $data = array());", "title": "" }, { "docid": "62ddfc0a3a09297f9d21a994de34bb63", "score": "0.74600935", "text": "function render_template($template, $params = array())\n{\n if ($params) extract($params);\n\n ob_start();\n require_once(APPLICATION_ROOT . '/app/view/' . $template);\n return ob_get_clean();\n}", "title": "" }, { "docid": "cd13c7d5c1b0a4020813caf879323661", "score": "0.7446814", "text": "public function render($template_dir, $template, $data);", "title": "" }, { "docid": "f04d1d3ce3c36556dff05edef3ce87dc", "score": "0.7417059", "text": "public function render($file, $template)\n { \n //pass public vars into view page files\n //by key name, don't call array use key name as string \n foreach ($this->vars as $key => $value)\n {\n $$key = $value;\n }\n \n $filename = VIEW_PATH . $file . '.inc.php'; \n //If true is set use the template files \n if ($template && file_exists($filename)== TRUE){\n //use the template files \n require VIEW_PATH. 'templates/header.inc.php';\n require VIEW_PATH . $file . '.inc.php';\n require VIEW_PATH . 'templates/footer.inc.php';\n } \n else \n {\n //no template -- you will have to build the html file in the required file\n require VIEW_PATH . $file . '.inc.php';\n }\n \n }", "title": "" }, { "docid": "853b902c8da8e0a765089de2f0b8641f", "score": "0.71707004", "text": "function template($file, $data = [])\n{\n $template = new Template(config());\n\n return $template\n ->setFile($file)\n ->render($data);\n}", "title": "" }, { "docid": "0a26ed4fa6511cf65c7eecfa57d471b6", "score": "0.7164462", "text": "abstract public function render($file = null);", "title": "" }, { "docid": "e9295e6d3019b0fdfafa5facc4d774f6", "score": "0.7156476", "text": "function render ( $templateName, $data = FALSE ) {\r\n require( \"templates/$templateName.php\" );\r\n}", "title": "" }, { "docid": "71d28f1ff8537323842457d5b0f013a6", "score": "0.71269953", "text": "function render($template, $values = []) {\n if (file_exists(\"../templates/$template\")) {\n // extract variables into local scope\n extract($values);\n\n // render template\n require(\"../templates/$template\");\n\n }\n\n // else err\n else\n trigger_error(\"Invalid template: $template\", E_USER_ERROR);\n\n}", "title": "" }, { "docid": "b90447ac3427ab62974a255803aa35cf", "score": "0.7124964", "text": "function fl_render_template($filename, ...$values_optional) {\n\tif (isset($values_optional[0])) {\n\t\t$values = $values_optional[0];\n\t} else {\n\t\t$values = NULL;\n\t}\n\t$page = file_get_contents($filename);\n\t// find all vars placeholder\n\tpreg_match_all(\"|{{(.*)}}|U\", $page, $out, PREG_PATTERN_ORDER);\n\tforeach($out[0] as $code) {\n\t\t$var = str_replace('{{', '', $code);\n\t\t$var = str_replace('}}', '', $var);\n\t\t$var = trim($var);\n\t\t$val = \"\";\n\t\t// check if value is defined\n\t\tif ($values!=NULL) {\n\t\t\tif (array_key_exists($var, $values)) {\n\t\t\t\t$val = $values[$var];\n\t\t\t} else {\n\t\t\t\t$val = \"\";\n\t\t\t}\n\t\t}\n\t\t// replace value\n\t\t$page = str_replace($code, $val, $page);\n\t}\n\t// find all code placeholder - TAKE CARE OF INJECTIONS!!!\n\tpreg_match_all(\"|{%(.*)%}|U\", $page, $out, PREG_PATTERN_ORDER);\n\tforeach($out[0] as $code) {\n\t\t$var = str_replace('{%', '', $code);\n\t\t$var = str_replace('%}', '', $var);\n\t\t$var = trim($var);\n\t\tob_start();\n\t\teval($var);\n\t\t$val = ob_get_contents();\n\t\tob_end_clean();\n\t\t// replace value\n\t\t$page = str_replace($code, $val, $page);\n\t}\n\t// return rendered content\n\techo $page;\n\treturn;\n}", "title": "" }, { "docid": "673231cd7c81f7689269aabdecee1a7c", "score": "0.70763326", "text": "public function render($template, $parameters = array()) {\n\t\t$template = TEMPLATE_DIR . $template . '.tpl';\n\t\t\n\t\t//检查模板是否存在\n\t\tif (! $this->templateExists ( $template )) {\n\t\t\treturn Response::displayError ( 1029, '找不到模板 ' . $template );\n\t\t}\n\t\t\n\t\tforeach ( $parameters as $varname => $value ) {\n\t\t\t$this->engine->assign ( $varname, $value );\n\t\t}\n\t\t$this->engine->display ( $template );\n\t}", "title": "" }, { "docid": "83bd67daeb388884a6b1e8d0ab8eb9ae", "score": "0.7053376", "text": "public function render($template = '')\n {\n \n }", "title": "" }, { "docid": "252c268d706508aefa52b5ae28ea4d44", "score": "0.70059514", "text": "function render_template( /*$template, $variables*/) {\n ob_start();\n $model = array(\n //add any special values here\n \"template\" => func_get_args()[0]\n );\n $model = array_merge($model, $this->extraData);\n\n //put any functions directly in scope\n $expectInModel = function ($name) use (&$model) {\n if(isset($name) && !array_key_exists($name, $model)) {\n throw new \\Exception(\"The variable '\".$name.\"' was not provided to the template '\".$model['template'].\"'.\");\n }\n };\n\n $model = array_merge($model, func_get_args()[1]);//combine with variables passed in arg1\n\n //include the template from arg0\n include func_get_args()[0];\n return ob_get_clean();\n }", "title": "" }, { "docid": "d842bf2fa61f0826829ab211b661b42f", "score": "0.7000083", "text": "public function renderTemplate(){\n\t\tif(!is_null($this->template_file))\n\t\t\t$this->template->render();\n\t}", "title": "" }, { "docid": "c953129f8e8d7e017a849d7c33c45c5b", "score": "0.69637465", "text": "function render($template, $variables)\n{\n extract($variables); // берет массив и каждый элемент делает переменной, в которую записывает её значение\n ob_start(); // буферизация вывода\n include $template;\n return ob_get_clean(); // делает вывод и очищает буфер обмена\n // END\n}", "title": "" }, { "docid": "e20a4e11e8f3d6d3d33f1ad67c0f6083", "score": "0.6951614", "text": "private function render_template(): void {\n\t\tif (!empty($this->template)) {\n\t\t\t// capture the view file and set it as a contents variable to place in our template\n\t\t\t$contents = $this->capture_page($this->view_path, $this->get_data());\n\n\t\t\t// show the template\n\t\t\trequire_once($this->template);\n\t\t}\n\t}", "title": "" }, { "docid": "829d1a8d7bbacf725217f72f0e1750e2", "score": "0.6950797", "text": "public function render($template, array $data = array());", "title": "" }, { "docid": "95582ee1255a888f3ecf837ca681ac7c", "score": "0.69243044", "text": "public function render(string $template, array $content);", "title": "" }, { "docid": "8d2d1365c9c799020f9522f32e356c01", "score": "0.6912746", "text": "function render($template, $values = [])\n {\n // if template exists, render it\n if (file_exists(\"../templates/$template\"))\n {\n // extract variables into local scope\n extract($values);\n \n // render header\n require(\"../templates/header.php\");\n\n // render menu\n // require(\"templates/menu.php\");\n\n // render template\n require(\"../templates/$template\");\n\n // render footer\n //require(\"templates/footer.php\");\n }\n\n // else err\n else\n {\n trigger_error(\"Invalid template: $template\", E_USER_ERROR);\n }\n }", "title": "" }, { "docid": "7065bfc7e89c1b6fd25992ea5d7e4228", "score": "0.6853073", "text": "function render_template($template, $settings) {\n $text = file_get_contents($template); \n $text = transform_text($text, $settings);\n return $text;\n }", "title": "" }, { "docid": "7169a27a0dcfdf85be84f8d3a2730fac", "score": "0.6852638", "text": "public static function renderTemplate($view, $params)\n {\n // generate template variables\n extract($params);\n\n // start stream\n ob_start();\n\n $templateFile = self::TEMPLATE_FOLDER . $view . self::TEMPLATE_EXTENSION;\n\n // check if template exists\n if (!file_exists($templateFile)) {\n throw ViewException::templateNotFound($view);\n }\n\n // call template\n require_once $templateFile;\n\n // return stream\n return ob_get_clean();\n }", "title": "" }, { "docid": "a833290e966a3c30de99ed0d58ea200c", "score": "0.68376046", "text": "public function render( $file, $data );", "title": "" }, { "docid": "ad43a6081bebf59baa0d4d2f530d83a9", "score": "0.68280256", "text": "public static function render($template,$variables) {\n\t\textract($variables);\n\t\trequire $template;\n\t}", "title": "" }, { "docid": "554ab7d10fece9520398309692be7454", "score": "0.6791349", "text": "public function render($template) {\n $html = '<p style=\"text-align:center; font-size:28px; font-style:italic; padding-top:50px;\">No template found.</p>';\n if ($template) {\n $list = array($template);\n } else {\n $list = self::$_templates;\n }\n\n $allow_php = Statamic::get_setting('_allow_php', false);\n \n foreach ($list as $template) {\n $template_path = $this->getTemplatesDirectory() . '/templates/' . ltrim($template, '/');\n $template_type = 'html';\n\n if (file_exists($template_path.'.html') || file_exists($template_path.'.php')) {\n # standard lex-parsed template\n if (file_exists($template_path.'.html')) {\n \n Statamic_View::$_dataStore = array_merge(Statamic_View::$_dataStore, $this->data);\n $html = $this->parser->parse(file_get_contents($template_path.'.html'), Statamic_View::$_dataStore, array($this, 'callback'), $allow_php);\n\n # lets forge into raw data\n } elseif (file_exists($template_path.'.php')) {\n\n $template_type = 'php';\n\n extract($this->data);\n ob_start();\n require $template_path.\".php\";\n $html = ob_get_clean();\n \n } else {\n\n # you broke it.\n throw new RuntimeException('View cannot render template `' . $template_path . '`. Template does not exist.');\n }\n\n break; \n }\n }\n\n return $this->_render_layout($html, $template_type);\n }", "title": "" }, { "docid": "9d07e834ee5f80841f2089e31c350549", "score": "0.674697", "text": "function render_file($template_path) {\n\t\t/* any variables found here end up in the templates global scope */\n\t\t\n\t\tob_start();\n\t\tinclude($template_path);\t\t\n\t\t$this->content_for_layout = ob_get_contents();\n\t\tob_end_clean();\t\t\n\t\t\n\t\tif ($this->layout) {\n\t\t\t\n\t\t\t$layout_path = $this->get_layout_path();\n\t\t\t\n\t\t\tif (file_exists($layout_path)) {\n\t\t\t\tob_start();\n\t\t\t\tinclude($layout_path);\n\t\t\t\t$this->content_for_layout = ob_get_contents();\n\t\t\t\tob_end_clean();\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\ttrigger_error(\"layout '$layout_path' was not found\", E_USER_ERROR);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $this->content_for_layout;\n\t\t\n\t}", "title": "" }, { "docid": "90f2b42b41412e72527e04bc88d4faff", "score": "0.6739261", "text": "function render($template, $values = [])\n {\n // if template exists, render it\n if (file_exists(\"../templates/$template\"))\n {\n // extract variables into local scope\n extract($values);\n\n require(\"constants.php\");\n\n // render header\n require(\"../templates/header.php\");\n\n // render template\n require(\"../templates/$template\");\n\n // render footer\n require(\"../templates/footer.php\");\n }\n\n // else err\n else\n {\n trigger_error(\"Invalid template: $template\", E_USER_ERROR);\n }\n }", "title": "" }, { "docid": "3a66f501028935812be5f5ae1b2f29af", "score": "0.67001635", "text": "function render($template, $data = array())\n{\n $path = __DIR__ . '/../templates/' . $template . '.php';\n if (file_exists($path)) {\n extract($data);\n require($path);\n }\n else{\n\n echo \"Something went wrong in the rendering of Pages, halting page load.\";\n exit;\n }\n}", "title": "" }, { "docid": "4733a742079dd733f356c131712e43c7", "score": "0.66947013", "text": "function renderView(\n string $template,\n array $data = []\n): string {\n extract($data);\n\n ob_start();\n require \"../../resources/views/$template\";\n $content = ob_get_contents();\n ob_end_clean();\n\n return ($content ? $content : \"\");\n}", "title": "" }, { "docid": "338437c56ca0b6c5197853d33ded2bde", "score": "0.669428", "text": "public function render( $filename );", "title": "" }, { "docid": "3d7fc0310bd2838432422fd9d1fe35df", "score": "0.6687267", "text": "protected function render(string $template, array $params): string {\n\t\treturn $this->view->loadTemplate($template)->render($params);\n\t}", "title": "" }, { "docid": "133f79158aeb1fe2eff6734634997b27", "score": "0.6677051", "text": "public function render_template( $file, $params = array(), $return = false ) {\r\n\r\n\t\t// Assign $file to a variable which is unlikely to be used by users of the method.\r\n\t\textract( $params, EXTR_OVERWRITE ); // phpcs:ignore WordPress.PHP.DontExtract.extract_extract\r\n\r\n\t\tif ( $return ) {\r\n\t\t\tob_start();\r\n\t\t}\r\n\r\n\t\t$file_name = $file . '.php';\r\n\r\n\t\t$file_path = forminator_plugin_dir() . $file_name;\r\n\t\tif ( file_exists( $file_path ) ) {\r\n\t\t\tinclude $file_path;\r\n\t\t}\r\n\r\n\t\tif ( $return ) {\r\n\t\t\treturn ob_get_clean();\r\n\t\t}\r\n\r\n\t\tif ( ! empty( $params ) ) {\r\n\t\t\tforeach ( $params as $param ) {\r\n\t\t\t\tunset( $param );\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "063ea6d0a9f931358f7a55bf16dbdcc2", "score": "0.6674798", "text": "public function render($template) {\r\n $html = '<p style=\"text-align:center; font-size:28px; font-style:italic; padding-top:50px;\">No template found.</p>';\r\n if ($template) {\r\n $list = array($template);\r\n } else {\r\n $list = self::$_templates;\r\n }\r\n\r\n $allow_php = HiCMS::get_setting('_allow_php', false);\r\n \r\n foreach ($list as $template) {\r\n $template_path = $this->getTemplatesDirectory() . '/templates/' . ltrim($template, '/');\r\n $template_type = 'html';\r\n\r\n if (file_exists($template_path.'.html') || file_exists($template_path.'.php')) {\r\n # standard lex-parsed template\r\n if (file_exists($template_path.'.html')) {\r\n \r\n HiCMS_View::$_dataStore = array_merge(HiCMS_View::$_dataStore, $this->data);\r\n $html = $this->parser->parse(file_get_contents($template_path.'.html'), HiCMS_View::$_dataStore, array($this, 'callback'), $allow_php);\r\n\r\n # lets forge into raw data\r\n } elseif (file_exists($template_path.'.php')) {\r\n\r\n $template_type = 'php';\r\n\r\n extract($this->data);\r\n ob_start();\r\n require $template_path.\".php\";\r\n $html = ob_get_clean();\r\n \r\n } else {\r\n\r\n # you broke it.\r\n throw new RuntimeException('View cannot render template `' . $template_path . '`. Template does not exist.');\r\n }\r\n\r\n break; \r\n }\r\n }\r\n\r\n return $this->_render_layout($html, $template_type);\r\n }", "title": "" }, { "docid": "fad057fa85cc0291a4579bf3891d6c04", "score": "0.6671173", "text": "public function render() {\n\t\trequire 'template.php';\n\t}", "title": "" }, { "docid": "cafd1762e0da6eb28eb096881255f1f6", "score": "0.66504323", "text": "function ______render($template) {\n // Disables notices reporting in php template code\n $error_reporting = error_reporting();\n error_reporting(E_ALL ^ E_NOTICE);\n // Create template-wide variables and functions\n $d = xUtil::array_merge($this->data, $data);\n $m = xUtil::array_merge($this->meta, $meta);\n if (!function_exists('u')) {\n function u($path = null, $full = false) {\n return xUtil::url($path, $full);\n }\n }\n // Loads the template and processes template tags\n $file = \"{$this->path}/{$template}\";\n if (!file_exists($file)) throw new Exception(\"Template file not found ($file)\");\n // Creates a pure-PHP template\n// $template = $this->process_tags(file_get_contents($file));\n // Renders the template\n // TODO: Clean spaces before '<?php' and after '>'\n ob_start();\n require($file);\n $s = ob_get_contents();\n ob_end_clean();\n // Reverts error reporting level\n error_reporting($error_reporting);\n // Embeds the template if applicable\n if ($this->container) {\n $container_view = xView::load($this->container, array(\n 'contents' => $s,\n 'misc' => @$d['container']\n ), $this->meta);\n $s = $container_view->render();\n }\n return $s;\n }", "title": "" }, { "docid": "205bc419fdfdc1542a52574fb97c7c3c", "score": "0.66370463", "text": "function render($template, $values = [])\n {\n\t\t//echo \"<script>console.log(\\\"\".$template.\"\\\");</script>\";\n\t\t\n // Checking the file of the template exists\n if (file_exists(\"../templates/$template\"))\n {\n\t\t\t// ******************************************************\n\t\t\t\n\t\t\t// Check It @ujjwal\n\t\t\t\n\t\t\t//*******************************************************\n\t\t\t\n\t\t\tif($template == \"dashboard.php\"){\n\t\t\t\t// extract variables into local scope\n extract($values);\n\n // Include the header\n require(\"../templates/dashheader.php\");\n\n // Include the template\n require(\"../templates/$template\");\n\n // Includet the footer\n require(\"../templates/dashfooter.php\");\n\t\t\t}\n\t\t\t\n\t\t\t// ************************************************\n\t\t\t\n\t\t\telse{\n\t\t\t// extract variables into local scope\n extract($values);\n\n // Include the header\n require(\"../templates/header.php\");\n\n // Include the template\n require(\"../templates/$template\");\n\n // Includet the footer\n\t\t\t\trequire(\"../templates/footer.php\");}\n }\n\n // else show an error (temp)\n else\n {\n trigger_error(\"Invalid template: $template\", E_USER_ERROR);\n }\n }", "title": "" }, { "docid": "f4c728a90fc290f5e4881ba666980143", "score": "0.66129935", "text": "public function render($file, array $data)\n\t{\n\t\t// Find template\n\t\t$path = Kohana::find_file('views', $file, $this->_extension);\n\t\tif ($path === NULL)\n\t\t{\n\t\t\tthrow new View_Exception('The requested template :file.:ext could not be found', array(\n\t\t\t\t':file' => $file,\n\t\t\t\t':ext' => $this->_extension\n\t\t\t));\n\t\t}\n\t\treturn $this->_render($path, $data);\n\t}", "title": "" }, { "docid": "a68787460d2c55b88ff676f090818bb5", "score": "0.66093594", "text": "private function _render($kohana_tpl_file, array $kohana_tpl_data)\n\t{\n\t\t// Import the view variables to local namespace\n\t\textract($kohana_tpl_data, EXTR_SKIP);\n\t\t// Capture the view output\n\t\tob_start();\n\t\ttry\n\t\t{\n\t\t\t// Load the view within the current scope\n\t\t\tinclude $kohana_tpl_file;\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t// Delete the output buffer\n\t\t\tob_end_clean();\n\t\t\t// Re-throw the exception\n\t\t\tthrow $e;\n\t\t}\n\t\t// Get the captured output and close the buffer\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "f40ffa2954159d76316d831fa7af509f", "score": "0.6601652", "text": "public function render($template)\n {\n // first see if what we've been given is a file\n $templateFile = $this->di->get('View')->getViewDir().\n '/'.$template.'.php';\n\n if (is_file($templateFile)) {\n extract($this->_properties);\n ob_start();\n include_once $templateFile;\n return ob_get_clean();\n\n } else {\n // it's just a string! fall back on str_replace\n foreach ($this->_properties as $name => $value) {\n $template = str_replace('['.$name.']',$value,$template);\n }\n return $template;\n }\n }", "title": "" }, { "docid": "6b832ba9bdba392e93ad154d19f8501f", "score": "0.6599046", "text": "public function render($file, $data)\n {\n $path ='../view/'. $file .'.php';\n//cache ;; cookie, session;;\n if (file_exists($path)) {\n extract($data);\n// ob_start();\n// require_once($view_file);\n// $content = ob_get_clean();\n// // Sau khi có kết quả đã được lưu vào biến $content, gọi ra template chung của hệ thống đế hiển thị ra cho người dùng\n// require_once('views/layouts/application.php');\n// ob_start();\n\n require_once $path;\n // dd($data);\n// ob_get_clean();\n//\n// require_once 'main-template.php';\n // require\n }else {\n echo \"404 NOT FOUND\";\n }\n }", "title": "" }, { "docid": "6cff0e60c57f0f99c36dc2a9756a23f1", "score": "0.6598848", "text": "function renderReal($viewFile, array $param = [], $actionFile = null)\n{\n if (file_exists($viewFile)) {\n extract($param);\n if (!is_null($actionFile)) {\n include $actionFile; \n }\n ob_start();\n include $viewFile;\n return ob_get_clean();\n } else {\n return \"Resource \" . $viewFile . \" not found.\";\n }\n}", "title": "" }, { "docid": "b4394f54ea8892a0b36f03ff564d289a", "score": "0.6590898", "text": "public static function renderTemplate($template, $args = [])\n {\n $template = dirname(__DIR__) . '/App/Views/' . $template;\n extract($args);\n include($template);\n }", "title": "" }, { "docid": "87c5a3e13331137a37e59beedd4edca3", "score": "0.6554816", "text": "function render($view, $data, $return = false) {\r\n\tif(sizeof($data) > 0)\r\n extract($data, EXTR_SKIP);\r\n\r\n\t$file = VIEWS.$view.\".php\";\r\n\tif(file_exists($file)) {\r\n\t\tif($return) {\r\n\t ob_start();\r\n\t include($file);\r\n\t $content = ob_get_contents();\r\n\t ob_end_clean();\r\n\t return $content;\r\n\t\t} else {\r\n \t\tinclude($file);\r\n \t}\r\n } else {\r\n \tthrow new Exception(\"unable to load template: $file\", 500);\r\n }\r\n}", "title": "" }, { "docid": "227bb507eda1716101801949cb32c81f", "score": "0.65377873", "text": "public function render($key, $data, $template);", "title": "" }, { "docid": "b75737157a65a3e10240ba0f68a0aca3", "score": "0.6524776", "text": "public function render() {\n ob_start();\n\n // Include the template file.\n include($this->template);\n\n // Set the rendered template file to a variable\n // and disable the output buffer.\n $this->content = ob_get_clean();\n\n // Enables the output buffer.\n ob_start();\n\n // Include the layout file.\n include($this->layout);\n\n // Set the rendered layout file to a variable\n // and disable the output buffer.\n $output = ob_get_clean();\n\n // Display the layout with the template.\n echo $output;\n }", "title": "" }, { "docid": "8ee6522cad5e8a1fd19917039fe1905a", "score": "0.6524688", "text": "function template(string $path, array $variables): string\n{\n ob_start();\n extract($variables);\n require $path;\n $output = ob_get_contents();\n ob_get_clean();\n return $output;\n}", "title": "" }, { "docid": "80d1bc3de1a7bf6398d952d657fc13f5", "score": "0.65065706", "text": "public function render($file) {\n\t\treturn $this->_template->fetch ( $file );\n\t}", "title": "" }, { "docid": "1ee4e16822ee1261b6a9e2bcd7bfe870", "score": "0.6506272", "text": "abstract public function template($name);", "title": "" }, { "docid": "131548fdbc9d1cd1d6c7d93b54b05bfe", "score": "0.6503965", "text": "protected function Template($fileName, $vars = array())\n\t{\n\t\t// Initializarea variabilelor pentru template\n\t\tforeach ($vars as $k => $v)\n\t\t{\n\t\t\t$$k = $v;\n\t\t}\n\n\t\t// Generarea rindului HTML.\n\t\tob_start();\n\t\tinclude $fileName;\n\t\treturn ob_get_clean();\t\n\t}", "title": "" }, { "docid": "01d0367d5e00a844657cbefe6de65a81", "score": "0.6501091", "text": "protected function renderTemplate($template, array $parameters = [])\n {\n return $this->getTemplating()->render($template, $parameters);\n }", "title": "" }, { "docid": "4ecdc45a895ef6866f095c51e2f2fcfa", "score": "0.6498121", "text": "public function template($tplname = null, $variable = null, $cache=null,$cache_time=0){\r\n $fn = $this->parseFilepPath('template.').$this->parseFilePrefex($tplname);\r\n $View = new static($fn,$variable,$cache,$cache_time,true,true);\r\n $View->render();\r\n }", "title": "" }, { "docid": "4e3df7b5a27a689ce41ca4d267417171", "score": "0.64936185", "text": "protected function renderView($fileName, array $data) {\n\t\t$templatePath = $this->getTemplatePath( $fileName );\n\n\t\tif ( ! file_exists( $templatePath ) ) {\n\t\t\treturn $this->error(strtr('File \"{filePath}\" does not exists.', array(\n\t\t\t\t'{filePath}' => $templatePath,\n\t\t\t)));\n\t\t}\n\n\t\tob_start();\n\t\textract( $data );\n\t\tinclude $templatePath;\n\t\t$content = ob_get_clean();\n\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "2b2360bca2548dbef529ce3c7659cedc", "score": "0.6468784", "text": "function render($template, $params = array())\n {\n echo $this->fetch($template, $params);\n }", "title": "" }, { "docid": "8acecc13a77570a6a25332bded233dc2", "score": "0.646774", "text": "public static function template( $file, $args = array() ) {\n if(is_array($args))\n \t\textract($args);\n \tob_start();\n\n\n \t$path = RDWP_RDH_TEMPLATES . '/' . preg_replace(\"/\\.php$/\", '', $file) . '.php' ;\n require($path);\n \treturn ob_get_clean();\n }", "title": "" }, { "docid": "f4930995e65d10612d03bfcc2c30d035", "score": "0.64676774", "text": "public function renderTemplate(array $data = [])\n\t{\n\t\textract($data);\n\t\tob_start();\n\t\tinclude $this->getViewTemplate();\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "b69d4ff5e70708c232480373a0b2e49e", "score": "0.6464796", "text": "function render_php($path, $parameters = null)\n{\n ob_start();\n include($path);\n $view = ob_get_contents();\n ob_end_clean();\n return $view;\n}", "title": "" }, { "docid": "f518e0f76fdf921c62a9777114a47864", "score": "0.64647216", "text": "public function render($content = null)\n\t{\n\t\t$this->_executeTemplateFile($content);\n\t}", "title": "" }, { "docid": "be7ed66d38b015dd3f9ec865ee554666", "score": "0.645705", "text": "public function render($file)\n {\n if ($this->layout == FALSE)\n {\n return $this->open_template(getenv('DOCUMENT_ROOT') . '/' . $this->views . '/' . $file);\n }\n else\n {\n $this->content = $this->open_template(getenv('DOCUMENT_ROOT') . '/' . $this->views . '/' . $file);\n return $this->open_template(getenv('DOCUMENT_ROOT') . '/' . $this->views . '/' . $this->layout_template);\n }\n }", "title": "" }, { "docid": "ee2e68bbf2c868ed66c58d89c0af9ea6", "score": "0.64501053", "text": "public function renderTemplate()\n {\n if (is_array($this->args) && !(empty($this->args))) {\n return $this->loadTemplate($this->layout_name, $this->args);\n } else {\n return $this->loadTemplate($this->layout_name);\n }\n }", "title": "" }, { "docid": "de2541683df9a89086296cf234dabad8", "score": "0.6443731", "text": "function show_template($file, $args = null, $default_folder = 'parts')\n{\n echo return_template($file, $args, $default_folder);\n}", "title": "" }, { "docid": "6f8d9083b1d4f1de4ebd5a6f8319fafd", "score": "0.6426642", "text": "function renderResponse($template, $variables = [])\n{\n /**\n * extract - Import variables from an array into the current symbol table.\n * @param array $variables - an associative array. This function treats keys as variable names and values as variable values.\n * For each key/value pair it will create a variable in the current symbol table.\n * @return int - the number of variables successfully imported into the symbol table..\n */\n extract($variables);\n /**\n * file_exists - Checks whether a file or directory exists.\n * @param string $template - path to the file or directory.\n * @return bool - TRUE if the file or directory specified by $template exists; FALSE otherwise.\n */\n if (file_exists($template)) {\n /**\n * ob_start - This function will turn output buffering on (no output is sent from the script then).\n * @return bool - TRUE on success or FALSE on failure.\n */\n ob_start();\n include_once $template;\n /**\n * ob_get_clean - Gets the current buffer contents and delete current output buffer.\n * @param void\n * @return string Returns the contents of the output buffer and end output buffering.\n * If output buffering isn't active then FALSE is returned.\n */\n return ob_get_clean();\n }\n return 'Template not found.';\n}", "title": "" }, { "docid": "27c933d9dbb750ff62e7e1cbac4ebf9d", "score": "0.64258474", "text": "public function render() {\n\t\t// Set the path\n\t\t$path = APP_INCLUDES_PATH . \"/views/$this->template_name.php\";\n\n\t\t// Check if template exists\n\t\tif ( ! is_file( $path ) ) {\n\t\t\techo 'Template not found';\n\t\t\treturn;\n\t\t}\n\n\t\t// Make $_ available for using in template, both will work\n\t\t$_ = $this->_;\n\n\t\t// Enable buffer\n\t\tob_start();\n\n\t\t// Load the template file\n\t\trequire $path;\n\n\t\t// Print the buffer\n\t\techo ob_get_clean();\n\t}", "title": "" }, { "docid": "0ddc5f2a9c5878d09a553a6a356268d1", "score": "0.64090806", "text": "abstract public function template();", "title": "" }, { "docid": "4d0d20f7acc4bc73e7d26cddc2775da2", "score": "0.6407886", "text": "public function render($template) {\r\n\t\textract($this->data->all(), EXTR_SKIP);\r\n\t\t\r\n\t\tob_start();\r\n\t\tinclude($this->getTemplatePathname($template));\r\n\t\t$buffer = ob_get_contents();\r\n\t\t@ob_end_clean();\r\n\t\treturn $buffer;\r\n\t}", "title": "" }, { "docid": "55c42753ce6b341f64fe7cf3d8038d85", "score": "0.64069897", "text": "private function renderTemplate(string $templateName, array $params) : string\n {\n $templateFullPath = GEN_PATH_TEMPLATES . '/' . $templateName . '.php';\n $templateResultBuffer = \"\";\n\n extract($params, EXTR_SKIP);\n\n ob_start();\n require $templateFullPath;\n $templateResultBuffer = ob_get_clean();\n\n return $templateResultBuffer;\n }", "title": "" }, { "docid": "9d1a98879d43add1c035eb55d009a738", "score": "0.64021534", "text": "public function render($template)\n {\n $request = new Request();\n if(!file_exists(self::VIEWS_PATH .$request->getController().DS. $template . \".\" . self::EXTENSION_TEMPLATES))\n {\n throw new \\Exception(\"Error: El archivo \" . self::VIEWS_PATH . $template . \".\" . self::EXTENSION_TEMPLATES . \" no existe\", 1);\n }\n ob_start();\n extract($this->data);\n include(self::VIEWS_PATH . \"layouts\".DS. \"header\". \".\". self::EXTENSION_TEMPLATES);\n include(self::VIEWS_PATH .$request->getController().DS. $template . \".\" . self::EXTENSION_TEMPLATES);\n include(self::VIEWS_PATH . \"layouts\".DS. \"footer\". \".\". self::EXTENSION_TEMPLATES);\n\n $str = ob_get_contents();\n ob_end_clean();\n echo $str;\n }", "title": "" }, { "docid": "96d77a493da4f16a89874192bbbcef1d", "score": "0.63928676", "text": "function render($tpl, array $tpl_vars = null);", "title": "" }, { "docid": "97a50261b1c473d8257db5787e538ef0", "score": "0.6391814", "text": "private function render (\n\t\tstring $template_name, \n\t\tarray $params=[] \n\t) : string {\n\n\t\tforeach ($params as $key => $val) {\n\t\t\t$this->renderer->addField($key, $val);\n\t\t}\n\n\t\t$this->renderer->packFieldsForTemplate($template_name);\n\n\t\treturn $this->renderer->render();\n\t}", "title": "" }, { "docid": "89f960ac4db58c08ad87962753fdea30", "score": "0.6384952", "text": "public function render($template, $context) {\n\t\tob_start();\n\t\textract($context);\n\t\t\n\t\t$templateFile = $this->getTemplatePath() . '/' . $template;\n\t\tif (file_exists($templateFile)) {\n\t\t\tinclude $templateFile;\n\t\t} else {\n\t\t\tthrow new Exception(\"Template $template not found in {$this->getTemplatePath()}.\");\n\t\t}\n\t\t\n\t\tif ($this->wrappingTemplate) {\n\t\t\t$templateFile = $this->getTemplatePath() . '/' . $this->wrappingTemplate . '.tpl.php';\n\t\t\tif (file_exists($templateFile)) {\n\t\t\t\t$content = ob_get_contents();\n\t\t\t\tob_clean();\n\t\t\t\tinclude $templateFile;\n\t\t\t} else {\n\t\t\t\tthrow new Exception(\"Template {$this->wrappingTemplate} not found in {$this->getTemplatePath()}.\");\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\t$out = ob_get_contents();\n\t\tob_clean();\n\t\t$this->wrappingTemplate = false;\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "6ec8816cfece259e93a3f6d2b607dacc", "score": "0.6378354", "text": "public function render( $template, $data = array() )\n {\n if( ! $this->checkTemplate( $template ) )\n throw new TemplateException( 'The template file '. $template .' does not exists.' );\n\n $this->template = $template;\n \n $this->data = array_merge( $this->data, $data );\n \n $key = sha1($this->template.OpisC\\serialize($this->data));\n \n if($this->cache != false && $this->cache_enabled)\n {\n $page = $this->cache->getFullPage($key);\n if(null != $page)\n {\n echo $page;\n return; \n }\n }\n \n $contents = $this->display();\n ($this->cache != false && $this->cache_enabled)?$this->cache->setFullPage($key,$contents):null;\n\n }", "title": "" }, { "docid": "95867520875f6391541c0685e4a60ca1", "score": "0.6375092", "text": "public function render($file, $content)\n {\n ob_start();\n \n //extract vars\n extract($content);\n \n //set template\n include($file);\n \n $this->page_content = ob_get_contents();\n ob_end_clean();\n }", "title": "" }, { "docid": "096dde76dabac7656aad4c30e8a6cf6b", "score": "0.6343453", "text": "function render($template, $filename, $vars=array(), $layout='')\n\t{\n\t\tif($layout) {\n\t\t\t$vars['CONTENT_FOR_LAYOUT'] = $template->fetch($filename, $vars);\n\t\t\t// use the absolute path so the template doesn't look in a module\n\t\t\t$filename = DIR_FS_APP.DS.'templates'.DS.$layout;\n\t\t}\n\t\tif(isset($_SESSION['_FLASH_MESSAGE'])) {\n\t\t\t$vars['FLASH_MESSAGE'] = $_SESSION['_FLASH_MESSAGE'];\n\t\t\tunset($_SESSION['_FLASH_MESSAGE']);\n\t\t}\n\n\t\t// insert <head> data\n\t\t$head = '';\n\t\tforeach($this->q_html_head as $k=>$v) $head .= $v;\n\t\tif(!$this->ajax) {\n\t\t\tforeach($this->q_css_load as $k=>$v) {\n\t\t\t\t$head .= '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.$v.'\" />'.\"\\n\";\n\t\t\t}\n\t\t\tforeach($this->q_js_load as $k=>$v) {\n\t\t\t\t$head .= '<script type=\"text/javascript\" src=\"'.$v.'\"></script>';\n\t\t\t}\n\t\t\tif(!empty($this->q_js_run)) {\n\t\t\t\t$head .= '<script type=\"text/javascript\">'.\"\\n\";\n\t\t\t\tforeach($this->q_js_run as $k=>$v) {\n\t\t\t\t\tif(substr($k, 0, 1) == '+') {\n\t\t\t\t\t\t$head .= \"$v\\n\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$head .= '$(document).ready(function(){'.$v.'});'.\"\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$head .= \"</script>\\n\";\n\t\t\t}\n\t\t}\n\t\t$vars['HTML_HEAD'] = $head;\n\n\t\techo $template->fetch($filename, $vars);\n\t}", "title": "" }, { "docid": "9b69dc5da14d3a3a92e7e12ba26d8e11", "score": "0.63366735", "text": "function return_template($file, $args = null, $default_folder = 'parts')\n{\n $file = $default_folder . '/' . $file . '.php';\n if ($args) {\n extract($args);\n }\n if (locate_template($file)) {\n ob_start();\n include(locate_template($file)); //Theme Check free. Child themes support.\n $template_content = ob_get_clean();\n\n return $template_content;\n }\n\n return '';\n}", "title": "" }, { "docid": "3a12f610aa5fbd39ac4cb2672a4339f2", "score": "0.63210213", "text": "private function render()\n {\n $path = module_path() . '/' . $this->template;\n $output = false;\n\n if ($this->cacheable) {\n $output = $this->getCached($path);\n }\n \n if (!$output) {\n $template = new Template($path, $this->arguments);\n $output = $this->setCached($path, $template->render());\n }\n\n echo $output;\n }", "title": "" }, { "docid": "ead8db7cd455a0e1236c90ecd9bf72ed", "score": "0.6311341", "text": "function use_template($template){\n $template_doc = sprintf(\"views/%s.php\", $template);\n return $template_doc;\n}", "title": "" }, { "docid": "d3277200a61b3421bd63c5b5ef802f81", "score": "0.6310902", "text": "function render( $template_name ){\n\t$template = getTwig()->loadTemplate( $template_name );\n\t$pageModel = getPageModel();\n\treturn $template->render( $pageModel->export() );\n}", "title": "" }, { "docid": "c67545e9b7f628f9174db3a7549c4ef9", "score": "0.63095474", "text": "protected function render_template($template, array $template_vars = NULL) {\n // Is the template in a sub-folder? If so, parse out the filename and path.\n if (strpos($template, '/')) {\n // str_replace is faster than preg_replace, but strtr is faster than str_replace by a factor of 4\n $template = strtr(pathinfo($template, PATHINFO_DIRNAME), '/', DS).DS.substr(strrchr($template, '/'), 1);\n }\n \n\t\t// Template name is case-sensitive, since you can have two files with same names but different cases of same letters on Linux\n\t\t// You need to make sure the case of the provided name is consistent with the case of the file name\n $template_file = APP_TEMPLATE_DIR.$template.'.php';\n \n if ( ! file_exists($template_file)) {\n Common::halt('A System Error Was Encountered', \"Unknown template file '{$template}'\", 'sys_error');\n } else {\n if (count($template_vars) > 0) {\n // Import the template variables to local namespace\n // If there is a collision, overwrite the existing variable\n extract($template_vars, EXTR_OVERWRITE);\n }\n \n // Capture the rendered output\n // Turn on output buffering\n ob_start();\n // NOTE: don't use require_once here.\n // require_once will cause problem if the same sub template/element \n // needs to be rendered more than once in the same scope, because require_once \n // will not include the sub template/element file again if it has already been included\n // so only the first call can be rendered as a result of the use of require_once\n require $template_file;\n // Gets the contents of the output buffer\n $content = ob_get_contents();\n // Clean (erase) the output buffer and turn off output buffering\n ob_end_clean();\n \n return $content;\n } \n }", "title": "" }, { "docid": "1780c8b800e663d5b13dbf788e3de7a7", "score": "0.6309292", "text": "public function processTemplate($variables);", "title": "" }, { "docid": "63b7b8bb8ca12ab207ba9e9581d9fb24", "score": "0.63036036", "text": "public function render($template, array $data = [])\n {\n $closure = $this->factory->make(Closure::class, ['closure'=>function ($template, $data) {\n extract($data);\n include $template;\n }]);\n $render = $closure->bindTo(\n $this->helperManager,\n get_class($this->helperManager)\n );\n\n ob_start();\n $render($this->getTemplatePath($template), $data);\n return ob_get_clean();\n }", "title": "" }, { "docid": "c5bf9b2ab4270615c0436a7de614412e", "score": "0.62894744", "text": "public function setTemplate($file);", "title": "" }, { "docid": "3b2f98945a655771afe9794daccfeaf3", "score": "0.6277847", "text": "public function render($params){\n if (is_array($params)){\n $view=$params[0];\n $viewFile = $view.'.php';\n include $this->getPathView().$viewFile;\n }\n }", "title": "" }, { "docid": "6f7b949e1b85305fc76f3f6b5962fb63", "score": "0.6273197", "text": "function render($templateName) {\n\n\t\t$this->checkTemplateExists($templateName);\n\t\tforeach($this->_viewVars as $key => $var) {\n\t\t\t$$key = $var;\n\t\t}\n\t\tinclude_once($this->getTemplatePath($templateName));\n\t}", "title": "" }, { "docid": "4694adb0fbabf1e2ab1ef50197a13b92", "score": "0.6263261", "text": "protected function _run()\n {\n $file = func_num_args() > 0 && file_exists(func_get_arg(0)) ? func_get_arg(0) : '';\n if ($this->_customTemplate || $file) {\n $template = $this->_customTemplate;\n if (!$template) {\n $template = $file;\n }\n\n $this->_smarty->display($template);\n } else {\n throw new Zend_View_Exception('Cannot render view without any template being assigned or file does not exist');\n }\n }", "title": "" }, { "docid": "c760a6682d9ad669b9c17b51ec12b35c", "score": "0.62630105", "text": "public function render($file, $vars){\n\n extract($vars);\n\n //inicia o buffer\n ob_start();\n\n //inclui o template\n include($file);\n\n //faz o template ser renderizado e armazena o conteudo na variavel\n $renderedHTML = ob_get_contents();\n\n //encerra o buffer e limpa ele\n ob_end_clean();\n\n //retorna a variavel contendo a pagina renderizada\n return $renderedHTML;\n\n }", "title": "" }, { "docid": "7e7496f8e4514aa305afda039001877a", "score": "0.62577903", "text": "public function render($template, $params = [])\n {\n $this->_template = $template;\n\n $view = $this->_view;\n\n // Default messages to null\n $errorMessage = null;\n $actionDone = null;\n\n // ckeck if error message\n if (isset($_SESSION['errorMessage'])) {\n $errorMessage = $_SESSION['errorMessage'];\n }\n\n // ckeck if action message\n if (isset($_SESSION['actionDone'])) {\n $actionDone = $_SESSION['actionDone'];\n }\n\n // Load Twig\n $loader = new \\Twig\\Loader\\FilesystemLoader([\n dirname(dirname(__DIR__)) . '/view/frontend', \n dirname(dirname(__DIR__)) . '/view/backend', \n dirname(dirname(__DIR__)) . '/view/templates'\n ]);\n\n $twig = new \\Twig\\Environment($loader, [\n 'cache' => dirname(dirname(__DIR__)) . '/view/templates/cache', \n 'debug' => true, \n 'auto-reload' => true\n ]);\n\n $params['HOST'] = HOST;\n $params['ASSETS'] = ASSETS;\n $params['VENDOR'] = VENDOR;\n $params['IMAGE'] = IMAGE;\n $params['errorMessage'] = $errorMessage;\n $params['actionDone'] = $actionDone;\n \n echo $twig->render($view . '.twig', $params);\n\n unset($_SESSION['errorMessage']);\n unset($_SESSION['actionDone']);\n \n // session used in CheckController\n unset($_SESSION['game_id']);\n \n }", "title": "" }, { "docid": "11253c167e9af63e480656516e6aaca3", "score": "0.6257555", "text": "protected function render()\n {\n if ( $this->templateNames != null ){ // skip render phase if no template\n $this->preRender();\n \n $this->translateAssetOptions();\n\n $vars = $this->templateVars; // templates only use $vars\n if ($this->viewHeader != null){\n header($this->viewHeader);\n }\n include_once SiteUtil::toAbsolute(\"templates/{$this->templateNames['base']}.php\");\n }\n }", "title": "" }, { "docid": "8d4895d9b26932e300646f20eaa13946", "score": "0.62540454", "text": "public function renderTemplate(string $path, array $data): string\n\t{\n\t\t$data['helper'] = $this->helper;\n\t\t$data['escape'] = $this->helper->escape();\n\t\t$data['container'] = $this->container;\n\n\t\tob_start();\n\t\textract($data, \\EXTR_OVERWRITE);\n\t\tinclude_once $path;\n\t\t$buffer = ob_get_clean();\n\n\n\t\t// Very basic html minify, that won't affect content between html tags\n\t\t$buffer = preg_replace('/>\\s+</', '> <', $buffer);\n\n\t\treturn $buffer;\n\t}", "title": "" }, { "docid": "5873d5416a565a8a8e08e355dbfc1951", "score": "0.62527597", "text": "public function render(ResponseInterface $response, $file, $params = []){\n $this->container->view->render($response,$file, $params);\n }", "title": "" }, { "docid": "d24bc72f68d355dc5b78b8cd82e1314b", "score": "0.62496287", "text": "public function render($template) {\n\t\t$this->parsingFile = $template;\n\t\textract($this->variables);\n\t\t$contents = $this->getFileContents($template);\n\t\t$php = $this->parse($contents);\n\t\tset_error_handler(array($this, 'errorHandler'));\n\t\tob_start();\n\t\t//fwrite(STDERR, \"\\n\\n$template\\n\\n$php\\n\");\n\t\teval('?' . '>' . $php);\n\t\t$result = ob_get_clean();\n\t\trestore_error_handler();\n\t\t$this->parsingFile = null;\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "9b19aaa048c2189b30bf2d8606e2d6a2", "score": "0.6246301", "text": "public function renderTemplate() {\n $this->setIsRendered(true);\n if (file_exists($this->getDirectory().$this->getAction().'.html')) {\n return $this->renderHTML($this->getAction(), $this->getDirectory());\n } elseif (file_exists($this->getDirectory().$this->getAction().'.js')) {\n return $this->renderJS($this->getAction(), $this->getDirectory());\n } elseif (file_exists($this->getDirectory().$this->getAction().'.css')) {\n return $this->renderCSS($this->getAction(), $this->getDirectory());\n } else {\n throw new InvalidViewException(\"No template for `{$this->getAction()}` found in `{$this->getController()}`\");\n }\n }", "title": "" }, { "docid": "1e26faa488a292abdbf2f66afe8007f7", "score": "0.62448007", "text": "function render($options)\n {\n # locals\n if (!empty($options['locals']))\n {\n foreach($options['locals'] as $k => $v) {\n $$k = $v;\n }\n }\n \n # template\n if (isset($options['template']))\n {\n $this->view_format = isset($options['format']) ? $options['format'] : 'html';\n $__template_file = \"{$options['template']}.{$this->view_format}.tpl\";\n \n if (file_exists(ROOT.\"/app/views/{$__template_file}\"))\n {\n if ($this->controller !== null) {\n $this->copy_controller_vars();\n }\n \n ob_start();\n include ROOT.\"/app/views/{$__template_file}\";\n return ob_get_clean();\n }\n \n throw new \\Misago\\Exception(\"Template not found: '{$__template_file}'\", 404);\n }\n \n # partial (or collection of partials)\n elseif (isset($options['partial']))\n {\n if (strpos($options['partial'], '/'))\n {\n $__partial_file = explode('/', $options['partial']);\n $__partial_file = implode('/', array_slice($__partial_file, 0, -1)).\n '/_'.array_pop($__partial_file);\n }\n else {\n $__partial_file = $this->view_path.'/_'.$options['partial'];\n }\n $__view_format = isset($options['format']) ? $options['format'] : $this->view_format;\n $__partial_file .= \".{$__view_format}.tpl\";\n \n if (file_exists(ROOT.\"/app/views/{$__partial_file}\"))\n {\n ob_start();\n \n if (!isset($options['collection']))\n {\n # partial\n include ROOT.\"/app/views/{$__partial_file}\";\n }\n else\n {\n # collection of partials\n $__partial_var = basename($options['partial']);\n $__partial_counter = \"{$__partial_var}_counter\";\n $$__partial_counter = 0;\n \n foreach($options['collection'] as $__partial_value)\n {\n $$__partial_var = $__partial_value;\n $$__partial_counter += 1;\n include ROOT.\"/app/views/{$__partial_file}\";\n }\n }\n return ob_get_clean();\n }\n \n throw new \\Misago\\Exception(\"Partial template not found: '{$__partial_file}'\", 404);\n }\n }", "title": "" }, { "docid": "1805a8b270dd8dd1237ea2d2797b2f63", "score": "0.62363255", "text": "function render( $page, array $data = null ){\n $pages = \"View/\".$page.\".php\";\n $pages = str_replace(\"../\", \"protect\", $pages);\n $pages = str_replace(\";\", \"protect\", $pages);\n $pages = str_replace(\"%\", \"protect\", $pages);\n \n if(!file_exists($pages) ){\n throw new Exception(\"Cette page n'existe pas :(\");\n }\n ob_start();\n !empty($data) ? extract($data) : '';\n\n require $pages;\n $content = ob_get_clean();\n require 'View/template.php';\n}", "title": "" }, { "docid": "0d86a49cec413fcc8d91ee6dd4ff754a", "score": "0.62327886", "text": "public static function render()\n {\n if (empty(self::$templateLocation)) {\n self::setTemplate(Config::get('main/template'));\n }\n // NOTE: This should be the only echo in the system.\n echo self::parse(file_get_contents(self::$templateLocation));\n }", "title": "" }, { "docid": "1f2b6efa010907ff76e63f3be9341209", "score": "0.62248856", "text": "public static function render($fileName , $viewsBag = array()){\n self::$twig = self::$twig ?? init(self::$template);\n return self::$twig->render($fileName,$viewsBag);\n }", "title": "" }, { "docid": "eca29f58934b92628481bea559a55d4d", "score": "0.62228185", "text": "public function render($view, $params = null) {\n if($params) {\n foreach ($params as $name => $value) {\n ${$name} = $value;\n }\n }\n if(!isset($title)) $title = $view;\n ob_start();\n include_once(VIEW . $view . '.php');\n $content = ob_get_clean();\n include_once(VIEW . 'template.php');\n }", "title": "" }, { "docid": "ecbf2e57b2b647b4704324d87cd863c0", "score": "0.621543", "text": "public function render(string $path, $params, bool $mustClean = false);", "title": "" }, { "docid": "7490bdccccf5b1e9d452fcd4969e073c", "score": "0.6209133", "text": "function smarty_function_include_template($params, &$smarty)\n{\n // Is this a relative or absolute path?\n if ($params['file']{0} == '/')\n {\n $tpl = $params['file'];\n } else {\n $tpl = $smarty->template_dir.'/'.$params['file'];\n }\n \n if (file_exists($tpl))\n {\n return $smarty->fetch($tpl);\n } else {\n \n if ($params['fallback']{0} == '/')\n {\n $tpl = $params['fallback'];\n } else {\n $tpl = $smarty->template_dir.'/'.$params['fallback'];\n }\n return $smarty->fetch($tpl);\n }\n}", "title": "" }, { "docid": "bc29f724797af702d6b3afe76c9463f8", "score": "0.620379", "text": "public function renderFile($vars, $filePath)\n {\n if(!is_array($vars))\n {\n $vars = array();\n }\n\n foreach($vars as $key => $value)\n {\n $$key=$value;\n }\n ob_start();\n if ( substr($filePath,0,1) != \"/\" && !strpos($filePath, \":\"))\n {\n $filePath = ROOT_PATH . TMConfig::get(\"template_path\",\"template\") . $filePath;\n }\n if(file_exists($filePath))\n {\n require($filePath);\n }\n else\n {\n throw new TMViewException(\"No view file!\".$filePath);\n }\n $result = ob_get_contents();\n ob_end_clean();\n return $result;\n }", "title": "" }, { "docid": "09df7f3986ce48dacb5062818ae5eedd", "score": "0.6193643", "text": "public function render(string $name, array $params = []): string\n {\n $template = new Template($this, $name);\n return $template->render($params);\n }", "title": "" }, { "docid": "21cec7b0a1912d29d6c3cab731f68375", "score": "0.61930865", "text": "public function render()\r\n {\r\n ob_start();\r\n if(file_exists(TPL_PATH . $this->name . '.tpl.php'))\r\n {\r\n include TPL_PATH . $this->name . '.tpl.php';\r\n }\r\n else\r\n {\r\n include TPL_PATH . $this->inputType . '.tpl.php';\r\n }\r\n return ob_get_clean();\r\n }", "title": "" }, { "docid": "5e6cdbe0ec001c08b92b4e53d32d5e7b", "score": "0.61886257", "text": "public static function render($template,$layout=NULL){\n\t\tif(!file_exists(self::VIEWS_PATH . $template . \".\" . self::EXTENSION_TEMPLATES))\n\t\t{\n\t\t\tthrow new \\Exception(\"Error: El archivo \" . self::VIEWS_PATH . $template . \".\" . self::EXTENSION_TEMPLATES . \" no existe\", 1);\n\t\t}\n\t\tob_start();\n\t\textract(self::$data);\n\t\tinclude(self::VIEWS_PATH . $template . \".\" . self::EXTENSION_TEMPLATES);\n\t\t$str = ob_get_contents();\n\t\tob_end_clean();\n\t\tif(!$layout){\n\t\t\tinclude(self::VIEWS_PATH.'layouts/application.php');\n\t\t}\n\t\telse{\n\t\t\tinclude(self::VIEWS_PATH.'layouts/'.$layout.'.php');\n\t\t}\n\t\tunset($_SESSION['flash']);\n\t\tunset($_SESSION['error']);\n\t}", "title": "" }, { "docid": "ae23fc5e24b2939fee7eef4bc3e8aa08", "score": "0.6171284", "text": "public function renderTemplate()\n {\n $latte = $this->latte_factory->create();\n\n // nainstalujme do $latte makra {link} a n:href\n UIMacros::install($latte->getCompiler());\n\n $params = [\n 'content' => '',\n '_control' => $this->link_generator,\n ];\n //$latte = new \\Latte\\Engine;\n echo $latte->renderToString(__DIR__ . self::TEMPLATE_PATH, $params);\n }", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "63471d6014ae81826c5ffcbd749c9d4d", "score": "0.0", "text": "public function index()\n {\n return view('admin/reminder/index');\n }", "title": "" } ]
[ { "docid": "1b84960e1b92d293ded93b3711f4a5bb", "score": "0.8233718", "text": "public function show(Resource $resource)\n {\n // not available for now\n }", "title": "" }, { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "ed2d107c1c9ce4912402cbef90125ac4", "score": "0.76110697", "text": "public function show(Resource $resource)\n\t{\n\t\treturn $resource;\n\t}", "title": "" }, { "docid": "364c14abc03f539e9a17828c2c3c5094", "score": "0.7142873", "text": "protected function makeDisplayFromResource()\n\t{\n\t\treturn $this->activeResource->makeDisplay();\n\t}", "title": "" }, { "docid": "05f03e4964305c5851a8417af8f32544", "score": "0.6684253", "text": "public function show($resource, $id)\n {\n return $this->repository->get($id);\n }", "title": "" }, { "docid": "e21cb6c5a585a50a5b1a659e50a3576d", "score": "0.6445771", "text": "function show()\n\t{\n\t\techo '<pre>';\n\t\tprint_r($this);\n\t\techo '</pre>';\n\n//\t\tforeach ($this->resources as $id => $resources)\n//\t\t{\n//\t\t\tforeach ($resources as $type => $resource)\n//\t\t\t{\n//\t\t\t\t$resource->show();\n//\t\t\t}\n//\t\t}\n\t}", "title": "" }, { "docid": "2e3da5773c9c5d59c21b1af4e1ac8cd8", "score": "0.623589", "text": "public function show($id)\n {\n if(Module::hasAccess(\"Resources\", \"view\")) {\n \n $resource = Resource::find($id);\n if(isset($resource->id)) {\n $module = Module::get('Resources');\n $module->row = $resource;\n $group_lists = array();\n $user_lists = array();\n\n if(!$resource->is_public){\n $group_lists = DB::table('resource_groups')\n ->select('groups.id', 'groups.name')\n ->join('groups','groups.id','=','resource_groups.group_id')\n ->where('resource_groups.resource_id', $id)->whereNull('groups.deleted_at')->whereNull('resource_groups.deleted_at')->get();\n\n $user_lists = DB::table('resource_users')\n ->select('users.id', 'users.name')\n ->join('users','users.id','=','resource_users.user_id')\n ->where('resource_users.resource_id', $id)->whereNull('users.deleted_at')->whereNull('resource_users.deleted_at')->get();\n }\n \n return view('la.resources.show', [\n 'module' => $module,\n 'view_col' => $module->view_col,\n 'no_header' => true,\n 'no_padding' => \"no-padding\",\n 'user_lists' => $user_lists,\n 'group_lists' => $group_lists\n ])->with('resource', $resource);\n } else {\n return view('errors.404', [\n 'record_id' => $id,\n 'record_name' => ucfirst(\"resource\"),\n ]);\n }\n } else {\n return redirect(config('laraadmin.adminRoute') . \"/\");\n }\n }", "title": "" }, { "docid": "596a976868e24408f49b224b715ef1dd", "score": "0.62268525", "text": "function display() {\n global $CFG, $THEME, $USER;\n\n /// Set up generic stuff first, including checking for access\n parent::display();\n\n /// Set up some shorthand variables\n $cm = $this->cm;\n $course = $this->course;\n $resource = $this->resource;\n\n\n $this->set_parameters(); // set the parameters array\n\n ///////////////////////////////////////////////\n\n /// Possible display modes are:\n /// File displayed embedded in a normal page\n /// File displayed in a popup window\n /// File displayed embedded in a popup window\n /// File not displayed at all, but downloaded\n\n\n /// First, find out what sort of file we are dealing with.\n require_once($CFG->libdir.'/filelib.php');\n\n $querystring = '';\n $resourcetype = '';\n $embedded = false;\n $mimetype = mimeinfo(\"type\", $resource->reference);\n $pagetitle = strip_tags($course->shortname.': '.format_string($resource->name));\n\n $formatoptions = new object();\n $formatoptions->noclean = true;\n\n if ($resource->options != \"forcedownload\") { // TODO nicolasconnault 14-03-07: This option should be renamed \"embed\"\n if (in_array($mimetype, array('image/gif','image/jpeg','image/png'))) { // It's an image\n $resourcetype = \"image\";\n $embedded = true;\n\n } else if ($mimetype == \"audio/mp3\") { // It's an MP3 audio file\n $resourcetype = \"mp3\";\n $embedded = true;\n\n } else if ($mimetype == \"video/x-flv\") { // It's a Flash video file\n $resourcetype = \"flv\";\n $embedded = true;\n\n } else if (substr($mimetype, 0, 10) == \"video/x-ms\") { // It's a Media Player file\n $resourcetype = \"mediaplayer\";\n $embedded = true;\n\n } else if ($mimetype == \"video/quicktime\") { // It's a Quicktime file\n $resourcetype = \"quicktime\";\n $embedded = true;\n\n } else if ($mimetype == \"application/x-shockwave-flash\") { // It's a Flash file\n $resourcetype = \"flash\";\n $embedded = true;\n\n } else if ($mimetype == \"video/mpeg\") { // It's a Mpeg file\n $resourcetype = \"mpeg\";\n $embedded = true;\n\n } else if ($mimetype == \"text/html\") { // It's a web page\n $resourcetype = \"html\";\n\n } else if ($mimetype == \"application/zip\") { // It's a zip archive\n $resourcetype = \"zip\";\n $embedded = true;\n\n } else if ($mimetype == 'application/pdf' || $mimetype == 'application/x-pdf') {\n $resourcetype = \"pdf\";\n $embedded = true;\n } else if ($mimetype == \"audio/x-pn-realaudio\") { // It's a realmedia file\n $resourcetype = \"rm\";\n $embedded = true;\n } \n }\n\n $isteamspeak = (stripos($resource->reference, 'teamspeak://') === 0);\n\n /// Form the parse string\n $querys = array();\n if (!empty($resource->alltext)) {\n $parray = explode(',', $resource->alltext);\n foreach ($parray as $fieldstring) {\n list($moodleparam, $urlname) = explode('=', $fieldstring);\n $value = urlencode($this->parameters[$moodleparam]['value']);\n $querys[urlencode($urlname)] = $value;\n $querysbits[] = urlencode($urlname) . '=' . $value;\n }\n if ($isteamspeak) {\n $querystring = implode('?', $querysbits);\n } else {\n $querystring = implode('&amp;', $querysbits);\n }\n }\n\n\n /// Set up some variables\n\n $inpopup = optional_param('inpopup', 0, PARAM_BOOL);\n\n if (resource_is_url($resource->reference)) {\n $fullurl = $resource->reference;\n if (!empty($querystring)) {\n $urlpieces = parse_url($resource->reference);\n if (empty($urlpieces['query']) or $isteamspeak) {\n $fullurl .= '?'.$querystring;\n } else {\n $fullurl .= '&amp;'.$querystring;\n }\n }\n\n } else if ($CFG->resource_allowlocalfiles and (strpos($resource->reference, RESOURCE_LOCALPATH) === 0)) { // Localpath\n $localpath = get_user_preferences('resource_localpath', 'D:');\n $relativeurl = str_replace(RESOURCE_LOCALPATH, $localpath, $resource->reference);\n\n if ($querystring) {\n $relativeurl .= '?'.$querystring;\n }\n\n $relativeurl = str_replace('\\\\', '/', $relativeurl);\n $relativeurl = str_replace(' ', '%20', $relativeurl);\n $fullurl = 'file:///'.htmlentities($relativeurl);\n $localpath = true;\n\n } else { // Normal uploaded file\n $forcedownloadsep = '?';\n if ($resource->options == 'forcedownload') {\n $querys['forcedownload'] = '1';\n }\n $fullurl = get_file_url($course->id.'/'.$resource->reference, $querys);\n }\n\n /// Print a notice and redirect if we are trying to access a file on a local file system\n /// and the config setting has been disabled\n if (!$CFG->resource_allowlocalfiles and (strpos($resource->reference, RESOURCE_LOCALPATH) === 0)) {\n if ($inpopup) {\n print_header($pagetitle, $course->fullname);\n } else {\n $navigation = build_navigation($this->navlinks, $cm);\n print_header($pagetitle, $course->fullname, $navigation,\n \"\", \"\", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm));\n }\n notify(get_string('notallowedlocalfileaccess', 'resource', ''));\n if ($inpopup) {\n close_window_button();\n }\n print_footer('none');\n die;\n }\n\n\n /// Check whether this is supposed to be a popup, but was called directly\n if ($resource->popup and !$inpopup) { /// Make a page and a pop-up window\n $navigation = build_navigation($this->navlinks, $cm);\n print_header($pagetitle, $course->fullname, $navigation,\n \"\", \"\", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm));\n\n echo \"\\n<script type=\\\"text/javascript\\\">\";\n echo \"\\n<!--\\n\";\n echo \"openpopup('/mod/resource/view.php?inpopup=true&id={$cm->id}','resource{$resource->id}','{$resource->popup}');\\n\";\n echo \"\\n-->\\n\";\n echo '</script>';\n\n if (trim(strip_tags($resource->summary))) {\n print_simple_box(format_text($resource->summary, FORMAT_MOODLE, $formatoptions), \"center\");\n }\n\n $link = \"<a href=\\\"$CFG->wwwroot/mod/resource/view.php?inpopup=true&amp;id={$cm->id}\\\" \"\n . \"onclick=\\\"this.target='resource{$resource->id}'; return openpopup('/mod/resource/view.php?inpopup=true&amp;id={$cm->id}', \"\n . \"'resource{$resource->id}','{$resource->popup}');\\\">\".format_string($resource->name,true).\"</a>\";\n\n echo '<div class=\"popupnotice\">';\n print_string('popupresource', 'resource');\n echo '<br />';\n print_string('popupresourcelink', 'resource', $link);\n echo '</div>';\n print_footer($course);\n exit;\n }\n\n\n /// Now check whether we need to display a frameset\n\n $frameset = optional_param('frameset', '', PARAM_ALPHA);\n if (empty($frameset) and !$embedded and !$inpopup and ($resource->options == \"frame\" || $resource->options == \"objectframe\") and empty($USER->screenreader)) {\n /// display the resource into a object tag\n if ($resource->options == \"objectframe\") {\n /// Yahoo javascript libaries for updating embedded object size\n require_js(array('yui_utilities'));\n require_js(array('yui_container'));\n require_js(array('yui_dom-event'));\n require_js(array('yui_dom'));\n\n\n /// Moodle Header and navigation bar\n $navigation = build_navigation($this->navlinks, $cm);\n print_header($pagetitle, $course->fullname, $navigation, \"\", \"\", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, \"parent\"));\n $options = new object();\n $options->para = false;\n if (!empty($localpath)) { // Show some help\n echo '<div class=\"mdl-right helplink\">';\n link_to_popup_window ('/mod/resource/type/file/localpath.php', get_string('localfile', 'resource'), get_string('localfilehelp','resource'), 400, 500, get_string('localfilehelp', 'resource'));\n echo '</div>';\n }\n echo '</div></div>';\n\n /// embedded file into iframe if the resource is on another domain\n ///\n /// This case is not XHTML strict but there is no alternative\n /// The object tag alternative is XHTML strict, however IE6-7 displays a blank object on accross domain by default,\n /// so we decided to use iframe for accross domain MDL-10021\n if (!stristr($fullurl,$CFG->wwwroot)) {\n echo '<p><iframe id=\"embeddedhtml\" src =\"'.$fullurl.'\" width=\"100%\" height=\"600\"></iframe></p>';\n }\n else {\n /// embedded HTML file into an object tag\n echo '<p><object id=\"embeddedhtml\" data=\"' . $fullurl . '\" type=\"'.$mimetype.'\" width=\"800\" height=\"600\">\n alt : <a href=\"' . $fullurl . '\">' . $fullurl . '</a>\n </object></p>';\n }\n /// add some javascript in order to fit this object tag into the browser window\n echo '<script type=\"text/javascript\">\n //<![CDATA[\n function resizeEmbeddedHtml() {\n //calculate new embedded html height size\n ';\n if (!empty($resource->summary)) {\n echo' objectheight = YAHOO.util.Dom.getViewportHeight() - 230;\n ';\n }\n else {\n echo' objectheight = YAHOO.util.Dom.getViewportHeight() - 120;\n ';\n }\n echo ' //the object tag cannot be smaller than a human readable size\n if (objectheight < 200) {\n objectheight = 200;\n }\n //resize the embedded html object\n YAHOO.util.Dom.setStyle(\"embeddedhtml\", \"height\", objectheight+\"px\");\n YAHOO.util.Dom.setStyle(\"embeddedhtml\", \"width\", \"100%\");\n }\n resizeEmbeddedHtml();\n YAHOO.widget.Overlay.windowResizeEvent.subscribe(resizeEmbeddedHtml);\n //]]>\n </script>\n ';\n\n /// print the summary\n if (!empty($resource->summary)) {\n print_simple_box(format_text($resource->summary, FORMAT_MOODLE, $formatoptions, $course->id), \"center\");\n }\n echo \"</body></html>\";\n exit;\n }\n /// display the resource into a frame tag\n else {\n @header('Content-Type: text/html; charset=utf-8');\n echo \"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Frameset//EN\\\" \\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\\\">\\n\";\n echo \"<html dir=\\\"ltr\\\">\\n\";\n echo '<head>';\n echo '<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />';\n echo \"<title>\" . format_string($course->shortname) . \": \".strip_tags(format_string($resource->name,true)).\"</title></head>\\n\";\n echo \"<frameset rows=\\\"$CFG->resource_framesize,*\\\">\";\n echo \"<frame src=\\\"view.php?id={$cm->id}&amp;type={$resource->type}&amp;frameset=top\\\" title=\\\"\".get_string('modulename','resource').\"\\\"/>\";\n if (!empty($localpath)) { // Show it like this so we interpose some HTML\n echo \"<frame src=\\\"view.php?id={$cm->id}&amp;type={$resource->type}&amp;inpopup=true\\\" title=\\\"\".get_string('modulename','resource').\"\\\"/>\";\n } else {\n echo \"<frame src=\\\"$fullurl\\\" title=\\\"\".get_string('modulename','resource').\"\\\"/>\";\n }\n echo \"</frameset>\";\n echo \"</html>\";\n exit;\n }\n }\n\n\n /// We can only get here once per resource, so add an entry to the log\n\n add_to_log($course->id, \"resource\", \"view\", \"view.php?id={$cm->id}\", $resource->id, $cm->id);\n\n\n /// If we are in a frameset, just print the top of it\n\n if (!empty( $frameset ) and ($frameset == \"top\") ) {\n $navigation = build_navigation($this->navlinks, $cm);\n print_header($pagetitle, $course->fullname, $navigation,\n \"\", \"\", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, \"parent\"));\n\n $options = new object();\n $options->para = false;\n echo '<div class=\"summary\">'.format_text($resource->summary, FORMAT_HTML, $options).'</div>';\n if (!empty($localpath)) { // Show some help\n echo '<div class=\"mdl-right helplink\">';\n link_to_popup_window ('/mod/resource/type/file/localpath.php', get_string('localfile', 'resource'),\n get_string('localfilehelp','resource'), 400, 500, get_string('localfilehelp', 'resource'));\n echo '</div>';\n }\n print_footer('empty');\n exit;\n }\n\n\n /// Display the actual resource\n if ($embedded) { // Display resource embedded in page\n $strdirectlink = get_string(\"directlink\", \"resource\");\n\n if ($inpopup) {\n print_header($pagetitle);\n } else {\n $navigation = build_navigation($this->navlinks, $cm);\n print_header_simple($pagetitle, '', $navigation, \"\", \"\", true,\n update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, \"self\"));\n\n }\n\n if ($resourcetype == \"image\") {\n echo '<div class=\"resourcecontent resourceimg\">';\n echo \"<img title=\\\"\".strip_tags(format_string($resource->name,true)).\"\\\" class=\\\"resourceimage\\\" src=\\\"$fullurl\\\" alt=\\\"\\\" />\";\n echo '</div>';\n\n } else if ($resourcetype == \"mp3\") {\n if (!empty($THEME->resource_mp3player_colors)) {\n $c = $THEME->resource_mp3player_colors; // You can set this up in your theme/xxx/config.php\n } else {\n $c = 'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&'.\n 'iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&'.\n 'font=Arial&fontColour=FF33FF&buffer=10&waitForPlay=no&autoPlay=yes';\n }\n $c .= '&volText='.get_string('vol', 'resource').'&panText='.get_string('pan','resource');\n $c = htmlentities($c);\n $id = 'filter_mp3_'.time(); //we need something unique because it might be stored in text cache\n $cleanurl = addslashes_js($fullurl);\n\n\n // If we have Javascript, use UFO to embed the MP3 player, otherwise depend on plugins\n\n echo '<div class=\"resourcecontent resourcemp3\">';\n\n echo '<span class=\"mediaplugin mediaplugin_mp3\" id=\"'.$id.'\"></span>'.\n '<script type=\"text/javascript\">'.\"\\n\".\n '//<![CDATA['.\"\\n\".\n 'var FO = { movie:\"'.$CFG->wwwroot.'/lib/mp3player/mp3player.swf?src='.$cleanurl.'\",'.\"\\n\".\n 'width:\"600\", height:\"70\", majorversion:\"6\", build:\"40\", flashvars:\"'.$c.'\", quality: \"high\" };'.\"\\n\".\n 'UFO.create(FO, \"'.$id.'\");'.\"\\n\".\n '//]]>'.\"\\n\".\n '</script>'.\"\\n\";\n\n echo '<noscript>';\n\n echo \"<object type=\\\"audio/mpeg\\\" data=\\\"$fullurl\\\" width=\\\"600\\\" height=\\\"70\\\">\";\n echo \"<param name=\\\"src\\\" value=\\\"$fullurl\\\" />\";\n echo '<param name=\"quality\" value=\"high\" />';\n echo '<param name=\"autoplay\" value=\"true\" />';\n echo '<param name=\"autostart\" value=\"true\" />';\n echo '</object>';\n echo '<p><a href=\"' . $fullurl . '\">' . $fullurl . '</a></p>';\n\n echo '</noscript>';\n echo '</div>';\n\n } else if ($resourcetype == \"flv\") {\n $id = 'filter_flv_'.time(); //we need something unique because it might be stored in text cache\n $cleanurl = addslashes_js($fullurl);\n\n\n // If we have Javascript, use UFO to embed the FLV player, otherwise depend on plugins\n\n echo '<div class=\"resourcecontent resourceflv\">';\n\n echo '<span class=\"mediaplugin mediaplugin_flv\" id=\"'.$id.'\"></span>'.\n '<script type=\"text/javascript\">'.\"\\n\".\n '//<![CDATA['.\"\\n\".\n 'var FO = { movie:\"'.$CFG->wwwroot.'/filter/mediaplugin/flvplayer.swf?file='.$cleanurl.'\",'.\"\\n\".\n 'width:\"600\", height:\"400\", majorversion:\"6\", build:\"40\", allowscriptaccess:\"never\", quality: \"high\" };'.\"\\n\".\n 'UFO.create(FO, \"'.$id.'\");'.\"\\n\".\n '//]]>'.\"\\n\".\n '</script>'.\"\\n\";\n\n echo '<noscript>';\n\n echo \"<object type=\\\"video/x-flv\\\" data=\\\"$fullurl\\\" width=\\\"600\\\" height=\\\"400\\\">\";\n echo \"<param name=\\\"src\\\" value=\\\"$fullurl\\\" />\";\n echo '<param name=\"quality\" value=\"high\" />';\n echo '<param name=\"autoplay\" value=\"true\" />';\n echo '<param name=\"autostart\" value=\"true\" />';\n echo '</object>';\n echo '<p><a href=\"' . $fullurl . '\">' . $fullurl . '</a></p>';\n\n echo '</noscript>';\n echo '</div>';\n\n } else if ($resourcetype == \"mediaplayer\") {\n echo '<div class=\"resourcecontent resourcewmv\">';\n echo '<object type=\"video/x-ms-wmv\" data=\"' . $fullurl . '\">';\n echo '<param name=\"controller\" value=\"true\" />';\n echo '<param name=\"autostart\" value=\"true\" />';\n echo \"<param name=\\\"src\\\" value=\\\"$fullurl\\\" />\";\n echo '<param name=\"scale\" value=\"noScale\" />';\n echo \"<a href=\\\"$fullurl\\\">$fullurl</a>\";\n echo '</object>';\n echo '</div>';\n\n } else if ($resourcetype == \"mpeg\") {\n echo '<div class=\"resourcecontent resourcempeg\">';\n echo '<object classid=\"CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95\"\n codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsm p2inf.cab#Version=5,1,52,701\"\n type=\"application/x-oleobject\">';\n echo \"<param name=\\\"fileName\\\" value=\\\"$fullurl\\\" />\";\n echo '<param name=\"autoStart\" value=\"true\" />';\n echo '<param name=\"animationatStart\" value=\"true\" />';\n echo '<param name=\"transparentatStart\" value=\"true\" />';\n echo '<param name=\"showControls\" value=\"true\" />';\n echo '<param name=\"Volume\" value=\"-450\" />';\n echo '<!--[if !IE]>-->';\n echo '<object type=\"video/mpeg\" data=\"' . $fullurl . '\">';\n echo '<param name=\"controller\" value=\"true\" />';\n echo '<param name=\"autostart\" value=\"true\" />';\n echo \"<param name=\\\"src\\\" value=\\\"$fullurl\\\" />\";\n echo \"<a href=\\\"$fullurl\\\">$fullurl</a>\";\n echo '<!--<![endif]-->';\n echo '<a href=\"' . $fullurl . '\">' . $fullurl . '</a>';\n echo '<!--[if !IE]>-->';\n echo '</object>';\n echo '<!--<![endif]-->';\n echo '</object>';\n echo '</div>';\n } else if ($resourcetype == \"rm\") {\n\n echo '<div class=\"resourcecontent resourcerm\">'; \n echo '<object classid=\"clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA\" width=\"320\" height=\"240\">';\n echo '<param name=\"src\" value=\"' . $fullurl . '\" />';\n echo '<param name=\"controls\" value=\"All\" />';\n echo '<!--[if !IE]>-->';\n echo '<object type=\"audio/x-pn-realaudio-plugin\" data=\"' . $fullurl . '\" width=\"320\" height=\"240\">';\n echo '<param name=\"controls\" value=\"All\" />';\n echo '<a href=\"' . $fullurl . '\">' . $fullurl .'</a>';\n echo '</object>';\n echo '<!--<![endif]-->';\n echo '</object>';\n echo '</div>'; \n\n } else if ($resourcetype == \"quicktime\") {\n echo '<div class=\"resourcecontent resourceqt\">';\n\n echo '<object classid=\"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B\"';\n echo ' codebase=\"http://www.apple.com/qtactivex/qtplugin.cab\">';\n echo \"<param name=\\\"src\\\" value=\\\"$fullurl\\\" />\";\n echo '<param name=\"autoplay\" value=\"true\" />';\n echo '<param name=\"loop\" value=\"true\" />';\n echo '<param name=\"controller\" value=\"true\" />';\n echo '<param name=\"scale\" value=\"aspect\" />';\n\n echo '<!--[if !IE]>-->';\n echo \"<object type=\\\"video/quicktime\\\" data=\\\"$fullurl\\\">\";\n echo '<param name=\"controller\" value=\"true\" />';\n echo '<param name=\"autoplay\" value=\"true\" />';\n echo '<param name=\"loop\" value=\"true\" />';\n echo '<param name=\"scale\" value=\"aspect\" />';\n echo '<!--<![endif]-->';\n echo '<a href=\"' . $fullurl . '\">' . $fullurl . '</a>';\n echo '<!--[if !IE]>-->';\n echo '</object>';\n echo '<!--<![endif]-->';\n echo '</object>';\n echo '</div>';\n } else if ($resourcetype == \"flash\") {\n echo '<div class=\"resourcecontent resourceswf\">';\n echo '<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\">';\n echo \"<param name=\\\"movie\\\" value=\\\"$fullurl\\\" />\";\n echo '<param name=\"autoplay\" value=\"true\" />';\n echo '<param name=\"loop\" value=\"true\" />';\n echo '<param name=\"controller\" value=\"true\" />';\n echo '<param name=\"scale\" value=\"aspect\" />';\n echo '<param name=\"base\" value=\".\" />';\n echo '<!--[if !IE]>-->';\n echo \"<object type=\\\"application/x-shockwave-flash\\\" data=\\\"$fullurl\\\">\";\n echo '<param name=\"controller\" value=\"true\" />';\n echo '<param name=\"autoplay\" value=\"true\" />';\n echo '<param name=\"loop\" value=\"true\" />';\n echo '<param name=\"scale\" value=\"aspect\" />';\n echo '<param name=\"base\" value=\".\" />';\n echo '<!--<![endif]-->';\n echo '<a href=\"' . $fullurl . '\">' . $fullurl . '</a>';\n echo '<!--[if !IE]>-->';\n echo '</object>';\n echo '<!--<![endif]-->';\n echo '</object>';\n echo '</div>';\n\n } elseif ($resourcetype == 'zip') {\n echo '<div class=\"resourcepdf\">';\n echo get_string('clicktoopen', 'resource') . '<a href=\"' . $fullurl . '\">' . format_string($resource->name) . '</a>';\n echo '</div>';\n\n } elseif ($resourcetype == 'pdf') {\n echo '<div class=\"resourcepdf\">';\n echo '<object data=\"' . $fullurl . '\" type=\"application/pdf\">';\n echo '<param name=\"src\" value=\"' . $fullurl . '\" />';\n echo get_string('clicktoopen', 'resource') . '<a href=\"' . $fullurl . '\">' . format_string($resource->name) . '</a>';\n echo '</object>';\n echo '</div>';\n }\n\n if (trim($resource->summary)) {\n print_simple_box(format_text($resource->summary, FORMAT_MOODLE, $formatoptions, $course->id), \"center\");\n }\n\n if ($inpopup) {\n echo \"<div class=\\\"popupnotice\\\">(<a href=\\\"$fullurl\\\">$strdirectlink</a>)</div>\";\n echo \"</div>\"; // MDL-12098\n print_footer($course); // MDL-12098\n } else {\n print_spacer(20,20);\n print_footer($course);\n }\n\n } else { // Display the resource on it's own\n if (!empty($localpath)) { // Show a link to help work around browser security\n echo '<div class=\"mdl-right helplink\">';\n link_to_popup_window ('/mod/resource/type/file/localpath.php', get_string('localfile', 'resource'),\n get_string('localfilehelp','resource'), 400, 500, get_string('localfilehelp', 'resource'));\n echo '</div>';\n echo \"<div class=\\\"popupnotice\\\">(<a href=\\\"$fullurl\\\">$fullurl</a>)</div>\";\n }\n redirect($fullurl);\n }\n\n }", "title": "" }, { "docid": "14ed889b850393fe8b1f3290fc49740e", "score": "0.6189695", "text": "public function show(Dispenser $dispenser)\n {\n //\n }", "title": "" }, { "docid": "990c774538153829a382b969fb274ad6", "score": "0.61804265", "text": "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "title": "" }, { "docid": "0180fbb47af0be5e609b81a6e3465c37", "score": "0.6171014", "text": "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "title": "" }, { "docid": "428541aff5a20db0753edebab2c7fb73", "score": "0.6082806", "text": "public function get(Resource $resource);", "title": "" }, { "docid": "1a2ff798e7b52737e1e6ae5b0d854f6a", "score": "0.60512596", "text": "public function show($id)\n\t{\n\t\t// display *some* of the resource...\n\t\treturn Post::find($id);\n\t}", "title": "" }, { "docid": "8cb2cf294db063cb41e20820f36641f0", "score": "0.60389996", "text": "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "title": "" }, { "docid": "586d0347683cd6c5e16251dd1e1a0a98", "score": "0.60363364", "text": "public function show($id)\n {\n $data = Resource::findOrFail($id);\n return view('Resource/view', compact('data'));\n }", "title": "" }, { "docid": "da456d60e11065d629261fc79e691a95", "score": "0.6006895", "text": "public function displayAction()\n {\n $id = $this->params['_param_1'];\n $this->flash['message'] = \"Arriba loco, este es el mensaje del flash!\";\n return $this->render( $id );\n }", "title": "" }, { "docid": "7fdf71b227abd04e4de9889539cd1698", "score": "0.59927016", "text": "public function displayAction()\n {\n \n $this->view->headLink()->appendStylesheet($this->view->baseUrl().'/css/profile.css');\n \n // set filters and validators for GET input\n $filters = array(\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\n );\n $validators = array(\n 'id' => array('NotEmpty', 'Int')\n );\n $input = new Zend_Filter_Input($filters, $validators);\n $input->setData($this->getRequest()->getParams());\n\n\n if ($input->isValid()) {\n\n $user_info = new Tripjacks_Model_Venue;\n\n $result = $user_info->getVenue($input->id);\n\n if (count($result) == 1) {\n $this->view->user_info = $result[0];\n } else {\n throw new Zend_Controller_Action_Exception('Page not found', 404);\n }\n } else {\n throw new Zend_Controller_Action_Exception('Invalid input');\n }\n }", "title": "" }, { "docid": "6791390f58188104a1f11120602bda6c", "score": "0.59724826", "text": "public function show($id)\n {\n // Get the resource using the parent API\n $object = $this->api()->retrieve($id);\n\n // Render show view\n $data = [Str::camel($this->package) => $object];\n return $this->content('show', $data);\n }", "title": "" }, { "docid": "dbf7cb71fa21dced48bad29b90c7f51e", "score": "0.59606946", "text": "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d2bd10ab674d0671bf2851850995cea8", "score": "0.5891874", "text": "public function show(Resena $resena)\n {\n }", "title": "" }, { "docid": "d752fd3972b546ef194ae14ab221ca30", "score": "0.58688277", "text": "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "f02f37fffab992508c7d7d6f7ae94f94", "score": "0.58684236", "text": "public function showAction() {\n\n // validate contact id is int\n $id = $this->route_params[\"id\"];\n // if id is invalid redirect to 404 page\n if (filter_var($id, FILTER_VALIDATE_INT) === false) {\n $this->show404();\n return;\n }\n\n $contact_obj = new Contact();\n $contact = $contact_obj->findById($id);\n // if no contact returned then display error message\n if ($contact == false) {\n //set error message\n $_SESSION[\"error_message\"] = \"Contact not found or deleted\";\n // redirect to show all contacts if contacts not found\n header(\"Location: /contacts\");\n return;\n }\n // render the view if all everything is Ok\n View::renderTemplate(\"contacts/show.twig.php\", [\"contact\" => $contact]);\n }", "title": "" }, { "docid": "4aec6f94d5731faefe27bdf32f7cbd44", "score": "0.5851883", "text": "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "title": "" }, { "docid": "2771b374a21e331a50c3ffd5b3e431ca", "score": "0.58124036", "text": "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "title": "" }, { "docid": "305f64db85d64f68019d2fadcd0a85d2", "score": "0.58012545", "text": "public function show()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "5b7cde41d4a1270d31720878d4a50b19", "score": "0.57936835", "text": "public function show($id)\n\t{\n\t\treturn $this->success($this->resource->getById($id));\n\t}", "title": "" }, { "docid": "41e5ee3783ca0e67337c6b41b7d0ca62", "score": "0.57929444", "text": "public function display()\n {\n echo $this->fetch();\n }", "title": "" }, { "docid": "fd37d1765d15b4bc18c928879eeab887", "score": "0.5791527", "text": "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "title": "" }, { "docid": "e918056f269cc66c35d0c9d5ae72cf98", "score": "0.5785671", "text": "protected function addResourceShow($name, $base, $controller, $options)\n\t{\n\t\t$uri = $this->getResourceUri($name).'/{'.$base.'}.{format?}';\n\n\t\treturn $this->get($uri, $this->getResourceAction($name, $controller, 'show', $options));\n\t}", "title": "" }, { "docid": "8e4604d345a4a1aa92109fa7c7b9b1e1", "score": "0.57850385", "text": "public function showAction(I18NResource $i18NResource)\n {\n $use_translations = $this->get('Services')->get('use_translations');\n\n if(!$use_translations){\n throw $this->createNotFoundException('Not a valid request');\n }\n\n $this->get('Services')->setMenuItem('I18NResource');\n $changes = $this->get('Services')->getLogsByEntity($i18NResource);\n\n return $this->render('i18nresource/show.html.twig', array(\n 'i18NResource' => $i18NResource,\n 'changes' => $changes,\n ));\n }", "title": "" }, { "docid": "dfcf7f89daddfb442f3e0ba6b417b34a", "score": "0.57804495", "text": "public function specialdisplayAction()\n {\n \n $this->view->headLink()->appendStylesheet($this->view->baseUrl().'/css/profile.css');\n \n // set filters and validators for GET input\n $filters = array(\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\n );\n $validators = array(\n 'id' => array('NotEmpty', 'Int')\n );\n $input = new Zend_Filter_Input($filters, $validators);\n $input->setData($this->getRequest()->getParams());\n\n\n if ($input->isValid()) {\n\n $user_info = new Tripjacks_Model_Venue;\n\n $result = $user_info->getVenue($input->id);\n\n if (count($result) == 1) {\n $this->view->user_info = $result[0];\n } else {\n throw new Zend_Controller_Action_Exception('Page not found', 404);\n }\n } else {\n throw new Zend_Controller_Action_Exception('Invalid input');\n }\n }", "title": "" }, { "docid": "496570de6c493cd9fe30f7c52ceb87d1", "score": "0.57693255", "text": "public function show($id)\n\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t}", "title": "" }, { "docid": "fcef539023519ca355832da7d8f035c5", "score": "0.57576865", "text": "public function displayTask($id=null)\n\t{\n\t\t// Incoming\n\t\tif (!$id)\n\t\t{\n\t\t\t$id = Request::getInt('id', 0);\n\t\t}\n\n\t\t// Ensure we have an ID to work with\n\t\tif (!$id)\n\t\t{\n\t\t\tApp::abort(404, Lang::txt('CONTRIBUTE_NO_ID'));\n\t\t}\n\n\t\t// Get all contributors of this resource\n\t\t$resource = Entry::oneOrFail($id);\n\n\t\t$authors = $resource->authors()\n\t\t\t->ordered()\n\t\t\t->rows();\n\n\t\t// Get all roles for this resoruce type\n\t\t$roles = $resource->type->roles()->rows();\n\n\t\t// Output view\n\t\t$this->view\n\t\t\t->set('config', $this->config)\n\t\t\t->set('id', $id)\n\t\t\t->set('contributors', $authors)\n\t\t\t->set('roles', $roles)\n\t\t\t->setErrors($this->getErrors())\n\t\t\t->setLayout('display')\n\t\t\t->display();\n\t}", "title": "" }, { "docid": "a3e57330d7cd59896b945f16d0e12a89", "score": "0.5756713", "text": "public function display()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "1e8ae24781dac20c4f5e103867a805e0", "score": "0.5756208", "text": "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "title": "" }, { "docid": "69113639710554fd174b3aaec6536b9c", "score": "0.57561266", "text": "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "title": "" }, { "docid": "e3b51ebfe04703c114ab39fc729ba43b", "score": "0.5749091", "text": "public function show(Entry $entry)\n {\n //\n }", "title": "" }, { "docid": "1eedca4ba72a90a807a2f92511283570", "score": "0.57460064", "text": "public function show()\n\t{\n\n\n\t}", "title": "" }, { "docid": "5e79caa6f512ec951cafbf72e8caa6f2", "score": "0.57435393", "text": "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "title": "" }, { "docid": "e68751480fa47a0b2d2bc46570e3a883", "score": "0.5735067", "text": "public function display($id = null) {\n \n }", "title": "" }, { "docid": "ca0564d197f7b97c9c7bb3bf9ec0d891", "score": "0.57342285", "text": "public function display($id = null) {\n\t\t$page = $this->SimplePage->findById($id);\n\t\tif(!$page){\n\t\t\t$this->Session->setFlash(__('Page not found'),'error');\n\t\t\t$this->redirect($this->referer());\n\t\t}\n\t\t\n\t\t//If the page was requested using requestAction, return the page object. Can be handy for integration of content in custom pages.\n\t\tif (! empty($this->request->params['requested']) ) {\n\t\t\treturn $page;\n\t\t}\n\t\t\n\t\t$this->set('page',$page);\n\t}", "title": "" }, { "docid": "cd5d84906dc48426110533ed06d6910f", "score": "0.5728813", "text": "public function show()\n {\n $data = $this->m->getOne('main', Validate::sanitize($_GET['id']));\n \n //sending data to the view\n $this->view->assign('id', $_GET['id']);\n $this->view->assign('data', $data);\n $this->view->assign('title', 'Page title');\n $this->view->display('main/show.tpl');\n \n }", "title": "" }, { "docid": "7684a3ad9102aa78b598eb1a828f68c5", "score": "0.57259274", "text": "public function show($id)\n {\n //\n $this->_show($id);\n }", "title": "" }, { "docid": "20397e06b8673db8692c5f84120c3011", "score": "0.5724891", "text": "public function show()\n\t{\n\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "e3c948157c6e692386196d78f9677b46", "score": "0.5713412", "text": "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "title": "" }, { "docid": "a494be3f6d40a2f537ff292b7a0ccaae", "score": "0.5711622", "text": "public function item($id=0)\n {\n\t\tif($this->session->userlogged_in !== '*#loggedin@Yes')\n\t\t{\n\t\t\tredirect(base_url().'dashboard/login/');\n }\n \n $resource = $this->member_resource_model->find($id);\n if(empty($resource))\n {\n $this->session->action_success_message = 'Invalid item selection.';\n redirect(base_url().'member_resources/');\n }\n \n\t\t$data = array(\n 'page_title' => 'Resource detail',\n 'resource' => $resource\n );\n\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('member_resources/item_view');\n\t\t$this->load->view('templates/footer');\n }", "title": "" }, { "docid": "b791634a3b29fe8adff71b755317e88e", "score": "0.5706405", "text": "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "title": "" }, { "docid": "5766cf8c652099e6e707b39bd867a1c0", "score": "0.5704152", "text": "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "d936662ad1c81979476df2e0767c5e19", "score": "0.5699578", "text": "public function show($id)\n\t{\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "9032057600ac1cb05d858c6264b8aed1", "score": "0.5693083", "text": "public function show()\n {\n return auth()->user()->getResource();\n }", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
24f20b61d9fb52cb88f55d17c4da1eff
Bootstrap the application services.
[ { "docid": "d756bb61f8c00fc1131790bec0290c11", "score": "0.0", "text": "public function boot()\n {\n $this->publishes([\n __DIR__ . '/Config/groschen.php' => config_path('groschen.php'),\n ], 'groschen-config');\n }", "title": "" } ]
[ { "docid": "69e3d56e575b69af5797d210836738e2", "score": "0.7077963", "text": "public function boot()\n {\n Validator::extend('base64max', 'App\\Validators\\Base64Validator@validateBase64Max', 'The :attribute must be less than 1 MB.');\n Validator::extend('base64mimes', 'App\\Validators\\Base64Validator@validateBase64Mimes', 'The :attribute must be a file of type: jpg,jpeg,png.');\n\n $this->app->bind(SesClient::class, function () {\n return new SesClient([\n 'credentials' => new Credentials(config('services.ses.key'), config('services.ses.secret')),\n 'region' => config('services.ses.region'),\n 'version' => 'latest',\n ]);\n });\n\n $this->app[Base::class] = function ($app) {\n return $app['app.base'];\n };\n\n $this->app->bind(Manager::class, function (Application $app) {\n $manager = new Manager();\n $manager->setSerializer($app->make(ApiSerializer::class));\n return $manager;\n });\n\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" } ]
32e3792abe03af705b86e70d6c491495
Tells whether this user agent is a known bot/crawler.
[ { "docid": "ff07f379f4689cbe8c2f71f8bce1ef62", "score": "0.7512425", "text": "public function isBot()\n {\n return in_array($this->getBrowserName(), $this->getKnownBots());\n }", "title": "" } ]
[ { "docid": "ae3c555f799c4d60b939c806917f76a4", "score": "0.80443037", "text": "public function is_bot() {\n if ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) {\n if ( preg_match( '/bot|crawl|slurp|spider|mediapartners/i', sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ) ) ) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "ddb7fa4d467d8a61612fbcfd043cf041", "score": "0.7965024", "text": "function is_bot()\n{\n\treturn (isset($_SERVER['HTTP_USER_AGENT']) && preg_match('/bot|crawl|slurp|spider/i', $_SERVER['HTTP_USER_AGENT']));\n}", "title": "" }, { "docid": "f2cfe5272fbf87ab8e5eadcb67da53a3", "score": "0.7569035", "text": "public function isBot() {\n\t\t\tif ($this->_isBot === null) {\n\t\t\t\t$agent = env('HTTP_USER_AGENT');\n\t\t\t\t$imploded = implode('|', $this->_bots);\n\t\t\t\t$this->_isBot = (bool)preg_match('/' . $imploded . '/i', $agent);\n\t\t\t}\n\t\t\treturn $this->_isBot;\n\t\t}", "title": "" }, { "docid": "a7d1318e37af0bf729ffb71a8d42a84f", "score": "0.7456222", "text": "function isCrawler() { \n\t\t$agent= strtolower($_SERVER['HTTP_USER_AGENT']); \n\t\tif (!empty($agent)) { \n\t\t\t$spiderSite= array( \n\t\t\t\t\"TencentTraveler\", \n\t\t\t\t\"Baiduspider+\", \n\t\t\t\t\"BaiduGame\", \n\t\t\t\t\"Googlebot\", \n\t\t\t\t\"msnbot\", \n\t\t\t\t\"Sosospider+\", \n\t\t\t\t\"Sogou web spider\", \n\t\t\t\t\"ia_archiver\", \n\t\t\t\t\"Yahoo! Slurp\", \n\t\t\t\t\"YoudaoBot\", \n\t\t\t\t\"Yahoo Slurp\", \n\t\t\t\t\"MSNBot\",\n\t\t\t\t\"Java (Often spam bot)\", \n\t\t\t\t\"BaiDuSpider\", \n\t\t\t\t\"Voila\", \n\t\t\t\t\"Yandex bot\", \n\t\t\t\t\"BSpider\", \n\t\t\t\t\"twiceler\", \n\t\t\t\t\"Sogou Spider\", \n\t\t\t\t\"Speedy Spider\", \n\t\t\t\t\"Google AdSense\", \n\t\t\t\t\"Heritrix\", \n\t\t\t\t\"Python-urllib\", \n\t\t\t\t\"Alexa (IA Archiver)\", \n\t\t\t\t\"Ask\", \n\t\t\t\t\"Exabot\", \n\t\t\t\t\"Custo\", \n\t\t\t\t\"OutfoxBot/YodaoBot\", \n\t\t\t\t\"yacy\", \n\t\t\t\t\"SurveyBot\", \n\t\t\t\t\"legs\", \n\t\t\t\t\"lwp-trivial\", \n\t\t\t\t\"Nutch\", \n\t\t\t\t\"StackRambler\", \n\t\t\t\t\"The web archive (IA Archiver)\", \n\t\t\t\t\"Perl tool\", \n\t\t\t\t\"MJ12bot\", \n\t\t\t\t\"Netcraft\", \n\t\t\t\t\"MSIECrawler\", \n\t\t\t\t\"WGet tools\", \n\t\t\t\t\"larbin\", \n\t\t\t\t\"Fish search\", \n\t\t\t\t); \n\t\t\tforeach($spiderSite as $val) { \n\t\t\t\t$str = strtolower($val); \n\t\t\t\tif (strpos($agent, $str) !== false) { \n\t\t\t\t\treturn true; \n\t\t\t\t} \n\t\t\t} \n\t\t}\n\t\treturn false; \n\t}", "title": "" }, { "docid": "fa6413c524a55a0508baedef7a180d2d", "score": "0.74408966", "text": "public function isRobot() {\n\n if(!isset($_SERVER['HTTP_USER_AGENT'])) {\n return false;\n }\n $userAgent = $_SERVER['HTTP_USER_AGENT'];\n //$userAgent = 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)';\n //$userAgent = 'Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)';\n return preg_match( '/'.implode('|', $this->_crawlers).'/i', $userAgent);\n }", "title": "" }, { "docid": "027ee6f44bb1a9239b670c2db7cb0808", "score": "0.7437284", "text": "function tve_dash_is_crawler() {\n\tif ( isset( $GLOBALS['thrive_dashboard_bot_detection'] ) ) {\n\t\treturn $GLOBALS['thrive_dashboard_bot_detection'];\n\t}\n\tif ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) {\n\t\treturn $GLOBALS['thrive_dashboard_bot_detection'] = false;\n\t}\n\n\t$user_agent = trim( $_SERVER['HTTP_USER_AGENT'] );\n\n\t$uas_list = require plugin_dir_path( __FILE__ ) . '_crawlers.php';\n\t$regexp = '#(' . implode( '|', $uas_list ) . ')#i';\n\n\treturn $GLOBALS['thrive_dashboard_bot_detection'] = preg_match( $regexp, $user_agent );\n}", "title": "" }, { "docid": "6c207181c45ca83f051354eb2ce25d2f", "score": "0.7315864", "text": "public function check_bots($agent='')\n\t{\n\t\t# code...\n\tif (preg_match('/bot|crawl|curl|dataprovider|search|get|spider|find|java|majesticsEO|google|yahoo|teoma|contaxe|yandex|libwww-perl|facebookexternalhit/i', $agent)) {\n // is bot\n\t\treturn true;\n\t}else {return false;}\n\t}", "title": "" }, { "docid": "90fc58c0e80d4d4d09dedbee8511ecf2", "score": "0.7141986", "text": "public static function isBot(){\n\t\tif(self::$isBot!==null) return self::$isBot;\n\t\tif(empty($_SERVER['HTTP_USER_AGENT'])) return self::$isBot=true;\n\t\treturn self::$isBot=(bool)preg_match('/'./* EVAL implode('|',array(\n\t\t\t'bot',\n\t\t\t//'Googlebot',\n\t\t\t'Google Web Preview', // Google - www.google.com\n\t\t\t'Bing Preview', // Bing\n\t\t\t'msnptc',//'msnbot',\n\t\t\t'Yahoo',\n\t\t\t//'VoilaBot',\n\t\t\t//'WebCrawler',\n\t\t\t'crawler','spider','spyder',\n\t\t\t'facebookexternalhit',\n\t\t \n\t\t\t'Xenu',\n\t\t \n\t\t\t'Scooter', // Alta Vita - www.altavista.com\n\t\t\t//'Ask Jeeves\\/Teoma', // Ask - www.ask.com & Teoma - ww.teoma.com\n\t\t\t'Lycos_Spider_\\(T-Rex\\)', // Lycos - www.lycos.com\n\t\t\t'Slurp', // Inktomi - www.inktomi.com\n\t\t\t'HenryTheMiragorobot', // Mirago - www.mirago.com\n\t\t\t//'FAST\\-WebCrawler', // AlltheWeb - www.alltheweb.com\n\t\t\t'W3C_Validator',\n\t\t\t\n\t\t\t'Teoma', 'ia_archiver', //Alexa\n\t\t\t'froogle', 'inktomi',\n\t\t\t'looksmart', 'URL_Spider_SQL', 'Firefly', 'NationalDirectory',\n\t\t\t'Ask Jeeves', 'TECNOSEEK', 'InfoSeek', \n\t\t\t'www.galaxy.com','appie', 'FAST', 'WebBug', 'Spade', 'ZyBorg', 'rabaz',\n\t\t\t'Baiduspider', 'Feedfetcher-Google', 'TechnoratiSnoop',\n\t\t\t'Mediapartners-Google', 'Sogou web spider',\n\t\t\t'Butterfly','Twitturls','Me.dium','Twiceler',\n\t\t\t'SiteSucker'\n\t\t)) /EVAL */''.'/i',$_SERVER['HTTP_USER_AGENT']);\n\t}", "title": "" }, { "docid": "29677aeb6b2c5705ebd4cf6b122bfb09", "score": "0.7085082", "text": "public function hasUserAgent();", "title": "" }, { "docid": "1c309cb26adc9fb32c30eaea0568daef", "score": "0.7027848", "text": "public function isCrawler ()\n {\n\treturn ( bool ) $this->browser[ 'crawler' ] ;\n }", "title": "" }, { "docid": "1b4c8c4a22fb7eafafbc525f4fa69ae7", "score": "0.6965478", "text": "function is_this_a_bot() {\n $caller = $_SERVER[\"REMOTE_HOST\"];// . ' - ' . gethostbyaddr($_SERVER[\"REMOTE_HOST\"]);\n if (key_exists('HTTP_USER_AGENT', $_SERVER)) {\n $caller .=$_SERVER[\"HTTP_USER_AGENT\"];\n } \n $caller = strtolower($caller);\n \n if (//\n //(strpos($caller, 'sharedmarketing') >1) or // this is for testing\n //(strpos($caller, '20.10.5.') === 0) or // this is for testing\n (strpos($caller, 'crawl.baidu.com') > 1) or //\n (strpos($caller, 'amazonaws.com') > 1) or // \n (strpos($caller, 'google') > 1) or //\n \n (strpos($caller, '66.249.') === 0) or //\n (strpos($caller, '64.233.172.') === 0) or //\n (strpos($caller, '54.209.') === 0) or //\n (strpos($caller, '180.76.') === 0) or //\n \n \n// these are not actually spiders, but are sites that other companies are using to check\n// if our system is up. they've been hitting our site every 2 min so we'v added them \n// to the list of things to ignore. \n (strpos($caller, '212.13.200.') === 0) or //\n (strpos($caller, '108.61.196.') === 0) or //\n (strpos($caller, '65.39.204.') === 0) or //\n (strpos($caller, '72.5.230.') === 0) or //\n (strpos($caller, '37.235.48.') === 0) or //\n (strpos($caller, '65.39.204.') === 0) or //\n (strpos($caller, '107.170.227.') === 0) or //\n (strpos($caller, '31.220.7.') === 0) or //\n\n (strpos($caller, 'statuscake') > 1) or // \n (strpos($caller, 'alertsite') > 1) or //\n (strpos($caller, 'monitor.site24x7.com') > 1) or //\n (strpos($caller, 'securefastserver.com') > 1) or //\n (strpos($caller, 'vultr.com') > 1) or //\n (strpos($caller, 'gq1.yahoo.net') > 1) or //\n (strpos($caller, 'incero.com') > 1) or //\n (strpos($caller, 'crawl-192-99') > 1)) {\n return TRUE;\n } else {\n return FALSE; \n }\n \n}", "title": "" }, { "docid": "9592a0a726222d17a57120b839c69f2b", "score": "0.6943664", "text": "public function isBot()\n\t{\n\t\treturn $this->device->isBot();\n\t}", "title": "" }, { "docid": "804c79371236effb6a9360313ead91c5", "score": "0.6929281", "text": "function crawlerDetect($userAgent) {\n // Contains crawler and server\n $crawlers = array(\n \t'Google' => '.googlebot.com',\n 'Mediapartners' => '.googlebot.com',\n 'msnbot' => '.search.live.com',\n 'Ask' => '.ask.com',\n 'Teoma' => '.ask.com',\n 'Slurp' => '.crawl.yahoo.net'\n );\n\n foreach ($crawlers as $agent => $server) {\n if (stristr($userAgent, $agent)) {\n return($server);\n }\n }\n\n return false;\n}", "title": "" }, { "docid": "82a4420347db95581a33a125a42c2a91", "score": "0.6784169", "text": "function isRobot()\n {\n if (in_array($this->_agent, $this->_robots)) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "27efd1d24a5adabe7fab8f7a7ce22518", "score": "0.6755329", "text": "public function isBot(): bool;", "title": "" }, { "docid": "71f53f1d50dee8c6538532b102ee8622", "score": "0.6750556", "text": "public function is_google_bot(){\n\t\t\tif(!strstr(strtolower($this->user_agent), \"googlebot\")){\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\t\n\t\t\treturn $this->verify_google_bot();\n\t\t}", "title": "" }, { "docid": "c69e55520e14e216f6c9145d863dcd81", "score": "0.67092687", "text": "function checkRobots() {\n\t\t$robots = array('Googlebot', 'SeznamBot', 'bingbot', 'AdsBot', 'Seznam screenshot-generator');\n\t\t$robots = implode('|', $robots);\n\t\t$pattern = '/' . $robots . '/';\n\t\treturn !preg_match($pattern, $_SERVER['HTTP_USER_AGENT']);\n\t}", "title": "" }, { "docid": "6ae34d926c2b2d059cccd11727e27910", "score": "0.66992897", "text": "public function hasUserAgent(){\n return $this->_has(6);\n }", "title": "" }, { "docid": "3e8585bc04228f5fa307c2977b4c67d1", "score": "0.669148", "text": "function robotCheck() {\r\n\t\tif ($this->browser->Crawler == \"true\" || $this->browser->Crawler == \"1\") {\r\n\t\t\treturn true;\r\n\t\t} elseif ($this->browser->Browser === \"Default Browser\") {\r\n\t\t\treturn $this->robotRegexCheck();\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "a2611f6594241b4241d1d4bc8c1523d6", "score": "0.66682446", "text": "function checkCrawler () {\n $ipAddress = getIP();\n \n\t$crawlerServer = crawlerDetect($userAgent);\n\tif ($isCrawler === false) return false;\n\t\n\t$crawlerHost = @gethostbyaddr($ipAddress);\n\tif (!stristr($crawlerHost,$crawlerServer)) {\n\t\treturn false;\n\t}\n\t\n\tif (\"$crawlerHost\" == \"$ipAddress\") {\n\t\treturn false;\n\t}\n\t\n\t$reverseIp = @gethostbyname($crawlerHost);\n\tif (\"$reverseIp\" != \"$ipAddress\") {\n\t\treturn false;\n\t}\n\t\n\treturn true;\n}", "title": "" }, { "docid": "342ee5c5f56c9bfbe2bbab0149c01b14", "score": "0.6655535", "text": "public static function isBot(Request $request): bool\n {\n if (!isset(static::$regex)) {\n static::$regex = '/' . implode('|', self::BOTS_REGEX_TOKENS) . '/i';\n }\n return (bool) preg_match(static::$regex, $request->userAgent());\n }", "title": "" }, { "docid": "34068474c1b551a0eabdff93e47d4df4", "score": "0.6632325", "text": "protected function isBot() {\n\n // Honeypot spam prevention\n $config = $this->hub()->config();\n $method = $config->get('honeypot');\n\n switch ($method) {\n case 'css':\n $field = $config->get('honeypot.name', 'url');\n $value = r::get($field);\n return !empty($value);\n\n case 'js':\n $field = $config->get('honeypot.name', 'legit');\n $value = r::get($field);\n return 1 !== intval($value);\n }\n\n // Time based spam prevention\n $threshold = $config->get('requiredReadingTime', 0);\n\n if ($threshold > 0) {\n\n $now = time();\n $time = r::get('tictoc');\n\n return ($now - $time) < $threshold;\n\n }\n\n return false;\n\n }", "title": "" }, { "docid": "43f574558df1de7e24dc91f3c264715e", "score": "0.6590996", "text": "function is_bot($referrer)\n{\n\tglobal $config;\n\t\n\tforeach($config['bot_list'] as $key => $bot)\n\t{\n\t\tif(preg_match(\"#{$bot}#iU\", $referrer))\n\t\t{\n\t\t\treturn $key;\n\t\t}\n\t}\n\t\n\treturn false;\n}", "title": "" }, { "docid": "47bdc051e823df183aa2fa85d1a719e7", "score": "0.65534836", "text": "function inAgent($agent)\n {\n global $HTTP_SERVER_VARS;\n $notAgent = strpos($HTTP_SERVER_VARS['HTTP_USER_AGENT'],$agent) === false;\n return !$notAgent;\n }", "title": "" }, { "docid": "74e6624ce69621f8d460923a8581512a", "score": "0.65469825", "text": "function lib4ridora_user_is_bot($user_agent = '', $demand_language = FALSE, $use_session = FALSE) {\n\t\n\tif ( $use_session && !empty($_SESSION['lib4ridora_user_is_bot']) ) {\n\t\treturn ( intval($_SESSION['lib4ridora_user_is_bot']) > 0 );\t\t\t// +1 for bot, -1 if not\n\t}\n\tif ( $demand_language && @empty(trim($_SERVER['HTTP_ACCEPT_LANGUAGE'])) ) {\n\t\tif ( $use_session ) { $_SESSION['lib4ridora_user_is_bot'] = 1; }\n\t\treturn TRUE;\t// considered to be a bot\n\t}\n\tif ( empty($user_agent) ) {\n\t\tif ( !( $user_agent = @trim($_SERVER['HTTP_USER_AGENT']) ) ) {\n\t\t\tif ( $use_session ) { $_SESSION['lib4ridora_user_is_bot'] = 1; }\n\t\t\treturn TRUE;\t// with an empty user agent string we will consider the user as a bot\n\t\t}\n\t}\n\t// If available use the check in islandora_usage_stats, see islandora_usage_stats/includes/utilities.inc\n\t// see for example: https://www.dora.lib4ri.ch/eawag/admin/islandora/tools/islandora_usage_stats\n\t$bot_regex = trim(variable_get('islandora_usage_stats_exclude_bots_regex', '/bot|rambler|spider|crawl|slurp|curl|^$/i'));\n\tif ( !( module_exists('islandora_usage_stats') && variable_get('islandora_usage_stats_exclude_bots', '1') ) || strlen($bot_regex) < 10 ) {\n\t\t// let's use a hard-coded list then, patially however expandable\n\t\t$botAry = array(\n\t\t\t'Bot,Search,Crawl,Spider,Scan,Scout,Archiv,Index,Ads,Job,SEO', \t\t\t/* generic */\n\t\t\tvariable_get('lib4ridora_bot_list_addon',''),\n\t\t\t'curl,wget,typo3,java,python,rambler,zoom', \t\t/* generic/tools */\n\t\t\t'Google',\t\t/* assumed it's a fake. Note that Google's Chrome Browser doesn't have 'Google' inside its user-agent string */\n\t\t\t'Semrush,BingPreview',\n\t\t/*\t'BingBot,MSNBot',\t*/\n\t\t/*\t'Gigabot,VoilaBot',\t*/\n\t\t/*\t'AdIdxBot',\t\t*/\n\t\t\t'Baidu,Yahoo,Slurp,Yandex,YaDirect',\n\t\t\t'DuckDuck,AOLbuild,Teoma,Jeeves',\t\t/* misc custom commercial bots/search-engines */\n\t\t\t'HTTrack',\t\t\t/* kwnow archivers */\n\t\t);\n\t\t$bot_regex = '/' . implode('|',array_map('trim',explode(',',implode(',',$botAry)))) . '|^$/i';\n\t}\n\tif ( preg_match($bot_regex,\t$user_agent) === 1 ) {\n\t\tif ( $use_session ) { $_SESSION['lib4ridora_user_is_bot'] = 1; }\n\t\treturn TRUE;\n\t}\n\tif ( $use_session ) { $_SESSION['lib4ridora_user_is_bot'] = -1; }\n\treturn FALSE;\n}", "title": "" }, { "docid": "41df702fb8b10decd9547709de5b8675", "score": "0.6472123", "text": "public static function check_ua()\n {\n if (isset($_SESSION['sec_ua']) && $_SESSION['sec_ua'] === $_SERVER['HTTP_USER_AGENT'].$_SESSION['sec_ua_seed']) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "0b689a6f866949fb4692b1a14f59eb1d", "score": "0.64553404", "text": "private function isFacebookCrawler($userAgent)\n {\n return (false !== strpos($userAgent, 'facebookexternalhit/'))\n || (false !== strpos($userAgent, 'Facebot'));\n }", "title": "" }, { "docid": "a77e6a0fd25f6568b11adad061ce3ad4", "score": "0.6421404", "text": "function checkRobot($userAgent = NULL) {\n if (empty($userAgent) &&\n isset($_SERVER['HTTP_USER_AGENT']) &&\n $_SERVER['HTTP_USER_AGENT'] != '') {\n $userAgent = $_SERVER['HTTP_USER_AGENT'];\n }\n $robotObj = &base_robots::getInstance();\n if (!empty($userAgent)) {\n if (isset($robotObj->agents) &&\n is_array($robotObj->agents)) {\n foreach ($robotObj->agents as $pattern) {\n if (strpos($userAgent, $pattern) !== FALSE) {\n return FALSE;\n }\n }\n }\n if (isset($robotObj->robots) &&\n is_array($robotObj->robots)) {\n foreach ($robotObj->robots as $pattern) {\n if (strpos($userAgent, $pattern) !== FALSE) {\n return TRUE;\n }\n }\n }\n }\n return FALSE;\n }", "title": "" }, { "docid": "3671ea2320b5660eb750759051ecc102", "score": "0.63571995", "text": "public function isBot()\n\t{\n\t\tif(!$this->isDeleted())\n\t\t{\n\t\t\tif(!isset($this->isBot) || $this->isBot === null)\n\t\t\t{\n\t\t\t\t$this->isBot = strtolower($this->getXml()->getElementsByTagName('IsBot')->item(0)->nodeValue) == \"true\";\n\t\t\t}\n\t\t\treturn $this->isBot;\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "e583b989d85aaebed5488b522fb3853f", "score": "0.6342447", "text": "protected function isRobot()\n {\n return isset($_GET['fast-robot']);\n }", "title": "" }, { "docid": "7d1721ebcaa8c328197905ad557b3580", "score": "0.63202786", "text": "public function is_met() {\n\t\treturn \\function_exists( 'wp_robots' );\n\t}", "title": "" }, { "docid": "c6ff2f7e1c2d3f34b32c127fc9b0a205", "score": "0.63175434", "text": "function isSpider(){\r\n\r\n\tif (empty($_SERVER['HTTP_USER_AGENT'])) {\r\n\t\treturn '';\r\n\t}\r\n\r\n\t$searchengine_bot = array(\r\n\t\t'googlebot',\r\n\t\t'mediapartners-google',\r\n\t\t'baiduspider+',\r\n\t\t'msnbot',\r\n\t\t'yodaobot',\r\n\t\t'yahoo! slurp;',\r\n\t\t'yahoo! slurp china;',\r\n\t\t'iaskspider',\r\n\t\t'sogou web spider',\r\n\t\t'sogou push spider'\r\n\t);\r\n\r\n\t$searchengine_name = array(\r\n\t\t'GOOGLE',\r\n\t\t'GOOGLE ADSENSE',\r\n\t\t'BAIDU',\r\n\t\t'MSN',\r\n\t\t'YODAO',\r\n\t\t'YAHOO',\r\n\t\t'Yahoo China',\r\n\t\t'IASK',\r\n\t\t'SOGOU',\r\n\t\t'SOGOU'\r\n\t);\r\n\r\n\t$spider = strtolower($_SERVER['HTTP_USER_AGENT']);\r\n\r\n\tforeach ($searchengine_bot AS $key => $value) {\r\n\t\tif (strpos($spider, $value) !== false) {\r\n\t\t\t$spider = $searchengine_name[$key];\r\n\r\n\t\t\treturn $spider;\r\n\t\t}\r\n\t}\r\n\r\n\treturn '';\r\n}", "title": "" }, { "docid": "f7f93e731bafe28f29311d0062efce71", "score": "0.6230004", "text": "private function is_robot( $ua ) {\n\n return ( ( 'Mozilla/5.0' !== substr( $ua, 0, 11 ) )\n && ( 'Mozilla/4.0 (compatible; MSIE 8.0;' !== substr( $ua, 0, 34 ) )\n && ( 'Mozilla/4.0 (compatible; MSIE 7.0;' !== substr( $ua, 0, 34 ) )\n && ( 'Opera/9.80' !== substr( $ua, 0, 10 ) )\n );\n }", "title": "" }, { "docid": "35fb7ceff3cd8e4bc7818cf3975eeb37", "score": "0.6157188", "text": "public function isRobot($userAgent = null)\n {\n // Get bot rules\n $rules = $this->mergeRules(\n array(static::$utilities['Bot']),\n array(static::$utilities['MobileBot']),\n static::$robots // NEW\n );\n\n foreach ($rules as $regex)\n {\n // Check for match\n if ($this->match($regex, $userAgent)) return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "a14bbb79801d83fe5cc98a93ed817c86", "score": "0.6123395", "text": "private function isBot($userAgentString)\r\n {\r\n foreach ($this->botUserAgents as $botUserAgent) {\r\n if (preg_match($botUserAgent, $userAgentString) === 1) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }", "title": "" }, { "docid": "7613875142996d0b62c79d2e9d41f195", "score": "0.6100046", "text": "private function isRobotsEnabled(): bool\n {\n return (bool) $this->getConfig('robots', false);\n }", "title": "" }, { "docid": "3092a9cd92d09ea9c0a61eedce4b0146", "score": "0.60793173", "text": "public function isBot() {\n return($this->bot_player);\n }", "title": "" }, { "docid": "88670f74742d42b66e87517a2f71ad71", "score": "0.60497123", "text": "protected function supports(Request $request)\n {\n // @todo Check if Facebook crawler should be allowed in the settings repository.\n\n $userAgent = $request->getHeaderLine('User-Agent');\n if (false === $this->isFacebookCrawler($userAgent)) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "18e0b6a92980e262004949e5e5d9b3d8", "score": "0.60462517", "text": "public function hasBAgent()\n {\n return $this->get(self::BAGENT) !== null;\n }", "title": "" }, { "docid": "7bd31c69b956098ad513a5341730791c", "score": "0.60424936", "text": "function checkSupportUA() {\n\t\tif($_SERVER['HTTP_USER_AGENT']) {\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t\t// 3G携帯ならOKとする。\n\t\t// 「DoCoMo/2.0」で始まるUA\n\t\tif(preg_match('/^DoCoMo\\/2.0/', $_SERVER['HTTP_USER_AGENT'])) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "d96d9479f05cd8a7f7bc078d93c5cc88", "score": "0.59478015", "text": "private function isRobotsEnabled()\n\t{\n\t\treturn !empty($this->config->baseUrl) && $this->templateExists('robots', 'optional');\n\t}", "title": "" }, { "docid": "ef49a287399ff92bc77ecd6907b0015b", "score": "0.5913686", "text": "public static function isNormalVisitor()\n {\n if (IsModuleInstalled('statistic') && empty($_SESSION['SESS_GUEST_ID'])) {\n // this is a robot, no actions\n CTriggMineDebug::debugLine('GUEST: ROBOT');\n return false;\n }\n\n if (strpos($_SERVER['SCRIPT_FILENAME'], 'ajax.php') !== false) {\n CTriggMineDebug::debugLine('GUEST: AJAX');\n return false;\n }\n\n if (strpos($_SERVER['HTTP_USER_AGENT'], 'facebookexternalhit') !== false) {\n CTriggMineDebug::debugLine('GUEST: FACEBOOK');\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "b335c6c223879de143f7d335da11cc20", "score": "0.5909665", "text": "public function isAllowedToCrawl()\n {\n if ($this->isUrlBlacklisted()) {\n return false;\n }\n\n if ($this->areHostsEqual()) {\n return true;\n }\n\n if (!$this->areHostsEqual() && $this->isUrlWhiteListed()) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "f4885683c4721d0deb0c05cf5b9eb3b1", "score": "0.58997154", "text": "public static function isBrowser(Request $request): bool\n {\n return !static::isBot($request);\n }", "title": "" }, { "docid": "d49c62286ce745b4f8e0d34cf85df2ae", "score": "0.5869269", "text": "protected function _robotnikWins()\n {\n if ($this->getRequest()->isAjax() || isset($_COOKIE['noturbo']) || isset($_COOKIE['bot'])) {\n return true;\n }\n\n if (isset($_GET['noturbo'])) {\n setcookie('noturbo', true, time() + 86400);\n return true;\n }\n\n if (isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], 'Googlebot') !== false) {\n setcookie('bot', true, time() + 86400);\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "6ea0276255fe33e6be4ac4f9189c20d5", "score": "0.583429", "text": "protected function checkBrowserBingbot()\n {\n return $this->checkSimpleBrowserUA('bingbot', $this->_agent, self::BROWSER_BINGBOT, false, true);\n }", "title": "" }, { "docid": "d48f6b40522be3bca07bc490d8282b67", "score": "0.58305", "text": "protected function checkBrowserGooglebot()\n {\n return $this->checkSimpleBrowserUA('Googlebot', $this->_agent, self::BROWSER_GOOGLEBOT, false, true);\n }", "title": "" }, { "docid": "08e85253d22ed914f3f5c4c7b1cbaf44", "score": "0.579906", "text": "protected function isDingtalkBrowser($request)\n {\n return stripos($request->header('user_agent'), 'Dingtalk') !== false;\n }", "title": "" }, { "docid": "4be3e73e13417fb8f930af7d3309b1d4", "score": "0.56845367", "text": "protected function isIosUser() {\n if (!isset($_SERVER['HTTP_USER_AGENT'])) {\n return FALSE;\n }\n\n $iOsUserAgents = [\n 'iPod',\n 'iPhone',\n 'iPad',\n ];\n\n $searchString = implode('|', $iOsUserAgents);\n preg_match(\"/{$searchString}/\", $_SERVER['HTTP_USER_AGENT'], $matches);\n $os = current($matches);\n return !empty($os);\n }", "title": "" }, { "docid": "c8adb0f321db8a8bd8cfcd842b1baaf5", "score": "0.5645494", "text": "protected function checkBrowserMsnBot()\n {\n return $this->checkSimpleBrowserUA('msnbot', $this->_agent, self::BROWSER_MSNBOT, false, true);\n }", "title": "" }, { "docid": "f55ad1c2377d73654ab67405a289f98b", "score": "0.55892247", "text": "function isWebRequest()\n{\n return isset($_SERVER['HTTP_USER_AGENT']);\n}", "title": "" }, { "docid": "0fc4e79787b16b4687cc59c08e363994", "score": "0.55879825", "text": "private function user_agent()\n {\n // $fallback_ua = 'Mozilla/5.0 (compatible; Googlebot/4.51; +http://www.google.com/bot.html)';\n // $fallback_ua = 'Mozilla/5.0 (compatible; Googlebot/4.51; +http://www.google.com/bot.html)';\n // $fallback_ua = 'facebookexternalhit/1.0 (+http://www.facebook.com/externalhit_uatext.php)';\n $fallback_ua = 'curl/7.72.0';\n \n $ua = $this->host->get($this, 'user_agent');\n return ($ua == '') ? $fallback_ua : $ua;\n\n // anno: use this useragent only\n return $fallback_ua;\n }", "title": "" }, { "docid": "78c340200ff0155c2c3ae19168c6c3d4", "score": "0.55672956", "text": "public function ao_ccss_ua() {\n $agent = '';\n if ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) {\n $agent = $_SERVER['HTTP_USER_AGENT'];\n }\n\n // Check for UA and return TRUE when criticalcss.com is the detected UA, false when not.\n $rtn = strpos( $agent, AO_CCSS_URL );\n if ( 0 === $rtn ) {\n $rtn = true;\n } else {\n $rtn = false;\n }\n return ( $rtn );\n }", "title": "" }, { "docid": "7190876a3ee010fe87aad689ae0e8f37", "score": "0.55652225", "text": "public static function hasAgent($name)\n {\n return isset(self::$agents[$name]);\n }", "title": "" }, { "docid": "50bcf7d3a5062b6e82634b8d06b4b765", "score": "0.5551209", "text": "function isWebRequest()\n{\n return isset($_SERVER['HTTP_USER_AGENT']);\n}", "title": "" }, { "docid": "ece51c7b36c533eb6f9ac36b6a9056d5", "score": "0.5545905", "text": "public function GetUserAgent()\n\t{\n\t\tif($this -> User_Agent !== NULL)\n\t\t{\n\t\t\treturn $this -> User_Agent;\n\t\t}\n\t\telse return False;\t\n\t}", "title": "" }, { "docid": "15a183374edf081ebd3eac37e51a27b4", "score": "0.55447876", "text": "function isWebsite()\n {\n $isCustomer = false;\n if (!is_null(app()->make('request')->header('X-REQUEST-TYPE')) && app()->make('request')->header('X-REQUEST-TYPE') == 'web') {\n $isCustomer = true;\n }\n return $isCustomer;\n }", "title": "" }, { "docid": "b08663a54b50e31ef1eb3b21e47381d3", "score": "0.5520619", "text": "protected function isTrackable()\n {\n $trackable = true;\n\n // Disable, if developer and developers are not allowed\n if (defined('LOCAL_DEVELOPMENT') && !$this->config['user']['track_developer']) {\n $trackable = false;\n }\n\n // If we are in admin, and it is disabled, disable tracking\n if (is_admin() && !$this->config['user']['track_backend']) {\n $trackable = false;\n }\n\n // If we are not in admin, but user is logged in, disable as well if not wandet\n if (is_user_logged_in() && !is_admin() && !$this->config['user']['track_admin_in_frontend']) {\n $trackable = false;\n }\n\n // If there is a whitelist, the request_uri must be in the whitelist\n if ($trackable && count($this->config['whitelist'])) {\n $trackable = false;\n foreach ($this->config['whitelist'] as $entry) {\n if (fnmatch($entry, $_SERVER['REQUEST_URI'])) {\n $trackable = true;\n break;\n }\n }\n }\n\n // If there is a blacklist, the request_uri must not be on the list\n if ($trackable && count($this->config['blacklist'])) {\n foreach ($this->config['blacklist'] as $entry) {\n if (fnmatch($entry, $_SERVER['REQUEST_URI'])) {\n $trackable = false;\n break;\n }\n }\n }\n\n return $trackable;\n }", "title": "" }, { "docid": "74d69c7dd09d848a5b1c280cdb6d7632", "score": "0.5515949", "text": "public function isUnknown()\n {\n return empty($this->browserName);\n }", "title": "" }, { "docid": "7e8fd30bf084e455a297086e36632bc4", "score": "0.55091774", "text": "public function isCoach() {\n\t\t$user = $_SESSION [\"currentuser\"];\n\t\t$stmt = $this->db->prepare ( \"SELECT * FROM USUARIO WHERE DNI=?\" );\n\t\t$stmt->execute ( array (\n\t\t\t\t$user\n\t\t) );\n\t\t$array = $stmt->fetch ( PDO::FETCH_ASSOC );\n\n\t\tif ($array [\"ENTRENADOR\"] == 1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "d390b524819a0c0ae2a8c446ba31a145", "score": "0.5506698", "text": "public function manage()\n {\n return ($this->auth->info('mode') == 'agent' && $this->auth->info('cms') == 'true')\n ? true : false;\n }", "title": "" }, { "docid": "cd8fea9dd6f5208e187193027718f4f8", "score": "0.54892766", "text": "public function isSiteSpecificUserAgentExcludeEnabled()\n {\n Piwik::checkUserHasSomeAdminAccess();\n return (bool)Option::get(self::OPTION_SITE_SPECIFIC_USER_AGENT_EXCLUDE_ENABLE);\n }", "title": "" }, { "docid": "af09b36354916b87784b249336ca857a", "score": "0.5473404", "text": "private function user_is_using_firefox() {\n\t\treturn false != stristr( $_SERVER['HTTP_USER_AGENT'], 'firefox' );\n\t}", "title": "" }, { "docid": "1260336178b4af7a462fcadedee5b5ad", "score": "0.5461848", "text": "function portfolioactmode_scaffold_check_safe_browser() {\n return strpos($_SERVER['HTTP_USER_AGENT'], \"SEB\") !== false;\n}", "title": "" }, { "docid": "23457592dcaeb9249b15bd0a00de4b88", "score": "0.5461305", "text": "private function getBot(): string\n\t{\n\t\tstatic $userAgents = [\n\t\t\tself::GOOGLE => ['googlebot'],\n\t\t\tself::FACEBOOK => ['facebot', 'facebook', 'LinkedInBot'],\n\t\t\tself::PINTEREST => ['pinterest'],\n\t\t];\n\n\t\t$bot = self::NONE;\n\t\t$useragent = null;\n\n\t\tif ($_SERVER['HTTP_USER_AGENT'])\n\t\t{\n\t\t\t$useragent = $_SERVER['HTTP_USER_AGENT'];\n\t\t}\n\n\t\tif (!empty($useragent))\n\t\t{\n\t\t\tforeach ($userAgents as $key => $subStrings)\n\t\t\t{\n\t\t\t\tforeach ($subStrings as $subString)\n\t\t\t\t{\n\t\t\t\t\tif (stripos($useragent, $subString) !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$bot = $key;\n\t\t\t\t\t\tbreak 2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($bot === self::FACEBOOK)\n\t\t\t{\n\t\t\t\t$this->app->set('gzip', 0);\n\t\t\t}\n\t\t}\n\n\t\treturn $bot;\n\t}", "title": "" }, { "docid": "c41c98ac29610d13f7da746fe1b6b9e8", "score": "0.54605645", "text": "public static function isAnyAvailable(): bool\n\t{\n\t\tif (!Loader::includeModule('ai'))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn Engine::getByCategory('text', new Context('landing', ''))\n\t\t\t\t|| Engine::getByCategory('image', new Context('landing', ''));\n\t}", "title": "" }, { "docid": "757cd764a3700f9638c503d735308dd5", "score": "0.5459056", "text": "public static function agent()\n {\n if (isset($_SERVER[\"HTTP_USER_AGENT\"]))\n {\n return $_SERVER[\"HTTP_USER_AGENT\"];\n }\n }", "title": "" }, { "docid": "c1dea94f2c74febcb26918ef009b533f", "score": "0.5454025", "text": "public function isstoryuser() {\n return $this->request(Story_Path::$ISSTORYUSER);\n }", "title": "" }, { "docid": "8fc07875a3e30e0491aa350aa5438dfa", "score": "0.54450166", "text": "protected function isSamsSite(): bool\n {\n $origin = ($_SERVER['HTTP_ORIGIN'] ?? null);// http[s]://domain.tld (currently work on Chrome only)\n $domainProtocol = (strtolower(($_SERVER['HTTPS'] ?? '')) === 'on' ? 'https://' : 'http://') . ($_SERVER['HTTP_HOST'] ?? '');\n $referrerDomain = parse_url(($_SERVER['HTTP_REFERER'] ?? ''), PHP_URL_HOST);\n $currentDomain = parse_url('http://' . ($_SERVER['HTTP_HOST'] ?? ''), PHP_URL_HOST);\n\n if (\n (\n strtolower($referrerDomain) === strtolower($currentDomain) \n ) ||\n (\n isset($origin) &&\n $origin === $domainProtocol\n )\n ) {\n // if from same site.\n unset($currentDomain, $domainProtocol, $origin, $referrerDomain);\n return true;\n }\n unset($currentDomain, $domainProtocol, $origin, $referrerDomain);\n\n return false;\n }", "title": "" }, { "docid": "fe5b8015827fa46917ada4030ceeaa55", "score": "0.5414952", "text": "public function isSyndicateReader ()\n {\n\treturn ( bool ) $this->browser[ 'issyndicationreader' ] ;\n }", "title": "" }, { "docid": "2c9cac77988d41420f2343de3c3db3a7", "score": "0.54014164", "text": "protected function isUserProxy(): bool\n {\n $proxyHeaders = array(\n 'HTTP_VIA',\n 'VIA',\n 'Proxy-Connection',\n 'HTTP_X_FORWARDED_FOR',\n 'HTTP_FORWARDED_FOR',\n 'HTTP_X_FORWARDED',\n 'HTTP_FORWARDED',\n 'HTTP_CLIENT_IP',\n 'HTTP_FORWARDED_FOR_IP',\n 'X-PROXY-ID',\n 'MT-PROXY-ID',\n 'X-TINYPROXY',\n 'X_FORWARDED_FOR',\n 'FORWARDED_FOR',\n 'X_FORWARDED',\n 'FORWARDED',\n 'CLIENT-IP',\n 'CLIENT_IP',\n 'PROXY-AGENT',\n 'HTTP_X_CLUSTER_CLIENT_IP',\n 'FORWARDED_FOR_IP',\n 'HTTP_PROXY_CONNECTION'\n );\n\n foreach ($proxyHeaders as $header) {\n if (isset($_SERVER[$header])) {\n return true;\n }\n }// endforeach;\n unset($header, $proxyHeaders);\n\n return false;\n }", "title": "" }, { "docid": "449ef73aaaa90b3021fcb9f623f09a35", "score": "0.53957796", "text": "function showFacebookMTags(){\r\n\t\tif(!(stristr(@$_SERVER[\"HTTP_USER_AGENT\"],'facebook') === false)){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\t\r\n\t\t}\t\t\t\r\n\t}", "title": "" }, { "docid": "2f7b3041e244e21d02e809c90f915b0a", "score": "0.5393566", "text": "function isEcho()\n {\n // Well actually checks if the message is a bot for now.\n // Probably handy not to respond to bots.\n\n if (isset($this->body[\"event\"][\"bot_id\"])) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "4b4b09477d115c52b319b7904280e287", "score": "0.5378839", "text": "public function is_using_seb() : bool {\n if (isset($_SERVER['HTTP_USER_AGENT'])) {\n return strpos($_SERVER['HTTP_USER_AGENT'], 'SEB') !== false;\n }\n\n return false;\n }", "title": "" }, { "docid": "5ab4b3c5c751788bf865802ead9a3c70", "score": "0.5364249", "text": "function twitterAvailable()\n {\n if( !in_array( $this->type, array( 'xml','json' ) ) )\n return false;\n \n $request = 'http://twitter.com/help/test.' . $this->type;\n if( $this->objectify( $this->process($request) ) == 'ok' )\n return true;\n\n return false;\n }", "title": "" }, { "docid": "b38c0398eae18cd55de488f1b143241b", "score": "0.5359752", "text": "public static function isUsingProxy($bAutodetect = true)\r\n\t{\r\n\t\tif (!$bAutodetect)\r\n\t\t{\r\n\t\t\t$sIP = self::getIP();\r\n\t\t\tif (!isset($_SESSION['proxy_detection'][$sIP]))\r\n\t\t\t\treturn null;\r\n\r\n\t\t\treturn $_SESSION['proxy_detection'][$sIP] != 'None';\r\n\t\t}\r\n\r\n\t\treturn (self::getUsedProxy() != 'None');\r\n\t}", "title": "" }, { "docid": "720aeae6f6380b9e753fe2d5d49bcf99", "score": "0.5355053", "text": "function detect()\n {\n global $mosConfig_enable_stats;\n if ($mosConfig_enable_stats == 1) {\n if (mosGetParam($_COOKIE, 'mosvisitor', 0)) {\n return;\n }\n setcookie('mosvisitor', 1);\n\n if (phpversion() <= '4.2.1') {\n $agent = getenv('HTTP_USER_AGENT');\n $domain = @gethostbyaddr(getenv(\"REMOTE_ADDR\"));\n } else {\n if (isset($_SERVER['HTTP_USER_AGENT'])) {\n $agent = $_SERVER['HTTP_USER_AGENT'];\n } else {\n $agent = 'Unknown';\n }\n\n $domain = @gethostbyaddr($_SERVER['REMOTE_ADDR']);\n }\n\n $browser = mosGetBrowser($agent);\n\n $query = \"SELECT COUNT(*)\"\n . \"\\n FROM #__stats_agents\"\n . \"\\n WHERE agent = \" . $this->_db->Quote($browser)\n . \"\\n AND type = 0\";\n $this->_db->setQuery($query);\n if ($this->_db->loadResult()) {\n $query = \"UPDATE #__stats_agents\"\n . \"\\n SET hits = ( hits + 1 )\"\n . \"\\n WHERE agent = \" . $this->_db->Quote($browser)\n . \"\\n AND type = 0\";\n $this->_db->setQuery($query);\n } else {\n $query = \"INSERT INTO #__stats_agents\"\n . \"\\n ( agent, type )\"\n . \"\\n VALUES ( \" . $this->_db->Quote($browser) . \", 0 )\";\n $this->_db->setQuery($query);\n }\n $this->_db->query();\n\n $os = mosGetOS($agent);\n\n $query = \"SELECT COUNT(*)\"\n . \"\\n FROM #__stats_agents\"\n . \"\\n WHERE agent = \" . $this->_db->Quote($os)\n . \"\\n AND type = 1\";\n $this->_db->setQuery($query);\n if ($this->_db->loadResult()) {\n $query = \"UPDATE #__stats_agents\"\n . \"\\n SET hits = ( hits + 1 )\"\n . \"\\n WHERE agent = \" . $this->_db->Quote($os)\n . \"\\n AND type = 1\";\n $this->_db->setQuery($query);\n } else {\n $query = \"INSERT INTO #__stats_agents\"\n . \"\\n ( agent, type )\"\n . \"\\n VALUES ( \" . $this->_db->Quote($os) . \", 1 )\";\n $this->_db->setQuery($query);\n }\n $this->_db->query();\n\n // tease out the last element of the domain\n $tldomain = split(\"\\.\", $domain);\n $tldomain = $tldomain[count($tldomain) - 1];\n\n if (is_numeric($tldomain)) {\n $tldomain = \"Unknown\";\n }\n\n $query = \"SELECT COUNT(*)\"\n . \"\\n FROM #__stats_agents\"\n . \"\\n WHERE agent = \" . $this->_db->Quote($tldomain)\n . \"\\n AND type = 2\";\n $this->_db->setQuery($query);\n if ($this->_db->loadResult()) {\n $query = \"UPDATE #__stats_agents\"\n . \"\\n SET hits = ( hits + 1 )\"\n . \"\\n WHERE agent = \" . $this->_db->Quote($tldomain)\n . \"\\n AND type = 2\";\n $this->_db->setQuery($query);\n } else {\n $query = \"INSERT INTO #__stats_agents\"\n . \"\\n ( agent, type )\"\n . \"\\n VALUES ( \" . $this->_db->Quote($tldomain) . \", 2 )\";\n $this->_db->setQuery($query);\n }\n $this->_db->query();\n }\n }", "title": "" }, { "docid": "24375992fd3134b0193e642ea2b2c8d1", "score": "0.53426284", "text": "protected static function isExecModeAgent()\n\t{\n\t\treturn Common::getExecMode() == Common::MODE_AGENT;\n\t}", "title": "" }, { "docid": "8b7c0f406e4358aed2ec4124c7f464b4", "score": "0.534204", "text": "public function checkUserAgent() {\n Self::$_new_agent = ($_SESSION['HTTP_USER_AGENT'] !== $_SERVER['HTTP_USER_AGENT']) ? false : $_SESSION['HTTP_USER_AGENT'] = md5($_SERVER['HTTP_USER_AGENT']);\n Self::$_cur_agent = md5($_SERVER['HTTP_USER_AGENT']);\n\n Self::$_msg = \"Er is een fout opgetreden betreft uw login, graag opnieuw inloggen zodat we weten wie u bent.<br />Sorrie voor het ongemak.\";\n return (isset($_SESSION['HTTP_USER_AGENT']) && Self::$_cur_agent !== Self::$_new_agent) ? User::logout() && Session::flash('msg_login',Self::$_msg) && URL::redirect(\"members/login\") : true;\n }", "title": "" }, { "docid": "9478e63395a73c66230edb4018df22a0", "score": "0.53374505", "text": "public function check() {\n\n // Atleast one browser string arugment should be passed\n if ( func_num_args() < 1 ){\n return false;\n }\n\n $regex = '/('.implode(\"|\",$this->agentExceptions).')/i';\n $userAgent = $_SERVER['HTTP_USER_AGENT'] ?? '';\n\n if (preg_match($regex, $userAgent)) {\n return true;\n }\n\n $valid = false;\n\n $arguments = func_get_args();\n\n if (is_array($arguments[0])) {\n $arguments = $arguments[0];\n }\n\n $rules = [];\n\n foreach ($arguments as &$argument) {\n\n $rule = [];\n\n // Check all the given settings\n foreach (explode(' ', $argument) as &$setting) {\n\n if (preg_match('[<|>|=>|<=]', $setting)) {\n // If a greater or less than condition is passed\n $rule['condition'] = $setting;\n } else if (ctype_digit($setting)) {\n // If number, add as version\n $rule['version'] = $setting;\n } else if ($setting !== '='){\n // Anything else is assumed to be the agents name\n $rule['name'] = StringHelper::toKebabCase($setting);\n }\n\n }\n\n array_push($rules, $rule);\n }\n\n // Now we have all the rules and conditions...\n\n if (!empty($rules)) {\n\n $index = array_search($this->name, array_column($rules, 'name')) ?? false;\n\n // In some cases where user agents versions can't be read,\n // they will default to 0. This can happen on new browser releases.\n // To avoid the new browsers from being blocked, we have to allow these\n // regardless of any other criteria.\n if ($this->version == 0) {\n return true;\n }\n\n // Check to see if the current browser name exists in any of the given argument rules\n if ( $index !== false) {\n\n $name = $rules[$index]['name'];\n $condition = $rules[$index]['condition'] ?? false;\n $version = $rules[$index]['version'] ?? false;\n\n if ($condition && $version) {\n\n // echo 'This is ' . $name . ' version ' . $this->version . '. And this website supports anything that is ' . $condition . ' version ' . $version . '<br />';\n\n // If there is a condition to validate\n switch ($condition) {\n case \">=\":\n $valid = $this->version >= $version;\n break;\n case \">\":\n $valid = $this->version > $version;\n break;\n case \"<=\":\n $valid = $this->version <= $version;\n break;\n case \"<\":\n $valid = $this->version < $version;\n break;\n }\n\n } elseif ($version) {\n\n // echo 'This is ' . $name . ' version ' . $this->version . '. And this website only supports version '. $version . '<br />';\n\n $valid = $version == $this->version;\n\n } else {\n\n // echo 'This is ' . $name . ' version ' . $this->version . '. And this website only supports any version of this browser.<br />';\n\n $valid = $name == $this->name;\n\n }\n }\n }\n\n return $valid;\n\n }", "title": "" }, { "docid": "3541d3e83e0ded73c3e6e06c2b21a44d", "score": "0.5331998", "text": "public function isThereAWinner(): bool\n {\n return $this->findWinner() !== null;\n }", "title": "" }, { "docid": "631d60b7109e3f7587e3472da0c849c2", "score": "0.53312826", "text": "function checkBrowser() {\n\t\t$out = false;\n\n // now check for browser\n if($this->checkBrowser) {\n\t\t\tif(isset($_SESSION['session']['browser']) && isset($_SERVER[\"HTTP_USER_AGENT\"]) && $_SESSION['session']['browser'] = md5($_SERVER[\"HTTP_USER_AGENT\"])) {\n\t $out = true;\n\t\t\t}\n } else {\n\t\t\t// no session browser check is needed so session is ok\n\t\t\t$out = true;\n\t\t}\n\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "865919820aebd0f873b3cee27ab78ddd", "score": "0.5330389", "text": "private static function isBrowserSupported() {\n\n return in_array(self::$browser, self::$suportedBrowsers);\n }", "title": "" }, { "docid": "ef3b6de67d83d26319365f6eb9b7c63b", "score": "0.53028053", "text": "protected function matchDetectionRulesAgainstUA(string $userAgent = null): bool\n {\n // Begin general search.\n foreach ($this->getRules() as $_regex) {\n if (empty($_regex)) {\n continue;\n }\n\n if ($this->match($_regex, $userAgent)) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "343cfcc59b9ced5da9e43dbfeab5c021", "score": "0.529409", "text": "public function authorize() { \n $mobileDetect = new MobileDetect();\n \n return $mobileDetect->isMobile();\n }", "title": "" }, { "docid": "b46f44865c2ef193e633bc484f14a5c6", "score": "0.52918637", "text": "public function is_needed() {\n\t\treturn $this->context->site_represents !== 'company';\n\t}", "title": "" }, { "docid": "d421ac4ccb9bd5fa01be720157bfa11d", "score": "0.5290107", "text": "private function isBaeEnv()\n {\n if (isset($_SERVER['HTTP_HOST'])) {\n $host = $_SERVER['HTTP_HOST'];\n $pos = strpos($host, '.');\n if (false !== $pos) {\n $substr = substr($host, $pos + 1);\n if ('duapp.com' == $substr) {\n return true;\n }\n }\n }\n if (isset($_SERVER[\"HTTP_BAE_LOGID\"])) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "bf5ffa3a46413ecbd11269f7ec5d1124", "score": "0.5279001", "text": "public function detectASingleSiteWhenProperRequestIsGiven() {}", "title": "" }, { "docid": "d7af781d3ddfb5941420a69050cc9a34", "score": "0.52772063", "text": "function detect($in_userAgent = null)\n {\n // Detemine what user agent we are using\n if (is_null($in_userAgent)) {\n if (isset($GLOBALS['HTTP_SERVER_VARS']['HTTP_USER_AGENT'])) {\n $this->userAgent = $GLOBALS['HTTP_SERVER_VARS']['HTTP_USER_AGENT'];\n } else {\n $this->userAgent = '';\n }\n } else {\n $this->userAgent = $in_userAgent;\n }\n\n // Get the lowercase version for case-insensitive searching\n $agt = strtolower($this->userAgent);\n\n // Initialize the flag arrays\n $brwsr =& $this->browser;\n $brwsr = array_flip($brwsr);\n\n // Get the type and version of the client\n preg_match(\";^([[:alpha:]]+)[ /\\(]*[[:alpha:]]*([\\d]*)\\.([\\d\\.]*);\", $agt, $matches);\n @list(, $this->leadingIdentifier, $this->majorVersion, $this->subVersion) = $matches;\n if (empty($this->leadingIdentifier)) {\n $this->leadingIdentifier = 'Unknown';\n }\n\n $this->version = $this->majorVersion . '.' . $this->subVersion;\n\n $brwsr['konq'] = (strpos($agt, 'konqueror') !== false);\n $brwsr['text'] = (strpos($agt, 'links') !== false) || (strpos($agt, 'lynx') !== false) || (strpos($agt, 'w3m') !== false);\n $brwsr['ns'] = (strpos($agt, 'mozilla') !== false) && !(strpos($agt, 'spoofer') !== false) && !(strpos($agt, 'compatible') !== false) && !(strpos($agt, 'hotjava') !== false) && !(strpos($agt, 'opera') !== false) && !(strpos($agt, 'webtv') !== false) ? 1 : 0;\n $brwsr['ns2'] = $brwsr['ns'] && $this->majorVersion == 2;\n $brwsr['ns3'] = $brwsr['ns'] && $this->majorVersion == 3;\n $brwsr['ns4'] = $brwsr['ns'] && $this->majorVersion == 4;\n $brwsr['ns4up'] = $brwsr['ns'] && $this->majorVersion >= 4;\n // determine if this is a Netscape Navigator\n $brwsr['nav'] = $brwsr['ns'] && ((strpos($agt, ';nav') !== false) || ((strpos($agt, '; nav') !== false)));\n $brwsr['ns6'] = !$brwsr['konq'] && $brwsr['ns'] && $this->majorVersion == 5;\n $brwsr['ns6up'] = $brwsr['ns6'] && $this->majorVersion >= 5;\n $brwsr['gecko'] = (strpos($agt, 'gecko') !== false);\n $brwsr['ie'] = (strpos($agt, 'msie') !== false) && !(strpos($agt, 'opera') !== false);\n $brwsr['ie3'] = $brwsr['ie'] && $this->majorVersion < 4;\n $brwsr['ie4'] = $brwsr['ie'] && $this->majorVersion == 4 && (strpos($agt, 'msie 4') !== false);\n $brwsr['ie4up'] = $brwsr['ie'] && $this->majorVersion >= 4;\n $brwsr['ie5'] = $brwsr['ie'] && $this->majorVersion == 4 && (strpos($agt, 'msie 5.0') !== false);\n $brwsr['ie5_5'] = $brwsr['ie'] && $this->majorVersion == 4 && (strpos($agt, 'msie 5.5') !== false);\n $brwsr['ie5up'] = $brwsr['ie'] && !$brwsr['ie3'] && !$brwsr['ie4'];\n $brwsr['ie5_5up'] = $brwsr['ie'] && !$brwsr['ie3'] && !$brwsr['ie4'] && !$brwsr['ie5'];\n $brwsr['ie6'] = $brwsr['ie'] && $this->majorVersion == 4 && (strpos($agt, 'msie 6.') !== false);\n $brwsr['ie6up'] = $brwsr['ie'] && !$brwsr['ie3'] && !$brwsr['ie4'] && !$brwsr['ie5'] && !$brwsr['ie5_5'];\n $brwsr['opera'] = (strpos($agt, 'opera') !== false);\n $brwsr['opera2'] = (strpos($agt, 'opera 2') !== false) || (strpos($agt, 'opera/2') !== false);\n $brwsr['opera3'] = (strpos($agt, 'opera 3') !== false) || (strpos($agt, 'opera/3') !== false);\n $brwsr['opera4'] = (strpos($agt, 'opera 4') !== false) || (strpos($agt, 'opera/4') !== false);\n $brwsr['opera5'] = (strpos($agt, 'opera 5') !== false) || (strpos($agt, 'opera/5') !== false);\n $brwsr['opera5up'] = $brwsr['opera'] && !$brwsr['opera2'] && !$brwsr['opera3'] && !$brwsr['opera4'];\n \n $brwsr['aol'] = (strpos($agt, 'aol') !== false);\n $brwsr['aol3'] = $brwsr['aol'] && $brwsr['ie3'];\n $brwsr['aol4'] = $brwsr['aol'] && $brwsr['ie4'];\n $brwsr['aol5'] = (strpos($agt, 'aol 5') !== false);\n $brwsr['aol6'] = (strpos($agt, 'aol 6') !== false);\n $brwsr['aol7'] = (strpos($agt, 'aol 7') !== false);\n $brwsr['webtv'] = (strpos($agt, 'webtv') !== false); \n $brwsr['aoltv'] = $brwsr['tvnavigator'] = (strpos($agt, 'navio') !== false) || (strpos($agt, 'navio_aoltv') !== false); \n $brwsr['hotjava'] = (strpos($agt, 'hotjava') !== false);\n $brwsr['hotjava3'] = $brwsr['hotjava'] && $this->majorVersion == 3;\n $brwsr['hotjava3up'] = $brwsr['hotjava'] && $this->majorVersion >= 3;\n\n /**\n * Setup easy access to the above variables\n */\n foreach ($brwsr as $key => $value) {\n $this->{'is_' . $key} = $value;\n }\n }", "title": "" }, { "docid": "f74ba0644c17f053b69ab68818061fcc", "score": "0.5276049", "text": "static public function isUser()\n {\n return isset($_SESSION[self::USER_LOGIN]);\n }", "title": "" }, { "docid": "65cd9456a6bdf981cff536dd1da9681d", "score": "0.52471364", "text": "public static function isMobileDevice() {\n\t\t\t$sql = \"SELECT id\n\t\t\t\t\tFROM {$_SESSION['DB_PREFIX']}useragent\n\t\t\t\t\tWHERE useragent = ?\";\n\t\t\t\n\t\t\t$stmt = SessionControllerClass::getDB()->prepare($sql);\n\t\t\t$stmt->bindValue(1, $_SERVER['HTTP_USER_AGENT'], PDO::PARAM_STR);\n\t\t\t$stmt->execute();\n\n\t\t\treturn ($stmt->rowCount() > 0);\n\t\t}", "title": "" }, { "docid": "53aa22feed8409bb6648c9ef1fc9f0fb", "score": "0.5241501", "text": "public static function GetBrowserName(?string $user_agent = null) : string\n {\n $user_agent = isset($user_agent) ? $user_agent : $_SERVER['HTTP_USER_AGENT'];\n // Make case insensitive.\n $t = strtolower($user_agent);\n\n // If the string *starts* with the string, strpos returns 0 (i.e., FALSE). Do a ghetto hack and start with a space.\n // \"[strpos()] may return Boolean FALSE, but may also return a non-Boolean value which evaluates to FALSE.\"\n // http://php.net/manual/en/function.strpos.php\n $t = \" \" . $t;\n\n // Humans / Regular Users \n if (strpos($t, 'opera' ) || strpos($t, 'opr/') ) return 'Opera' ;\n elseif (strpos($t, 'edge' ) ) return 'Edge' ;\n elseif (strpos($t, 'chrome' ) ) return 'Chrome' ;\n elseif (strpos($t, 'safari' ) ) return 'Safari' ;\n elseif (strpos($t, 'firefox' ) ) return 'Firefox' ;\n elseif (strpos($t, 'msie' ) || strpos($t, 'trident/7')) return 'Internet Explorer';\n\n // Search Engines \n elseif (strpos($t, 'google' ) ) return '[Bot] Googlebot' ;\n elseif (strpos($t, 'bing' ) ) return '[Bot] Bingbot' ;\n elseif (strpos($t, 'slurp' ) ) return '[Bot] Yahoo! Slurp';\n elseif (strpos($t, 'duckduckgo') ) return '[Bot] DuckDuckBot' ;\n elseif (strpos($t, 'baidu' ) ) return '[Bot] Baidu' ;\n elseif (strpos($t, 'yandex' ) ) return '[Bot] Yandex' ;\n elseif (strpos($t, 'sogou' ) ) return '[Bot] Sogou' ;\n elseif (strpos($t, 'exabot' ) ) return '[Bot] Exabot' ;\n elseif (strpos($t, 'msn' ) ) return '[Bot] MSN' ;\n\n // Common Tools and Bots\n elseif (strpos($t, 'mj12bot' ) ) return '[Bot] Majestic' ;\n elseif (strpos($t, 'ahrefs' ) ) return '[Bot] Ahrefs' ;\n elseif (strpos($t, 'semrush' ) ) return '[Bot] SEMRush' ;\n elseif (strpos($t, 'rogerbot' ) || strpos($t, 'dotbot') ) return '[Bot] Moz or OpenSiteExplorer';\n elseif (strpos($t, 'frog' ) || strpos($t, 'screaming')) return '[Bot] Screaming Frog' ;\n elseif (strpos($t, 'blex' ) ) return '[Bot] BLEXBot' ;\n \n // Miscellaneous \n elseif (strpos($t, 'facebook' ) ) return '[Bot] Facebook' ;\n elseif (strpos($t, 'pinterest' ) ) return '[Bot] Pinterest';\n \n // Check for strings commonly used in bot user agents \n elseif (strpos($t, 'crawler' ) || strpos($t, 'api' ) ||\n strpos($t, 'spider' ) || strpos($t, 'http' ) ||\n strpos($t, 'bot' ) || strpos($t, 'archive') || \n strpos($t, 'info' ) || strpos($t, 'data' ) ) return '[Bot] Other';\n \n return 'Other (Unknown)';\n }", "title": "" }, { "docid": "cbcdb1272a96862a88fa3f858b099565", "score": "0.5232356", "text": "private function isWebsiteApplication() : bool\n {\n return 'Website' == $this->environment->getSelectedModule();\n }", "title": "" }, { "docid": "4c4b05ce2b14753733c692ebbe1bb1c7", "score": "0.5225348", "text": "public function isRobot()\n {\n return $this->_isRobot;\n }", "title": "" }, { "docid": "b8762a86365c4833b95ae276f2a8f6fe", "score": "0.5221803", "text": "private function isCommand()\n {\n return isset($this->requestData['message']['entities']) && $this->requestData['message']['entities'][0]['type'] == 'bot_command';\n }", "title": "" }, { "docid": "22898b67bfed0460fd9c27ffc4f9c5e0", "score": "0.5220471", "text": "protected function loadAgentFile()\n {\n if (($found = is_file(PATH_FRAMEWORK . 'Config/UserAgents.php'))) {\n include(PATH_FRAMEWORK . 'Config/UserAgents.php');\n }\n\n if ($found !== true) {\n return false;\n }\n\n $return = false;\n\n if (isset($platforms)) {\n static::$platforms = $platforms;\n unset($platforms);\n $return = true;\n }\n\n if (isset($browsers)) {\n static::$browsers = $browsers;\n unset($browsers);\n $return = true;\n }\n\n if (isset($mobiles)) {\n static::$mobiles = $mobiles;\n unset($mobiles);\n $return = true;\n }\n\n if (isset($robots)) {\n static::$robots = $robots;\n unset($robots);\n $return = true;\n }\n\n return $return;\n }", "title": "" }, { "docid": "3ac788cbcd9b5676e6a6cb51b160d53b", "score": "0.5216937", "text": "function usesWiki() {\n return isset($this->use_service['wiki']) && $this->use_service['wiki'];\n }", "title": "" }, { "docid": "1ea147e8a64d71972f8c36afcadbb8ef", "score": "0.5214575", "text": "public static function isBus()\n {\n $user = AuthenticateController::getAuthenticatedUser();\n\n if ( ! $user instanceof User) {\n return false;\n }\n foreach ($user->roles as $role) {\n if ($role->role == 'bus') {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "919d4f13a2931be79bf65c070d25620c", "score": "0.5214368", "text": "function lum_needDeviceDetection()\r\n\t{\r\n\t\t$targets = unserialize(TARGETS);\r\n\t\tif (in_array('DISPLAY_TABLET', $targets) ||\r\n\t\t in_array('DISPLAY_TV', $targets) ||\r\n\t\t in_array('DISPLAY_MOBILE_ADVANCED', $targets) ||\r\n\t\t in_array('DISPLAY_MOBILE_BASIC', $targets))\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "8700d65cfc96aa867ed3d3150d79810d", "score": "0.52035403", "text": "protected function setRobot()\n {\n if (is_array(static::$robots) && count(static::$robots) > 0) {\n foreach (static::$robots as $key => $val) {\n if (preg_match('|' . preg_quote($key) . '|i', $this->string)) {\n $this->isRobot = true;\n $this->robot = $val;\n $this->setMobile();\n\n return true;\n }\n }\n }\n\n return false;\n }", "title": "" } ]
fd32f3f31023297d11587bf0bb1b1ab8
/////////////////////////////////////////////////// ///Customer DB Field Delete ////
[ { "docid": "584d38799de44552d2f66a09bd8cfc52", "score": "0.0", "text": "public function deleteDBfield(Request $request,$name)\n {\n $sequence = $request->input('sequence');\n $tbData = Schema::getColumnListing($sequence.\"_datatable\");\n $state = in_array($name,$tbData);\n if($state == true){\n Schema::table($sequence.\"_datatable\", function (Blueprint $table) use ($name) \n {\n $table->dropColumn($name);\n \n });\n return \"deleted\";\n }else{\n return \"404\";\n } \n }", "title": "" } ]
[ { "docid": "e4db3eee812aa0fbdcf5a0c8fd468c29", "score": "0.7967637", "text": "function delete_field( $field ) {\n\t\t\t\t\n\t}", "title": "" }, { "docid": "5bd17311aa43616db35d23536f66461a", "score": "0.7181068", "text": "public function DeleteDataField($name);", "title": "" }, { "docid": "c1248eb22e4330647fd6f3cfcba272e2", "score": "0.7159961", "text": "function delete_($id){\r\nglobal $db;\r\nglobal $tbl_name;\r\nglobal $field_name;\r\n$sql =\"DELETE \";\r\n$sql .=\"FROM \".$tbl_name.\" \";\r\n$sql .=\"WHERE \".$field_name.\"_id = '$id' \";\r\n$sqlresult = $db->Execute($sql);\r\n}", "title": "" }, { "docid": "b6b3910bdcf7ed6d3d418bc556363e8f", "score": "0.70150447", "text": "function deleteField(AvocadoField $Field){\n\t\t$this->deleteField[] = $Field;\n\t}", "title": "" }, { "docid": "70adbf4d00a3d8618e91076c0bd48ee3", "score": "0.7012195", "text": "public function delField($field,$id,$tbName){\n $this->db->delete($tbName, array($field => $id));\n return true;\n }", "title": "" }, { "docid": "b455321d89e2d6a4a44cc64cc13a163c", "score": "0.69995344", "text": "function fbilling_del($cat,$field,$value) {\n $sql = \"DELETE FROM billing_$cat WHERE $field = '$value';\";\n sql($sql);\n}", "title": "" }, { "docid": "938e096cf89013ff226305e72dfc414b", "score": "0.6976733", "text": "public function delete($field, $id);", "title": "" }, { "docid": "ca02674b3404b5d978abbd234ae9b5ab", "score": "0.69598174", "text": "function delete() {\n\t\t# Global Variables\n\t\tglobal $_db;\n\t\t\n\t\t# Disable\n\t\t$_db->disable($this->table, $this->uid);\n\t}", "title": "" }, { "docid": "c22a3eed799a1e327a03b80191d96148", "score": "0.68926", "text": "function delete()\n {\n $sql = \"DELETE FROM {$this->_table} WHERE {$this->_pkcol} = ?\";\n radix_db_sql::query($sql,array($this->_pkval));\n\n }", "title": "" }, { "docid": "c5e9a7d3cd58b5a415a2b2fb1964c1e9", "score": "0.6884976", "text": "function delete_record ($fieldName,$id,$tblName){\n\t\n\t\t$this->db->where($fieldName, $id);\n\n\t\tif($this->db->delete($tblName))\n\t\t\treturn true;\n\t\telse\n\t\t\t return false;\n\t\t\n }", "title": "" }, { "docid": "ac6ac212f9ef11f9af2d1a103cb128a5", "score": "0.6816292", "text": "public function delete_fields($fieldid){\n $this->db->where('form_fields_id',$fieldid);\n $this->db->delete('form_fields');\n }", "title": "" }, { "docid": "ac0316a68ae2cf31bdc5171b8c82b93e", "score": "0.68035346", "text": "abstract public function deleteBy( $field, $value );", "title": "" }, { "docid": "31171268eb063ab302cc1119d3b5c898", "score": "0.67816764", "text": "public function delete_delete()\n {\n }", "title": "" }, { "docid": "d7889dcec38a8e8b8d4c68c68785e8c3", "score": "0.6778839", "text": "function delFieldDef($fieldname = '') {\r\n\t\tif ($fieldname == '') {\r\n\t\t\tdoError(_PROFILE_ACTION_NO_FIELD);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$existing = $this->fieldExists($fieldname);\r\n\t\t\tif ($existing) {\r\n\t\t\t\t$fieldname = addslashes($fieldname);\r\n\t\t\t\t$where = \" WHERE fname='$fieldname'\";\r\n\t\t\t\t$pquery = \"DELETE FROM \".sql_table('plugin_profile_fields');\r\n\t\t\t\t$pquery .= $where;\r\n\t\t\t\tsql_query($pquery);\r\n\t\t\t\t// these line should delete the user data for the deleted field maybe conditional based on option\r\n\t\t\t\t$pquery = \"DELETE FROM \".sql_table('plugin_profile').\" WHERE field='$fieldname'\";\r\n\t\t\t\tsql_query($pquery);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "2f035e14f2ecd33993cb81dbfdcf7548", "score": "0.6770216", "text": "public function deleteExtraFields()\n\t{\n\t\t$this->db->begin();\n\n\t\t$table_element = $this->table_element;\n\t\tif ($table_element == 'categorie') $table_element = 'categories'; // For compatibility\n\n\t\t$sql_del = \"DELETE FROM \".MAIN_DB_PREFIX.$table_element.\"_extrafields WHERE fk_object = \".$this->id;\n\t\tdol_syslog(get_class($this).\"::deleteExtraFields delete\", LOG_DEBUG);\n\t\t$resql=$this->db->query($sql_del);\n\t\tif (! $resql)\n\t\t{\n\t\t\t$this->error=$this->db->lasterror();\n\t\t\t$this->db->rollback();\n\t\t\treturn -1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->db->commit();\n\t\t\treturn 1;\n\t\t}\n\t}", "title": "" }, { "docid": "2fee01f8b5c28ccfd0a94cf1fe0b666a", "score": "0.67603683", "text": "function delete()\n\t{\n\t\tglobal $sql;\n\t\t$sql->Query(\"DELETE FROM $this->tablename WHERE id = '$this->id'\");\n\t}", "title": "" }, { "docid": "44d11f458c87703d43fd9334ab921758", "score": "0.6747261", "text": "public function fieldDeleteAction() {\n\n $field = Engine_Api::_()->fields()->getField($this->_getParam('field_id'), $this->_fieldType);\n $this->view->form = $form = new Engine_Form(array(\n 'method' => 'post',\n 'action' => $_SERVER['REQUEST_URI'],\n 'elements' => array(\n array(\n 'type' => 'submit',\n 'name' => 'submit',\n )\n )\n ));\n\n if (!$this->getRequest()->isPost()) {\n return;\n }\n\n $this->view->status = true;\n Engine_Api::_()->fields()->deleteField($this->_fieldType, $field);\n }", "title": "" }, { "docid": "c9a43ac1fc15dc3eb343dd6765f5928f", "score": "0.6732575", "text": "public function fieldDeleteAction()\n\t{\n\t\t$objid = $this->params->requests->getParam('objectcode');\n\t\t$fieldid = $this->params->requests->getParam('fieldcode');\n\t\tif ( $this->params->requests->isAjax())\n\t\t{\n\t\t\t$form = new Qss_Model_System_Field();\n\t\t\t$form->delete($objid,$fieldid);\n\t\t\techo Qss_Json::encode(array('error'=>0));\n\t\t}\n\n\t\t/* We process in ajax, no need to render view and layout */\n\t\t$this->setHtmlRender(false);\n\t\t$this->setLayoutRender(false);\n\t}", "title": "" }, { "docid": "80a25e46bead8a741c29e68a87931964", "score": "0.6731296", "text": "public function delete(){\n \t$db = Registry::getDb();\n \t$config = Registry::getConfig();\n \t//Validate\n\t $err = $this->validateDelete();\n\t if($err){\n\t\t return false;\n\t }\n \t\t//Pre Delete\n\t\t$this->preDelete($array);\n\t\t//Delete\n\t\t$idField = $this->idField;\n\t\t$query = \"DELETE FROM `\".$this->dbTable.\"` WHERE `\".$this->idField.\"`='\".mysql_real_escape_string($this->$idField).\"'\";\n\t\tif($db->Query($query)){\n\t\t\t//Post Insert\n\t\t\t$this->postDelete($array);\n\t\t\treturn true;\n\t\t}else{\n\t\t\tif($config->get(\"debug\"))\n\t\t\t\tRegistry::addMessage($db->getError().\"<br>\".$query, \"error\");\n\t\t}\n\t}", "title": "" }, { "docid": "3b62e0bae0ad011f4da5d7bb6f6afd8a", "score": "0.6688947", "text": "function Delete_DB_el ( $file, $object ) {\n\t\n\t\tglobal $Global;\n\n\t\t$this->element [$object] [ F_NAME_ ] = \"__DeleteD__\";\n\t\t$this->Write_DB_Form_el( $file );\n\t\t\n\t\taudit_log ( $Global['username'], 'Delete_DB_el ' . $object, 'OK','' );\n\t\n\t\n\t}", "title": "" }, { "docid": "0bd39618c2ce7eeb4978b28a003d5afd", "score": "0.6669146", "text": "function delete_field_notes ($field_name)\r\n {\r\n $this->_log->trace(\"deleting ListTableNotes (field_name=$field_name)\");\r\n\r\n # create encoded_key_string\r\n $encoded_key_string = parent::_encode_key_string(LISTTABLENOTE_FIELD_NAME_FIELD_NAME.\"='$field_name'\");\r\n\r\n if (parent::delete($encoded_key_string) == FALSE)\r\n return FALSE;\r\n\r\n $this->_log->trace(\"deleted ListTableNotes\");\r\n\r\n return TRUE;\r\n }", "title": "" }, { "docid": "a1760d6740a7894c9135f9c8f0120f9f", "score": "0.66043943", "text": "function deletethisfuelentry(){\n if($this->mmafueldata_id!=\"\"){\n $sql=\"delete from mmafueldata where mmafueldata_id='\" .$this->mmafueldata_id. \"'\";\n $this->db->setQry($sql);\n return 1;\n }\n\telse{ return -2; }\n }", "title": "" }, { "docid": "56eea48f7fe526af88b1d0d32de3c0ce", "score": "0.6603436", "text": "function delete($field, $id, $table)\r\n {\r\n $this->db->where($field, $id);\r\n $this->db->delete($table);\r\n }", "title": "" }, { "docid": "15dda12db83e80240b2873f92fd987a2", "score": "0.65998405", "text": "public function one_delete($field_id) {\n return false;\n }", "title": "" }, { "docid": "43479809710f9ae19a60e527c1744a54", "score": "0.6595399", "text": "function PersonalData_Deleted($row)\n{\n //Log(\"PersonalData Deleted\");\n}", "title": "" }, { "docid": "54e904ac76cbbc77ccdace8bf95b3aef", "score": "0.6554431", "text": "function removeField()\n\t{\n\t\t$mainframe\t=& JFactory::getApplication();\n\t\t\n \t\t$ids\t= JRequest::getVar( 'cid', array(), 'post', 'array' );\n\t\t$count\t= count($ids);\n\t\t\n\t\tforeach( $ids as $id )\n\t\t{\n\t\t\t$table\t=& JTable::getInstance( 'profiles', 'CommunityTable' );\n\t\t\t$table->load( $id );\n\n\t\t\tif(!$table->delete( $id ))\n\t\t\t{\n\t\t\t\t// If there are any error when deleting, we just stop and redirect user with error.\n\t\t\t\t$message\t= JText::_('CC THERE WAS A PROBLEM WHILE REMOVING THE FIELD');\n\t\t\t\t$mainframe->redirect( 'index.php?option=com_community&task=profile' , $message);\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\n\t\t$cache = & JFactory::getCache('com_content');\n\t\t$cache->clean();\n\t\t$message\t= JText::_( $count . ' Field(s) successfully removed.');\n \t\t$mainframe->redirect( 'index.php?option=com_community&view=profiles' , $message );\n\t}", "title": "" }, { "docid": "54964390e1719e139d6b446baab3db1f", "score": "0.6545714", "text": "function custom_field_destroy( $p_field_id ) {\r\n\t\t$c_field_id = db_prepare_int( $p_field_id );\r\n\r\n\t\t# delete all values\r\n\t\t$t_custom_field_string_table = config_get( 'mantis_custom_field_string_table' );\r\n\t\t$query = \"DELETE FROM $t_custom_field_string_table\r\n\t\t\t\t WHERE field_id='$c_field_id'\";\r\n\t\tdb_query( $query );\r\n\r\n\t\t# delete all project associations\r\n\t\t$t_custom_field_project_table = config_get( 'mantis_custom_field_project_table' );\r\n\t\t$query = \"DELETE FROM $t_custom_field_project_table\r\n\t\t\t\t WHERE field_id='$c_field_id'\";\r\n\t\tdb_query( $query );\r\n\r\n\t\t$t_custom_field_table = config_get( 'mantis_custom_field_table' );\r\n\t\t# delete the definition\r\n\t\t$query = \"DELETE FROM $t_custom_field_table\r\n\t\t\t\t WHERE id='$c_field_id'\";\r\n\t\tdb_query( $query );\r\n\r\n\t\tcustom_field_clear_cache( $p_field_id );\r\n\r\n\t\t# db_query() errors on failure so:\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "ba4183aaeb10d71e87ded7cc53ace417", "score": "0.65328383", "text": "function addressbook_adminapi_deleteCustomfields($args)\n{\n $returnCode = TRUE;\n\n /**\n * Security check\n */\n if (!xarSecurityCheck('AdminAddressBook',0)) return FALSE;\n\n extract($args);\n\n /*\n * Validate parameters\n */\n $invalid = array();\n if(!isset($modDel) || !is_array($modDel)) {\n $invalid[] = 'modDel';\n }\n if(!isset($modDelType) || !is_array($modDelType)) {\n $invalid[] = 'modDelType';\n }\n if (count($invalid) > 0) {\n $msg = xarML('Invalid #(1) for #(2) function #(3)() in module #(4)',\n join(', ', $invalid), 'admin', 'updateItems', __ADDRESSBOOK__);\n xarErrorSet(XAR_SYSTEM_EXCEPTION, 'BAD_PARAM',\n new SystemException($msg));\n $returnCode = FALSE;\n } else {\n\n $xarTables =& xarDBGetTables();\n $cus_table = $xarTables['addressbook_customfields'];\n $adr_table = $xarTables['addressbook_address'];\n\n $deletes = array();\n foreach($modDel as $k=>$id) {\n array_push($deletes,\"DELETE FROM $cus_table WHERE nr = $id\");\n if (($modDelType[$k] != 'smallint default NULL') && ($modDelType[$k] != 'tinyint default NULL')) {\n array_push($deletes,\"ALTER TABLE $adr_table DROP custom_\".$id);\n }\n }\n\n $dbconn =& xarDBGetConn();\n foreach($deletes as $delete) {\n $result =& $dbconn->Execute($delete);\n if (!$result) $returnCode = FALSE;\n\n }\n }\n return $returnCode;\n}", "title": "" }, { "docid": "bf6efc7db746045f4ee8315a359ccac2", "score": "0.65256846", "text": "public function delete($fields) {\n return $this->util_model->delete($this->table, $fields); \n }", "title": "" }, { "docid": "cd071a5abcaa4a80358b32619d390731", "score": "0.65149546", "text": "public function customerdeleteinput(Request $request)\n {\n $id = $request->input('id');\n $sequence = $request->input('sequence');\n $type = DB::table('customer_fields')->where('id',$id)->select('field_type','field_name')->get()->toArray();\n $type = array_map(function ($value) {\n return (array)$value;\n }, $type);\n $check = $this->deleteDBfield($request,$type[0]['field_name']);\n if($check == \"404\"){\n return $this->errAPI('Field was not found in the Customer DB!');\n } \n if($type[0]['field_type'] == \"Dropdown\"){\n \n DB::table('customer_fields')\n ->where('destination_id',$id)\n ->where('field_type',\"Option\")\n ->delete();\n }\n \n \n DB::table('customer_fields')\n ->where('id',$id)\n ->delete();\n \n \n return $this->syslog(\"admin\", $id, \"Admin deleted a field of type \".$type[0]['field_type'].\"for a customer\", 'Delete Field.',$request, 'form');\n //return $this->templatecards($request); \n }", "title": "" }, { "docid": "22f18d8bd190d516f05595a2d6abfa7f", "score": "0.65094656", "text": "function field_delete($field){\n\n\t\t//get image dir\n\t\t$image_dir = $this->get_field_param($field->params, 'image_dir');\n\n\t\t$field_id = $field->id;\n\n\t\t//get values of images\n\t\t$this->db->setQuery(\"SELECT value \"\n\t\t.\"FROM #__pi_custom_fields_values \"\n\t\t.\"WHERE field_id='$field_id' \"\n\t\t);\n\t\t$field_rows = $this->db->loadObjectList();\n\t\tforeach($field_rows as $field_row){\n\t\t\t$field_value = $field_row->value;\n\t\t\t$images_array = explode('[:-)# ]',$field_value);\n\t\t\tfor($n = 0; $n < count($images_array); $n++){\n\t\t\t\t$image_stuff = $images_array[$n];\n\t\t\t\t$image_stuff_array = explode('-;-',$image_stuff);\n\t\t\t\t$image = $image_stuff_array[0];\n\t\t\t\tif($image){\n\t\t\t\t\t$this->delete_image($image, $image_dir);\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t}\n\t}", "title": "" }, { "docid": "e05fe51e67b687a2abff6c9021eda06e", "score": "0.65031195", "text": "public function delete() {\n\t\t$this->doDelete();\n\t\t$this->fromdb = false;\n\t\t$this->var[$this->getIdColumnName()] = 0;\n\t}", "title": "" }, { "docid": "4200f7d7ea51e3d2ef875b86a18fef47", "score": "0.6496486", "text": "function deleteInDatabase(){\n }", "title": "" }, { "docid": "e20f77f7b217867b5a29dd8a2cf1caa5", "score": "0.64888173", "text": "protected function deleteFields() {\n foreach ($this->fields as $field_id => $field_definitions) {\n field_delete_field($field_id);\n }\n }", "title": "" }, { "docid": "f39eee12b5332de335a373e0e9688d9e", "score": "0.6480741", "text": "protected function _executeDelete(){ }", "title": "" }, { "docid": "8c4cbbe0eaf6a3dcb77e6292e854589d", "score": "0.6476495", "text": "function delete() {\n\n\t\t$pkFieldName = self::getPkFieldName();\n\t\t$tableName = self::getTableName();\n\n\t\t$pkValue = $this->getPkValue();\n\n\t\t$sql = \"delete from {$tableName} where {$pkFieldName} = :pk\";\n\n\t\t$binds = array(\n\t\t\t'pk' => $pkValue\n\t\t);\n\n\t\t$objDatabase = \\Database::getConnection();\n\n\t\treturn $objDatabase->query($sql,$binds);\n\n\t}", "title": "" }, { "docid": "2ce0e5c90cb2f0178d5629887b4347b2", "score": "0.64622605", "text": "function delete_($id){\r\nglobal $mod_id;\r\nglobal $db;\r\nglobal $_POST, $_GET, $_SERVER;\r\nglobal $tbl_name_main;\r\nglobal $tbl_name_detail;\r\n\r\n$sql =\"DELETE \";\r\n$sql .=\"FROM \".$tbl_name_main.\" \";\r\n$sql .=\"WHERE id_form_rfk_01_jp_main = '$id'\";\r\n\r\n$sqlresult = $db->Execute($sql);\r\n}", "title": "" }, { "docid": "d29c54e0c6c76b55d5c2d874ac225052", "score": "0.64589983", "text": "function delete($table,$id,$field,$id2='',$field2=''){\n $this->db->where($field, $id);\n if($field2!=''){\n $this->db->where($field2, $id2);\n }\n $this->db->delete($table);\n }", "title": "" }, { "docid": "9f63add39848d6a3ec9d233706945b71", "score": "0.64346415", "text": "public function delete(){\n if(!$this->_isNew){\n $pkey = $this->getPrimaryKey();\n $query = \"DELETE FROM \" . $this->_tableName . \" WHERE \" . $this->getPrimaryKeyName() . \" = '\" . $pkey->getValue() . \"'\";\n $done = $this->query($query);\n }else{\n $done = true;\n }\n\n foreach($this->getFields() as $field){\n $this->$field = NULL;\n }\n\n $this->_isNew = true;\n\n return $done;\n }", "title": "" }, { "docid": "979351a1d2d8e72cb15d29ebd81a41fb", "score": "0.6425478", "text": "function vsz_acf7_db_edit_scr_file_delete(){\n\n\t\tif(!isset($_POST[\"fid\"]) || empty($_POST[\"fid\"])){\n\t\t\tprint 'error';\n\t\t\texit;\n\t\t}\n\t\tif(!isset($_POST[\"rid\"]) || empty($_POST[\"rid\"])){\n\t\t\tprint 'error';\n\t\t\texit;\n\t\t}\n\t\tif(!isset($_POST[\"field\"]) || empty($_POST[\"field\"])){\n\t\t\tprint 'error';\n\t\t\texit;\n\t\t}\n\t\tif(!isset($_POST[\"val\"]) || empty($_POST[\"val\"])){\n\t\t\tprint 'error';\n\t\t\texit;\n\t\t}\n\n\t\t$fid = $_POST[\"fid\"];\n\t\t$rid = $_POST[\"rid\"];\n\t\t$field = $_POST[\"field\"];\n\t\t$val = $_POST[\"val\"];\n\t\tglobal $wpdb;\n\n\t\t$res = $wpdb->update(VSZ_CF7_DATA_ENTRY_TABLE_NAME, array(\"value\" => \"\"), array(\"data_id\" => $rid, \"cf7_id\" => $fid, \"name\" => $field));\n\t\tif($res !== false){\n\t\t\t$upload_dir = wp_upload_dir();\n\t\t\t$dir_upload = $upload_dir['basedir'] .'/' .VSZ_CF7_UPLOAD_FOLDER;\n\n\t\t\tunlink($dir_upload.'/'.$val);\n\t\t\techo \"y\";\n\t\t\twp_die();\n\t\t}\n\t\telse{\n\t\t\techo \"n\";\n\t\t\twp_die();\n\t\t}\n\t}", "title": "" }, { "docid": "98c2d26760fd43de65da96bb1fc364d6", "score": "0.6419826", "text": "function NAF_delete()\r\n{\r\n return true;\r\n}", "title": "" }, { "docid": "19cd09b7affc402a9ca1c982b110bf85", "score": "0.6409142", "text": "function delete($tableName,$keyDelete,$keyField = NULL)\n\t{\n\t\t# if keyDelete in form of array = array('fieldname' => 'fieldvalue','fieldname' => 'fieldvalue'...)\n\t\tif(is_array($keyDelete))\n\t\t{\n\t\t\t$queryAdd = 'WHERE ';\n\t\t\tforeach($keyDelete as $field => $value)\n\t\t\t{\n\t\t\t\t$queryAdd .= \"`$field` = '$value' AND\";\n\t\t\t}\n\t\t\t$queryAdd = substr($queryAdd,0,strlen($queryAdd)-4);\n\t\t\t$query = \"DELETE FROM `$tableName` $queryAdd\";\n\t\t\treturn $this->query($query);\n\t\t}\n\t\tif($keyField == NULL){ $keyField = $this->getPrimaryField($tableName);}\n\t\t$query = \"DELETE FROM `$tableName` WHERE `$keyField`='$keyDelete'\";\n\t\treturn $this->query($query);\n\t}", "title": "" }, { "docid": "4a5863dcf3596d391fcd781523e4f66f", "score": "0.6404372", "text": "function delete_field( $name ) {\n $name = sanitize_key( $name );\n $fields = self::get_fields();\n if( is_array( $fields ) )\n for( $fid = 0; $fid <= count( $fields ); $fid++ )\n if( isset( $fields[$fid] ) && $fields[$fid]['name'] == $name )\n unset( $fields[$fid] );\n \n $fields = array_values( $fields );\n $fields = maybe_serialize( $fields );\n return update_option( 'scrm_fields', $fields );\n }", "title": "" }, { "docid": "a6d143054cb547726348f330b9e85e4f", "score": "0.6392796", "text": "protected function action_delete(){\n\t\t//do any pre delete processing\n\t\t//if there is some custom logic for deletion.\n\t\tif(!empty($_REQUEST['record'])){\n\t\t\tif(!$this->bean->ACLAccess('Delete')){\n\t\t\t\tACLController::displayNoAccess(true);\n\t\t\t\tsugar_cleanup(true);\n\t\t\t}\n\t\t\t$this->bean->mark_deleted($_REQUEST['record']);\n\t\t}else{\n\t\t\tsugar_die(\"A record number must be specified to delete\");\n\t\t}\n\t}", "title": "" }, { "docid": "d27af3f0af055fd3ee25e8237d1a1308", "score": "0.6383123", "text": "public function delete()\n\t{\n\t\t$this->alter('delete');\n\t}", "title": "" }, { "docid": "aac204afd7f89a97c3d7a8925e4faf9e", "score": "0.6379359", "text": "public function delete($table,$id,$field = 'active'){\n\t \t$data = array($field => 0);\n\t \t$this->db->where('id',$id)->update($table,$data);\n\t }", "title": "" }, { "docid": "e7cb2af3183bec55c372c3362add9657", "score": "0.6377746", "text": "public function preDelete(){}", "title": "" }, { "docid": "14c2b3e439c17b962130ba943fe71249", "score": "0.6362452", "text": "public function delete()\n {\n //@todo\n }", "title": "" }, { "docid": "d30a0b0fede0223b6a2c579934123e25", "score": "0.6350918", "text": "function delete_($id){\r\nglobal $mod_id;\r\nglobal $db;\r\nglobal $_POST,$_GET;\r\nglobal $tbl_name_main;\r\nglobal $tbl_name_detail;\r\n\r\n$sql =\"DELETE \";\r\n$sql .=\"FROM \".$tbl_name_main.\" \";\r\n$sql .=\"WHERE id_fs_01_main = '$id'\";\r\n\r\n$sqlresult = $db->Execute($sql);\r\n//print $sql;\r\n}", "title": "" }, { "docid": "d604a3993bbe89c03074e728a4e59593", "score": "0.6334417", "text": "function doDelete()\n\t{\n\t\tglobal $ilDB;\n\n\t\t$ilDB->manipulate(\"DELETE FROM rep_robj_xtst_data WHERE \".\n\t\t\t\" id = \".$ilDB->quote($this->getId(), \"integer\")\n\t\t);\n\t}", "title": "" }, { "docid": "ef42fa8a73733a3b047cf17cee76b9d5", "score": "0.6301961", "text": "public function delete()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "3c366fa63383ec5801c5af4c359fea45", "score": "0.63005537", "text": "function deleteCustomer($id){\n}", "title": "" }, { "docid": "ebf1a95896e2480646b372bb02f4bef0", "score": "0.6299771", "text": "public function delete()\r\n\t{\r\n\t\t$this->getDB()->execute('DELETE FROM ' . $this->__table . ' WHERE ' . $this->getPKCond() . ' LIMIT 1', $this->getPKVals());\r\n\t}", "title": "" }, { "docid": "bee982bdbc78694d55c68c182c80d84c", "score": "0.62796926", "text": "function delete_custom_category_field()\n\t{\n\t\t$this->_restrict_prefs_access();\n\n\t\t$group_id = $this->input->get_post('group_id');\n\n\t\tif ($group_id == '' OR ! is_numeric($group_id))\n\t\t{\n\t\t\tshow_error(lang('not_authorized'));\n\t\t}\n\n\t\t$field_id = $this->input->get_post('field_id');\n\n\t\tif ($field_id == '' OR ! is_numeric($field_id))\n\t\t{\n\t\t\tshow_error(lang('not_authorized'));\n\t\t}\n\n\t\t$this->load->model('category_model');\n\n\t\t$query = $this->category_model->get_category_label_name($group_id, $field_id);\n\n\t\tif ($query->num_rows() == 0)\n\t\t{\n\t\t\tshow_error(lang('unauthorized_access'));\n\t\t}\n\n\t\t$this->category_model->delete_category_field($group_id, $field_id);\n\n\t\t$cp_message = lang('cat_field_deleted').NBS.$query->row('field_label');\n\t\t$this->logger->log_action($cp_message);\n\n\t\t$this->functions->clear_caching('all', '');\n\n\t\t$this->session->set_flashdata('message_success', $cp_message);\n\t\t$this->functions->redirect(BASE.AMP.'C=admin_content'.AMP.'M=category_custom_field_group_manager'.AMP.'group_id='.$group_id);\n\t}", "title": "" }, { "docid": "552fe9922d6ce5f8ff3d276e9de489db", "score": "0.6268455", "text": "public function actionDeleteField()\n\t{\n if(isset($_POST['id']) && isset($_POST['ajax']) && $_POST['ajax']=='delete')\n { \n \t$detalle = $this->loadDetail($_POST['id'],2);\n\n \t$idBolsin = $detalle->bolsin_idbolsin;\n\n \tif ($detalle->factura_idfactura > 0){\n \t\t$fact = Factura::model()->findByPk($detalle->factura_idfactura);\n\t\t\t\t$fact->estado = 1;\n\t\t\t\t$fact->bolsin_idbolsin = '';\n\t\t\t\t$fact->save();\n \t}\n\n \t$detalle->delete();\n\n \t$det = $this->loadDetail($idBolsin,1);\n\t\t\t$fac = $this->loadDetail($idBolsin,3);\n\n \t// pass parent Item back into _itemFields, fourth param set to refresh scripts\n \t$this->renderPartial('_listDetalle', array('detalle'=>$det, 'fac'=>$fac));\n\n \tYii::app()->end();\n }\n\t}", "title": "" }, { "docid": "7a5bde5fdc3bb21bf74d35867fff6616", "score": "0.62586683", "text": "function destroyFields()\n {\n Field::deleteBySQL('block_id = ?', array($this->id));\n }", "title": "" }, { "docid": "74ded1cd12103bc0e7758dcdcb54b2ee", "score": "0.62521744", "text": "public function testDeleteCustomField()\n {\n\n }", "title": "" }, { "docid": "4d3750a9dbdd622572c5c74cc1740ee1", "score": "0.6247413", "text": "function deleteOldInfo($fieldid, $view = 1) {\n\tglobal $adb;\n\t//remove from the table\n\t$adb->pquery('delete from vtiger_quickview where fieldid = ? and currentview = ?', array($fieldid,$view));\n}", "title": "" }, { "docid": "3f47bcc211c401ad67f1f8ef58cccbe5", "score": "0.62474006", "text": "public function deleteField($name) {\n unset($this->fields[$name]);\n }", "title": "" }, { "docid": "be66484a66be67440814d021c1c3ef1b", "score": "0.62446344", "text": "protected function _prepareDelete(){ }", "title": "" }, { "docid": "2bb8bea4da44ecea0bc4444ff8b35c0a", "score": "0.62385476", "text": "function ac_delete_customer( $id ) {\r\n global $wpdb;\r\n\r\n return $wpdb->delete(\r\n \"{$wpdb->prefix}customers\",\r\n [ 'id' => $id ],\r\n [ '%d' ]\r\n );\r\n}", "title": "" }, { "docid": "5ac8a020a700a537415e0688f43dc056", "score": "0.62378335", "text": "static function deleteCustomFields($group_id) {\n $mdb2 = getConnection();\n $sql = \"select id from tt_custom_fields where group_id = $group_id\";\n $res = $mdb2->query($sql);\n if (is_a($res, 'PEAR_Error')) return false;\n\n while ($val = $res->fetchRow()) {\n $field_id = $val['id'];\n\n // Clean up tt_custom_field_log.\n $sql = \"delete from tt_custom_field_log where field_id = $field_id\";\n $affected = $mdb2->exec($sql);\n if (is_a($affected, 'PEAR_Error')) return false;\n\n // Clean up tt_custom_field_options.\n $sql = \"delete from tt_custom_field_options where field_id = $field_id\";\n $affected = $mdb2->exec($sql);\n if (is_a($affected, 'PEAR_Error')) return false;\n\n // Delete custom field.\n $sql = \"delete from tt_custom_fields where id = $field_id\";\n $affected = $mdb2->exec($sql);\n if (is_a($affected, 'PEAR_Error')) return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "1c30d1a32af640309f98adf601c60d85", "score": "0.62335694", "text": "function deleteField(&$field, $force = false)\r\n {\r\n return $this->_fHandler->delete($field, $force);\r\n }", "title": "" }, { "docid": "2f5221169251f93055ee1106f72b19fa", "score": "0.623005", "text": "function xprofile_admin_delete_field( $field_id, $field_type = 'field', $delete_data = false ) {\n\tglobal $message, $type;\n\n\tcheck_admin_referer( 'bp_xprofile_delete_field-' . $field_id, 'bp_xprofile_delete_field' );\n\n\t// Switch type to 'option' if type is not 'field'.\n\t// @todo trust this param.\n\t$field_type = ( 'field' == $field_type ) ? __( 'field', 'buddypress' ) : __( 'option', 'buddypress' );\n\t$field = xprofile_get_field( $field_id );\n\n\tif ( !$field->delete( (bool) $delete_data ) ) {\n\t\t/* translators: %s: the field type */\n\t\t$message = sprintf( __( 'There was an error deleting the %s. Please try again.', 'buddypress' ), $field_type );\n\t\t$type = 'error';\n\t} else {\n\t\t/* translators: %s: the field type */\n\t\t$message = sprintf( __( 'The %s was deleted successfully!', 'buddypress' ), $field_type );\n\t\t$type = 'success';\n\n\t\t/**\n\t\t * Fires at the end of the field deletion process, if successful.\n\t\t *\n\t\t * @since 1.0.0\n\t\t *\n\t\t * @param BP_XProfile_Field $field Current BP_XProfile_Field object.\n\t\t */\n\t\tdo_action( 'xprofile_fields_deleted_field', $field );\n\t}\n\n\txprofile_admin_screen( $message, $type );\n}", "title": "" }, { "docid": "cdf8b3fafa74f584fc3a316540e6a1bf", "score": "0.62131697", "text": "function delete_entity() {\n }", "title": "" }, { "docid": "f6d36e6bf7740bac88e3a5dc73382951", "score": "0.6204339", "text": "public function del_request() {\n //i--- Delete Save Data ; inside_custom_cruds ; torrison ; 01.06.2020 ; 32 ---/\n $at_system = new \\Inside4\\InsideAutoTables\\AutoTablesSystem;\n $at_system->init();\n // $table_name = $this->input->get_secure('table_name');\n $table_name = $this->default_table_name;\n $at_system->check_access('inside_' . $table_name, 'edit');\n $result = $this->del_table_cell($table_name);\n\n // String Answer\n echo $result.\" Deleted!\";\n }", "title": "" }, { "docid": "805e9be6ab998467399be120e386a9ec", "score": "0.6201162", "text": "function delete_records($table, $selector, $value) {\n global $db;\n\n return $db->Execute(\"DELETE FROM $table WHERE $selector = '$value'\");\n}", "title": "" }, { "docid": "94e70bc2da345204b63d935de4015780", "score": "0.61967146", "text": "function delete( $table, $field, $query )\n{\n try {\n require_once \"config.php\";\n\n $db = new PDO(\"mysql:host=\".DBHOST.\"; dbname=\".DBNAME, DBUSER, DBPASS );\n\n $statement = $db->prepare(\"DELETE FROM $table WHERE $field = :query\");\n\n $statement->execute( array( 'query' => $query ) );\n\n $statement = null;\n }\n catch( PDOException $e ) {\n include \"error_message.inc\";\n exit;\n }\n}", "title": "" }, { "docid": "526c198e7cd617e2942b1ab7f2fe88d8", "score": "0.6195879", "text": "function delete($tbl,$flds,$vls,$ep=NULL)\n\t{\n\t\t//dbDelete($tbl,$flds,$vls,$ep);\n\t\t\n\t\t\n\t\tglobal $db ;\n\t\t$total_fields = count($flds);\n\t\t$count = 0;\n\t\tfor($i=0;$i<$total_fields;$i++)\n\t\t{\n\t\t\t$count++;\n\t\t\t$val = mysql_clean($vls[$i]);\n\t\t\t$needle = substr($val,0,3);\n\t\t\tif($needle != '|f|')\n\t\t\t\t$fields_query .= $flds[$i].\"='\".$val.\"'\";\n\t\t\telse\n\t\t\t{\n\t\t\t\t$val = substr($val,3,strlen($val));\n\t\t\t\t$fields_query .= $flds[$i].\"=\".$val.\"\";\n\t\t\t}\n\t\t\tif($total_fields!=$count)\n\t\t\t\t$fields_query .= ' AND ';\n\t\t}\n\t\t//Complete Query\n\t\t$query = \"DELETE FROM $tbl WHERE $fields_query $ep\";\n\n\t\t$this->write($query);\n\t\t\n\t\t/*//if(!mysql_query($query)) die(mysql_error());\n\t\t$this->total_queries++;\n\t\t$this->total_queries_sql[] = $query;\n\t\t$this->Execute($query);\n\t\tif(mysql_error()) die ($this->db_query.'<br>'.mysql_error());*/\n\t\t\n \t}", "title": "" }, { "docid": "2370cd11c772f5629fcf6f91feec8b57", "score": "0.6185947", "text": "function delete() {\n\t\t\t$sql = \"Delete from \".mysql_escape_string($this->tableName).\" where \".mysql_escape_string($this->idField).\" = \".intval($this->getItemId());\n\t\t\treturn $this->executeQuery($sql);\n\t\t}", "title": "" }, { "docid": "90ec1d60204d7500ad9df85da7a140f5", "score": "0.61799353", "text": "function delete($a_delete_meta_data = true)\n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t$query = \"DELETE FROM lm_data WHERE obj_id = \".\n\t\t\t$ilDB->quote($this->getId(), \"integer\");\n\t\t$ilDB->manipulate($query);\n\n\t\t$this->deleteMetaData();\n\t}", "title": "" }, { "docid": "144488ff3e9d0ee21a610cbc7a8eb9b7", "score": "0.61766267", "text": "function delete()\r\n\t{\r\n\t\tglobal $sql;\r\n\t\t$id = sql::Escape($this->id);\r\n\t\t$sql->Query(\"DELETE FROM $this->tablename WHERE id = '$id'\");\r\n\t\t$sql->Query(\"DELETE FROM dkp_loottable_section WHERE loottable = '$id'\");\r\n\t\t$sql->Query(\"DELETE FROM dkp_loottable_data WHERE loottable = '$id'\");\r\n\t}", "title": "" }, { "docid": "b33ae4ccd0c5d153ea80a720106c3524", "score": "0.6174935", "text": "function recorddel($record,$identifyByKey = \"id\",$table = null)\n{\n\tif(!is_object($record))\n\t{\n\t\treturn error(\"function recorddel\",\" expected input \\$record to be an object\");\n\t}\n\r\n\t/* -----defaults------ */\r\n\t$query = \"\";\n\tglobal $mysqli_object; global $worked; $worked = false; global $output; $output = \"\";\n\tglobal $settings_database_name; global $settings_lastDatabase; global $settings_lastTable; global $settings_lastColumn;\n\t\n\tif(is_null($table))\n\t{\n\t\t$table = $settings_lastTable;\n\t}\n\t$settings_lastTable = $table;\n\t$settings_lastDatabase = $settings_database_name;\n\t$query = \"\";\n\t/* -----defaults-end----- */\r\n\n\tif(haspropertyandvalue($record,$identifyByKey,\"recorddel\"))\n\t{\r\n\t\t$query = \"DELETE FROM `\".$settings_database_name.\"`.`\".$table.\"` WHERE `\".$table.\"`.`\".$identifyByKey.\"` = '\".$record->$identifyByKey.\"';\";\n\t\t$output = $mysqli_object->query($query);\n\t\t$worked = true;\n\t}\n\n\treturn $worked;\n}", "title": "" }, { "docid": "80fa0994f44e80c9aadde6c01ac0502b", "score": "0.61535245", "text": "public function delete()\n {\n $this->save('');\n }", "title": "" }, { "docid": "b15b59ca93c3bc553e52933bccb4ced8", "score": "0.61396927", "text": "function delete(/* field name, key*/){\n //if 1st arg in return === 1, 2nd arg contains connection variable $con\n\n list($validity, $con) = connect();\n if($validity === 0){\n $error = $con;\n return array(0, $error);\n }\n if(!isset($_POST[\"submit\"])){\n return array(0, \"form not submitted\");\n }\n else{\n $field = \"uid\";\n $key = $_POST[\"uid\"];\n $query = \"delete from db1.users where $field = $key\";\n mysqli_query($con, $query);\n if(mysqli_error($con)){\n return array(0, mysqli_error($con));\n }\n else{\n return array(1, $con);\n }\n }\n}", "title": "" }, { "docid": "7287ff3c25705fcfc199d61a6d4d65db", "score": "0.61390203", "text": "function Delete() {\r\n\t\tglobal $db, $db_name, $prefix;\r\n\t\tmysql_db_query($db_name, 'DELETE FROM '.$prefix.'sales WHERE id='.$this->id, $db);\r\n\t}", "title": "" }, { "docid": "18f003a26df3a89b2c20b85137b10127", "score": "0.6136901", "text": "public function delete()\n {\n if (!$this->isUsed())\n {\n // Database deletion\n $result = Db::getInstance()->delete($this->def['table'], '`'.$this->def['primary'].'` = '.(int)$this->id);\n if (!$result)\n return false;\n\n // Database deletion for multilingual fields related to the object\n if (!empty($this->def['multilang']))\n Db::getInstance()->delete(bqSQL($this->def['table']).'_lang', '`'.$this->def['primary'].'` = '.(int)$this->id);\n return $result;\n }\n else\n return false;\n }", "title": "" }, { "docid": "f89aa05f4a24b7ff8bad1de37b8d78a7", "score": "0.61135185", "text": "function Delete_Data ( $file, $object ) {\n\t\n\t\tglobal $Global;\n\n\t\t$this->element [$object] [ F_NAME_ ] = \"__DeleteD__\";\n\t\t$this->Write_Data_Form( $file );\n\t\taudit_log ( $Global['username'], 'Delete_Data ' . $object, 'OK','' );\n\t\n\t\n\t}", "title": "" }, { "docid": "94c05d7b342e236f394bb1b9ae395d96", "score": "0.6106233", "text": "public function delete() {\n\t}", "title": "" }, { "docid": "1e81d677aaf3514dab0e55a404a005f0", "score": "0.61061776", "text": "function DELETE()\n{\n\t$sql = \"SELECT *\n\t\t\tFROM VALORACIONES\n\t\t\tWHERE (ID = '$this->id')\";\n\n\t$obj = $this->mysqli->query($sql);\n\n\t//Comprobacion de que la tupla es unica\n\tif( mysqli_num_rows($obj) == 1 ){\n\n\t\t$sql = \"DELETE \n \t\t\tFROM VALORACIONES\n \t\t\tWHERE ID = '$this->id'\"; \n\n \t\tinclude '../Model/BD_logger.php';//se incluye el archivo con el log\n \t\t//se reliza el log del delete\t\n \t\tif (writeAndLog($sql)) return '00005'; \n\t}\n\treturn '00006';\n}", "title": "" }, { "docid": "500e99e3c68c00e957856f18e791f4a0", "score": "0.6089957", "text": "public function deleteFields($fields)\n\t{\n\t\tforeach($fields as $field)\n\t\t{\n\t\t\t$field = CustomField::findOrFail($field['id']);\n\t\t\t$field->delete();\n\t\t}\n\t}", "title": "" }, { "docid": "ac4f45b99b3a11728ae1409797c25c03", "score": "0.6082446", "text": "function delete()\n {\n }", "title": "" }, { "docid": "a960e76852d939c7830ddd07ed6c6b15", "score": "0.607867", "text": "public function testDeleteGoodInt()\n\t\t{\n\t\t\t$model=new KaModel('users');\n\t\t\t$this->assertEquals(3, $this->getConnection()->getRowCount('users'), \"Pre-Condition\");\n\t\t\t$model->load(1);\n\t\t\t$model_fields=$model->getFields();\n\t\t\t$this->assertEquals($model_fields['name'], \"Colin\");\n\t\t\t$model->delete();\n\t\t\t$model_fields=$model->getFields();\n\t\t\t$this->assertEquals($model_fields['name'], '');\n\t\t\t$this->assertEquals(2, $this->getConnection()->getRowCount('users'), \"Post-Condition\");\n\t\t}", "title": "" }, { "docid": "581b3d7cb36d96446c213085ce806053", "score": "0.60764956", "text": "function observation_key_delete_form_submit($form, &$form_state){\n $id = $form_state['values']['id'];\n $o_id = $form_state['values']['o_id'];\n $delete_sql = \"DELETE FROM {observation_keyname} WHERE ido_keyname=%d\";\n db_query($delete_sql,$id);\n drupal_goto(\"admin/content/observations/\".$o_id.\"/keys\");\n}", "title": "" }, { "docid": "67e8279f5e7fd9aec822a21894092bd0", "score": "0.60740757", "text": "public function validateDelete(){}", "title": "" }, { "docid": "394ee1a29eb8fbc705dde5527169f2b4", "score": "0.60733706", "text": "public function delete()\n\t{}", "title": "" }, { "docid": "09023671142dc6d4a25fbc85cb27655f", "score": "0.60710716", "text": "public function deleted();", "title": "" }, { "docid": "839e6f1be30ed98bf7cc08c4982b6411", "score": "0.6066702", "text": "function query_delete($table, $attribute, $value){\n if(gettype($table) == \"string\" && gettype($value) == \"string\" && gettype($attribute) == \"string\"){\n return \"Delete from \".$table.\" where \".$attribute.\" = '\".$value.\"'\";\n }\n else {\n return null;\n }\n }", "title": "" }, { "docid": "71028d6851c61ba524d5ed19d193270a", "score": "0.60498387", "text": "protected function quickDeleteByField($id, $field) {\n\t\treturn $this->connection->query(\n\t\t\t\"DELETE FROM {$this->parsedTableName} WHERE \" . $this->getConnection()->parseField($field) . \" = '$id'\"\n\t\t);\n\t}", "title": "" }, { "docid": "05a97c57c9780f08cc5e6368a711b283", "score": "0.6046046", "text": "function delete()\n {\n $query = \"DELETE FROM $this->TABLE WHERE ID=?\";\n $prepared = $this->prepareQuery($query);\n $param = [$this->id];\n $this->executeQuery($prepared,$param);\n }", "title": "" }, { "docid": "44a0d875e196cf3907f42c668afa3123", "score": "0.60448945", "text": "public function deleteData() {\n\t\t$rr = reply_field::find_by(array('id_forms'=>$this->get('id')));\n\t\tforeach($rr as $r){\n\t\t\t$r->delete();\n\t\t}\n\t\t$rr = field::find_by(array('id_forms'=>$this->get('id')));\n\t\tforeach($rr as $r){\n\t\t\t$r->delete();\n\t\t}\n\t\t$rr = reply::find_by(array('id_forms'=>$this->get('id')));\n\t\tforeach($rr as $r){\n\t\t\t$r->delete();\n\t\t}\n\n\t\t// suppression du dossier de stockage\n\t\t$path = _DIMS_PATHDATA.'forms-'.$this->fields['id_module']._DIMS_SEP.$this->fields['id_forms']._DIMS_SEP;\n\t\tdims_deletedir($path);\n\t}", "title": "" }, { "docid": "ff04c1440aca8585f0b82815dcf8d928", "score": "0.60424167", "text": "function delete_option($name) {\r\n\tglobal $bj;\r\n\t$bj->db->query(\"DELETE FROM `\".$bj->db->options.\"` WHERE `option_name` = '\".$name.\"' LIMIT 1\");\r\n}", "title": "" }, { "docid": "e9136f7aa62205afc9b89b4b5f748105", "score": "0.6041429", "text": "function delete()\n {\n $db =& eZDB::globalDatabase();\n\n $db->begin( );\n \n $res = $db->query( \"DELETE FROM eZDataManager_DataTypeItem WHERE ID='$this->ID'\" );\n $res = $db->query( \"DELETE FROM eZDataManager_RelationDefinition WHERE DataTypeItemID='$this->ID'\" );\n\n if ( $res == false )\n $db->rollback( );\n else\n $db->commit(); \n }", "title": "" }, { "docid": "6f19e5946b6f3f55e98cc9499b249b73", "score": "0.6040889", "text": "function textselector_deleteData($vPageID) {\n\ttext_deleteData($vPageID);\n}", "title": "" }, { "docid": "acef000f31b87de45ae7d1d147706716", "score": "0.60404706", "text": "public function delete(){\n\t\t\t$ok = $this->sp->db->fetchBool('DELETE FROM '.ServiceProvider::get()->db->prefix.'userdatafield WHERE id=\\''.$this->sp->db->escape($this->id).'\\';');\n\t\t\t//TODO remove all links where possible\n\t\t\treturn $ok;\n\t\t}", "title": "" }, { "docid": "7a2056d13478b20f53e55fff3c82b621", "score": "0.6033825", "text": "function doRealDelete()\n {\n $this->assignSingle();\n /* Delete the record */\n DatabaseBean::dbDeleteById();\n }", "title": "" }, { "docid": "65c9874913eaacad4e3e503d964aaa7e", "score": "0.6031806", "text": "public function delete()\r\n\t{\r\n\t\t$data['data']\t\t\t\t\t= $this->data;\r\n\t\t//Get logged in session admin id\r\n\t\t$user_id \t\t\t\t\t\t= ($this->session->userdata('user_id_hotcargo')) ? $this->session->userdata('user_id_hotcargo') : 1;\r\n\t\t$setting_data \t\t\t\t\t= $this->myaccount_model->get_account_data($user_id);\r\n\t\t$data['data']['setting_data'] \t= $setting_data;\r\n\t\t$data['data']['settings'] \t\t= $this->sitesetting_model->get_settings();\r\n\t\t$data['data']['dealer_id'] \t\t= $user_id;\r\n\t\t\r\n\t\t//getting all admin data \r\n\t\t$data['myaccount_data'] \t\t\t= $this->myaccount_model->get_account_data($user_id);\r\n\t\t\r\n\t\t\r\n\t\t//Get requested id to remove\r\n\t\t$field_id \t\t\t\t\t= $this->uri->segment(4);\r\n\t\t\r\n\t\t//deleting query\r\n\t\t$this->mongo_db->where(array('_id' => $field_id));\r\n\t\tif($this->mongo_db->delete('static_contents')){\r\n\t\t\t$this->session->set_flashdata('flash_message', 'delete_success');\r\n\t\t\tredirect('control/static-contents');\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$this->session->set_flashdata('flash_message', 'delete_failed');\r\n\t\t\tredirect('control/static-contents');\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "b346c87546ecca234c4f830598ad6b1f", "score": "0.60315883", "text": "public function DeleteFunc()\n {\n //Creating the Query for Delete Record\n //Add LIMIT 1 so that only one record is deleted\n $sql = \"DELETE FROM \".static::$tbName.\" WHERE Id='\".self::$db->escape_string($this->Id).\"'\";\n //Executing the query\n $result = self::$db->query($sql);\n //Return ing the result of the query\n return $result;\n }", "title": "" }, { "docid": "e50c1c33060792a95cc997e636bc704f", "score": "0.60310245", "text": "function deleteDoc($id){ \n\t$SQL=\"DELETE FROM association_table WHERE id_doc='$id'\";\n\treturn SQLDelete($SQL);\n}", "title": "" }, { "docid": "2d65f5f14b42636c1dae8b8b27733add", "score": "0.6029292", "text": "protected function delete($fieldName, $value, $op=\"=\", $clause=\"\"){\n\t\t//run delete query\n\t\t$query = \"DELETE FROM $this->table WHERE $fieldName \".$op.\" :value $clause\";\n\t\ttry{\n\t\t\t$q = $this->db->prepare($query);\n\t\t\t$q->bindParam(':value', $value, \\PDO::PARAM_INT);\n\t\t\tif(!$q->execute()){//if query fails to run\n\t\t\t\techo\"query failed. delete not completed<br>\";\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t}\n\t\tcatch(PDOException $e){\n\t\t\techo\"PDO Exception: $->getMessage()\";\n\t\t}\n\n\t\t////$data = array(\"$fieldname\");//assuming $fieldname is a string, not an array\n\t\t//$this->find($data, \"WHERE $fieldName = $value\");\n\t\t//until I figure out how to prevent an sql injection, leave as is.\n\t\t\n\t\t//run a select query to see if the item is still in the db, if so the delete failed\n\t\t$query = \"SELECT * FROM $this->table WHERE $fieldName = :value\";\n\t\ttry{\n\t\t\t$q = $this->db->prepare($query);\n\t\t\t$q->bindParam(':value', $value, \\PDO::PARAM_INT);\n\t\t\t$q->execute();\n\t\t\t$res = $q->fetchAll();\n\t\t\t//if item was actually deleted, fethcAll should return an empty array\n\t\t\tif(empty($res)){\n\t\t\t\techo\"delete successful<br>\";\n\t\t\t\techo\"This record is not in the database\";\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\techo\"not deleted\";\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tcatch(PDOException $e){\n\t\t\techo\"query failed. select failed\";\n\t\t\techo\"PDO Exception: $->getMessage()\";\n\t\t}\n\t}", "title": "" }, { "docid": "fc06230ea7d327892df384a5efbfd352", "score": "0.6026965", "text": "public function Delete()\r\n {\r\n }", "title": "" } ]
a57f09425c85492a333552df8cdedf85
Public configuration management (getters and setters). Returns a copy of the Savant3 configuration parameters.
[ { "docid": "1099a71d4ae400d912347deddd75739a", "score": "0.0", "text": "public function getConf($key = null)\n\t{\n\t\treturn $this->conf($key);\n\t}", "title": "" } ]
[ { "docid": "9955915ec265d71576bb069da70d3766", "score": "0.6687474", "text": "public function getConfig(){\n\t\treturn array(\n\t\t\t'url' => $this->url,\n\t\t\t'useSandbox' => $this->useSandbox,\n\t\t\t'apikey' => $this->apikey\n\t\t);\n\t}", "title": "" }, { "docid": "47208fdfb0e27466035e97233a54fcd7", "score": "0.6680248", "text": "public static function config()\n\t{\n\t\tif (empty(self::$config))\n\t\t{\n\t\t\tself::$config = ComponentHelper::getParams('com_tjucm');\n\t\t}\n\n\t\treturn self::$config;\n\t}", "title": "" }, { "docid": "a1ab41f5a7f28f20a20beab671d1833e", "score": "0.6638662", "text": "public function configuration();", "title": "" }, { "docid": "d3f3999c9d30b4403631ccba2538db40", "score": "0.64808124", "text": "public function configuration()\n {\n\n return array(\n 'allowsoftwares' => true,\n 'allowlocal' => true,\n 'allowanonymous' => false,\n 'requiresoftwares' => true,\n 'requireloggedin' => true,\n 'allowpost' => false,\n 'allowcustomdata' => false,\n 'jsonoutput' => false,\n 'postrequirements' => []\n );\n }", "title": "" }, { "docid": "7412884fb64a2495e73b35eb4afcf2a2", "score": "0.6438803", "text": "function config()\n {\n return $this->config_internal;\n }", "title": "" }, { "docid": "228c0e056a0b03d1060ef39cacc6e412", "score": "0.63905376", "text": "public function config(){\n\t\t\n\t\t//Set the API url\n\t\t$mode = 'configuration';\n\t\t$apiKey = '?api_key='.API_KEY; // API_KEY is defined in config/constants.php\n\t\t$url_search = URL_API.$mode.$apiKey; //URL APIS is defined in config/constants.php\n\t\t//Use curl for get the json object \n\t\t$ca = curl_init();\n\t\tcurl_setopt($ca, CURLOPT_URL, $url_search);\n\t\tcurl_setopt($ca, CURLOPT_RETURNTRANSFER, TRUE);\n\t\tcurl_setopt($ca, CURLOPT_HEADER, FALSE);\n\t\tcurl_setopt($ca, CURLOPT_HTTPHEADER, array(\"Accept: application/json\"));\n\t\t$response = curl_exec($ca);\n\t\tcurl_close($ca);\n\t\t$config = json_decode($response, true);\n\t\treturn $config;\n\t\t\n\t}", "title": "" }, { "docid": "a1c5a0b11fdd797f6b257e00150bad55", "score": "0.6384588", "text": "public function getConfiguration()\n {\n return array(\n 'key' \t\t\t=> $this->key,\n 'init_vector' => $this->initVector,\n 'padding' \t\t=> $this->padding,\n 'mode' \t\t\t=> $this->mode,\n 'encryption'\t=> $this->encryption . ' Bit',\n 'block_size'\t=> $this->block_size,\n );\n }", "title": "" }, { "docid": "03c39f41d8b760dca62c28450089c77e", "score": "0.6365577", "text": "public function config(){\r\n\t\treturn $this->_config;\r\n\t}", "title": "" }, { "docid": "15227c532b31cac20ec1a2f65ede6a9c", "score": "0.63382465", "text": "public function config();", "title": "" }, { "docid": "57ac96e30f57bf97f6fcbf3095ef00a8", "score": "0.63379467", "text": "public static function getConfig()\n {\n $config = array(\n // values: 'sandbox' for testing\n //\t\t 'live' for production\n \"mode\" => \"sandbox\"\n\n // These values are defaulted in SDK. If you want to override default values, uncomment it and add your value.\n // \"http.ConnectionTimeOut\" => \"5000\",\n // \"http.Retry\" => \"2\",\n );\n return $config;\n }", "title": "" }, { "docid": "95ac06505b443b5159b02ac0ce02643c", "score": "0.6305325", "text": "public function get_config()\n {\n // Settings tree\n $this->settings = woochimp_plugin_settings();\n\n // Load some data from config\n $this->hints = $this->options('hint');\n $this->validation = $this->options('validation', true);\n $this->titles = $this->options('title');\n $this->options = $this->options('values');\n $this->section_info = $this->get_section_info();\n $this->default_tabs = $this->get_default_tabs();\n }", "title": "" }, { "docid": "d349f86136fe0ece1d65fd80e99bbdc3", "score": "0.6268109", "text": "public function getConfig()\n {\n $config['smartystreets'] = [\n 'website_key' => $this->configHelper->getSiteKey(),\n 'regions' => $this->getRegions()\n ];\n return $config;\n }", "title": "" }, { "docid": "2e433befe43322e7643e2807724b1488", "score": "0.62611884", "text": "function Config()\n {\n $this->cfg = array\n (\n 'FREEBASE_API_KEY' => '',\n 'FREEBASE_SERVICE_URL' => 'https://www.googleapis.com/freebase/v1/search'\n );\n }", "title": "" }, { "docid": "6e2c5bcf3b9a043f1aecfaede5f6eb2d", "score": "0.62542206", "text": "protected function getConfig() \n {\n $env = getenv('APPLICATION_ENV') ? 'production' : 'development';\n if($env == 'production') {\n return array(\n 'username' => 'xxxxxxxxxxxxx',\n 'password' => 'xxxxxxxxxxxxx',\n 'signature' => 'xxxxxxxxxxxxx',\n\n // Sandbox: https://api-3t.sandbox.paypal.com/nvp\n // Live: https://api-3t.paypal.com/nvp\n 'endpoint' => 'https://api-3t.paypal.com/nvp'\n );\n }else{\n return array(\n 'username' => 'xxxxxxxxxxxxx',\n 'password' => 'xxxxxxxxxxxxx',\n 'signature' => 'xxxxxxxxxxxxx',\n\n // Sandbox: https://api-3t.sandbox.paypal.com/nvp\n // Live: https://api-3t.paypal.com/nvp\n 'endpoint' => 'https://api-3t.sandbox.paypal.com/nvp'\n ); \n \n \n }\n }", "title": "" }, { "docid": "8afb8bc90bd52d0f6c3b3eaa9a3a86ed", "score": "0.6210475", "text": "public function getConfiguration();", "title": "" }, { "docid": "8afb8bc90bd52d0f6c3b3eaa9a3a86ed", "score": "0.6210475", "text": "public function getConfiguration();", "title": "" }, { "docid": "8afb8bc90bd52d0f6c3b3eaa9a3a86ed", "score": "0.6210475", "text": "public function getConfiguration();", "title": "" }, { "docid": "3266357899cf07d17751a303264d54da", "score": "0.6147833", "text": "public function get_settings ()\n\t{\n\t\t$settings = array();\n\t\t\n\t\t// API Connection Handler.\n\t\t$settings ['connection_handler'] = (Mage::getStoreConfig ('oneall_singlesignon/connection/handler') == 'fsockopen' ? 'fsockopen' : 'curl');\n\t\t$settings ['connection_port'] = (Mage::getStoreConfig ('oneall_singlesignon/connection/port') == 80 ? 80 : 443);\n\t\t$settings ['connection_protocol'] = ($settings ['connection_port'] == 80 ? 'http' : 'https');\n\t\t\n\t\t// API Settings.\n\t\t$settings ['subdomain'] = trim (strval (Mage::getStoreConfig ('oneall_singlesignon/general/subdomain')));\n\t\t$settings ['key'] = trim (strval (Mage::getStoreConfig ('oneall_singlesignon/general/key')));\n\t\t$settings ['secret'] = trim (strval (Mage::getStoreConfig ('oneall_singlesignon/general/secret')));\n\t\t\n\t\t// Automatic Account Creation.\n\t\t$settings ['accounts_autocreate'] = (Mage::getStoreConfig ('oneall_singlesignon/accounts_create/automatic') == 0 ? false : true);\n\t\t$settings ['accounts_sendmail'] = (Mage::getStoreConfig ('oneall_singlesignon/accounts_create/sendmail') == 1 ? true : false);\n\t\t\n\t\t// Automatic Account Link.\n\t\t$settings ['accounts_autolink'] = (Mage::getStoreConfig ('oneall_singlesignon/accounts_link/automatic') == 0 ? false : true);\n\t\t$settings ['accounts_linkunverified'] = (Mage::getStoreConfig ('oneall_singlesignon/accounts_link/unverified') == 1 ? true : false);\n\t\t\n\t\t// SSO Session Settings.\n\t\t$settings ['session_lifetime'] = trim (strval (Mage::getStoreConfig ('oneall_singlesignon/settings/sessionlifetime')));\n\t\t$settings ['session_lifetime'] = ((empty ($settings ['session_lifetime']) || $settings ['session_lifetime'] < 0) ? 86400 : $settings ['session_lifetime']);\n\t\t$settings ['session_top_realm'] = trim (strval (Mage::getStoreConfig ('oneall_singlesignon/settings/sessiontoprealm')));\n\t\t$settings ['session_sub_realm'] = (empty ($settings ['session_top_realm']) ? '' : trim (strval (Mage::getStoreConfig ('oneall_singlesignon/settings/sessionsubrealm'))));\n\t\t\n\t\t// Helper Settings.\n\t\t$settings ['base_url'] = ($settings ['subdomain'] . '.api.oneall.com');\n\t\t$settings ['api_url'] = ($settings ['connection_protocol'] . '://' . $settings ['base_url']);\n\t\t\n\t\t// Done\n\t\treturn $settings;\n\t}", "title": "" }, { "docid": "100b2ef9292a6363296dc5af3fe4481c", "score": "0.6119383", "text": "public function config()\n {\n return $this->_config;\n }", "title": "" }, { "docid": "100b2ef9292a6363296dc5af3fe4481c", "score": "0.6119383", "text": "public function config()\n {\n return $this->_config;\n }", "title": "" }, { "docid": "3f509473c1e18ede1b7ffce3a9a0393d", "score": "0.6109442", "text": "public function &getConfig();", "title": "" }, { "docid": "895e7e162942937fe83f26f295fb5547", "score": "0.6071371", "text": "public function config()\n {\n return $this->config;\n }", "title": "" }, { "docid": "895e7e162942937fe83f26f295fb5547", "score": "0.6071371", "text": "public function config()\n {\n return $this->config;\n }", "title": "" }, { "docid": "19f44a44e803b7b61e4a2e1a6bcea9c5", "score": "0.6066192", "text": "public static function getall_config() { return self::$config; }", "title": "" }, { "docid": "1e9f611a93cc4e2100029dd4db526b4d", "score": "0.60602623", "text": "public function configuration()\n {\n $this->force_api_type('application');\n\n $this->requester->get(\"/nodes/{$this->id}/configuration\");\n }", "title": "" }, { "docid": "7b4587d6e082f3ef8709ba4ecc790bd7", "score": "0.6044447", "text": "private function getConfig() {\n $config = $this->configFactory->get('collaborate_integration.auth_settings');\n return (object) [\n 'url' => $config->get('url'),\n 'key' => $config->get('key'),\n 'secret' => $config->get('secret'),\n ];\n }", "title": "" }, { "docid": "d727c8d841d8c7b8b0c9e643aa405599", "score": "0.6037619", "text": "final public function get_config() {\n\t\treturn [\n\t\t\t'post_prefix' => $this->post_prefix,\n\t\t\t'chunk_size' => $this->chunk_size,\n\t\t\t'max_filesize' => $this->max_filesize,\n\t\t];\n\t}", "title": "" }, { "docid": "be414f55c723824e87416b1678fafcd5", "score": "0.60276073", "text": "public static function setConfig()\n {\n $config = [\n /** Chronopost basic informations */\n self::CHRONOPOST_PICKUP_POINT_CODE_CLIENT => ChronopostPickupPoint::getConfigValue(self::CHRONOPOST_PICKUP_POINT_CODE_CLIENT),\n self::CHRONOPOST_PICKUP_POINT_PASSWORD => ChronopostPickupPoint::getConfigValue(self::CHRONOPOST_PICKUP_POINT_PASSWORD),\n\n /** END */\n ];\n\n /** Delivery types */\n foreach (self::getDeliveryTypesStatusKeys() as $statusKey) {\n $config[$statusKey] = ChronopostPickupPoint::getConfigValue($statusKey);\n }\n\n /** Set the local static config value */\n self::$config = $config;\n }", "title": "" }, { "docid": "ea119d8f5ca60f2570326ee326c8001e", "score": "0.60234445", "text": "abstract protected function getConfiguration();", "title": "" }, { "docid": "bc8ac9a643ee0be3ef3a13c9034397a1", "score": "0.6021335", "text": "protected function getConfig() {\n return $this->configFactory->get('commerce_buy_click.settings');\n }", "title": "" }, { "docid": "856d79448c08d6f714a8ca0a20bddbe7", "score": "0.6010159", "text": "public function getConfig()\r\n {\r\n return $this->_config;\r\n }", "title": "" }, { "docid": "5339bcb136eb429f3e1b7651492d9ac3", "score": "0.60048455", "text": "private function _getConfig() {\n\t\treturn $this->_config;\n\t}", "title": "" }, { "docid": "24d26dc5c229fae7ad96c1420ca41c55", "score": "0.60045034", "text": "public function getConfig(){\n\t\treturn $this->config;\n\t}", "title": "" }, { "docid": "2021063cebac4ca2ca482ca4801a29a1", "score": "0.60044754", "text": "protected function defineSettings()\n\t{\n\t\treturn array(\n 'accountId' => AttributeType::String,\n 'accountName' => AttributeType::String,\n 'webPropertyId' => AttributeType::String,\n 'webPropertyName' => AttributeType::String,\n\t\t\t'internalWebPropertyId' => AttributeType::String,\n 'profileId' => AttributeType::String,\n 'profileName' => AttributeType::String,\n 'profileCurrency' => AttributeType::String,\n\t\t\t'realtimeRefreshInterval' => array(AttributeType::Number, 'default' => 60),\n\t\t\t'forceConnect' => array(AttributeType::Bool, 'default' => false),\n\t\t\t'enableRealtime' => AttributeType::Bool,\n\t\t\t'tokenId' => AttributeType::Number,\n\t\t);\n\t}", "title": "" }, { "docid": "f924c3e41c6ca0e1b51e3a8f9f6d0d16", "score": "0.6000532", "text": "public function get_settings() {\n\t\t$settings = parent::get_settings();\n\n\t\t$settings[] = 'multisafepay';\n\n\t\treturn $settings;\n\t}", "title": "" }, { "docid": "9e295a1bc46579a4844f211c04005dc6", "score": "0.59958804", "text": "public function cfg ( ) { return $this->cfg; }", "title": "" }, { "docid": "7c9c713a373008d4bafdddf5bf5e998a", "score": "0.5993108", "text": "public static function config() {\n return Config::instance()->config;\n }", "title": "" }, { "docid": "d539e831c8cac6bc6a32a74e9bf2e87c", "score": "0.59849846", "text": "public function getConfig ()\n {\n return $this->_config;\n }", "title": "" }, { "docid": "d9cd38be5a781ae109ae238629009a9e", "score": "0.59798235", "text": "public static function getConfig()\n {\n return self::$_config;\n }", "title": "" }, { "docid": "56257ab9e3db7052314b5401a24b0564", "score": "0.5975175", "text": "public function getConfig()\n\t{\n\t\treturn $this->_config;\n\t}", "title": "" }, { "docid": "56257ab9e3db7052314b5401a24b0564", "score": "0.5975175", "text": "public function getConfig()\n\t{\n\t\treturn $this->_config;\n\t}", "title": "" }, { "docid": "b4bb899ae1083b1a3213d288fcd2b90a", "score": "0.59744215", "text": "public function initConfig() {\r\n $config = array();\r\n\r\n $config['autoAdvance'] = '1';\r\n $config['mobileAutoAdvance'] = '1';\r\n $config['barDirection'] = 'leftToRight';\r\n $config['barPosition'] = 'bottom';\r\n $config['fx'] = 'random';\r\n $config['height'] = '43%';\r\n $config['hover'] = '1';\r\n $config['loader'] = 'pie';\r\n $config['loaderColor'] = '#eeeeee';\r\n $config['loaderBgColor'] = '#222222';\r\n $config['loaderOpacity'] = '.8';\r\n $config['loaderPadding'] = '2';\r\n $config['loaderStroke'] = '7';\r\n $config['minHeight'] = '200px';\r\n $config['navigation'] = '1';\r\n $config['navigationHover'] = '1';\r\n $config['pagination'] = '1';\r\n $config['playPause'] = '1';\r\n $config['pauseOnClick'] = '1';\r\n $config['pieDiameter'] = '38';\r\n $config['piePosition'] = 'rightTop';\r\n $config['portrait'] = '1';\r\n $config['time'] = '7000';\r\n $config['transPeriod'] = '1500';\r\n $config['skin'] = 'camera_black_skin';\r\n\r\n return Configuration::updateValue($this->name, json_encode($config));\r\n }", "title": "" }, { "docid": "88036d2d3b38154d8ff418b57d7d58db", "score": "0.5973863", "text": "public function getConfig();", "title": "" }, { "docid": "88036d2d3b38154d8ff418b57d7d58db", "score": "0.5973863", "text": "public function getConfig();", "title": "" }, { "docid": "88036d2d3b38154d8ff418b57d7d58db", "score": "0.5973863", "text": "public function getConfig();", "title": "" }, { "docid": "88036d2d3b38154d8ff418b57d7d58db", "score": "0.5973863", "text": "public function getConfig();", "title": "" }, { "docid": "e533cd53603223df1dec1e68962bb412", "score": "0.5970549", "text": "public function getSettings()\n {\n return Config::getInstance()->APISettings;\n }", "title": "" }, { "docid": "544c763cd1aa8d7f221665671e33220b", "score": "0.5965433", "text": "public function setting_get_config()\n\t{\n\t\t$config = parent::setting_get_config();\n\n\t\t$this->setting_set_config_currency($config);\n\n\t\treturn $config;\n\t}", "title": "" }, { "docid": "ed4f54fe71ffe224a6fcf64b8b0bcdb2", "score": "0.5964432", "text": "public static function getConfig() {\n return self::$_config;\n }", "title": "" }, { "docid": "7b9bf134b07f83e3cccf859149acfc84", "score": "0.5961821", "text": "public function getConf()\n\t{\n\t\treturn $this->conf;\n\t}", "title": "" }, { "docid": "39a4960aa9ce09e072d34cc7d43304ee", "score": "0.59596384", "text": "protected function settings()\n {\n $config = include __DIR__ . \"/../../../config.php\";\n return array(\n \"dataSources\"=>array(\n \"automaker\"=>$config[\"automaker\"]\n )\n );\n\n }", "title": "" }, { "docid": "b1c6d3acdab7ba6b8a221bbcd7a494c7", "score": "0.59578496", "text": "function getConfiguration()\n\t{\n\t\t$db = JFactory::getDBO();\n\t\t$db->setQuery(\"SELECT * FROM #__payperdownloadplus_config\", 0, 1);\n\t\treturn $db->loadObject();\n\t}", "title": "" }, { "docid": "42de58a533250ae77a9e6b88633bea15", "score": "0.5955404", "text": "public function get_settings();", "title": "" }, { "docid": "6a359f45c3419d566189bacda0f8a0b2", "score": "0.5952367", "text": "function oConfig(){\n\t\tif( !isset($GLOBALS['Config']) ){\n\t\t\trequire_once( dirname(__FILE__).'/lib/Config.class.php' );\n\t\t\t$GLOBALS['Config'] = new MOD_Config();\n\t\t}\n\t\treturn $GLOBALS['Config'];\n\t}", "title": "" }, { "docid": "8942e700ff5f6d8fa44e673846ca2c0a", "score": "0.5944364", "text": "private function setConfigurationProperties()\n {\n $this->api_live = Configuration::get('PAYPLUG_LIVE_API_KEY');\n $this->api_test = Configuration::get('PAYPLUG_TEST_API_KEY');\n\n // Set the uninstall notice according to the \"keep_cards\" configuration\n $this->confirmUninstall = $this->l('Are you sure you wish to uninstall this module and delete your settings?') . ' ';\n if ((int)Configuration::get('PAYPLUG_KEEP_CARDS') == 1) {\n $this->confirmUninstall .= $this->l('All the registered cards of your customer will be kept.');\n } else {\n $this->confirmUninstall .= $this->l('All the registered cards of your customer will be deleted.');\n }\n\n $this->current_api_key = $this->getCurrentApiKey();\n $this->email = Configuration::get('PAYPLUG_EMAIL');\n $this->img_lang = $this->context->language->iso_code === 'it' ? 'it' : 'default';\n $this->ssl_enable = Configuration::get('PS_SSL_ENABLED');\n\n if ((!isset($this->email) || (!isset($this->api_live) && empty($this->api_test)))) {\n $this->warning = $this->l('In order to accept payments you need to configure your module by connecting your PayPlug account.');\n }\n\n $this->payment_status = array(\n 1 => $this->l('not paid'),\n 2 => $this->l('paid'),\n 3 => $this->l('failed'),\n 4 => $this->l('partially refunded'),\n 5 => $this->l('refunded'),\n 6 => $this->l('on going'),\n 7 => $this->l('cancelled'),\n 8 => $this->l('authorized'),\n 9 => $this->l('authorization expired'),\n );\n }", "title": "" }, { "docid": "db3f585be72c87a6abdeda0c4023756c", "score": "0.59443617", "text": "public function getConfig()\n {\n return $this;\n }", "title": "" }, { "docid": "aed1b14e3c719139e07680f93d5fbb14", "score": "0.59384245", "text": "protected function defineSettings()\n\t{\n\t\treturn array(\n\t\t\t'whitelist' => array(AttributeType::Mixed, 'default' => array(\n\t\t\t\t'23hq.com',\n\t\t\t\t'app.net',\n\t\t\t\t'animoto.com',\n\t\t\t\t'aol.com',\n\t\t\t\t'collegehumor.com',\n\t\t\t\t'dailymotion.com',\n\t\t\t\t'deviantart.com',\n\t\t\t\t'embed.ly',\n\t\t\t\t'fav.me',\n\t\t\t\t'flic.kr',\n\t\t\t\t'flickr.com',\n\t\t\t\t'funnyordie.com',\n\t\t\t\t'hulu.com',\n\t\t\t\t'imgur.com',\n\t\t\t\t'instagr.am',\n\t\t\t\t'instagram.com',\n\t\t\t\t'kickstarter.com',\n\t\t\t\t'meetup.com',\n\t\t\t\t'meetup.ps',\n\t\t\t\t'nfb.ca',\n\t\t\t\t'official.fm',\n\t\t\t\t'rdio.com',\n\t\t\t\t'soundcloud.com',\n\t\t\t\t'twitter.com',\n\t\t\t\t'vimeo.com',\n\t\t\t\t'vine.co',\n\t\t\t\t'wikipedia.org',\n\t\t\t\t'wikimedia.org',\n\t\t\t\t'wordpress.com',\n\t\t\t\t'youtu.be',\n\t\t\t\t'youtube.com',\n\t\t\t\t'youtube-nocookie.com',\n\t\t\t)),\n\t\t\t'parameters' => array(AttributeType::Mixed, 'default' => array(\n\t\t\t\t'maxwidth' => 1280,\n\t\t\t\t'maxheight' => 960,\n\t\t\t)),\n\t\t);\n\t}", "title": "" }, { "docid": "41c476b3e7188bfe39a8ed6bab16cebe", "score": "0.59381974", "text": "public function config_instance()\n {\n return $this->config;\n }", "title": "" }, { "docid": "648398b0dd62c20d7a23620920ae7716", "score": "0.59380573", "text": "protected function getConfig()\n\t{\n\t\treturn OLPBlackbox_Config::getInstance();\n\t}", "title": "" }, { "docid": "648398b0dd62c20d7a23620920ae7716", "score": "0.59380573", "text": "protected function getConfig()\n\t{\n\t\treturn OLPBlackbox_Config::getInstance();\n\t}", "title": "" }, { "docid": "648398b0dd62c20d7a23620920ae7716", "score": "0.59380573", "text": "protected function getConfig()\n\t{\n\t\treturn OLPBlackbox_Config::getInstance();\n\t}", "title": "" }, { "docid": "f31417c14a7e46a5943c7ed085c5b4bc", "score": "0.5932358", "text": "public function setConfig(): void;", "title": "" }, { "docid": "789e9e7e6945c402c2b0f42a1a80850e", "score": "0.5926021", "text": "public function setConfig()\n {\n // section 10-10--91-60-7f09995f:12e75e0bc39:-8000:0000000000000946 begin\n // section 10-10--91-60-7f09995f:12e75e0bc39:-8000:0000000000000946 end\n }", "title": "" }, { "docid": "433666155dd236f54d0e9eef7d898022", "score": "0.5922706", "text": "protected function configurable()\n {\n $this->config = ConfigFactory::makeOne();\n }", "title": "" }, { "docid": "c62e88841e9fb03168b188d4978b4d15", "score": "0.5919831", "text": "public function getConf()\n {\n return $this->pObj->conf;\n }", "title": "" }, { "docid": "ca6c4491c55582c695cda6bb7f87f1d7", "score": "0.59161794", "text": "public function getSettings();", "title": "" }, { "docid": "ca6c4491c55582c695cda6bb7f87f1d7", "score": "0.59161794", "text": "public function getSettings();", "title": "" }, { "docid": "ca6c4491c55582c695cda6bb7f87f1d7", "score": "0.59161794", "text": "public function getSettings();", "title": "" }, { "docid": "9d6fd2a5919f18cda040287cea1923bf", "score": "0.59092164", "text": "public function get_config()\n {\n /**\n * get setting config\n */\n $set = Setting::getGeneral();\n $config = array();\n $config['site_logo'] = isset($set['image']) ? str_replace('..', '', $set['image']) : \"\" ;\n $config['site_favicon'] = isset($set['favicon']) ? str_replace('..', '', $set['favicon']) : \"\" ;\n $config['site_name'] = $set['sitetitle'];\n $config['site_tagline'] = $set['tagline'];\n $config['site_description'] = $set['description'];\n $config['site_numberphone'] = $set['numberphone'];\n $config['site_email'] = $set['email'];\n $config['site_address'] = $set['address'];\n $config['site_facebook'] = $set['facebook'];\n $config['site_google'] = $set['google'];\n $config['site_twitter'] = $set['twitter'];\n return $config;\n }", "title": "" }, { "docid": "67da36b707c8fe43e49d6037bbb84930", "score": "0.59054726", "text": "public function configuration() {\n \n // Create the config array\n $config = array();\n \n // Set the post deletion\n $config['post_deletion'] = true;\n \n // Set the account's\n $config['account_insights'] = true;\n \n // Set the post's insights\n $config['post_insights'] = true;\n \n // Set the words\n $config['words'] = array (\n 'reply' => $this->CI->lang->line('reply'),\n 'delete' => $this->CI->lang->line('delete'),\n 'insights' => $this->CI->lang->line('insights'),\n 'delete_post' => $this->CI->lang->line('delete_post'),\n 'no_posts_found' => $this->CI->lang->line('no_posts_found')\n );\n \n // Return config\n return $config;\n \n }", "title": "" }, { "docid": "0609eca5c6c6feb5b38b8d1ff768b89d", "score": "0.5903936", "text": "public function settings();", "title": "" }, { "docid": "f6ad96f14b722bd98c62e73da52fbc83", "score": "0.5902127", "text": "static protected function wConfig()\n {\n return Config::getInstance();\n }", "title": "" }, { "docid": "b26992230c630cce668f7ff25ee1fb40", "score": "0.5902039", "text": "public function getConfig()\n {\n return $this->_config;\n }", "title": "" }, { "docid": "7698477c10158dfefa31327622d3a7e9", "score": "0.58986646", "text": "public function get_config() {\n\t\treturn $this->config_final;\n\t}", "title": "" }, { "docid": "b5c2a2d9c94184f28dbb7fda08d95245", "score": "0.58884335", "text": "public static function getSettings()\n {\n return [\n 'login' => 'admin',\n 'legalTemplates' => ['skyscraper'],\n 'legalFields' => ['title'],\n ];\n }", "title": "" }, { "docid": "284b7ae8481646d027469e995b838ba6", "score": "0.58865297", "text": "private static function setupBaseConfiguration() {\n\n\t\t// server data\n\t\tself::set('host', $_SERVER['SERVER_NAME']);\n\t\tself::set('domain', 'http://' . $_SERVER['SERVER_NAME']);\n\t\tself::set('current_file', basename($_SERVER['PHP_SELF']));\n\t\tself::set('webroot', '/');\n\t\tself::set('web_address', self::get('domain') . self::get('webroot'));\n\t\tself::set('web_address_no_slash', substr(self::get('domain') . self::get('webroot'), 0, -1));\n\t\tself::set('root', $_SERVER['DOCUMENT_ROOT'] . self::get('webroot'));\n\t\t\n\t\t// folder locations\n\t\tself::set('modules', self::get('root') . 'modules/');\n\t\tself::set('config', self::get('root') . 'app/config/');\n self::set('temp', self::get('root') . 'runtime/');\n self::set('app', self::get('root') . 'app/');\n\t\t\n\t\t// errors\n\t\tself::set('error_log', self::get('temp') . 'errors/php.txt');\n\n\t\tself::parseIniConfig('system');\n self::parseIniConfig('source');\n self::parseIniConfig('custom');\n \n }", "title": "" }, { "docid": "dad9960953caeefdd9945267eeb911e3", "score": "0.5881479", "text": "public function get_settings() {\n\t\t$settings = parent::get_settings();\n\n\t\t$settings[] = 'adyen';\n\n\t\treturn $settings;\n\t}", "title": "" }, { "docid": "3dad06a3004de6e7a8a74a3a918246fd", "score": "0.5880592", "text": "public function getConfig()\n {\n return $this->_config;\n }", "title": "" }, { "docid": "3dad06a3004de6e7a8a74a3a918246fd", "score": "0.5880592", "text": "public function getConfig()\n {\n return $this->_config;\n }", "title": "" }, { "docid": "7075f324a6803de0895087b7b15183bf", "score": "0.5876499", "text": "private function configuration()\n {\n $config = [];\n $config_json = $this->getPath().'config.json';\n $config_php = $this->getPath().'config.php';\n\n // Parse config from jSon file\n if (file_exists($config_json))\n {\n $config = array_merge(\n $config, \n $this->json( $config_json, true )\n );\n }\n else if (file_exists($config_php))\n {\n include_once $config_php;\n }\n\n // Parse config from Index.php\n $config = array_merge(\n $config,\n self::configuration_index($this->getPath())\n );\n\n $this->config = (object) $config;\n }", "title": "" }, { "docid": "88fd5ae072db5d63cfd56bb660706b42", "score": "0.5874345", "text": "public function getConfig(){\n return $this->getClient()->getConfig();\n }", "title": "" }, { "docid": "384cce5b5424ae829de41c746702dd5c", "score": "0.58705306", "text": "public function configuration(): array\n {\n return [\n 'settings' => $this->settings(),\n 'mappings' => $this->mapping(),\n 'aliases' => $this->aliases(),\n ];\n }", "title": "" }, { "docid": "551aa08d8b21b0480329f9e70a9bc921", "score": "0.58660537", "text": "public function getConfig()\n\t{\n\t\treturn $this->config;\n\t}", "title": "" }, { "docid": "551aa08d8b21b0480329f9e70a9bc921", "score": "0.58660537", "text": "public function getConfig()\n\t{\n\t\treturn $this->config;\n\t}", "title": "" }, { "docid": "551aa08d8b21b0480329f9e70a9bc921", "score": "0.58660537", "text": "public function getConfig()\n\t{\n\t\treturn $this->config;\n\t}", "title": "" }, { "docid": "551aa08d8b21b0480329f9e70a9bc921", "score": "0.58660537", "text": "public function getConfig()\n\t{\n\t\treturn $this->config;\n\t}", "title": "" }, { "docid": "551aa08d8b21b0480329f9e70a9bc921", "score": "0.58660537", "text": "public function getConfig()\n\t{\n\t\treturn $this->config;\n\t}", "title": "" }, { "docid": "076af1e2a8d7b186bd13c0b191c1bb1a", "score": "0.5862758", "text": "protected function getConfig() {\n return $this->config;\n }", "title": "" }, { "docid": "b1ed865ffa2c928fc7432b77c39c4286", "score": "0.5860955", "text": "public function getConfig(){\n return $this->config;\n }", "title": "" }, { "docid": "482493fdfae8fc9d035d4da12dfe54aa", "score": "0.5860214", "text": "public function configuration()\n {\n\n return array(\n 'uniquename' => 'riddle',\n 'extension' => '.exe',\n 'type' => 'riddle',\n 'viewable' => true,\n 'removable' => true,\n 'installable' => true,\n 'executable' => true,\n 'keepdata' => true\n );\n }", "title": "" }, { "docid": "38dcfef96d3f69214d1dae4691343178", "score": "0.58560354", "text": "public function getSettings() {\n $this->settings = array(\n 'api-key' => variable_get('justgiving_api_key'),\n 'environment' => variable_get('justgiving_environment'),\n );\n switch ($this->settings['environment']) {\n case 'sandbox':\n $this->settings['environment'] = 'https://api.sandbox.justgiving.com/';\n break;\n case 'live':\n $this->settings['environment'] = 'https://api.justgiving.com/';\n break;\n }\n $this->forms = array(\n 'page' => variable_get('justgiving_node_page_form'),\n );\n }", "title": "" }, { "docid": "da28b9483891ca6241a96fc1d34f3084", "score": "0.585564", "text": "private function makeConfig()\n {\n return array(\n 'ip' => $this->getPublicIp(),\n 'name' => $this->getDeviceName(),\n 'uuid' => $this->generateUuid(),\n 'key' => $this->generateKey()\n );\n }", "title": "" }, { "docid": "ef45275fefa169d4d3c9c797cc6bb380", "score": "0.58530885", "text": "public function getConfiguration()\n {\n return $this->config;\n }", "title": "" }, { "docid": "1345eb1b8eafcddada14a4ba205b0a11", "score": "0.5851275", "text": "protected function _getConfig()\n {\n return Mage::getSingleton('checkoutapi_chargePayment/config');\n }", "title": "" }, { "docid": "3ae74dbf50d082d01ae1c56b54e74537", "score": "0.5836338", "text": "protected function getConfiguration() {\n\n\t\t// get standard MVC configuration (see tx_ptmvc_controllerFrontend::getConfiguration())\n\t\tparent::getConfiguration();\n\n\t\t// merge local configuration (set in the constructor) over existing MVC configuration\n\t\tif (is_array($this->localConfiguration) && !empty($this->localConfiguration)) {\n\t\t\t$this->conf = t3lib_div::array_merge_recursive_overrule($this->conf, $this->localConfiguration);\n\t\t\tif (TYPO3_DLOG) t3lib_div::devLog('Merging localConfiguration with existing MVC configuration', 'pt_list', 0, $this->localConfiguration);\n\n\t\t\t// unset the localConfiguration to avoid that the controller will merge settings again\n\t\t\t$this->localConfiguration = array();\n\t\t}\n\n\t\t// set some class properties depending on special configuration settings: set list ID for the current list controller from TS config\n\t\t$this->currentlistId = $this->conf['listId'];\n\t\ttx_pttools_assert::isNotEmptyString($this->currentlistId, array('message' => '\"currentlistId\" must have a string value'));\n\n\t\t// set listPrefix\n\t\t$this->listPrefix = get_class($this) . '_listId_' . $this->currentlistId;\n\n\t\t// as we need the pluginMode already here we fetch the pluginMode here\n\t\t$this->getPluginMode();\n\n\t\t$this->filterboxId = $this->conf['filterboxId'];\n\t\tif ($this->pluginMode == 'filterbox') {\n\t\t\ttx_pttools_assert::isNotEmptyString($this->filterboxId, array('message' => 'No \"filterboxId\" found in configuration.'));\n\t\t}\n\n\t\t// merge listId specific configuration (\"plugin.tx_<condensedExtKey>.controller.<controllerName>.<listPrefix>.\") over existing configuration (\"plugin.tx_<condensedExtKey>.controller.list.\")\n\t\t$listIdSpecificConfiguration = $this->_extConf['controller.'][$this->getControllerName().'.'][$this->listPrefix.'.'];\n\t\tif (is_array($listIdSpecificConfiguration) && !empty($listIdSpecificConfiguration)) {\n\t\t\t$this->conf = t3lib_div::array_merge_recursive_overrule($this->conf, $listIdSpecificConfiguration);\n\t\t}\n\n\t}", "title": "" }, { "docid": "309ea67a4f428ba5d9fc0b93fca77362", "score": "0.58291703", "text": "protected function get_config()\n\t{\n\t\t$config = $this->configs['core'];\n\n\t\t$this->configs->constructors += $config['config constructors'];\n\n\t\treturn $config;\n\t}", "title": "" }, { "docid": "cf6a0240847291a43245b29dd0554904", "score": "0.582812", "text": "public function tieInCommonConfiguration () {\r\n // Get a Cookie/Session storage object; By default,\r\n // every object should have it's own cookie;\r\n $this->objCookie = new CookieStorage ($this);\r\n\r\n // Get the SKIN information;\r\n if (self::checkSessionVar (new S ('skin'), new O (SKIN))->toBoolean () == FALSE)\r\n $objSkin = self::getSessionVar (new S ('skin')); else $objSkin = new S (SKIN);\r\n\r\n // Get the LANG information;\r\n if (self::checkSessionVar (new S ('language'), new O (LANGUAGE))->toBoolean () == FALSE)\r\n $objLang = self::getSessionVar (new S ('language')); else $objLang = new S (LANGUAGE);\r\n\r\n // Set some predefined defaults ...\r\n\t\t$this->objDataArray\t = new A;\r\n $this->objPathToModule = new FilePath (MOD_DIR . _S . $this->getObjectCLASS ()->toLower ());\r\n $this->objPathToAdmin = new FilePath ($this->objPathToModule->toRelativePath () . _S . ADMIN_DIR . _S);\r\n $this->objPathToSkin = new FilePath ($this->objPathToModule->toRelativePath () . _S . SKIN_DIR_DIR . _S . $objSkin . _S);\r\n $this->objPathToLang = new FilePath ($this->objPathToModule->toRelativePath () . _S . LANGUAGE_DIR . _S . $objLang . _S);\r\n }", "title": "" }, { "docid": "ce8cd7cc9bbe2ae302f735a89e6364c2", "score": "0.5827127", "text": "public function settings()\n {\n if (!$this->settings) {\n $this->settings = $this->standardSettings();\n }\n return $this->settings;\n }", "title": "" }, { "docid": "4bcde483d89242c36647e1fbea53b0a1", "score": "0.58243245", "text": "public function getConfig()\r\n\t{\r\n\t\treturn Config::getInstance();\r\n\t}", "title": "" }, { "docid": "786118d960615fc72a1381c3079cc569", "score": "0.58234525", "text": "public function getConfig()\n {\n }", "title": "" }, { "docid": "0c3796762ca9f10d89fa925bb91d1518", "score": "0.5818047", "text": "public function getConfig() {\n return new Varien_Object(Mage::getStoreConfig('payment/gwap_cc'));\n }", "title": "" } ]
cf39038dcac543051e5927985846745b
Returns the Server IP
[ { "docid": "d4cf732ee11acbe783d4dd7af5266b7e", "score": "0.7678996", "text": "public function getIP(): string {\n return $this->context->ip;\n }", "title": "" } ]
[ { "docid": "7c28c05e4aabdd7ce345b61da47a569a", "score": "0.89773", "text": "public static function serverIP() {\n return getHostByName(getHostName());\n }", "title": "" }, { "docid": "7ff1fbb6467e35606bd921735de3a582", "score": "0.83830494", "text": "public function ip()\r\n {\r\n return $this->server->get('REMOTE_ADDR');\r\n }", "title": "" }, { "docid": "0e5e29f951eb2d6e4107ea6e4097fa0b", "score": "0.8341288", "text": "private function getServerIp(): string\n {\n if (!empty($_SERVER['SERVER_ADDR'])) {\n $ip = $_SERVER['SERVER_ADDR'];\n } elseif (!empty($_SERVER['SERVER_NAME'])) {\n $ip = gethostbyname($_SERVER['SERVER_NAME']);\n } else {\n // for php-cli(phpunit etc.)\n $ip = defined('PHPUNIT_RUNNING') ? '127.0.0.1' : gethostbyname(gethostname());\n }\n\n return filter_var($ip, FILTER_VALIDATE_IP) ?: '127.0.0.1';\n }", "title": "" }, { "docid": "c3064fe62f8d79f1e316f7c8232779ad", "score": "0.82537067", "text": "public function getIp(): string\n {\n return $this->getServer(self::REMOTE_ADDR);\n }", "title": "" }, { "docid": "c63ec325a891f81cacd32257af332daa", "score": "0.8086974", "text": "static function getIP()\r\n {\r\n return self::getRemoteIP();\r\n }", "title": "" }, { "docid": "f9be07a61e14252bbaa4b19d479a5b96", "score": "0.8080138", "text": "public function ip()\n {\n $serverAll = parent::server();\n\n // source: https://stackoverflow.com/a/41769505\n foreach (['HTTP_CLIENT_IP',\n 'HTTP_X_FORWARDED_FOR',\n 'HTTP_X_FORWARDED',\n 'HTTP_X_CLUSTER_CLIENT_IP',\n 'HTTP_FORWARDED_FOR',\n 'HTTP_FORWARDED',\n 'REMOTE_ADDR'] as $key) {\n if (array_key_exists($key, $serverAll) === true) {\n foreach (explode(',', $serverAll[$key]) as $ip) {\n $ip = trim($ip); // just to be safe\n if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) !== false) {\n return $ip;\n }\n }\n }\n }\n\n return parent::ip();\n }", "title": "" }, { "docid": "027ca20b2f14d01190446f941450034b", "score": "0.8033232", "text": "private static function getIp()\n {\n if (empty($_SERVER['REMOTE_ADDR']) && (Spry::isCli() || Spry::isCron() || Spry::isBackgroundProcess())) {\n return '127.0.0.1';\n }\n\n return $_SERVER['REMOTE_ADDR'] ?? 'No IP';\n }", "title": "" }, { "docid": "5f9eb52088ea82fa215f57e02f0e9a2c", "score": "0.8029608", "text": "public static function get_ip()\n\t{\n\t\treturn $_SERVER['REMOTE_ADDR'];\n\t}", "title": "" }, { "docid": "cf48bf5b173298598c9660ada6179666", "score": "0.8004465", "text": "public static function ip()\n {\n return @$_SERVER['REMOTE_ADDR'];\n }", "title": "" }, { "docid": "d0bcc509d5bec481373b42f76f41535b", "score": "0.79995245", "text": "public function getIpAddress()\n {\n if (!empty($this->_server['HTTP_X_CLUSTER_CLIENT_IP'])) {\n $ip = $this->_server['HTTP_X_CLUSTER_CLIENT_IP'];\n // default\n } elseif (isset($this->_server['REMOTE_ADDR'])) {\n $ip = $this->_server['REMOTE_ADDR'];\n // dafuq?\n } else {\n $ip = \"127.0.0.1\";\n }\n Logger::debug('Client ip: ' . $ip);\n return $ip;\n }", "title": "" }, { "docid": "4d904a3ce529b6d168caca232e2cae0f", "score": "0.79857314", "text": "static public function getIp() {\n if (isset($_SERVER['REMOTE_ADDR'])) return $_SERVER['REMOTE_ADDR'];\n return '127.0.0.1';\n }", "title": "" }, { "docid": "f534b56a285999d8caedc3d19e7e1b47", "score": "0.7959671", "text": "public static function getIp()\n {\n if (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))\n {\n $sIp = $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n elseif (!empty($_SERVER['HTTP_CLIENT_IP']))\n {\n $sIp = $_SERVER['HTTP_CLIENT_IP'];\n }\n else\n {\n $sIp = $_SERVER['REMOTE_ADDR'];\n }\n\n return preg_match('/^[a-z0-9:.]{7,}$/', $sIp) ? $sIp : '0.0.0.0';\n }", "title": "" }, { "docid": "9fe0ff30df96ecfe14603713ad401031", "score": "0.7950928", "text": "function get_ip() {\n $ip = '127.0.0.1';\n $ipServerVars = array(\n 'REMOTE_ADDR',\n 'HTTP_CLIENT_IP',\n 'HTTP_X_FORWARDED_FOR',\n 'HTTP_X_FORWARDED',\n 'HTTP_FORWARDED_FOR',\n 'HTTP_FORWARDED'\n );\n $globals = & class_loader('GlobalVar', 'classes');\n foreach ($ipServerVars as $var) {\n if ($globals->server($var)) {\n $ip = $globals->server($var);\n break;\n }\n }\n // Strip any secondary IP etc from the IP address\n if (strpos($ip, ',') > 0) {\n $ip = substr($ip, 0, strpos($ip, ','));\n }\n return $ip;\n }", "title": "" }, { "docid": "ef0be71e278a851b3ee8a29d33f4ef06", "score": "0.79464537", "text": "public function ip()\n {\n return $_SERVER[\"REMOTE_ADDR\"];\n }", "title": "" }, { "docid": "4cac209d3130878c628cf48c7f875313", "score": "0.79377216", "text": "public static function getIp()\n {/*{{{*/\n return isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '';\n }", "title": "" }, { "docid": "e688f9044f1020580bc3d9dd725139ce", "score": "0.79375094", "text": "public function getIp() {\n\t\treturn $_SERVER['REMOTE_ADDR'];\t\n\t}", "title": "" }, { "docid": "2da542cb305113b030522582d8b7143f", "score": "0.79055077", "text": "function ip()\n {\n return util::ip();\n }", "title": "" }, { "docid": "c4c4a433464aa41aaf1c52683190a5b1", "score": "0.78879017", "text": "static function IP ()\n\t\t{\n\t\t\tif (php_sapi_name() === \"cli\")\n\t\t\t\treturn '127.0.0.1';\n\t\t\treturn isset ($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : NULL;\n\t\t}", "title": "" }, { "docid": "52d7abf52b97327de3b8dd6e4bf69741", "score": "0.78780603", "text": "public function getIP()\n\t{\n\t\treturn $this->remote_ip;\n\t}", "title": "" }, { "docid": "c1f17bad06e7e32e2b7bc2604bf152b8", "score": "0.78680205", "text": "public static function getIp()\n {\n foreach (array(\n 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED',\n 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR'\n ) as $key) {\n if (array_key_exists($key, $_SERVER) === true) {\n foreach (explode(',', $_SERVER[$key]) as $ip) {\n $ip = trim($ip); // just to be safe\n if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) !== false) {\n return $ip;\n }\n }\n }\n }\n }", "title": "" }, { "docid": "7aefec28cca7732ed39743cc40d0f057", "score": "0.7822411", "text": "function getIP() {\n return gethostbyname($this->host);\n }", "title": "" }, { "docid": "515306c9a8b3145637eb59b242b2f6c5", "score": "0.78120846", "text": "public function ip()\n {\n return $this->ip;\n }", "title": "" }, { "docid": "be681936d8bdef2a795a75501ee96ace", "score": "0.78035015", "text": "public function getIPAddress()\n {\n return isset($this->I_p_address) ? $this->I_p_address : '';\n }", "title": "" }, { "docid": "8a6b1858890de7945732543b874ec674", "score": "0.7802646", "text": "public function ip()\n {\n return $this->getClientIp();\n }", "title": "" }, { "docid": "eb814f15cb3b6271640259ef4f1aa174", "score": "0.78004605", "text": "public function getIp()\n {\n return $this->get(self::IP);\n }", "title": "" }, { "docid": "eb814f15cb3b6271640259ef4f1aa174", "score": "0.78004605", "text": "public function getIp()\n {\n return $this->get(self::IP);\n }", "title": "" }, { "docid": "06c0f3b797653530d20236b9ab63607c", "score": "0.7794659", "text": "public function getIp() {\n $ip = '';\n if (array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER)) {\n $matches = explode(', ', $_SERVER['HTTP_X_FORWARDED_FOR']);\n if (array_key_exists(0, $matches)) {\n $ip = (filter_var(end($matches), FILTER_VALIDATE_IP));\n }\n } else if (array_key_exists(\"REMOTE_ADDR\", $_SERVER)) {\n $ip = $_SERVER[\"REMOTE_ADDR\"];\n }\n\n return $ip;\n }", "title": "" }, { "docid": "357ce21593ab9e082a71c1f907ef72ba", "score": "0.7776309", "text": "protected function get_ip() {\n\t\tif (empty($_SERVER['REMOTE_ADDR'])) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn $this->normalize_ip($_SERVER['REMOTE_ADDR']);\n\t}", "title": "" }, { "docid": "7c7276f845776161f1ca5f27fca8ae54", "score": "0.7773118", "text": "public function ip()\n {\n if ($ip = $this->headers->first('X-Forwarded-For')) {\n return $ip;\n } else {\n return $this->serverParams['remote_addr'] ?? null;\n }\n }", "title": "" }, { "docid": "674c6ce749f2ed4adacb4a075592d1ee", "score": "0.77720183", "text": "function get_server_ip()\n{\n if (!empty($_SERVER['SERVER_ADDR'])) {\n $ip = $_SERVER['SERVER_ADDR'];\n } elseif (!empty($_SERVER['SERVER_NAME'])) {\n $ip = gethostbyname($_SERVER['SERVER_NAME']);\n } else {\n // for php-cli(phpunit etc.)\n $ip = defined('PHPUNIT_RUNNING') ? '127.0.0.1' : gethostbyname(gethostname());\n }\n return filter_var($ip, FILTER_VALIDATE_IP) ?: '127.0.0.1';\n}", "title": "" }, { "docid": "45e73e02b6c4fe1139de90bb7f77a39a", "score": "0.7768477", "text": "public static function client_ip() { return self::$client_ip; }", "title": "" }, { "docid": "ac5fb50c1c641bc50cc88582fd109fd7", "score": "0.7767373", "text": "public function ip()\n\t{\n\t\treturn $this->Players->ip($this->SqueezePlyrID);\n\t}", "title": "" }, { "docid": "9a40e3da976adb492f37aaa387753581", "score": "0.77476203", "text": "private function _getIPAddress()\n {\n $client = @$_SERVER['HTTP_CLIENT_IP'];\n $forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];\n $remote = $_SERVER['REMOTE_ADDR'];\n if (filter_var($client, FILTER_VALIDATE_IP)) {\n $ip = $client;\n } elseif (filter_var($forward, FILTER_VALIDATE_IP)) {\n $ip = $forward; \n } else {\n $ip = $remote;\n }\n return $ip;\n }", "title": "" }, { "docid": "c7eb934f8b97a8ea6724506c05728a4e", "score": "0.7741395", "text": "function get_server_ip()\n{\n // for php-cli(phpunit etc.)\n if (empty($_SERVER['SERVER_ADDR'])) {\n return gethostbyname(gethostname());\n }\n\n return $_SERVER['SERVER_ADDR'];\n}", "title": "" }, { "docid": "26da631e99a321b0fcb09ead442076af", "score": "0.7741359", "text": "public static function get_client_ip()\r\n\t{\r\n\t\treturn $_SERVER['HTTP_CLIENT_IP'];\r\n\t}", "title": "" }, { "docid": "c1951519d86599c82d1cb02fda1acce7", "score": "0.77354354", "text": "public static function getClientIPAddress(){\n\t\treturn Customweb_Core_Http_ContextRequest::getClientIPAddress();\n\t}", "title": "" }, { "docid": "8ee32538162bfc77893dccad8270716f", "score": "0.77348447", "text": "public static function getClientIP()\n {\n return SLog::getInstance()->clientIP;\n }", "title": "" }, { "docid": "91af8e0e0a7da0651e352123171d1d71", "score": "0.7730125", "text": "public static function get_remote_ip()\r\n\t{\r\n\t\treturn $_SERVER['REMOTE_ADDR'];\r\n\t}", "title": "" }, { "docid": "1008ae6cae853ef1b2dd7dbcec71dfa2", "score": "0.77159345", "text": "public static function get_ip()\n {\n $ip = \"\";\n if ($_SERVER) {\n if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } elseif (isset($_SERVER['HTTP_CLIENT_IP'])) {\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n } else {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n } else {\n if (getenv('HTTP_X_FORWARDED_FOR')) {\n $ip = getenv('HTTP_X_FORWARDED_FOR');\n } elseif (getenv('HTTP_CLIENT_IP')) {\n $ip = getenv('HTTP_CLIENT_IP');\n } else {\n $ip = getenv('REMOTE_ADDR');\n }\n }\n return $ip;\n }", "title": "" }, { "docid": "fdbbef4ceeb5562bb740f03821b313d9", "score": "0.77147216", "text": "function getIPAddress()\n\t{\n\t\t// Server variable containing the IP address will change depending on whether the user is using a proxy or not\n\t\tif (!empty($_SERVER['HTTP_CLIENT_IP']))\n\t\t{\n\t\t\treturn $_SERVER['HTTP_CLIENT_IP'];\n\t\t}\n\t\telseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))\n\t\t{\n\t\t\treturn $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $_SERVER['REMOTE_ADDR'];\n\t\t}\n\t}", "title": "" }, { "docid": "5ef8cc2229051cd0a785cfe70aa37dc7", "score": "0.7709903", "text": "function get_client_ip_server() {\n\t\t $ipaddress = '';\n\t\t\ttry {\n\t\t\t\tif ($_SERVER['HTTP_HOST'])\n\t\t\t $ipaddress = $_SERVER['HTTP_HOST'];\n\t\t\t elseif ($_SERVER['HTTP_CLIENT_IP'])\n\t\t\t $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n\t\t\t elseif($_SERVER['HTTP_X_FORWARDED_FOR'])\n\t\t\t $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t\t elseif($_SERVER['HTTP_X_FORWARDED'])\n\t\t\t $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n\t\t\t elseif($_SERVER['HTTP_FORWARDED_FOR'])\n\t\t\t $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n\t\t\t elseif($_SERVER['HTTP_FORWARDED'])\n\t\t\t $ipaddress = $_SERVER['HTTP_FORWARDED'];\n\t\t\t elseif($_SERVER['REMOTE_ADDR'])\n\t\t\t $ipaddress = $_SERVER['REMOTE_ADDR'];\n\t\t\t} catch (Exception $e) {\n\t\t $ipaddress = 'UNKNOWN';\n\t\t\t}\n\t\t \n\t\t return $ipaddress;\n\t\t}", "title": "" }, { "docid": "2a8077371bd515870927b127bbe4f8ad", "score": "0.7708882", "text": "public function getIp(): string\n {\n return $this->ip;\n }", "title": "" }, { "docid": "2a8077371bd515870927b127bbe4f8ad", "score": "0.7708882", "text": "public function getIp(): string\n {\n return $this->ip;\n }", "title": "" }, { "docid": "a55048c55c1aad4fd1d89d5ae7dfbc43", "score": "0.7708467", "text": "final protected function ipAddress()\n {\n return $this->container->make('request')->ip();\n }", "title": "" }, { "docid": "b95e497b07f500ba5b9d686a1e2977fd", "score": "0.7703429", "text": "public function getIpAddress()\n {\n return $this->ipAddress;\n }", "title": "" }, { "docid": "0df7d1f3cd7e3ce10e1f13dbc130a6ea", "score": "0.76992005", "text": "public function getIp()\n {\n return $this->ip;\n }", "title": "" }, { "docid": "0df7d1f3cd7e3ce10e1f13dbc130a6ea", "score": "0.76992005", "text": "public function getIp()\n {\n return $this->ip;\n }", "title": "" }, { "docid": "0df7d1f3cd7e3ce10e1f13dbc130a6ea", "score": "0.76992005", "text": "public function getIp()\n {\n return $this->ip;\n }", "title": "" }, { "docid": "0df7d1f3cd7e3ce10e1f13dbc130a6ea", "score": "0.76992005", "text": "public function getIp()\n {\n return $this->ip;\n }", "title": "" }, { "docid": "0df7d1f3cd7e3ce10e1f13dbc130a6ea", "score": "0.76992005", "text": "public function getIp()\n {\n return $this->ip;\n }", "title": "" }, { "docid": "0df7d1f3cd7e3ce10e1f13dbc130a6ea", "score": "0.76992005", "text": "public function getIp()\n {\n return $this->ip;\n }", "title": "" }, { "docid": "0df7d1f3cd7e3ce10e1f13dbc130a6ea", "score": "0.76992005", "text": "public function getIp()\n {\n return $this->ip;\n }", "title": "" }, { "docid": "0df7d1f3cd7e3ce10e1f13dbc130a6ea", "score": "0.76992005", "text": "public function getIp()\n {\n return $this->ip;\n }", "title": "" }, { "docid": "0df7d1f3cd7e3ce10e1f13dbc130a6ea", "score": "0.76992005", "text": "public function getIp()\n {\n return $this->ip;\n }", "title": "" }, { "docid": "0df7d1f3cd7e3ce10e1f13dbc130a6ea", "score": "0.76992005", "text": "public function getIp()\n {\n return $this->ip;\n }", "title": "" }, { "docid": "c581378bd782369a7af588a30e597290", "score": "0.76949596", "text": "public function ip() {\n $ipaddress = 'Unknown';\n if (getenv('HTTP_CLIENT_IP'))\n $ipaddress = getenv('HTTP_CLIENT_IP');\n else if(getenv('HTTP_X_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if(getenv('HTTP_X_FORWARDED'))\n $ipaddress = getenv('HTTP_X_FORWARDED');\n else if(getenv('HTTP_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if(getenv('HTTP_FORWARDED'))\n $ipaddress = getenv('HTTP_FORWARDED');\n else if(getenv('REMOTE_ADDR'))\n $ipaddress = getenv('REMOTE_ADDR');\n return $ipaddress;\n }", "title": "" }, { "docid": "980a7902684e56bdc6b8be36341f3109", "score": "0.7686421", "text": "public static function getIp()\n {\n if (!empty( $_SERVER['HTTP_CLIENT_IP'])) {\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n } elseif (!empty( $_SERVER['HTTP_X_FORWARDED_FOR'])) {\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } else {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n return $ip;\n }", "title": "" }, { "docid": "29a593a797b5f17dc65fa133a19363f8", "score": "0.76844233", "text": "private function get_ip(){\n $ip = '';\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) {\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } else {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n return $ip;\n }", "title": "" }, { "docid": "aa506811a7a84f05e49f66a98cd7b5b2", "score": "0.7682608", "text": "public function getIp() : string ;", "title": "" }, { "docid": "c65ce7e07d7e10a0b4c47638986574fd", "score": "0.767314", "text": "public static function getIpAddress() {\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) //check ip from share internet\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n else if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) //to check ip is pass from proxy\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else\n $ip = $_SERVER['REMOTE_ADDR'];\n\n return $ip;\n }", "title": "" }, { "docid": "27cd2b73ceca56cfc5aaaa5307625221", "score": "0.7667012", "text": "public function getIp() : string {\n return $this->ip;\n }", "title": "" }, { "docid": "ce70a1766fcdd2b91e5ca4d5cc53dba0", "score": "0.76634413", "text": "public function getIP()\r\n\t{\r\n\t\tif (getenv('HTTP_CLIENT_IP')) {\r\n\t\t\t\t$ip = getenv('HTTP_CLIENT_IP');\r\n\t\t\t}\r\n\t\t\telseif (getenv('HTTP_X_FORWARDED_FOR')) {\r\n\t\t\t\t$ip = getenv('HTTP_X_FORWARDED_FOR');\r\n\t\t\t}\r\n\t\t\telseif (getenv('HTTP_X_FORWARDED')) {\r\n\t\t\t\t$ip = getenv('HTTP_X_FORWARDED');\r\n\t\t\t}\r\n\t\t\telseif (getenv('HTTP_FORWARDED_FOR')) {\r\n\t\t\t\t$ip = getenv('HTTP_FORWARDED_FOR');\r\n\t\t\t}\r\n\t\t\telseif (getenv('HTTP_FORWARDED')) {\r\n\t\t\t\t$ip = getenv('HTTP_FORWARDED');\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$ip = $_SERVER['REMOTE_ADDR'];\r\n\t\t\t}\r\n\t\t\treturn $ip;\r\n\t}", "title": "" }, { "docid": "67275ccc99aceaac3edf65f4100aca80", "score": "0.76608646", "text": "public function getClientIp()\n {\n return $_SERVER['REMOTE_ADDR'];\n }", "title": "" }, { "docid": "987e5f1162c554d6da0b803a354d93ab", "score": "0.765177", "text": "public function getIp()\n\t{\n\t\treturn $this->ip;\n\t}", "title": "" }, { "docid": "b33ed95585def066c463648ef3a940d0", "score": "0.7628702", "text": "public function getIp(){\n\t\treturn getenv('REMOTE_ADDR');\n\t}", "title": "" }, { "docid": "e1663d00f46736959ecb44aa683c9557", "score": "0.76237595", "text": "public function getIP(): string;", "title": "" }, { "docid": "0e7c27b0e04bdd3ca370ae4ff2ce29d0", "score": "0.76228964", "text": "public function get_ip() {\n\t\tif ( ! empty( $_SERVER['HTTP_CLIENT_IP'] ) ) {\n\t\t\t//check ip from share internet\n\t\t\t$ip = $_SERVER['HTTP_CLIENT_IP'];\n\t\t} elseif ( ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {\n\t\t\t//to check ip is pass from proxy\n\t\t\t$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t} else {\n\t\t\t$ip = $_SERVER['REMOTE_ADDR'];\n\t\t}\n\n\t\treturn $ip;\n\t}", "title": "" }, { "docid": "c4590dedf76f4546dd7437b2e5a0a8e2", "score": "0.76211005", "text": "public static function get_ip_address() {\n\t\tforeach (\n\t\t\tarray(\n\t\t\t\t'HTTP_CLIENT_IP',\n\t\t\t\t'HTTP_X_FORWARDED_FOR',\n\t\t\t\t'HTTP_X_FORWARDED',\n\t\t\t\t'HTTP_X_CLUSTER_CLIENT_IP',\n\t\t\t\t'HTTP_FORWARDED_FOR',\n\t\t\t\t'HTTP_FORWARDED',\n\t\t\t\t'REMOTE_ADDR'\n\t\t\t) as $key\n\t\t) {\n\n\t\t\tif ( array_key_exists( $key, $_SERVER ) === true ) {\n\t\t\t\tforeach ( explode( ',', $_SERVER[ $key ] ) as $ip ) {\n\t\t\t\t\t$ip = trim( $ip ); // just to be safe\n\t\t\t\t\tif ( filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE ) !== false ) {\n\t\t\t\t\t\treturn $ip;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Return localhost.\n\t\treturn '::1';\n\t}", "title": "" }, { "docid": "7fbf9f2936ae9a3632a58fbccf8d96f6", "score": "0.7619481", "text": "public static function getIP() : string {\n\n\t\t\tif (!empty($_SERVER['HTTP_CLIENT_IP'])) return $_SERVER['HTTP_CLIENT_IP'];\n\n\t\t\tif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) return $_SERVER['HTTP_X_FORWARDED_FOR'];\n\n\t\t\tif (!empty($_SERVER['HTTP_X_FORWARDED'])) return $_SERVER['HTTP_X_FORWARDED'];\n\n\t\t\tif (!empty($_SERVER['HTTP_FORWARDED_FOR'])) return $_SERVER['HTTP_FORWARDED_FOR'];\n\n\t\t\tif (!empty($_SERVER['HTTP_FORWARDED'])) return $_SERVER['HTTP_FORWARDED'];\n\n\t\t\tif (!empty($_SERVER['REMOTE_ADDR'])) return $_SERVER['REMOTE_ADDR'];\n\n\t\t\t# ------------------------\n\n\t\t\treturn 'unknown';\n\t\t}", "title": "" }, { "docid": "2260d70294062f529da38f157c415428", "score": "0.7618554", "text": "public static function clientIP() {\n\t\tforeach (\n\t\t\tarray(\n\t\t\t\t'HTTP_CF_CONNECTING_IP',\n\t\t\t\t'HTTP_CLIENT_IP',\n\t\t\t\t'HTTP_X_FORWARDED_FOR',\n\t\t\t\t'HTTP_X_FORWARDED',\n\t\t\t\t'HTTP_X_CLUSTER_CLIENT_IP',\n\t\t\t\t'HTTP_FORWARDED_FOR',\n\t\t\t\t'HTTP_FORWARDED',\n\t\t\t\t'REMOTE_ADDR'\n\t\t\t) as $key) {\n\t\t\tif (array_key_exists($key, $_SERVER) === true) {\n\t\t\t\tforeach (explode(',', $_SERVER[$key]) as $ip) {\n\t\t\t\t\tif ($ip == \"::1\") return \"127.0.0.1\";\n\t\t\t\t\treturn $ip;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn \"0.0.0.0\";\n\t}", "title": "" }, { "docid": "b83293d69dba89274d7582e8afeab8d1", "score": "0.75922763", "text": "public static function ip() {\n $ip = '';\n if (getenv('HTTP_CLIENT_IP'))\n $ip = getenv('HTTP_CLIENT_IP');\n else if(getenv('HTTP_X_FORWARDED_FOR'))\n $ip = getenv('HTTP_X_FORWARDED_FOR');\n else if(getenv('HTTP_X_FORWARDED'))\n $ip = getenv('HTTP_X_FORWARDED');\n else if(getenv('HTTP_FORWARDED_FOR'))\n $ip = getenv('HTTP_FORWARDED_FOR');\n else if(getenv('HTTP_FORWARDED'))\n $ip = getenv('HTTP_FORWARDED');\n else if(getenv('REMOTE_ADDR'))\n $ip = getenv('REMOTE_ADDR');\n else\n $ip = 'unknown';\n\n return $ip;\n }", "title": "" }, { "docid": "16e63ab8f9858e745291dc89a49507dd", "score": "0.7588787", "text": "public function getIP()\n\t{\t \n\t \treturn $this->IP;\n\t}", "title": "" }, { "docid": "ef40ec39f9a37e23b108ee40375b428b", "score": "0.75877243", "text": "static function getIp()\n {\n $ip = $_SERVER['REMOTE_ADDR'];\n\n if (!empty($_SERVER['HTTP_CLIENT_IP']))\n {\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n }\n elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))\n {\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n\n return $ip;\n }", "title": "" }, { "docid": "6b2964ab7f941b2b550c6ac610d7f460", "score": "0.7580908", "text": "public function get_ip_address()\n {\n $ip_keys = array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR');\n foreach ($ip_keys as $key)\n {\n if (array_key_exists($key, $_SERVER) === true)\n {\n foreach (explode(',', $_SERVER[$key]) as $ip)\n {\n // trim for safety measures\n $ip = $this->trimIP($ip);\n // attempt to validate IP\n if ($this->validate_ip($ip))\n {\n return $ip;\n }\n }\n }\n }\n return isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : false;\n }", "title": "" }, { "docid": "02bff88b8879f452c6682a592811ee13", "score": "0.7580293", "text": "public function getIpAddress();", "title": "" }, { "docid": "442b554048ce4e8e13819c458a5a4395", "score": "0.75750864", "text": "public function get_ip()\n {\n return $this->get_default_property(self::PROPERTY_IP);\n }", "title": "" }, { "docid": "53e3063c336344a7e7c94947de2b2d20", "score": "0.75696903", "text": "public function getClientIP()\n {\n $ip=$_SERVER['REMOTE_ADDR'];\n return $ip;\n }", "title": "" }, { "docid": "d515584019a500c8f3929fc6812f1bfe", "score": "0.7569166", "text": "public function getRemoteIp()\n {\n return $_SERVER['REMOTE_ADDR'];\n }", "title": "" }, { "docid": "735373bd217d39b3b69a90acd15d7f1b", "score": "0.7567195", "text": "public function getIP(){\n $ip = '';\n foreach(['HTTP_CLIENT_IP','HTTP_X_FORWARDED_FOR','HTTP_X_FORWARDED','HTTP_FORWARDED_FOR','HTTP_FORWARDED','REMOTE_ADDR'] as $search){\n if(getenv($search)){\n $ip = getenv($search);\n break;\n }\n }\n\n return $this->installIP($ip);\n }", "title": "" }, { "docid": "0e5d9e92e79b963562f0ef980dadf18f", "score": "0.75665843", "text": "public function get_ip_address() {\n if (!empty($_SERVER['HTTP_CLIENT_IP']) ) {\n return $_SERVER['HTTP_CLIENT_IP'];\n }\n\n // check for IPs passing through proxies\n if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n // check if multiple ips exist in var\n if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',') !== false) {\n $iplist = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);\n foreach ($iplist as $ip) {\n //if (validate_ip($ip))\n return $ip;\n }\n } else {\n //if (validate_ip($_SERVER['HTTP_X_FORWARDED_FOR']))\n return $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n }\n if (!empty($_SERVER['HTTP_X_FORWARDED']) )\n return $_SERVER['HTTP_X_FORWARDED'];\n if (!empty($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) )\n return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];\n if (!empty($_SERVER['HTTP_FORWARDED_FOR']) )\n return $_SERVER['HTTP_FORWARDED_FOR'];\n if (!empty($_SERVER['HTTP_FORWARDED']) )\n return $_SERVER['HTTP_FORWARDED'];\n\n // return unreliable ip since all else failed\n return $_SERVER['REMOTE_ADDR'];\n }", "title": "" }, { "docid": "12fb76dd4a69f9ca410597c9429a1fd8", "score": "0.75631666", "text": "public static function getIP() {\n if ($ip = getenv('HTTP_CLIENT_IP')) {}\n else if ($ip = getenv('HTTP_X_FORWARDED_FOR')) {}\n else if ($ip = getenv('HTTP_X_FORWARDED')) {}\n else if ($ip = getenv('HTTP_FORWARDED_FOR')) {}\n else if ($ip = getenv('HTTP_FORWARDED')) {}\n else if ($ip = getenv('HTTP_REMOTE_ADDR')) {}\n else {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n\n return $ip;\n }", "title": "" }, { "docid": "bd75177942d52bc941ceaf3439708fa3", "score": "0.755284", "text": "public static function ip()\n {\n $ip = 'UNKNOWN';\n\n if (getenv('HTTP_CLIENT_IP')) {\n $ip = getenv('HTTP_CLIENT_IP');\n } elseif (getenv('HTTP_CF_CONNECTING_IP')) {\n $ip = getenv('HTTP_CF_CONNECTING_IP');\n } elseif (getenv('HTTP_X_FORWARDED_FOR') && Grav::instance()['config']->get('system.http_x_forwarded.ip')) {\n $ips = array_map('trim', explode(',', getenv('HTTP_X_FORWARDED_FOR')));\n $ip = array_shift($ips);\n } elseif (getenv('HTTP_X_FORWARDED') && Grav::instance()['config']->get('system.http_x_forwarded.ip')) {\n $ip = getenv('HTTP_X_FORWARDED');\n } elseif (getenv('HTTP_FORWARDED_FOR')) {\n $ip = getenv('HTTP_FORWARDED_FOR');\n } elseif (getenv('HTTP_FORWARDED')) {\n $ip = getenv('HTTP_FORWARDED');\n } elseif (getenv('REMOTE_ADDR')) {\n $ip = getenv('REMOTE_ADDR');\n }\n\n return $ip;\n }", "title": "" }, { "docid": "973832974bd60a11d95dbaeec1fcac8c", "score": "0.75497866", "text": "function ip(){\n\t\treturn $_SERVER['REMOTE_ADDR'];\n\t}", "title": "" }, { "docid": "475b9fecbdeae106c8b0eb5027dae5cc", "score": "0.7546514", "text": "public function ip_address()\n\t{\n\t\tif ($this->ip_address !== NULL)\n\t\t{\n\t\t\treturn $this->ip_address;\n\t\t}\n\n\t\t// Server keys that could contain the client IP address\n\t\t$keys = array('HTTP_X_FORWARDED_FOR', 'HTTP_CLIENT_IP', 'REMOTE_ADDR');\n\n\t\tforeach ($keys as $key)\n\t\t{\n\t\t\tif ($ip = $this->server($key))\n\t\t\t{\n\t\t\t\t$this->ip_address = $ip;\n\n\t\t\t\t// An IP address has been found\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif ($comma = strrpos($this->ip_address, ',') !== FALSE)\n\t\t{\n\t\t\t$this->ip_address = substr($this->ip_address, strrpos($this->ip_address, ',') + 1);\n\t\t}\n\n\t\tif ( ! $this->valid_ip($this->ip_address))\n\t\t{\n\t\t\t// Use an empty IP\n\t\t\t$this->ip_address = '0.0.0.0';\n\t\t}\n\n\t\treturn $this->ip_address;\n\t}", "title": "" }, { "docid": "41735ec7a3185ec19638f0234d1fa22f", "score": "0.75441164", "text": "public function showIP() {\n\t if (array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER) && ! empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n\t if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',') > 0) {\n\t $addr = explode(\",\",$_SERVER['HTTP_X_FORWARDED_FOR']);\n\t return trim($addr[0]);\n\t } else {\n\t return $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t }\n\t } else {\n\t return $_SERVER['REMOTE_ADDR'];\n\t }\n\t }", "title": "" }, { "docid": "3dd03305a7f8be906d7919130896b877", "score": "0.7539709", "text": "public function getIp(){\n if(function_exists('apache_request_headers'))\n $headers = apache_request_headers();\n else\n $headers = $_SERVER;\n if(array_key_exists('X-Forwarded-For', $headers) && filter_var($headers['X-Forwarded-For'], FILTER_VALIDATE_IP))\n $the_ip = $headers['X-Forwarded-For'];\n elseif(array_key_exists('HTTP_X_FORWARDED_FOR', $headers) && filter_var($headers['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP))\n $the_ip = $headers['HTTP_X_FORWARDED_FOR'];\n else\n $the_ip = filter_var($_SERVER['REMOTE_ADDR'], FILTER_VALIDATE_IP);\n return $the_ip;\n }", "title": "" }, { "docid": "77ec8039686e20062f9b14dd5fe0b607", "score": "0.7536226", "text": "public function getClientIp(): string {\n $s = $this->server();\n if (array_key_exists('HTTP_CLIENTIP', $s)) {\n if (!empty($s['HTTP_CLIENTIP'])) {\n return $s['HTTP_CLIENTIP'];\n }\n }\n if (array_key_exists('HTTP_X_FORWARDED_FOR', $s) && !empty($s['HTTP_X_FORWARDED_FOR'])) {\n $addresses = explode(',', $s['HTTP_X_FORWARDED_FOR']);\n while (count($addresses)) {\n $ip = @trim(array_shift($addresses));\n if ($ip === '') {\n continue;\n }\n if (!self::isLanIp($ip)) {\n return $ip;\n }\n }\n }\n return $s['REMOTE_ADDR'];\n }", "title": "" }, { "docid": "5cb0746e60a65a12a8a928fc975d92a8", "score": "0.75318384", "text": "function get_client_ip_server() {\n $ipaddress = '';\n if ($_SERVER['HTTP_CLIENT_IP'])\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if($_SERVER['HTTP_X_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if($_SERVER['HTTP_X_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if($_SERVER['HTTP_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if($_SERVER['HTTP_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n else if($_SERVER['REMOTE_ADDR'])\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n else\n $ipaddress = 'UNKNOWN';\n\n return $ipaddress;\n}", "title": "" }, { "docid": "a2dafe39b728823b846f3d3e5b912d36", "score": "0.752944", "text": "public static function getIp()\n {\n if (isset($_SERVER[\"HTTP_CF_CONNECTING_IP\"])) {\n $_SERVER['REMOTE_ADDR'] = $_SERVER[\"HTTP_CF_CONNECTING_IP\"];\n $_SERVER['HTTP_CLIENT_IP'] = $_SERVER[\"HTTP_CF_CONNECTING_IP\"];\n }\n $client = @$_SERVER['HTTP_CLIENT_IP'];\n $forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];\n $remote = @$_SERVER['REMOTE_ADDR'];\n\n if (filter_var($client, FILTER_VALIDATE_IP)) {\n $ip = $client;\n } elseif (filter_var($forward, FILTER_VALIDATE_IP)) {\n $ip = $forward;\n } else {\n $ip = $remote;\n }\n\n return $ip;\n }", "title": "" }, { "docid": "06f9678438a8b699dbfeb861d766ec14", "score": "0.75291747", "text": "public static function getIpAddress()\n\t{\n\t\t// pre check\n\t\tif(!isset($_SERVER['REMOTE_ADDR'])) return null;\n\n\t\t// get ip\n\t\t$ipAddress = $_SERVER['REMOTE_ADDR'];\n\n\t\tif(self::$reverseProxy)\n\t\t{\n\t\t\tif(isset($_SERVER['HTTP_X_FORWARDED_FOR']))\n\t\t\t{\n\t\t\t\tif(!empty(self::$allowedReverseProxyAddresses) && in_array($ipAddress, self::$allowedProxyAddresses, true))\n\t\t\t\t{\n\t\t\t\t\treturn array_pop(explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']));\n\t\t\t\t}\n \t\t\t}\n\n \t\t\t// running in a cluster environment\n\t\t\tif(isset($_SERVER['HTTP_X_CLUSTER_CLIENT_IP'])) return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];\n\t\t}\n\n\t\t// fallback\n\t\treturn $ipAddress;\n\t}", "title": "" }, { "docid": "a711b038ef72b71d12d1ce4ad74362a9", "score": "0.75278026", "text": "public function getIPAddress(): string;", "title": "" }, { "docid": "58314c91b9a32fd1146f09ee37bfe4e1", "score": "0.75234795", "text": "protected function get_ip() {\n\t\t\t//Just get the headers if we can or else use the SERVER global\n\t\t\tif (function_exists('apache_request_headers')) {\n\t\t\t\t$headers = apache_request_headers();\n\t\t\t} else {\n\t\t\t\t$headers = $_SERVER;\n\t\t\t\t\n\t\t\t}\n\n\t\t\t//Get the forwarded IP if it exists\n\t\t\tif (array_key_exists('X-Forwarded-For',$headers) && filter_var($headers['X-Forwarded-For'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) ) {\n\t\t\t\t$the_ip = $headers['X-Forwarded-For'];\n\t\t\t} elseif ( array_key_exists('HTTP_X_FORWARDED_FOR', $headers) && filter_var( $headers['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {\n\t\t\t\t$the_ip = $headers['HTTP_X_FORWARDED_FOR'];\n\t\t\t} else {\n if($_SERVER['REMOTE_ADDR'] == \"::1\") {\n $the_ip = '127.0.0.1';\n } else {\n $the_ip = filter_var( $_SERVER['REMOTE_ADDR'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 );\n //$the_ip = $_SERVER['REMOTE_ADDR'];\n }\n\t\t\t}\n\t\t\t\n\t\t\treturn $the_ip;\n\t\t}", "title": "" }, { "docid": "08dc0a7d5df6a7f8001253bb618c12e8", "score": "0.7507373", "text": "public static function ip()\n\t{\n\t\treturn static::onTrustedRequest(function () {\n\t\t\treturn filter_var(request()->header('CF_CONNECTING_IP'), FILTER_VALIDATE_IP);\n\t\t}) ?: request()->ip();\n\t}", "title": "" }, { "docid": "582076499a47861ace877aac7c114069", "score": "0.7506512", "text": "static function getClientIP() {\n if ($_SERVER['HTTP_CLIENT_IP'])\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if($_SERVER['HTTP_X_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if($_SERVER['HTTP_X_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if($_SERVER['HTTP_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if($_SERVER['HTTP_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n else if($_SERVER['REMOTE_ADDR'])\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n else\n $ipaddress = 'UNKNOWN';\n\n return $ipaddress;\n }", "title": "" }, { "docid": "ee6c1e23575b9b6cf7955aa26d1fdcc4", "score": "0.7502729", "text": "public function getIP()\n {\n return isset($this->IP) ? $this->IP : null;\n }", "title": "" }, { "docid": "1084f50257d11f726bf643624ed37ec5", "score": "0.7502395", "text": "public function getIp(){\n\t\treturn $this->ip;\n\t}", "title": "" }, { "docid": "b279c7695b175170a0775b14c801267b", "score": "0.749731", "text": "function get_client_ip_server() {\n $ipaddress = '';\n if ($_SERVER['HTTP_CLIENT_IP'])\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if($_SERVER['HTTP_X_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if($_SERVER['HTTP_X_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if($_SERVER['HTTP_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if($_SERVER['HTTP_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n else if($_SERVER['REMOTE_ADDR'])\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n else\n $ipaddress = 'UNKNOWN';\n \n return $ipaddress;\n}", "title": "" }, { "docid": "b279c7695b175170a0775b14c801267b", "score": "0.749731", "text": "function get_client_ip_server() {\n $ipaddress = '';\n if ($_SERVER['HTTP_CLIENT_IP'])\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if($_SERVER['HTTP_X_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if($_SERVER['HTTP_X_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if($_SERVER['HTTP_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if($_SERVER['HTTP_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n else if($_SERVER['REMOTE_ADDR'])\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n else\n $ipaddress = 'UNKNOWN';\n \n return $ipaddress;\n}", "title": "" }, { "docid": "b279c7695b175170a0775b14c801267b", "score": "0.749731", "text": "function get_client_ip_server() {\n $ipaddress = '';\n if ($_SERVER['HTTP_CLIENT_IP'])\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if($_SERVER['HTTP_X_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if($_SERVER['HTTP_X_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if($_SERVER['HTTP_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if($_SERVER['HTTP_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n else if($_SERVER['REMOTE_ADDR'])\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n else\n $ipaddress = 'UNKNOWN';\n \n return $ipaddress;\n}", "title": "" }, { "docid": "cf2009bb9cc24fed0e9fecfd6eb9f5e9", "score": "0.7495183", "text": "protected function get_ip() : string\n\t{\n\t\treturn ci('input')->ip_address();\n\t}", "title": "" } ]
e312714e8859ad59ca20d8fc461c1958
Fungsi untuk insert pengguna
[ { "docid": "631909a0e1e93e830b5412bd16d0cf66", "score": "0.0", "text": "function insert_pengguna()\n{\n global $conn;\n $check = array(\n 'id_user' => '',\n 'username' => '',\n 'password' => '',\n 'email' => '',\n 'nama' => '',\n 'alamat' => '',\n 'gambar' => '');\n $check_match = count(array_intersect_key($_POST, $check));\n $id_user = $_POST[\"id_user\"];\n $username = $_POST[\"username\"];\n $password = $_POST[\"password\"];\n $email = $_POST[\"email\"];\n $nama = $_POST[\"nama\"];\n $alamat = $_POST[\"alamat\"];\n $gambar = $_POST[\"gambar\"];\n if($check_match == count($check)){\n $result = mysqli_query($conn, \"INSERT INTO pengguna SET\n id_user = '$id_user',\n username = '$username',\n password = '$password',\n email = '$email',\n nama = '$nama',\n alamat = '$alamat',\n gambar = '$gambar'\");\n if($result) {\n $response = array(\n 'status' => 1,\n 'message' =>'Insert user success!'\n );\n }\n else {\n $response = array(\n 'status' => 0,\n 'message' =>'Insert user fail!'\n );\n }\n } else {\n $response = array(\n 'status' => 0,\n 'message' =>'Wrong Parameter');\n }\n header('Content-Type: application/json');\n echo json_encode($response);\n}", "title": "" } ]
[ { "docid": "9bd165899b98b1a5484a77638138859b", "score": "0.8008717", "text": "public function insert(){\n $data = array();\n $data['nm_perusahaan'] = $_POST['perusahaan'];\n\t $data['alamat'] = $_POST['alamat'];\n \n $simpan = $this->perusahaan->insert($data);\n }", "title": "" }, { "docid": "f2bf083181be882d17b041299e693b74", "score": "0.79972935", "text": "public function insert($vinculacion);", "title": "" }, { "docid": "442145845030481b7cf3353987c5ee02", "score": "0.7760049", "text": "public function insert(){}", "title": "" }, { "docid": "bf09bf55bef2b18d1451ee2a99eb27cd", "score": "0.773884", "text": "public function insert($articulo);", "title": "" }, { "docid": "b9ef8371bcfb426ae123243cbf564641", "score": "0.76501817", "text": "public function insert($cajaPagotbank);", "title": "" }, { "docid": "a8d9a3f86375a48e2c96660dce146285", "score": "0.76341724", "text": "public function insert(){\n\n\t}", "title": "" }, { "docid": "43ebe6324db189a626eda0b6cb875fae", "score": "0.7627855", "text": "public function insert();", "title": "" }, { "docid": "cc0c8acd3d8060ec769600b38170b065", "score": "0.7597349", "text": "public function insert(){\n\t}", "title": "" }, { "docid": "c2b86af0d640d91c73a3a868a7e3e618", "score": "0.7559565", "text": "public function insert(){\n $data = array();\n $data['merk'] = $_POST['merk'];\n\t //$data['tgl'] = $_POST['tgl'];\n \n $simpan = $this->merk->insert($data);\n }", "title": "" }, { "docid": "8acfde7b9459b7c6f7b666381ff90aa7", "score": "0.75393176", "text": "public function insert($tblHinhanh);", "title": "" }, { "docid": "45500298c4a21e9518f2f6e29883beba", "score": "0.7513101", "text": "public function insert($pesquisador);", "title": "" }, { "docid": "1cb62eaa0b5f938e1eaf80db3d568397", "score": "0.75128716", "text": "public function insert($tipo_periferico){\r\n $id=$tipo_periferico->getId();\n$nombre=$tipo_periferico->getNombre();\n\r\n try {\r\n $sql= \"INSERT INTO `tipo_periferico`( `id`, `nombre`)\"\r\n .\"VALUES ('$id','$nombre')\";\r\n return $this->insertarConsulta($sql);\r\n } catch (SQLException $e) {\r\n throw new Exception('Primary key is null');\r\n }\r\n }", "title": "" }, { "docid": "60c57ae6d7defa2739af7ccfba74fd24", "score": "0.74878454", "text": "public function k_insert()\n\t{\n\t\t$matakuliah = htmlspecialchars($this->input->post('matakuliah', true));\n\t\t$pengajar\t= htmlspecialchars($this->input->post('pengajar', true));\n\t\t$jurusan\t= htmlspecialchars($this->input->post('jurusan', true));\n\t\t$absen\t\t= htmlspecialchars($this->input->post('absen', true));\n\t\t$date\t\t= htmlspecialchars($this->input->post('date', true));\n\t\t$data = [\n\t\t\t'dosen' \t\t=> $pengajar,\n\t\t\t'matakuliah' \t=> $matakuliah,\n\t\t\t'jurusan' \t\t=> $jurusan,\n\t\t\t'absen' \t\t=> $absen,\n\t\t\t'date' \t\t\t=> $date,\n\t\t];\n\n\t\t$this->db->insert('kelas', $data);\n\t}", "title": "" }, { "docid": "fae22510da811f0eb0016f572b115f9a", "score": "0.74835825", "text": "public function insert($data);", "title": "" }, { "docid": "3925eee839eb21d062b0003ceea61d43", "score": "0.74738336", "text": "function insertanggota($data_insert){\n $this->db->insert('anggota', $data_insert);\n }", "title": "" }, { "docid": "97c5bd57b35844d17e1b93c5668908bf", "score": "0.7470489", "text": "public function insert()\n\t{\n\n\t}", "title": "" }, { "docid": "a27deff6f542b387fa0a7fcce3ec9cd5", "score": "0.74594986", "text": "public function insert()\n {\n \n }", "title": "" }, { "docid": "a27deff6f542b387fa0a7fcce3ec9cd5", "score": "0.74594986", "text": "public function insert()\n {\n \n }", "title": "" }, { "docid": "a27deff6f542b387fa0a7fcce3ec9cd5", "score": "0.74594986", "text": "public function insert()\n {\n \n }", "title": "" }, { "docid": "a27deff6f542b387fa0a7fcce3ec9cd5", "score": "0.74594986", "text": "public function insert()\n {\n \n }", "title": "" }, { "docid": "1af78f2647c0d5a341dbab289fee112b", "score": "0.74589664", "text": "public function insert() {\r\n $this->sql = \"INSERT INTO $this->table ($this->camposBanco) VALUES ($this->dados)\";\r\n if (self::execSql($this->sql)) {\r\n $this->status = \"Cadastrado\";\r\n }\r\n }", "title": "" }, { "docid": "03e3de97a9c232f0535afdfcdfdcec8d", "score": "0.7440976", "text": "public function insert($estado_proyecto);", "title": "" }, { "docid": "0b68d93b67366ccdcd29fd64c9619229", "score": "0.7426745", "text": "public function actionInsert() {\n\t\tif ( isset( $_POST['stuknr'] ) && isset( $_POST['componistId'] ) && isset( $_POST['titel'] ) && isset( $_POST['stuknrOrigineel'] ) && isset( $_POST['genrenaam'] ) && isset( $_POST['niveaucode'] ) && isset( $_POST['speelduur'] ) && isset( $_POST['jaartal'] ) ) {\n\t\t\t$data = $this -> createColumnArray( $_POST );\n\t\t\t$query = \"INSERT INTO `Stuk`\n\t\t\t\t\t (`stuknr`, `componistId`, `titel`, `stuknrOrigineel`, `genrenaam`, `niveaucode`, `speelduur`, `jaartal`) VALUES\n\t\t\t\t\t (:column_stuknr, :column_componistId, :column_titel, :column_stuknrOrigineel, :column_genrenaam, :column_niveaucode, :column_speelduur, :column_jaartal)\";\n\t\t\t$statement = $this -> DB -> query( $query, $data );\n\t\t\tif ( !is_array( $statement ) ) {\n\t\t\t\t$this -> giveJSONmessage( true, 'Record is inserted.' );\n\t\t\t} else {\n\t\t\t\t$this -> giveJSONmessage( false, $statement[2] );\n\t\t\t}\n\t\t} else {\n\t\t\t$this -> giveJSONmessage( false, 'Parameters are incorrect.' );\n\t\t}\n\t\t$this -> loadView( 'json' );\n\t}", "title": "" }, { "docid": "89cf51c18aa16d808ccc545d544497e7", "score": "0.74029076", "text": "public function insert()\n {\n $data = array(\n 'descricao' => $this->descricao,\n 'valor' => $this->valor,\n 'espaco' => $this->espaco,\n 'nome' => $this->nome\n );\n\n $this->db->insert('planos', $data);\n }", "title": "" }, { "docid": "d93547ec054a74bda7349b8a7fcf7ae1", "score": "0.7393828", "text": "public function insert(){\n\t\t$db = Connect::getInstance();\n\t\t$tableName = static::$tableName;\n\t\t$greska = static::$greska;\n\t\t$q = \"INSERT INTO {$tableName} (\";\n\t\t$columns = array();\n\t\t$values = array();\n\t\tforeach($this as $key=>$value){\n\t\t\t$columns[] = $key;\n\t\t\t$values[] = $value;\n\t\t}\n\t\tforeach($columns as $c){\n\t\t\t$q .= \"`\" . $c . \"`, \";\n\t\t}\n\t\t$q = trim($q, ', ');\n\t\t$q .= \") VALUES (\";\n\t\tforeach($values as $v){\n\t\t\t$q .= \"?, \";\n\t\t}\n\t\t$q = trim($q, ', ');\n\t\t$q .= ')';\n\t\t$stmt = $db->prepare($q);\n\t\t$n = 1;\n\t\tforeach($values as $value){\n\t\t\t$stmt->bindValue($n, $value);\n\t\t\t$n++;\n\t\t}\n\t\t$stmt->execute();\n\t\tif($stmt->rowCount() != 1){\n\t\t\techo $greska;\n\t\t}\n\t}", "title": "" }, { "docid": "a314fc9a2d1c7fc45dd0a07787dee439", "score": "0.7382357", "text": "function insert(){\n\n $stmt = \"INSERT INTO %s.%s (%s, %s) VALUES (:%s, :%s)\";\n\n $query = sprintf(\n $stmt,\n self::$db->db_name,\n self::$db->cafeteria_table,\n self::$db->cafeteria_uname,\n self::$db->cafeteria_email,\n self::$db->cafeteria_uname,\n self::$db->cafeteria_email\n );\n $insert_stmt = self::$db->db_conn->prepare($query);\n\n // $insert_stmt->bindparam(':'.self::$db->admin_id, $this->id);\n $insert_stmt->bindparam(':'.self::$db->cafeteria_uname, $this->username);\n $insert_stmt->bindparam(':'.self::$db->cafeteria_email, $this->email);\n $insert_stmt->execute();\n }", "title": "" }, { "docid": "ad216c0cfa648ff499314b7d31f79c1b", "score": "0.7373952", "text": "function insert(){\n // $sql \"INSERT INTO grupos ('desc_grupo) VALUES ('desc_grupo')\";\n //$sql=\"INSERT INTO grupos (id_grupo,dec_grupos) VALUES ('$id_grupo[0]','$desc_grupo[0]')\";\n $sql=\"INSERT INTO grupos (id_grupo,desc_grupo) VALUES ('.$id_grupo.','.$desc_grupo.')\";\n $this->conexion->QuerySimple($sql);\n\n }", "title": "" }, { "docid": "0b1d48d949bf3083375ffa9689873baa", "score": "0.73722124", "text": "public function insertar(){\n\t\t\n Articulo::insertarBD();\n call('articulo', 'index',null);\n\n\n\t}", "title": "" }, { "docid": "1964d17b04f3215b912857d2552a240a", "score": "0.73599416", "text": "function insertPersona($dbconn,$cf,$cognome,$nome,$email,$materia_insegnamento,$classe_concorso,$istituto,$meccanografico)\n{\n $values=[ \":cf\"=>$cf,\n \":cognome\"=>$cognome,\n \":nome\"=>$nome,\n \":email\"=>$email,\n \":materia_insegnamento\"=>$materia_insegnamento,\n \":classe_concorso\"=>$classe_concorso,\n \":istituto\"=>$istituto,\n \":meccanografico\"=>$meccanografico\n ];\n $dbconn->insert(\"persona\",$values);\n}", "title": "" }, { "docid": "61a0ad6cc817484aab140781a640f977", "score": "0.73390716", "text": "public function insert() {\n echo \"datos correctos\";\n }", "title": "" }, { "docid": "479116226500920299984caccdb6457f", "score": "0.7329263", "text": "function insert() {\n\t\t$this->dbErrorMessage=\"\";\n\t\t\n\t\t$lista = \"\";\n\t\tforeach ($this->fields as $c) \n\t\t if (!$c->pk) {\n\t\t\t if ($lista != \"\")\n\t\t\t\t $lista .= \",\";\n\n\t\t\t$lista .= $c->name;\n\t\t }\n\n\t\t \n\t\t$lista2 = \"\";\n\t\tforeach ($this->fields as $c) \n\t\t if (!$c->pk) {\n\t\t\tif ($lista2 != \"\")\n\t\t\t\t$lista2 .= \", \";\n\n\t\t\t//echo \"<h1>value: \".$c->value.\"</h1>\";\n\n\t\t\tif ($c->name==\"created\") {\n\t\t\t $lista2 .= \"now()\";\n\t\t\t}\t\t\t\n\t\t\telseif ($c->value==\"\") \n\t\t\t $lista2 .= 'NULL';\t\t\t \n\t\t\telseif ($c->type == \"C\") {\n\t\t\t $c->value = $this->dbcon->qstr($c->value);\n\t\t\t\t$lista2 .= stripslashes($c->value);\n\t\t\t}\n\t\t\telseif ($c->type == \"D\") \n\t\t\t $lista2 .= \"'\".date2Mysql($c->value).\"'\";\n\t\t\telse\n\t\t\t\t$lista2 .= $c->value;\n\n\t\t}\n\n\t\t$sql = \"insert into $this->name ($lista) values ($lista2)\";\n\n\t\t//echo $sql.\"<hr>\";\n\n\t\t$rs = $this->dbcon->Execute($sql);\n\n $this->ownPk = $this->dbcon->Insert_ID();\n\t\t\n\t\tif ($rs) {\n $rs->Close();\n\t\t return true;\n\t }\n\t\telse {\n\t\t $this->dbErrorMessage = $this->dbcon->ErrorMsg();\n echo $this->dbErrorMessage;\n\t\t return false;\n\t }\n\t}", "title": "" }, { "docid": "f8abce39e3c9dbb3b8732e714bb82b7f", "score": "0.7282657", "text": "function insert($data) {\n }", "title": "" }, { "docid": "cc728d0985687496e901e199d8fb24ff", "score": "0.72796744", "text": "public static function insert()\n {\n }", "title": "" }, { "docid": "cc728d0985687496e901e199d8fb24ff", "score": "0.72796744", "text": "public static function insert()\n {\n }", "title": "" }, { "docid": "239c641eb87e15be61967fa778d6bd5d", "score": "0.72770405", "text": "public function insert_p()\n\t{\n\t\t$nip \t\t= htmlspecialchars($this->input->post('nip', true));\n\t\t$nama \t\t= htmlspecialchars($this->input->post('namapengajar', true));\n\t\t$jurusan \t= htmlspecialchars($this->input->post('namajurusan', true));\n\t\t$username \t= htmlspecialchars($this->input->post('username', true));\n\t\t$password \t= htmlspecialchars($this->input->post('password', true));\n\t\t$deskripsi \t= $this->input->post('deskripsi', true);\n\t\t$date \t\t= htmlspecialchars($this->input->post('date', true));\n\n\t\t$data = [\n\t\t\t\"nip_pengajar\" \t\t\t=> $nip,\n\t\t\t\"nama_pengajar\" \t\t=> $nama,\n\t\t\t\"username\" \t\t\t\t=> $username,\n\t\t\t\"password\" \t\t\t\t=> $password,\n\t\t\t\"jurusan_pengajar\" \t\t=> $jurusan,\n\t\t\t\"deskripsi_pengajar\" \t=> $deskripsi,\n\t\t\t\"date_pengajar\" \t\t=> $date,\n\t\t];\n\n\t\t$this->db->insert('pengajar', $data);\n\t}", "title": "" }, { "docid": "d571d61a5b2803c5ee1ac2cd26a573ff", "score": "0.7274804", "text": "function insert($table,$form_data,$pk_name = NULL){\n\t\t$t=time();\n\t\t$form_data[\"date_created\"] = date(\"Y-m-d H:i:s\",$t);\n\t\t$this->db->insert($table,$form_data);\n\t\tif($this->db->affected_rows() == 1){\n\t\t\t$result['inserted_id'] = $this->db->insert_id($pk_name);\n\t\t\t$result['respond'] = true;\n\t\t\treturn $result;\n\n\t\t\t}\n\t\t\telse return False;\n\t\t}", "title": "" }, { "docid": "7cef9a64e20474e513a7e4c16f63ee08", "score": "0.7274341", "text": "function insert($tablo_noms_champs,$tablo_valeurs_champs){\r\n\t\t$sql = \"INSERT INTO \".$tableName.\" (\".$tablo_noms_champs.\") VALUES('\".$tablo_valeurs_champs.\"')\";\r\n\t\tif($this->darkDB->query($sql)){\r\n\t\t\treturn $this->darkDB->insert_id;\r\n\t\t}else{\r\n\t\t\treturn $this->darkDB->error;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "3b39ed359d063112b4d4dc49cbe9b5d5", "score": "0.72730637", "text": "function tambahDetailTransaksi($idTransaksi, $kodeBarang, $jmlBeli)\n{\n return \"INSERT INTO detail_transaksi(id_transaksi, kode_barang, jml_beli) VALUES ('$idTransaksi', '$kodeBarang', '$jmlBeli')\";\n}", "title": "" }, { "docid": "3ba4577eab1aefaa223149245043140b", "score": "0.727163", "text": "function tambah($data){\n $this->db->insert('barang', $data);\n\t}", "title": "" }, { "docid": "53b27748487638071c3cd23078f0da87", "score": "0.727106", "text": "public function insert()\n\t{\n\t\t$this->Tipoimovel_model->descricao = $this->input->post('cnometpi');\n\t\t$this->Tipoimovel_model->grupos = $this->input->post('nidtbxgrc');\n\t\tif ($this->Tipoimovel_model->validaInsercao()){\n\t\t\t$this->Tipoimovel_model->save();\n\t\t\t$this->session->set_flashdata('sucesso','Tipo cadastrado com sucesso');\n\t\t\tredirect(makeUrl('dci','tipoimovel','visualizar'));\n\t\t} else {\n\t\t\t$this->session->set_flashdata('erro',$this->Tipoimovel_model->error);\n\t\t\t$this->session->set_flashdata('cnometpi',$this->Tipoimovel_model->descricao);\n\t\t\tredirect(makeUrl('dci','tipoimovel','inserir'));\n\t\t\treturn;\n\t\t}\n\t}", "title": "" }, { "docid": "83d54e6f0a4559d12118492936f55b23", "score": "0.72674286", "text": "function insert_tindakan($data){\n\t\t\t$this->db->insert('pelayanan_poli', $data);\n\t\t\treturn $this->db->insert_id();\n\t\t}", "title": "" }, { "docid": "1240a19467d36a82c48f9b31900d722c", "score": "0.72489256", "text": "abstract public function insert();", "title": "" }, { "docid": "28ee5ab184b7b2664da0672b141d8cd4", "score": "0.72446734", "text": "function insertarPersonalventa($refpersonal,$refventas,$puntos) {\r\n$sql = \"insert into dbpersonalventa(idpersonalventa,refpersonal,refventas,puntos)\r\nvalues ('',\".$refpersonal.\",\".$refventas.\",\".$puntos.\")\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}", "title": "" }, { "docid": "444f973e98cac7a3767c0323a56c0f23", "score": "0.7243471", "text": "public function insertar()\n {\n $mysqli = new mysqli(Config::BBDD_HOST, Config::BBDD_USUARIO, Config::BBDD_CLAVE, Config::BBDD_NOMBRE);\n //Arma la query\n $sql = \"INSERT INTO escopetas (\n nombre,\n precio,\n descripcion\n \n ) VALUES (\n '$this->nombre',\n '$this->precio',\n '$this->descripcion'\n );\";\n // print_r($sql);exit;\n //Ejecuta la query\n if (!$mysqli->query($sql)) {\n printf(\"Error en query: %s\\n\", $mysqli->error . \" \" . $sql);\n }\n //Obtiene el id generado por la inserción\n $this->idescopeta = $mysqli->insert_id;\n //Cierra la conexión\n $mysqli->close();\n }", "title": "" }, { "docid": "c42cc81e51eb5ee5b6abee7a27063671", "score": "0.72346044", "text": "function insert() {\n\t\t$sql = \"INSERT INTO student (std_prefix, std_fName, std_lName, std_code, std_status, std_u_id)\n\t\t\t\tVALUES(?, ?, ?, ?, ?, ?)\";\n\t\t\n\t\t$this->db->query($sql, array($this->std_prefix, $this->std_fName, $this->std_lName, $this->std_code, $this->std_status, $this->std_u_id));\n\t\t$this->last_insert_id = $this->db->insert_id();\n\t\t\n\t}", "title": "" }, { "docid": "6e7dff4470b77e43509840ccd290a2d1", "score": "0.72335607", "text": "public function insertData()\n\t{\n\t\t$data = array(\n\t\t\t/* 'id' yang dikiri harus sama seperti di table\n\t\t\t'id' yang dikanan harus menurut name inputnya */\n\t\t\t'order_id' => $this->input->post('order_id'),\n\t\t\t'username' => $this->input->post('username'),\n\t\t\t'id_barang' => $this->input->post('id_barang'),\n\t\t\t'merk' => $this->input->post('merk'),\n\t\t\t'harga' => $this->input->post('harga'),\n\t\t\t'jumlah' => $this->input->post('jumlah'),\n\t\t\t'status' => $this->input->post('status')\n\t\t);\n\t\t/* jika semua sama sperti di table\n\t\tgunakan versi simple seprti berikut */\n\t\t$data = $this->input->post();\n\t\t/* eksekusi query insert into \"detail_transaksi\" diisi dengan variable $data\n\t\tface2face ae lek bingung :| */\n\t\t$this->db->insert(\"detail_transaksi\",$data);\n\t}", "title": "" }, { "docid": "1708f2afaa378bcc8bf8a51dda144c36", "score": "0.7233231", "text": "public function insert(){\n\t\tglobal $E;\n\t\t$flds = array();\n\t\t$vals = array();\n var_dump( $this->data );\n\t\tforeach ( $this->data as $index => $item ){\n\t\t\tif( (!empty( $index ) ) && ( !empty( $item ) ) ){\n\t\t\t\tif( $index != $this->keyfield)\n\t\t\t\t\t$flds[] = '`'.$index.'`';\n\t\t\t\t\t$vals[] = \"'$item'\";\n\t\t\t}\n\t\t}\n var_dump( $vals );\n echo \"<br>sss<br>\";\n\t\tif( count( $flds ) > 0){\n\t\t\t$flds = implode( ',', $flds );\n\t\t\t$vals = implode( ',', $vals ); \n// var_dump( $vals );\n\t\t\t$sql = \"INSERT INTO `{$this->table}` (\".$flds.\") VALUES ( \".$vals.\" )\";\n\t\t\treturn $this->db->sql_query( $sql );\n\t\t} else {\n\t\t\t$E->setError( CANTSAVE.\" for insert\");\n\t\t\treturn ERRCODE;\n\t\t}\n\t}", "title": "" }, { "docid": "10e0b3aa7999033b870a06b383052f97", "score": "0.7227472", "text": "public function insert($especie);", "title": "" }, { "docid": "35799dbdb4dd57f0bbde18553bcc053f", "score": "0.7213364", "text": "public function insertar()\n\t{\n\t\t// Se reciben los datos\n\t\t$datos = $_REQUEST;\n\n\t\t// Si ya existe el registro\n\t\tif ( $this->modelo->existe($datos) )\n\t\t\t$this->listar($this->mensaje_registro_existente, 2);\n\t\telseif ( $this->modelo->insertar($datos) )\n\t\t\t// Se muestra la grilla\n\t\t\t$this->listar($this->mensaje_ingreso_ok, 1);\n\t\telse\n\t\t\t$this->listar($this->mensaje_ingreso_error, 2);\n\t}", "title": "" }, { "docid": "b4e589e7b54b0c195b2277daeb1827a9", "score": "0.72084326", "text": "function insertSoal($pertanyaan, $jawaban, $choices, $nomor, $id_soal){\n\t\trequire 'pdo.php';\n\t $sql = \"INSERT INTO pertanyaan (pertanyaan, jawaban, nomor,choice1, choice2, choice3, choice4, id_soal)\n VALUES (:pertanyaan, :jawaban, :nomor,:choice1, :choice2, :choice3, :choice4, :id_soal)\";\n\t $stmt = $pdo->prepare($sql);\n\t $stmt->execute(array(\n\t ':pertanyaan' => $pertanyaan,\n\t ':jawaban' => $jawaban,\n\t ':nomor' => $nomor,\n\t ':choice1' => $choices[0],\n\t ':choice2' => $choices[1],\n\t ':choice3' => $choices[2],\n\t ':choice4' => $choices[3],\n\t ':id_soal' => $id_soal\n\t ));\n\t}", "title": "" }, { "docid": "750e29360b056d3b22b19bf303c2d3d2", "score": "0.72054094", "text": "function insertRecord($kolom, $data)\n {\n }", "title": "" }, { "docid": "e527be1cd32775b7a2c284cc23f147f2", "score": "0.7204405", "text": "function tambahBarang($kodeBarang, $namaBarang, $harga, $stok)\n{\n return \"INSERT INTO barang(kode_barang, nama_barang, harga, stok) VALUES ('$kodeBarang', '$namaBarang', '$harga', '$stok') \";\n}", "title": "" }, { "docid": "0640a5cf8d784ddc5a3aadcf08f4c865", "score": "0.7202101", "text": "private function insert()\r\n\t{\r\n\t\ttry {\r\n\t\t\tself::$db->insert($this->_tableName, $this->_data);\r\n\t\t\t$this->_data['id'] = self::$db->lastInsertId();\r\n\t\t} catch (Zend_Db_Exception $e) {\r\n\t\t\tif (!$this->_validator->handleException($e))\r\n\t\t\t{\r\n\t\t\t\tthrow $e;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "694c87f230f088f2931b4fedb50c2ec8", "score": "0.719912", "text": "public function insert($apartamentosDescripcion);", "title": "" }, { "docid": "fc0a6b94cecbdcb6640801cc1e964fe1", "score": "0.71971625", "text": "public function input_data($data){\n $this->db->insert('pengaduan',$data);\n }", "title": "" }, { "docid": "9be451602d415164dbc4e3a5f3f8b172", "score": "0.7193953", "text": "public function insert($tblInfo);", "title": "" }, { "docid": "deb3986cb7092855712949c649218592", "score": "0.7193531", "text": "public function FunctInsert() {\n \n $clase = \"Db\" . GetData(\"clase\", \"base\");\n $obj = new $clase();\n\n // Llenamos los valores del objeto\n foreach ($obj->getVars() as $key => $value) {\n // Recorremos los datos obtenidos por post\n foreach ($_POST as $key2 => $value2) {\n if ($key == $key2) {\n $setTemp = 'set' . $key;\n $obj->$setTemp(GetData($key2, \"\"));\n }\n }\n }\n\n // Salvamos el objeto seņalado\n if ($obj->save()) {\n if (is_null($obj->id)) {\n return $obj->getMaxId();\n } else {\n return $obj->id;\n }\n } else {\n return FALSE;\n }\n }", "title": "" }, { "docid": "6f15a8ca4830deb44c390d6bc879f19b", "score": "0.71910447", "text": "function insert ()\n\t\t{\n\t\t\t(string) $dbQuery = \"\";\n\t\t\t\n\t\t\t$dbQuery = \"INSERT INTO $this->escala_table \";\n\t\t \t$dbQuery .= \"(\";\n\t\t \t\n\t\t\t$dbQuery .= $this->descripcion_field.\",\";\n\t\t\t$dbQuery .= $this->puntajeEscala_field.\",\";\n\t\t\t\n\t\t\t$dbQuery = preg_replace('/,$/', ' ', $dbQuery);\n\t\t\t$dbQuery .= \") \";\n\t\t\t$dbQuery .= \" VALUES (\";\n\t\t \t\n\t\t\t$dbQuery .= \" '$this->descripcion',\";\n\t\t\t$dbQuery .= \" $this->puntajeEscala ,\";\n\t\t\t\n\t\t \t\n\t\t \t$dbQuery = preg_replace('/,$/', ' ', $dbQuery);\n\t\t \t$dbQuery .= \") \";\n\t\t \n\t\t \t$this->db->query( $dbQuery );\n\t\t\t\n\t\t\t$this->idescala = mysql_insert_id();\n\t\t\tif ($this->db->affected_rows() == 0) return false;\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "dfd5973362d52b7b7e62318662df2ddf", "score": "0.71798986", "text": "function form_insert($data){\n $this->db->insert('persona', $data);\n }", "title": "" }, { "docid": "44168b348d80ed632187d7c240752634", "score": "0.7167295", "text": "function TambahDataEkspedisi() {\n\tinclude '../../koneksi/index.php';\n\n\t//inisialisasi\n\t$nama = $_POST['nama'];\n\n\t//insert\n\t$sql = \"INSERT INTO ekspedisi (nama) VALUES(?)\";\n\t$stmt = $db->prepare($sql);\n\t$stmt->bind_param('s', $nama);\n\tif ($stmt->execute()) {\n\t\t$stmt->insert_id;\n\t\t$_SESSION['status_operasi_ekspedisi'] = \"berhasil_menyimpan\";\n\t} else {\n\t\t$_SESSION['status_operasi_ekspedisi'] = \"gagal_menyimpan\";\n\t}\n\t$stmt->close();\n}", "title": "" }, { "docid": "d454606cacef0dde6fa647d0852529b9", "score": "0.71571493", "text": "function index_post() {\n $data = array(\n 'id_gudang' => $this->post('id_gudang'),\n 'nama' => $this->post('nama'),\n 'alamat' => $this->post('alamat'));\n $insert = $this->db->insert('gudang', $data);\n if ($insert) {\n $this->response($data, 200);\n } else {\n $this->response(array('status' => 'fail', 502));\n }\n }", "title": "" }, { "docid": "dbc8709fa48854c46dbba04caac311c4", "score": "0.7150675", "text": "public function insert($data)\n {\n }", "title": "" }, { "docid": "dbc8709fa48854c46dbba04caac311c4", "score": "0.7150675", "text": "public function insert($data)\n {\n }", "title": "" }, { "docid": "25937548e279b6ba7c24a77aaa834892", "score": "0.71495414", "text": "function insert($data){\n $this->db_pilsen = $this->load->database('pilsen', TRUE);\n $this->db_pilsen->insert($this->tabla, $data);\n }", "title": "" }, { "docid": "73fdcf61eca812e2fe191d20316f7771", "score": "0.7134481", "text": "public function insert()\n\t{\n\t\t$sth = $this->db->prepare(\"INSERT INTO user (firstName,lastname,email)\n\t\t\tVALUES (:firstName,:lastname,:email)\");\n\t\t$sth->bindValue(\"firstName\",$this->firstName);\n\t\t$sth->bindValue(\"lastname\",$this->lastname);\n\t\t$sth->bindValue(\"email\",$this->email);\n\n\t\t$sth->execute();\n\n\n\n\t}", "title": "" }, { "docid": "5066296808853499c69115b3345294de", "score": "0.7131304", "text": "function insert(){\n $conexion = conexion();\n $sql = \"INSERT INTO ventas VALUES(null,'$this->id_producto', '$this->id_cliente', '$this->fecha','$this->cantidad','$this->total')\";\n $conexion->query($sql);\n }", "title": "" }, { "docid": "2effd2b778d26a5669126552f8007208", "score": "0.7129202", "text": "function insertarPersonalcooperativas($refpersonal,$refcooperativas,$puntos) { \r\n$sql = \"insert into dbpersonalcooperativas(idpersonalcooperativa,refpersonal,refcooperativas,puntos) \r\nvalues ('',\".$refpersonal.\",\".$refcooperativas.\",\".$puntos.\")\"; \r\n$res = $this->query($sql,1); \r\nreturn $res; \r\n}", "title": "" }, { "docid": "f240ab10839d7ee85577d58e6226ae21", "score": "0.712315", "text": "public function tambah_pelanggan($data, $table){\n $this->db->insert($table, $data); // memasukkan ke database\n }", "title": "" }, { "docid": "6b63d9a5252954cf50b14512c18d0a53", "score": "0.7122552", "text": "function insert ()\n\t\t{\n\t\t\t(string) $dbQuery = \"\";\n\t\t\t\n\t\t\t$dbQuery = \"INSERT INTO $this->actividad_table \";\n\t\t \t$dbQuery .= \"(\";\n\t\t \t\n\t\t\t$dbQuery .= $this->nombre_field.\",\";\n\t\t\t$dbQuery .= $this->descripcion_field.\",\";\n\t\t\t$dbQuery .= $this->numerosemana_field.\",\";\n\t\t\t$dbQuery .= $this->tipo_field.\",\";\n\t\t\t$dbQuery .= $this->calificable_field.\",\";\n\t\t\t$dbQuery .= $this->peso_field.\",\";\n\t\t\t\n\t\t\t$dbQuery = preg_replace('/,$/', ' ', $dbQuery);\n\t\t\t$dbQuery .= \") \";\n\t\t\t$dbQuery .= \" VALUES (\";\n\t\t \t\n\t\t\t$dbQuery .= \" '$this->nombre',\";\n\t\t\t$dbQuery .= \" '$this->descripcion',\";\n\t\t\t$dbQuery .= \" $this->numerosemana ,\";\n\t\t\t$dbQuery .= \" '$this->tipo',\";\n\t\t\tif($this->calificable == false) $dbQuery .= \"0,\"; else $dbQuery .= \"1,\";\n\t\t\t$dbQuery .= \" $this->peso ,\";\n\t\t\t\n\t\t \t\n\t\t \t$dbQuery = preg_replace('/,$/', ' ', $dbQuery);\n\t\t \t$dbQuery .= \") \";\n\t\t \n\t\t \t$this->db->query( $dbQuery );\n\t\t\t\n\t\t\t$this->idactividad = mysql_insert_id();\n\t\t\tif ($this->db->affected_rows() == 0) return false;\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "48b6e57c54f47705d622df1f2fe905be", "score": "0.712156", "text": "public function insert($datos){\r\n //echo \"Insertar datos\";\r\n echo \"Subcapitulo creado\";\r\n $query = $this->db->connect()->prepare('INSERT INTO temario (id_subcapitulo, numero_capitulo, titulo_subcapitulo) VALUES(:id_subcapitulo,:numero_capitulo, :titulo_subcapitulo)');\r\n $query->execute([\r\n 'id_subcapitulo' => $datos['id_subcapitulo'],\r\n 'numero_capitulo' => $datos['numero_capitulo'],\r\n 'titulo_subcapitulo' => $datos['titulo_subcapitulo']\r\n ]);\r\n }", "title": "" }, { "docid": "cc83d1e64e0dc7160e7e37ad07648df9", "score": "0.7109435", "text": "public function insert_data()\n {\n\n $this->db->insert($this::DB_TABLE,$this->data);\n }", "title": "" }, { "docid": "80de63115b0bd3b3ec36a2d6c8b463c2", "score": "0.7106384", "text": "function kisor_pusti_register($kName,$kLName,$kEmail,$kAddress,$kPhoneNo,\r\n\t\t\t\t\t\t $ksName,$ksLName,$kGender,$kFoogA,$kInfo,$kEmergencyC)\r\n {\r\n\r\n\r\n global $db;\r\n try{\r\n\r\n $sql=\"INSERT INTO kishor_pusti_registration(kName,kLName,kEmail,kAddress,kPhoneNo,ksName,ksLName,\r\n\t kGender,kFoogA,kInfo,kEmergencyC)\r\n VALUES (?,?,?,?,?,?,?,?,?,?,?)\";\r\n $stmt=$db->prepare($sql);\r\n$result=$stmt->execute([$kName,$kLName,$kEmail,$kAddress,$kPhoneNo,\r\n\t\t\t\t\t\t $ksName,$ksLName,$kGender,$kFoogA,$kInfo,$kEmergencyC]);\r\n\r\n if($result){\r\n\r\n echo\"sucess\";\r\n }\r\n else\r\n {\r\n echo \" some thing wrong \";\r\n\r\n }\r\n }\r\n catch(PDOException $ex)\r\n {\r\n throw $ex;\r\n }\r\n }", "title": "" }, { "docid": "d77558d1839226c5e5db1ab2ca70d545", "score": "0.7101774", "text": "public function insert_datamatkul ($kodemk, $namamk, $sks, $smt, $kodeprodi)\n{\n $sql = \"INSERT INTO tblmatkul (kodemk, namamk, sks, smt, kodeprodi) VALUES ('$kodemk', '$namamk', '$sks', '$smt', '$kodeprodi')\";\n $this->conn->query($sql);\n return $sql;\n}", "title": "" }, { "docid": "7a1456d842eee7ef2809fc5f76497b1f", "score": "0.7099594", "text": "public function insert($input) {\n\t\t//$input = data yang dikirim dari controller\n\t\treturn $this->db->insert('produk_bahan_baku', $input);\n\t}", "title": "" }, { "docid": "88ecf042275174a95dfdb89113942312", "score": "0.7086221", "text": "function add_pengajar($params)\n {\n $this->db->insert('pengajar',$params);\n return $this->db->insert_id();\n }", "title": "" }, { "docid": "f0b8bc607963fa940c27fd6ee7297a55", "score": "0.7078314", "text": "abstract public function insert(Galahad_Model_Entity $entity);", "title": "" }, { "docid": "0539ea770d89369c76011b365c523c7a", "score": "0.70749", "text": "function insertarAlbumobras($refobras,$refalbum) {\r\n$sql = \"insert into dbalbumobras(idalbumobra,refobras,refalbum)\r\nvalues ('',\".$refobras.\",\".$refalbum.\")\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}", "title": "" }, { "docid": "cf51585a16f16328b922860c69fcd708", "score": "0.7071412", "text": "protected abstract function insert();", "title": "" }, { "docid": "ca98339285202ea7a0458f65efbfb840", "score": "0.70573837", "text": "function index_post() {\n $data = array(\n 'nim' => $this->post('nim'),\n 'nama' => $this->post('nama'),\n 'id_jurusan' => $this->post('id_jurusan'),\n 'alamat' => $this->post('alamat'));\n $insert = $this->db->insert('mahasiswa', $data);\n if ($insert) {\n $this->response($data, 200);\n } else {\n $this->response(array('status' => 'fail', 502));\n }\n }", "title": "" }, { "docid": "4304d91990732835013edb30e2b3a8d4", "score": "0.70519334", "text": "function insert($table, $data){\n\t\t$set = array();\n\t\tforeach($data as $k => $v){\n\t\t\t$set[$k] = $v;\t\n\t\t}\n\t\t$keys = array_keys($set);\n\t\t$values = array_values($set);\n\t\t$sql = \"INSERT INTO \".$table.\" (\".implode(', ', $keys).\") VALUES ('\".implode('\\', \\'', $values).\"')\";\n\t\t$result = $this->m_instance->query($sql);\n if(!$result)\n {\t\n\t\t\techo $sql;\n echo \"insert data failed!\".PHP_EOL;\n }\n return $this->m_instance->insert_id ;\n\n\t}", "title": "" }, { "docid": "eb6b601646d96cf3c6435b8fa8723178", "score": "0.70481133", "text": "public function tallenna() {\n $query = DB::connection()->prepare('INSERT INTO Kayttaja (tunnus, salasana) VALUES (:tunnus, :salasana) RETURNING kayttaja_id');\n $query->execute(array('tunnus' => $this->tunnus, 'salasana' => $this->salasana));\n $row = $query->fetch();\n $this->kayttaja_id = $row['kayttaja_id'];\n }", "title": "" }, { "docid": "7a6ad0e94931c38ad1efc25f586eabbb", "score": "0.70466", "text": "function insert() {\n\n\n\t}", "title": "" }, { "docid": "9ce2cc1d063fea905ddefadafc0fef6a", "score": "0.70450836", "text": "public function insert($edxvalProfile);", "title": "" }, { "docid": "14c26b3c7034495b94225bb8861d63e1", "score": "0.70435363", "text": "public function addpeng()\n {\n $nama = $this->__sanitizeString($this->input->post('nama'));\n $q = sprintf(\"INSERT INTO master_pengolah (nama_pengolah) VALUES ('%s')\", $nama);\n $hsl = $this->db->query($q);\n if ($hsl) {\n echo json_encode(array('status' => 'success'));\n } else {\n echo '[]';\n }\n exit();\n }", "title": "" }, { "docid": "3bb3d9073f0336e1b5871f88ecedd79f", "score": "0.7043377", "text": "public function insertar($nombre, $clave, $apellidos, $dni, $centro, $tipo, $accesos, $estado, $id_empresa, $puesto,$area, $division, $supervisor, $domicilio_user, $telefono, $email, $genero, $brevete, $brevete_cat,$vencimiento_brevete, $fecha_alta, $pin, $img, $user_registro){\n\t\t\t$db=DB::conectar();\n\t\t\t$insert=$db->prepare('\n\t\tINSERT INTO `usuarios`(`Id`, `nombre`, `clave`, `apellidos`, `dni`, `centro`, `tipo`, `accesos`, `estado`, `id_empresa`, `puesto`, \n\t\t\t\t\t\t\t\t`area`, `division`, `supervisor`, `domicilio_user`, `telefono`, `email`, `genero`, `brevete`, `brevete_cat`, \n\t\t\t\t\t\t\t\t`vencimiento_brevete`, `fecha_alta`, `pin`, `img`, `user_registro`) VALUES (\n\t\t\t\t\t\t\t\tnull, :nombre, :clave, :apellidos, :dni, :centro, :tipo, :accesos, :estado, :id_empresa, :puesto, \n\t\t\t\t\t\t\t\t:area, :division, :supervisor, :domicilio_user, :telefono, :email, :genero, :brevete, :brevete_cat, \n\t\t\t\t\t\t\t\t:vencimiento_brevete, :fecha_alta, :pin, :img, :user_registro)\n\t\t\t\t\t\t\t\t');\n\t\t\t$insert->bindValue('nombre',$nombre);\n\t\t\t//encripta la clave desactivado \n\t\t\t$insert->bindValue('clave',$clave);\n\t\t\t$insert->bindValue('apellidos',$apellidos);\n\t\t\t$insert->bindValue('dni',$dni);\n\t\t\t$insert->bindValue('centro',$centro);\n\t\t\t$insert->bindValue('tipo',0);\n\t\t\t$insert->bindValue('accesos',$accesos);\n\t\t\t$insert->bindValue('estado',$estado);\n\t\t\t$insert->bindValue('id_empresa',$id_empresa);\n\t\t\t$insert->bindValue('puesto',$puesto);\n\t\t\t$insert->bindValue('area',$area);\n\t\t\t$insert->bindValue('division',$division);\n\t\t\t$insert->bindValue('supervisor',$supervisor);\n\t\t\t$insert->bindValue('domicilio_user',$domicilio_user);\n\t\t\t$insert->bindValue('telefono',$telefono);\n\t\t\t$insert->bindValue('email',$email);\n\t\t\t$insert->bindValue('genero',$genero);\n\t\t\t$insert->bindValue('brevete',$brevete);\n\t\t\t$insert->bindValue('brevete_cat',$brevete_cat);\n\t\t\t$insert->bindValue('vencimiento_brevete',$vencimiento_brevete);\n\t\t\t$insert->bindValue('fecha_alta',$fecha_alta);\n\t\t\t$insert->bindValue('pin',$pin);\n\t\t\t$insert->bindValue('img',$img);\n\t\t\t$insert->bindValue('user_registro',$user_registro);\n\t\t\t$insert->execute();\n\t\t\tDb::desconectar();\n\t\t}", "title": "" }, { "docid": "8ac84430eaadd099b411f65dfc5bd5e7", "score": "0.70416284", "text": "function insertRuangan($mysqli,$namaruangan) {\n\n // if ($namaruangan != $cek[0][0]) {\n // # code...\n // }\n $hasil = executeQuery($mysqli,\"select max(substr(id_ruangan,3,3)) from ruangan\");\n $urutan = (int)$hasil[0][0] + 1;\n $id = \"RU\".str_pad((string)$urutan, 3, \"0\", STR_PAD_LEFT);\n executeNonQuery($mysqli,\"insert into ruangan (id_ruangan,nama_ruangan) values('$id','$namaruangan')\");\n echo \"<script>alert('Berhasil Tambah Ruangan')</script>\";\n // $message = \"Berhasil Tambah Ruangan\";\n }", "title": "" }, { "docid": "f354cd0cb02ca970cdc83b23a42b1c84", "score": "0.7040489", "text": "public function insert(): void {\n $conn = LibrarianDB::getConnection();\n $conn->prepare(\n \"INSERT INTO user (name_user, surname_user, user_type, email, password, address, \n phone) VALUES (?, ?, ?, ?, ?, ?, ?)\",\n [$this->name, $this->surname, $this->user_type, $this->email,\n password_hash($this->password, PASSWORD_DEFAULT), $this->address, $this->phone]\n );\n }", "title": "" }, { "docid": "aeeded34b92eceee41865200fe90543a", "score": "0.7032837", "text": "function tambahTeman($teman) {\n global $dbh;\n $query = $dbh->prepare(\"INSERT INTO akun_teman (USERNAME, TEMAN) VALUES (:user, :teman);\");\n $query->bindValue(':user', $_SESSION['user']);\n $query->bindValue(':teman', $teman);\n $query->execute();\n}", "title": "" }, { "docid": "e42aa3582cea0361b839475f25adf1d2", "score": "0.70319533", "text": "function add_penerima_bantuan($params)\n {\n $this->db->insert('penerima_bantuan',$params);\n return $this->db->insert_id();\n }", "title": "" }, { "docid": "80dda2fe8f54ed572df5aa788925460c", "score": "0.7029796", "text": "public function insert($pregunta, $idEstado, $categoria);", "title": "" }, { "docid": "e0c7fa2875010ce3dcb299efe642c56c", "score": "0.7027802", "text": "function POST($id_petugas, $nisn, $tgl_bayar, $bulan_bayar, $tahun_dibayar, $id_spp, $jumlah_bayar)\r\n {\r\n mysqli_query(\r\n $this->con,\r\n \"insert into tb_pembayaran values(\r\n '',\r\n '\" . $id_petugas . \"',\r\n '\" . $nisn . \"',\r\n '\" . $tgl_bayar . \"',\r\n '\" . $bulan_bayar . \"',\r\n '\" . $tahun_dibayar . \"',\r\n '\" . $id_spp . \"',\r\n '\" . $jumlah_bayar . \"'\r\n )\"\r\n );\r\n }", "title": "" }, { "docid": "0743f51fd6ce29b5b36662e6c7b80912", "score": "0.70123", "text": "public function tambah($data){\n\t\t$this->db->insert('nilai', $data);\n\t}", "title": "" }, { "docid": "b34acc9ca97e3a8870d337d554760161", "score": "0.70119894", "text": "public function insertEmpresa(){\n $db = new Conexion;\n// insert into sicloud.empresa_provedor (ID_rut , nom_empresa)values('17468875','Tuberias S.A.S'),\n $sql = \"INSERT INTO sicloud.empresa_provedor (ID_rut , nom_empresa)VALUES('$this->ID_rut','$this->nom_empresa')\";\n $stm = $this->db->prepare($sql);\n $stm ->bindValue (\":ID_rut\",$this->ID_rut);\n $stm ->bindValue (\":nom_empresa\",$this->nom_empresa);\n $insert = $stm->execute();\n // $i = $db->query($sql);\n\n if($insert = true){\n $_SESSION['message']= \"Se creo empresa\";\n $_SESSION['color']= \"success\";\n\n }else{\n $_SESSION['message']= \"No creo empresa\";\n $_SESSION['color']= \"danger\";\n\n }\n // header(\"location: ../forms/FormEmpresa.php \");\n\n if($insert){ echo \"<script>alert('Se inserto registro de empresa');</script>\"; echo \"<script>window.location.replace('../vista/FormEmpresa.php');</script>\"; }else{ echo \"<script>alert('error al crear empresa ');</script>\"; echo \"<script>window.location.replace('../vista/FormEmpresa.php');</script>\"; }\n\n}", "title": "" }, { "docid": "455339e0386f17ff8f00d4356f28a8fc", "score": "0.7010889", "text": "public function insert (){\n\n\t require_once (\"Connections/conexionPDOII.php\");\n\n\t $id=$this->Id;\n\t $descrip=$this->Des;\n\t $costo=$this->Pre;\n\t \n\t $consulta=$conn->prepare (\"INSERT into tbservicios(Id,Descripcion, Costo) VALUES (:id,:descrip, :costo)\");\n\n\t $consulta->bindValue(':id', (string)$id, PDO::PARAM_STR);\n\t $consulta->bindValue(':descrip', (string)$descrip, PDO::PARAM_STR);\n\t $consulta->bindValue(':costo', (string)$costo, PDO::PARAM_STR);\n\n\n\t $result= $consulta->execute();\n \n\t //si no devolvio un resultado\n\t\t if (!$result) \n\t\t \techo \"Hubo un error\";\n\t\t\n\t\t else\n\t echo \"Excelente\";\n}", "title": "" }, { "docid": "5d69625187968b27a82c9c4303e34814", "score": "0.7009076", "text": "function post(){\n return $this->set_query(sprintf(\"\n INSERT\n INTO\n %s\n %s \",\n $this->entity,\n $this->data\n )\n );\n }", "title": "" }, { "docid": "5819615ab5ae63cdcf81104f47d418ce", "score": "0.7003959", "text": "function insertPemesanan($data)\n {\n $this->db->insert('pemesanan', $data);\n }", "title": "" }, { "docid": "646c3ab4150521ce54770278ebeb2f81", "score": "0.7003729", "text": "function add_pasien($params)\n {\n return $this->db->insert('pasien',$params);\n }", "title": "" }, { "docid": "8a43be157a10facfc204275be8ca0025", "score": "0.7001861", "text": "function insertStructure($nom,$rue,$cp,$ville,$estasso,$nb){\n if($estasso == 1){\n $req = \"INSERT INTO structure(nom,rue,cp,ville,estasso,nb_donateurs) VALUES ('$nom','$rue','$cp','$ville','$estasso','$nb')\";\n }\n else{\n $req = \"INSERT INTO structure(nom,rue,cp,ville,estasso,nb_actionnaires) VALUES ('$nom','$rue','$cp','$ville','$estasso','$nb')\";\n }\n $this->pdo->exec($req);\n\n }", "title": "" }, { "docid": "a841d5e6849df4b81b50111cb73d3c89", "score": "0.69998515", "text": "function insert();", "title": "" }, { "docid": "4c22a2dd14c137a9b01356d34cf53586", "score": "0.6998549", "text": "public function insertThis(){\r\n $data = $this->_prepareStorageData(false);\r\n $this->id = $this->ins($this->table, $data);\r\n }", "title": "" }, { "docid": "df75d59002c9ffb786613db3ebf6374f", "score": "0.69961417", "text": "function insert(){\n \t\tif(get_magic_quotes_gpc()!=1){\n \t\t\t$this->title=addslashes($this->title);\n \t\t\t$this->subtitle=addslashes($this->subtitle);\n \t\t\t$this->sign=addslashes($this->sign);\n\t\t\t$this->body=addslashes($this->body);\n\t\t\t$this->paragraph=addslashes($this->paragraph); \t\t\t\n \t\t\t$this->path=addslashes($this->path);\n \t\t}\n \t\t$sSql=\"insert into tbl_testi set \";\n \t\t$sSql.=\"id_sito='\" . $this->id_sito . \"', \";\n \t\t$sSql.=\"titolo='\" . $this->title . \"', \";\n \t\t$sSql.=\"sottotitolo='\" . $this->subtitle . \"', \";\n \t\t$sSql.=\"firma='\" . $this->sign . \"', \";\n \t\t$sSql.=\"corpo='\" . $this->body . \"', \";\n \t\t$sSql.=\"paragrafo='\" . $this->paragraph . \"', \";\n \t\t$sSql.=\"flag_commento='\" . $this->bComment . \"';\";\n \t\tmysql_query($sSql);\n \t\techo mysql_error();\n \t\treturn mysql_insert_id();\n \t}", "title": "" } ]
07e251ae73e9ecf53b09b161c8a86c74
Disables query monitor in frontend builder mode.
[ { "docid": "3fb3daef3630b9770524e1bfd82db3af", "score": "0.54463136", "text": "public function disable_qm( $user_caps ) {\n\t\t\t$user_caps['view_query_monitor'] = false;\n\t\t\treturn $user_caps;\n\t\t}", "title": "" } ]
[ { "docid": "ebc46289e7b680e43d094d69f0d1fc63", "score": "0.6159752", "text": "public function disable() {}", "title": "" }, { "docid": "255ce6375a17e4475c181cc47fc3e044", "score": "0.6129161", "text": "public function disable();", "title": "" }, { "docid": "94eb178b9de95889253990b56c5ba9d5", "score": "0.59727854", "text": "public function disable() {\n\t\t// Removes itself from the event queue\n\t\tEvent::clear ( 'system.display', array ($this, 'render' ) );\n\t}", "title": "" }, { "docid": "49a8c3d54802438dcb89aeaa680eb3e8", "score": "0.5962259", "text": "public function disableQueryLog() : void\n {\n $this->logQueries = false;\n }", "title": "" }, { "docid": "9198c40c93aaf220df39f4e6891977c8", "score": "0.5912318", "text": "public static function disable()\n {\n }", "title": "" }, { "docid": "67decd2233b418b41261e4e189584bcc", "score": "0.5849479", "text": "public static function disableQueryLog()\n { //Method inherited from \\Illuminate\\Database\\Connection \n /** @var \\Illuminate\\Database\\MySqlConnection $instance */\n $instance->disableQueryLog();\n }", "title": "" }, { "docid": "5a7e1114ee503c8a8a301eba651781c7", "score": "0.58438957", "text": "public function disableQueryLog()\n {\n $this->loggingQueries = false;\n }", "title": "" }, { "docid": "5a7e1114ee503c8a8a301eba651781c7", "score": "0.58438957", "text": "public function disableQueryLog()\n {\n $this->loggingQueries = false;\n }", "title": "" }, { "docid": "09882c40455f29ac1491f0788d88a2d0", "score": "0.5834937", "text": "public static function disableQueryLog()\n {\n //Method inherited from \\Illuminate\\Database\\Connection\n \\Illuminate\\Database\\MySqlConnection::disableQueryLog();\n }", "title": "" }, { "docid": "502a84fc3ae97fd30a3ed8720d36cdc0", "score": "0.5814009", "text": "public function disable()\n {\n Application::executeControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), \"disable\", Application::PRIORITY_LOW);\n }", "title": "" }, { "docid": "69407a7a3314705ef514ae1b491652ca", "score": "0.5749052", "text": "public function disable_firewall_ui(): void\n {\n if ( \\defined( 'ENABLE_SUCURI_WAF' ) && ENABLE_SUCURI_WAF ) {\n return;\n }\n\n add_action( 'admin_menu', [ $this, 'remove_firewall_submenu' ] );\n add_action(\n 'admin_enqueue_scripts',\n function ( $hook ): void {\n if ( 'DEBUG' === strtoupper( HTTP_ENV_CONFIG ) || 'DEB' === strtoupper( HTTP_ENV_CONFIG ) ) {\n return;\n }\n\n $style = '.sucuriscan-hstatus-0 {display:none !important;}';\n wp_add_inline_style( 'sucuriscan', $style );\n },\n 99\n );\n }", "title": "" }, { "docid": "0a8898b627a6d75ae9c6847a97f2dd12", "score": "0.5726691", "text": "public function stopQuery()\n {\n // do nothing\n }", "title": "" }, { "docid": "2c7b825f7b2b9f615f6fdcd134c4fddd", "score": "0.5715833", "text": "public function disable() {\n\t\t$this->isActiveClient = false;\n\t}", "title": "" }, { "docid": "8ee60836609943d85f691ff507bfa4dc", "score": "0.5670572", "text": "public function disable()\n {\n $this->enabled = false;\n }", "title": "" }, { "docid": "8ee60836609943d85f691ff507bfa4dc", "score": "0.5670572", "text": "public function disable()\n {\n $this->enabled = false;\n }", "title": "" }, { "docid": "8ee60836609943d85f691ff507bfa4dc", "score": "0.5670572", "text": "public function disable()\n {\n $this->enabled = false;\n }", "title": "" }, { "docid": "e376d9cf17bba881b8c8437fbad1f1f7", "score": "0.56199545", "text": "public static function disable(): void\n {\n static::$currentlyEnabled = false;\n }", "title": "" }, { "docid": "ef990fea93888e3b0cc73b374df30d8d", "score": "0.56086785", "text": "protected function unableQuery(){\n\t\t$this->form['unableQuery'] = true;\n\t}", "title": "" }, { "docid": "235a392f22e89ced6e48cd0c87106d62", "score": "0.5601017", "text": "private function __validate_monitor_disable() {\n if ($this->initial_data['monitor_disable'] === true) {\n $this->validated_data[\"monitor_disable\"] = \"\";\n }\n }", "title": "" }, { "docid": "b64f56c8fb71dc6317117cf7b991514b", "score": "0.54735756", "text": "public function actionDisable()\n {\n $this->_checkCsrfFromToken($this->_input->filterSingle('_xfToken', XenForo_Input::STRING));\n\n $widgetId = $this->_input->filterSingle('widget_id', XenForo_Input::UINT);\n return $this->_switchWidgetActiveStateAndGetResponse($widgetId, 0);\n }", "title": "" }, { "docid": "9911c6dfe483b24a8e2b367547bcf168", "score": "0.5470572", "text": "public function hide()\n {\n Application::executeControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), \"hide\", Application::PRIORITY_LOW);\n }", "title": "" }, { "docid": "d1bb8dd552a7bb7e80d32f06df1287fc", "score": "0.54438466", "text": "function deactivate()\n\t{\n\t\t\n\t#\tglobal $wpdb;\n\t#\t$wpdb->query(\"DROP TABLE `\".$wpdb->base_prefix.\"wsm_monitor_index`\");\n\t\t\n\t\tdo_action( self::$WPB_PREFIX.'_deactivate' );\n\t}", "title": "" }, { "docid": "bc23e84c0328dc66667d21289acde462", "score": "0.5442602", "text": "public function disable()\n {\n // TODO: Implement disable() method.\n }", "title": "" }, { "docid": "dba481780d8779d3453f4f1bc591ad0a", "score": "0.54277587", "text": "public function disable()\n {\n $this->_client->connector->getLoop()->cancelTimer($this->_timer);\n }", "title": "" }, { "docid": "a1ce1aaeee5c7fad315403a5ff134c17", "score": "0.54207385", "text": "public function disableBufferedQueries(): void {\n\t\t\t$this->pdo->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false);\n\t\t}", "title": "" }, { "docid": "fac64d9cb4314f928d9191cbb770a743", "score": "0.539918", "text": "public function onDisable() {\r\n // removeFromConfig('Shariff');\r\n }", "title": "" }, { "docid": "648d7f031d32f5c0d7348b7712dc9217", "score": "0.53959316", "text": "function disable_debugging() {\n\tglobal $CFG;\n\t$CFG->debug = $CFG->debug | 0x80000000; // switch the sign bit in integer number ;-)\n}", "title": "" }, { "docid": "d42db19152fef07befbd07c457d91a54", "score": "0.5379738", "text": "public function Disable()\n {\n $this->CallJqUiMethod(\"disable\");\n }", "title": "" }, { "docid": "e8f72e474a35e27c1e2c9f87cc305503", "score": "0.5352742", "text": "public function disableEvents(): void\n {\n $this->client->disableEvents();\n }", "title": "" }, { "docid": "968e84d23bfaa6e0fc6584202d5b0053", "score": "0.53481215", "text": "function disable(){\n $this->info = array(\n 'event' => 'false'\n );\n }", "title": "" }, { "docid": "32fcb2534f414bf3457807c96b40915a", "score": "0.5347179", "text": "public function disableDebug(): void {\n $this->debug = false;\n }", "title": "" }, { "docid": "f501dcbe786eeea169d6509ea6fba9c6", "score": "0.53316367", "text": "public function disable(): void\n {\n $this->disabled = true;\n }", "title": "" }, { "docid": "7999dae5cacff88f86c5c27a917111d7", "score": "0.52820665", "text": "public function OnDisable() {\n\t}", "title": "" }, { "docid": "bdc98ebc80c8e713f1497a402dd8461d", "score": "0.525743", "text": "private static function stopListening() {\n\t\tforeach (config('database') as $connectionName => $config) {\n\t\t\t$handler = static::getHandler($connectionName);\n\t\t\t$database = DatabaseFacade::connection($connectionName)->getDatabase();\n\t\t\t$database->remove('query', $handler);\n\t\t}\n\t}", "title": "" }, { "docid": "44e5fdff28263929605d550e211f9f99", "score": "0.52506655", "text": "protected static function disableDeferredActionsMode()\n\t{\n\t\tstatic::$deferredActionsMode = false;\n\t}", "title": "" }, { "docid": "b3a2313593696990cf4ca0fa714298ce", "score": "0.5237117", "text": "public function stopQuery()\n\t{\n\t}", "title": "" }, { "docid": "884da4c39a561eed891a6939424008ed", "score": "0.5229265", "text": "public function hideFilters()\r\n {\r\n $this->showFilters = false;\r\n }", "title": "" }, { "docid": "6c5d0de2ae90cdd7574ca7c385ba35e4", "score": "0.52141166", "text": "private function disable(): void\n {\n $this->disabledAt = new \\DateTime('now');\n }", "title": "" }, { "docid": "86e148fb88656001fb7c08d68d47aa0b", "score": "0.5213876", "text": "public function disableDeployMode() : void;", "title": "" }, { "docid": "d3ddfad982f80a9256b0d68f0bb1fa04", "score": "0.5204716", "text": "public function disable() {\n\t\tif (!$this->enabled) {\n\t\t\treturn;\n\t\t}\n\t\t$this->enabled = false;\n\t\tif ($this->bound) {\n\t\t\t$this->bound->each('disable');\n\t\t}\n\t}", "title": "" }, { "docid": "bb6345620bd2fec98260c53b4033c17b", "score": "0.5178889", "text": "public function stopQuery()\n {\n $this->logger->debug($this->getQuery(), [$this->getExecutionTime()]);\n }", "title": "" }, { "docid": "b922670df51d354a3acd353c95718e44", "score": "0.5175988", "text": "public function executeDisable(): bool\n {\n return true;\n }", "title": "" }, { "docid": "f0a6b8e2e394d2ca06af57b0daeb8301", "score": "0.5172308", "text": "public function disableSchemaManager(): void\n {\n $this->useSchemaManager = false;\n }", "title": "" }, { "docid": "9d47854cd4b51b449ca2fa01eea4a59b", "score": "0.5168311", "text": "public static function disable(): void {\n\t\t// Close comments on the front-end\n\t\tadd_filter( 'comments_open', '__return_false', 20, 2 );\n\t\tadd_filter( 'pings_open', '__return_false', 20, 2 );\n\n\t\t// Hide existing comments\n\t\tadd_filter( 'comments_array', '__return_empty_array', 10, 2 );\n\n\t\t// Remove comments from admin menu\n\t\tadd_action( 'admin_menu', function () {\n\t\t\tremove_menu_page( 'edit-comments.php' );\n\t\t} );\n\n\t\t// Remove comments from admin bar\n\t\tadd_action( 'wp_before_admin_bar_render', function () {\n\t\t\tglobal $wp_admin_bar;\n\t\t\t$wp_admin_bar->remove_menu( 'comments' );\n\t\t} );\n\n\t\tadd_action( 'admin_init', function () {\n\t\t\t// Redirect any user trying to access comments page\n\t\t\tglobal $pagenow;\n\n\t\t\tif ( $pagenow === 'edit-comments.php' ) {\n\t\t\t\twp_safe_redirect( admin_url() );\n\t\t\t\texit;\n\t\t\t}\n\n\t\t\t// Remove comments from dashboard\n\t\t\tremove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );\n\n\t\t\t// Disable support for comments and trackbacks in post types\n\t\t\tforeach ( get_post_types() as $post_type ) {\n\t\t\t\tif (post_type_supports( $post_type, 'comments' ) ) {\n\t\t\t\t\tremove_post_type_support( $post_type, 'comments' );\n\t\t\t\t\tremove_post_type_support( $post_type, 'trackbacks' );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\t// Remove comments links from admin bar\n\t\tadd_action( 'init', function () {\n\t\t\tif ( is_admin_bar_showing() ) {\n\t\t\t\tremove_action( 'admin_bar_menu', 'wp_admin_bar_comments_menu', 60 );\n\t\t\t}\n\t\t} );\n\t}", "title": "" }, { "docid": "06afc1930b6de9c184e2fc8c922705e3", "score": "0.5158193", "text": "public function stopQuery()\n {\n\n }", "title": "" }, { "docid": "5f231df72ef8563580c8e4db50d7836f", "score": "0.515748", "text": "public function run()\n {\n DB::disableQueryLog();\n parent::run();\n }", "title": "" }, { "docid": "8b8b735f7f1d2bb525b6b85663909590", "score": "0.51480156", "text": "public function disableMiddleware()\n {\n $this->client->disableMiddleware();\n }", "title": "" }, { "docid": "4e13317c3a22839efc29c76af6fccc88", "score": "0.5140852", "text": "public function hide_schema_color_admin() {\n $currentUser = wp_get_current_user();\n \n if ($currentUser->caps[\"subscriber\"]) {\n remove_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' );\n }\n }", "title": "" }, { "docid": "6353a4e0b75b3689a562d2030f8aa474", "score": "0.5133558", "text": "private function blacklistAdminRoutesOnFrontend()\n {\n if (! $this->app['inBackend']) {\n $this->app['config']->set('ziggy.blacklist', ['admin.*']);\n }\n }", "title": "" }, { "docid": "c2b831e950009c700f830c7f79c3475f", "score": "0.51206774", "text": "private static function disableCommentsDashboard()\n {\n add_action('admin_init', function () {\n remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');\n });\n }", "title": "" }, { "docid": "7110395fc7ef31331fe17d49978550fa", "score": "0.51192725", "text": "public function setNoDisptachFlag(){\n $request = Mage::app()->getRequest();\n $action = $request->getActionName();\n Mage::app()->getFrontController()->getAction()->setFlag($action, Mage_Core_Controller_Varien_Action::FLAG_NO_DISPATCH, true);\n }", "title": "" }, { "docid": "c6e879ad705892bd4513667246f7bbb5", "score": "0.51049066", "text": "public function disableModelEvents(): void\n {\n $this->client->disableModelEvents();\n }", "title": "" }, { "docid": "29de991cd68eb0cd38006bf4e7da5981", "score": "0.5078478", "text": "public function setDiagnosticsDisabled(?bool $value): void {\n $this->getBackingStore()->set('diagnosticsDisabled', $value);\n }", "title": "" }, { "docid": "38d80a872ecd63c1ab03b6662a254bee", "score": "0.5069748", "text": "public function disableRuntimeCache() {}", "title": "" }, { "docid": "4cae30cb421960c4fad4b705a678d5c8", "score": "0.50684094", "text": "function deactivate_watchimon() {\n\trequire_once plugin_dir_path( __FILE__ ) . 'includes/class-watchimon-deactivator.php';\n\tWatchimon_Deactivator::deactivate();\n}", "title": "" }, { "docid": "f3774cce44d47ab9c7522160e01874ec", "score": "0.5067527", "text": "static function deactivate() {\n\t\t// Disable CRON\n\t}", "title": "" }, { "docid": "06b9fadcf818b7ed3f1b82db19e99d46", "score": "0.5056678", "text": "public function disableHooks();", "title": "" }, { "docid": "2777a17e46bb1af324ae644765c10254", "score": "0.50511825", "text": "function disable() {\n\t\t\n\t\t$this->active = false;\n\t\t\n\t}", "title": "" }, { "docid": "16a992c9750c0058498ef447b3190124", "score": "0.50391597", "text": "public function dashboard_performance_disabled_metabox() {\r\n\t\t$run_url = add_query_arg(\r\n\t\t\tarray(\r\n\t\t\t\t'run' => 'true',\r\n\t\t\t\t'type' => 'performance',\r\n\t\t\t),\r\n\t\t\tUtils::get_admin_menu_url()\r\n\t\t);\r\n\t\t$run_url = wp_nonce_url( $run_url, 'wphb-run-dashboard' );\r\n\r\n\t\t$this->view( 'dashboard/performance/disabled-meta-box', compact( 'run_url' ) );\r\n\t}", "title": "" }, { "docid": "7518b579890330285e39dd37525ee46b", "score": "0.502989", "text": "protected function disableInnoDbStats()\n {\n $sql = \"show global variables like 'innodb_stats_on_metadata'\";\n try {\n $results = $this->adapter->query($sql, Adapter::QUERY_MODE_EXECUTE);\n $row = $results->current();\n $value = strtoupper($row['Value']);\n // if 'on' no need to do anything\n if ($value != 'OFF') {\n $this->mysql_innodbstats_value = $value;\n // disabling innodb_stats\n $this->adapter->query(\"set global innodb_stats_on_metadata='OFF'\", Adapter::QUERY_MODE_EXECUTE);\n }\n } catch (\\Exception $e) {\n // do nothing, silently fallback\n }\n }", "title": "" }, { "docid": "8e30bdaff8562e4c2eab9f71c2ce71d1", "score": "0.5027559", "text": "protected function addWithoutNotApproved(Builder $builder): void\n {\n $builder->macro('withoutNotApproved', function (Builder $builder) {\n return $builder->withoutGlobalScope($this)->where('is_approved', 1);\n });\n }", "title": "" }, { "docid": "0c2c766d8b44af15458e1bfa8d6b7e33", "score": "0.502657", "text": "public function suspended(): QueryInterface;", "title": "" }, { "docid": "7259f969c9747b999d20cb8b4b4ffe37", "score": "0.5026455", "text": "public function stopQuery()\n {\n $this->logger->info(\n sprintf('Doctrine: %s', $this->sql),\n array(\n 'executionTime' => number_format((microtime(true) - $this->startTime), 5),\n 'params' => $this->params,\n 'types' => $this->types\n )\n );\n }", "title": "" }, { "docid": "ea4d9a369d462e938f8cff15fa3a6c02", "score": "0.5020612", "text": "public function deactivate() {\n\t\tadd_action( 'plugins_loaded', 'flush_rewrite_rules' );\n\t}", "title": "" }, { "docid": "a19d72ecc0deab47b371328e51035f9e", "score": "0.50201535", "text": "public static function distinctQueryOff(){\n\t\tself::$QUERY_DISTINCT = false;\n\t}", "title": "" }, { "docid": "ddb8ab5ec4e79e64bd7ee06c1de02873", "score": "0.5010981", "text": "protected function addWithoutDrafted(Builder $builder): void\n {\n $builder->macro('withoutDrafted', function (Builder $builder) {\n return $builder->withoutGlobalScope($this)->where('is_drafted', 0);\n });\n }", "title": "" }, { "docid": "71aabdac7734d763fb362a5484e83f72", "score": "0.5009603", "text": "public static function deactivate()\n {\n // Do nothing\n }", "title": "" }, { "docid": "1e2866f31aa2277bf8dadb0aa655a1b7", "score": "0.5009422", "text": "public function stopQuery()\n {\n\n $this->getDebugger()->addProtocol(\n number_format(( $this->getDebugger()->getTimeGap() - $this->Data[3] ) * 1000, 3, ',', '')\n );\n }", "title": "" }, { "docid": "f703bd5121500208985ad12ca06a0151", "score": "0.49806023", "text": "public function gsmDisable(){\r\n\t\t\r\n\t\t$sql=$this->db->query(\"SELECT gsm.gsm_id, gsm.gsm_number, gsm.gsm_imsi_number, gsm.gsm_iccid_number, vendor.vendor_name,\r\n gsm.gsm_received_by, gsm.gsm_received_date, gsm.gsm_activated_date, gsm.gsm_activated_by, gsm.gsm_install_date,\r\n gsm.gsm_install_by, gsm.gsm_uninstall_date, gsm.gsm_uninstall_by, gsm.gsm_disable_date, gsm.gsm_disable_by, \r\n gsm.status FROM gsm JOIN vendor ON gsm.vendor_id=vendor.vendor_id WHERE status = 'Disable'\");\r\n\t\treturn $sql;\r\n\r\n\t}", "title": "" }, { "docid": "bd46ada760e276848a42417bb142d7b8", "score": "0.49671152", "text": "public function typesNone()\n {\n $this->filters = [\n '--set',\n 'disable'\n ];\n }", "title": "" }, { "docid": "134cf9f3eae5354773b08e8fdd09c572", "score": "0.4961755", "text": "function beacon_disable_comments_dashboard() {\n remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');\n}", "title": "" }, { "docid": "2ee6bc5fc453482ae9207da1e19d52db", "score": "0.49542168", "text": "public function disableCache();", "title": "" }, { "docid": "fdd9edb6c89835c5d527d0c315200843", "score": "0.4951215", "text": "function disableApi() {\n\t\t$this->enableAgent = FALSE;\n\t\t$this->save();\n\t\treturn $this->enableAgent === FALSE;\n\t}", "title": "" }, { "docid": "219a57e4914d31330805c25c538eb864", "score": "0.49474356", "text": "function disable_admin_bar() {\n\t\\add_filter('show_admin_bar', '__return_false');\n}", "title": "" }, { "docid": "f141603a83638ced55f0c43312878d3c", "score": "0.49402487", "text": "public function disableDebug(){\n\t\treturn $this->oauth->disableDebug();\n\t}", "title": "" }, { "docid": "a53045b8a3d4745cc88862a16c732ac6", "score": "0.493777", "text": "public static function hideAdminBar() {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "86b2b41e6870492a24e21a248736b317", "score": "0.49193984", "text": "function df_disable_comments_dashboard() {\n remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');\n}", "title": "" }, { "docid": "5bf46eb993ae174ee1e3b6e708b06da4", "score": "0.49045458", "text": "public static function deactivate() {\n }", "title": "" }, { "docid": "0582d53bae4ca71decbf8c22462a60ba", "score": "0.4903403", "text": "protected abstract function disableDatabaseLogging();", "title": "" }, { "docid": "711a5c79dd47005f66cf8ca075d8edb0", "score": "0.48962966", "text": "protected function disableWrapper() {\n $this->wrapperSupported = FALSE;\n }", "title": "" }, { "docid": "3975645c4f07d06af7b4952d56b169a3", "score": "0.48932332", "text": "private function disableCachePlugins()\n {\n define('DONOTCACHEPAGE', true);\n global $hyper_cache_stop;\n $hyper_cache_stop = true;\n add_filter('w3tc_can_print_comment', '__return_false');\n }", "title": "" }, { "docid": "21e2adde2dc418183d4b8666b876da8f", "score": "0.48756695", "text": "protected function disableCache() {}", "title": "" }, { "docid": "47ca0268e5fff4a31cd9d61d43145ecf", "score": "0.48682305", "text": "protected function toggleDisableAction() : void {}", "title": "" }, { "docid": "5c06dbd084129a97b97b3cf0b1f0dd5f", "score": "0.48602873", "text": "public function maybe_deactivate_minify_on_rest() {\r\n\t\t$excluded_requests = array(\r\n\t\t\t'cs_preview_state', // Cornerstone builder request key.\r\n\t\t\t'elementor-preview', // Elementor's request key.\r\n\t\t\t'ct_builder', // Oxygen builder.\r\n\t\t);\r\n\r\n\t\t$exclude = ! empty( array_intersect( $excluded_requests, array_keys( $_REQUEST ) ) );\r\n\r\n\t\tif ( $exclude ) {\r\n\t\t\t$this->deactivate_minify_module();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "8b2253beb17a9c6c7df2c0b2f4132292", "score": "0.48551834", "text": "public function deactivate_minify_module() {\r\n\t\tadd_filter( 'wp_hummingbird_is_active_module_minify', '__return_false', 500 );\r\n\t}", "title": "" }, { "docid": "0a0350387571e88a045463b9b0646c2b", "score": "0.48538238", "text": "protected function appsero_optin() {\n if ( ! class_exists( '\\Appsero\\Client' ) ) {\n return;\n }\n\n $client = new \\Appsero\\Client( '8f0a1669-b8db-46eb-9fc4-02ac5bfe89e7', 'Dokan Pro', DOKAN_PRO_FILE );\n\n $insights = $client->insights();\n $insights->hide_notice()->init();\n $insights->optin();\n }", "title": "" }, { "docid": "5ebb7decdd78443f1f6857b6bb19d934", "score": "0.48460573", "text": "function disablefunction(){\n \t\t$this->changeModuleState('mod_xiuslisting',false);\n \t\t\n \t\t//Disable xipt plugins\n\t\t$this->changePluginState('xipt_community', false);\n\t\t$this->changePluginState('xipt_system', false);\n\t\t\n\t\t//Disable xipt_privacy plugin\n\t\t$this->changePluginState('xipt_privacy', false);\n\t}", "title": "" }, { "docid": "f601870d4c882e08045b820c47bb5d2c", "score": "0.484035", "text": "protected function addOnlyDeactivated(Builder $builder)\n {\n $builder->macro('onlyDeactivated', function (Builder $builder) {\n /**\n * @var \\Illuminate\\Database\\Eloquent\\Model|Deactivates $model\n */\n $model = $builder->getModel();\n $builder->withoutGlobalScope($this)->whereNotNull(\n $model->getQualifiedDeactivateAtColumn()\n );\n\n return $builder;\n });\n }", "title": "" }, { "docid": "7500c658b3cea1b83eaf0b1de7739d90", "score": "0.48381564", "text": "public function userwidgetAction()\n {\n $this->_helper->layout()->disableLayout();\n }", "title": "" }, { "docid": "916efb795beb4c05972b18910844a212", "score": "0.4835845", "text": "static function deactivate() {\n delete_option(WF_GMP_OPTIONS_KEY);\n delete_option(WF_GMP_MAPS_KEY);\n }", "title": "" }, { "docid": "ffe3d3a8c1c5690f6d02e663f06ba20d", "score": "0.48307794", "text": "public function onDisable() {\r\n foreach ($this->npcs as $npc) {\r\n $this->despawnNPC($npc[\"npc_id\"]);\r\n }\r\n $this->getLogger()->info(\"Citizens by Redux now disabled.\");\r\n }", "title": "" }, { "docid": "54fa1f04cad04fec716fa4a5ea12d6b0", "score": "0.48223248", "text": "public function hideForm()\n {\n $this->show_form = false;\n }", "title": "" }, { "docid": "ceada62e9c95da45087c5b7d1c643da1", "score": "0.4817443", "text": "function disable_default_dashboard_widgets() {\n\tremove_meta_box( 'dashboard_right_now', 'dashboard', 'core' ); \n\tremove_meta_box( 'dashboard_recent_comments', 'dashboard', 'core' );\n\tremove_meta_box( 'dashboard_incoming_links', 'dashboard', 'core' );\n\tremove_meta_box( 'dashboard_plugins', 'dashboard', 'core' );\n\n\tremove_meta_box('dashboard_quick_press', 'dashboard', 'core' );\n\tremove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'core' );\n\tremove_meta_box( 'dashboard_primary', 'dashboard', 'core' );\n\tremove_meta_box( 'dashboard_secondary', 'dashboard', 'core' );\n}", "title": "" }, { "docid": "92d7593de0e1ac6d6e974bf7dc905ecb", "score": "0.48111692", "text": "function edgemm_hide_admins($user_search) {\r\n $user = wp_get_current_user();\r\n if (!current_user_can('administrator')) {\r\n global $wpdb;\r\n\r\n $user_search->query_where = \r\n str_replace('WHERE 1=1', \r\n \"WHERE 1=1 AND {$wpdb->users}.ID IN (\r\n SELECT {$wpdb->usermeta}.user_id FROM $wpdb->usermeta \r\n WHERE {$wpdb->usermeta}.meta_key = '{$wpdb->prefix}capabilities'\r\n AND {$wpdb->usermeta}.meta_value NOT LIKE '%administrator%')\", \r\n $user_search->query_where\r\n );\r\n }\r\n}", "title": "" }, { "docid": "76c53a5e239dee43b2ca41d67a30029b", "score": "0.48080206", "text": "protected function getQueryBuilderForDemand() : QueryBuilder {}", "title": "" }, { "docid": "0c18140112cb6e0de855dda4dd96e432", "score": "0.48072928", "text": "public function woocommerce_admin_disabled()\n {\n add_filter('woocommerce_admin_disabled', '__return_true', PHP_INT_MAX);\n }", "title": "" }, { "docid": "19d59200cf546b0b1ae263af3382b65a", "score": "0.48017558", "text": "public static function disable()\n {\n stream_wrapper_restore('http');\n stream_wrapper_restore('https');\n\n self::$enabled = false;\n }", "title": "" }, { "docid": "2d429a0e7154e33543c5475e774f1fc9", "score": "0.47982457", "text": "function df_disable_comments_dashboard() {\n\tremove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );\n}", "title": "" }, { "docid": "e54e75f67b07003142432d8469a31480", "score": "0.47981015", "text": "public static function disableRegistration() {\n self::$registration_enabled = false;\n }", "title": "" }, { "docid": "66d7b8227d3dc9af2958d811b65ae707", "score": "0.47898716", "text": "static function deactivate() {\n\t\t}", "title": "" } ]
4783caaca126aa9db56af40c91bf0578
It's called for Contains and Starts with searches
[ { "docid": "31910b6caaa85d8967ead89dca55df33", "score": "0.0", "text": "public function field2char($value, $type = 3)\r\n\t{\r\n\t\treturn $value;\r\n\t}", "title": "" } ]
[ { "docid": "cf9413bcf5813b9a252abfc77a775f02", "score": "0.66690826", "text": "public function containsStartsWith($word);", "title": "" }, { "docid": "93c17b60be7caca51e4566cc88c37273", "score": "0.6383305", "text": "public function testStartsWith()\n {\n $this->assertSame(true, String::startsWith('Rararara', 'R'));\n $this->assertSame(true, String::startsWith('Wararara', 'War'));\n $this->assertSame(false, String::startsWith('Rararara', 'ar'));\n }", "title": "" }, { "docid": "358baf35ae49dda112a63b97ef2dd9cb", "score": "0.6371804", "text": "function startswith($sub) {\n foreach(func_get_args() as $sub) {\n $s = STD\\str($sub);\n $p = $this->find($s);\n if($p === 0)\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "76e60206e9295323fd6822b466349ec0", "score": "0.6350832", "text": "public function search(){}", "title": "" }, { "docid": "8d825b3e1ee1d5772f015d6d648718e9", "score": "0.6327961", "text": "function starts_with($haystack, $needles)\r\n {\r\n foreach ((array)$needles as $needle)\r\n {\r\n if ($needle != '' && strpos($haystack, $needle) === 0) return true;\r\n }\r\n\r\n return false;\r\n }", "title": "" }, { "docid": "51523d8111620b45da4b189d83cc7fb2", "score": "0.6322861", "text": "public function search();", "title": "" }, { "docid": "e00e57b688049e5bbae0943a8ebd8598", "score": "0.63160104", "text": "public function providerStartsWith(): array\n {\n return [\n // positive check\n 'empty strings' => [true, '', ''],\n 'starts with null' => [true, '', null],\n 'starts with empty string' => [true, 'string', ''],\n 'starts with a space' => [true, ' string', ' '],\n 'fully identical strings' => [true, 'abc', 'abc'],\n 'fully identical multibyte strings' => [true, 'Bürger', 'Bürger'],\n 'starts with multibyte symbols' => [true, '我Я multibyte', '我Я'],\n 'starts with ascii and multibyte symbols' => [true, 'Qנטשופ צרכנות', 'Qנ'],\n 'starts with multibyte symbol ไ' => [true, 'ไทย.idn.icann.org', 'ไ'],\n 'starts with hex code' => [true, '!?+', \"\\x21\\x3F\"],\n 'hex code starts with ascii symbols' => [true, \"\\x21?+\", '!?'],\n // false-positive check\n 'empty string and a space' => [false, '', ' '],\n 'a space and two spaces' => [false, ' ', ' '],\n 'case-sensitive check' => [false, 'Abc', 'a'],\n 'needle is longer' => [false, 'Abc', 'Abcde'],\n 'one of the symbols of the needle is not equal' => [false, 'abc', 'abe'],\n 'contains, but not starts with' => [false, 'abc', 'b'],\n 'contains, but not starts with again' => [false, 'abc', 'c'],\n 'case-sensitive check with multibyte symbol' => [false, 'üЯ multibyte', 'Üя multibyte'],\n ];\n }", "title": "" }, { "docid": "43413550098d0c128f6cbf4a9faaa589", "score": "0.6309454", "text": "function str_starts_with($haystack, $needles)\n {\n foreach ((array)$needles as $needle) {\n if ($needle !== '' && substr($haystack, 0, strlen($needle)) === (string)$needle) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "eb3f674c2402470c96d99a175d6bb524", "score": "0.62633884", "text": "function startswith($haystack, $needle)\r\n{\r\n return !strncmp($haystack, $needle, strlen($needle));\r\n}", "title": "" }, { "docid": "4a2953092009f442debcb0c0fc158baa", "score": "0.6255553", "text": "public function search()\n\t{\t\t\t\t\n\t\t\n\t}", "title": "" }, { "docid": "045264b6c43a1d5fa650c0bd6edde201", "score": "0.6242722", "text": "public function search()\n\t{\n\n\t}", "title": "" }, { "docid": "05fac99a0a5ce1a8690a60bb4e87457f", "score": "0.6239855", "text": "public function doSearch();", "title": "" }, { "docid": "0485c3c4e12ac4553c9f83b1e1f91b1f", "score": "0.62206733", "text": "function starts_with($haystack, $needles)\n {\n foreach ((array) $needles as $needle) {\n if ($needle !== '' && substr($haystack, 0, strlen($needle)) === (string) $needle) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "935f5a699f647b7d0defaae15d57bf5e", "score": "0.6214908", "text": "public function test_starts_with_insensitive()\n {\n $this->assertFalse(starts_with_insensitive('eight hundred', null));\n $this->assertFalse(starts_with_insensitive('eight hundred', ''));\n $this->assertTrue(starts_with_insensitive('eight hundred', 'eigh'));\n $this->assertTrue(starts_with_insensitive('eight hundred', 'EiGh'));\n $this->assertTrue(starts_with_insensitive('eight hundred', 'e'));\n $this->assertTrue(starts_with_insensitive('eight hundred', 'E'));\n $this->assertFalse(starts_with_insensitive('eight hundred', 'EN'));\n $this->assertFalse(starts_with_insensitive('eight hundred', 'eight hundred pounds'));\n }", "title": "" }, { "docid": "f183c12b2b3799e5ecd519f68232e200", "score": "0.6174906", "text": "function startsWith($haystack, $needle)\n{\n return $needle === \"\" || strpos($haystack, $needle) === 0;\n}", "title": "" }, { "docid": "f183c12b2b3799e5ecd519f68232e200", "score": "0.6174906", "text": "function startsWith($haystack, $needle)\n{\n return $needle === \"\" || strpos($haystack, $needle) === 0;\n}", "title": "" }, { "docid": "1cf5cf2e3146c8e455bd3050486f1ff9", "score": "0.6174505", "text": "function begin_with($field, $value) {\r\n\t\t\treturn sql_criteria::upper($field).' LIKE '.\"'$value%'\";\r\n\t\t}", "title": "" }, { "docid": "74c02f4becff1c3ce84f0f537b2ec3c9", "score": "0.61143005", "text": "function starts_with($haystack, $needles)\n {\n return Str::startsWith($haystack, $needles);\n }", "title": "" }, { "docid": "74c02f4becff1c3ce84f0f537b2ec3c9", "score": "0.61143005", "text": "function starts_with($haystack, $needles)\n {\n return Str::startsWith($haystack, $needles);\n }", "title": "" }, { "docid": "de591727ef3a16ef3a85dff410f0dab9", "score": "0.6112368", "text": "public function search() {\n\n\t\n\t}", "title": "" }, { "docid": "7ed2b451b14f19c7ff5fe110d09f5cc9", "score": "0.60842043", "text": "function match_string($needles){\n\n if(count($needles) == 0){ \n return TRUE;\n }\n\n //see if this resource matches the search criteria\n //get the appropriate string from the subclass instance\n $search_haystack = $this->name.\" \".$this->description.\" \".$this->urlmain.\" \".\n $this->watchkeys.\" \".$this->get_search_haystack();\n \n $found = FALSE;\n\n //go through the needles and see if it matches\n foreach ($needles as $keyword) {\n $pos = strpos(strtolower($search_haystack), strtolower($keyword));\n if(is_integer($pos)){\n $found = TRUE; \n break;\n }\n }\n\n return $found;\n\n }", "title": "" }, { "docid": "8235db51fb9f8326f7bfb202ac2aaaaf", "score": "0.60613155", "text": "public function startsWith($key, $prefix){\n\n $this->setWhereKeyHashValue($key,Query::WHERE_OPT_REGEX,'^'.$prefix);\n }", "title": "" }, { "docid": "2d1b51c58fc8a05cf57110839c6f64d8", "score": "0.6045872", "text": "public function startsWith($value)\n {\n $this->searchTerms[\"starts_with\"] = strval($value);\n return $this;\n }", "title": "" }, { "docid": "6fb2022aa335ea1eef7695ca268d8625", "score": "0.6039304", "text": "public function searchCriteria();", "title": "" }, { "docid": "f98801f7121ce923f587ac81b6c7c6cb", "score": "0.6021181", "text": "public function startsWith(string $needle, bool $caseSensitive = false): bool;", "title": "" }, { "docid": "946157a46b3b53d9a726d487607bbbbc", "score": "0.59873116", "text": "public function nameStartsWith(string $needle, bool $caseSensitive = false): bool;", "title": "" }, { "docid": "c826bf9709f8899bf799c87edbffcd53", "score": "0.59692854", "text": "function startsWith($haystack, $needle) \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t return $needle === \"\" || strrpos($haystack, $needle, -strlen($haystack)) !== FALSE;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}", "title": "" }, { "docid": "136a5c84e42d30fdfda2c95fd72f95f5", "score": "0.59312123", "text": "public function searchExact()\n {\n // search for words\n\n $this->exactResults = Word::where($this->fieldsToSearch, $this->word)\n ->orderBy('rank', 'desc')->get()->toArray();\n\n if(count($this->exactResults))\n {\n return;\n }\n\n $prefix = 'ال';\n // search without ال\n\n if (substr($this->word, 0, strlen($prefix)) == $prefix)\n {\n\n //filter input string\n $str = substr($this->word, strlen($prefix));\n\n $this->exactResults = Word::where($this->fieldsToSearch, $str)\n ->orderBy('rank', 'desc')->get()->toArray();\n }\n }", "title": "" }, { "docid": "11a681dc4a77b78b0a1f31a656b77ab7", "score": "0.59288394", "text": "function StartsWith($haystack, $needle) {\n return strpos($haystack, $needle) === 0;\n}", "title": "" }, { "docid": "a222adc974c22259c1696d82c529c9db", "score": "0.5919924", "text": "public function beginsWith($value)\r\n\t{\r\n $this->operator = \"begins\";\r\n $this->value = $value;\r\n\t}", "title": "" }, { "docid": "9148a15712b31bf0801aa2f4b36eb978", "score": "0.59183925", "text": "function _contains($a,$match){\nreturn (strpos($a, $match) !== false);\t\n}", "title": "" }, { "docid": "95e254643c18b6ea2ac7b5b91ad3d126", "score": "0.5904179", "text": "function startsWith($haystack, $needle) {\n\t $length = strlen($needle);\n\t return (substr($haystack, 0, $length) === $needle);\n\t}", "title": "" }, { "docid": "c7321a48fbd074b1cc440cc7bab9f726", "score": "0.58944345", "text": "public function search()\n {\n \n }", "title": "" }, { "docid": "3196543e6df86a3269361d7110f1317f", "score": "0.58923334", "text": "function string_starts_with($string, $value) {\n return strpos($string, $value) === 0;\n}", "title": "" }, { "docid": "7feea8f8531a05b32b253256e4355d7d", "score": "0.5889632", "text": "function startsWith($_string, $_value) \n\t{\n\t\treturn $needle === \"\" || strrpos($_string, $_value, -strlen($_string)) !== FALSE;\n\t}", "title": "" }, { "docid": "aea62735926e40bede2049e45c56e1bc", "score": "0.58660614", "text": "function startsWith($string, $startString) \n{ \n $len = strlen($startString); \n return (substr($string, 0, $len) === $startString); \n}", "title": "" }, { "docid": "9b313f12907cf430fba15f2f9fb183da", "score": "0.58590573", "text": "function startsWith($str, $start) {\n $length = strlen($start);\n return (substr($str, 0, $length) == $start);\n }", "title": "" }, { "docid": "08a29df127164078507458e74307497f", "score": "0.5846211", "text": "function is_start_with($str, $start) {\n\t$result = strpos($str, $start);\n\tif ($result === false) {\n\t\treturn false;\n\t}\n\treturn ($result == 0);\n}", "title": "" }, { "docid": "8700478221ec274451aa43f2e321b8e3", "score": "0.58367634", "text": "public function find($searchString) {}", "title": "" }, { "docid": "8700478221ec274451aa43f2e321b8e3", "score": "0.58367634", "text": "public function find($searchString) {}", "title": "" }, { "docid": "e16ba9b3ab82d11797a98251c990a5fb", "score": "0.5834315", "text": "public function search($value);", "title": "" }, { "docid": "1ec8501a2d15e674161af44455680779", "score": "0.5806611", "text": "public function testLike() {\n \tif (!empty(xPDOTestHarness::$debug)) print \"\\n\" . __METHOD__ . \" = \";\n /* test LIKE %.. */\n try {\n $criteria = $this->xpdo->newQuery('Person');\n $criteria->where(array(\n 'first_name:LIKE' => '%nathon',\n ));\n $result = $this->xpdo->getCollection('Person',$criteria);\n } catch (Exception $e) {\n $this->xpdo->log(xPDO::LOG_LEVEL_ERROR, $e->getMessage(), '', __METHOD__, __FILE__, __LINE__);\n }\n $this->assertTrue(!empty($result),'xPDOQuery: LIKE %.. Clause does not find the correct result.');\n\n /* test LIKE ..% */\n try {\n $criteria = $this->xpdo->newQuery('Person');\n $criteria->where(array(\n 'first_name:LIKE' => 'John%',\n ));\n $result = $this->xpdo->getCollection('Person',$criteria);\n } catch (Exception $e) {\n $this->xpdo->log(xPDO::LOG_LEVEL_ERROR, $e->getMessage(), '', __METHOD__, __FILE__, __LINE__);\n }\n $this->assertTrue(!empty($result),'xPDOQuery: LIKE ..% Clause does not find the correct result.');\n\n /* test LIKE %..% */\n try {\n $criteria = $this->xpdo->newQuery('Person');\n $criteria->where(array(\n 'first_name:LIKE' => '%Johna%',\n ));\n $result = $this->xpdo->getCollection('Person',$criteria);\n } catch (Exception $e) {\n $this->xpdo->log(xPDO::LOG_LEVEL_ERROR, $e->getMessage(), '', __METHOD__, __FILE__, __LINE__);\n }\n $this->assertTrue(!empty($result),'xPDOQuery: LIKE %..% Clause does not find the correct result.');\n }", "title": "" }, { "docid": "b739d428592370d08479a5cceb684947", "score": "0.5805124", "text": "function mbereg_search($pattern = null, $option) {}", "title": "" }, { "docid": "73ec29b6c0961ff4155b389194922c97", "score": "0.5802262", "text": "function startsWith(string $prefix): Predicate\n{\n return new class($prefix) extends Predicate\n {\n /**\n * @var string\n */\n private $prefix;\n\n public function __construct(string $prefix)\n {\n $this->prefix = $prefix;\n }\n\n public function test($value): bool\n {\n if (!is_string($value)) {\n throw new \\InvalidArgumentException(\n 'Given value is not a string, but of type \"'\n . gettype($value) . '\"'\n );\n }\n\n return 0 === substr_compare(\n $value,\n $this->prefix,\n 0,\n strlen($this->prefix)\n );\n }\n\n public function __toString(): string\n {\n return 'starts with \\'' . $this->prefix . '\\'';\n }\n };\n}", "title": "" }, { "docid": "f9a9e01fac825eb951243eac1d846af5", "score": "0.57895195", "text": "function mystrstr_AND($text,$terms,$csence) {\n\n reset($terms);\n //while (list($word_no, $word) = each($terms)) { \n foreach ($terms as $word_no => $word) {\n if ($csence) {\n\t if ((strstr($text,$word))) continue;\n\t else return 0;\n }\n else {\n\t if ((stristr($text,$word))) continue;\n\t else return 0;\t\n\t }\n }\n \n return 1;\n }", "title": "" }, { "docid": "2026b88e92bffdd384359a6c6bf7f6a3", "score": "0.5785702", "text": "function startsWith($Haystack, $Needle){\r\n\t// Recommended version, using strpos\r\n\treturn strpos($Haystack, $Needle) === 0;\r\n}", "title": "" }, { "docid": "103fd9baf84e083441f371ef0a0083d6", "score": "0.5779777", "text": "function sql_syntax_caseless_contains($fieldname, $s)\r\n{\r\n $s = str_replace(\"\\\\\", \"\\\\\\\\\", $s);\r\n $s = str_replace(\"%\", \"\\\\%\", $s);\r\n $s = str_replace(\"_\", \"\\\\_\", $s);\r\n $s = str_replace(\"'\", \"''\", $s);\r\n return \" $fieldname LIKE '%$s%' \";\r\n}", "title": "" }, { "docid": "ff6840f50287ac4db58c97a263ce063c", "score": "0.5756915", "text": "function str_starts_with($haystack, $needle) {\n\t\treturn (string)$needle !== '' && strncmp($haystack, $needle, strlen($needle)) === 0;\n\t}", "title": "" }, { "docid": "dc873399e2f9ad963e7854a3ed276a73", "score": "0.5738343", "text": "function contains($pattern);", "title": "" }, { "docid": "6a3e7d01763fd7e93d42c4d787244551", "score": "0.57279444", "text": "public function beginsWith(string ...$starts): bool\n {\n foreach ($starts as $start) {\n if (mb_substr(\n $this->text,\n 0,\n (int)mb_strlen($start, $this->encoding),\n $this->encoding\n ) === $start) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "0bf9eb2f29f7c2aa9a7da05b6c1e1e5f", "score": "0.57254934", "text": "function mystrstr_ASIS($text,$terms,$csence) {\n if ($csence) {\n\t if (strstr($text,$terms)) return (1);\n }\n else { \n if (stristr($text,$terms)) return (1);\n }\n \n return 0;\n }", "title": "" }, { "docid": "59510bc5fc3c6691ecd830e0df5bf4e2", "score": "0.57218325", "text": "public function search()\n {\n\n }", "title": "" }, { "docid": "b850aaa1975531b78929d1c15d77daa7", "score": "0.5718814", "text": "function startsWith( $str, $sub ) {\n\t\treturn ( substr( $str, 0, strlen( $sub ) ) === $sub );\n\t}", "title": "" }, { "docid": "ba2a4a3d7fb503bea77c5957fdb66c06", "score": "0.57187206", "text": "function startsWith($haystack, $needle)\r\n{\r\n return $needle === \"\" || strrpos($haystack, $needle, -strlen($haystack)) !== FALSE;\r\n}", "title": "" }, { "docid": "85b2ca8740bedbe915c8305525cf4440", "score": "0.5718546", "text": "public function searchMember() {\n\t\n\t}", "title": "" }, { "docid": "f3473db6b394cc96c290263e130f8cb9", "score": "0.57127047", "text": "public function search($keywords);", "title": "" }, { "docid": "9e94e0f7f6731f0774aeffcbe428c8e3", "score": "0.57083064", "text": "function iil_StartsWith($string, $match){\n\tif ($string[0]==$match[0]){\n\t\t$pos=strpos($string, $match);\n\t\tif ( $pos === false) return false;\n\t\telse if ( $pos == 0) return true;\n\t\telse return false;\n\t}else{\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "c7ae8daafebfe5be1f02916b76f150a1", "score": "0.5698467", "text": "function str_starts_with($haystack, $needle) {\n\tif(strlen($haystack)<strlen($needle))return false;\n\treturn substr($haystack,0,strlen($needle))==$needle;\n}", "title": "" }, { "docid": "ab5f91e1f3c213c9ec58c84c9741ba44", "score": "0.5688316", "text": "function bf_starts_with( $haystack, $needle ) {\n\n\t\treturn $needle === '' || strrpos( $haystack, $needle, - strlen( $haystack ) ) !== false;\n\t}", "title": "" }, { "docid": "318c8e6f8f27b6f9ed27631a22066bc8", "score": "0.5686356", "text": "function starts_with($haystack, $needle) {\n return $needle === \"\" || strrpos($haystack, $needle, -strlen($haystack)) !== false;\n \n }", "title": "" }, { "docid": "11d51820b4bdb46a59f6a9dbe27eaa66", "score": "0.5686329", "text": "function emp_get_string_starts_with($haystack, $needle)\n{\n $length = strlen($needle);\n return (substr($haystack, 0, $length) === $needle);\n}", "title": "" }, { "docid": "ee1a2de69670a36dfabf10255c1dea4d", "score": "0.56536305", "text": "function is_contains($heystack, $needles = array())\n{\n $result = array();\n\n foreach ($needles as $needle) {\n $result[] = strpos($heystack, $needle) !== false; \n }\n\n return in_array(true, $result);\n}", "title": "" }, { "docid": "7c94f9fc725b0406f437fd1ade6610c4", "score": "0.56471384", "text": "function str_contains($needles, $haystack)\n {\n foreach ((array) $needles as $needle) {\n if ($needle != '' && mb_strpos($haystack, $needle) !== false) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "ae0b92dfda574256b2de9ca541119620", "score": "0.5646454", "text": "function starts_with($subject, $prefix) {\n if (\\strlen($subject) < \\strlen($prefix))\n return false;\n return (\\substr($subject, 0, \\strlen($prefix)) === $prefix);\n}", "title": "" }, { "docid": "0282ebaac670d3d392676afa7d7be02d", "score": "0.56435734", "text": "function startsWith($haystack, $needle) {\r\n return $needle === \"\" || strrpos($haystack, $needle, -strlen($haystack)) !== FALSE;\r\n}", "title": "" }, { "docid": "01a83b2eba960b668b2f76007b696f59", "score": "0.56273466", "text": "public function testPrefixQuery()\n {\n /** @var Repository $repo */\n $repo = $this->getManager()->getRepository('AcmeTestBundle:Product');\n $prefix = new PrefixQuery('title', 'f', ['boost' => 2.0]);\n $search = $repo->createSearch()->addQuery($prefix);\n\n $results = $repo->execute($search, Repository::RESULTS_ARRAY);\n\n $expected = [\n [\n 'title' => 'foo',\n ],\n ];\n\n $this->assertEquals($expected, $results);\n }", "title": "" }, { "docid": "f0ec8fc9948e0036f26f4623026c86c5", "score": "0.5620911", "text": "public function startsWith($prefix)\n {\n //app\n $this->_check($this->root, $prefix);\n }", "title": "" }, { "docid": "e4175b13767fbcd3703086ae8925c95c", "score": "0.56090665", "text": "public function like()\n\t{\t\n\t\t$args = func_get_args();\n\t\t$search_key = $args[0];\n\t\t$this->op = [];\n\t\tif(is_string($search_key))\n\t\t{\n\t\t\t$search_value = $args[1];\n\t\t\t$op = array_filter($this->source, function($src) use ($search_key, $search_value){\n\t\t\t\t\treturn isset($src[$search_key]) && preg_match('/'.$search_value.'/', $src[$search_key]);\n\t\t\t},ARRAY_FILTER_USE_BOTH);\n\t\t\t$this->source = $op;\n\t\t}\n\t\t$preserve = isset($args[3]) && $args[3] ? TRUE : FALSE;\n\t\t$this->_preserve_keys($op, $preserve);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "bd4c9791d646e626013790e2871eab0d", "score": "0.560662", "text": "public function search($name);", "title": "" }, { "docid": "b85e67c84c73b7f57bdb9fc26fe36e85", "score": "0.5604277", "text": "abstract function search($search);", "title": "" }, { "docid": "8f6e8f1124a2760bd59e2edc78d7f48e", "score": "0.5602654", "text": "function startsWith($haystack, $needle)\n{\n return $needle === \"\" || strrpos($haystack, $needle, -strlen($haystack)) !== FALSE;\n}", "title": "" }, { "docid": "daa8c48557d47a35074ed9aacd524666", "score": "0.55936885", "text": "private function startsWith($haystack, $needles): bool\n {\n foreach ((array) $needles as $needle) {\n if ($needle !== '' && strpos($haystack, (string)$needle) === 0) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "075741ac8182478443e164c677446f30", "score": "0.55874807", "text": "function startsWith($string, $prefix) {\n\t\treturn substr($string, 0, strlen($prefix)) == $prefix;\n\t}", "title": "" }, { "docid": "7b804049c0f1e31c2195cf3df008dbb0", "score": "0.55812573", "text": "function GetStartsWithAFilter($FldExpression, $dbid = 0)\n{\n return $FldExpression . Like(\"'A%'\", $dbid);\n}", "title": "" }, { "docid": "91588bf01943b0491276ed329cf5287a", "score": "0.55713344", "text": "function str_contains($haystack, $needles)\n {\n return Str::contains($haystack, $needles);\n }", "title": "" }, { "docid": "1dbf38cec999973868b3010fc6c4ea01", "score": "0.5570026", "text": "function startsWith($haystack, $needle) { // Usage: boolean startsWith($str, '|');\n $length = strlen($needle);\n return (substr($haystack, 0, $length) === $needle);\n}", "title": "" }, { "docid": "7ef1285a2607b7064fe0c52de1a089bd", "score": "0.55624187", "text": "public function contains($key, $substring){\n\n $this->setWhereKeyHashValue($key,Query::WHERE_OPT_REGEX,$substring);\n }", "title": "" }, { "docid": "aaef17b810ca546b200606553d1f2b4c", "score": "0.5556642", "text": "private function matches() {\n\n }", "title": "" }, { "docid": "7e3d8b2674fa04a0b01b6d60863d5997", "score": "0.5556556", "text": "public function searchStarted();", "title": "" }, { "docid": "679f096b17a20fe65876d1e94eb00955", "score": "0.5551026", "text": "public function beginsWith(array|string|Utility $begins, bool $caseSensitive = false): bool\n {\n if (empty($begins)) {\n return false;\n }\n\n $parameters = $this->parameters($begins);\n\n foreach ($parameters as $parameter) {\n $beginning = $this->substring(0, strlen((string) $parameter));\n if ($caseSensitive) {\n if (strcmp($beginning, $parameter) === 0) {\n return true;\n }\n } elseif (strcasecmp($beginning, $parameter) === 0) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "47941bb07cb5862e42321bc70b235a4c", "score": "0.5547669", "text": "private function apply_search($fields,$strquery){ \r\n foreach ($fields as $field){\r\n $this->db->or_like($field,$strquery);\r\n }\r\n }", "title": "" }, { "docid": "d7f4e04eff013c81cae0aba55df33997", "score": "0.55288196", "text": "function starts_with($haystack, $needle) {\n\tif (function_exists('tp_str_begins'))\n\t\treturn tp_str_begins($haystack, $needle);\n\n\treturn substr($haystack, 0, strlen($needle)) === $needle;\n}", "title": "" }, { "docid": "e31bc323d3b9f03931e735983f43dd1b", "score": "0.5524265", "text": "public function startswith($value) {\n return $this->setProperty('startswith', $value);\n }", "title": "" }, { "docid": "6af51bc7e1ec095409274ebb437489e0", "score": "0.55223674", "text": "static function searchNameBystring($beginsWith){\n $returned_customers = $GLOBALS['DB']->query(\"SELECT * FROM customers WHERE name LIKE '{$beginsWith}%';\");\n $found_customers = array();\n foreach ($returned_customers as $customer) {\n $id = $customer['id'];\n $name = $customer['name'];\n $email = $customer['email'];\n $address = $customer['address'];\n $password = $customer['password'];\n $funds = $customer['funds'];\n $new_customer = new Customer($id, $name, $email, $address, $password, $funds);\n array_push($found_customers, $new_customer);\n }\n return $found_customers;\n }", "title": "" }, { "docid": "856658b58041e1c4ed8855b5cb9996ea", "score": "0.55168563", "text": "function starts_with($haystack, $needle)\n{\n\t$length = strlen($needle);\n\tif ($length == 0) return true;\n\t\n\treturn (substr($haystack, 0, $length) === $needle);\n}", "title": "" }, { "docid": "e81a2588322c4a041519ace1cfbd8f43", "score": "0.5514958", "text": "function mai_starts_with( $haystack, $needle ) {\n\t$length = strlen( $needle );\n\treturn ( $needle === substr( $haystack, 0, $length ) );\n}", "title": "" }, { "docid": "321f3fb1386a3e302d05b563bb6f8cbf", "score": "0.55141777", "text": "public function matchWord(){\n\n\t}", "title": "" }, { "docid": "aac5f5e27aec80dc5aa1215de2136576", "score": "0.5499339", "text": "function startsWith($haystack, $needle) {\n\t\treturn (substr($haystack, 0, strlen($needle)) == $needle);\n\t}", "title": "" }, { "docid": "bdaa1d66f3af999cf92f3165a2277c0f", "score": "0.5498868", "text": "function strposa($haystack, $needle, $offset=0) {\n \t\t if(!is_array($needle)) $needle = array($needle);\n\t\t foreach($needle as $query) {\n\t\t if(strpos($haystack, $query, $offset) !== false) return true; // stop on first true result\n\t\t }\n\t\t return false;\n\t\t}", "title": "" }, { "docid": "cd1ab1143f4a22eefc16d3e7a131107f", "score": "0.54955643", "text": "public function matchAll();", "title": "" }, { "docid": "f0c1003242a069a67b0052f576923f15", "score": "0.54955554", "text": "function BasicSearchWhere() {\n\t\tglobal $Security, $contact_us;\n\t\t$sSearchStr = \"\";\n\t\t$sSearchKeyword = ew_StripSlashes(@$_GET[EW_TABLE_BASIC_SEARCH]);\n\t\t$sSearchType = @$_GET[EW_TABLE_BASIC_SEARCH_TYPE];\n\t\tif ($sSearchKeyword <> \"\") {\n\t\t\t$sSearch = trim($sSearchKeyword);\n\t\t\tif ($sSearchType <> \"\") {\n\t\t\t\twhile (strpos($sSearch, \" \") !== FALSE)\n\t\t\t\t\t$sSearch = str_replace(\" \", \" \", $sSearch);\n\t\t\t\t$arKeyword = explode(\" \", trim($sSearch));\n\t\t\t\tforeach ($arKeyword as $sKeyword) {\n\t\t\t\t\tif ($sSearchStr <> \"\") $sSearchStr .= \" \" . $sSearchType . \" \";\n\t\t\t\t\t$sSearchStr .= \"(\" . $this->BasicSearchSQL($sKeyword) . \")\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$sSearchStr = $this->BasicSearchSQL($sSearch);\n\t\t\t}\n\t\t}\n\t\tif ($sSearchKeyword <> \"\") {\n\t\t\t$contact_us->setBasicSearchKeyword($sSearchKeyword);\n\t\t\t$contact_us->setBasicSearchType($sSearchType);\n\t\t}\n\t\treturn $sSearchStr;\n\t}", "title": "" }, { "docid": "c64e588df1731df6621a6e2b8258d03c", "score": "0.5491513", "text": "abstract function search_once($folder = null, $str = 'ALL');", "title": "" }, { "docid": "d06f044d744790baf8c02f95ee5f1686", "score": "0.5490543", "text": "public function search($query) {\n }", "title": "" }, { "docid": "6cd99754546e1da207b1a73862559ade", "score": "0.5488755", "text": "function startsWith($haystack, $needle) {\r\n return $needle === \"\" || strrpos($haystack, $needle, -strlen($haystack)) !== false;\r\n }", "title": "" }, { "docid": "cb5b0c21da2f19a15ef055d5842e0f92", "score": "0.5482374", "text": "public function search(string $q);", "title": "" }, { "docid": "b07a470cce3547e210f4bf0f30e20f1d", "score": "0.54789525", "text": "private function retrieve_searchphrase()\n {\n }", "title": "" }, { "docid": "781b2eb22c4c8660f1f78a2f57f285e3", "score": "0.547579", "text": "abstract function set_search_set($set);", "title": "" }, { "docid": "012466303f91e92b37b5902b21069be7", "score": "0.54735386", "text": "public function test_starts_withEx()\n {\n $this->assertFalse(starts_withEx('eight hundred', null));\n $this->assertFalse(starts_withEx('eight hundred', ''));\n $this->assertTrue(starts_withEx('eight hundred', 'eigh'));\n $this->assertTrue(starts_withEx('eight hundred', 'eight '));\n $this->assertTrue(starts_withEx('eight hundred', 'e'));\n $this->assertFalse(starts_withEx('eight hundred', 'EN'));\n $this->assertFalse(starts_withEx('eight hundred', 'eight hundred pounds'));\n }", "title": "" }, { "docid": "4bc90c68ecf33a70296e88d45251a81b", "score": "0.54717237", "text": "static function startsWith($haystack, $needle) {\r\n\t $length = strlen($needle);\r\n\t return (substr($haystack, 0, $length) === $needle);\r\n\t}", "title": "" }, { "docid": "551e56a83f2f20e7eaa84e75c758139e", "score": "0.54689234", "text": "function startsWith($haystack, $needle) {\n return $needle === \"\" || strrpos($haystack, $needle, -strlen($haystack)) !== FALSE;\n}", "title": "" }, { "docid": "0d0ac0f27560cbd3e3a42f1a28d745ed", "score": "0.54680616", "text": "function startsWith($haystack, $needle) {\n\treturn $needle === \"\" || strrpos($haystack, $needle, -strlen($haystack)) !== false;\n}", "title": "" } ]
61b3dc5f461e16b8c6aa6818614b40b6
Add new resource object to this ACL system.
[ { "docid": "fd4d0563e08d89393f2085461c3697cf", "score": "0.6026816", "text": "public function addResource(ResourceInterface $resource, array $parentResources = array());", "title": "" } ]
[ { "docid": "9ebeb650960894b6a21ff2fab243239a", "score": "0.7117657", "text": "public function add($resource)\n {\n $this->resources[] = $resource;\n }", "title": "" }, { "docid": "359933e4b9f2ede23190cc7cbead2ae5", "score": "0.6880446", "text": "public function addResource(IResource $resource);", "title": "" }, { "docid": "c257cbfbecc5c1f670d41b80afa758f8", "score": "0.67295223", "text": "public function add_resource($resource)\n\t{\n\t\tif (!is_array($resource)) {\n\t\t\t$this->acl_perms['user_role'][$resource] = array();\n\t\t} else {\n\t\t\tforeach ($resource as $res) {\n\t\t\t\t$this->acl_perms['user_role'][$res] = array();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e4fe74792303c6d229257b63b265e977", "score": "0.66121113", "text": "public function addResource($resource)\n {\n $this->resources[] = $resource;\n $this->maxTimestamp = 0;\n }", "title": "" }, { "docid": "05e58bf50c0cd5602a47bce071279fdc", "score": "0.64969254", "text": "public function add_resource(& $resource)\n {\n $this->resources[$resource->get_type()][$resource->get_id()] = $resource;\n }", "title": "" }, { "docid": "24214843d73449bf4afac247b25778a1", "score": "0.64839244", "text": "public function addResource($resource, $accessList=null);", "title": "" }, { "docid": "6bbb4c7dfc5b42860092cfe1239aa9de", "score": "0.62751335", "text": "public function addResource(ResourceInterface $resource): void;", "title": "" }, { "docid": "7df276f97382306e9adec1b37c18f1b1", "score": "0.6264329", "text": "public function addResource($resource, $parent = null, $autoUpdateCache = true)\n\t{\n\t\tif(\n\t\t\t!empty($resource)\n\t\t\t&& (!$resource instanceof AclResource || !$this->acl->has($resource))\n\t\t) {\n\t\t\t// if the parent is null and the resource is a AclResource\n\t\t\tif(empty($parent) && $resource instanceof AclResource) {\n\t\t\t\t$parent = $resource->getParent();\n\t\t\t}\n\t\t\t// if the parent resource is a string\n\t\t\tif(is_string($parent)) {\n\t\t\t\t// create and save the parent resource\n\t\t\t\t$parent = $this->createAndSaveResource($parent);\n\t\t\t}\n\t\t\t// if the parent resource is a AclResource and the current acl doesn't have the resource\n\t\t\tif($parent instanceof AclResource && !$this->acl->has($parent)) {\n\t\t\t\t// add resource to the current acl\n\t\t\t\t$this->addResource($parent, null, false);\n\t\t\t}\n\t\t\t// if the resource is a string\n\t\t\tif(is_string($resource)) {\n\t\t\t\t// create and save the resource\n\t\t\t\t$resource = $this->createAndSaveResource($resource);\n\t\t\t}\n\t\t\t// if the resource is a AclResource and the current acl doesn't have the resource\n\t\t\tif($resource instanceof AclResource && !$this->acl->has($resource)) {\n\t\t\t\t// add resource to the current acl\n\t\t\t\t$this->acl->addResource($resource, $parent);\n\t\t\t\t// update the acl cache\n\t\t\t\tif($autoUpdateCache) {\n\t\t\t\t\t$this->saveAclToCache();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->acl;\n\t}", "title": "" }, { "docid": "10be4b7c588a4c029675212b30ce66ff", "score": "0.61625034", "text": "public function addAction()\n {\n $form = new Ot_Form_Role();\n\n if ($this->_request->isPost()) {\n if ($form->isValid($_POST)) {\n\n $data = array(\n 'name' => $form->getValue('name'),\n 'inheritRoleId' => $form->getValue('inheritRoleId'),\n 'editable' => 1,\n );\n\n $role = new Ot_Model_DbTable_Role();\n $roleId = $role->insert($data);\n\n $logOptions = array(\n 'attributeName' => 'accessRole',\n 'attributeId' => $roleId,\n );\n\n $this->_helper->log(Zend_Log::INFO, 'Role ' . $data['name'] . ' was added', $logOptions);\n\n $this->_helper->redirector->gotoRoute(array('controller' => 'acl', 'action' => 'details', 'roleId' => $roleId), 'ot', true);\n } else {\n $this->_helper->messenger->addError('msg-error-invalidForm');\n }\n }\n\n $this->view->form = $form;\n\n $this->_helper->pageTitle(\"ot-acl-add:title\");\n }", "title": "" }, { "docid": "8db1b3b8bf5805f627f27844e2176e2b", "score": "0.6131687", "text": "public function add($object)\n {\n }", "title": "" }, { "docid": "88c7c05684703f090049e1cefc3e7823", "score": "0.6076238", "text": "public function add($rel, Resource $resource, $multi = true) {}", "title": "" }, { "docid": "dcedf398fcf16dcf9bb986298f024845", "score": "0.60745645", "text": "public function addResource(ResourceInterface $resource)\n {\n $this->resources[] = $resource;\n }", "title": "" }, { "docid": "0b7123a82185f10e36501a3ed3417946", "score": "0.60096145", "text": "public function addResource($resourceValue, $accessList) {\n if(is_object($resourceValue)) {\n $this->_resourcesNames[$resourceValue->getName()] = 1;\n $this->_resources[] = $resourceValue;\n $resourceName = $resourceValue->getName();\n } else {\n $this->_resourcesNames[$resourceValue] = 1;\n $this->_resources[] = new Resource($resourceValue);\n $resourceName = $resourceValue;\n }\n $this->addResourceAccess($resourceName, $accessList);\n }", "title": "" }, { "docid": "46de92d19207c76a5f453d83ab691aa8", "score": "0.5997475", "text": "public function add($resource)\n\t{\n\t\tif (!is_object($resource) || $resource instanceof Resource === false)\n\t\t\tthrow new Exception('Resource must be an object');\n\n\t\t$this->_resources[] = $resource;\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "16ccb8a59229bf86b4b5b16a82f82afe", "score": "0.5989068", "text": "abstract public function add($object);", "title": "" }, { "docid": "16ccb8a59229bf86b4b5b16a82f82afe", "score": "0.5989068", "text": "abstract public function add($object);", "title": "" }, { "docid": "b0897dd58dc715b04d1556296cf4f77f", "score": "0.5987049", "text": "public function addResource($resource, $accessList = null)\n {\n if (is_object($resource) === true &&\n $resource instanceof ResourceInterface === true) {\n $resourceName = $resource->getName();\n $object = $resource;\n } elseif (is_string($resource) === true) {\n $resourceName = $resource;\n $object = new Resource($resource);\n } else {\n throw new Exception('Invalid parameter type.');\n }\n\n if (isset($this->_resourcesNames[$resourceName]) === false) {\n $this->_resources[] = $object;\n $this->_resourcesNames[$resourceName] = true;\n }\n\n return $this->addResourceAccess($resourceName, $accessList);\n }", "title": "" }, { "docid": "4ce478a9d4ae7532b081fe82dca853d8", "score": "0.5956448", "text": "static public function addResource(Kronolith_Resource_Base $resource)\n {\n // Create a new calendar id.\n $calendar = uniqid(mt_rand());\n $resource->set('calendar', $calendar);\n $driver = Kronolith::getDriver('Resource');\n\n return $driver->save($resource);\n }", "title": "" }, { "docid": "a43b422a8e60e3230f69821f981eabc7", "score": "0.5948696", "text": "public function add($resource, $resourcePath = null) {\n\t\t$this->resources[$resource] = (array)$resourcePath;\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "6c24d7f09555531390e6c8e99be485d5", "score": "0.5891644", "text": "public function addResource(Resource $resource)\n {\n $this->resources[$resource->getName()] = $resource;\n return $this;\n }", "title": "" }, { "docid": "e92aaaf9a82d58d33a83d2479f1a8e5c", "score": "0.58861667", "text": "private function addResource(ResourceInterface $resource): self\n {\n $this->resources[] = $resource;\n\n return $this;\n }", "title": "" }, { "docid": "086ead8118f5ecb62fb4b24909ff59ed", "score": "0.5868351", "text": "public function addResource(FedoraResource $res): WebAclRule {\n $uri = $res->getUri(true);\n if (!isset($this->resources[$uri])) {\n $this->resources[$uri] = $res;\n }\n return $this;\n }", "title": "" }, { "docid": "1d0d5d07a0c8fd55e31ceb6fdc4d9a9f", "score": "0.58533293", "text": "public function add(){\r\n\t\t//$this->auth->set_access('add');\r\n\t\t//$this->auth->validate();\r\n\r\n\t\t//call save method\r\n\t\t$this->save();\r\n\t}", "title": "" }, { "docid": "7d16572e6d2e884786a03dc0a3b3fc06", "score": "0.58320343", "text": "public function add($object): void\n {\n }", "title": "" }, { "docid": "b595a03264a903c7a9a8e5dc07203864", "score": "0.57537156", "text": "public function __construct () \r\n\t{\r\n\t\t// add roles for acl\r\n\t\t$roleDao = App_Dao::load('Core_Role');\r\n\t\t$roles = $roleDao->getAllRoles();\r\n\t\tforeach ((array) $roles as $role) {\r\n\t\t\tif (!isset($role['id'])) continue;\r\n\t\t\t$this->addRole(new Zend_Acl_Role($role['id']));\r\n\t\t}\r\n\t\t\r\n\t\t// add app for acl\r\n\t\t$appDao = App_Dao::load('Core_App');\r\n\t\t$apps = $appDao->getAllApps();\r\n\t\tforeach ((array) $apps as $app) {\r\n\t\t\tif (!strlen($app['path'])) continue;\r\n\t\t\t$this->add(new Zend_Acl_Resource($app['path']));\r\n\t\t}\r\n\t\t\r\n\t\t// add app and role's relation for acl\r\n\t\t$aclApps = $appDao->getAclApps();\r\n\t\tforeach ((array) $aclApps as $acl) {\r\n\t\t\tif (!strlen($acl['role'])) continue;\r\n\t\t\tif (!strlen($acl['path'])) continue;\r\n\t\t\t$this->allow($acl['role'], $acl['path']);\r\n\t\t}\r\n\t\t\r\n\t\t// add resource for acl\r\n\t\t$resourceDao = App_Dao::load('Core_Resource');\r\n\t\t$resources = $resourceDao->getAllResources();\r\n\t\tforeach ((array) $resources as $resource) {\r\n\t\t\tif (!strlen($resource['name'])) continue;\r\n\t\t\t$this->add(new Zend_Acl_Resource($resource['name']));\r\n\t\t}\r\n\t\t\r\n\t\t// add resource and role's relation for acl\r\n\t\t$aclResources = $resourceDao->getAclResources();\r\n\t\tforeach ((array) $aclResources as $acl) {\r\n\t\t\tif (!strlen($acl['role'])) continue;\r\n\t\t\tif (!strlen($acl['resource'])) continue;\r\n\t\t\t$this->allow($acl['role'], $acl['resource']);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "17abbbc1056b6b1e8be545ea18cd896e", "score": "0.57450485", "text": "protected function addRoute()\n {\n $name = $this->getPascalCaseName();\n $resource = 'Route::resource(\\''.$this->getRouteName().'s\\', \\''.$name.'sController\\');';\n\n $routePath = base_path('routes/web.php');\n $content = file_get_contents($routePath);\n $delimiter = '// END OF RESOURCE ROUTES - DO NOT REMOVE/MODIFY THIS COMMENT';\n\n $endOfPos = strpos($content, $delimiter);\n $pre = substr($content, 0, $endOfPos);\n $post = substr($content, $endOfPos, strlen($content));\n\n file_put_contents($routePath, $pre.$resource.\"\\n\\n\\t\".$post);\n\n $this->info('Added route resource in `routes/web.php`');\n }", "title": "" }, { "docid": "73941e29a6944c33fd0bf3cb6f1aed1b", "score": "0.57202685", "text": "public function add_acl($allow, $action, $role) {\n\n $this->remove_acl($action, $role);\n $this->acl[] = (object) array('allow' => $allow, 'role' => $role, 'action' => $action);\n }", "title": "" }, { "docid": "118579371f24d765058111795861ef33", "score": "0.5695695", "text": "public function add(ResourceInterface $resource)\n {\n $this->resources[$resource->getName()] = $resource;\n $this->indexes[] = $resource->getName();\n\n return $this;\n }", "title": "" }, { "docid": "0e301036f536b5724a9d982260de2f03", "score": "0.5681215", "text": "protected function addResource($path, FilesystemResource $resource)\n {\n // Don't modify resources attached to other repositories\n if ($resource->isAttached()) {\n $resource = clone $resource;\n }\n\n $resource->attachTo($this, $path);\n\n $this->store->set($path, $resource->getFilesystemPath());\n }", "title": "" }, { "docid": "69cf23303278c6cef6cbf12b42ad54ae", "score": "0.56110346", "text": "public function add() {\n\t\t$this->_add ();\n\t}", "title": "" }, { "docid": "5c2f0979d4305739203d6eddf8e23293", "score": "0.5574218", "text": "public function add_role($resource, $role)\n\t{\n\t\t$this->acl_perms['user_role'][$resource][] = $role;\n\t}", "title": "" }, { "docid": "36e64b92ef7848d4d15e7870bdc7e0f1", "score": "0.5570388", "text": "function addResource($data) {\n\t\tglobal $user;\n\n\t\t$ownerid = getUserlistID($data['owner']);\n\t\t$query = \"INSERT INTO schedule \"\n\t\t . \"(name, \"\n\t\t . \"ownerid) \"\n\t\t . \"VALUES ('{$data['name']}', \"\n\t\t . \"$ownerid)\";\n\t\tdoQuery($query);\n\n\t\t$rscid = dbLastInsertID();\n\t\tif($rscid == 0) {\n\t\t\treturn 0;\n\t\t}\n\n\t\t$query = \"INSERT INTO resource \"\n\t\t\t\t . \"(resourcetypeid, \"\n\t\t\t\t . \"subid) \"\n\t\t\t\t . \"VALUES (15, \"\n\t\t\t\t . \"$rscid)\";\n\t\tdoQuery($query, 223);\n\t\n\t\treturn $rscid;\n\t}", "title": "" }, { "docid": "3c038e00de9d553da111c9b6622ce1a7", "score": "0.5569026", "text": "public function add(ResourceInterface $resource, $files, $recursive = true);", "title": "" }, { "docid": "a89c059ff02c8ca1eb3f427f8a304b2d", "score": "0.55292785", "text": "function add() {\n\t\t$this->User->init();\n\t\t$this->setAction('edit', $this->User->getID());\n\t}", "title": "" }, { "docid": "a806357cd868eceb1748a11e7be1a194", "score": "0.55238694", "text": "public function addResource(ChildResource $resource)\n {\n if ($this->collResources === null) {\n $this->initResources();\n }\n\n if (!$this->getResources()->contains($resource)) {\n // only add it if the **same** object is not already associated\n $this->collResources->push($resource);\n $this->doAddResource($resource);\n }\n\n return $this;\n }", "title": "" }, { "docid": "8695058c9a55a947dad3e0862863d0e8", "score": "0.5522769", "text": "public function addResource(\\SimpleXMLElement $resource) {\n\t\t\t$this->resources->addValue($this->import($resource, new Common\\Mutable\\HashSet()));\n\t\t}", "title": "" }, { "docid": "68ccc403917fab409bea677a15c7d774", "score": "0.5505998", "text": "public function __construct()\n {\n $this->acl = new Acl();\n\n $roleKlient = new Role('4');\n $roleAgent = new Role('3');\n $roleOpiekun = new Role('2');\n $roleAdmin = new Role('1');\n $this->acl->addRole($roleKlient);\n $this->acl->addRole($roleAgent, $roleKlient);\n $this->acl->addRole($roleOpiekun,$roleAgent);\n $this->acl->addRole($roleAdmin, $roleOpiekun);\n $this->acl->addResource(new Resource('index'));\n $this->acl->addResource(new Resource('add'));\n $this->acl->addResource(new Resource('view'));\n $this->acl->addResource(new Resource('edit'));\n $this->acl->deny('4', 'index');\n $this->acl->allow('1', ['index', 'add', 'edit', 'view']);\n //$this->acl->allow('1', 'add');\n\n }", "title": "" }, { "docid": "5df11f5458333e3394d7675ada241205", "score": "0.5496958", "text": "protected function addResources($acl) {\n $whitelist = $acl[\"whitelist\"];\n $blacklist = $acl[\"blacklist\"];\n foreach ($acl['resources'] as $resource) {\n if (!$this->hasResource($resource)) {\n $this->addResource(new Resource($resource));\n }\n }\n foreach ($whitelist as $aclItem) {\n if(array_key_exists('resources',$aclItem)){\n foreach ($aclItem['resources'] as $resource) {\n foreach ($aclItem['roles'] as $role) {\n if(!isset($aclItem['privileges'])){\n $privilege = null;\n $this->allow($role, $resource, $privilege);\n }else{\n foreach ($aclItem['privileges'] as $privilege) {\n $this->allow($role, $resource, $privilege);\n }\n }\n }\n }\n }\n }\n foreach ($blacklist['resources'] as $resource) {\n foreach ($blacklist['roles'] as $role) {\n $this->deny($role, $resource, /* $privilege = */ null);\n }\n }\n return $this;\n }", "title": "" }, { "docid": "4802e6fb363014c549c056d19ecc3449", "score": "0.5476564", "text": "public function add($object) : bool;", "title": "" }, { "docid": "5d9042a2723173519f4b2fdb843b95b7", "score": "0.54570127", "text": "public function addResourceAccess($resourceName, $accessList);", "title": "" }, { "docid": "3e28ff9f4b4ebd12c66da5b748fd1593", "score": "0.5442153", "text": "public function addResource($resource)\n {\n /* Type check */\n if (is_object($resource) === false) {\n throw new Exception('Resource must be an object');\n }\n\n if (is_subclass_of($resource, '\\Phalcon\\Assets\\Resource') === false) {\n throw new Exception('Invalid parameter type.');\n }\n\n /* Add resource */\n $this->addResourceByType($resource->getType(), $resource);\n\n /* Return class */\n return $this;\n }", "title": "" }, { "docid": "f0a11242147baa8ba14dd17cba492778", "score": "0.54277545", "text": "public function init(){\r\n\t\t$this->_action = $this->getActionController();\r\n\t\t\r\n\t\t//add resource for this controller\r\n\t\t$this->_controllerName = $this->_action->getRequest()->getControllerName();\r\n\t\tif(!$this->_acl->has($this->_controllerName))\r\n\t\t\t$this->_acl->add(new Zend_Acl_Resource($this->_controllerName));\r\n\t}", "title": "" }, { "docid": "ff09f11a6e33015dfb79fb4c3deba136", "score": "0.54140437", "text": "public function addResource(ResourceFile $resource)\n\t{\n\t\t$this->resourcesToLoad->add($resource);\n\t}", "title": "" }, { "docid": "321c19e3afcf9d0dddc03a6c012d63ab", "score": "0.54012704", "text": "public function createAction()\r\n {\r\n if (!$this->request->isPost()) {\r\n $this->dispatcher->forward([\r\n 'controller' => \"resource\",\r\n 'action' => 'index'\r\n ]);\r\n\r\n return;\r\n }\r\n $nowtime=time();\r\n\r\n $tb_resource = new Resource();\r\n $tb_resource->setController($this->request->getPost(\"controller\"));\r\n $tb_resource->setAction($this->request->getPost(\"action\"));\r\n $tb_resource->setRemark($this->request->getPost(\"remark\"));\r\n $tb_resource->setCreatetime($nowtime);\r\n $tb_resource->setUpdatetime($nowtime);\r\n $tb_resource->setType($this->request->getPost(\"type\"));\r\n\r\n \r\n\r\n if (!$tb_resource->save()) {\r\n foreach ($tb_resource->getMessages() as $message) {\r\n $this->flash->error($message);\r\n }\r\n\r\n $this->dispatcher->forward([\r\n 'controller' => \"resource\",\r\n 'action' => 'new'\r\n ]);\r\n\r\n return;\r\n }\r\n\r\n //$this->flash->success(\"resource was created successfully\");\r\n\r\n (new Mylog($this->di))->log($this->dispatcher->getActionName(),'添加',\r\n array(\r\n 'controll'=>$this->dispatcher->getControllerName(),\r\n 'userId'=>$this->user_id,\r\n 'username'=>$this->nickname,\r\n \"data\"=>$_POST\r\n ));\r\n\r\n return $this->redictAndforword(1,'success','添加成功','/resource/index');\r\n\r\n// $this->dispatcher->forward([\r\n// 'controller' => \"resource\",\r\n// 'action' => 'index'\r\n// ]);\r\n }", "title": "" }, { "docid": "11fff360c06b5c0e343374b0cebf72d7", "score": "0.5384972", "text": "public function add()\n {\n if ($this->getUser()->userTypeId != 1)\n throw new AccessDeniedException();\n\n $help = $this->helpFactory->createEmpty();\n $help->topic = $this->getSanitizer()->getString('topic');\n $help->category = $this->getSanitizer()->getString('category');\n $help->link = $this->getSanitizer()->getString('link');\n\n $help->save();\n\n // Return\n $this->getState()->hydrate([\n 'message' => sprintf(__('Added %s'), $help->topic),\n 'id' => $help->helpId,\n 'data' => $help\n ]);\n }", "title": "" }, { "docid": "c6692df79200089481a3cfb079d83c95", "score": "0.5380837", "text": "public function addProjResource(ProjResource $l)\n\t{\n\t\tif ($this->collProjResources === null) {\n\t\t\t$this->initProjResources();\n\t\t}\n\t\tif (!in_array($l, $this->collProjResources, true)) { // only add it if the **same** object is not already associated\n\t\t\tarray_push($this->collProjResources, $l);\n\t\t\t$l->setsfGuardUser($this);\n\t\t}\n\t}", "title": "" }, { "docid": "a55dc837a18ff4ec02def7736a1a2363", "score": "0.53768486", "text": "public function add() {\n }", "title": "" }, { "docid": "c32a28369700931966dfe4d76e17c638", "score": "0.5374026", "text": "public function addResource(ResourceInterface $resource, $parent = null)\n {\n $resourceId = $resource->getId();\n\n if ($this->hasResource($resource)) {\n throw new \\InvalidArgumentException(\n sprintf(\"The resource with the id '%s' already exists.\", $resourceId));\n }\n\n $resourceParent = null;\n\n if ($parent !== null) {\n if ($parent instanceof ResourceInterface) {\n $resourceParentId = $parent->getId();\n }\n else {\n $resourceParentId = $parent;\n }\n\n $resourceParent = $this->getResource($resourceParentId);\n\n $this->_resources[$resourceParentId]['children'][$resourceId] = $resource;\n }\n\n $this->_resources[$resourceId] = array(\n 'instance' => $resource,\n 'parent' => $resourceParent,\n 'children' => array()\n );\n\n return $this;\n }", "title": "" }, { "docid": "ea7549af68597a24192c3bb332984ffb", "score": "0.5369568", "text": "public function createResource(Resource $resource);", "title": "" }, { "docid": "509c1eb1025065ca07cfd5ba089a60b2", "score": "0.53502536", "text": "public function addRoute() {\r\n \t$this->auth()->setRequirements('roles', ['Admin']);\r\n \t$this->redirectNotAuthorized();\r\n \t\r\n \tif(isset($_POST['addRoute'])){\r\n \t\t$route = new Route();\r\n \t\t$route->setPropValues($_POST);\r\n \t\tif(!is_null($route->create())){\r\n \t\t\theader(\"Location: \".BASE_URI.Routes::getUri('admin_routes_edit').\"?new=true&id=\".$route->getIdentifier());\r\n \t\t}\r\n \t}\r\n \t\r\n \t$this->layout()->render('admin/routes/add.php');\r\n \t\r\n }", "title": "" }, { "docid": "b648b5aba134a0c1c1aab0e8dee011e3", "score": "0.5346746", "text": "public function addObject($object) {\n \n if ( $object->getPid() == null ) {\n return;\n }\n if ( ! $this->cache->get($object->getPid()) ) {\n $this->cache->set($object->getPid(), $object);\n }\n }", "title": "" }, { "docid": "e16aab1354cd0c0497037282d1533a41", "score": "0.5310366", "text": "public function create()\n {\n extract($this->_dataVars());\n\n $class = ucfirst($this->args[0]);\n $parent = $this->parseIdentifier($this->args[1]);\n\n if (!empty($parent) && $parent !== '/' && $parent !== 'root') {\n $parent = $this->_getNodeId($class, $parent);\n } else {\n $parent = null;\n }\n\n $data = $this->parseIdentifier($this->args[2]);\n if (is_string($data) && $data !== '/') {\n $data = ['alias' => $data];\n } elseif (is_string($data)) {\n $this->abort(__d('cake_acl', '/ can not be used as an alias!') . __d('cake_acl', \"\t/ is the root, please supply a sub alias\"));\n }\n\n $data['parent_id'] = $parent;\n $entity = $this->Acl->{$class}->newEntity($data);\n if ($this->Acl->{$class}->save($entity)) {\n $this->out(__d('cake_acl', \"<success>New {0}</success> {1} created.\", [$class, $this->args[2]]), 2);\n } else {\n $this->err(__d('cake_acl', \"There was a problem creating a new {0} {1}.\", [$class, $this->args[2]]));\n }\n }", "title": "" }, { "docid": "6ff6830d259df32ca1a49bc8935ac782", "score": "0.52945155", "text": "public function add()\n\t{\n\n\t}", "title": "" }, { "docid": "b825ed277811d8ad98d9344f4c4335df", "score": "0.5293233", "text": "private function __construct() {\n $this->addRole(new \\Zend_Acl_Role(\\SGTi\\Security\\Roles::ALU));\n $this->addRole(new \\Zend_Acl_Role(\\SGTi\\Security\\Roles::DOC));\n $this->addRole(new \\Zend_Acl_Role(\\SGTi\\Security\\Roles::ADMIN));\n //Administrativo-Docente\n $this->addRole(new \\Zend_Acl_Role(\\SGTi\\Security\\Roles::ADM_DOC),\\SGTi\\Security\\Roles::ADMIN, \\SGTi\\Security\\Roles::DOC);\n //Alumno-Docente\n $this->addRole(new \\Zend_Acl_Role(\\SGTi\\Security\\Roles::ALU_DOC),\\SGTi\\Security\\Roles::ALU, \\SGTi\\Security\\Roles::DOC);\n \n //Se agregan los recursos al ACL\n $this->addResource(new \\Zend_Acl_Resource(\\SGTi\\Security\\Recursos::MOD_ADMIN));\n $this->addResource(new \\Zend_Acl_Resource(\\SGTi\\Security\\Recursos::MOD_ALU));\n $this->addResource(new \\Zend_Acl_Resource(\\SGTi\\Security\\Recursos::MOD_DOC));\n $this->addResource(new \\Zend_Acl_Resource(\\SGTi\\Security\\Recursos::FORO));\n\t$this->addResource(new \\Zend_Acl_Resource(\\SGTi\\Security\\Recursos::MATERIAL));\n\n //Se agregan los permisos\n $this->allow(Roles::ALU, Recursos::MOD_ALU);\n $this->allow(Roles::ALU, Recursos::FORO);\n\t$this->allow(Roles::ALU, Recursos::MATERIAL);\n\t\n \n $this->allow(Roles::DOC, Recursos::MOD_DOC);\n $this->allow(Roles::DOC, Recursos::FORO);\n $this->allow(Roles::DOC, Recursos::MATERIAL);\n\t\n $this->allow(Roles::ADMIN, Recursos::MOD_ADMIN);\n $this->allow(Roles::ADMIN, Recursos::FORO);\n\t$this->allow(Roles::ADMIN, Recursos::MATERIAL);\n }", "title": "" }, { "docid": "dc74b024e0d8b32ff35aee257e16cbaf", "score": "0.52903926", "text": "public function associate(Model $object)\n {\n $resourcePath = $this->getResourcePath().$object->getResourcePath();\n $di = Di::getInstance();\n $di->api->createResource($resourcePath, null);\n }", "title": "" }, { "docid": "667147cf5f8c5f347cac7524e3c88a5d", "score": "0.5280817", "text": "public function add( string $resource, Field $field ): Collection;", "title": "" }, { "docid": "52baeaadc1bbf246e56ab3dcdd94748e", "score": "0.5274508", "text": "public function add($object)\n {\n $languageField = $GLOBALS['TCA'][$this->_tablename]['ctrl']['languageField'];\n $GLOBALS['TCA'][$this->_tablename]['ctrl']['languageField'] = null;\n parent::add($object);\n $GLOBALS['TCA'][$this->_tablename]['ctrl']['languageField'] = $languageField;\n }", "title": "" }, { "docid": "f1a82e5267f30f9dda18a5e844fa0d83", "score": "0.5271385", "text": "protected function registerAcl()\n\t{\n\t\t$this->app['acl'] = $this->app->share(function($app)\n\t\t{\n\t\t\treturn new Acl(\n\t\t\t\tnew LaravelAclPersistenceService('acl', Command::GRANT, Command::GRANT)\n\t\t\t);\n\t\t});\n\t}", "title": "" }, { "docid": "d8966fbf7c5fb4333fd9d8ce934ac8c7", "score": "0.52656955", "text": "private function addResourceRoute(Taxonomy $taxonomy)\n {\n Strata::router()->addResource($taxonomy);\n }", "title": "" }, { "docid": "395d228995038660a42a93824c633c34", "score": "0.5256494", "text": "function add($obj) {\n \n if ($this->manytomany) {\n if($obj instanceof Dormio_Model) {\n $obj->save();\n $pk = $obj->ident();\n } else {\n $pk = $obj;\n }\n \n $intermediate = new Dormio_Manager($this->_through, $this->_db, $this->dialect);\n $fields = array($this->_map_parent_field, $this->_map_self_field);\n $stmt = $intermediate->insert($fields);\n $stmt->execute(array($this->_parent->ident(), $pk));\n \n } else {\n if ($obj->_meta->model != $this->_meta->model)\n throw new Dormio_Manager_Exception('Can only add like objects');\n// update the foreign key on the supplied object\n $obj->__set($this->_field, $this->_parent->ident());\n $obj->save();\n }\n }", "title": "" }, { "docid": "a6802c0c1d44a923c8380e26f0383150", "score": "0.52561843", "text": "public function add(string $resource, string $resourceLang): void\n {\n /** @var array */\n $resourceData = require $resource;\n $this->translator->addResource('array', $resourceData, $resourceLang);\n }", "title": "" }, { "docid": "d19b0e0e73b1fad014b56df8e91e2de0", "score": "0.52337164", "text": "public function appendResource($resource) {\n if ($resource instanceof \\RASTER\\ResourceElementParent) {\n $resource->setParent($this->parent);\n array_push($this->children, $resource);\n } elseif (is_string($resource)) {\n array_push($this->children, \\RASTER\\ResourceBuilder::get($resource));\n } else {\n //error\n }\n return $this;\n }", "title": "" }, { "docid": "8f0476df3ac12df7fe80e9bc2864cc83", "score": "0.52326465", "text": "public function add()\n {\n $this->request->allowMethod(['get', 'post']);\n\n $menu = $this->Menus->newEntity();\n if ($this->request->is('post') && !empty($this->request->data)) {\n $this->Menus->patchEntity($menu, $this->request->data);\n if ($this->Menus->save($menu)) {\n $this->Flash->success(__d('wasabi_core', 'The menu <strong>{0}</strong> has been created.', $this->request->data['name']));\n $this->redirect(['action' => 'index']);\n return;\n } else {\n $this->Flash->error($this->formErrorMessage);\n }\n }\n $this->set('menu', $menu);\n }", "title": "" }, { "docid": "37f27d0cc5fc89b31f3d007bf785d2d7", "score": "0.5231809", "text": "public function add()\n\t{\n\t}", "title": "" }, { "docid": "9005bc40bc4a3bffa0735c2d73f76495", "score": "0.5231779", "text": "public function __construct() {\n $this->addRole(new Zend_Acl_Role(\"V\"));\n $this->addRole(new Zend_Acl_Role(\"U\"), 'V');\n $this->addRole(new Zend_Acl_Role(\"A\"), 'U');\n\n // Recursos\n $this->add(new Zend_Acl_Resource('erp:Index'));\n $this->add(new Zend_Acl_Resource('erp:Auth'));\n $this->add(new Zend_Acl_Resource('erp:Permissao-Negada'));\n\n //Adiciona a categorias de módulos do banco nos Resources\n $categoriasDB = new ModulosCategorias_Db();\n $categorias = $categoriasDB->fetchAll()->toArray();\n if (!empty($categorias)):\n foreach ($categorias AS $categoria):\n $this->add(new Zend_Acl_Resource('erp:categoria' . $categoria['id']));\n endforeach;\n endif;\n\n //Adiciona os módulos do banco nos Resources\n $modulosDb = new Modulos_Db();\n $modulos = $modulosDb->fetchAll()->toArray();\n if (!empty($modulos)):\n foreach ($modulos AS $modulo):\n if (!$this->has(\"erp:\" . $modulo['controller'])):\n $this->add(new Zend_Acl_Resource('erp:' . $modulo['controller']));\n endif;\n endforeach;\n endif;\n\n // Privilegios\n $this->allow(\"V\", \"erp:Index\");\n $this->allow(\"V\", \"erp:Auth\");\n $this->allow(\"V\", \"erp:Permissao-Negada\");\n //Se o tipo de usuario for usuario\n $auth = new WS_Auth('erp');\n if ($auth->hasIdentity()):\n $usuario = $auth->getIdentity();\n if ($usuario->papel == 'U'):\n $aclSistema = new AclAcessoSistema_Model();\n //pega permissões dos grupos de módulos que pode acessar\n $permissoes = $aclSistema->getPermissionsGroup($usuario->id);\n if (!empty($permissoes)):\n foreach ($permissoes AS $permissao):\n if (!$this->hasRole(\"erp:categoria\" . $permissao['id'])):\n $this->allow(\"U\", \"erp:categoria\" . $permissao['id']);\n endif;\n endforeach;\n endif;\n\n //pega permissões dos módulos que pode acessar\n $permissoes = $aclSistema->getPermissions($usuario->id);\n\n if (!empty($permissoes)):\n foreach ($permissoes AS $permissao):\n if (!$this->hasRole(\"erp:\" . $permissao['controller'])):\n $this->allow(\"U\", \"erp:\" . $permissao['controller']);\n endif;\n endforeach;\n endif;\n endif;\n endif;\n /* Submodulos */\n /* Resources */\n $this->add(new Zend_Acl_Resource('erp:Acl-Acesso-Sistema'));\n $this->add(new Zend_Acl_Resource('erp:Clientes-Enderecos'));\n $this->add(new Zend_Acl_Resource('erp:Clientes-Telefones'));\n $this->add(new Zend_Acl_Resource('erp:Clientes-Crm'));\n $this->add(new Zend_Acl_Resource('erp:Notas-Fiscais'));\n $this->add(new Zend_Acl_Resource('erp:Templates'));\n $this->add(new Zend_Acl_Resource('erp:Ponto'));\n $this->add(new Zend_Acl_Resource('erp:Consulta'));\n //$this->add(new Zend_Acl_Resource('erp:Textos'));\n /* Permissoes */\n $this->allow(\"A\", \"erp:Acl-Acesso-Sistema\");\n $this->allow(\"U\", \"erp:Clientes-Enderecos\");\n $this->allow(\"U\", \"erp:Clientes-Telefones\");\n $this->allow(\"U\", \"erp:Clientes-Crm\");\n $this->allow(\"U\", \"erp:Notas-Fiscais\");\n $this->allow(\"U\", \"erp:Templates\");\n $this->allow(\"U\", \"erp:Ponto\");\n $this->allow(\"U\", \"erp:Consulta\");\n //$this->allow(\"U\", \"erp:Textos\");\n\n $this->deny(\"U\", \"erp:Modulos\");\n $this->allow(\"A\", \"erp:Modulos\");\n $this->allow(\"A\");\n }", "title": "" }, { "docid": "1fbe883a7118283c1cf0339253512de0", "score": "0.5224232", "text": "public function add($entity);", "title": "" }, { "docid": "fcfdf34790a3969befc7edefb0999dc1", "score": "0.5222791", "text": "public function add()\n {\n }", "title": "" }, { "docid": "fcfdf34790a3969befc7edefb0999dc1", "score": "0.5222791", "text": "public function add()\n {\n }", "title": "" }, { "docid": "fcfdf34790a3969befc7edefb0999dc1", "score": "0.5222791", "text": "public function add()\n {\n }", "title": "" }, { "docid": "ffd4797dd1710bdb75da29ce91b8d3f9", "score": "0.5220235", "text": "function add($obj)\n {\n $this->tag->add($obj);\n }", "title": "" }, { "docid": "6766cebdacb25562d97481f322e98a3d", "score": "0.52177453", "text": "public function addResourceByType($type, $resource)\n {\n /* Type check */\n if (is_string($type) === false) {\n throw new Exception('Invalid parameter type.');\n }\n\n if (is_object($resource) === false ||\n is_subclass_of($resource, '\\Phalcon\\Assets\\Resource') === false) {\n throw new Exception('Invalid parameter type.');\n }\n\n /* Add to collection */\n if (isset($this->_collections[$type]) === false) {\n $this->_collections[$type] = new Collection();\n }\n\n $this->_collections[$type]->add($resource);\n\n /* Return class */\n return $this;\n }", "title": "" }, { "docid": "5db1d0092f9f5ee0139b26cc69cd7e11", "score": "0.52128524", "text": "public function add($request);", "title": "" }, { "docid": "b65282f562c9860ccd4cfa76eecc2f9e", "score": "0.52084494", "text": "public function addRule($obj) {\n\t\t$rn = $obj->rule;\n\t\t$this->rules[]=$obj;\n\t}", "title": "" }, { "docid": "33e8f1cd4721666e983958cd254f522c", "score": "0.5208098", "text": "public function addAction() {\n Log::infoLog('method='.__FUNCTION__.';user_id='.Auth_Info::getUser()->user_id.';control_number'.';Start action');\n $role = Auth_Info::getUser()->user_type;\n if(strcmp($role, 'DA'))\n $this->_redirect('/error');\n\n $this->view->token = Csrf::getToken();\n Log::infoLog('method='.__FUNCTION__.';user_id='.Auth_Info::getUser()->user_id.';control_number'.';End action');\n }", "title": "" }, { "docid": "432e3a021b331c1533298cbdbd3d0420", "score": "0.5201439", "text": "protected function _addRoleResources()\n {\n if (! empty($this->commonPermission)) {\n foreach ($this->commonPermission as $resource => $permissions) {\n foreach ($permissions as $permission) {\n $this->allow(self::DEFAULT_ROLE, $resource, $permission);\n }\n }\n }\n\n if (! empty($this->rolePermission)) {\n foreach ($this->rolePermission as $rolePermissions) {\n $this->allow($rolePermissions['role_name'], $rolePermissions['resource_name'], $rolePermissions['permission_name']);\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "f0517eabd1691db98f103537cbbb36bd", "score": "0.52008843", "text": "function __construct() {\n $this->addRole( new Zend_Acl_Role( 'guests' ) );\n $this->addRole( new Zend_Acl_Role( 'auth' ), 'guests' );\n \n // >>>>>>>>>>>> Adding Resources <<<<<<<<<<<<<<<\n \n // **** Resources for module Default *****\n $this->add( new Zend_Acl_Resource( 'default' ) );\n $this->add( new Zend_Acl_Resource( 'default:index' ), 'default' );\n $this->add( new Zend_Acl_Resource( 'default:error' ), 'default' );\n $this->add( new Zend_Acl_Resource( 'default:cron' ), 'default' );\n $this->add( new Zend_Acl_Resource( 'default:api' ), 'default' );\n \n // **** Resources for module Admin *****\n $this->add( new Zend_Acl_Resource( 'admin' ) );\n $this->add( new Zend_Acl_Resource( 'admin:index' ), 'admin' );\n $this->add( new Zend_Acl_Resource( 'admin:devis' ), 'admin' );\n $this->add( new Zend_Acl_Resource( 'admin:create' ), 'admin' );\n $this->add( new Zend_Acl_Resource( 'admin:category' ), 'admin' );\n $this->add( new Zend_Acl_Resource( 'admin:product' ), 'admin' );\n $this->add( new Zend_Acl_Resource( 'admin:formula' ), 'admin' );\n $this->add( new Zend_Acl_Resource( 'admin:contact' ), 'admin' );\n $this->add( new Zend_Acl_Resource( 'admin:company' ), 'admin' );\n $this->add( new Zend_Acl_Resource( 'admin:estimate' ), 'admin' );\n \n // **** Resources for module Auth *****\n $this->add( new Zend_Acl_Resource( 'auth' ) );\n $this->add( new Zend_Acl_Resource( 'auth:index' ), 'auth' );\n $this->add( new Zend_Acl_Resource( 'auth:api' ), 'auth' );\n $this->add( new Zend_Acl_Resource( 'auth:login' ), 'auth' );\n $this->add( new Zend_Acl_Resource( 'auth:logout' ), 'auth' );\n $this->add( new Zend_Acl_Resource( 'auth:user' ), 'auth' );\n $this->add( new Zend_Acl_Resource( 'auth:artisan' ), 'auth' );\n $this->add( new Zend_Acl_Resource( 'auth:dashboard' ), 'auth' );\n $this->add( new Zend_Acl_Resource( 'auth:piscine' ), 'auth' );\n $this->add( new Zend_Acl_Resource( 'auth:climatisation' ), 'auth' );\n $this->add( new Zend_Acl_Resource( 'auth:chauffage' ), 'auth' );\n $this->add( new Zend_Acl_Resource( 'auth:fenetre' ), 'auth' );\n $this->add( new Zend_Acl_Resource( 'auth:cuisine' ), 'auth' );\n $this->add( new Zend_Acl_Resource( 'auth:sallebain' ), 'auth' );\n $this->add( new Zend_Acl_Resource( 'auth:sauna' ), 'auth' );\n $this->add( new Zend_Acl_Resource( 'auth:spa' ), 'auth' );\n $this->add( new Zend_Acl_Resource( 'auth:renovation' ), 'auth' );\n $this->add( new Zend_Acl_Resource( 'auth:carrelage' ), 'auth' );\n $this->add( new Zend_Acl_Resource( 'auth:isolation' ), 'auth' );\n $this->add( new Zend_Acl_Resource( 'auth:veranda' ), 'auth' );\n $this->add( new Zend_Acl_Resource( 'auth:abriPiscine' ), 'auth' );\n // >>>>>>>>>>>> Affecting Resources <<<<<<<<<<<<<<<\n \n // ------- >> module Default << -------\n $this->allow( 'auth', 'default:index' );\n $this->allow( 'auth', 'default:error' );\n $this->allow( 'guests', 'default:cron' );\n $this->allow( 'guests', 'default:api' );\n \n // ------- >> module Auth << -------\n $this->allow( 'auth', 'auth:index' );\n $this->allow( 'guests', 'auth:api' );\n $this->allow( 'guests', 'auth:login' );\n $this->allow( 'auth', 'auth:logout' );\n $this->allow( 'auth', 'auth:user' );\n $this->allow( 'auth', 'auth:artisan' );\n $this->allow( 'auth', 'auth:dashboard' );\n $this->allow( 'auth', 'auth:piscine' );\n $this->allow( 'auth', 'auth:climatisation' );\n $this->allow( 'auth', 'auth:chauffage' );\n $this->allow( 'auth', 'auth:fenetre' );\n $this->allow( 'auth', 'auth:cuisine' );\n $this->allow( 'auth', 'auth:sallebain' );\n $this->allow( 'auth', 'auth:sauna' );\n $this->allow( 'auth', 'auth:spa' );\n $this->allow( 'auth', 'auth:renovation' );\n $this->allow( 'auth', 'auth:carrelage' );\n $this->allow( 'auth', 'auth:isolation' );\n $this->allow( 'auth', 'auth:veranda' );\n $this->allow( 'auth', 'auth:abriPiscine' );\n $this->allow( 'auth', 'auth:user' );\n \n // ------- >> module Admin << -------\n $this->allow( 'auth', 'admin:index' );\n $this->allow( 'auth', 'admin:devis' );\n $this->allow( 'auth', 'admin:create' );\n $this->allow( 'auth', 'admin:category' );\n $this->allow( 'auth', 'admin:product' );\n $this->allow( 'auth', 'admin:formula' );\n $this->allow( 'auth', 'admin:contact' );\n $this->allow( 'auth', 'admin:company' );\n $this->allow( 'auth', 'admin:estimate' );\n \n // ------- >> For Custom Permissions << -------\n $this->addResource( 'pdf' );\n $this->addResource( 'pdf facture' );\n $this->addResource( 'pdf devis' );\n $this->addResource( 'pdf bon de livraison' );\n $this->addResource( 'gestion des devis' );\n $this->addResource( 'solder' );\n $this->addResource( 'voir tous les devis' );\n $this->addResource( 'archives' );\n $this->addResource( 'devis' );\n $this->addResource( 'agenda' );\n $this->addResource( 'actions' );\n $this->addResource( 'formules' );\n $this->addResource( 'contacts' );\n $this->addResource( 'articles' );\n $this->addResource( 'catalogue' );\n $this->addResource( 'groupe' );\n $this->addResource( 'clientele' );\n $this->addResource( 'categories' );\n $this->addResource( 'permissions' );\n $this->addResource( 'entreprises' );\n $this->addResource( 'utilisateurs' );\n $this->addResource( 'catpermissions' );\n $this->addResource( 'configuration' );\n $this->addResource( 'fiche de production' );\n $this->addResource( 'remise de chèques' );\n $this->addResource( 'statistics' );\n }", "title": "" }, { "docid": "fa66cb50c6868a390b3facddfa6b4bf8", "score": "0.51852566", "text": "public function setResource($paramResource) {\n array_push($this->dataObjects, $paramResource);\n }", "title": "" }, { "docid": "be47853eef1513e84355de05111be212", "score": "0.518462", "text": "public function add(Request $request) {\n $rules = array(\n 'id' => 'numeric',\n 'ROLENAME' => [\n 'required',\n Rule::unique('roles')\n ->where('IsDeleted', 0)\n ],\n// 'ROLENOTE' => [\n// 'required',\n// Rule::unique('roles', 'ROLENOTE')\n// ->where('ROLENAME', $request->get('ROLENAME'))\n// ->where('ROLEDESC', $request->get('ROLEDESC'))\n// ->where('IsDeleted', 0)\n// ],\n// 'ROLEDESC' => [\n// Rule::unique('roles', 'ROLEDESC')\n// ->where('ROLENAME', $request->get('ROLENAME'))\n// ->where('ROLENOTE', $request->get('ROLENOTE'))\n// ->where('IsDeleted', 0)\n// ],\n );\n // run the validation rules on the inputs from the form\n $validator = Validator::make($request->all(), $rules);\n if ($validator->fails()) {\n return BaseResult::error(400, $validator->messages()->toJson());\n } else {\n $user = Session::get('user');\n $role = new Role();\n try {\n $role->ROLENAME = $request->ROLENAME;\n $role->ROLENOTE = $request->ROLENOTE;\n $role->IsDeleted = 0;\n $role->CreatedDate = now();\n $role->CreatedBy = $user->USE_ID;\n $role->save();\n\n $role->permissions()->attach($request->permissions);\n\n return BaseResult::withData($role);\n } catch (\\Exception $e) {\n return BaseResult::error(500, $e->getMessage());\n }\n }\n }", "title": "" }, { "docid": "80a39696aeb0528987b874f81f285ddb", "score": "0.5177161", "text": "public function add($data);", "title": "" }, { "docid": "80a39696aeb0528987b874f81f285ddb", "score": "0.5177161", "text": "public function add($data);", "title": "" }, { "docid": "ebcfb29e4889145d401a3518426dd742", "score": "0.51754093", "text": "public function created(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "dc4dce4f0cf91064eea970f497f173d0", "score": "0.5173495", "text": "function add($object)\n {\n if (is_a($object, 'Horde_DataTreeObject')) {\n $fullname = $object->getName();\n $order = $object->order;\n } else {\n $fullname = $object;\n $order = null;\n }\n\n $id = md5(mt_rand());\n if (strpos($fullname, ':') !== false) {\n $parts = explode(':', $fullname);\n $name = array_pop($parts);\n $parent = implode(':', $parts);\n $pid = $this->getId($parent);\n if (is_a($pid, 'PEAR_Error')) {\n $this->add($parent);\n }\n } else {\n $pid = DATATREE_ROOT;\n }\n\n if (parent::exists($fullname)) {\n return PEAR::raiseError('Already exists');\n }\n\n $added = parent::_add($fullname, $id, $pid, $order);\n if (is_a($added, 'PEAR_Error')) {\n return $added;\n }\n return $this->updateData($object);\n }", "title": "" }, { "docid": "228a30b7c5c03e02d56c0db1bc44b5da", "score": "0.5157513", "text": "public function addaluno(aluno $object)\n {\n $this->alunos[] = $object;\n }", "title": "" }, { "docid": "befb6d8824af16b5c2c1791484997397", "score": "0.5155399", "text": "public function addRole($role, UserInterface $user, EntityInterface $object)\n {\n $acls = $this->objectManager->getRepository($this->aclEntity)\n ->findByUserAndObject($user, $object);\n\n if (!$acls) {\n $acls = new $this->aclEntity();\n $acls->setUserId($user->getId());\n $acls->setObjectType(get_class($object));\n $acls->setObjectId($object->getId());\n $acls->setBitmask(0);\n }\n\n $maskBuilder = $this->createMaskBuilder($acls->getBitmask());\n $maskBuilder->add($role);\n\n $acls->setBitmask($maskBuilder->get());\n\n $this->objectManager->persist($acls);\n }", "title": "" }, { "docid": "674b9042d17399b209371a0b869ce9b1", "score": "0.5140864", "text": "public function actionAdd()\n\t{\n\t\t$form = $this->getComponent('rightResourceForm');\n\t\t/* @var $form Form */\n\n\t\t$submit = $form->addSubmit(FormBuilder::SUBMIT_ADD, 'přidat zdroj oprávnění');\n\t\t$submit->onClick[] = callback($this,'add');\n\n\t\t$form->addSubmit('stortno', \"storno\")->setValidationScope(false);\n\t}", "title": "" }, { "docid": "66219aea16a446253ef240f8c1755dd7", "score": "0.51382744", "text": "public function add() {\n if($this->request->is('get')\n || $this->request->is('restful')) {\n parent::add();\n return;\n }\n\n // We need a CO Person ID\n $p = $this->parsePersonID();\n\n // No person ID exists\n if(empty($p['copersonid'])) {\n $this->Flash->set(_txt('er.cop.unk'), array('key' => 'error'));\n $this->redirect(\"/\");\n }\n\n // File error\n if(empty($this->request->data['SshKey']['keyFile']['tmp_name'])\n || !empty($this->request->data['SshKey']['keyFile']['error'])) {\n $this->Flash->set(_txt('er.file.none'), array('key' => 'error'));\n $this->redirect($this->calculateRedirectOnFailure($p));\n }\n\n // Access the uploaded file as processed by PHP and presented by Cake\n try {\n $sk = $this->SshKey->addFromKeyFile($this->request->data['SshKey']['keyFile']['tmp_name'],\n $p['copersonid'],\n $this->request->data['SshKey']['ssh_key_authenticator_id']);\n $this->generateHistory('upload',\n array('SshKey' => $sk),\n null);\n\n $this->Flash->set(_txt('rs.added-a3', array(_txt('ct.ssh_keys.1'))), array('key' => 'success'));\n $this->redirect($this->calculateRedirectOnSuccess($p));\n } catch(InvalidArgumentException $e) {\n $this->Flash->set($e->getMessage(), array('key' => 'error'));\n $this->redirect($this->calculateRedirectOnFailure($p));\n }\n }", "title": "" }, { "docid": "bc4abb92684676cae6fefbbb84637090", "score": "0.51335406", "text": "public function store(StoreAddCollectionToResource $objResourceToCollectionRequest) {\n\n $objResource = new resource();\n $file_upload = $objResourceToCollectionRequest->file('file_upload');\n $strNewName = rand() . '.' . $file_upload->getClientOriginalExtension();\n $file_upload->move(public_path('file_upload'), $strNewName);\n $arrFormData = array(\n 'title' => $objResourceToCollectionRequest->title,\n 'slug' => (new CreateSlug())->get($objResourceToCollectionRequest->title),\n 'description' => $objResourceToCollectionRequest->description,\n 'file_upload' => $strNewName\n );\n\n\n\n// Resource::create($arrFormData);\n $objResource->save();\n\n $intLastKey = $objResource->getKey();\n\n $objResourceLast = Resource::where('id',$intLastKey)->get();\n\n return response()->json(['success' => 'add data ','data' => $objResourceLast]);\n }", "title": "" }, { "docid": "5630be7b245acdfb659089afb200f13a", "score": "0.5128667", "text": "public static function initAcl() {\n\t\t//Create the ACL\n\t\t$acl = new \\Phalcon\\Acl\\Adapter\\Memory();\n\n\t\t//The default action is DENY access\n\t\t$acl->setDefaultAction(\\Phalcon\\Acl::DENY);\n\n\t\t//get user role\n\t\t$role = new \\Phalcon\\Acl\\Role(\\Phalcon\\DI::getDefault()->get('session')->get('auth')->getUserRole());\n\n\t\t$acl->addRole($role);\n\n\t\t// all resources available for administrator\n\t\tif ($role->getName() == UsersRoles::ROLE_ADMINISTRATOR) {\n\t\t\t$acl->allow($role->getName(), '*', '*');\n\t\t}\n\t\telse {\n\t\t\t//Private area resources\n\t\t\t$userResources = array(\n\t\t\t\t'profile' => array('index', 'username', 'password', 'email', 'deleteemail', 'setprimaryemail', 'deactivate'),\n\t\t\t\t'home' => array('index') );\n\n\t\t\t//Public area resources\n\t\t\t$publicResources = array(\n\t\t\t\t'confirmemail' => array('index', 'initverify', 'resetpassword', 'resendresetpassword'),\n\t\t\t\t'error' => array('notfound', 'serviceunavailable'),\n\t\t\t\t'forgotpassword' => array('index', 'sendresetpassword'),\n\t\t\t\t'index' => array('index'),\n\t\t\t\t'login' => array('index', 'checkCredentials'),\n\t\t\t\t'user' => array('index', 'setnewpassword', 'resetpassword'),\n\t\t\t\t'signout' => array('index'),\n\t\t\t\t'register' => array('index', 'register') );\n\n\t\t\t//select resources for the role for the guest\n\t\t\tif ($role->getName() == UsersRoles::ROLE_GUEST) {\n\t\t\t\t$resources = $publicResources;\n\t\t\t}\n\t\t\t//select resources for the role for the user\n\t\t\telse {\n\t\t\t\t$resources = array_merge($userResources, $publicResources);\n\t\t\t}\n\n\t\t\t//register resources\n\t\t\tforeach ($resources as $resource => $actions) {\n\t\t\t\t$acl->addResource(new Phalcon\\Acl\\Resource($resource), $actions);\n\t\t\t}\n\n\t\t\t//Grant access to the resources\n\t\t\tforeach ($resources as $resource => $actions) {\n\t\t\t\tforeach ($actions as $action) {\n\t\t\t\t\t$acl->allow($role->getName(), $resource, $action);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $acl;\n\t}", "title": "" }, { "docid": "f2b91874e047a70a60134a0d5c1f2ae4", "score": "0.5127416", "text": "public function check_if_model_can_add_a_role_with_object ()\n {\n $this->testUser->assignRole($this->testUserRole);\n $this->assertTrue($this->testUser->hasRole($this->testUserRole));\n }", "title": "" }, { "docid": "54b835ba5dd48865840d3b75f42b32b0", "score": "0.512455", "text": "public function addResourceAccess($resourceName, $accessList) {\n foreach($this->_rolesNames as $roleName => $value) {\n if (is_array($accessList)) {\n foreach ($accessList as $index => $access) {\n $this->_accessList[$resourceName . '!' . $access] = 1;\n $this->_access[$roleName.'!'.$resourceName . '!' . $access] = $this->_defaultAccess;\n }\n } else {\n $this->_accessList[$resourceName . '!' . $accessList] = 1;\n $this->_access[$roleName.'!'.$resourceName . '!' . $accessList] = $this->_defaultAccess;\n }\n }\n }", "title": "" }, { "docid": "1ae4f8cd57ad3357abb591ceeec54116", "score": "0.5122576", "text": "public function aclAdapterMemoryAddRoleObject(UnitTester $I)\n {\n $I->wantToTest('Acl\\Adapter\\Memory - addRole() - object');\n\n $acl = new Memory();\n $role = new Role('Administrators', 'Super User access');\n\n $I->assertTrue($acl->addRole($role));\n }", "title": "" }, { "docid": "97b3611066e75c89cb4bcf2faffad5da", "score": "0.51189715", "text": "public function add() {\n $this->RequestHandler->renderAs($this, 'json');\n $this->response->type('json');\n $this->request->onlyAllow('post');\n\n $data = array();\n $status = false;\n $message = \"\";\n\n $postData = $this->request->data;\n if (!empty($postData)) {\n $postData['AppUser']['username'] = CodeGenerator::accessCode('alpha', '10');\n //The sweetest way to do this\n $this->AppUser->set($postData);\n if ($this->AppUser->validates()) {\n $postData['AppUser']['password'] = $this->AppUser->hash($postData['AppUser']['password'], 'sha1', true);\n// $this->AppUser->create();\n $this->AppUser->save($postData, false);\n $status = true;\n $message = \"Your account has been created.\";\n } else {\n $message = $this->AppUser->validationErrors;\n }\n }\n\n $this->set(compact('status', 'message'));\n $this->set('data', $data);\n $this->set('_serialize', array('data', 'status', 'message'));\n }", "title": "" }, { "docid": "fc8529eb62863f914a93874442e9ed37", "score": "0.5118342", "text": "function add($request, $obj=null)\n {\n $obj->name = $request->brandName;\n $obj->image = $request->brandImage;\n $this->brandRepository->save($obj);\n\n }", "title": "" }, { "docid": "4a243674665a3edf8dde0a9cf590d8fd", "score": "0.51125675", "text": "public function addResourceAccess($resourceName, $accessList)\n {\n if (is_string($resourceName) === false) {\n throw new Exception('Invalid parameter type.');\n }\n\n if (isset($this->_resourcesNames[$resourceName]) === false) {\n throw new Exception(\"Resource '\".$resourceName.\"' does not exist in ACL\");\n }\n\n if (is_array($accessList) === true) {\n foreach ($accessList as $accessName) {\n $key = $resourceName.'!'.$accessName;\n if (isset($this->_accessList[$key]) === false) {\n $this->_accessList[$key] = true;\n }\n }\n } elseif (is_string($accessList) === true) {\n $key = $resourceName.'!'.$accessList;\n if (isset($this->_accessList[$key]) === false) {\n $this->_accessList[$key] = true;\n }\n } elseif (is_null($accessList) === false) {\n //@note null can be passed by addResource() and is not handled\n throw new Exception('Invalid parameter type.');\n }\n\n return true;\n }", "title": "" }, { "docid": "55c882ad8e579f1a3fb8d22381f54434", "score": "0.5094765", "text": "public function actionAdd()\n {\n // is the user allowed access?\n if (! $this->_isUserAllowed()) {\n return;\n }\n \n // process: cancel\n if ($this->_isProcess('cancel')) {\n // forward back to browse\n return $this->_redirect(\"/{$this->_controller}/browse\");\n }\n \n // set a new record\n $this->_setItemNew();\n \n // process: save\n if ($this->_isProcess('save') && $this->_saveItem()) {\n // save a flash value for the next page\n $this->_session->setFlash('success_added', true);\n // redirect to editing using the primary-key value\n $id = $this->item->getPrimaryVal();\n return $this->_redirectNoCache(\"/{$this->_controller}/edit/$id\");\n }\n \n // set the form-building hints for the item\n $this->_setFormItem();\n \n // turn off http caching\n $this->_response->setNoCache();\n }", "title": "" }, { "docid": "e7f96713ef61bd427bdd48d5c6675cf1", "score": "0.50928324", "text": "public function Create($resource)\n {\n $options = [\n 'resource' => $resource,\n 'method' => 'POST',\n 'envelope' => 'create',\n ];\n if('access' == $resource) {\n $options['request']['create']['objid'] = $this->rel('objid');\n }\n $this->options($options);\n return $this;\n }", "title": "" }, { "docid": "8b8a606700b3e5cb6a2633d578736346", "score": "0.5087327", "text": "function addItemResource( $itemId, $resource )\n {\n die ('unimplemented: '.__CLASS__.'::'.__FUNCTION__.' ('.__LINE__.':'.__FILE__.')');\n }", "title": "" }, { "docid": "9b5495cd36b4f3a9d18451244f3a3d47", "score": "0.50795996", "text": "public static function add(&$objeto){\n\t\treturn parent::add($objeto);\n\t}", "title": "" }, { "docid": "84cd29ed899af6624f719701346be6ec", "score": "0.5077079", "text": "public function add()\n {\n\n }", "title": "" }, { "docid": "bbc651ae1b651986ce3eccc878382ac8", "score": "0.5075255", "text": "public function add(CompositeApi $compositeApi)\n {\n }", "title": "" } ]
ffc56d3e217abb491276413d24215887
extract relevant data from old system (2012 July 2015 May)
[ { "docid": "a00bad74c42eee1ec0384214cfe35b96", "score": "0.67340815", "text": "function extractDataOld($entry, $year, $month){\n global $standards;\n $data = array();\n array_push($data, $entry['compnos']);\n if(isset($standards[$entry['incident_type_description']])){\n array_push($data, $standards[$entry['incident_type_description']]);\n }else{\n array_push($data, $entry['incident_type_description']);\n }\n array_push($data, $entry['incident_type_description']);\n if(isset($entry['reptdistrict'])){\n array_push($data, $entry['reptdistrict']);\n }else{\n array_push($data, \"NA\");\n }\n array_push($data, $entry['location']['coordinates'][0]);\n array_push($data, $entry['location']['coordinates'][1]);\n array_push($data, $year);\n array_push($data, $month);\n array_push($data, substr($entry['fromdate'], 8, 2));\n array_push($data, substr($entry['fromdate'], 11, 2));\n array_push($data, substr($entry['fromdate'], 14, 2));\n array_push($data, $entry['day_week']);\n if(isset($entry['ucrpart'])){\n if($entry['ucrpart'] == \"Part three\"){ //standardize ucr naming of part three\n array_push($data, \"Part Three\");\n }else{\n array_push($data, $entry['ucrpart']);\n }\n }else{\n array_push($data, \"NA\"); \n }\n if(isset($entry['streetname'])){\n array_push($data, $entry['streetname']);\n }else{\n array_push($data, \"NA\"); \n }\n array_push($data, $entry['shooting']);\n return $data;\n }", "title": "" } ]
[ { "docid": "942e6d2b66e0f29b9eb8d7bc357d25d4", "score": "0.60371846", "text": "function extractDataNew($entry, $year, $month){\n global $standards;\n $data = array();\n array_push($data, $entry['incident_number']);\n if(isset($standards[$entry['offense_code_group']])){\n array_push($data, $standards[$entry['offense_code_group']]);\n }else{\n array_push($data, $entry['offense_code_group']);\n }\n array_push($data, $entry['offense_description']);\n if(isset($entry['district'])){\n array_push($data, $entry['district']);\n }else{\n array_push($data, \"NA\");\n }\n array_push($data, $entry['location']['coordinates'][0]);\n array_push($data, $entry['location']['coordinates'][1]);\n array_push($data, $year);\n array_push($data, $month);\n array_push($data, substr($entry['occurred_on_date'], 8, 2));\n array_push($data, substr($entry['occurred_on_date'], 11, 2));\n array_push($data, substr($entry['occurred_on_date'], 14, 2));\n array_push($data, $entry['day_of_week']);\n if(isset($entry['ucr_part'])){\n if($entry['ucr_part'] == \"Part three\"){ //standardize ucr naming of part three\n array_push($data, \"Part Three\");\n }else{\n array_push($data, $entry['ucr_part']);\n }\n }else{\n array_push($data, \"NA\");\n }\n if(isset($entry['street'])){\n $entry['street'] = str_replace(\"'\", \".\", $entry['street']); //apostrophe char was causing problems so it was turned into a period\n array_push($data, $entry['street']);\n }else{\n array_push($data, \"NA\");\n }\n if(isset($entry['shooting'])){\n array_push($data, \"Yes\");\n }else{\n array_push($data, \"No\");\n }\n return $data;\n }", "title": "" }, { "docid": "995f105ed6c7863723fa01f1179c00ea", "score": "0.563176", "text": "public function getOrderDataOld($year)\n\t{\t\n\t\tif($year) {\n\t\t\t$months = $this->months();\n\t\t\t\n\t\t\t$sql = \"SELECT * FROM orders WHERE paid_status = ?\";\n\t\t\t$query = $this->db->query($sql, array(1));\n\t\t\t$result = $query->result_array();\n\n\t\t\t$final_data = array();\n\t\t\tforeach ($months as $month_k => $month_y) {\n\t\t\t\t$get_mon_year = $year.'-'.$month_y;\t\n\n\t\t\t\t$final_data[$get_mon_year][] = '';\n\t\t\t\tforeach ($result as $k => $v) {\n\t\t\t\t\t$month_year = date('Y-m', $v['date_time']);\n\n\t\t\t\t\tif($get_mon_year == $month_year) {\n\t\t\t\t\t\t$final_data[$get_mon_year][] = $v;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\n\n\t\t\treturn $final_data;\n\t\t}\n\t}", "title": "" }, { "docid": "7b316d6ee5c7c148ef8df29c75e41263", "score": "0.5563774", "text": "abstract protected function extractReleaseDate() : self;", "title": "" }, { "docid": "8d76c6ab083e6c44a95df5f97b87d50d", "score": "0.5517225", "text": "function get_old_data()\r\n {\r\n global $db, $eqdkp, $user, $tpl, $pm;\r\n global $SID;\r\n\r\n $sql = 'SELECT raid_name, raid_value, raid_note, raid_date\r\n FROM ' . RAIDS_TABLE . \"\r\n WHERE raid_id='\" . $this->url_id . \"'\";\r\n $result = $db->query($sql);\r\n while ( $row = $db->fetch_record($result) )\r\n {\r\n $this->old_raid = array(\r\n 'raid_name' => addslashes($row['raid_name']),\r\n 'raid_value' => addslashes($row['raid_value']),\r\n 'raid_note' => addslashes($row['raid_note']),\r\n 'raid_date' => addslashes($row['raid_date'])\r\n );\r\n }\r\n $db->free_result($result);\r\n\r\n $sql = 'SELECT r.member_name\r\n FROM ' . RAID_ATTENDEES_TABLE . \" r, \" . MEMBERS_TABLE . \" m\r\n WHERE m.member_name = r.member_name AND raid_id='\" . $this->url_id . \"'\r\n ORDER BY member_name\";\r\n $result = $db->query($sql);\r\n while ( $row = $db->fetch_record($result) )\r\n {\r\n $attendees[] = $row['member_name'];\r\n }\r\n $this->old_raid['raid_attendees'] = @implode(',', $attendees);\r\n unset($attendees);\r\n }", "title": "" }, { "docid": "8fb66a668f7da28f516cbc1937673b69", "score": "0.5470205", "text": "function _get_data_by_calendar ($args) {\n\t\t// DEBATELIST or WRANLIST, so $this->major should now be set.\n\t\t\n\t\t// You can ask for:\n\t\t// * The most recent n months - $args['months'] => n\n\t\t// * All months from one year - $args['year'] => 2004\n\t\t// * One month - $args['year'] => 2004, $args['month'] => 8\n\t\t// * The months from this year so far (no $args variables needed).\n\t\t\n\t\t// $args['onday'] may be like '2004-04-20' - if it appears in the \n\t\t// calendar, this date will be highlighted and will have no link.\n\t\t\n\t\t// Returns a data structure of years, months and dates:\n\t\t// $data = array(\n\t\t// \t\t'info' => array (\n\t\t//\t\t\t'page' => 'debates',\n\t\t//\t\t\t'major'\t=> 1\n\t\t//\t\t\t'onpage' => '2004-02-01'\n\t\t//\t\t),\n\t\t// \t\t'years' => array (\n\t\t//\t\t\t'2004' => array (\n\t\t//\t\t\t\t'01' => array ('01', '02', '03' ... '31'),\n\t\t//\t\t\t\t'02' => etc...\n\t\t//\t\t\t)\n\t\t//\t\t)\n\t\t// )\n\t\t// It will just have entries for days for which we have relevant\n\t\t// hansard data.\n\t\t// But months that have no data will still have a month array (empty).\n\t\n\t\t// $data['info'] may have 'year' => 2004 if we're just viewing a single year.\n\t\t// $data['info'] may have 'prevlink' => '/debates/?y=2003' or something\n\t\t// if we're viewing recent months.\n\t\t\n\t\tglobal $DATA, $this_page, $PAGE, $hansardmajors;\n\t\t\n\t\t// What we return.\n\t\t$data = array(\n\t\t\t'info' => array(\n\t\t\t\t'page' => $this->listpage,\n\t\t\t\t'major' => $this->major\n\t\t\t)\n\t\t);\n\t\t\n\t\t// Set a variable so we know what we're displaying...\n\t\tif (isset($args['months']) && is_numeric($args['months'])) {\n\t\t\n\t\t\t// A number of recent months (may wrap around to previous year).\n\t\t\t$action = 'recentmonths';\n\t\t\t\n\t\t\t// A check to prevent anyone requestion 500000 months.\n\t\t\tif ($args['months'] > 12) {\n\t\t\t\t$PAGE->error_message(\"Sorry, you can't view \" . $args['months'] . \" months.\");\n\t\t\t\treturn $data;\n\t\t\t}\n\t\t\n\t\t} elseif (isset($args['year']) && is_numeric($args['year'])) {\n\t\t\t\n\t\t\tif (isset($args['month']) && is_numeric($args['month'])) {\n\t\t\t\t// A particular month.\n\t\t\t\t$action = 'month';\n\t\t\t} else {\n\t\t\t\t// A single year.\n\t\t\t\t$action = 'year';\n\t\t\t}\n\t\t\n\t\t} else {\n\t\t\t// The year to date so far.\n\t\t\t$action = 'recentyear';\n\t\t}\n\t\t\n\t\tif (isset($args['onday'])) {\n\t\t\t// Will be highlighted.\n\t\t\t$data['info']['onday'] = $args['onday'];\n\t\t}\n\t\t\n\t\t// This first if/else section is simply to fill out these variables:\n\t\t\n\t\t$firstyear = '';\n\t\t$firstmonth = '';\n\t\t$finalyear = '';\n\t\t$finalmonth = '';\n\n\t\tif ($action == 'recentmonths' || $action == 'recentyear') {\n\t\t\t\n\t\t\t// We're either getting the most recent $args['months'] data \n\t\t\t// Or the most recent year's data.\n\t\t\t// (Not necessarily recent to *now* but compared to the most\n\t\t\t// recent date for which we have relevant hansard data.)\n\t\t\t// 'recentyear' will include all the months that haven't happened yet.\n\n\t\t\t// Find the most recent date we have data for.\n\t\t\t$q = $this->db->query(\"SELECT MAX(hdate) AS hdate\n\t\t\t\t\t\t\tFROM\thansard\n\t\t\t\t\t\t\tWHERE\tmajor = '\" . mysql_real_escape_string($this->major) . \"'\n\t\t\t\t\t\t\t\");\n\n\t\t\tif ($q->field(0, 'hdate') != NULL) {\n\t\t\t\t$recentdate = $q->field(0, 'hdate');\n\t\t\t} else {\n\t\t\t\t$PAGE->error_message(\"Couldn't find the most recent date\");\n\t\t\t\treturn $data;\n\t\t\t}\n\n\t\t\t// What's the first date of data we need to fetch?\n\t\t\tlist($finalyear, $finalmonth, $day) = explode('-', $recentdate);\t\t\t\t\t\n\n\t\t\t$finalyear = intval($finalyear);\n\t\t\t$finalmonth = intval($finalmonth);\n\t\t\t\t\n\t\t\tif ($action == 'recentmonths') {\n\t\t\t\n\t\t\t\t// We're getting this many recent months.\n\t\t\t\t$months_to_fetch = $args['months'];\n\n\t\t\t\t// The month we need to start getting data.\n\t\t\t\t$firstmonth = intval($finalmonth) - $months_to_fetch + 1;\n\n\t\t\t\t$firstyear = $finalyear;\n\n\t\t\t\tif ($firstmonth < 1) {\n\t\t\t\t\t// Wrap round to previous year.\n\t\t\t\t\t$firstyear--;\n\t\t\t\t\t// $firstmonth is negative, hence the '+'.\n\t\t\t\t\t$firstmonth = 12 + $firstmonth; // ()\n\t\t\t\t};\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t// $action == 'recentyear'\n\t\t\t\t\n\t\t\t\t// Get the most recent year's results.\n\t\t\t\t$firstyear = $finalyear;\n\t\t\t\t$firstmonth = 1;\n\t\t\t}\n\t\t\t\n\n\n\t\t} else {\n\t\t\t// $action == 'year' or 'month'.\n\n\t\t\t$firstyear = $args['year'];\n\t\t\t$finalyear = $args['year'];\n\n\t\t\tif ($action == 'month') {\n\t\t\t\t$firstmonth = intval($args['month']);\n\t\t\t\t$finalmonth = intval($args['month']);\n\t\t\t} else {\n\t\t\t\t$firstmonth = 1;\n\t\t\t\t$finalmonth = 12;\n\t\t\t}\n\n\n\t\t\t// Check there are some dates for this year/month.\n\t\t\t$q = $this->db->query(\"SELECT epobject_id\n\t\t\t\t\t\t\tFROM\thansard\n\t\t\t\t\t\t\tWHERE\thdate >= '\" . mysql_real_escape_string($firstyear) . \"-\" . mysql_real_escape_string($firstmonth) . \"-01'\n\t\t\t\t\t\t\tAND \thdate <= '\" . mysql_real_escape_string($finalyear) . \"-\" . mysql_real_escape_string($finalmonth) . \"-31'\n\t\t\t\t\t\t\tLIMIT \t1\n\t\t\t\t\t\t\t\");\n\t\t\t\n\t\t\tif ($q->rows() == 0) {\n\t\t\t\t// No data in db, so return empty array!\n\t\t\t\treturn $data;\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t// OK, Now we have $firstyear, $firstmonth, $finalyear, $finalmonth set up.\n\t\n\t\t// Get the data...\n\t\t\n\t\tif ($finalyear > $firstyear || $finalmonth >= $firstmonth) {\n\t\t\t$where = \"AND hdate <= '\" . mysql_real_escape_string($finalyear) . \"-\" . mysql_real_escape_string($finalmonth) . \"-31'\";\n\t\t} else {\n\t\t\t$where = '';\n\t\t}\n\n\t\t$q = $this->db->query(\"SELECT \tDISTINCT(hdate) AS hdate\n\t\t\t\t\t\tFROM\t\thansard\n\t\t\t\t\t\tWHERE\t\tmajor = '\" . mysql_real_escape_string($this->major) . \"'\n\t\t\t\t\t\tAND\t\t\thdate >= '\" . mysql_real_escape_string($firstyear) . \"-\" . mysql_real_escape_string($firstmonth) . \"-01'\n\t\t\t\t\t\t$where\n\t\t\t\t\t\tORDER BY\thdate ASC\n\t\t\t\t\t\t\");\n\t\t\n\t\tif ($q->rows() > 0) {\n\n\t\t\t// We put the data in this array. See top of function for the structure.\n\t\t\t$years = array();\n\t\t\t\n\t\t\tfor ($row=0; $row<$q->rows(); $row++) {\n\t\t\t\t\n\t\t\t\tlist($year, $month, $day) = explode('-', $q->field($row, 'hdate'));\n\t\t\t\t\n\t\t\t\t$month = intval($month);\n\t\t\t\t$day = intval($day);\n\n\t\t\t\t// Add as a link.\n\t\t\t\t$years[$year][$month][] = $day;\n\t\t\t}\n\n\t\t\t// If nothing happened on one month we'll have fetched nothing for it.\n\t\t\t// So now we need to fill in any gaps with blank months.\n\t\t\t\n\t\t\t// We cycle through every year and month we're supposed to have fetched.\n\t\t\t// If it doesn't have an array in $years, we create an empty one for that\n\t\t\t// month.\n\t\t\tfor ($y = $firstyear; $y <= $finalyear; $y++) {\n\n\t\t\t\tif (!isset($years[$y])) {\n\t\t\t\t\t$years[$y] = array(1=>array(), 2=>array(), 3=>array(), 4=>array(), 5=>array(), 6=>array(), 7=>array(), 8=>array(), 9=>array(), 10=>array(), 11=>array(), 12=>array());\n\t\t\t\t} else {\n\t\t\t\t\n\t\t\t\t\t// This year is set. Check it has all the months...\n\t\t\t\t\t\n\t\t\t\t\t$minmonth = $y == $firstyear ? $firstmonth : 1;\n\t\t\t\t\t$maxmonth = $y == $finalyear ? $finalmonth : 12;\n\t\t\t\t\n\t\t\t\t\tfor ($m = $minmonth; $m <= $maxmonth; $m++) {\n\t\t\t\t\t\tif (!isset($years[$y][$m])) {\n\t\t\t\t\t\t\t$years[$y][$m] = array();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tksort($years[$y]);\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$data['years'] = $years;\n\t\t}\n\t\t\n\t\t// Set the next/prev links.\n\n\t\t$YEARURL = new URL($hansardmajors[$this->major]['page_year']);\n\t\t\t\n\t\tif (substr($this_page, -4) == 'year') {\n\t\t\t// Only need next/prev on these pages.\n\t\t\t// Not sure this is the best place for this, but...\n\n\t\t\t$nextprev = array();\n\t\t\t\n\t\t\tif ($action == 'recentyear') {\n\t\t\t\t// Assuming there will be a previous year!\n\t\t\t\t\n\t\t\t\t$YEARURL->insert(array('y'=> $firstyear-1));\n\t\t\t\t\n\t\t\t\t$nextprev['prev'] = array (\n\t\t\t\t\t'body' => $firstyear - 1,\n\t\t\t\t\t'url' => $YEARURL->generate()\t\t\t\t\n\t\t\t\t);\n\t\t\t\n\t\t\t} else { // action is 'year'.\n\n\t\t\t\t$nextprev['prev'] = array ('body' => 'Previous year');\n\t\t\t\t$nextprev['next'] = array ('body' => 'Next year');\n\t\t\t\t\n\t\t\t\t$q = $this->db->query(\"SELECT DATE_FORMAT(hdate, '%Y') AS year\n\t\t\t\t\t\t\tFROM hansard WHERE major = \" . $this->major . \"\n\t\t\t\t\t\t\tAND year(hdate) < \" . $firstyear . \"\n\t\t\t\t\t\t\tORDER BY hdate DESC\n\t\t\t\t\t\t\tLIMIT 1\");\n\t\t\t\t\n\t\t\t\t$prevyear = $q->field(0, 'year');\n\t\t\t\t$q = $this->db->query(\"SELECT DATE_FORMAT(hdate, '%Y') AS year\n\t\t\t\t\t\t\tFROM hansard WHERE major = \" . $this->major . \"\n\t\t\t\t\t\t\tAND year(hdate) > \" . $finalyear . \"\n\t\t\t\t\t\t\tORDER BY hdate\n\t\t\t\t\t\t\tLIMIT 1\");\n\t\t\t\t$nextyear = $q->field(0, 'year');\n\n\t\t\t\tif ($action == 'year' && $prevyear) {\n\t\t\t\t\t$YEARURL->insert(array('y'=>$prevyear));\n\t\t\t\t\t$nextprev['prev']['title'] = $prevyear;\n\t\t\t\t\t$nextprev['prev']['url'] = $YEARURL->generate();\n\t\t\t\t}\n\t\t\t\tif ($nextyear) {\n\t\t\t\t\t$YEARURL->insert(array('y'=>$nextyear));\n\t\t\t\t\t$nextprev['next']['title'] = $nextyear;\n\t\t\t\t\t$nextprev['next']['url'] = $YEARURL->generate();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Will be used in $PAGE.\n\t\t\t$DATA->set_page_metadata($this_page, 'nextprev', $nextprev);\n\t\t}\n\t\t\n\t\treturn $data;\n\t\n\t}", "title": "" }, { "docid": "2e080413fe005321ccc4fd4b17d06ed3", "score": "0.53444666", "text": "public function getModuleDetailsByCode(){\n\t\t/* checking for data set index */\n\t\tif(isset($this->_strDataSet[0])){\n\t\t\t/* update from date */\n\t\t\t$this->_strDataSet[0]['from-date'] \t= \t( !empty($this->_strDataSet) && !empty($this->_strDataSet[0]) && !empty(!empty($this->_strDataSet[0]['from-date']))) ? getDateFormat($this->_strDataSet[0]['from-date'],5) : '0000/00/00';\n\t\t\t/* update to date */\n\t\t\t$this->_strDataSet[0]['to-date'] \t= \t( !empty($this->_strDataSet) && !empty($this->_strDataSet[0]) && !empty(!empty($this->_strDataSet[0]['to-date']))) ? getDateFormat($this->_strDataSet[0]['to-date'],5) : '0000/00/00';\n\t\t}\n\t\t/* return updated dataset */\n\t\treturn $this->_strDataSet;\n\t}", "title": "" }, { "docid": "ab06e09648a3b71419575958fd9088af", "score": "0.5317263", "text": "public function getOldData()\n\t{\n\t\t$db = Factory::getDbo();\n\t\t$query = $db->getQuery(true);\n\t\t$query->select('*');\n\t\t$query->from($db->quoteName('#__tj_vendors'));\n\t\t$db->setQuery($query);\n\n\t\treturn $db->loadObjectList();\n\t}", "title": "" }, { "docid": "4770a3b65d2ee86a1e07d5dffe9ddc81", "score": "0.5311136", "text": "function _get_data_by_recent ($args) {\n\t\t// this returns a $data array suitable for sending to a template.\n\t\t// It lists recent dates with debates/wrans on them, with links.\n\t\t\t\t\n\t\tif (isset($args['days']) && is_numeric($args['days'])) {\n\t\t\t$limit = 'LIMIT ' . $args['days'];\n\t\t} else {\n\t\t\t$limit = '';\n\t\t}\n\t\t\n\t\tif ($this->major != '') {\n\t\t\t// We must be in DEBATELIST or WRANSLIST.\n\t\t\t\n\t\t\t$major = \"WHERE major = '\" . $this->major . \"'\";\n\t\t}\n\t\t\n\t\t$data = array ();\n\t\t\n\t\t$q = $this->db->query (\"SELECT DISTINCT(hdate)\n\t\t\t\t\t\tFROM \thansard\n\t\t\t\t\t\t$major\t\n\t\t\t\t\t\tORDER BY hdate DESC\n\t\t\t\t\t\t$limit\n\t\t\t\t\t\t\");\n\n\t\tif ($q->rows() > 0) {\n\n\t\t\t$URL = new URL($this->listpage);\n\t\t\t\n\t\t\tfor ($n=0; $n<$q->rows(); $n++) {\n\t\t\t\t$rowdata = array();\n\t\t\t\t\n\t\t\t\t$rowdata['body'] = format_date($q->field($n, 'hdate'), SHORTDATEFORMAT);\n\t\t\t\t$URL->insert(array('d'=>$q->field($n, 'hdate')));\n\t\t\t\t$rowdata['listurl'] = $URL->generate();\n\t\t\t\t\n\t\t\t\t$data['rows'][] = $rowdata;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$data['info']['text'] = 'Recent dates';\n\t\t\n\t\t\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "e7a07c4298ed17280c87b42a71627bb9", "score": "0.5306309", "text": "protected function getThesisInformation() {\n $returnArray = array();\n $vsl = $this->marcRecord->getFields('502');\n if ($vsl) {\n // Durchlaufe die Felder 981 (Online-Bestandsangaben aller GBV-Bibliotheken)\n // Dies ist notwendig, um die Linkbezeichnungen aus dem MARC-Code abzufischen\n foreach($vsl as $vsle) {\n $v_name = $vsle->getSubfield('a');\n $returnArray[] = $v_name->getData();\n }\n }\n return $returnArray;\n }", "title": "" }, { "docid": "b7d33349917153e2bb6cce0b163bdb4d", "score": "0.52810717", "text": "public static function read_vol_ast_eval_history($vol){\n$eval_content_arr = array();\n$eval_files = (array) glob(self::$data_dir.\"/*/perf/*/evaluation/Details_\".str_pad( $vol, 5,0, STR_PAD_LEFT).\"_*.csv\");\n$c=0;\nforeach($eval_files as $eval_file){\n\t//print file_get_contents($eval_file);\n\t//print \"\\n\\r\";\n\t$eval_content = file($eval_file);\n\t$eval_content_arr[$c]['date']=$eval_content[0];\n\tfor($i=2;$i<count($eval_content);$i++){\n\t\t$eval_content_sp = split(\",\",$eval_content[$i]);\n\t\t$eval_content_arr[$c][\"{$eval_content_sp[3]}_{$eval_content_sp[2]}\"][] = $eval_content_sp[0];\n\t}\n\t $c++;\n}\nreturn (array) $eval_content_arr;\n}", "title": "" }, { "docid": "83a804586fe01ca4c830264d5e21002e", "score": "0.52610224", "text": "function get_CM_by_dates()\n {\n $cmInfo['created_by'] = $cmInfo['modified_by'] = $_SESSION['user_id'];\n $cmInfo['created_date_time'] = $cmInfo['modified_date_time'] = date('Y-m-d H:i:s');\n\n return $cmInfo;\n }", "title": "" }, { "docid": "4fde11b1073e6cc229a7d12a72b80916", "score": "0.525915", "text": "function extract_info($fp, $link) {\r\n while (!feof ($fp)) {\r\n $buffer .= fgets($fp, 4096);\r\n }\r\n\r\n if (ereg (\"(<!-- start: main content -->)(.*)(<!-- end: main content -->)\", $buffer, $matches1)) {\r\n if (ereg(\"(<!-- start: main content -->)(.*)(<PRE>)\", $matches1[0], $header)) {\r\n //$processed1 = ereg_replace(\"(<!-- start: main content -->)\", \"\", $header[0]);\r\n //$processed1 = ereg_replace(\"(<PRE>)\", \"\", $processed1);\r\n //print $processed1;\r\n if (ereg(\"(</table><table summary=\\\"\\\" >)(.*)(</table>)\", $header[0], $matches2)) {\r\n //print $matches2[0];\r\n // archive number example: 20060328.0942\r\n\r\n $core = $matches[0];\r\n\r\n $pattern[0] = \"/(<\\/table><table)(.*)(<\\/B><\\/td>)/\";\r\n $pattern[1] = \"/(<\\/td>)/\";\r\n $pattern[2] = \"/(<\\/table>)/\";\r\n $pattern[3] = \"/(<td nowrap)(.*)(left\\\">)/\";\r\n $pattern[4] = \"/(<\\/tr>)(<tr>)(.*)(Date<\\/B>)/\";\r\n $pattern[5] = \"/(<\\/tr>)(<tr>)(.*)(Subject<\\/B>)/\";\r\n $pattern[6] = \"/(<\\/tr>)/\";\r\n $pattern[7] = \"/(<br>)/\";\r\n $replacement[0] = \"\";\r\n $replacement[1] = \"\";\r\n $replacement[2] = \"\";\r\n $replacement[3] = \"\";\r\n $replacement[4] = \"\";\r\n $replacement[5] = \"\";\r\n $replacement[6] = \"\";\r\n $replacement[7] = \"\";\r\n $core = preg_replace($pattern, $replacement, $matches2[0]);\r\n list($temp, $archiveno_temp, $publishdate_temp, $subject_temp) = preg_split(\"/[\\n]+/\",$core);\r\n $array = preg_split(\"/[\\n]+/\",$core);\r\n // archive number example: 20060328.0942\r\n if (preg_match(\"/^([0-9]{8}\\.[0-9]{4})/\", $archiveno_temp, $match)) {\r\n $archiveno = $match[0];\r\n }\r\n // published date example: 28-MAR-2006\r\n if (preg_match(\"/([0-9]){1,2}(\\-)([A-Z]{3})(\\-)([0-9]{4})/\", $publishdate_temp, $match)) {\r\n $publishdate = $match[0];\r\n }\r\n // subject example: starts with PRO/\r\n if (preg_match(\"/^(PRO\\/)(.*)/\", $subject_temp, $match)) {\r\n $subject = $match[0];\r\n $structured_subject = $this->parse_subject($subject);\r\n }\r\n\r\n }\r\n }\r\n if (ereg(\"(<PRE>)(.*)(</PRE>)\", $buffer, $matches3)) {\r\n $freetext = $matches3[0];\r\n $structuredtext = $this->parse_body($freetext);\r\n if (strlen(trim($structuredtext[\"COUNTRY\"]))==0) {\r\n $structuredtext[\"COUNTRY\"] = $structured_subject[\"COUNTRY\"];\r\n }\r\n }\r\n print \"LINK: <a href='$link'>click</a><br>\";\r\n print \"ARCHIVE NUMBER: $archiveno<br>\";\r\n print \"PUBLISH DATE: $publishdate<br>\";\r\n print \"SUBJECT: $subject<br><br>\";\r\n print \"TOPIC: \".$structured_subject[\"TOPIC\"].\"<br>\";\r\n print \"EMAIL TYPE: \".$structured_subject[\"EMAILTYPE\"].\"<br>\";\r\n print \"SERIES: \".$structured_subject[\"SERIES\"].\"<br>\";\r\n print \"COUNTRIES: \".$structuredtext[\"COUNTRY\"].\"<br><br>\";\r\n\r\n $ts = $this->convert_date($publishdate);\r\n $month = date(\"n\", $ts);\r\n if ($month<=3) {\r\n $quarter = 1;\r\n } elseif ($month<=6) {\r\n $quarter = 2;\r\n } elseif ($month<=9) {\r\n $quarter = 3;\r\n } elseif ($month<=12) {\r\n $quarter = 4;\r\n }\r\n $pdate = date(\"Y-m-d\", $ts);\r\n srand();\r\n $train = rand(0,1);\r\n $sql = \"insert into raw (raw_date, email_url, archive_num, publish_date, email_subject, country_list, series_num, topic, \".\r\n \"week, month, dayofweek, quarter, train) values \".\r\n \"('\".date(\"Y-m-d H:i:s\").\"', '\".$link.\"', '\".$archiveno.\"', '\".$pdate.\"', '\".$subject.\"', \".\r\n \"'\".$structuredtext[\"COUNTRY\"].\"', '\".$structured_subject[\"SERIES\"].\"', \".\r\n \"'\".$structured_subject[\"TOPIC\"].\"', '\".date(\"W\",$ts).\"', '\".date(\"n\",$ts).\"', '\".strtoupper(date(\"D\",$ts)).\"', \".\r\n \"'\".$quarter.\"', '$train')\";\r\n $this->mysqldb->execsql($sql);\r\n }\r\n }", "title": "" }, { "docid": "c4b06b1b05dd4973bc365d6b428691bd", "score": "0.52331007", "text": "public static function read_ast_history($vols){\n\n\t\n\n\t$files = glob(self::$data_dir.\"/*/perf/*/history/*.csv\");\n$data = array();\n\n\nforeach($files as $file){\n\t$content = file($file);\n\tfor($i=1;$i<count($content);$i++){\n\t\t$content_data = split(\",\",$content[$i]);\n\t\tif(in_array($content_data[0],$vols)){\n\t\t//\t$max = (int) count($data);\n\t\t//\t$data[$max] = $content_data;\n\t\t//\t$data[$max][] = $file;\n\n\t\t\t$key_date = date(\"Ymd\",strtotime($content_data[1]));\n\t\t\t$key_vol = $content_data[0];\n\t\t\t$data[\"$key_date\"][$key_vol] = $content_data;\n\t\t}\n\t}\n}\n\n$data = (array) $data;\n\n//print_r($data);\n//foreach($data as $arr_date=>$arr_vol){\n//\tprint \"$arr_date : \". count($arr_vol) . \"\\n\";\n//}\n//die();\n\n//usort($data,'sort_by_time');\n//$data_u = array_unique($data, SORT_REGULAR);\n//$data_u = (array) filter_duplicate_dates($data);\n//$data_u = $data;\n\n/** get sum per volume **/\nforeach($data as $arr_date=>$arr_vol){\n\t$low_cap=0;$mid_cap=0;$high_cap = 0;\nforeach($arr_vol as $vol_data){\n$low_cap += $vol_data[4];\n$mid_cap += $vol_data[5];\n$high_cap += $vol_data[6];\n}\n\n$data_u[] = array(\n\t\"low\"=>$low_cap,\n\t\"mid\"=>$mid_cap,\n\t\"high\"=>$high_cap,\n\t\"total\"=>($low_cap+$mid_cap+$high_cap),\n\t\"date\"=>$arr_date\n\t);\n}\n\n$data_models = array(0=>\"\",1=>\"\",2=>\"\");\n\n//print_r($data_u);\n//die();\n/** Get data models */\n\nforeach($data_u as $val){\n\t\n//$total = $val[4]+$val[5]+$val[6];\n\n$data_models[0][] = array(\"label\"=>date(self::$chart_date_format,strtotime($val['date'])),\"y\"=>floor($val['low']/$val['total']*100),\"s\"=>$val['low']);\t\n$data_models[1][] = array(\"label\"=>date(self::$chart_date_format,strtotime($val['date'])),\"y\"=>floor($val['mid']/$val['total']*100),\"s\"=>$val['mid']);\t\n$data_models[2][] = array(\"label\"=>date(self::$chart_date_format,strtotime($val['date'])),\"y\"=>floor($val['high']/$val['total']*100),\"s\"=>$val['high']);\n\t\n}\n\nreturn (array) $data_models;\n}", "title": "" }, { "docid": "62b68dd6f763af2ffeecf12e0928a9af", "score": "0.5220808", "text": "function calendarinfo( $day, $month, $year )\n\t{\n\t\tglobal $db, $errors, $lang_loader;\n\t\t\n\t\t$from = mktime( 0, 0, 0, $month, $day, $year ); // first second of day\n\t\t$to = mktime( 23, 59, 59, $month, $day, $year ); // last second of day\n\t\t$date = date( 'd. ', $from ) . $this->lang[ 'Month_' . $month ] . ' ' . $year;\n\t\t\n\t\t/*$sql = \"SELECT * FROM \" . SHOWEVENT_ITEM_TABLE . \" WHERE (\" .\n\t\t\t\t\t\t\t\t\t\t\t\t\"('$from' BETWEEN item_time_from_stamp AND item_time_to_stamp)OR\" .\n\t\t\t\t\t\t\t\t\t\t\t\t\"('$to' BETWEEN item_time_from_stamp AND item_time_to_stamp)OR\" .\n\t\t\t\t\t\t\t\t\t\t\t\t\"(item_time_from_stamp BETWEEN '$from' AND '$to')OR\" .\n\t\t\t\t\t\t\t\t\t\t\t\t\"(item_time_to_stamp BETWEEN '$from' AND '$to' )\" .\n\t\t\t\t\t\t\t\t\t\t\t\t\") AND item_language='\" . $lang_loader->board_lang . \"' AND item_isdeleted=0 ORDER BY item_isevent ASC, item_time_from_stamp ASC\";*/\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t$sql = \"SELECT i.* FROM \" . SHOWEVENT_ITEM_TABLE . \" i LEFT JOIN \" . \n\t\t\t\t\t\t\t\t\t\t\tSHOWEVENT_CAT2ITEM_TABLE . \" c2i ON i.item_id=c2i.item_id LEFT JOIN \" .\n\t\t\t\t\t\t\t\t\t\t\tSHOWEVENT_CATEGORY_TABLE . \" c ON c2i.cat_id=c.cat_id \" . \n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\" WHERE (\" .\n\t\t\t\t\t\t\t\t\t\t\t\t\"('$from' BETWEEN i.item_time_from_stamp AND i.item_time_to_stamp)OR\" .\n\t\t\t\t\t\t\t\t\t\t\t\t\"('$to' BETWEEN i.item_time_from_stamp AND i.item_time_to_stamp)OR\" .\n\t\t\t\t\t\t\t\t\t\t\t\t\"(i.item_time_from_stamp BETWEEN '$from' AND '$to')OR\" .\n\t\t\t\t\t\t\t\t\t\t\t\t\"(i.item_time_to_stamp BETWEEN '$from' AND '$to' )\" .\n\t\t\t\t\t\t\t\t\t\t\t\t\") AND i.item_language='\" . $lang_loader->board_lang . \"' AND i.item_isdeleted=0 \" .\n\t\t\t\t\t\t\t\t\t\t\t\t\"AND c.cat_parent <> 1 AND c.cat_parent <> 18 \" . \n\t\t\t\t\t\t\t\t\t\t\t\t\"ORDER BY i.item_isevent ASC, i.item_time_from_stamp DESC\";\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\tif ( !$result = $db->sql_query( $sql ) )\n\t\t{\n\t\t\t$err = $errors->return_error( 'Error while fetching data', CRITICAL_ERROR );\n\t\t\treturn array( $date, $err, $err );\n\t\t}\n\t\t$items = $db->sql_fetchrowset( $result );\n\t\t$events = $this->gui->parseItems( $items, 'events' );\n\t\t$shows = $this->gui->parseItems( $items, 'shows' );\n\t\t\n\t\treturn array( $date, $events, $shows );\n\t}", "title": "" }, { "docid": "b64b6a56bf7939fbcb0c7cbec2ffeb26", "score": "0.51498294", "text": "function get_cdc($epiweeks, $locations) {\n global $dbh;\n // basic query info\n $table = '`cdc_extract` c';\n $group = \"c.`epiweek`\";\n $order = \"c.`epiweek` ASC\";\n $fields_string = array('location');\n $fields_int = array('epiweek', 'num1', 'num2', 'num3', 'num4', 'num5', 'num6', 'num7', 'num8', 'total');\n // build the epiweek filter\n $condition_epiweek = filter_integers('c.`epiweek`', $epiweeks);\n // split locations into national/regional/state\n $regions = array();\n $states = array();\n foreach($locations as $location) {\n $location = strtolower($location);\n if(in_array($location, array('nat', 'hhs1', 'hhs2', 'hhs3', 'hhs4', 'hhs5', 'hhs6', 'hhs7', 'hhs8', 'hhs9', 'hhs10', 'cen1', 'cen2', 'cen3', 'cen4', 'cen5', 'cen6', 'cen7', 'cen8', 'cen9'))) {\n array_push($regions, $location);\n } else {\n array_push($states, $location);\n }\n }\n // initialize the epidata array\n $epidata = array();\n // query each region type individually (the data is stored by state, so getting regional data requires some extra processing)\n foreach($regions as $region) {\n $region = mysqli_real_escape_string($dbh, $region);\n $fields = \"'{$region}' `location`, c.`epiweek`, sum(c.`num1`) `num1`, sum(c.`num2`) `num2`, sum(c.`num3`) `num3`, sum(c.`num4`) `num4`, sum(c.`num5`) `num5`, sum(c.`num6`) `num6`, sum(c.`num7`) `num7`, sum(c.`num8`) `num8`, sum(c.`total`) `total`\";\n if($region === 'nat') {\n // final query for U.S. National\n $query = \"SELECT {$fields} FROM {$table} WHERE ({$condition_epiweek}) GROUP BY {$group} ORDER BY {$order}\";\n } else {\n // build the location filter\n $condition_location = \"`state` IN (\" . get_region_states($region) . \")\";\n // final query for HHS Regions\n $query = \"SELECT {$fields} FROM {$table} WHERE ({$condition_epiweek}) AND ({$condition_location}) GROUP BY {$group} ORDER BY {$order}\";\n }\n // append query results to the epidata array\n execute_query($query, $epidata, $fields_string, $fields_int, null);\n }\n // query all states together\n if(count($states) !== 0) {\n $fields = \"c.`state` `location`, c.`epiweek`, c.`num1`, c.`num2`, c.`num3`, c.`num4`, c.`num5`, c.`num6`, c.`num7`, c.`num8`, c.`total`\";\n // build the location filter\n $condition_location = filter_strings('c.`state`', $states);\n // final query for states\n $query = \"SELECT {$fields} FROM {$table} WHERE ({$condition_epiweek}) AND ({$condition_location}) ORDER BY {$order}, c.`state` ASC\";\n // append query results to the epidata array\n execute_query($query, $epidata, $fields_string, $fields_int, null);\n }\n // return the data\n return count($epidata) === 0 ? null : $epidata;\n}", "title": "" }, { "docid": "25bf420817e083cfef703c203d31738d", "score": "0.5128762", "text": "private function collectData()\n {\n // if we're on a windows box, or we've already collected data, bail early\n if (stripos(php_uname('s'), 'Windows') !== false || isset($this->systemInfo['uname'])) {\n return $this->systemInfo;\n }\n\n // collect all the data we can, based on what commands are available\n $this->systemInfo['uname'] = php_uname('a');\n $this->systemInfo['disk'] = $this->collect('df', '-h');\n $this->systemInfo['date'] = $this->collect('date', '++\"%Y-%m-%d %H:%m:%S[%z/%Z]\"');\n\n if (stripos(php_uname('s'), 'Linux')) {\n // Linux distributions\n $this->systemInfo['process'] = $this->collect(\n 'top',\n '-bn1',\n function ($line) {\n return preg_match('/(top|tasks|mem|cpu|\\s*pid)|apache|httpd/i', $line);\n }\n );\n } else {\n // BSD variants, including OSX (Darwin)\n $this->systemInfo['process'] = $this->collect(\n 'top',\n '-l1',\n function ($line) {\n return preg_match('/(load avg|cpu|physmem|vm|disks|\\s*pid)|apache|httpd/i', $line);\n }\n );\n }\n\n return $this->systemInfo;\n }", "title": "" }, { "docid": "4a1d09384022c8d19e88d9b9b2dd4704", "score": "0.5127593", "text": "function read_monthly_dist_xml($xml_path, &$imei, &$vname, &$mdate, &$daily_dist)\r\n {\r\n //echo \"<br>read_monthly_dist_xml\";\r\n //echo \"<br>xml_path in read_xml=\".$xml_path; \r\n $fexist =1; \r\n $xml = fopen($xml_path, \"r\") or $fexist = 0;\r\n \r\n $count = count(file($xml_path));\r\n //echo \"<BR>COUNT======== $count lines in $xml\";\r\n //$xml2 = '\"'.$xml.'\"';\r\n if($fexist)\r\n {\r\n $i=0;\r\n \t\r\n while(!feof($xml)) // WHILE LINE != NULL\r\n \t{\r\n \t\t$line = fgets($xml); // STRING SHOULD BE IN SINGLE QUOTE \r\n //echo '<br>line='.$line; \r\n //echo \"<br>line[0]=\".$line[0].\" ,\".$line[strlen($line)-2].\" ,\".$DataValid.\" ,\".$fix_tmp; \r\n \r\n // FORMAT 2 OPENS\r\n if( ($line[0] == '<') && ($line[strlen($line)-2] == '>') )\r\n {\r\n //echo \"<br>IN format2\"; \r\n $status = preg_match('/imei=\"[^\"]+/', $line, $imei_tmp);\r\n //echo \"Status1=\".$status.'<BR>';\r\n if($status==0)\r\n {\r\n continue;\r\n }\t\t\t\t\t\t\t\r\n \r\n $status = preg_match('/vname=\"[^\"]+/', $line, $vname_tmp);\r\n //echo \"Status2=\".$status.'<BR>';\r\n //echo \"test1\".'<BR>';\r\n if($status==0)\r\n {\r\n continue;\r\n }\r\n \r\n $status = preg_match('/date=\"[^\"]+/', $line, $mdate_tmp);\r\n //echo \"Status3=\".$status.'<BR>';\r\n //echo \"test1\".'<BR>';\r\n if($status==0)\r\n {\r\n continue;\r\n }\r\n \r\n $status = preg_match('/daily_dist=\"[^\" ]+/', $line, $daily_dist_tmp);\r\n //echo \"Status=\".$status.'<BR>';\r\n //echo \"test1\".'<BR>';\r\n if($status==0)\r\n {\r\n continue;\r\n }\r\n \r\n // Store Name with Value \r\n $tmp = explode(\"=\",$imei_tmp[0]);\r\n $imei[$i] = preg_replace('/\"/', '', $tmp[1]); \r\n \r\n $tmp = explode(\"=\",$vname_tmp[0]);\r\n $vname[$i] = preg_replace('/\"/', '', $tmp[1]);\r\n \r\n $tmp = explode(\"=\",$mdate_tmp[0]);\r\n $mdate[$i] = preg_replace('/\"/', '', $tmp[1]);\r\n \r\n $tmp = explode(\"=\",$daily_dist_tmp[0]);\r\n $daily_dist[$i] = preg_replace('/\"/', '', $tmp[1]); \r\n //echo \"<br>dailydist=\".$daily_dist[$i]; \r\n \r\n $i++; \r\n } // // IF LINE 0 \r\n } // WHILE CLOSED\r\n } // IF FEXIST\r\n}", "title": "" }, { "docid": "8c63186c471f67c6cfb460e15c107d6e", "score": "0.51239467", "text": "function listameses(){\n\t$a=gregoriantojd(1,10,2005);\n\n\tfor($c=1;$c<13;$c++){\n\t\t$mes[$c]=jdmonthname($a,0);\n\t\t$a+=32;\n\t\t}\n\treturn $mes;\n}", "title": "" }, { "docid": "4b25910181683f77e7009bfd05ccc5a5", "score": "0.51004434", "text": "function _get_data_by_date ($args) {\n\t\t// links for an entire day of debates/wrans.\n\t\n\t\tglobal $DATA, $this_page;\n\t\t\n\t\ttwfy_debug (get_class($this), \"getting data by date\");\n\t\t\n\t\t// Where we'll put all the data we want to render.\n\t\t$data = array ();\n\t\t\n\t\t\n\t\t$date = $this->_validate_date($args);\n\t\n\t\tif ($date) {\t\t\n\t\t\n\t\t\t$nextprev = $this->_get_nextprev_dates($date);\n\t\t\t\n\t\t\t// We can then access this from $PAGE and the templates.\n\t\t\t$DATA->set_page_metadata($this_page, 'nextprev', $nextprev);\n\t\t\t\n\t\t\t\n\t\t\t// Get all the sections for this date.\n\t\t\t// Then for each of those we'll get the subsections and rows.\n\t\t\t$input = array (\n\t\t\t\t'amount' => array (\n\t\t\t\t\t'body' => true,\n\t\t\t\t\t'comment' => true,\n\t\t\t\t\t'excerpt' => true\n\t\t\t\t),\n\t\t\t\t'where' => array (\n\t\t\t\t\t'hdate=' => \"$date\",\n\t\t\t\t\t'htype=' => '10',\n\t\t\t\t\t'major=' => $this->major\n\t\t\t\t),\n\t\t\t\t'order' => 'hpos'\n\t\t\t);\n\t\t\t\n\t\t\t$sections = $this->_get_hansard_data($input);\n\n\t\t\tif (count($sections) > 0) {\n\t\t\t\t\n\t\t\t\t// Where we'll keep the full list of sections and subsections.\n\t\t\t\t$data['rows'] = array();\n\t\t\t\t\n\t\t\t\tfor ($n=0; $n<count($sections); $n++) {\n\t\t\t\t\t// For each section on this date, get the subsections within it.\n\n\t\t\t\t\t// Get all the section data.\n\t\t\t\t\t$sectionrow = $this->_get_section($sections[$n]);\n\t\t\t\t\t\n\t\t\t\t\t// Get the subsections within the section.\t\t\t\t\t\t\n\t\t\t\t\t$input = array (\n\t\t\t\t\t\t'amount' => array (\n\t\t\t\t\t\t\t'body' => true,\n\t\t\t\t\t\t\t'comment' => true,\n\t\t\t\t\t\t\t'excerpt' => true\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'where' => array (\n\t\t\t\t\t\t\t'section_id='\t=> $sections[$n]['epobject_id'],\n\t\t\t\t\t\t\t'htype='\t\t=> '11',\n\t\t\t\t\t\t\t'major='\t\t=> $this->major\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'order' => 'hpos'\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t$rows = $this->_get_hansard_data($input);\n\n\t\t\t\t\t// Put the section at the top of the rows array.\n\t\t\t\t\tarray_unshift ($rows, $sectionrow);\n\t\t\t\t\t\n\t\t\t\t\t// Add the section heading and the subsections to the full list.\n\t\t\t\t\t$data['rows'] = array_merge ($data['rows'], $rows);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// For page headings etc.\n\t\t\t$data['info']['date'] = $date;\n\t\t\t$data['info']['major'] = $this->major;\n\t\t}\n\t\t\t\t\n\t\treturn $data;\t\t\n\t}", "title": "" }, { "docid": "42aa2933630427d4f036c60548d24973", "score": "0.5051614", "text": "function cGetSeasonInfo ($YY=0) { // feed it the year\n $seasonList = array( // seasons from USNO in WD date format\n // year => 'Spring|Summer|Autumn|Winter'\n '2009' => '11:44 GMT 20 March 2009|05:46 GMT 21 June 2009|21:19 GMT 22 September 2009|17:47 GMT 21 December 2009|',\n '2010' => '17:32 GMT 20 March 2010|11:28 GMT 21 June 2010|03:09 GMT 23 September 2010|23:38 GMT 21 December 2010|',\n '2011' => '23:21 GMT 20 March 2011|17:16 GMT 21 June 2011|09:05 GMT 23 September 2011|05:30 GMT 22 December 2011|',\n '2012' => '05:14 GMT 20 March 2012|23:09 GMT 20 June 2012|14:49 GMT 22 September 2012|11:12 GMT 21 December 2012|',\n '2013' => '11:02 GMT 20 March 2013|05:04 GMT 21 June 2013|20:44 GMT 22 September 2013|17:11 GMT 21 December 2013|',\n '2014' => '16:57 GMT 20 March 2014|10:51 GMT 21 June 2014|02:29 GMT 23 September 2014|23:03 GMT 21 December 2014|',\n '2015' => '22:45 GMT 20 March 2015|16:38 GMT 21 June 2015|08:21 GMT 23 September 2015|04:48 GMT 22 December 2015|',\n '2016' => '04:30 GMT 20 March 2016|22:34 GMT 20 June 2016|14:21 GMT 22 September 2016|10:44 GMT 21 December 2016|',\n '2017' => '10:29 GMT 20 March 2017|04:24 GMT 21 June 2017|20:02 GMT 22 September 2017|16:28 GMT 21 December 2017|',\n '2018' => '16:15 GMT 20 March 2018|10:07 GMT 21 June 2018|01:54 GMT 23 September 2018|22:23 GMT 21 December 2018|',\n '2019' => '21:58 GMT 20 March 2019|15:54 GMT 21 June 2019|07:50 GMT 23 September 2019|04:19 GMT 22 December 2019|',\n '2020' => '03:50 GMT 20 March 2020|21:44 GMT 20 June 2020|13:31 GMT 22 September 2020|10:02 GMT 21 December 2020|',\n ); // end of seasonList\n\n if($YY<2009) {$YY = idate('Y');} // use current year \n $info = new stdClass();\n if(!isset($seasonList[$YY])) {\n\t $info->error = \"Year $YY not in list\";\n\t return $info;\n }\n list($spring,$summer,$fall,$winter) = explode('|',$seasonList[$YY]);\n $info->spring = $spring;\n $info->summer = $summer;\n $info->fall = $fall;\n $info->winter = $winter;\n \n return $info;\n\n}", "title": "" }, { "docid": "30726224be40f0223c8538093f2376db", "score": "0.504726", "text": "function est($day)\n\t{\n\t\t//for a specific day\n\t\techo \"<p>\";\n\t\techo 'day = ';\n\t\techo $day;\n\t\techo \"\\r\\n\";\n\t\t$day_mod = $day % 7;\n\t\techo '| day_mod = ';\n\t\techo $day_mod;\n\t\techo \"\\r\\n\";\n\t\tif($day_mod==0) \n\t\t\t$day_mod=1;\n\t\t$query = \"SELECT att FROM bm2 WHERE date = $day_mod\";\n\t\t$result = mysql_query($query) or die(mysql_error());\n\t\t$old_data1 = mysql_fetch_assoc($result);\n\t\t$old_data1 = $old_data1['att'];\n\t\techo \"\\n\";\n\t\techo \"\\n\";\n\t\techo '| previous_record_1 = ';\n\t\techo $old_data1;\n\t\t//echo \"\\$\" . $old_data1; \n\t\techo \"\\n\";\n\t\t\n\t\t$query = \"SELECT att FROM bm2 WHERE date = ($day_mod +7)\";\n\t\t$result = mysql_query($query);\n\t\t$old_data2 = mysql_fetch_assoc($result);\n\t\t$old_data2 = $old_data2['att'];\n\t\techo '| previous_record_2 = ';\n\t\techo $old_data2;\n\t\techo \"\\r\\n\";\n\t\t\n\t\t$query = \"SELECT att FROM bm2 WHERE date = ($day_mod + 14)\";\n\t\t$result = mysql_query($query);\n\t\t$old_data3 = mysql_fetch_assoc($result);\n\t\t$old_data3 = $old_data3['att'];\n\t\techo '| previous_record_3 ';\n\t\techo $old_data3;\n\t\techo \"\\r\\n\";\n\t\t\n\t\t$query = \"SELECT att FROM bm2 WHERE date = ($day_mod + 21)\";\n\t\t$result = mysql_query($query);\n\t\t$old_data4 = mysql_fetch_assoc($result);\n\t\t$old_data4 = $old_data4['att'];\n\t\techo '| previous_record_4 ';\n\t\techo $old_data4;\n\t\techo \"\\r\\n\";\n\t\t$sum =(int)($old_data1 + $old_data2 + $old_data3 + $old_data4);\n\t\techo \" | sum = \";\n\t\techo $sum;\n\t\t$est_stage1 = $sum/4;\n\t\techo ' | stage_1_estimation = ';\n\t\techo $est_stage1;\n\t\techo \"\\r\\n\";\n\t\t$query = \"SELECT te FROM superv2 WHERE date = $day\";\n\t\t$result = mysql_query($query);\n\t\t$new_data = mysql_fetch_assoc($result);\n\t\t\n\t\t$est_stage2 = ($est_stage1 + $new_data['te'])/2;\n\t\techo ' | stage_2_estimation = ';\n\t\techo $est_stage2;\n\t\techo \"\\r\\n\";\n\t\techo \"</p>\";\n\t\treturn $est_stage2;\n\t}", "title": "" }, { "docid": "d429f0d0f51e0d55298cbd4803db5aeb", "score": "0.50299335", "text": "public function getSystemInfo(){\n $results = [];\n $results['UserFrosting Version'] = $this->version;\n $results['Web Server'] = $_SERVER['SERVER_SOFTWARE'];\n $results['PHP Version'] = phpversion();\n $dbinfo = Database::getInfo();\n $results['Database Version'] = $dbinfo['db_type'] . \" \" . $dbinfo['db_version'];\n $results['Database Name'] = $dbinfo['db_name'];\n $results['Table Prefix'] = $dbinfo['table_prefix'];\n $environment = static::$app->environment();\n $results['Application Root'] = static::$app->config('base.path');\n $results['Document Root'] = $this->uri['public'];\n return $results;\n }", "title": "" }, { "docid": "f9b686dbb6155bcd93b2f3474e62a9ce", "score": "0.5022781", "text": "function get_date($link)\n {\n $sql = \"select date from harvester_date;\";\n $result = $link->query($sql);\n $rows = array();\n while($row = $result->fetch_assoc())\n {\n\t$date[] = $row[\"date\"];\n }\n $result->close();\n \n //write to log\n $log=fopen('ckan_transfer.log', 'a');\n $l='***************************'.PHP_EOL.'STARTING NEW SYNCHRONIZATION:'.date(\"Y-m-d H:i:s\").PHP_EOL.'***************************'.PHP_EOL; \n fwrite($log, $l);\n fclose($log);\n \n //this is the date\n return $date[0];\n //return date(\"M-d-Y\", mktime(0, 0, 0, 12, 32, 1997)); for tests\n }", "title": "" }, { "docid": "fd128e6320811daf40fa53e68180629b", "score": "0.5022434", "text": "function getGeneralScreensData($idApp, $initialDate, $finalDate){\n @list($d1, $m1, $y1) = explode( $this->separador, $initialDate,3);\n @list($d2, $m2, $y2) = explode( $this->separador, $finalDate, 3);\n $c = $this->getConector($y1, $y2);\n $db = null;\n if($this->getSegmentQuery()!=null){ \n $db = $this->otherdb;\n $db->select(\" screen, count(screen) as pantallas\");\n }\n else{\n $db = $this->db;\n $db->select(\" screen, sum(cant) as pantallas\");\n }\n $db->from(\"screen\");\n $db->where(\"id_app\", $idApp);\n $db->where(\"((year = $y1 and ( $m1 < month or ($m1=month and day >= $d1 and day <= 31 ) )) $c \n (year = $y2 and ( $m2 > month or ($m2=month and day >= 01 and $d2 >= day ))))\");\n $db->group_by(\"screen\");\n $db->order_by(\"pantallas\"); \n $this->addSegmentQuery($db);\n $result = $db->get(); \n return $result->result_array();\n }", "title": "" }, { "docid": "6ef286509f1828af7ba3a37c56549165", "score": "0.5021202", "text": "function getOfficialApplicationRs(){\n\t\t$request = new Sushee_Request();\n\t\t$db_conn = $request->getApplicationDbConn();\n\t\t$sql = 'SELECT * FROM `applications` WHERE `ID` > 2 AND `ID` < 1024 ORDER BY `Denomination`';\n\t\tsql_log($sql);\n\t\t$app_rs = $db_conn->Execute($sql);\n\t\treturn $app_rs;\n\t}", "title": "" }, { "docid": "73cc927c38652fdc023d038fe25611b9", "score": "0.5021074", "text": "function jdo_getObs($s_url, $s_station_name, $s_err){\r\n\tglobal $contents;\r\n\tglobal $handle;\r\n\tglobal $date;\r\n\tglobal $temp;\r\n\tglobal $depth;\t\r\n\t\r\n\tif(urlExists($s_url)){\r\n\t\t$seperator = \"\\n\";\r\n\t\t\r\n\t\tif (!isset($contents)) $contents = array();\r\n\t\t\r\n\t\t$contents = splitfile($s_url, $seperator); \t\r\n\t\t// Remove Column Headers\r\n\t\t// Collect most recent data\r\n\t\t$recent = 4;\r\n\t\t$data = explode(\" \", $contents[$recent]);\r\n\t\t// format data\r\n\t\t\r\n\t\tif (strcmp($s_station_name, \"Independence Mine (3550')\") == 0){\r\n\t\t\t$date = substr($data[0], 0, 16);\r\n\t\t\t$temp = substr($data[4], 1, 5);\r\n\t\t\t$depth = substr($data[1], 2, 5);\t\t\t\r\n\t\t}else{\r\n\t\t\t$date = substr($data[0], 0, 16);\r\n\t\t\t$temp = substr($data[2], 1, 5);\r\n\t\t\t$depth = substr($data[3], 2, 5);\t\t\t\t\t\r\n\t\t}\r\n\t\r\n\t\t// create report\r\n\t\t$report = trim($s_station_name) . \";\" . trim($depth);\r\n\t\tfwrite($handle, $report . \";\");\t\r\n\t}else{\r\n\t\t$report = $s_err;\r\n\t\tfwrite($handle, $report . \";\");\t\r\n\t}\t\t\r\n}", "title": "" }, { "docid": "d8e173d274fb0bdaad3eb46c25725cb5", "score": "0.5019887", "text": "public function getLastUpdate(){\n\t\tglobal $db;\n\t\t//global $cfg['dbPrefix'];\n\n\t\t$this->db->query(\"SELECT 'date' FROM \".$cfg['dbPrefix'].\"lastupdate\");\n\t\t$date = explode(\"-\", self::getRows());\n\n\t\t$result['year'] = $date[0];\n\t\t$result['mth'] = $date[1];\n\t\t$result['day'] = $date[2];\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "72f8953fee1b7483d32207ab07439117", "score": "0.5013046", "text": "function get_version()\r\n {\r\n $verinfo=array(\"System.Had\",\"One\",\"Job\");\r\n if(file_exists(\"db/version.txt\"))\r\n {\r\n $vi=explode(\"\\r\\n\",file_get_contents(\"db/version.txt\"));\r\n if(count($vi) == 3)\r\n {\r\n $verinfo[0]=$vi[0];\r\n $verinfo[1]=$vi[1];\r\n $verinfo[2]=$vi[2];\r\n }\r\n }\r\n return $verinfo;\r\n }", "title": "" }, { "docid": "f1d20e4629ddf78f95f0fe12ada1a761", "score": "0.5008153", "text": "function past_gigs () {\n\t\t$results = array();\n\n\t\t// SELECT DATE(DATE_SUB(NOW(), INTERVAL 2 HOUR));\n\t\t//\n\t\tif ($this->mirror_specified()) {\n\t\t\tglobal $wpdb;\n\t\t\t// The server is in Saskatchewan, so convert \n\t\t\t// to PST\n\t\t\t// SELECT DATE(DATE_SUB(NOW(), INTERVAL 2 HOUR));\n\t\t\t$select = \"SELECT * FROM \" . $this->table .\n\t\t\t ' WHERE `date` < DATE(DATE_SUB(NOW(), INTERVAL 2 HOUR)) ORDER BY `date` DESC';\n\t\t\t$results = $wpdb->get_results( $select, ARRAY_A );\n\t\t}\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "a121ff94b7e480d08f5130ed9515cf73", "score": "0.49956372", "text": "function get_meta_norostat() {\n $epidata_releases = array();\n $query = 'SELECT DISTINCT `release_date` FROM `norostat_raw_datatable_version_list`';\n execute_query($query, $epidata_releases, array('release_date'), null, null);\n $epidata_locations = array();\n $query = 'SELECT DISTINCT `location` FROM `norostat_raw_datatable_location_pool`';\n execute_query($query, $epidata_locations, array('location'), null, null);\n $epidata = array(\n \"releases\" => $epidata_releases,\n \"locations\" => $epidata_locations\n );\n return $epidata;\n}", "title": "" }, { "docid": "e38e1eaf0d24f6ff92e55c96fb59688b", "score": "0.4982711", "text": "function latemysqlverfunc() {\r\n global $xmlindex,$installed_mysql;\r\n $latemysqlverarr[0]=$xmlindex->DB->MARIADB->LATEST; //MariaDB 10.x.x Latest Version Number\r\n $latemysqlverarr[1]=$xmlindex->DATA_URL->MARIADB_URL .\"mariadb/\".$xmlindex->DB->MARIADB->LATEST; //MariaDB 10.x.x Download URL\r\n return $latemysqlverarr;\r\n }", "title": "" }, { "docid": "893fd470bf10e584a3fe2e2942439f15", "score": "0.4978739", "text": "public function getdetails()\n {\n // Go through each of the systems (five at time)\n $systems = $this->System->find('list', ['fields' => ['System.id', 'System.sysID'], 'order' => ['System.sysID'], 'conditions' => ['title' => ''], 'limit' => 5]);\n\n $feedback = [];\n foreach ($systems as $id => $sysID) {\n $system = ['System' => ['id' => $id]];\n $url = str_replace(\"*sysID*\", $sysID, Configure::read('url.system.detail'));\n\n // Get system page contents and clean up HTML\n $page = file_get_contents($url);\n list(, $page) = explode(\"NIST Standard Reference Database 106\", $page);\n $page = str_replace([\" style=\\\"color:#663300;font-size:12pt;\\\"\", \"&nbsp;\"], \"\", $page);\n $page = str_replace(\"<font color=\\\"#663300\\\" size=\\\"3\\\">\", \"\", $page);\n\n // For system name match MainContentPlaceHolder_lbl_SysName\n $match = '/MainContentPlaceHolder_lbl_SysName\">(.*)<\\/span>/i';\n preg_match_all($match, $page, $data);\n (isset($data[1][0])) ? $system['System']['title'] = $this->clean($data[1][0]) : $system['System']['title'] = \"\";\n\n // For component data match MainContentPlaceHolder_lbl_compValue\n $match = '/MainContentPlaceHolder_lbl_compValue\">(.*)<\\/span>/i';\n preg_match_all($match, $page, $data);\n if (isset($data[1][0])) {\n $comps = str_ireplace(\"<br>\", \"\\t\", $data[1][0]);\n $comps = strip_tags($comps);\n $comps = str_replace([\"NIST Chemistry WebBook for detail\", \"[\", \"]\"], \"\", $comps);\n $comps = preg_replace('/\\(\\d{1,2}\\) /', \"\", $comps);\n $comps = str_replace(\"; \", \"**\", $comps);\n $system['Chemical'] = array_filter(explode(\"\\t\", trim($comps)));\n } else {\n $system['Chemical'] = \"\";\n }\n\n // For original measurement data (citation) match MainContentPlaceHolder_lbl_MeasValue\n $match = '/MainContentPlaceHolder_lbl_MeasValue\">(.*)<\\/span>/i';\n preg_match_all($match, $page, $data);\n (isset($data[1][0])) ? $system['Citation'] = $this->clean($data[1][0]) : $system['citation'] = \"\";\n\n // For variable data match MainContentPlaceHolder_lbl_VariValue\n $match = '/MainContentPlaceHolder_lbl_VariValue\">(.*)<\\/span>/i';\n preg_match_all($match, $page, $data);\n if (isset($data[1][0])) {\n $vars = str_ireplace(\"<br>\", \"\\t\", $data[1][0]);\n $vars = strip_tags($vars);\n $system['Variable'] = array_filter(explode(\"\\t\", $vars));\n } else {\n $system['Variable'] = \"\";\n }\n\n // For preparer data match MainContentPlaceHolder_lbl_prepValue\n $match = '/MainContentPlaceHolder_lbl_prepValue\">(.*)<\\/span>/i';\n preg_match_all($match, $page, $data);\n (isset($data[1][0])) ? $system['System']['preparer'] = $this->clean($data[1][0]) : $system['System']['preparer'] = \"\";\n\n // For experimental remarks data match MainContentPlaceHolder_lbl_ExpRValue\n $match = '/MainContentPlaceHolder_lbl_ExpRValue\">(.*)<\\/span>/i';\n preg_match_all($match, $page, $data);\n (isset($data[1][0])) ? $system['System']['remarks'] = $this->clean($data[1][0]) : $system['System']['remarks'] = \"\";\n\n // For experimental data match MainContentPlaceHolder_lbl_ExpDValue\n $match = '/MainContentPlaceHolder_lbl_ExpDValue\">(.*)<span id=\\\"MainContentPlaceHolder_lbl_EvalEDate/is';\n preg_match_all($match, $page, $data);\n (isset($data[1][0])) ? $system['System']['data'] = str_replace([\"\\r\", \"\\n\\n\\n\\n\", \"\\n\\n\\n\", \"\\n\\n\", \"\\n\"], [\"\", \"<br />\\n\", \"<br />\\n\", \"<br />\\n\", \"<br />\\n\"], strip_tags($data[1][0])) : $system['System']['data'] = \"\"; // needed becuase of \\n characters\n\n // For experimental data table match MainContentPlaceHolder_lbl_Table\n $match = '/MainContentPlaceHolder_lbl_Table\">(.*)<\\/span>/i';\n preg_match_all($match, $page, $data);\n $tables = explode(\"</table>\", $data[1][0]);\n foreach ($tables as $tid => $table) {\n $tables[$tid] = $this->table2json($table);\n }\n if ($tables[count($tables) - 1] == \"[]\") {\n unset($tables[count($tables) - 1]);\n }\n (isset($data[1][0])) ? $system['Table'] = $tables : $system['Table'] = \"\";\n\n // For experimental data note data match MainContentPlaceHolder_lbl_NoteValue\n $match = '/MainContentPlaceHolder_lbl_NoteValue\">(.*)<\\/span>/i';\n preg_match_all($match, $page, $data);\n if (isset($data[1][0])) {\n $notes = str_ireplace(\"<br>\", \"\\t\", $data[1][0]);\n $notes = strip_tags($notes);\n if ($notes != \"\") {\n $system['System']['datanotes'] = json_encode(array_filter(explode(\"\\t\", $notes)));\n }\n } else {\n $system['System']['datanotes'] = \"\";\n }\n\n // For method data match MainContentPlaceHolder_lbl_MethValue\n $match = '/MainContentPlaceHolder_lbl_MethValue\">(.*)<\\/span>/i';\n preg_match_all($match, $page, $data);\n (isset($data[1][0])) ? $system['System']['method'] = $this->clean($data[1][0]) : $system['System']['method'] = \"\";\n\n // For source data match MainContentPlaceHolder_lbl_SrcValue\n $match = '/MainContentPlaceHolder_lbl_SrcValue\">(.*)<\\/span>/i';\n preg_match_all($match, $page, $data);\n if (isset($data[1][0])) {\n $source = str_ireplace(\"<br>\", \"\\t\", $data[1][0]);\n $source = strip_tags($source);\n $source = preg_replace('/\\(\\d{1,2}\\) /', \"\", $source);\n if ($source !== \"\") {\n $system['System']['source'] = json_encode(array_filter(explode(\"\\t\", $source)));\n } else {\n $system['System']['source'] = \"\";\n }\n } else {\n $system['System']['source'] = \"\";\n }\n\n // For error data match MainContentPlaceHolder_lbl_ErrValue\n $match = '/MainContentPlaceHolder_lbl_ErrValue\">(.*)<\\/span>/i';\n preg_match_all($match, $page, $data);\n (isset($data[1][0])) ? $system['System']['errors'] = $this->clean($data[1][0]) : $system['System']['errors'] = \"\";\n\n // For references data match MainContentPlaceHolder_lbl_RefValue\n $match = '/MainContentPlaceHolder_lbl_RefValue\">(.*)<\\/span>/i';\n preg_match_all($match, $page, $data);\n if (isset($data[1][0])) {\n $refs = str_replace(\"<br>\", \"\\t\", $data[1][0]);\n $refs = strip_tags($refs);\n if (str_replace(\"\\t\", \"\", $refs) == \"\") {\n $system['System']['refs'] = \"\";\n } else {\n $system['System']['refs'] = json_encode(array_filter(explode(\"\\t\", $refs)));\n }\n } else {\n $system['System']['refs'] = \"\";\n }\n\n // Save data\n\n // Citation (and Authors) (Can't handle Ph.D. dissertations as refs)\n if (isset($system['Citation']) && $system['Citation'] != \"\") {\n $citation = ['system_id' => $id];\n // Deconstruction citation text\n $system['Citation'] = preg_replace(\"/(\\d),(\\d)/\", \"$1-$2\", $system['Citation']);\n $part = explode(\".,\", $system['Citation'], 2); // Authors => $part[0], rest => $part[1]\n if (stristr($part[0], \";\")): $authors = explode(\"; \", $part[0] . \".\"); // Add back the period that was lost on explode\n else: $authors = [$part[0] . \".\"]; // For only one author\n endif;\n foreach ($authors as $key => $author) {\n $temp = explode(\", \", $author);\n $authors[$key] = ['lastname' => $temp[0], 'firstname' => $temp[1]];\n }\n $rest = explode(\", \", $part[1]); // Journal/Year => $citation[0], Volume/Issue $citation[1], pages => $citation[2]\n if (count($rest) == 2) {\n $rest = [$rest[0], \"\", $rest[1]];\n } // Assume vol/issue is missing if only two parts\n // Journal/Year\n if ($rest[0] != \"\") {\n $auyr = explode(\" \", strrev($rest[0]), 2);\n $citation['journal'] = trim(strrev($auyr[1]));\n $citation['year'] = strrev($auyr[0]);\n }\n // Volume/Issue\n if ($rest[1] != \"\") {\n if (stristr($rest[1], \"(\")) {\n $vois = preg_replace(\"/(\\d*)\\((.*)\\)/\", \"$1,$2\", $rest[1]);\n list($citation['volume'], $citation['issue']) = explode(\",\", $vois);\n } else {\n $citation['volume'] = $rest[1];\n }\n }\n // Pages\n if ($rest[2] != \"\") {\n if (stristr($rest[2], \"-\")) {\n list($citation['firstpage'], $citation['lastpage']) = explode(\"-\", str_replace(\".\", \"\", $rest[2]), 2);\n if (strlen($citation['firstpage']) > strlen($citation['lastpage'])) {\n $len1 = strlen($citation['firstpage']);\n $len2 = strlen($citation['lastpage']);\n $citation['lastpage'] = substr($citation['firstpage'], 0, $len1 - $len2) . $citation['lastpage'];\n }\n } else {\n $citation['firstpage'] = str_replace(\".\", \"\", $rest[2]);\n }\n }\n\n // Do DOI lookup via Crossref (get article title and full names of authors)\n $HttpSocket = new HttpSocket();\n $get = ['pid' => '[email protected]', 'noredirect' => 'true'];\n $get['aulast'] = str_replace([\",\", \".\"], \"\", $authors[0]);\n if (isset($citation['journal'])) { $get['title'] = $citation['journal']; }\n if (isset($citation['volume'])) { $get['volume'] = $citation['volume']; }\n if (isset($citation['issue'])) { $get['issue'] = $citation['issue']; }\n if (isset($citation['firstpage'])) { $get['spage'] = $citation['firstpage']; }\n if (isset($citation['year'])) { $get['date'] = $citation['year']; }\n $response = $HttpSocket->get(\"http://www.crossref.org/openurl\", $get);\n $meta = $this->xmlToArray($response['body']);\n $meta = $meta['crossref_result']['query_result']['body']['query'];\n $feedback[] = $meta;\n if (isset($meta['doi']['@'])) {\n $citation['doi'] = $meta['doi']['@'];\n $citation[\"url\"] = \"http://doi.dx.org/\" . $meta['doi']['@'];\n }\n if (isset($meta['journal_title']['@'])) { $citation['journal'] = $meta['journal_title']['@']; }\n if (isset($meta['article_title'])) { $citation['title'] = $meta['article_title']; }\n if (isset($meta['contributors']['contributor'])) {\n $authors = []; // Deletes out authors obtained from citation\n $aus=$meta['contributors']['contributor'];\n if(!isset($aus[0])) { $aus = [$aus]; }\n foreach ($aus as $au) {\n $authors[] = ['firstname' => $au['given_name'], 'lastname' => $au['surname']];\n }\n }\n\n // Add citation if it does not already exist\n $existing = false;$cid=\"\";\n if (isset($citation['doi'])) {\n $result = $this->Citation->find('first', ['fields' => ['id'], 'conditions' => ['doi' => $citation['doi']]]);\n if (empty($result)) {\n // Add citation\n $this->Citation->create();\n if ($this->Citation->save(['Citation' => $citation + ['updated' => date(DATE_ATOM)]])) {\n $feedback[] = 'Citation for system ' . $id . ' added';\n $cid = $this->Citation->id;\n } else {\n $feedback[] = 'Error adding citation => ' . debug($this->Citation->validationErrors);\n }\n } else {\n $existing = true;\n $cid = $result['Citation']['id'];\n }\n } else {\n $temp = $citation;\n array_shift($temp); // You cannot do an array_shift inside an implode in PHP (causes error)\n $citation['doi'] = implode(\"\", $temp); // Make a unique id to match those refs that do not have a DOI (remove sysID first)\n $result = $this->Citation->find('first', ['fields' => ['id'], 'conditions' => ['doi' => $citation['doi']]]);\n if (empty($result)) {\n // Add citation (no doi -> might be a duplicate)\n $this->Citation->create();\n if ($this->Citation->save(['Citation' => $citation + ['updated' => date(DATE_ATOM)]])) {\n $feedback[] = 'Citation for system ' . $id . ' added';\n $cid = $this->Citation->id;\n } else {\n $feedback[] = 'Error adding citation => ' . debug($this->Citation->validationErrors);\n }\n } else {\n $existing = true;\n $cid = $result['Citation']['id'];\n }\n }\n\n // Add authors if the citation is new and they don't already exist\n $aid=\"\";\n if (!$existing) {\n foreach ($authors as $author) {\n // Does author already exist?\n $result = $this->Author->find('first', ['fields' => ['id'], 'conditions' => ['lastname' => $author['lastname'], 'firstname' => $author['firstname']]]);\n if (empty($result)) {\n $this->Author->create();\n $author['updated'] = date(DATE_ATOM);\n if ($this->Author->save(['Author' => $author])) {\n $feedback[] = 'Author for system ' . $id . ' added';\n $aid = $this->Author->id;\n } else {\n $feedback[] = 'Error adding author => ' . debug($this->Author->validationErrors);\n }\n } else {\n $aid = $result['Author']['id'];\n }\n // Add link to join table\n $this->AuthorsCitation->create();\n $data = ['AuthorsCitation' => ['author_id' => $aid, 'citation_id' => $cid, 'updated' => date(DATE_ATOM)]];\n if ($this->AuthorsCitation->save($data)) {\n $feedback[] = 'Author/Citation join for system ' . $id . ' added';\n } else {\n $feedback[] = 'Error adding Author/Citation join => ' . debug($this->AuthorsCitation->validationErrors);\n }\n }\n }\n } else {\n $cid = \"00000\";\n }\n\n // System ($needs $cid)\n if ($this->System->save(['System' => $system['System'] + ['citation_id' => $cid]])) {\n $feedback[] = 'System ' . $id . ' updated';\n } else {\n $feedback[] = 'Error updating system => ' . debug($this->System->validationErrors);\n }\n\n // Chemicals\n foreach ($system['Chemical'] as $chemical) {\n $fields = explode(\"**\", $chemical); // name => $fields[0], formula => $fields[1], casrn => $fields[2]\n $inchi = $inchikey = \"\";\n // Get Inchi string\n if (isset($fields[2]) && $fields[2] != \"\") {\n $temp = get_headers(\"http://cactus.nci.nih.gov/chemical/structure/\" . $fields[2] . \"/stdinchi\");\n if (stristr($temp[0], \"200 OK\")) {\n $inchi = file_get_contents(\"http://cactus.nci.nih.gov/chemical/structure/\" . $fields[2] . \"/stdinchi\");\n $feedback[] = 'InChI ' . $inchi . ' found (1)';\n } else {\n $temp = get_headers(\"http://cactus.nci.nih.gov/chemical/structure/\" . urlencode($fields[0]) . \"/stdinchi\");\n if (stristr($temp[0], \"200 OK\")) {\n $inchi = file_get_contents(\"http://cactus.nci.nih.gov/chemical/structure/\" . urlencode($fields[0]) . \"/stdinchi\");\n $feedback[] = 'InChI ' . $inchi . ' found (2)';\n } else {\n $feedback[] = 'InChI for system ' . $fields[0] . ' not found';\n }\n }\n }\n // Get Inchi key\n if (isset($fields[2]) && $fields[2] != \"\") {\n $temp = get_headers(\"http://cactus.nci.nih.gov/chemical/structure/\" . $fields[2] . \"/stdinchikey\");\n if (stristr($temp[0], \"200 OK\")) {\n $inchikey = file_get_contents(\"http://cactus.nci.nih.gov/chemical/structure/\" . $fields[2] . \"/stdinchikey\");\n $feedback[] = 'InChIkey ' . $inchikey . ' found (1)';\n } else {\n $temp = get_headers(\"http://cactus.nci.nih.gov/chemical/structure/\" . urlencode($fields[0]) . \"/stdinchikey\");\n if (stristr($temp[0], \"200 OK\")) {\n $inchikey = file_get_contents(\"http://cactus.nci.nih.gov/chemical/structure/\" . urlencode($fields[0]) . \"/stdinchikey\");\n $feedback[] = 'InChIkey ' . $inchikey . ' found (2)';\n } else {\n $inchikey = \"\";\n $feedback[] = 'InChIKey for system ' . $fields[0] . ' not found';\n }\n }\n }\n // Check to see if this inchi already exists in the chemicals table\n ($inchi != \"\") ? $result = $this->Chemical->find('first', ['fields' => ['id'], 'conditions' => ['inchi' => $inchi]]) : $result = [];\n if (empty($result)) {\n // Add to the chemicals table\n $data = ['name' => $fields[0], 'formula' => $fields[1], 'casrn' => $fields[2], 'inchi' => $inchi, 'inchikey' => str_replace(\"InChIKey=\", \"\", $inchikey), 'updated' => date(DATE_ATOM)];\n $this->Chemical->create();\n if ($this->Chemical->save(['Chemical' => $data])) {\n $feedback[] = 'Chemical for system ' . $id . ' added';\n $cid = $this->Chemical->id;\n } else {\n $feedback[] = 'Error adding chemical => ' . debug($this->Chemical->validationErrors);\n }\n } else {\n $cid = $result['Chemical']['id'];\n }\n // Add link to join table\n $this->ChemicalsSystem->create();\n $data = ['ChemicalsSystem' => ['system_id' => $id, 'chemical_id' => $cid, 'updated' => date(DATE_ATOM)]];\n if ($this->ChemicalsSystem->save($data)) {\n $feedback[] = 'Chemical/System join for system ' . $id . ' added';\n $feedback[] = $data;\n } else {\n $feedback[] = 'Error adding Chemical/System join => ' . debug($this->ChemicalsSystem->validationErrors);\n }\n }\n\n // Variables\n foreach ($system['Variable'] as $variable) {\n $var = ['system_id' => $id, 'updated' => date(DATE_ATOM)];\n list($var['name'], $var['bounds']) = explode(\" = \", $variable);\n $data = ['Variable' => $var];\n $this->Variable->create();\n if ($this->Variable->save($data)) {\n $feedback[] = 'Variable for system ' . $id . ' added';\n $feedback[] = $data;\n } else {\n $feedback[] = 'Error adding variable => ' . debug($this->Variable->validationErrors);\n }\n }\n\n // Tables\n foreach ($system['Table'] as $table) {\n if ($table == \"[]\") {\n continue;\n }\n $data = ['system_id' => $id, 'content' => $table, 'updated' => date(DATE_ATOM)];\n $data = ['Table' => $data];\n $this->Table->create();\n if ($this->Table->save($data)) {\n $feedback[] = 'Table for system ' . $id . ' added';\n $feedback[] = $data;\n } else {\n $feedback[] = 'Error adding table => ' . debug($this->Table->validationErrors);\n }\n }\n\n // For view\n $systems[$id] = $system;\n unset($system);\n }\n $this->set('data', $systems);\n $this->set('feedback', $feedback);\n }", "title": "" }, { "docid": "fe1ae70798f2b53a235e4e51f5c0e1d3", "score": "0.4971683", "text": "function getDates()\n\t{\n\t\t$this->db->select('s.date, c.class, c.description, c.detail_url');\n\t\t$this->db->from('scheduler as s');\n\t\t$this->db->join('component as c','c.id = s.parent_id','INNER');\n\t\t$this->db->order_by('date','ASC');\n\t\t$dates = $this->db->get();\n\t\t// checks if there are any records to be retrieved from the DB\t\t\n\t\tif ($dates->num_rows() > 0) {\n\t\t\t$details = $dates->result_array();\n\t\t\t$dates->free_result();\n\t\t\treturn $details;\n\t\t} else {\n\t\t\t//echo 'cant find the requested section!';\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "3ccc88fb54285724010a5b2a920aa917", "score": "0.49667308", "text": "function outdated() {\n $source_version_data = @file_get_contents(\"http://$this->url/api/system/latest\");\n if (!$source_version_data) return; // no version found\n $source_version_data = json_decode($source_version_data);\n $source_version = $source_version_data->spark_manager;\n\n // Split versions\n list($self_major, $self_minor, $self_patch) = explode('.', SPARK_VERSION);\n list($source_major, $source_minor, $source_patch) = explode('.', $source_version);\n\n // Compare\n if ($self_major < $source_major ||\n $self_major == $source_major && $self_minor < $source_minor ||\n $self_major == $source_major && $self_minor == $source_minor && $self_patch < $source_patch)\n {\n return $source_version_data;\n }\n }", "title": "" }, { "docid": "bb6580fee82148a53a8e65924dad1067", "score": "0.4959946", "text": "function getPrecipToDate($listobject, $projectid, $basedataurl, $today, $scratchdir, $debug, $overwrite = 1, $dopartial = 1, $db = 'noaa') {\n $datear = array();\n $thisdate = new DateTime(date($today));\n $tds = $thisdate->format('Y-m-d');\n $month = $thisdate->format('m');\n $year = $thisdate->format('Y');\n switch ($db) {\n case 'vahydro':\n $listobject->querystring = \" select to_timestamp(max(tstime)) as maxdate from dh_timeseries_weather \";\n $listobject->querystring .= \" where tstime <= extract(epoch from '$tds'::timestamptz) \";\n break;\n default:\n $listobject->querystring = \" select max(thisdate) as maxdate from precip_gridded \";\n $listobject->querystring .= \" where thisdate <= '$tds'::timestamp \";\n }\n if ($debug) { print(\"$listobject->querystring ; <br>\"); }\n $listobject->performQuery();\n $md = $listobject->getRecordValue(1,'maxdate');\n\n if (strlen($md) == 0) {\n $md = \"$year-$month-01\";\n }\n $nextdate = new DateTime($md);\n $nd = $nextdate->format('Y-m-d');\n \n print (\"Next Date: $nd - Today: $today \\n<br>\");\n\n if ( (!($nextdate->format('Y-m-d') == $today)) or ($overwrite)) {\n # nothing to do if we have the data current\n\n if ($nextdate->format('Y-m-d') <> $tds) {\n $nds = '';\n for ($i = 1; $tds <> $nds; $i++) {\n $nextdate->modify(\"+1 day\");\n $day = $nextdate->format('d');\n $month = $nextdate->format('m');\n $year = $nextdate->format('Y');\n array_push($datear, array($year,$month,$day) );\n $nds = $nextdate->format('Y-m-d');\n }\n } else {\n $day = $thisdate->format('d');\n $month = $thisdate->format('m');\n $year = $thisdate->format('Y');\n array_push($datear, array($year,$month,$day) );\n if ($debug) { print(\"Adding $year-$month-$day <br>\"); }\n }\n\n # add in manual date\n #array_push($datear, array('2007','06','22'));\n\n foreach ($datear as $thisdate) {\n $thisyear = $thisdate[0];\n $thismo = $thisdate[1];\n $thisday = $thisdate[2];\n #$debug = 1;\n switch ($db) {\n case 'vahydro':\n importNOAAGriddedPrecipVAHydro($listobject, $projectid, $thisyear, $thismo, $thisday, $scratchdir, $basedataurl, $debug, $overwrite);\n break;\n default:\n importNOAAGriddedPrecip ($listobject, $projectid, $thisyear, $thismo, $thisday, $scratchdir, $basedataurl, $debug, $overwrite);\n break;\n }\n print(\"$message <br>\");\n }\n\n $padmo = str_pad($thismo, 2, '0', STR_PAD_LEFT);\n $startdate = \"$thisyear-$padmo-01\";\n $dateobj = new DateTime(\"$startdate\");\n $maxday = $dateobj->format('t');\n $enddate = \"$thisyear-$padmo-$maxday\";\n } else {\n $thisyear = $nextdate->format('Y');\n $thismo = $nextdate->format('m');\n $startdate = \"$thisyear-$thismo-01\";\n }\n\n #$debug = 1;\n\n # do a partial month summary ONLY if there is no monthly data for this time period\n $listobject->querystring = \" select count(*) as numrecs from precip_gridded_monthly \";\n $listobject->querystring .= \" where mo_start = '$startdate'::timestamp \";\n $listobject->querystring .= \" and src_citation = 1 \";\n $listobject->querystring .= \" and datatype in ('obs') \";\n if ($debug) { print(\"$listobject->querystring ; <br>\"); }\n $listobject->performQuery();\n $numrecs = $listobject->getRecordValue(1,'numrecs');\n\n if (!($numrecs > 0) and ($dopartial)) {\n # if no src_citation = 1 (NOAA official) records exist, create synthetic ones\n calculatePartialMonthlyDeparture($listobject, $projectid, $thisyear, $thismo, 1);\n }\n}", "title": "" }, { "docid": "85887e3af12f6f602a46d8626659c9e5", "score": "0.4950268", "text": "abstract protected function extractProcessorSpecificData() : self;", "title": "" }, { "docid": "e7e030d36c4f9999b7769d60ca568094", "score": "0.49369213", "text": "public function extractUpdatesData(): void\n {\n foreach (get_array($this->searchTree, 'update-to') as $update) {\n $this->resourceOutput['updates'][] = [\n 'timestamp' => $update['updated']['timestamp'],\n 'identifier' => [\n 'doi' => get_string($update, 'DOI'),\n ],\n 'type' => UpdateTypesStandardiser::getType($update['type']),\n ];\n }\n }", "title": "" }, { "docid": "41679c69aac07c87e9dd947cb776247f", "score": "0.49291274", "text": "function future_gigs () {\n\t\tglobal $wpdb;\n\t\t$results = array();\n\n\t\t// We covert the date becase the server is in Saskatchewan\n\t\t// and we are in PST Vancouver\n\t\t// DATE(DATE_SUB(NOW(), INTERVAL 2 HOUR))\n\n\t\tif ($this->mirror_specified()) {\n\t\t\t$select = \"SELECT * FROM \" . $this->table .\n\t\t\t\t ' WHERE `date` >= DATE(DATE_SUB(NOW(), INTERVAL 2 HOUR)) ORDER BY `date`';\n\n\t\t\t$results = $wpdb->get_results( $select, ARRAY_A );\n\t\t}\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "1356bb7079d6855e7ff893245e3d872c", "score": "0.49216902", "text": "function drush_islandora_dss_islandora_ingest_mods_m($object_pid) {\n\n $tuque = islandora_get_tuque_connection(user_load(1));\n $object = islandora_object_load($object_pid);\n\n $mods_m_ds = $object['MODS-M'];\n $mods_ds = $object['MODS'];\n\n if($mods_m_ds) {\n\n $mods_m_doc = new SimpleXMLElement($mods_m_ds->content);\n $mods_m_doc->registerXPathNamespace('mods', 'http://www.loc.gov/mods/v3');\n $elements = $mods_m_doc->xpath('//mods:titleInfo/mods:title');\n if(empty($elements)) {\n\n throw new Exception(\"Could not locate the title for the Object within the MODS-M Datastream\");\n }\n\n $title_elem = array_shift($elements);\n $title = (string) $title_elem;\n\n preg_match('/\\[(.+?)\\]/', $title, $m);\n $ds_label = $m[1] . '_MODS';\n\n if($mods_ds) {\n\n $object->purgeDatastream('MODS');\n }\n\n $mods_ds = $object->constructDatastream('MODS', 'X');\n $mods_ds->label = $ds_label;\n $mods_ds->mimeType = 'application/xml';\n $mods_ds->content = $mods_m_ds->content;\n\n try {\n\n $object->ingestDatastream($mods_ds);\n drush_log(dt('Successfully ingested the MODS-M Datastream content into the MODS Datastream for @object_id', array('@object_id' => $object->id)), 'success');\n } catch (exception $e) {\n\n drush_log(dt('@message', array('@message' => check_plain($e->getMessage()))), 'error');\n }\n }\n}", "title": "" }, { "docid": "1f1b3a7e34396c604ec96bbf253b819f", "score": "0.4906973", "text": "public function getInformationsforSitemap() {\n\t\t\t//exit();\n\t\t\t//$information_data = $this->cache->get('information.' . $this->config->get('config_language_id'));\n\t\t\t\n\t\t\t//if ( ! $information_data) {\n\t\t\t\t\n\t\t\t\t$query = $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"information i LEFT JOIN \" . DB_PREFIX . \"information_description id ON (i.information_id = id.information_id) WHERE i.sitemap = 1 AND i.status='1' and id.language_id = '\" . (int)$this->config->get('config_language_id') . \"' ORDER BY id.title\");\n\t\t\t\t\t\t\t\t\n\t\t\t\t$information_data = $query->rows;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$this->cache->set('information.' . $this->config->get('config_language_id'), $information_data);\n\t\t\t//}\n\t\t\t\n\t\t\treturn $information_data;\n\t\t\n\t}", "title": "" }, { "docid": "b29e8e1298f845170cec46fd112335d5", "score": "0.49040446", "text": "protected function get_legacy_logdata() {\n return [];\n }", "title": "" }, { "docid": "e78b1a2a755687160e4967a707de4063", "score": "0.49038407", "text": "public function parseTimeMachineData($date1, $date2, $latitude, $longitude)\n\t{\n\t\t$numDays = abs($date1 - $date2)/60/60/24;\n\t\tfor ($i = 0; $i <= $numDays; $i++) \n\t\t{\n\t\t\t// echo date('d M Y', strtotime(\"+{$i} day\", $date1)) . '<br />';\n\t\t\t$date = date('d M Y', strtotime(\"+{$i} day\", $date1));\n\t\t\t$timeMachineData[$i]['timestamp'] = strtotime($date);\n\t\t\t$timeMachineData[$i]['date'] = $date;\n\t\t}\n\n\t // Make API call for each timestamp and add the data to a new object\n\t\tforeach ($timeMachineData as $counter=>$data) \n\t\t{\n\t\t\t$forecast = $this->getWeather($latitude, $longitude, $data['timestamp']);\n\n\t\t\t//Checking if respective data points exist, if not then setting defailt values\n\t\t\tif(!isset($forecast->daily->data[0]->summary))\n\t\t\t{\n\t\t\t\t$timeMachineData[$counter]['summary'] = \"No summary\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$timeMachineData[$counter]['summary'] = $forecast->daily->data[0]->summary;\n\t\t\t}\n\n\t\t\tif(!isset($forecast->daily->data[0]->sunriseTime))\n\t\t\t{\n\t\t\t\t$timeMachineData[$counter]['sunrise'] = \"N/A\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//Time is un UTC, so subtracting 7 hours to get MST\n\t\t\t\t$timeMachineData[$counter]['sunrise'] = date(\"H:i\", $forecast->daily->data[0]->sunriseTime - 60*60*7);\n\t\t\t}\n\n\t\t\tif(!isset($forecast->daily->data[0]->sunsetTime))\n\t\t\t{\n\t\t\t\t$timeMachineData[$counter]['sunset'] = \"N/A\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//Time is un UTC, so subtracting 7 hours to get MST\n\t\t\t\t$timeMachineData[$counter]['sunset'] = date(\"H:i\", $forecast->daily->data[0]->sunsetTime - 60*60*7);\n\t\t\t}\n\t\t\t\n\n\t\t\tif(!isset($forecast->daily->data[0]->icon))\n\t\t\t{\n\t\t\t\t$timeMachineData[$counter]['icon'] = \"cloudy\";\n\t\t\t\t$timeMachineData[$counter]['icon_type'] = \"wi wi-cloudy\";\n\t\t\t\t$timeMachineData[$counter]['type'] = \"cloud\"; \n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlist($icon_type, $type) = $this->getIconType($forecast->daily->data[0]->icon);\n\t\t\t\t$timeMachineData[$counter]['icon'] = $forecast->daily->data[0]->icon;\n\t\t\t\t$timeMachineData[$counter]['icon_type'] = $icon_type;\n\t\t\t\t$timeMachineData[$counter]['type'] = $type; \n\t\t\t}\n\n\t\t\tif(!isset($forecast->daily->data[0]->temperatureHigh))\n\t\t\t{\n\t\t\t\t$timeMachineData[$counter]['temperatureHigh'] = \"N/A\";\n\t\t\t\t$timeMachineData[$counter]['temperatureHighCelsius'] = \"N/A\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$timeMachineData[$counter]['temperatureHigh'] = round($forecast->daily->data[0]->temperatureHigh);\n\t\t\t\t$timeMachineData[$counter]['temperatureHighCelsius'] = round(($forecast->daily->data[0]->temperatureHigh-32)*5/9);\n\t\t\t}\n\t\t \n\t\t\tif(!isset($forecast->daily->data[0]->temperatureLow))\n\t\t\t{\n\t\t\t\t$timeMachineData[$counter]['temperatureLow'] = \"N/A\";\n\t\t\t\t$timeMachineData[$counter]['temperatureLowCelsius'] = \"N/A\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$timeMachineData[$counter]['temperatureLow'] = round($forecast->daily->data[0]->temperatureLow);\n\t\t\t\t$timeMachineData[$counter]['temperatureLowCelsius'] = round(($forecast->daily->data[0]->temperatureLow-32)*5/9);\n\t\t\t}\n\n\t\t\tif(!isset($forecast->daily->data[0]->humidity))\n\t\t\t{\n\t\t\t\t$timeMachineData[$counter]['humidity'] = \"N/A\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$timeMachineData[$counter]['humidity'] = $forecast->daily->data[0]->humidity; \n\t\t\t}\n\t\t\t\n\t\t\tif(!isset( $forecast->daily->data[0]->windSpeed))\n\t\t\t{\n\t\t\t\t$timeMachineData[$counter]['windSpeed'] = \"N/A\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$timeMachineData[$counter]['windSpeed'] = $forecast->daily->data[0]->windSpeed; \n\t\t\t}\n\t\t}\n\n\t\treturn $timeMachineData;\n\t}", "title": "" }, { "docid": "c5bf9a301cedf5d3e6eef64badf73900", "score": "0.48838612", "text": "function read_engine_runhr_xml($xml_path, &$imei, &$vname, &$datefrom, &$dateto, &$engine_runhr)\r\n {\r\n //echo \"<br>Read Halt\";\r\n //echo \"<br>xml_path in read_xml=\".$xml_path;\r\n \r\n $fexist =1; \r\n $xml = fopen($xml_path, \"r\") or $fexist = 0;\r\n \r\n $count = count(file($xml_path));\r\n //echo \"<BR>COUNT======== $count lines in $xml\";\r\n //$xml2 = '\"'.$xml.'\"';\r\n if($fexist)\r\n {\r\n $i=0; \t\r\n while(!feof($xml)) // WHILE LINE != NULL\r\n \t{\r\n \t\t$line = fgets($xml); // STRING SHOULD BE IN SINGLE QUOTE \r\n //echo '<br>line='.$line; \r\n //echo \"<br>line[0]=\".$line[0].\" ,\".$line[strlen($line)-2].\" ,\".$DataValid.\" ,\".$fix_tmp; \r\n \r\n // FORMAT 2 OPENS\r\n if( ($line[0] == '<') && ($line[strlen($line)-2] == '>') )\r\n {\r\n //echo \"<br>IN format2\"; \t\t\t\t\t\t\t\r\n $status = preg_match('/imei=\"[^\"]+/', $line, $imei_tmp);\r\n //echo \"Status=\".$status.'<BR>';\r\n if($status==0)\r\n {\r\n continue;\r\n }\r\n \r\n $status = preg_match('/vname=\"[^\"]+/', $line, $vname_tmp);\r\n //echo \"Status=\".$status.'<BR>';\r\n //echo \"test1\".'<BR>';\r\n if($status==0)\r\n {\r\n continue;\r\n }\r\n \r\n $status = preg_match('/datefrom=\"[^\"]+/', $line, $datefrom_tmp);\r\n //echo \"Status=\".$status.'<BR>';\r\n //echo \"test1\".'<BR>';\r\n if($status==0)\r\n {\r\n continue;\r\n }\r\n \r\n //echo \"test5\".$datetime_tmp[0].'<BR>';\r\n $status = preg_match('/dateto=\"[^\"]+/', $line, $dateto_tmp);\r\n if($status==0)\r\n {\r\n continue;\r\n }\r\n \r\n //echo \"test5\".$datetime_tmp[0].'<BR>';\r\n $status = preg_match('/engine_runhr=\"[^\" ]+/', $line, $engine_runhr_tmp);\r\n if($status==0)\r\n {\r\n continue;\r\n } \r\n \r\n // Store Name with Value \r\n $tmp = explode(\"=\",$imei_tmp[0]);\r\n $imei[$i] = preg_replace('/\"/', '', $tmp[1]); \r\n \r\n $tmp = explode(\"=\",$vname_tmp[0]);\r\n $vname[$i] = preg_replace('/\"/', '', $tmp[1]);\r\n \r\n $tmp = explode(\"=\",$datefrom_tmp[0]);\r\n $datefrom[$i] = preg_replace('/\"/', '', $tmp[1]);\r\n \r\n $tmp = explode(\"=\",$dateto_tmp[0]);\r\n $dateto[$i] = preg_replace('/\"/', '', $tmp[1]);\r\n \r\n $tmp = explode(\"=\",$engine_runhr_tmp[0]);\r\n $engine_runhr[$i] = preg_replace('/\"/', '', $tmp[1]); \r\n \r\n $i++; \r\n } // // IF LINE 0 \r\n } // WHILE CLOSED\r\n } // IF FEXIST\r\n}", "title": "" }, { "docid": "089c66cf98d10e7e9eb25a326032f851", "score": "0.4883188", "text": "function datation($publication){\r\n $mois = [\"janvier\", \"février\", \"mars\", \"avril\", \"mai\", \"juin\", \"juillet\", \"août\", \"septembre\", \"octobre\", \"novembre\", \"décembre\"];\r\n\r\n $publication = explode(\" \", $publication);\r\n $date = explode(\"-\", $publication[0]);\r\n $heure = explode(\":\", $publication[1]);\r\n $date[1] = $mois[(int)$date[1]-1];\r\n\r\n $resultat = $date[2] . ' ' . $date[1] . ' ' . $date[0] . ' à ' . $heure[0] . 'h' . $heure[1];\r\n return $resultat;\r\n }", "title": "" }, { "docid": "2fe51c5afa603bbb368f85ecb097a2ab", "score": "0.48719597", "text": "public function getOldIncludedInStatistics();", "title": "" }, { "docid": "ec2a6fa0e8b30e27cbe83a1a8c8d721f", "score": "0.48662898", "text": "function oldHistoryMissionDetails($assigned_mission_id,$mission_details)\n\t{\n\t\t\n\t\t$archmission_obj=new Ep_Quote_Mission();\n\t\t$archParameters['mission_id']=$assigned_mission_id;\n\t\t$suggested_mission_details=$archmission_obj->getMissionDetails($archParameters);\n\t\t\n\t\tif($suggested_mission_details)\n\t\t\t{\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$nb_words=($mission_details['nb_words']/$suggested_mission_details[0]['article_length']);\n\t\t\t\t\t$redactionCost=$nb_words*($suggested_mission_details[0]['writing_cost_before_signature']);\n\t\t\t\t\t$correctionCost=$nb_words*($suggested_mission_details[0]['correction_cost_before_signature']);\n\t\t\t\t\t$otherCost=$nb_words*($suggested_mission_details[0]['other_cost_before_signature']);\n\n\t\t\t\t\t$internalcost=($redactionCost+$correctionCost+$otherCost);\n\t\t\t\t\t$internalcost=number_format($internalcost,2,'.','');\n\n\t\t\t\t\t$missonDetails['internal_cost']=number_format($internalcost,2,'.','');\n\t\t\t\t //$missonDetails['writer_cost']=sprintf(\"%.3f\",($redactionCost));\n\t\t\t\t //$missonDetails['proofreading_cost']=sprintf(\"%.3f\",($correctionCost));\n\t\t\t\t\t$missonDetails['writer_cost']=round($redactionCost,2);\n\t\t\t\t $missonDetails['proofreading_cost']=round($correctionCost,2);\n\t\t\t\t \n\n\n\t\t\t\t //pre-fill staff calculations\n\n\t\t\t\t\t//total mission words\n\t\t\t\t\t$mission_volume=$mission_details['volume'];\n\t\t\t\t\t$mission_nb_words=$mission_details['nb_words'];\n\t\t\t\t\t$total_mission_words=($mission_volume*$mission_nb_words);\n\t\t\t\n\t\t\t\t\t//words that can write per writer with in delivery weeks\n\t\t\t\t\t$sales_delivery_time=$quote['sales_delivery_time_option']=='hours' ? ($mission_details['sales_delivery_time']/24) : $mission_details['sales_delivery_time'];\n\t\t\t\t\t$sales_delivery_week=ceil($sales_delivery_time/7);\n\n\t\t\t\t\t$mission_product=$mission_details['product_type'];\n\t\t\t\t\tif($mission_details['product_type']=='autre')\n\t\t\t\t\t\t\t$mission_product='article_seo';\n\t\t\t\t\t$articles_perweek=$this->configval['max_writer_'.$mission_product];\n\t\t\t\t\t$words_perweek_peruser=$articles_perweek*250;\n\t\t\t\t\t$words_peruser_perdelivery=$sales_delivery_week*$words_perweek_peruser;\n\n\t\t\t\t\t//wrting and proofreading staff calculations\n\t\t\t\t\t$writing_staff=round($total_mission_words/$words_peruser_perdelivery);\n\t\t\t\t\tif(!$writing_staff || $writing_staff <1)\n\t\t\t\t\t\t$writing_staff=1;\t\n\n\t\t\t\t\t$proofreading_staff=round($total_mission_words/($words_peruser_perdelivery*5));\n\t\t\t\t\t\tif(!$proofreading_staff || $proofreading_staff <1)\n\t\t\t\t\t\t\t$proofreading_staff=1;\n\n\t\t\t\t\t$missonDetails['writing_staff']=$writing_staff;\n\t\t\t\t\t$missonDetails['proofreading_staff']=$proofreading_staff;\n\n\t\t\t\t\tif($otherCost)\n\t\t\t\t {\n\t\t\t\t \t$missonDetails['auture_cost']=number_format($otherCost,2,'.','');\n\t\t\t\t \t$autre_staff=ceil($writing_staff/5);\n\t\t\t\t \tif(!$autre_staff || $autre_staff <1)\n\t\t\t\t\t\t\t$autre_staff=1;\n\t\t\t\t\t\t\n\t\t\t\t \t$missonDetails['auture_staff']=$autre_staff;\n\t\t\t\t }\n\n\n\t\t\t\t\t$staff_setup_length=ceil(($mission_details['mission_length']*10)/100);\n\t\t\t\t\t$staff_setup_length=$staff_setup_length ? $staff_setup_length :1;\n\t\t\t\t\t\n\t\t\t\t\t$staff_setup_length=$staff_setup_length < 10 ? $staff_setup_length :10;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$missonDetails['staff']=$staff_setup_length;//.' '.$mission_details['mission_length_option'];\n\n\t\t\t}\t\n\t\t\treturn $missonDetails;\n\t}", "title": "" }, { "docid": "0fe174f3d768b5d228fc4d35e00b842e", "score": "0.48504376", "text": "function news_since_text($mod_id, $nl_url, $ModName) {\n\tglobal $prefix, $pntable;\n\t$dbconn =& pnDBGetConn(true);\n\t $pntable =& pnDBGetTables();\n\n\t$language = pnConfigGetVar('language');\n\n// name the lang file the same as this file\n\tinclude(\"modules/$ModName/modules/lang/$language/newssince.php\");\n\n// get the module setting from the database\n\t$modsql = mysql_query(\"SELECT mod_qty, mod_data FROM $prefix\"._nl_modules.\" WHERE mod_id = '$mod_id'\");\n\tlist($mod_qty, $mod_data) = mysql_fetch_row($modsql);\n\n// create the array from the stored variables\n\t\t$mod_data = explode(\"|\", $mod_data);\n\n// query the database and generate your output in the amount of mod_qty\n\n\tif($mod_data[6] == 1) {\n\t\t$ihome = \"pn_ihome = '0' AND\";\n\t\t}\n\n\t$top_cat = '';\n\tif($mod_data[4] > 0) {\n\t\t$top_cat = \" AND pn_topic = '$mod_data[4]'\";\n\t\t}\n\tif($mod_data[5] > 0) {\n\t\t$top_cat .= \" AND pn_catid = '$mod_data[5]'\";\n\t\t}\n\n\tif($mod_data[1] == 1) {\n// news last week\n\t\t$date = mktime();\n\t\t$date = strtotime('-7 day',$date);\n\t\t$date = date(\"Y-m-d H:i:s\",$date);\n\t\t$sql = mysql_query(\"SELECT pn_sid, pn_title, pn_hometext, pn_bodytext, pn_time FROM $pntable[stories] \n\t\t\tWHERE $ihome pn_time >= '$date' $top_cat ORDER BY pn_time DESC\");\n\n\t\t$check_for_news = mysql_num_rows($sql);\n\t\tif($check_for_news == 0) {\n\t\t\t// if there is no news to report, then stop\n\t\t\treturn;\n\t\t\t}\n\n// clear the output variable\n// title of the page to show up\n\tif($mod_data[0] == '') {\n\t\t$output = \"\";\n\t\t} else {\n\t\t$output =\"$mod_data[0]:\\n\\n\";\n\t\t}\n\n\t\twhile(list($pn_sid, $pn_title, $pn_hometext, $pn_bodytext, $pn_time) = mysql_fetch_row($sql)) {\n\t\t\t$output .= \"$pn_title\\n\";\n\t\t\t$output .= \"$pn_hometext\\n\";\n\t\t\tif ($pn_bodytext) {\n\t\t\t\t$output .= \"\"._READMORE.\": $nl_url/modules.php?op=modload&name=News&file=article&sid=$pn_sid\\n\";\n\t\t\t\t}\n\t\t\t$output .= \"\\n\";\n\t\t\t}\n\t\t} elseif($mod_data[1] == 2) {\n// news last month\n\t\t$date = mktime();\n\t\t$date = strtotime('-1 month',$date);\n\t\t$date = date(\"Y-m-d H:i:s\",$date);\n\t\t$sql = mysql_query(\"SELECT pn_sid, pn_title, pn_hometext, pn_bodytext, pn_time FROM $pntable[stories] \n\t\t\tWHERE $ihome pn_time >= '$date' $top_cat ORDER BY pn_time DESC\");\n\n\t\t$check_for_news = mysql_num_rows($sql);\n\t\tif($check_for_news == 0) {\n\t\t\t// if there is no news to report, then stop\n\t\t\treturn;\n\t\t\t}\n\n// clear the output variable\n// title of the page to show up\n\tif($mod_data[0] == '') {\n\t\t$output = \"\";\n\t\t} else {\n\t\t$output =\"$mod_data[0]:\\n\\n\";\n\t\t}\n\n\t\twhile(list($pn_sid, $pn_title, $pn_hometext, $pn_bodytext, $pn_time) = mysql_fetch_row($sql)) {\n\t\t\t$output .= \"$pn_title\\n\";\n\t\t\t$output .= \"$pn_hometext\\n\";\n\t\t\tif ($pn_bodytext) {\n\t\t\t\t$output .= \"\"._READMORE.\": $nl_url/modules.php?op=modload&name=News&file=article&sid=$pn_sid\\n\";\n\t\t\t\t}\n\t\t\t$output .= \"\\n\";\n\t\t\t}\n\t\t} elseif($mod_data[1] == 3) {\n// news since date\n\t\t$oldest_date = $mod_data[2];\n\t\t$sql = mysql_query(\"SELECT pn_sid, pn_title, pn_hometext, pn_bodytext, pn_time FROM $pntable[stories] \n\t\t\tWHERE $ihome pn_time >= '$oldest_date' $top_cat ORDER BY pn_time DESC\");\n\n\t\t$check_for_news = mysql_num_rows($sql);\n\t\tif($check_for_news == 0) {\n\t\t\t// if there is no news to report, then stop\n\t\t\treturn;\n\t\t\t}\n\n// clear the output variable\n// title of the page to show up\n\tif($mod_data[0] == '') {\n\t\t$output = \"\";\n\t\t} else {\n\t\t$output =\"$mod_data[0]:\\n\\n\";\n\t\t}\n\n\t\twhile(list($pn_sid, $pn_title, $pn_hometext, $pn_bodytext, $pn_time) = mysql_fetch_row($sql)) {\n\t\t\t$output .= \"$pn_title\\n\";\n\t\t\t$output .= \"$pn_hometext\\n\";\n\t\t\tif ($pn_bodytext) {\n\t\t\t\t$output .= \"\"._READMORE.\": $nl_url/modules.php?op=modload&name=News&file=article&sid=$pn_sid\\n\";\n\t\t\t\t}\n\t\t\t$output .= \"\\n\";\n\t\t\t}\n\t\t} elseif($mod_data[1] == 4) {\n// news between dates\n\t\t$oldest_date = $mod_data[2];\n\t\t$newest_date = $mod_data[3];\n\t\t$sql = mysql_query(\"SELECT pn_sid, pn_title, pn_hometext, pn_bodytext, pn_time FROM $pntable[stories] \n\t\t\tWHERE $ihome pn_time >= '$oldest_date' AND pn_time <= '$newest_date' $top_cat ORDER BY pn_time DESC\");\n\n\t\t$check_for_news = mysql_num_rows($sql);\n\t\tif($check_for_news == 0) {\n\t\t\t// if there is no news to report, then stop\n\t\t\treturn;\n\t\t\t}\n\n// clear the output variable\n// title of the page to show up\n\tif($mod_data[0] == '') {\n\t\t$output = \"\";\n\t\t} else {\n\t\t$output =\"$mod_data[0]:\\n\\n\";\n\t\t}\n\n\t\twhile(list($pn_sid, $pn_title, $pn_hometext, $pn_bodytext, $pn_time) = mysql_fetch_row($sql)) {\n\t\t\t$output .= \"$pn_title\\n\";\n\t\t\t$output .= \"$pn_hometext\\n\";\n\t\t\tif ($pn_bodytext) {\n\t\t\t\t$output .= \"\"._READMORE.\": $nl_url/modules.php?op=modload&name=News&file=article&sid=$pn_sid\\n\";\n\t\t\t\t}\n\t\t\t$output .= \"\\n\";\n\t\t\t}\n\t\t} else {\n// news since last newsletter\n\t\t$sql = mysql_query(\"SELECT arch_date FROM $prefix\"._nl_archive.\" ORDER BY arch_date DESC limit 1,1\");\n\t\tlist($arch_date) = mysql_fetch_row($sql);\n\t\t$arch_date = date(\"Y-m-d H:i:s\",$arch_date);\n\t\t$sql = mysql_query(\"SELECT pn_sid, pn_title, pn_hometext, pn_bodytext, pn_time FROM $pntable[stories] \n\t\t\tWHERE $ihome pn_time > '$arch_date' $top_cat ORDER BY pn_time DESC\");\n\n\t\t$check_for_news = mysql_num_rows($sql);\n\t\tif($check_for_news == 0) {\n\t\t\t// if there is no news to report, then stop\n\t\t\treturn;\n\t\t\t}\n\n// clear the output variable\n// title of the page to show up\n\tif($mod_data[0] == '') {\n\t\t$output = \"\";\n\t\t} else {\n\t\t$output =\"$mod_data[0]:\\n\\n\";\n\t\t}\n\n\t\twhile(list($pn_sid, $pn_title, $pn_hometext, $pn_bodytext, $pn_time) = mysql_fetch_row($sql)) {\n\t\t\t$output .= \"$pn_title\\n\";\n\t\t\t$output .= \"$pn_hometext\\n\";\n\t\t\tif ($pn_bodytext) {\n\t\t\t\t$output .= \"\"._READMORE.\": $nl_url/modules.php?op=modload&name=News&file=article&sid=$pn_sid\\n\";\n\t\t\t\t}\n\t\t\t$output .= \"\\n\";\n\t\t\t}\n\t\t}\n\n// strip the slashes out all at once\n\t$output = stripslashes($output);\n\n// send the output to the system (it must be output and not another variable name)\n\treturn $output;\n}", "title": "" }, { "docid": "f1b6cb34d6d393ef8a1318cc8681feba", "score": "0.48186114", "text": "function data_newsDetails($id){\n\t$result = \"\";\n\t$query = \"SELECT startdate, enddate, title, source, content, expandable, shown FROM news WHERE id = \\\"$id\\\"\";\n\t$resultset = exec_reader($query);\n\twhile(list($start, $end, $title, $source, $content, $isExpand, $isShown) = mysql_fetch_array($resultset, MYSQL_NUM)){\n\t\t$result[] = array(\n\t\t\t\"start\" => $start,\n\t\t\t\"end\" => $end,\n\t\t\t\"title\" => $title,\n\t\t\t\"source\" => $source,\n\t\t\t\"content\" => $content,\n\t\t\t\"isExpand\" => $isExpand,\n\t\t\t\"isShown\" => $isShown,\n\t\t);\n\t}\n\treturn $result;\n}", "title": "" }, { "docid": "9edc8c60d04d13d17416b2a0f6fe5bcc", "score": "0.48161513", "text": "private function getReleaseFeedData() {\n $q = sqlquery(\"SELECT `pr`.`headline`, `pr`.`release`, `pr`.`publish_at`, `pr`.`route`, `mc`.`email` as `author_email`, `mc`.`name` as `author_name`\n FROM `bc_press_releases` `pr`, `bc_media_contacts` `mc`\n WHERE (publish_at <= NOW() OR publish_at IS NULL) \n AND `pr`.`approved` = 'on'\n AND `pr`.`media_contact` = `mc`.`id`\n ORDER BY publish_at DESC\");\n\n $items = array();\n while ($f = sqlfetch($q)) {\n $items[] = $this->get($f);\n }\n return $items; \n }", "title": "" }, { "docid": "6814186775132cc613eb0d019d4792e8", "score": "0.48105305", "text": "function news_since_html($mod_id, $nl_url, $ModName) {\n\tglobal $prefix, $pntable;\n\t$dbconn =& pnDBGetConn(true);\n\t $pntable =& pnDBGetTables();\n\n\t$language = pnConfigGetVar('language');\n\n// name the lang file the same as this file\n\tinclude(\"modules/$ModName/modules/lang/$language/newssince.php\");\n\n// get the module setting from the database\n\t$modsql = mysql_query(\"SELECT mod_qty, mod_data FROM $prefix\"._nl_modules.\" WHERE mod_id = '$mod_id'\");\n\tlist($mod_qty, $mod_data) = mysql_fetch_row($modsql);\n\n// create the array from the stored variables\n\t$mod_data = explode(\"|\", $mod_data);\n\n// query the database and generate your output in the amount of mod_qty\n\n\tif($mod_data[6] == 1) {\n\t\t$ihome = \"pn_ihome = '0' AND\";\n\t\t}\n\n\t$top_cat = '';\n\tif($mod_data[4] > 0) {\n\t\t$top_cat = \" AND pn_topic = '$mod_data[4]'\";\n\t\t}\n\tif($mod_data[5] > 0) {\n\t\t$top_cat .= \" AND pn_catid = '$mod_data[5]'\";\n\t\t}\n\n\tif($mod_data[1] == 1) {\n// news last week\n\t\t$date = mktime();\n\t\t$date = strtotime('-7 day',$date);\n\t\t$date = date(\"Y-m-d H:i:s\",$date);\n\t\t$sql = mysql_query(\"SELECT pn_sid, pn_title, pn_hometext, pn_bodytext, pn_time FROM $pntable[stories] \n\t\t\tWHERE $ihome pn_time >= '$date' $top_cat ORDER BY pn_time DESC\");\n\n\t\t$check_for_news = mysql_num_rows($sql);\n\t\tif($check_for_news == 0) {\n\t\t\t// if there is no news to report, then stop\n\t\t\treturn;\n\t\t\t}\n\n// clear the output variable\n// title of the page to show up\n\tif($mod_data[0] == '') {\n\t\t$output = \"\";\n\t\t} else {\n\t\t$output =\"<b>$mod_data[0]:</b><br><br>\\n\";\n\t\t}\n\n\t\twhile(list($pn_sid, $pn_title, $pn_hometext, $pn_bodytext, $pn_time) = mysql_fetch_row($sql)) {\n\t\t\t$output .= \"<a href=\\\"$nl_url/modules.php?op=modload&name=News&file=article&sid=$pn_sid\\\" target=\\\"_blank\\\"><b>$pn_title</b></a><br>\\n\";\n\t\t\t$output .= \"$pn_hometext<br>\\n\";\n\t\t\tif ($pn_bodytext) {\n\t\t\t\t$output .= \"<a href=\\\"$nl_url/modules.php?op=modload&name=News&file=article&sid=$pn_sid\\\" target=\\\"_blank\\\">\"._READMORE.\"</a><br>\\n\";\n\t\t\t\t}\n\t\t\t$output .= \"<br>\\n\";\n\t\t\t}\n\t\t} elseif($mod_data[1] == 2) {\n// news last month\n\t\t$date = mktime();\n\t\t$date = strtotime('-1 month',$date);\n\t\t$date = date(\"Y-m-d H:i:s\",$date);\n\t\t$sql = mysql_query(\"SELECT pn_sid, pn_title, pn_hometext, pn_bodytext, pn_time FROM $pntable[stories] \n\t\t\tWHERE $ihome pn_time >= '$date' $top_cat ORDER BY pn_time DESC\");\n\n\t\t$check_for_news = mysql_num_rows($sql);\n\t\tif($check_for_news == 0) {\n\t\t\t// if there is no news to report, then stop\n\t\t\treturn;\n\t\t\t}\n\n// clear the output variable\n// title of the page to show up\n\tif($mod_data[0] == '') {\n\t\t$output = \"\";\n\t\t} else {\n\t\t$output =\"<b>$mod_data[0]:</b><br><br>\\n\";\n\t\t}\n\n\t\twhile(list($pn_sid, $pn_title, $pn_hometext, $pn_bodytext, $pn_time) = mysql_fetch_row($sql)) {\n\t\t\t$output .= \"<a href=\\\"$nl_url/modules.php?op=modload&name=News&file=article&sid=$pn_sid\\\" target=\\\"_blank\\\"><b>$pn_title</b></a><br>\\n\";\n\t\t\t$output .= \"$pn_hometext<br>\\n\";\n\t\t\tif ($pn_bodytext) {\n\t\t\t\t$output .= \"<a href=\\\"$nl_url/modules.php?op=modload&name=News&file=article&sid=$pn_sid\\\" target=\\\"_blank\\\">\"._READMORE.\"</a><br>\\n\";\n\t\t\t\t}\n\t\t\t$output .= \"<br>\\n\";\n\t\t\t}\n\t\t} elseif($mod_data[1] == 3) {\n// news since date\n\t\t$oldest_date = $mod_data[2];\n\t\t$sql = mysql_query(\"SELECT pn_sid, pn_title, pn_hometext, pn_bodytext, pn_time FROM $pntable[stories] \n\t\t\tWHERE $ihome pn_time >= '$oldest_date' $top_cat ORDER BY pn_time DESC\");\n\n\t\t$check_for_news = mysql_num_rows($sql);\n\t\tif($check_for_news == 0) {\n\t\t\t// if there is no news to report, then stop\n\t\t\treturn;\n\t\t\t}\n\n// clear the output variable\n// title of the page to show up\n\tif($mod_data[0] == '') {\n\t\t$output = \"\";\n\t\t} else {\n\t\t$output =\"<b>$mod_data[0]:</b><br><br>\\n\";\n\t\t}\n\n\t\twhile(list($pn_sid, $pn_title, $pn_hometext, $pn_bodytext, $pn_time) = mysql_fetch_row($sql)) {\n\t\t\t$output .= \"<a href=\\\"$nl_url/modules.php?op=modload&name=News&file=article&sid=$pn_sid\\\" target=\\\"_blank\\\"><b>$pn_title</b></a><br>\\n\";\n\t\t\t$output .= \"$pn_hometext<br>\\n\";\n\t\t\tif ($pn_bodytext) {\n\t\t\t\t$output .= \"<a href=\\\"$nl_url/modules.php?op=modload&name=News&file=article&sid=$pn_sid\\\" target=\\\"_blank\\\">\"._READMORE.\"</a><br>\\n\";\n\t\t\t\t}\n\t\t\t$output .= \"<br>\\n\";\n\t\t\t}\n\t\t} elseif($mod_data[1] == 4) {\n// news between dates\n\t\t$oldest_date = $mod_data[2];\n\t\t$newest_date = $mod_data[3];\n\t\t$sql = mysql_query(\"SELECT pn_sid, pn_title, pn_hometext, pn_bodytext, pn_time FROM $pntable[stories] \n\t\t\tWHERE $ihome pn_time >= '$oldest_date' AND pn_time <= '$newest_date' $top_cat ORDER BY pn_time DESC\");\n\n\t\t$check_for_news = mysql_num_rows($sql);\n\t\tif($check_for_news == 0) {\n\t\t\t// if there is no news to report, then stop\n\t\t\treturn;\n\t\t\t}\n\n// clear the output variable\n// title of the page to show up\n\tif($mod_data[0] == '') {\n\t\t$output = \"\";\n\t\t} else {\n\t\t$output =\"<b>$mod_data[0]:</b><br><br>\\n\";\n\t\t}\n\n\t\twhile(list($pn_sid, $pn_title, $pn_hometext, $pn_bodytext, $pn_time) = mysql_fetch_row($sql)) {\n\t\t\t$output .= \"<a href=\\\"$nl_url/modules.php?op=modload&name=News&file=article&sid=$pn_sid\\\" target=\\\"_blank\\\"><b>$pn_title</b></a><br>\\n\";\n\t\t\t$output .= \"$pn_hometext<br>\\n\";\n\t\t\tif ($pn_bodytext) {\n\t\t\t\t$output .= \"<a href=\\\"$nl_url/modules.php?op=modload&name=News&file=article&sid=$pn_sid\\\" target=\\\"_blank\\\">\"._READMORE.\"</a><br>\\n\";\n\t\t\t\t}\n\t\t\t$output .= \"<br>\\n\";\n\t\t\t}\n\t\t} else {\n// news since last newsletter\n\t\t$sql = mysql_query(\"SELECT arch_date FROM $prefix\"._nl_archive.\" ORDER BY arch_date DESC limit 1\");\n\t\tlist($arch_date) = mysql_fetch_row($sql);\n\t\t$arch_date = date(\"Y-m-d H:i:s\",$arch_date);\n\t\t$sql = mysql_query(\"SELECT pn_sid, pn_title, pn_hometext, pn_bodytext, pn_time FROM $pntable[stories] \n\t\t\tWHERE $ihome pn_time > '$arch_date' $top_cat ORDER BY pn_time DESC\");\n\n\t\t$check_for_news = mysql_num_rows($sql);\n\t\tif($check_for_news == 0) {\n\t\t\t// if there is no news to report, then stop\n\t\t\treturn;\n\t\t\t}\n\n// clear the output variable\n// title of the page to show up\n\tif($mod_data[0] == '') {\n\t\t$output = \"\";\n\t\t} else {\n\t\t$output =\"<b>$mod_data[0]:</b><br><br>\\n\";\n\t\t}\n\n\t\twhile(list($pn_sid, $pn_title, $pn_hometext, $pn_bodytext, $pn_time) = mysql_fetch_row($sql)) {\n\t\t\t$output .= \"<a href=\\\"$nl_url/modules.php?op=modload&name=News&file=article&sid=$pn_sid\\\" target=\\\"_blank\\\"><b>$pn_title</b></a><br>\\n\";\n\t\t\t$output .= \"$pn_hometext<br>\\n\";\n\t\t\tif ($pn_bodytext) {\n\t\t\t\t$output .= \"<a href=\\\"$nl_url/modules.php?op=modload&name=News&file=article&sid=$pn_sid\\\" target=\\\"_blank\\\">\"._READMORE.\"</a><br>\\n\";\n\t\t\t\t}\n\t\t\t$output .= \"<br>\\n\";\n\t\t\t}\n\t\t}\n\n// strip the slashes out all at once\n\t$output = stripslashes($output);\n\n// send the output to the system (it must be output and not another variable name)\n\treturn $output;\n}", "title": "" }, { "docid": "1676e17abcc7ddf1b42c2e2d0af2faf3", "score": "0.48095116", "text": "function getExtractAction()\n\t{\n\t\t$cron_obj = new Ep_Quote_Cron();\n\t\t$tech_obj = new Ep_Quote_TechMissions();\n\t\t$first_date = date('Y-m-d',strtotime('first day of last month'));\n\t\t$last_date = date('Y-m-d',strtotime('last day of last month'));\n\t\t$result = $cron_obj->getExtract($first_date,$last_date);\n\t\t$previous_month = date('M',strtotime(date('Y-m').\" -1 month\"));\n\t\t\n\t\tif($result)\n\t\t{\n\t\t\t$i = 0;\n\t\t\t$htmltable =\"<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t<td><b>Owner</b></td>\n\t\t\t\t\t<td><b>Client name</b></td>\n\t\t\t\t\t<td><b>PO name</b></td>\n\t\t\t\t\t<td><b>Mission</b></td>\n\t\t\t\t\t<td><b>Language</b></td>\n\t\t\t\t\t<td><b>Volume to be invoiced</b></td>\n\t\t\t\t\t<td><b>selling price per unit</b></td>\n\t\t\t\t\t<td><b>Turnover</b></td>\n\t\t\t\t\t<td><b>writer cost</b></td>\n\t\t\t\t\t<td><b>proofreading cost</b></td>\n\t\t\t\t\t<td><b>SEO cost</b></td>\n\t\t\t\t\t<td><b>tech cost</b></td>\n\t\t\t\t\t<td><b>Delivered count</b></td>\n\t\t\t\t\t</tr>\";\n\t\t\t\n\t\t\tforeach($result as $row)\n\t\t\t{\n\t\t\t\tif($row['product']=='translation')\n\t\t\t\t{\n\t\t\t\t$mtitle = $this->product_array[$row['product']].\" \".$this->producttype_array[$row['product_type']].\" \".$this->getCustomName(\"EP_LANGUAGES\",$row['language_source']).\" au \".$this->getCustomName(\"EP_LANGUAGES\",$row['language_dest']);\n\t\t\t\t$language = $this->getCustomName(\"EP_LANGUAGES\",$row['language_source']).\" -> \".$this->getCustomName(\"EP_LANGUAGES\",$row['language_dest']);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t$mtitle = $this->product_array[$row['product']].\" \".$this->producttype_array[$row['product_type']].\" in \".$this->getCustomName(\"EP_LANGUAGES\",$row['language_source']);\n\t\t\t\t$language = $this->getCustomName(\"EP_LANGUAGES\",$row['language_source']);\n\t\t\t\t}\n\t\t\t\t$seoturnover = $cron_obj->getSeoTurnover($row['quote_id']);\n\t\t\t\tif($seoturnover)\n\t\t\t\t\t$seoturnover .= \" &\".$row['currency'].\"; \";\n\t\t\t\t$tech_missions = $tech_obj->getTechMissionDetails(array('quote_id'=>$row['quote_id'],'include_final'=>'yes'));\n\t\t\t\t$techturnover = \"\";\n\t\t\t\tif($tech_missions)\n\t\t\t\t{\n\t\t\t\t\t$i = 0;\n\t\t\t\t\tfor($i=0;$i<count($tech_missions);$i++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$techturnover = $tech_missions[$i]['turnover'];\n\t\t\t\t\t\tif($tech_missions[$i]['package']=='team')\n\t\t\t\t\t\t\t$techturnover += $tech_missions[$i]['team_fee'] * $tech_missions[$i]['team_packs'];\n\t\t\t\t\t}\n\t\t\t\t\tif($techturnover)\n\t\t\t\t\t$techturnover .= \" &\".$row['currency'].\"; \";\n\t\t\t\t}\n\t\t\t\tif($row['proofreader_cost'])\n\t\t\t\t\t$row['proofreader_cost'] .= \" &\".$row['currency'].\"; \";\n\t\t\t\t$htmltable .= \"<tr>\n\t\t\t\t\t\t\t\t<td >\".$row['owner'].\"</td>\n\t\t\t\t\t\t\t\t<td >\".$row['client'].\"</td>\n\t\t\t\t\t\t\t\t<td >\".$row['contractname'].\"</td>\n\t\t\t\t\t\t\t\t<td >\".$mtitle.\"</td>\n\t\t\t\t\t\t\t\t<td >\".$language.\"</td>\n\t\t\t\t\t\t\t\t<td >\".$row['tot_pub_art'].\"</td>\n\t\t\t\t\t\t\t\t<td >\".$row['unit_price'].\" &\".$row['currency'].\"; </td>\n\t\t\t\t\t\t\t\t<td ></td>\n\t\t\t\t\t\t\t\t<td >\".$row['writer_cost'].\" &\".$row['currency'].\"; </td>\n\t\t\t\t\t\t\t\t<td >\".$row['proofreader_cost'].\" </td>\n\t\t\t\t\t\t\t\t<td >\".$seoturnover.\"</td>\n\t\t\t\t\t\t\t\t<td >\".$techturnover.\"</td>\n\t\t\t\t\t\t\t\t<td >\".$row['deliveredcount'].\"</td>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\";\t\n\t\t\t\n\t\t\t\t$htmltable .=\"</tr>\";\n\t\t\t\t$newmission = $row['qmid'];\n\t\t\t\t$newdelivery = $row['did'];\n\t\t\t}\n\t\t\t$htmltable .= '</table>';\n\t\t\t$path =$_SERVER['DOCUMENT_ROOT'].\"/BO/quotexls/\";\n\t\t\t$year = date(\"Y\",strtotime($first_date));\n\t\t\t$filename = \"wp-UKTEST-extract-\".$previous_month.\"-\".$year.\".xlsx\";\n\t\t\t$cfilename = $path.$filename;\n\t\t\t$this->convertHtmltableToXlsx($htmltable,$cfilename,true);\n\t\t\t//$this->sendMail(\"[email protected]\", \"Sales Report for the month of $previous_month $year at UKTEST PTF\", \"PFA\", $path, $filename,\"[email protected]\");\n\t\t\t$this->sendMail(\"[email protected]\", \"Sales Report for the month of $previous_month $year at UKITEST TEST\", \"PFA\", $path, $filename,\"[email protected]\");\n\t\t\tunlink($cfilename);\n\t\t}\n\t}", "title": "" }, { "docid": "85cc3d4802a8f1ed2327f9f6fb20b05c", "score": "0.4809231", "text": "function latemysqlverfunc() {\r\n global $xmlindex,$installed_mysql;\r\n if (substr($installed_mysql, 0, 3)==5.6) {\r\n $latemysqlverarr[0]=$xmlindex->DB->MYSQL->V56_LATEST; //MySQL 5.6.x Latest Version Number\r\n $latemysqlverarr[1]=$xmlindex->DATA_URL->MYSQL56_URL; //MySQL 5.6.x Download URL\r\n }elseif (substr($installed_mysql, 0, 3)==5.7) {\r\n $latemysqlverarr[0]=$xmlindex->DB->MYSQL->V57_LATEST; //MySQL 5.7.x Latest Version Number\r\n $latemysqlverarr[1]=$xmlindex->DATA_URL->MYSQL57_URL; //MySQL 5.7.x Download URL\r\n }elseif (substr($installed_mysql, 0, 3)==8.0) {\r\n $latemysqlverarr[0]=$xmlindex->DB->MYSQL->V80_LATEST; //MySQL 8.0.x Latest Version Number\r\n $latemysqlverarr[1]=$xmlindex->DATA_URL->MYSQL80_URL; //MySQL 8.0.x Download URL\r\n }else{\r\n $latemysqlverarr[0]=\"?.?.?\";\r\n $latemysqlverarr[1]=\"https://dev.mysql.com/downloads/mysql/\"; //MySQL Download URL\r\n }\r\n return $latemysqlverarr;\r\n }", "title": "" }, { "docid": "3e25cec3838d8082cd904bd492cf00b9", "score": "0.48052296", "text": "public function parse_data($reporthost){\n\n $reporthost_metadata = [];\n\n // Host IP\n $result_host_ip = preg_match('#(?<=(\"host-ip\">))((?:.|\\n)*?)(?=</tag)#', $reporthost, $host_ip);\n\n if($result_host_ip){\n\n $reporthost_metadata['host_ip'] = $host_ip[0];\n\n }else{\n\n $reporthost_metadata['host_ip'] = 'NULL';\n\n }\n\n // Mac Address\n $result_mac = preg_match('#(?<=(\"mac-address\">))((?:.|\\n)*?)(?=</tag)#', $reporthost, $mac);\n\n if($result_mac){\n\n $reporthost_metadata['mac'] = $mac[0]; \n \n }else{\n\n $reporthost_metadata['mac'] = 'NULL';\n\n }\n\n // OS\n $result_os = preg_match('#(?<=(\"os\">))((?:.|\\n)*?)(?=</tag)#', $reporthost, $os);\n\n if($result_os){\n\n $reporthost_metadata['os'] = $os[0];\n\n }else{\n\n $reporthost_metadata['os'] = 'NULL';\n\n }\n\n // System Type\n $result_system_type = preg_match('#(?<=(\"system-type\">))((?:.|\\n)*?)(?=</tag)#', $reporthost, $system_type);\n if($result_system_type){\n\n $reporthost_metadata['system_type'] = $system_type[0];\n \n }else{\n\n $reporthost_metadata['system_type'] = 'NULL';\n \n } \n\n // Operating System\n $result_operating_system = preg_match('#(?<=(\"operating-system\">))((?:.|\\n)*?)(?=</tag)#', $reporthost, $operating_system);\n if($result_operating_system){\n\n $reporthost_metadata['operating_system'] = $operating_system[0];\n\n }else{\n\n $reporthost_metadata['operating_system'] = 'NULL';\n\n }\n\n // CPE-1\n $result_cpe_1 = preg_match('#(?<=(\"cpe-1\">))((?:.|\\n)*?)(?=</tag)#', $reporthost, $cpe_1);\n if($result_cpe_1){\n\n $reporthost_metadata['cpe_1'] = $cpe_1[0];\n\n }else{\n\n $reporthost_metadata['cpe_1'] = 'NULL';\n\n } \n\n // Host End\n $result_host_end = preg_match('#(?<=(\"HOST_END\">))((?:.|\\n)*?)(?=</tag)#', $reporthost, $host_end);\n if($result_host_end){\n\n $reporthost_metadata['host_end'] = $host_end[0];\n\n }else{\n\n $reporthost_metadata['host_end'] = 'NULL';\n\n } \n\n // Last Unauthenticated Results\n $result_last_unauthenticated_results = preg_match('#(?<=(\"LastUnauthenticatedResults\">))((?:.|\\n)*?)(?=</tag)#', $reporthost, $last_unauthenticated_results);\n if($result_last_unauthenticated_results){\n\n $reporthost_metadata['last_unauthenticated_results'] = $last_unauthenticated_results[0];\n\n }else{\n\n $reporthost_metadata['last_unauthenticated_results'] = 'NULL';\n\n } \n\n // Credentialed Scan\n $result_credentialed_scan = preg_match('#(?<=(\"Credentialed_Scan\">))((?:.|\\n)*?)(?=</tag)#', $reporthost, $credentialed_scan);\n if($result_credentialed_scan){\n\n $reporthost_metadata['credentialed_scan'] = $credentialed_scan[0];\n\n }else{\n\n $reporthost_metadata['credentialed_scan'] = 'NULL';\n\n } \n\n // Policy Name Used\n $result_policy_name = preg_match('#(?<=(\"policy-used\">))((?:.|\\n)*?)(?=</tag)#', $reporthost, $policy_name);\n if($result_policy_name){\n\n $reporthost_metadata['policy_name'] = $policy_name[0];\n\n }else{\n\n $reporthost_metadata['policy_name'] = 'NULL';\n\n } \n\n // Patch Summary Total CVES\n $result_total_cves = preg_match('#(?<=(\"patch-summary-total-cves\">))((?:.|\\n)*?)(?=</tag)#', $reporthost, $total_cves);\n if($result_total_cves){\n\n $reporthost_metadata['total_cves'] = $total_cves[0];\n\n }else{\n\n $reporthost_metadata['total_cves'] = 'NULL';\n\n } \n\n // CPE\n $result_cpe = preg_match('#(?<=(\"cpe\">))((?:.|\\n)*?)(?=</tag)#', $reporthost, $cpe);\n if($result_cpe){\n\n $reporthost_metadata['cpe'] = $cpe[0];\n\n }else{\n\n $reporthost_metadata['cpe'] = 'NULL';\n\n } \n\n // CPE_0\n $result_cpe_0 = preg_match('#(?<=(\"cpe-0\">))((?:.|\\n)*?)(?=</tag)#', $reporthost, $cpe_0);\n if($result_cpe_0){\n\n $reporthost_metadata['cpe_0'] = $cpe_0[0];\n\n }else{\n\n $reporthost_metadata['cpe_0'] = 'NULL';\n\n } \n\n // traceroute_hop_0\n $result_traceroute_hop_0 = preg_match('#(?<=(\"traceroute-hop-0\">))((?:.|\\n)*?)(?=</tag)#', $reporthost, $traceroute_hop_0);\n if($result_traceroute_hop_0){\n\n $reporthost_metadata['traceroute_hop_0'] = $traceroute_hop_0[0];\n\n }else{\n\n $reporthost_metadata['traceroute_hop_0'] = 'NULL';\n\n } \n \n // traceroute_hop_1\n $result_traceroute_hop_1 = preg_match('#(?<=(\"traceroute-hop-1\">))((?:.|\\n)*?)(?=</tag)#', $reporthost, $traceroute_hop_1);\n if($result_traceroute_hop_1){\n\n $reporthost_metadata['traceroute_hop_1'] = $traceroute_hop_1[0];\n\n }else{\n\n $reporthost_metadata['traceroute_hop_1'] = 'NULL';\n\n } \n\n // traceroute_hop_2\n $result_traceroute_hop_2 = preg_match('#(?<=(\"traceroute-hop-2\">))((?:.|\\n)*?)(?=</tag)#', $reporthost, $traceroute_hop_2);\n if($result_traceroute_hop_2){\n\n $reporthost_metadata['traceroute_hop_2'] = $traceroute_hop_2[0];\n\n }else{\n\n $reporthost_metadata['traceroute_hop_2'] = 'NULL';\n\n }\n\n // traceroute_hop_3\n $result_traceroute_hop_3 = preg_match('#(?<=(\"traceroute-hop-3\">))((?:.|\\n)*?)(?=</tag)#', $reporthost, $traceroute_hop_3);\n if($result_traceroute_hop_3){\n\n $reporthost_metadata['traceroute_hop_3'] = $traceroute_hop_3[0];\n\n }else{\n\n $reporthost_metadata['traceroute_hop_3'] = 'NULL';\n\n }\n\n // traceroute_hop_4\n $result_traceroute_hop_4 = preg_match('#(?<=(\"traceroute-hop-4\">))((?:.|\\n)*?)(?=</tag)#', $reporthost, $traceroute_hop_4);\n if($result_traceroute_hop_4){\n\n $reporthost_metadata['traceroute_hop_4'] = $traceroute_hop_4[0];\n\n }else{\n\n $reporthost_metadata['traceroute_hop_4'] = 'NULL';\n\n } \n\n // Netbios Name\n $result_netbios_name = preg_match('#(?<=(\"netbios-name\">))((?:.|\\n)*?)(?=</tag)#', $reporthost, $netbios_name);\n if($result_netbios_name){\n\n $reporthost_metadata['netbios_name'] = $netbios_name[0];\n\n }else{\n\n $reporthost_metadata['netbios_name'] = 'NULL';\n\n } \n\n // Host Start\n $result_host_start = preg_match('#(?<=(\"HOST_START\">))((?:.|\\n)*?)(?=</tag)#', $reporthost, $host_start);\n if($result_host_start){\n\n $reporthost_metadata['host_start'] = $host_start[0];\n\n }else{\n\n $reporthost_metadata['host_start'] = 'NULL';\n\n } \n\n // ssh-fingerprint\n $result_ssh_fingerprint = preg_match('#(?<=(\"ssh-fingerprint\">))((?:.|\\n)*?)(?=</tag)#', $reporthost, $ssh_fingerprint);\n if($result_ssh_fingerprint){\n\n $reporthost_metadata['ssh_fingerprint'] = $ssh_fingerprint[0];\n\n }else{\n\n $reporthost_metadata['ssh_fingerprint'] = 'NULL';\n\n } \n\n // Host-FQDN\n $result_host_fqdn = preg_match('#(?<=(\"host-fqdn\">))((?:.|\\n)*?)(?=</tag)#', $reporthost, $host_fqdn);\n if($result_host_fqdn){\n\n $reporthost_metadata['host_fqdn'] = $host_fqdn[0];\n\n }else{\n\n $reporthost_metadata['host_fqdn'] = 'NULL';\n\n } \n\n \n $ReportHost = new Reporthost();\n $lastinsertedid = $ReportHost->store($reporthost_metadata);\n\n\n // return $reporthost_metadata;\n // return $reporthost;\n\n\n //----------------------- Report Items Parsing ---------------------------// \n\n $reportitems = [];\n \n // ---- XML to JSON ---- // \n $reporthost = \"<ReportHost>\".$reporthost.\"</ReportHost>\";\n $xml = simplexml_load_string($reporthost);\n $json = json_encode($xml);\n $nessus = json_decode($json,TRUE);\n\n\n foreach($nessus['ReportItem'] as $reportitem){\n\n // Report Item - Port\n $reportitems['port'] = $reportitem['@attributes']['port'];\n\n // Report Item - Service name\n $reportitems['svc_name'] = $reportitem['@attributes']['svc_name'];\n\n // Report Item - Protocol\n $reportitems['protocol'] = $reportitem['@attributes']['protocol'];\n\n // Report Item - Severity\n $reportitems['severity'] = $reportitem['@attributes']['severity'];\n\n // Report Item - Plugin ID\n $reportitems['plugin_id'] = $reportitem['@attributes']['pluginID'];\n\n // Report Item - Plugin Name\n $reportitems['plugin_name'] = $reportitem['@attributes']['pluginName'];\n\n // Report Item - Plugin Family\n $reportitems['plugin_family'] = $reportitem['@attributes']['pluginFamily'];\n\n // Report Item - Description\n $reportitems['description'] = $reportitem['description'];\n\n // Report Item - Fname\n $reportitems['fname'] = $reportitem['fname'];\n\n // Report Item - Plugin Type\n $reportitems['plugin_type'] = $reportitem['plugin_type'];\n\n // Report Item - Risk Factor\n $reportitems['risk_factor'] = $reportitem['risk_factor'];\n\n // Report Item - Solution\n $reportitems['solution'] = $reportitem['solution'];\n\n // Report Item - Synopsis\n $reportitems['synopsis'] = $reportitem['synopsis'];\n\n // Report Item - Plugin Output\n if(!empty($reportitem['plugin_output'])){\n $reportitems['plugin_output'] = $reportitem['plugin_output'];\n }else{\n $reportitems['plugin_output'] = 'NULL';\n }\n\n // Report Item - Id of last inserted reporthost meta-data\n $reportitems['lastinsertedid'] = $lastinsertedid;\n\n $ReportItem = new Reportitem();\n $ReportItem->store($reportitems);\n\n }\n\n \n\n\n\n // return $lastinsertedid;\n\n\n }", "title": "" }, { "docid": "e00bfece9806ddbbfaf52bf1c21b2619", "score": "0.4800075", "text": "public function getOldSponsors(){\n\t\t$select = $this->dbfunc()->select()\n\t\t\t->from(\"facility_sponsor_option\",array('id','sponsorname' => 'facility_sponsor_phrase'))\n\t\t\t->where('is_deleted = 0')\n\t\t\t->order('facility_sponsor_phrase');\n\t\t$result = $this->dbfunc()->fetchAll($select);\n\t\treturn $result;\t\n\t}", "title": "" }, { "docid": "7790db81278a95de68a1bdbb437bc73c", "score": "0.47995183", "text": "public function parse(): array\n {\n $output = [];\n foreach ($this->dataLines as $line) {\n if (str_split(trim($line))[0] != $this->version) {\n continue;\n }\n $output = array_merge_recursive($output, $this->extractData(trim($line)));\n }\n\n return $this->sort($output, 'departure_utc_datetime');\n }", "title": "" }, { "docid": "70fe943153aa0cd5a565c1085e53d145", "score": "0.47957742", "text": "public function dateStampDataProvider() {\n\t\treturn array(\n\t\t array( 2016, 1, 7, '2016-01-07' ),\n\t\t array( 2010, 8, 22, '2010-08-22' ),\n\t\t array( 1985, 11, 5, '1985-11-05' ),\n\t\t array( 100, 10, 12, '100-10-12' ),\n\t\t);\n\t}", "title": "" }, { "docid": "ef68fbae36e5462680c294371f9f1634", "score": "0.47917634", "text": "function cGetMoonInfo ($hh=0,$mm=0,$ss=0,$MM=0,$DD=0,$YY=0) { // very crude way of determining moon phase (but very accurate)\n// ------------- start of USNO moon data -----------------------------\n// PHP tables generated from USNO moon ephemeris data http://aa.usno.navy.mil/data/docs/MoonPhase.php\n// using the one-year at a time query option\n// Ken True - Saratoga-weather.org generated by USNO-moonphases.php - Version 1.00 - 15-Jan-2011 on 15 January 2011 21:48 EST\n\n$newMoons = array( // unixtime values in UTC/GMT\n/* 2009 */ /* 26-Jan-2009 07:55 */ 1232956500, 1235525700, 1238083560, 1240629780, 1243167060, 1245699300, 1248230100, 1250762520, 1253299440, 1255843980, 1258398840, 1260964920, \n/* 2010 */ /* 15-Jan-2010 07:11 */ 1263539460, 1266115860, 1268686860, 1271248140, 1273799040, 1276341300, 1278877200, 1281409680, 1283941800, 1286477040, 1289019120, 1291570560, \n/* 2011 */ /* 04-Jan-2011 09:03 */ 1294131780, 1296700260, 1299271560, 1301841120, 1304405460, 1306962180, 1309510440, 1312051200, 1314587040, 1317121740, 1319658960, 1322201400, 1324749960, \n/* 2012 */ /* 23-Jan-2012 07:39 */ 1327304340, 1329863700, 1332427020, 1334992680, 1337557620, 1340118120, 1342671840, 1345218840, 1347761460, 1350302520, 1352844480, 1355388120, \n/* 2013 */ /* 11-Jan-2013 19:44 */ 1357933440, 1360480800, 1363031460, 1365586500, 1368145680, 1370706960, 1373267640, 1375825860, 1378380960, 1380933240, 1383483000, 1386030120, \n/* 2014 */ /* 01-Jan-2014 11:14 */ 1388574840, 1391117880, 1393660800, 1396205100, 1398752040, 1401302400, 1403856480, 1406414520, 1408975980, 1411539240, 1414101420, 1416659520, 1419212160, \n/* 2015 */ /* 20-Jan-2015 13:14 */ 1421759640, 1424303220, 1426844160, 1429383420, 1431922380, 1434463500, 1437009840, 1439563980, 1442126460, 1444694760, 1447264020, 1449829740, \n/* 2016 */ /* 10-Jan-2016 01:30 */ 1452389400, 1454942340, 1457488440, 1460028240, 1462562940, 1465095540, 1467630060, 1470170640, 1472720580, 1475280660, 1477849080, 1480421880, 1482994380, \n/* 2017 */ /* 28-Jan-2017 00:07 */ 1485562020, 1488121080, 1490669820, 1493208960, 1495741440, 1498271460, 1500803100, 1503340200, 1505885400, 1508440320, 1511005320, 1513578600, \n/* 2018 */ /* 17-Jan-2018 02:17 */ 1516155420, 1518728700, 1521292260, 1523843820, 1526384880, 1528918980, 1531450080, 1533981480, 1536516060, 1539056820, 1541606520, 1544167200, \n/* 2019 */ /* 06-Jan-2019 01:28 */ 1546738080, 1549314180, 1551888240, 1554454200, 1557009900, 1559556120, 1562094960, 1564629120, 1567161420, 1569695160, 1572233880, 1574780700, 1577337180, \n/* 2020 */ /* 24-Jan-2020 21:42 */ 1579902120, 1582471920, 1585042080, 1587608760, 1590169140, 1592721660, 1595266380, 1597804920, 1600340400, 1602876660, 1605416820, 1607962560, \n/* 2021 */ /* 13-Jan-2021 05:00 */ 1610514000, 1613070360, 1615630860, 1618194660, 1620759600, 1623322380, 1625879760, 1628430600, 1630975920, 1633518300, 1636060440, 1638603780, \n/* 2022 */ /* 02-Jan-2022 18:33 */ 1641148380, 1643694360, 1646242500, 1648794240, 1651350480, 1653910200, 1656471120, 1659030900, 1661588220, 1664142840, 1666694940, 1669244220, 1671790620, \n/* 2023 */ /* 21-Jan-2023 20:53 */ 1674334380, 1676876760, 1679419380, 1681963920, 1684511580, 1687063020, 1689618720, 1692178680, 1694742000, 1697306100, 1699867620\n ); /* end of newMoons array */\n\n$Q1Moons = array( // unixtime values in UTC/GMT\n/* 2009 */ /* 02-Feb-2009 23:13 */ 1233616380, 1236152760, 1238682840, 1241210640, 1243740120, 1246274880, 1248818400, 1251373320, 1253940600, 1256517720, 1259098740, 1261676160, \n/* 2010 */ /* 23-Jan-2010 10:53 */ 1264243980, 1266799320, 1269342000, 1271874000, 1274398980, 1276921740, 1279447800, 1281982440, 1284529800, 1287091620, 1289666340, 1292248740, \n/* 2011 */ /* 12-Jan-2011 11:31 */ 1294831860, 1297408680, 1299973500, 1302523500, 1305059580, 1307585460, 1310106540, 1312628880, 1315157940, 1317698100, 1320251880, 1322819520, \n/* 2012 */ /* 01-Jan-2012 06:15 */ 1325398500, 1327983000, 1330564860, 1333136460, 1335693420, 1338236160, 1340767800, 1343292960, 1345816440, 1348342860, 1350876720, 1353421860, 1355980740, \n/* 2013 */ /* 18-Jan-2013 23:45 */ 1358552700, 1361133060, 1363714020, 1366288260, 1368851640, 1371403440, 1373944680, 1376477760, 1379005680, 1381532520, 1384063020, 1386601920, \n/* 2014 */ /* 08-Jan-2014 03:39 */ 1389152340, 1391714520, 1394285220, 1396859460, 1399432500, 1402000740, 1404561540, 1407113400, 1409656260, 1412191920, 1414723680, 1417255560, 1419791460, \n/* 2015 */ /* 27-Jan-2015 04:48 */ 1422334080, 1424884440, 1427442180, 1430006100, 1432574340, 1435143720, 1437710640, 1440271860, 1442825940, 1445373060, 1447914420, 1450451640, \n/* 2016 */ /* 16-Jan-2016 23:26 */ 1452986760, 1455522360, 1458061380, 1460606340, 1463158920, 1465719000, 1468284720, 1470853260, 1473421740, 1475987580, 1478548260, 1481101380, \n/* 2017 */ /* 05-Jan-2017 19:47 */ 1483645620, 1486181940, 1488713520, 1491244740, 1493779620, 1496320920, 1498870260, 1501428180, 1503994380, 1506567180, 1509142920, 1511715780, 1514280000, \n/* 2018 */ /* 24-Jan-2018 22:20 */ 1516832400, 1519373340, 1521905700, 1524433500, 1526960940, 1529491860, 1532029920, 1534578480, 1537139700, 1539712920, 1542293640, 1544874540, \n/* 2019 */ /* 14-Jan-2019 06:45 */ 1547448300, 1550010360, 1552559220, 1555095960, 1557623520, 1560146340, 1562669700, 1565199060, 1567739400, 1570294020, 1572862980, 1575442680, \n/* 2020 */ /* 03-Jan-2020 04:45 */ 1578026700, 1580607720, 1583179020, 1585736460, 1588279080, 1590809400, 1593332160, 1595853120, 1598378280, 1600912500, 1603459380, 1606020300, 1608594060, \n/* 2021 */ /* 20-Jan-2021 21:01 */ 1611176460, 1613760420, 1616337600, 1618901940, 1621451580, 1623988440, 1626516660, 1629040740, 1631565540, 1634095500, 1636634760, 1639186500, \n/* 2022 */ /* 09-Jan-2022 18:11 */ 1641751860, 1644328200, 1646909100, 1649486880, 1652055660, 1654613280, 1657160040, 1659697560, 1662228480, 1664756040, 1667284620, 1669818960, 1672363200, \n/* 2023 */ /* 28-Jan-2023 15:19 */ 1674919140, 1677485100, 1680057120, 1682630400, 1685200920, 1687765800, 1690322820, 1692871020, 1695411120, 1697945340, 1700477400\n ); /* end of Q1Moons array */\n\n$fullMoons = array( // unixtime values in UTC/GMT\n/* 2009 */ /* 09-Feb-2009 14:49 */ 1234190940, 1236739080, 1239288960, 1241841660, 1244398320, 1246958460, 1249520100, 1252080180, 1254636600, 1257189240, 1259739000, 1262286780, \n/* 2010 */ /* 30-Jan-2010 06:18 */ 1264832280, 1267375080, 1269915900, 1272457080, 1275001620, 1277551800, 1280108160, 1282669500, 1285233420, 1287797760, 1290360420, 1292919180, \n/* 2011 */ /* 19-Jan-2011 21:21 */ 1295472060, 1298018160, 1300558200, 1303094640, 1305630540, 1308168840, 1310712000, 1313261820, 1315819620, 1318385160, 1320956160, 1323527760, \n/* 2012 */ /* 09-Jan-2012 07:30 */ 1326094200, 1328651640, 1331199540, 1333739940, 1336275300, 1338808320, 1341341520, 1343878020, 1346421480, 1348975140, 1351540140, 1354113960, 1356690060, \n/* 2013 */ /* 27-Jan-2013 04:38 */ 1359261480, 1361823960, 1364376420, 1366919820, 1369455900, 1371987120, 1374516900, 1377049500, 1379589180, 1382139480, 1384701360, 1387272480, \n/* 2014 */ /* 16-Jan-2014 04:52 */ 1389847920, 1392421980, 1394989680, 1397547720, 1400094960, 1402632660, 1405164300, 1407694140, 1410226680, 1412765460, 1415312580, 1417868820, \n/* 2015 */ /* 05-Jan-2015 04:53 */ 1420433580, 1423004940, 1425578700, 1428149100, 1430710920, 1433261940, 1435803600, 1438339380, 1440873300, 1443408600, 1445947500, 1448491440, 1451041860, \n/* 2016 */ /* 24-Jan-2016 01:46 */ 1453599960, 1456165200, 1458734460, 1461302640, 1463865240, 1466420520, 1468968960, 1471512360, 1474052700, 1476591780, 1479131520, 1481673900, \n/* 2017 */ /* 12-Jan-2017 11:34 */ 1484220840, 1486773180, 1489330440, 1491890880, 1494452520, 1497013800, 1499573160, 1502129460, 1504681380, 1507228800, 1509772980, 1512316020, \n/* 2018 */ /* 02-Jan-2018 02:24 */ 1514859840, 1517405220, 1519951860, 1522499820, 1525049880, 1527603540, 1530161580, 1532722800, 1535284560, 1537843920, 1540399500, 1542951540, 1545500880, \n/* 2019 */ /* 21-Jan-2019 05:16 */ 1548047760, 1550591580, 1553132580, 1555672320, 1558213860, 1560760260, 1563313080, 1565872140, 1568435580, 1571000880, 1573565640, 1576127520, \n/* 2020 */ /* 10-Jan-2020 19:21 */ 1578684060, 1581233580, 1583776080, 1586313300, 1588848300, 1591384320, 1593924240, 1596470340, 1599024120, 1601586300, 1604155740, 1606728600, 1609298880, \n/* 2021 */ /* 28-Jan-2021 19:16 */ 1611861360, 1614413820, 1616957280, 1619494260, 1622027640, 1624560000, 1627094220, 1629633720, 1632182100, 1634741820, 1637312220, 1639888500, \n/* 2022 */ /* 17-Jan-2022 23:48 */ 1642463280, 1645030560, 1647587820, 1650135300, 1652674440, 1655207520, 1657737480, 1660268160, 1662803940, 1665348900, 1667905320, 1670472480, \n/* 2023 */ /* 06-Jan-2023 23:08 */ 1673046480, 1675621680, 1678192800, 1680755640, 1683308040, 1685850120, 1688384340, 1690914720, 1693445700, 1695981420, 1698524640, 1701076560\n ); /* end of fullMoons array */\n\n$Q3Moons = array( // unixtime values in UTC/GMT\n/* 2009 */ /* 16-Feb-2009 21:37 */ 1234820220, 1237398420, 1239975360, 1242545160, 1245104100, 1247651580, 1250189700, 1252721760, 1255251360, 1257782160, 1260317580, \n/* 2010 */ /* 07-Jan-2010 10:39 */ 1262860740, 1265413680, 1267976520, 1270546620, 1273119300, 1275689580, 1278254100, 1280811540, 1283361720, 1285905120, 1288442760, 1290976560, 1293509880, \n/* 2011 */ /* 26-Jan-2011 12:57 */ 1296046620, 1298589960, 1301141220, 1303699620, 1306263120, 1308829680, 1311397320, 1313963640, 1316525940, 1319081400, 1321628940, 1324169280, \n/* 2012 */ /* 16-Jan-2012 09:08 */ 1326704880, 1329239040, 1331774700, 1334314200, 1336859220, 1339411260, 1341971280, 1344538500, 1347110100, 1349681580, 1352248560, 1354807860, \n/* 2013 */ /* 05-Jan-2013 03:58 */ 1357358280, 1359899760, 1362433980, 1364963760, 1367493240, 1370026680, 1372567980, 1375119780, 1377682500, 1380254100, 1382830800, 1385407680, 1387979280, \n/* 2014 */ /* 24-Jan-2014 05:20 */ 1390540800, 1393089300, 1395625560, 1398153120, 1400677140, 1403203140, 1405735680, 1408278360, 1410833100, 1413400320, 1415978100, 1418561460, \n/* 2015 */ /* 13-Jan-2015 09:46 */ 1421142360, 1423713000, 1426268880, 1428810240, 1431340560, 1433864520, 1436387040, 1438912980, 1441446840, 1443992760, 1446553440, 1449128400, \n/* 2016 */ /* 02-Jan-2016 05:30 */ 1451712600, 1454297280, 1456873860, 1459437420, 1461986940, 1464523920, 1467051540, 1469574000, 1472096460, 1474624560, 1477163640, 1479717180, 1482285360, \n/* 2017 */ /* 19-Jan-2017 22:13 */ 1484863980, 1487446380, 1490025480, 1492595820, 1495153980, 1497699180, 1500233160, 1502759700, 1505283900, 1507811100, 1510346160, 1512892260, \n/* 2018 */ /* 08-Jan-2018 22:25 */ 1515450300, 1518018840, 1520594400, 1523171820, 1525745340, 1528309920, 1530863460, 1533406680, 1535942220, 1538473500, 1541004000, 1543537140, 1546076040, \n/* 2019 */ /* 27-Jan-2019 21:10 */ 1548623400, 1551180480, 1553746200, 1556317080, 1558888380, 1561455960, 1564017480, 1566572160, 1569120060, 1571661540, 1574197860, 1576731420, \n/* 2020 */ /* 17-Jan-2020 12:58 */ 1579265880, 1581805020, 1584351240, 1586904960, 1589464980, 1592029440, 1594596540, 1597164300, 1599729960, 1602290340, 1604843160, 1607387760, \n/* 2021 */ /* 06-Jan-2021 09:37 */ 1609925820, 1612460220, 1614994200, 1617530520, 1620071400, 1622618640, 1625173860, 1627737360, 1630307580, 1632880620, 1635451500, 1638016080, 1640571840, \n/* 2022 */ /* 25-Jan-2022 13:41 */ 1643118060, 1645655520, 1648186620, 1650714960, 1653244980, 1655781060, 1658326680, 1660883760, 1663451520, 1666026900, 1668605220, 1671180960, \n/* 2023 */ /* 15-Jan-2023 02:10 */ 1673748600, 1676304060, 1678846080, 1681377060, 1683901680, 1686425460, 1688953680, 1691490480, 1694038860, 1696600080, 1699173420, 1701755340\n ); /* end of Q3Moons array */\n\n// ------------- end of USNO moon data -----------------------------\n\n if ($hh==0) $hh=idate(\"H\");\n if ($mm==0) $mm=idate(\"i\");\n if ($ss==0) $ss=idate(\"s\");\n if ($MM==0) $MM=idate(\"m\");\n if ($DD==0) $DD=idate(\"d\");\n if ($YY==0) $YY=idate(\"Y\");\n\n $date = mktime($hh,$mm,$ss,$MM,$DD,$YY); // Unix date from local time\n @$info->date = $date;\n $info->datetxt = gmdate('D, d-M-Y H:i T',$date);\n \n if ($date < $newMoons[1]) {\n\t $info->error = \"Date must be after \" .date(\"r\",$newMoons[1]);\n\t return $info;\n }\n if ($date > $newMoons[count($newMoons)-1]) {\n\t $info->error = \"Date must be before \".date(\"r\",$newMoons[count($newMoons)-1]);\n\t return $info;\n }\n\n foreach ($newMoons as $mi=>$newMoon) { // find next New Moon from given date\n if ($newMoon>$date) {break;}\n }\n // Get Moon dates\n $NM = $newMoons [$mi-1]; // previous new moon\n $Q1 = $Q1Moons [$mi-1]; // 1st Q end\n $Q2 = $fullMoons[$mi-1]; // 2nd Q end - Full moon\n $Q3 = $Q3Moons [$mi-1]; // 3rd Q end\n $Q4 = $newMoons [$mi ]; // 4th Q end - next new moon\n\n // Divide each phase into 7 periods (4 phases x 7 = 28 periods)\n $Q1p = round(($Q1-$NM)/7);\n $Q2p = round(($Q2-$Q1)/7);\n $Q3p = round(($Q3-$Q2)/7);\n $Q4p = round(($Q4-$Q3)/7);\n\n // Determine start and end times for major phases (lasting 1 period of 28)\n $NMe = $NM+($Q1p/2); // 0% .... - New moon\n $Q1s = $Q1-($Q1p/2); $Q1e = $Q1+($Q2p/2); // 50% 1stQ - First Quarter\n $Q2s = $Q2-($Q2p/2); $Q2e = $Q2+($Q3p/2); //100% 2ndQ - Full moon\n $Q3s = $Q3-($Q3p/2); $Q3e = $Q3+($Q4p/2); // 50% 3rdQ - Last Quarter\n $NMs = $Q4-($Q4p/2); // 0% 4thQ - New Moon\n\n// Determine age of moon in days since last new moon\n $age = ($date - $newMoons[$mi-1])/86400; // age in days since last new moon\n $dd = intval($age);\n $hh = intval(($age-$dd)*24);\n $mm = intval(((($age-$dd)*24)-$hh)*60);\n $info->age = $dd.' days, '.$hh.' hours, '.$mm.' minutes';\n\n// Illumination\n switch (true) { // Determine moon age in degrees (0 to 360)\n case ($date<=$Q1): $ma = ($date - $NM) * (90 / ($Q1 - $NM))+ 0; break; // NM to Q1\n case ($date<=$Q2): $ma = ($date - $Q1) * (90 / ($Q2 - $Q1))+ 90; break; // Q1 to FM\n case ($date<=$Q3): $ma = ($date - $Q2) * (90 / ($Q3 - $Q2))+180; break; // FM to Q3\n case ($date<=$Q4): $ma = ($date - $Q3) * (90 / ($Q4 - $Q3))+270; break; // Q3 to NM\n }\n $info->ill = abs(round(100*(1+cos($ma*(M_PI/180)))/2)-100);\n\n// Deterime picture number (0-27) and moon phase\n switch (true) {\n case ($date<=$NMe): $pic = 0; $ph = 'New Moon'; break;\n case ($date< $Q1s): $pic = 1 +(($date-$NMe)/$Q1p); $ph = 'Waxing Crescent'; break; // Waxing Crescent\n case ($date<=$Q1e): $pic = 7; $ph = 'First Quarter'; break;\n case ($date< $Q2s): $pic = 7.5+(($date-$Q1e)/$Q2p); $ph = 'Waxing Gibbous'; break;\n case ($date<=$Q2e): $pic = 14; $ph = 'Full Moon'; break;\n case ($date< $Q3s): $pic = 14.5+(($date-$Q2e)/$Q3p); $ph = 'Waning Gibbous'; break;\n case ($date<=$Q3e): $pic = 21; $ph = 'Last Quarter'; break;\n case ($date< $NMs): $pic = 21.5+(($date-$Q3e)/$Q4p); $ph = 'Waning Crescent'; break; // Waning Crecent\n default : $pic = 0; $ph = 'New Moon';\n }\n $info->pic = round($pic);\n $info->phase = $ph;\n $info->NM = $NM;\n $info->NMGMT = gmdate('D, d-M-Y H:i T',$NM);\n $info->NMWD = gmdate('H:i T d F Y',$NM);\n $info->Q1 = $Q1;\n $info->Q1GMT = gmdate('D, d-M-Y H:i T',$Q1);\n $info->Q1WD = gmdate('H:i T d F Y',$Q1);\n $info->FM = $Q2;\n $info->FMGMT = gmdate('D, d-M-Y H:i T',$Q2);\n $info->FMWD = gmdate('H:i T d F Y',$Q2);\n $info->Q3 = $Q3;\n $info->Q3GMT = gmdate('D, d-M-Y H:i T',$Q3);\n $info->Q3WD = gmdate('H:i T d F Y',$Q3);\n $info->Q4 = $Q4;\n $info->Q4GMT = gmdate('D, d-M-Y H:i T',$Q4);\n $info->Q4WD = gmdate('H:i T d F Y',$Q4);\n $info->FM2 = $fullMoons[$mi];\n $info->FM2GMT = gmdate('D, d-M-Y H:i T',$fullMoons[$mi]);\n $info->FM2WD = gmdate('H:i T d F Y',$fullMoons[$mi]);\n\n# tman1991 mods for cell.php add-on \n $moonD = array($NM , $Q1 , $Q2 , $Q3 , $Q4 , $Q1Moons[$mi] , $fullMoons[$mi], $Q3Moons[$mi] );\n $moonP = array(\"New Moon\", \"First Quarter\", \"Full Moon\", \"Last Quarter\", \"New Moon\", \"First Quarter\", \"Full Moon\" , \"Last Quarter\");\n $moonI = array(\"NM\" , \"Q1\" , \"FM\" , \"Q3\" , \"NM\" , \"Q1\" , \"FM\" , \"Q3\" );\n foreach($moonD as $key=>$mdate) {\n if ($mdate>$date) {\n $info->moons[] = array ($moonP[$key], $mdate, $moonI[$key], date(\"r\",$mdate));\n\t }\n }\n# end tman1991 mods for cell.php add-on \n\nreturn $info;\n}", "title": "" }, { "docid": "b4b34df1d5e0fec6001b00041ab1306e", "score": "0.4790722", "text": "function tracker_dates()\r\n {\r\n $dates=array();\r\n $dates[0]='';\r\n\r\n $tm=time();\r\n $dow=strftime(\"%w\",$tm);\r\n if ($dow != 0)\r\n $tm -= (86400 * $dow);\r\n\r\n $mm=strftime(\"%m\",$tm);\r\n $dd=strftime(\"%d\",$tm);\r\n $yy=strftime(\"%Y\",$tm);\r\n $weekStart = sprintf(\"%04d-%02d-%02d\",$yy,$mm,$dd);\r\n\r\n $dates[5]=$weekStart;\r\n for ($i=4; $i>=1; $i--)\r\n {\r\n $tm -= (86400 * 7);\r\n $mm=strftime(\"%m\",$tm);\r\n $dd=strftime(\"%d\",$tm);\r\n $yy=strftime(\"%Y\",$tm);\r\n $dates[$i] = sprintf(\"%04d-%02d-%02d\",$yy,$mm,$dd);\r\n }\r\n sort($dates);\r\n return $dates;\r\n }", "title": "" }, { "docid": "2205ea6ece6193d0542022b9f4ae0765", "score": "0.4777278", "text": "private function retrieveInformationalData()\n {\n \tif ($this->paramInstance->getValue('isexactsearch')) {\n \t\t$info = new TotalGranularityUsageData($this->db, $this->paramInstance, $this->logger);\n \t\t$info->fetchData();\n \t\t$data = $info->getData();\n \t\t$this->informationalData = array();\n \t\t//since this is an exact search only one dataset is returned\n \t\t$this->informationalData['first-access'] = $data[0]['date'];\n \t\t$types = $this->getTypes();\n \t \tforeach ($types as $type) {\n\t $this->informationalData['total-accesses'][$type] = $data[0][$type];\n\t }\n \t}\n }", "title": "" }, { "docid": "23863f40ec8e65c81d37b2c3269a7521", "score": "0.47747773", "text": "function fix_record2($RecDateF, $rtfdata) {\r\n global $datefmt;\r\n $dmy = 2;\r\n if ($datefmt == 'd/m/y') { $dmy = 1; }\r\n //print (\"[\" . $datefmt . \"]\");\r\n $tempinfo = explode(\":\", $rtfdata);\r\n $rtemp = substr($rtfdata, 0, (strpos($rtfdata, \".\") + 2));\r\n $rtfdate = rdate($RecDateF, (split_to_mon($dmy, $tempinfo[1])), (split_to_day($dmy, $tempinfo[1])), (split_to_year($tempinfo[1])));\r\n return array($rtemp, $rtfdate);\r\n}", "title": "" }, { "docid": "771154416f993354cd709d1355ac0095", "score": "0.4769154", "text": "function get_tv_schedule_v1($url)\n{\n $cache_dir = SERVER_ROOT . 'cache' . DS;\n if (!is_dir($cache_dir))\n {\n mkdir($cache_dir);\n }\n $cache_dir .= 'widget_support' . DS;\n if (!is_dir($cache_dir))\n {\n mkdir($cache_dir);\n }\n $v_tv_schedule_file = $cache_dir . 'tv_schedule' . Date('Y_m_d_H') . '.php';\n\n if (file_exists($v_tv_schedule_file))\n {\n return unserialize(file_get_contents($v_tv_schedule_file));\n }\n\n $arr = array(); //bien nay de return\n //fake user agent\n $user_agent = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.2 Safari/537.17';\n $old_agent = ini_get('user_agent');\n ini_set('user_agent', $user_agent);\n $raw_html = str_replace(array('<br />', '<br/>'), '', file_get_contents($url));\n $raw_html = preg_replace('#\\s(style)=\"[^\"]+\"#', '', $raw_html);\n\n\n //tra ve user agent mac dinh\n ini_set('user_agent', $old_agent);\n\n preg_match(\"/<div class = \\\"bmprogam_page_title\\\">(.*)<\\/div>/i\", $raw_html, $matches);\n// preg_match('/<div class=\"views-row views-row-1 views-row-odd views-row-first\">\">(.*)<\\/div>/i\", $raw_html, $matches);\n $title = isset($matches[1]) ? $matches[1] : '';\n\n $count = preg_match_all(\"/<p class=\\\"rtejustify\\\">(.*)<\\/p>/i\", $raw_html, $matches);\n if ($count)\n {\n foreach ($matches[1] as $item)\n {\n $item = explode(':', trim(preg_replace('/( +)/', ' ', strip_tags($item)), ' '));\n $count = preg_match(\"/([0-9]h.*)/i\", $item[0]);\n if (isset($item[1]) && $count > 0)\n {\n $item[1] = str_replace('&nbsp;', '', trim($item[1]));\n $item[1] = preg_replace('/( ?)\\/( ?)/', '/', $item[1]);\n $item[2] = $title;\n if (isset($arr[$item[0]]) == false)\n {\n $arr[$item[0]] = $item;\n }\n }\n }\n }\n if (count($arr) == 0)\n {\n $count = preg_match_all(\"/<p class=\\\"MsoNormal\\\">(.*)<\\/p>/i\", $raw_html, $matches);\n if ($count)\n {\n foreach ($matches[1] as $item)\n {\n $item = explode(':', trim(preg_replace('/( +)/', ' ', strip_tags($item)), ' '));\n $count = preg_match(\"/([0-9]h.*)/i\", $item[0]);\n if (isset($item[1]) && $count > 0)\n {\n $item[1] = str_replace('&nbsp;', '', trim($item[1]));\n $item[1] = preg_replace('/( ?)\\/( ?)/', '/', $item[1]);\n $item[2] = $title;\n if (isset($arr[$item[0]]) == false)\n {\n $arr[$item[0]] = $item;\n }\n }\n }\n }\n }\n\n file_put_contents($v_tv_schedule_file, serialize($arr));\n return $arr;\n}", "title": "" }, { "docid": "b5d81ff6f6ba80955824492134d8cf0b", "score": "0.47686994", "text": "function get_nidss_flu($epiweeks, $regions, $issues, $lag) {\n // basic query info\n $table = '`nidss_flu` nf';\n $fields = \"nf.`release_date`, nf.`issue`, nf.`epiweek`, nf.`region`, nf.`lag`, nf.`visits`, nf.`ili`\";\n $order = \"nf.`epiweek` ASC, nf.`region` ASC, nf.`issue` ASC\";\n // build the epiweek filter\n $condition_epiweek = filter_integers('nf.`epiweek`', $epiweeks);\n // build the region filter\n $condition_region = filter_strings('nf.`region`', $regions);\n if($issues !== null) {\n // build the issue filter\n $condition_issue = filter_integers('nf.`issue`', $issues);\n // final query using specific issues\n $query = \"SELECT {$fields} FROM {$table} WHERE ({$condition_epiweek}) AND ({$condition_region}) AND ({$condition_issue}) ORDER BY {$order}\";\n } else if($lag !== null) {\n // build the lag filter\n $condition_lag = \"(nf.`lag` = {$lag})\";\n // final query using lagged issues\n $query = \"SELECT {$fields} FROM {$table} WHERE ({$condition_epiweek}) AND ({$condition_region}) AND ({$condition_lag}) ORDER BY {$order}\";\n } else {\n // final query using most recent issues\n $subquery = \"(SELECT max(`issue`) `max_issue`, `epiweek`, `region` FROM {$table} WHERE ({$condition_epiweek}) AND ({$condition_region}) GROUP BY `epiweek`, `region`) x\";\n $condition = \"x.`max_issue` = nf.`issue` AND x.`epiweek` = nf.`epiweek` AND x.`region` = nf.`region`\";\n $query = \"SELECT {$fields} FROM {$table} JOIN {$subquery} ON {$condition} ORDER BY {$order}\";\n }\n // get the data from the database\n $epidata = array();\n $fields_string = array('release_date', 'region');\n $fields_int = array('issue', 'epiweek', 'lag', 'visits');\n $fields_float = array('ili');\n execute_query($query, $epidata, $fields_string, $fields_int, $fields_float);\n // return the data\n return count($epidata) === 0 ? null : $epidata;\n}", "title": "" }, { "docid": "865c75197b5cca01a9c699aaccc4b3ab", "score": "0.47676152", "text": "function FromServer_Rep( $rows, $tp = 'day' )\n {\n $this->mas = NULL;\n $this->masHead = NULL;\n $this->masDays = NULL;\n $this->RowItog = NULL;\n $this->ColItog = NULL;\n\n for( $i = 0; $i < $rows; $i++ )\n {\n $row = $this->Right->db_FetchAssoc();\n if( $row[$this->field] )\n {\n $tmp = explode( '//', $row[$this->field] );\n if( isset( $tmp[1] ) )\n {\n $tmp2 = explode( '/', $tmp[1] );\n $serv = $tmp2[0];\n //echo '<br>'.$tmp2[0];\n if( strstr( $tmp2[0], 'www.' ) )\n {\n $tmp3 = explode( 'www.', $tmp2[0] );\n $serv = $tmp3[1];\n }\n $row[$this->field] = $serv;\n }\n\n\n if( $tp == 'day' )\n {\n $index = $row['dt'];\n if( !isset( $this->mas[$row[$this->field]][$index] ) )\n $this->mas[$row[$this->field]][$index] = $row['cnt'];\n else $this->mas[$row[$this->field]][$index] = $this->mas[$row[$this->field]][$index] + $row['cnt'];\n\n $this->masDays[$index] = $row['dt'];\n $this->masColumn[$row[$this->field]] = $row[$this->field];\n\n if( !isset( $this->ColItog[$index] ) ) $this->ColItog[$index] = $row['cnt'];\n else $this->ColItog[$index] = $this->ColItog[$index] + $row['cnt'];\n\n if( !isset( $this->RowItog[$row[$this->field]] ) ) $this->RowItog[$row[$this->field]] = $row['cnt'];\n else $this->RowItog[$row[$this->field]] = $this->RowItog[$row[$this->field]] + $row['cnt'];\n }\n\n\n if( $tp == 'week' )\n {\n $dtarr = $row['dt'];\n $dtarr = explode( '-', $dtarr );\n\n $week = $Date_Calc->getCalendarWeek( $dtarr[2], $dtarr[1], $dtarr[0], \"%Y.%m.%d\" );\n $index = $week[0].' - '.$week[ ( count( $week ) - 1 ) ];\n\n if( !isset( $this->mas[$row[$this->field]][$index] ) )\n $this->mas[$row[$this->field]][$index] = $row['cnt'];\n else $this->mas[$row[$this->field]][$index] = $this->mas[$row[$this->field]][$index] + $row['cnt'];\n\n $this->masDays[$index] = $index;\n $this->masColumn[$row[$this->field]] = $row[$this->field];\n\n if( !isset( $this->ColItog[$index] ) ) $this->ColItog[$index] = $row['cnt'];\n else $this->ColItog[$index] = $this->ColItog[$index] + $row['cnt'];\n\n if( !isset( $this->RowItog[$row[$this->field]] ) ) $this->RowItog[$row[$this->field]] = $row['cnt'];\n else $this->RowItog[$row[$this->field]] = $this->RowItog[$row[$this->field]] + $row['cnt'];\n }\n\n if( $tp == 'month' )\n {\n $dtarr = $row['dt'];\n $dtarr = explode( '-', $dtarr );\n $month = NULL;\n $index = $dtarr[1].'-'.$dtarr[0];\n\n if( !isset( $this->mas[$row[$this->field]][$index] ) )\n $this->mas[$row[$this->field]][$index] = $row['cnt'];\n else $this->mas[$row[$this->field]][$index] = $this->mas[$row[$this->field]][$index] + $row['cnt'];\n\n $this->masDays[$index] = $index;\n $this->masColumn[$row[$this->field]] = $row[$this->field];\n\n if( !isset( $this->ColItog[$index] ) ) $this->ColItog[$index] = $row['cnt'];\n else $this->ColItog[$index] = $this->ColItog[$index] + $row['cnt'];\n\n if( !isset( $this->RowItog[$row[$this->field]] ) ) $this->RowItog[$row[$this->field]] = $row['cnt'];\n else $this->RowItog[$row[$this->field]] = $this->RowItog[$row[$this->field]] + $row['cnt'];\n }\n\n if( $tp == 'year' )\n {\n $dtarr = $row['dt'];\n $dtarr = explode( '-', $dtarr );\n $index = $dtarr[0];\n\n if( !isset( $this->mas[$row[$this->field]][$index] ) )\n $this->mas[$row[$this->field]][$index] = $row['cnt'];\n else $this->mas[$row[$this->field]][$index] = $this->mas[$row[$this->field]][$index] + $row['cnt'];\n\n $this->masDays[$index] = $index;\n $this->masColumn[$row[$this->field]] = $row[$this->field];\n\n if( !isset( $this->ColItog[$index] ) ) $this->ColItog[$index] = $row['cnt'];\n else $this->ColItog[$index] = $this->ColItog[$index] + $row['cnt'];\n\n if( !isset( $this->RowItog[$row[$this->field]] ) ) $this->RowItog[$row[$this->field]] = $row['cnt'];\n else $this->RowItog[$row[$this->field]] = $this->RowItog[$row[$this->field]] + $row['cnt'];\n }\n\n } //--- end if\n } //--- end for\n }", "title": "" }, { "docid": "8f60f14a836911a11920881c286e2cda", "score": "0.47654152", "text": "function returnRecThisYearArray() {\n $monthQuery = \"SELECT recordID, MONTH(recordDate) as m from \" . WEST_TABLE . \" WHERE YEAR(recordDate)='$this->year' AND recordID!=$this->recordID AND status != 'DELETE' ORDER BY recordDate ASC\"; // and APPROVED!!\n // $monthResult = db_query($monthQuery, '', __FILE__, __LINE__);\n $query = db_select(WEST_TABLE, 'w');\n $monthResult = $query\n ->fields('w', array('recordID', 'recordDate'))\n ->condition('status', 'DELETE', '!=')\n ->condition('recordDate', \"YEAR('recordDate') = $this->year\")\n ->condition('recordID', $this->recordID, '!=')\n ->execute()\n ->fetchAll();\n\n $monthArray = array();\n// while ($row = mysqli_fetch_array($monthResult, MYSQLI_ASSOC)) {\n// $monthArray[$row['m']] = $row['recordID'];\n// }\n\n return $monthArray;\n }", "title": "" }, { "docid": "f972eeeea2d380cda7ea3c75a43b13f6", "score": "0.4765282", "text": "function xmldb_local_jwc2ical_upgrade($oldversion) {\n global $DB;\n\n $dbman = $DB->get_manager(); // loads ddl manager and xmldb classes\n $table = new xmldb_table( 'jwc_schedule');\n if ( !$dbman->table_exists($table))\n {\n\t // Adding fields to table message_popup\n\t $table->add_field('id', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, XMLDB_SEQUENCE, null);\n\n\t // Adding keys to table message_popup\n\t $table->add_key('primary', XMLDB_KEY_PRIMARY, array('id'));\n\n\t // Conditionally launch create table for message_popup\n\t $dbman->create_table($table);\n }\n\n if ($oldversion < 2012041705) {\n\t$talbe = new xmldb_table( 'jwc_schedule');\n\t$field = new xmldb_field( 'id', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0', '');\n\tif ( !$dbman->field_exists( $table, $field))\n\t{\n\t\t$dbman->add_field( $table, $field);\n\t}\n\n\t$field = new xmldb_field( 'version', XMLDB_TYPE_CHAR, '20', null, XMLDB_NOTNULL, null, null, 'id');\n\tif ( !$dbman->field_exists( $table, $field))\n\t{\n\t\t$dbman->add_field( $table, $field);\n\t}\n\n\t$field = new xmldb_field( 'class', XMLDB_TYPE_CHAR, '20', null, XMLDB_NOTNULL, null, null, 'version');\n\tif ( !$dbman->field_exists( $table, $field))\n\t{\n\t\t$dbman->add_field( $table, $field);\n\t}\n\n $field = new xmldb_field('name', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null, 'class');\n if (!$dbman->field_exists( $table, $field))\n\t{\n\t\t$dbman->add_field( $table, $field);\n }\n\n $field = new xmldb_field('teacher', XMLDB_TYPE_CHAR, '255', null, null, null, null, 'name');\n\tif ( !$dbman->field_exists( $table, $field))\n\t{\n\t\t$dbman->add_field( $table, $field);\n\t}\n\n $field = new xmldb_field('location', XMLDB_TYPE_CHAR, '255', null, null, null, null, 'teacher');\n\tif ( !$dbman->field_exists( $table, $field))\n\t{\n\t\t$dbman->add_field( $table, $field);\n\t}\n\n $field = new xmldb_field('repeats', XMLDB_TYPE_INTEGER, '20', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, 'location');\n\tif ( !$dbman->field_exists( $table, $field))\n\t{\n\t\t$dbman->add_field( $table, $field);\n\t}\n\n $field = new xmldb_field('inter', XMLDB_TYPE_INTEGER, '20', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, 1, 'repeats');\n\tif ( !$dbman->field_exists( $table, $field))\n\t{\n\t\t$dbman->add_field( $table, $field);\n\t}\n\n $field = new xmldb_field('time', XMLDB_TYPE_INTEGER, '20', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, 'inter');\n\tif ( !$dbman->field_exists( $table, $field))\n\t{\n\t\t$dbman->add_field( $table, $field);\n\t}\n\n $field = new xmldb_field('length', XMLDB_TYPE_INTEGER, '20', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, 'time');\n\tif ( !$dbman->field_exists( $table, $field))\n\t{\n\t\t$dbman->add_field( $table, $field);\n\t}\n\n $index = new xmldb_index('class', XMLDB_INDEX_NOTUNIQUE, array('class', 'version'));\n if (!$dbman->index_exists( $table, $index))\n\t{\n $dbman->add_index( $table, $index);\n }\n\n upgrade_plugin_savepoint(true, 2012041705, 'local_jwc2ical', 'db');\n }\n\n return true;\n}", "title": "" }, { "docid": "92f1ad06e06b77caa1021a66c4b3eecd", "score": "0.47577256", "text": "function pharmacy_inventory_history(){\n$sql = \"select count(*) as lpharmacy_inventory_history from information_schema.columns where table_schema='$dbname' and table_name='pharmacy_inventory_history'\";\n\t$llablistcolumn_sql = select($sql);\nforeach($llablistcolumn_sql as $llablistcolumn_row){}\n\n//\tcheck number of remote bedlist columns\n\t$rlablistcolumn_sql = select2(\"select count(*) as rpharmacy_inventory_history from information_schema.columns where table_schema='$dbname2' and table_name='pharmacy_inventory_history'\");\nforeach($rlablistcolumn_sql as $rlablistcolumn_row){}\n\n\tif($llablistcolumn_row['lpharmacy_inventory_history'] == $rlablistcolumn_row['rpharmacy_inventory_history']){\n\n//check table remote_bedlist\n\t\t$rlablistlimit_sql = select2(\"SELECT * FROM pharmacy_inventory_history WHERE centerID='\".$_SESSION['centerID'].\"' ORDER BY doe ASC LIMIT 1\");\n\t\tif(count($rlablistlimit_sql)>=1){\n\tforeach($rlablistlimit_sql as $rlablistlimit_row){\n\n\t\t//search where local_doe is greater than remote_doe\n\t\t$local_lablist_sql = select(\"SELECT * FROM pharmacy_inventory_history WHERE centerID='\".$_SESSION['centerID'].\"' && dateRegistered >= '\".$rlablistlimit_row['dateRegistered'].\"' \");\n\t\tforeach($local_lablist_sql as $llablist_row){\n\n //check duplication in remote\n $rlablist_duplicate_sql = select2(\"select * from quatitso_quatmedic.pharmacy_inventory_history WHERE centerID='\".$llablist_row['centerID'].\"' \");\n\n\t\t\tif(count($rlablist_duplicate_sql) < 1){\n\n\t\t\t//insert local_bedlist into remote_bedlist\n\t\t\t$labresult_insert = insert2(\"INSERT INTO quatitso_quatmedic.pharmacy_inventory_history(medicine_id,medicine_name,medicine_type,no_of_boxes,no_of_pieces,no_of_bottles,expire_date,manufacture_date,company_name,invoice_number,unit_price,entered_by,centerID,dateRegistered,doe) VALUES('\".$llablist_row['medicine_id'].\"','\".$llablist_row['medicine_name'].\"','\".$llablist_row['medicine_type'].\",'\".$llablist_row['no_of_boxes'].\"','\".$llablist_row['no_of_pieces'].\"','\".$llablist_row['no_of_bottles'].\"','\".$llablist_row['expire_date'].\"','\".$llablist_row['manufacture_date'].\"','\".$llablist_row['company_name'].\"','\".$llablist_row['invoice_number'].\"','\".$llablist_row['unit_price'].\"','\".$llablist_row['entered_by'].\"','\".$llablist_row['centerID'].\"','\".$llablist_row['dateRegistered'].\"','\".$llablist_row['doe'].\"') \");\n\n\t\t\t\tif($labresult_insert){\n\t\t\t\t\techo \"L_pharmacy_inventory_history UPDATED\";\n\t\t\t\t}else{\n\t\t\t\t\techo \"ERROR: L_pharmacy_inventory_history\";\n\t\t\t\t}\n\t\t}\n\n\t\t}\n\t\t}\n\t\t}else{\n\t\t//search local_mode_of_payment\n\t\t$local_lablist_sql = select(\"SELECT * FROM pharmacy_inventory_history WHERE centerID='\".$_SESSION['centerID'].\"' \");\n\t\tforeach($local_lablist_sql as $llablist_row){\n\n\t\t\t//check duplication in remote\n\t\t\t$rlablist_duplicate_sql = select2(\"select * from pharmacy_inventory_history where doe='\".$llablist_row['doe'].\"' \");\n\n\t\t\tif(count($rlablist_duplicate_sql) < 1){\n\n\t\t\t//insert local_bedlist into remote_bedlist\n\t\t\t\t$labpayment_insert = insert2(\"INSERT INTO quatitso_quatmedic.pharmacy_inventory_history(medicine_id,medicine_name,unit_of_pricing,price,level,Type,no_of_boxes,no_of_pieces,no_of_bottles,expire_date,manufacture_date,company_name,invoice_number,mode_of_payment,entered_by,centerID,medFrom,dateRegistered,doe VALUES('\".$llablist_row['medicine_id'].\"','\".$llablist_row['medicine_name'].\"','\".$llablist_row['medicine_type'].\",'\".$llablist_row['no_of_boxes'].\"','\".$llablist_row['no_of_pieces'].\"','\".$llablist_row['no_of_bottles'].\"','\".$llablist_row['expire_date'].\"','\".$llablist_row['manufacture_date'].\"','\".$llablist_row['company_name'].\"','\".$llablist_row['invoice_number'].\"','\".$llablist_row['unit_price'].\"','\".$llablist_row['entered_by'].\"','\".$llablist_row['centerID'].\"','\".$llablist_row['dateRegistered'].\"','\".$llablist_row['doe'].\"') \");\n\n\t\t\t\tif($labpayment_insert){\n\t\t\t\t\techo \"R_pharmacy_inventory_history UPDATED\";\n\t\t\t\t}else{\n\t\t\t\t\techo \"ERROR: R_pharmacy_inventory_history\";\n\t\t\t\t}\n\t\t}\n\t\t}\n\t\t}\n\n\t\t//REMOTE_BEDLIST TO LOCAL_BEDLIST\n\t\t//fetch all from remote_bedlist\n\t\t$remote_lablistsql = select2(\"select * from quatitso_quatmedic.pharmacy_inventory_history WHERE centerID !='\".$_SESSION['centerID'].\"' \");\n\n\t\tforeach($remote_lablistsql as $remote_lablistrow){\n\t\t$lo_lablistinsert = insert(\"INSERT INTO pharmacy_inventory_history(medicine_id,medicine_name,unit_of_pricing,price,level,Type,no_of_boxes,no_of_pieces,no_of_bottles,expire_date,manufacture_date,company_name,invoice_number,mode_of_payment,entered_by,centerID,medFrom,dateRegistered,doe) VALUES('\".$llablist_row['medicine_id'].\"','\".$llablist_row['medicine_name'].\"','\".$llablist_row['medicine_type'].\",'\".$llablist_row['no_of_boxes'].\"','\".$llablist_row['no_of_pieces'].\"','\".$llablist_row['no_of_bottles'].\"','\".$llablist_row['expire_date'].\"','\".$llablist_row['manufacture_date'].\"','\".$llablist_row['company_name'].\"','\".$llablist_row['invoice_number'].\"','\".$llablist_row['unit_price'].\"','\".$llablist_row['entered_by'].\"','\".$llablist_row['centerID'].\"','\".$llablist_row['dateRegistered'].\"','\".$llablist_row['doe'].\"') \");\n\n }\n }else{\n echo \"TABLE L_pharmacy_inventory_history is NOT EQUAL to TABLE R_pharmacy_inventory_history\";\n }\n}", "title": "" }, { "docid": "d3fcbf839a3318bb4ff5123240fbb4e9", "score": "0.4755077", "text": "public function getVersionInfo() {\r\n // we need.\r\n $raw = $this->sheet->getContentsAsCells();\r\n $ret = array();\r\n \r\n $ret['app'] = (isset($raw['B2']['value']) && is_numeric($raw['B2']['value'])) ? $raw['B2']['value'] : null;\r\n \r\n $ret['doc'] = (isset($raw['B3']['value']) && is_numeric($raw['B3']['value'])) ? $raw['B3']['value'] : null;\r\n \r\n return $ret;\r\n }", "title": "" }, { "docid": "55348b849a730e04bd2784a33939cc55", "score": "0.47520307", "text": "function dispensary_tb_history(){\n$sql = \"select count(*) as ldispensary_tb_history from information_schema.columns where table_schema='$dbname' and table_name='dispensary_tb_history'\";\n\t$ldispensary_tbcolumn_sql = select($sql);\nforeach($ldispensary_tbcolumn_sql as $ldispensary_tbcolumn_row){}\n\n//\tcheck number of remote bedlist columns\n\t$rdispensary_tbcolumn_sql = select2(\"select count(*) as rdispensary_tb_history from information_schema.columns where table_schema='$dbname2' and table_name='dispensary_tb_history'\");\n\nforeach($rdispensary_tbcolumn_sql as $rdispensary_tbcolumn_row){}\n\n\tif($ldispensary_tbcolumn_row['ldispensary_tb_history'] == $rdispensary_tbcolumn_row['rdispensary_tb_history']){\n\n//check table remote_bedlist\n$rdispensary_tblimit_sql = select2(\"SELECT * FROM dispensary_tb_history WHERE centerID='\".$_SESSION['centerID'].\"' ORDER BY dateRegistered ASC LIMIT 1\");\n\t\tif(count($rdispensary_tblimit_sql)>=1){\n\tforeach($rdispensary_tblimit_sql as $rdispensary_tblimit_row){\n\n //search where local_doe is greater than remote_doe\n $local_dispensary_tb_sql = select(\"SELECT * FROM dispensary_tb_history WHERE centerID='\".$_SESSION['centerID'].\"' && dateRegistered >= '\".$rdispensary_tblimit_row['dateRegistered'].\"' \");\n\n foreach($local_dispensary_tb_sql as $ldispensary_tb_row){\n //check duplication in remote\n $rdispensary_tb_duplicate_sql = select2(\"select * from quatitso_quatmedic.dispensary_tb_history WHERE request_id='\".$ldispensary_tb_row['request_id'].\"' \");\n\n\t\t\tif(count($rdispensary_tb_duplicate_sql) < 1){\n\n\t\t\t//insert local_bedlist into remote_bedlist\n\t\t\t$dispensary_tb_insert = insert2(\"INSERT INTO quatitso_quatmedic.dispensary_tb_history(request_id,medicine_id,medicine_name,medicine_type,centerID,expire_date,unit_price,no_of_piece,request_status,date_requested,date_approval,requested_by,approved_by,doe) VALUES('\".$ldispensary_tb_row['request_id'].\"','\".$ldispensary_tb_row['medicine_id'].\"','\".$ldispensary_tb_row['medicine_name'].\"','\".$ldispensary_tb_row['medicine_type'].\"','\".$ldispensary_tb_row['centerID'].\"','\".$ldispensary_tb_row['expire_date'].\"','\".$ldispensary_tb_row['unit_price'].\"','\".$ldispensary_tb_row['no_of_piece'].\"','\".$ldispensary_tb_row['request_status'].\"','\".$ldispensary_tb_row['date_requested'].\"','\".$ldispensary_tb_row['date_approval'].\"','\".$ldispensary_tb_row['requested_by'].\"','\".$ldispensary_tb_row['approved_by'].\"','\".$ldispensary_tb_row['doe'].\"') \");\n\n\n\t\t\t\tif($dispensary_tb_insert){\n\t\t\t\t\techo \"L_DISPENSARY HISTORY UPDATED\";\n\t\t\t\t}else{\n\t\t\t\t\techo \"ERROR: L_DISPENSARY\";\n\t\t\t\t}\n\t\t}\n\n\t\t}\n\t\t}\n\t\t}else{\n\n\n\t\t//search local_bedlist\n\t\t$local_dispensary_tb_sql = select(\"SELECT * FROM dispensary_tb WHERE centerID='\".$_SESSION['centerID'].\"' \");\n\t\tforeach($local_dispensary_tb_sql as $ldispensary_tb_row){\n\n\t\t\t//check duplication in remote\n\t\t\t$rdispensary_tb_duplicate_sql = select2(\"select * from dispensary_tb where doe='\".$ldispensary_tb_row['doe'].\"' \");\n\n\t\t\tif(count($rdispensary_tb_duplicate_sql) < 1){\n\n\t\t\t//insert local_bedlist into remote_bedlist\n\t\t\t\t$dispensary_tb_insert = insert2(\"INSERT INTO quatitso_quatmedic.dispensary_tb(request_id,medicine_id,medicine_name,medicine_type,centerID,expire_date,unit_price,no_of_piece,request_status,date_requested,date_approval,requested_by,approved_by,doe) VALUES('\".$ldispensary_tb_row['request_id'].\"','\".$ldispensary_tb_row['medicine_id'].\"','\".$ldispensary_tb_row['medicine_name'].\"','\".$ldispensary_tb_row['medicine_type'].\"','\".$ldispensary_tb_row['centerID'].\"','\".$ldispensary_tb_row['expire_date'].\"','\".$ldispensary_tb_row['unit_price'].\"','\".$ldispensary_tb_row['no_of_piece'].\"','\".$ldispensary_tb_row['request_status'].\"','\".$ldispensary_tb_row['date_requested'].\"','\".$ldispensary_tb_row['date_approval'].\"','\".$ldispensary_tb_row['requested_by'].\"','\".$ldispensary_tb_row['approved_by'].\"','\".$ldispensary_tb_row['doe'].\"') \");\n\n\t\t\t\tif($dispensary_tb_insert){\n\t\t\t\t\techo \"R_DISPENSARY UPDATED\";\n\t\t\t\t}else{\n\t\t\t\t\techo \"ERROR: R_DISPENSARY\";\n\t\t\t\t}\n\t\t}\n\n\t\t}\n\t\t}\n\n\t\t//REMOTE_BEDLIST TO LOCAL_BEDLIST\n\t\t//fetch all from remote_bedlist\n\t\t$remote_dispensary_tbsql = select2(\"select * from quatitso_quatmedic.dispensary_tb WHERE centerID !='\".$_SESSION['centerID'].\"' \");\n\n\t\tforeach($remote_dispensary_tbsql as $remote_dispensary_tbrow){\n\t\t$lo_dispensary_tbinsert = insert(\"INSERT INTO dispensary_tb(request_id,medicine_id,medicine_name,medicine_type,centerID,expire_date,unit_price,no_of_piece,request_status,date_requested,date_approval,requested_by,approved_by,doe) VALUES('\".$ldispensary_tb_row['request_id'].\"','\".$ldispensary_tb_row['medicine_id'].\"','\".$ldispensary_tb_row['medicine_name'].\"','\".$ldispensary_tb_row['medicine_type'].\"','\".$ldispensary_tb_row['centerID'].\"','\".$ldispensary_tb_row['expire_date'].\"','\".$ldispensary_tb_row['unit_price'].\"','\".$ldispensary_tb_row['no_of_piece'].\"','\".$ldispensary_tb_row['request_status'].\"','\".$ldispensary_tb_row['date_requested'].\"','\".$ldispensary_tb_row['date_approval'].\"','\".$ldispensary_tb_row['requested_by'].\"','\".$ldispensary_tb_row['approved_by'].\"','\".$ldispensary_tb_row['doe'].\"') \");\n\n }\n\n }else{\n echo \"TABLE L_DISPENSARY is NOT EQUAL to TABLE R_DISPENSAY\";\n }\n}", "title": "" }, { "docid": "69d706ea5832da0cd5bccfea5e5fa81d", "score": "0.47519466", "text": "function from_current_page()\r\n {\r\n global\r\n $m,\r\n $monthnum,\r\n $wpdb,\r\n $year;\r\n\r\n if (isset($_GET['w'])) {\r\n $w = ''.intval($_GET['w']);\r\n }\r\n\r\n // Let's figure out when we are\r\n if (!empty($monthnum) && !empty($year)) {\r\n $thismonth = ''.zeroise(intval($monthnum), 2);\r\n $thisyear = ''.intval($year);\r\n } elseif (!empty($w)) {\r\n // We need to get the month from MySQL\r\n $thisyear = ''.intval(substr($m, 0, 4));\r\n $d = (($w - 1) * 7) + 6; //it seems MySQL's weeks disagree with PHP's\r\n $thismonth = $wpdb->get_var(\"SELECT DATE_FORMAT((DATE_ADD('${thisyear}0101', INTERVAL $d DAY) ), '%m')\");\r\n } elseif (!empty($m)) {\r\n// $calendar = substr($m, 0, 6);\r\n $thisyear = ''.intval(substr($m, 0, 4));\r\n if (strlen($m) < 6) {\r\n $thismonth = '01';\r\n } else {\r\n $thismonth = ''.zeroise(intval(substr($m, 4, 2)), 2);\r\n }\r\n } else {\r\n $thisyear = gmdate('Y', current_time('timestamp') + get_settings('gmt_offset') * 3600);\r\n $thismonth = gmdate('m', current_time('timestamp') + get_settings('gmt_offset') * 3600);\r\n }\r\n \r\n $this->year_num =intval($thisyear);\r\n $this->month_num=intval($thismonth);\r\n $this->day_num =1;\r\n }", "title": "" }, { "docid": "d6d6e34d8d5f5a5efbef1cb0737a13ad", "score": "0.47514176", "text": "function GetEPGFromKT($ChannelInfo) {\n $ChannelId = $ChannelInfo[0];\n $ChannelName = $ChannelInfo[1];\n $ServiceId = $ChannelInfo[3];\n $epginfo = array();\n foreach(range(1, $GLOBALS['period']) as $k) :\n $url = \"http://tv.olleh.com/renewal_sub/liveTv/pop_schedule_week.asp\";\n $day = date(\"Ymd\", strtotime(\"+\".($k - 1).\" days\"));\n $params = array(\n 'ch_name' => '',\n 'ch_no' => $ServiceId,\n 'nowdate'=> $day,\n 'seldatie' => $day,\n 'tab_no' => '1'\n );\n $params = http_build_query($params);\n $method = \"GET\";\n try {\n $response = getWeb($url, $params, $method);\n if ($response === False && $GLOBALS['debug']) :\n printError($ChannelName.HTTP_ERROR);\n else :\n $response = str_replace(\"charset=euc-kr\", \"charset=utf-8\", $response);\n $response = mb_convert_encoding($response, \"UTF-8\", \"EUC-KR\");\n $dom = new DomDocument;\n libxml_use_internal_errors(True);\n if($dom->loadHTML($response)):\n $xpath = new DomXPath($dom);\n $query = \"//table[@id='pop_day']/tbody/tr\";\n $rows = $xpath->query($query);\n foreach($rows as $row) :\n $startTime = $endTime = $programName = $subprogramName = $desc = $actors = $producers = $category = $episode = \"\";\n $rebroadcast = False;\n $rating = 0;\n $cells = $row->getElementsByTagName('td');\n //programName, startTime, rating, category\n $startTime = date(\"YmdHis\", strtotime($day.\" \".trim($cells->item(0)->nodeValue)));\n $pattern = '/^(.*?)( <(.*)>)?$/';\n $programName = trim($cells->item(1)->nodeValue);\n preg_match($pattern, $programName, $matches);\n if ($matches != NULL) :\n if(isset($matches[1])) $programName = $matches[1] ?: \"\";\n if(isset($matches[3])) $subprogramName = $matches[3] ?: \"\";\n endif;\n $category = trim($cells->item(4)->nodeValue);\n $rating = str_replace(\"all\", 0, str_replace(\"세 이상\", \"\", trim($cells->item(2)->nodeValue)));\n //ChannelId, startTime, programName, subprogramName, desc, actors, producers, category, episode, rebroadcast, rating\n $epginfo[] = array($ChannelId, $startTime, $programName, $subprogramName, $desc, $actors, $producers, $category, $episode, $rebroadcast, $rating);\n usleep(1000);\n endforeach;\n else :\n if($GLOBALS['debug']) printError($ChannelName.CONTENT_ERROR);\n endif;\n endif;\n } catch (Exception $e) {\n if($GLOBALS['debug']) printError($e->getMessage());\n }\n endforeach;\n epgzip($epginfo);\n}", "title": "" }, { "docid": "45b64e82e79148073005cb3c049e33e4", "score": "0.47496128", "text": "protected function getData() {\n\t\tif ($this->_conf['active_on']==1){\n\t\t\t//Последние сообщения на форуме и последние файлы в архиве\n\t\t\t$this->_smarty->assign('last_posts', $this->last_p());\n\t\t\t$this->_smarty->assign('last_files', $this->last_f());\n\t\t}\n\t\tif (isset($this->_nfs->input['news']) and ($this->_nfs->input['news'] > 0)) {\n\t\t\t$news_page = intval($this->_nfs->input['news']);\n\t\t} else $news_page=1;\n\t\t\n\t\t$this->_smarty->assign('last_news', $this->news_p($news_page));\t\n\t}", "title": "" }, { "docid": "e9a64a46362bc439e9dc4c6a32209eda", "score": "0.47429106", "text": "function restore_read_xml_formatdata ($xml_file) {\n\n //We call the main read_xml function, with todo = FORMATDATA\n $info = restore_read_xml ($xml_file,'FORMATDATA',false);\n\n return $info;\n }", "title": "" }, { "docid": "a3933ba2164acdafdc02f5e122493a10", "score": "0.47391745", "text": "function get_data_coming()\n\t\t{\n\t\t\t$query = $this->db->query(\"SELECT * FROM `coming` WHERE status='1'\");\n\t\t\n\t\t\t$indeks = 0;\n\t\t\t$result = array();\n\t\t\t\n\t\t\tforeach ($query->result_array() as $row)\n\t\t\t{\n\t\t\t\t$result[$indeks++] = $row;\n\t\t\t}\n\t\t\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "acbf25cc248fab561f670c168c50ab95", "score": "0.47356167", "text": "public function allot_the_market_data() {\n\t\t$record =array(); \t\n\t\tif(!empty($this->company_name)){\t//<---company details error checks\n\t\t\t\t\t$this->main_record=$this->Get_record_file_handle();\n\t\t\t\tif($this->main_record){\n\t\t\t\t\tforeach ($this->main_record as $row){\t//<--loop throught the values\n\t\t\t\t\t\t\t$this->low_data_array[date(\"Md\",strtotime($row['Date']))] = $row['Low'];\n\t\t\t\t\t\t\t$this->high_data_array[date(\"Md\",strtotime($row['Date']))] = $row['High'];\n\t\t\t\t\t\t\t$this->volume_array[date(\"Md\",strtotime($row['Date']))] = $row['Volume'];\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tCompany::delete_record_data_by_company_symbol($this->company_symbol);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t}\t//<---company details error checks end\n\t}", "title": "" }, { "docid": "d8f475673031ed3060b34a3c1299a241", "score": "0.47327065", "text": "function data_news($tab){\n\t$result = \"\";\n\t$query = \"SELECT id, startdate, enddate, title, source, content, expandable, shown FROM news WHERE type = \\\"$tab\\\" ORDER BY startdate DESC, enddate DESC\";\n\t$resultset = exec_reader($query);\n\twhile(list($id, $start, $end, $title, $source, $content, $isExpand, $isShown) = mysql_fetch_array($resultset, MYSQL_NUM)){\n\t\t$result[] = array(\n\t\t\t\"id\" => $id,\n\t\t\t\"start\" => $start,\n\t\t\t\"end\" => $end,\n\t\t\t\"title\" => $title,\n\t\t\t\"source\" => $source,\n\t\t\t\"content\" => $content,\n\t\t\t\"isExpand\" => $isExpand,\n\t\t\t\"isShown\" => $isShown,\n\t\t);\n\t}\n\treturn $result;\n}", "title": "" }, { "docid": "011f5e9cd30d5fac61380bd64a9cf353", "score": "0.47322664", "text": "public function getFestival(){\n\t\t$festival = $this->parentClass->dbController->dbSelectOne(\"SELECT * FROM content WHERE name='festival'\");\n\t\t$historia = $this->parentClass->dbController->dbSelectOne(\"SELECT * FROM content WHERE name='history'\");\n\t\t$lang = $this->parentClass->sessionController->getLanguage();\n\t\t\n\t\t$include_file = $this->htmlDir.'festival.inc';\n\t\tif(@file_exists($include_file)) @include_once($include_file);\n\t\t\t\n\t\treturn $incdata;\n\t}", "title": "" }, { "docid": "3ea22707446b8ff28d86eaa71dfcb138", "score": "0.47244707", "text": "function getExtract($first_date,$last_date)\n\t{\n\t\t$query = \"SELECT count(a.id) as deliveredcount,(count(p.id)) as part_count,ROUND(sum(a.files_pack),2) as tot_pub_art,CONCAT(up.first_name,up.last_name) as owner,c.company_name as client,\n\t\tqc.contractname,qm.product,qm.product_type,qm.language_source,qm.language_dest,qm.unit_price,q.sales_suggested_currency,sum(a.price_final) as total_price,\n\t\tDATE_FORMAT(qc.expected_end_date,'%d-%m-%Y') as enddate,qm.margin_percentage,(sum(p.price_user)+IF(sum(cp.price_corrector)>0,sum(cp.price_corrector),0)) as production_cost,\n\t\tROUND(sum(p.price_user),2) as writer_cost,ROUND(sum(cp.price_corrector),2) as proofreader_cost,qc.quotecontractid,qm.quote_id,d.contract_mission_id,\n\t\tqm.tempo,qm.oneshot\n\t\tFROM Article a \n\t\tJOIN Participation p ON p.article_id = a.id \n\t\tLEFT JOIN CorrectorParticipation cp ON cp.article_id = a.id AND cp.status='published'\n\t\tJOIN Delivery d ON d.id = a.delivery_id\n\t\tJOIN ContractMissions cm ON cm.contractmissionid = d.contract_mission_id \n\t\tJOIN QuoteContracts qc ON qc.quotecontractid = cm.contract_id\n\t\tJOIN Quotes q ON q.identifier = qc.quoteid\n\t\tJOIN QuoteMissions qm ON qm.quote_id = q.identifier\n\t\tJOIN User u ON u.identifier = cm.assigned_to\n\t\tJOIN UserPlus up ON up.user_id = u.identifier\n\t\tJOIN User u1 ON u1.identifier = q.client_id\n\t\tJOIN Client c ON c.user_id = u1.identifier\n\t\tWHERE p.status IN ('under_study','disapproved','published','plag_exec','disapproved_temp','disapproved_client') AND p.cycle=0 AND a.delivered='yes' AND d.missiontest = 'no' AND DATE(a.delivered_updated_at) >= '\".$first_date.\"' AND DATE(a.delivered_updated_at) <= '\".$last_date.\"' AND cm.type_id = qm.identifier \n\t\tGROUP BY cm.contractmissionid\n\t\t\"; //echo $query;exit;\n\t\tif(($result = $this->getQuery($query,true)) != NULL)\n return $result;\n else\n return NULL;\n\t}", "title": "" }, { "docid": "f6651db10dd418c8cfa8d746dc121649", "score": "0.47198656", "text": "function getCalendarData()\t{\n\n //Create a timestamp based on the parameters for getCalendarData\n $date = date('Y-m-d');\n $timeStamp = strtotime($date);\n \n //Empty Array\n $calendarData = array();\n //We have to set the counter to 1 and not zero because calendar days start at 1.\n $counter=1;\n $indexes =0;\n //Important Days, get the first day and the last day of the month\n $firstDay = date('Y-m-01',$timeStamp);\n $calendarData[\"firstDay\"] = $firstDay;\n $firstWeekDayIndex= date(\"w\",$firstDay);\n $numDays = date(\"t\",$timeStamp);\n $lastDay = date('Y-m-'.$numDays, $timeStamp);\n $calendarData[\"lastDay\"] = $lastDay;\n //Iterate through the grid (7 x 5)\n for($i=0; $i<5;$i++){\n for($j=0;$j<7;$j++){\n if($j<=$firstWeekDayIndex+1){\n $calendarData[$indexes] = null;\n $indexes++;\n }\n else if($counter <= $numDays){\n $calendarData[$indexes] = $counter;\n $counter++;\n $indexes++;\n }\n else{\n $calendarData[$indexes] = null;\n $indexes++;\n }\n \n }\n $firstWeekDayIndex=-2; \n }\n //Go through each column\n \n //Start counting the days if the $counter s greater than the first day, continue on until the counter is less than or equal to the last day + the first day (which would mean the number of days in the month has been reached.)\n \n //Append the current month and year to the array\n $currentMonth =date(\"F\", $timeStamp );\n $currentYear = date(\"Y\", $timeStamp );\n $calendarData[\"month\"] = $currentMonth;//Record the month\n $calendarData[\"year\"] = $currentYear;//Record the year\n return $calendarData;\n }", "title": "" }, { "docid": "298bf60ec9db859414ffc2d4dea1ef39", "score": "0.47187787", "text": "protected function get_calendar_data()\n\t{\n\t\t//Offset time for custom months\n\t\tif($this->uri->segment(3) && $this->uri->segment(4))\n\t\t{\n\t\t\t$year = $this->uri->segment(3);\n\t\t\t$month = $this->uri->segment(4);\n\t\t}\n\n\t\t$_months = array(\n\t\t\t1 => 'January', 2 => 'February',\n\t\t\t3 => 'March', 4 => 'April',\n\t\t\t5 => 'May', 6 => 'June',\n\t\t\t7 => 'July', 8 => 'August',\n\t\t\t9 => 'September', 10 => 'October',\n\t\t\t11 => 'November', 12 => 'December'\n\t\t);\n\n\t\t$year = (isset($year)) ? $year : date('Y');\n\t\t$month = (isset($month)) ? $month : date('m');\n\n\t\t$local_time = time();\n\n\t\t$data = array();\n\n\t\t$data['month'] = $_months[(int)$month].' '.$year;\n\t\t$data['calendar'] = array();\n\t\t$data['today'] = getdate();\n\n\t\t$days_in_month = $this->calendar->get_total_days($month, $year);\n\n\t\t// Set the starting day number\n\t\t$local_date = mktime(0, 0, 0, $month, 1, $year);\n\t\t$month_end = mktime(0, 0, 0, $month, $days_in_month, $year);\n\t\t$date = getdate($local_date);\n\t\t$day = 0 + 1 - $date[\"wday\"];\n\n\t\t//Get tasks for each day\n\t\t$content = $this->task_model->get_day_task_list($local_date, $month_end, $days_in_month);\n\n\t\t// Set the current month/year/day\n\t\t// We use this to determine the \"today\" date\n\t\t$cur_year\t= date(\"Y\", $local_time);\n\t\t$cur_month\t= date(\"m\", $local_time);\n\t\t$cur_day\t= date(\"j\", $local_time);\n\n\t\t$is_current_month = ($cur_year == $year AND $cur_month == $month);\n\n\t\t$out = null;\n\n\t\twhile ($day <= $days_in_month)\n\t\t{\n\t\t\tfor ($i = 0; $i < 7; $i++)\n\t\t\t{\n\t\t\t\tif($i == 0)\n\t\t\t\t{\n\t\t\t\t\t$out .= '<tr>';\n\t\t\t\t}\n\n\t\t\t\tif ($day > 0 AND $day <= $days_in_month)\n\t\t\t\t{\n\t\t\t\t\tif (isset($content[$day]))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Cells with content\n\t\t\t\t\t\t$out .= ($is_current_month == TRUE AND $day == $cur_day) ? '<td class=\"today\">' : '<td>';\n\t\t\t\t\t\t$out .= '<div><span class=\"date\">'.$day.'</span><ul>'.$content[$day].'</ul></div></td>';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// Cells with no content\n\t\t\t\t\t\t$out .= ($is_current_month == TRUE AND $day == $cur_day) ? '<td class=\"today\">' : '<td>';\n\t\t\t\t\t\t$out .= '<div><span class=\"date\">'.$day.'</span>&nbsp;</div></td>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Blank cells\n\t\t\t\t\t$out .= '<td>&nbsp;</td>';\n\t\t\t\t}\n\n\n\t\t\t\t$day++;\n\n\t\t\t\tif($i == 6)\n\t\t\t\t{\n\t\t\t\t\t$out .= '</tr>';\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t}\n\n\t\t$data['calendar'] = $out;\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "4ad39efe3118f13f50f3ff9f29c37813", "score": "0.47168037", "text": "public function getDataFormatted() {\n\t\t$forecast=array();\n\t\tforeach( $this->getData() as $forecastRow ){\n\t\t\t$id = 'summary';\n\t\t\t$day = date( 'Y-m-d', strtotime($forecastRow['start_valid_time']));\n\t\t\t$meridian = date( 'a', strtotime($forecastRow['start_valid_time']));\n\t\t\tif(isset($forecastRow['temperature_minimum'])) {\n\t\t\t\t$forecast[$day][$id][$meridian]['temperature_minimum'] = $forecastRow['temperature_minimum'];\n\t\t\t} elseif(isset($forecastRow['temperature_maximum'])) {\n\t\t\t\t$forecast[$day][$id][$meridian]['temperature_maximum'] = $forecastRow['temperature_maximum'];\n\t\t\t}\n\t\t\t$forecast[$day][$id][$meridian]['weather'] = $forecastRow['weather'];\n\t\t\t$forecast[$day][$id][$meridian]['probability_of_precipitation_calculated'] = $forecastRow['probability_of_precipitation_calculated'];\n\t\t\t$forecast[$day][$id][$meridian]['conditions_icon_forecast_NWS'] = $forecastRow['conditions_icon_forecast_NWS'];\n\t\t\t$forecast[$day][$id][$meridian]['start_valid_time'] = $forecastRow['start_valid_time'];\n\t\t}\n\t\treturn $forecast;\n\t}", "title": "" }, { "docid": "6bab6bfcc323303a522f5bef4976d0dc", "score": "0.47160402", "text": "public function ambildata(){\n\t\t$query=$this->db->query(\"SELECT * FROM tb_lowongan WHERE jadwal_seleksi >= CURRENT_DATE()\");\n\t\treturn $query->result_array();\n\t}", "title": "" }, { "docid": "3fd1e929fda1154211609745ae939208", "score": "0.47153845", "text": "function get_covidcast_meta() {\n // complain if the cache is more than 75 minutes old\n $max_age = 75 * 60;\n\n // basic query info\n $query = 'SELECT UNIX_TIMESTAMP(NOW()) - `timestamp` AS `age`, `epidata` FROM `covidcast_meta_cache` LIMIT 1';\n\n // get the data from the database\n global $dbh;\n $epidata = null;\n $result = mysqli_query($dbh, $query);\n if($row = mysqli_fetch_array($result)) {\n // parse and use the cached response\n $epidata = json_decode($row['epidata'], true);\n\n if (intval($row['age']) > $max_age && strlen($row['epidata']) > 0) {\n error_log('covidcast_meta cache is stale: '.$row['age']);\n }\n }\n\n if ($epidata !== null) {\n // filter rows\n $time_types = extract_values($_REQUEST['time_types'], 'str');\n $signals = isset($_REQUEST['signals']) ? array_map(function($signal) {\n return explode(':', $signal, 2);\n }, extract_values($_REQUEST['signals'], 'str')) : null;\n $geo_types = extract_values($_REQUEST['geo_types'], 'str');\n\n if ($time_types !== null || $signals !== null || $geo_types !== null) {\n $epidata = array_values(array_filter($epidata, function($row) use(&$time_types, &$signals, &$geo_types) {\n if ($time_types !== null && !in_array($row['time_type'], $time_types)) {\n return false;\n }\n if ($geo_types !== null && !in_array($row['geo_type'], $geo_types)) {\n return false;\n }\n if ($signals === null || count($signals) === 0) {\n return true;\n }\n // filter by signal\n foreach($signals as $signal) {\n // match source and (signal or no signal or signal = *)\n if ($row['data_source'] === $signal[0] && (count($signal) === 1 || $row['signal'] === $signal[1] || $signal[1] === '*')) {\n return true;\n }\n }\n return false;\n }));\n }\n // filter fields\n if (isset($_REQUEST['fields'])) {\n $fields = extract_values($_REQUEST['fields'], 'str');\n\n $epidata = array_map(function($row) use(&$fields) {\n $filtered_row = [];\n foreach($fields as $field) {\n if (isset($row[$field])) {\n $filtered_row[$field] = $row[$field];\n }\n }\n return $filtered_row;\n }, $epidata);\n }\n }\n\n // return the data\n $has_values = $epidata !== null && count($epidata) > 0;\n return $has_values ? $epidata : null;\n}", "title": "" }, { "docid": "33ab2c96f3bf2f998a992d5ab30c1b7b", "score": "0.47133714", "text": "function loadDyChinasarftFromDB()\n{\n $data = DaoXlegalLawContentRecord::getInstance()->search_data();\n\n foreach ($data as $item) {\n if (!empty($item)) {\n $id = $item['id'];\n $url_md5 = $item['url_md5'];\n\n $file = \"/mnt/open-xdp/spider/raw_data/20170418/\" . $url_md5 . \".html\";\n if (!file_exists($file)) {\n $file = \"/mnt/open-xdp/spider/raw_data/20170419/\" . $url_md5 . \".html\";\n if (!file_exists($file)) {\n echo \"file not exists: {$url_md5}\" . PHP_EOL;\n continue;\n }\n }\n\n $extract = new ExtractContent($file);\n\n $extract->skip_td_childs = true;\n\n $extract->parse();\n\n $useRawContent = false;\n foreach ($extract->text as $t) {\n if (mb_strpos($t, \"电影拍摄制作备案公示表\", 0, \"UTF-8\") >= 0) {\n $useRawContent = true;\n }\n }\n\n if ($useRawContent) {\n if (empty($extract->doc_ori_no)) {\n $x = explode(\"\\n\", implode(\"\", array_filter($extract->text)));\n $l = count($x);\n $l = $l < 20 ? $l : 20;\n for ($i = 0; $i < $l; $i++) {\n preg_match(ExtractContent::$DefaultDocOriNoPatterns[0], $x[$i], $matches);\n if (!empty($matches) && count($matches) > 3) {\n $extract->doc_ori_no = sprintf(\"%s(%s)%s号\", $matches[1], $matches[2], $matches[3]);\n break;\n }\n }\n }\n }\n\n if ($useRawContent) {\n $content = trim(implode(\"\", array_filter($extract->text)));\n } else {\n $content = $extract->getContent();\n }\n\n $c = preg_replace(\"/[\\s\\x{3000}]+/u\", \"\", $content);\n $record = new XlegalLawContentRecord();\n $record->doc_id = md5($c);\n $record->title = !empty($extract->title) ? $extract->title : $extract->guessTitle();\n $record->author = $extract->author;\n $record->content = $content;\n $record->doc_ori_no = $extract->doc_ori_no;\n $record->publish_time = $extract->publish_time;\n $record->t_valid = $extract->t_valid;\n $record->t_invalid = $extract->t_invalid;\n $record->negs = implode(\",\", $extract->negs);\n $record->tags = $extract->tags;\n if (!empty($extract->attachments)) {\n $record->attachment = json_encode($extract->attachments, JSON_UNESCAPED_UNICODE);\n }\n\n if (empty(gsettings()->debug)) {\n $res = FlaskRestClient::GetInstance()->simHash($c);\n\n $simhash = '';\n if (isset($res['simhash']) && !empty($res['simhash'])) {\n $simhash = $res['simhash'];\n }\n\n if (isset($res['repeated']) && !empty($res['repeated'])) {\n echo 'data repeated: ' . $file . ', repeated simhash: ' . $res['simhash1'] .PHP_EOL;\n }\n\n $record->type = DaoSpiderlLawBase::TYPE_TXT;\n $record->status = 1;\n $record->url = trim($extract->baseurl);\n $record->url_md5 = md5($extract->url);\n $record->simhash = $simhash;\n }\n\n if (false) {\n echo implode(\"\", $extract->text) . PHP_EOL;\n var_dump($record);\n return false;\n }\n\n DaoXlegalLawContentRecord::getInstance()->update($id, json_decode(json_encode($record, JSON_UNESCAPED_UNICODE), true));\n }\n }\n}", "title": "" }, { "docid": "48e3ca63d98a5363411445778ee45830", "score": "0.47114512", "text": "function caldera_forms_get_release_series(){\n\treturn substr( CFCORE_VER, 2, 1 );\n}", "title": "" }, { "docid": "b233c66774b826925485595b6eacf4b7", "score": "0.47102472", "text": "function sysinfo() {\n \n $this->parser = new Parser();\n $this->parser->df_param = 'Pl';\n \n $list = parse_ini_file(APP_ROOT . \"/\" . $this->inifile, true);\n if (!$list) {\n return;\n }\n foreach ($list as $section => $distribution) {\n if (!isset($distribution[\"Files\"])) {\n continue;\n } else {\n foreach (explode(\";\", $distribution[\"Files\"]) as $filename) {\n if (file_exists($filename)) {\n $buf = rfts( $filename );\n $this->icon = isset($distribution[\"Image\"]) ? $distribution[\"Image\"] : $this->icon;\n $this->distro = isset($distribution[\"Name\"]) ? $distribution[\"Name\"] . \" \" . trim($buf) : trim($buf);\n\t $this->distroname = $section;\n break 2;\n }\n }\n }\n }\n }", "title": "" }, { "docid": "42246aba5e0ad8a82ca94a1c8218bc87", "score": "0.47097498", "text": "public function getSitemapNews(){\n if (!$data = $this->_cache->load('newscached')) {\n $news = $this->getAdapter();\n $select = $news->select()\n ->from($this->_name,array('id','title','updated'))\n ->where('golive <= CURDATE()')\n ->order('id DESC');\n $data = $news->fetchAll($select);\n $this->_cache->save($data, 'newscached');\n }\n return $data;\n }", "title": "" }, { "docid": "1121520f327bd84c972d9de3969f6322", "score": "0.47087982", "text": "function get_forecast($system, $epiweek) {\n global $dbh;\n // get the data from the database\n $system = mysqli_real_escape_string($dbh, $system);\n $query = \"SELECT `system`, `epiweek`, `json` FROM `forecasts` WHERE `system` = '{$system}' AND `epiweek` = {$epiweek}\";\n $epidata = array();\n $fields_string = array('system', 'json');\n $fields_int = array('epiweek');\n execute_query($query, $epidata, $fields_string, $fields_int, null);\n // parse forecast data\n if(count($epidata) === 1 && array_key_exists('json', $epidata[0])) {\n $epidata[0]['forecast'] = json_decode($epidata[0]['json']);\n unset($epidata[0]['json']);\n }\n // return the data\n return count($epidata) === 0 ? null : $epidata;\n}", "title": "" }, { "docid": "4a0d7072ed9403769a50fa88ecf456a3", "score": "0.47064635", "text": "function get_doi_metadata_unixref($doi)\n{\n\tglobal $config;\n\t\n\t$data = array();\n\t\n\t$url = 'http://www.crossref.org/[email protected]&rft_id=info:doi/' . $doi . '&noredirect=true&format=unixref';\n\t\n\t$xml = get($url);\n\t\n\t//echo $xml;\n\t\n\t//exit();\n\t\n\t\t\t\n\tif (preg_match('/<doi_record/', $xml))\n\t{\t\t\n\t\t$dom= new DOMDocument;\n\t\t$dom->loadXML($xml);\n\t\t$xpath = new DOMXPath($dom);\n\n\t\t// Springer Kew Bulletin has article numbers\n\t\t$xpath_query = '//publisher_item/item_number[@item_number_type=\"article-number\"]';\n\t\t$nodeCollection = $xpath->query ($xpath_query);\n\t\t\n\t\tforeach($nodeCollection as $node)\n\t\t{\n\t\t\t$data['article_number'] = $node->firstChild->nodeValue;\n\t\t}\n\t\n\t}\n\t\n\treturn $data;\n}", "title": "" }, { "docid": "787a1f1ac50efc02dea39045a26dcc06", "score": "0.47028267", "text": "function get_sun_times() {\n\t$times_string = file_get_contents('/home/wind/import/sonnenzeit');\n\t// format is \" Sonne am 4.10. :\\t05.13\\t16.38\\tUTC \\n\"\n\t$ts = explode(':', $times_string);\n\t//$date = explode('.', $ts[0]);\n\t$ts = explode(\"\\t\", $ts[1]);\n\t$sun_times = array(\n\t\t'sunrise' => str_replace('.', ':', trim($ts[1])) . ':00 ' . ' UTC',\n\t\t'sunset' => str_replace('.', ':', trim($ts[2])) . ':00 ' . ' UTC'\n\t);\n\treturn $sun_times;\n}", "title": "" }, { "docid": "6a991a145c2da81c5950da60abc0cfa8", "score": "0.46979588", "text": "public function get_newrecords_bymonth()\n\t{\n\t\t$currentyear = date(\"Y\");\n\t\treturn $this->db->select('count(*) as total, concat(datestamp_month,\"/\",datestamp_year) as \"monthadded\"', FALSE)\n\t\t\t\t\t\t->from('eprint')\n\t\t\t\t\t\t->where('eprint_status', 'archive')\n\t\t\t\t\t\t->where('datestamp_year', \"$currentyear\")\n\t\t\t\t\t\t->group_by('datestamp_month with rollup')\n\t\t\t\t\t\t->get()\n ->result();\n\t}", "title": "" }, { "docid": "b268de8fb6c557b3e0b2c455204a1d42", "score": "0.46954", "text": "function getForeignMintDates() {\n global $FOREIGN_MINT_DATES_SQL;\n \n $SQL = $FOREIGN_MINT_DATES_SQL;\n $result = mysql_query($SQL);\n \n print $SQL;\n $mints = array();\n if (mysql_num_rows($result) == 0) {\n return $mints;\n }\n\n while($row = mysql_fetch_array($result)) {\n \n $info = array();\n \n $id = $row['mdid']; \n $mid = $row['mid'];\n $mint = $row['mint'];\n $startYear = $row['startYear'];\n $endYear = $row['endYear'];\n $abbreviation = $row['abbreviation'];\n \n $info['id'] = $id;\n $info['mid'] = $mid;\n $info['mint'] = $mint;\n $info['startYear'] = $startYear; \n $info['endYear'] = $endYear;\n $info['abbreviation'] = $abbreviation;\n\n array_push($mints, $info);\n }\n \n return $mints;\n\n}", "title": "" }, { "docid": "de7c5206551c061ff9791d1f904e5349", "score": "0.4690103", "text": "function getHistoryInfo(){\n include_once('thirdparty/simple_html_dom.php');\n $url = \"http://www.todayonhistory.com/\";\n try{\n $html_analysis = file_get_html($url);\n if(!isset($html_analysis)){\n $html_analysis->clear();\n return \"获取失败,请联系开发人员\";\n }else{\n $contentStr = \"历史上的:\".date(\"m\").\"月\".date(\"d\").\"日:\\n\";\n foreach($html_analysis->find('div[class=\"main\"] ul[class=\"list clearfix\"] li') as $item){\n $contentStr .= str_replace(date(\"m\").\"月\".date(\"d\").\"日\",\"\",$item->plaintext).\"\\n\";\n if(strlen($contentStr) > 2000){ break;}\n }\n $html_analysis->clear();\n return trim($contentStr);\n }\n }catch (Exception $e){\n return $e->getMessage();\n }\n}", "title": "" }, { "docid": "bbf18cbd07ebf51efe7d4727e0dc25c1", "score": "0.46897122", "text": "private function get_detailed_info($source) {\n\t\t\t$movie_detailed_info_regexp = '/(<dt>|<dd>)(.*?)(<\\/dt>|<\\/dd>)/is';\n\t\t\tpreg_match_all($movie_detailed_info_regexp, $source, $matches);\n\t\t\t\n\t\t\treturn $this->generate_detailed_info_array($matches[2]);\n\t\t}", "title": "" }, { "docid": "02dc47a2fec5694750c6ba80b26e9257", "score": "0.46885955", "text": "function getComingSoon() {\n // create our database object\n $db = JFactory::getDbo();\n // create our SQL query\n $query = \"SELECT * FROM #__osadp_release_schedule WHERE published = 1 AND available = 0 ORDER BY date DESC\";\n // query the database\n $db->setQuery( $query );\n // return our result\n return $db->loadObjectList();\n }", "title": "" }, { "docid": "0ac970cff8a2efe4d45cc22e0be35ef6", "score": "0.4687916", "text": "function getCalendarData($month = 05,$year = 2018 )\t{\n\n//Create a timestamp based on the parameters for getCalendarData\n$ts = mktime(0,0,0,$month,1,$year);\n$calendarData = array();\n//We have to set the counter to 1 and not zero because calendar days start at 1.\n$counter = 1;\n\n//Important Days\n//First Day of the Month\n$firstDay = (int)date('w', $ts);\n//Last Day of the Month\n$lastDay = cal_days_in_month(CAL_GREGORIAN, $month, $year);\n\t//Iterate through the grid (7 x 5)\n\t//For each row\n\t//For each column\n\t//Start counting the days if the $counter is greater than the first day, \n\t//continue on until the counter is less than or equal to the last day + the first day \n\t//(which would mean the number of days in the month has been reached.)\n\n\n\t// get the first day and last day \n\t// if not inside first day and last day, put null \n\t\t// Iterate grid (6 x 7)\n\t\t// if(counter > firstday && counter <= lastday + firstDay){\n\t\t// \tcalendarData[] = counter - firstDay \n\t\t// } else {\n\t\t// \tcalendarData[] = null;\n\t\t// }\n\t\t// counter++;\n\n\n\t//Append the current month and year to the array\n\t$calendarData[\"month\"] = date('F',$ts);\n\t$calendarData[\"year\"] = date('Y',$ts);\n\tvar_dump($calendarData);\n\t\n\treturn $calendarData;\n}", "title": "" }, { "docid": "43aa9c9c736fe6897c66807144847460", "score": "0.46840277", "text": "function getForecasts() {\r\n\r\n\t\t$forecasts = $this->_xml[\"forexml\"][\"#\"][\"forecast\"];\r\n\r\n\t\t$returnArray = array();\r\n\r\n\t\t$i = 0;\r\n\r\n\t\tforeach ($forecasts as $forecast) {\r\n\t\t\t$returnArray[$i] = $forecast[\"@\"];\r\n\t\t\t$i++;\r\n\t\t}\r\n\r\n\t\treturn $returnArray;\r\n\r\n\t}", "title": "" }, { "docid": "25ba5e0ea10196168ee15ca25daf6def", "score": "0.4672447", "text": "public function getOrderYearOld()\n\t{\n\t\t$sql = \"SELECT * FROM orders WHERE paid_status = ?\";\n\t\t$query = $this->db->query($sql, array(1));\n\t\t$result = $query->result_array();\n\t\t\n\t\t$return_data = array();\n\t\tforeach ($result as $k => $v) {\n\t\t\t$date = date('Y', $v['date_time']);\n\t\t\t$return_data[] = $date;\n\t\t}\n\n\t\t$return_data = array_unique($return_data);\n\n\t\treturn $return_data;\n\t}", "title": "" }, { "docid": "9eae6b254a791b21ac7ff7907952643d", "score": "0.4672364", "text": "private function fetchData()\n {\n global $conf, $db;\n\n // We display the last 3 years\n $yearofbegindate = date('Y', dol_time_plus_duree(time(), -3, \"y\"));\n\n // breakdown by quarter\n $sql = \"SELECT DATE_FORMAT(p.datep,'%Y') as annee, DATE_FORMAT(p.datep,'%m') as mois, SUM(fd.total_ht) as Mnttot\";\n $sql .= \" FROM \" . MAIN_DB_PREFIX . \"facture as f, \" . MAIN_DB_PREFIX . \"facturedet as fd\";\n $sql .= \" , \" . MAIN_DB_PREFIX . \"paiement as p,\" . MAIN_DB_PREFIX . \"paiement_facture as pf\";\n $sql .= \" WHERE f.entity = \" . $conf->entity;\n $sql .= \" AND f.rowid = fd.fk_facture\";\n $sql .= \" AND pf.fk_facture = f.rowid\";\n $sql .= \" AND pf.fk_paiement= p.rowid\";\n $sql .= \" AND fd.product_type=\" . $this->product_type;\n $sql .= \" AND p.datep >= '\" . $db->idate(dol_get_first_day($yearofbegindate)) . \"'\";\n $sql .= \" GROUP BY annee, mois \";\n $sql .= \" ORDER BY annee, mois \";\n\n $result = $db->query($sql);\n\n while ($objp = $db->fetch_object($result)) {\n if (!isset($this->data[$objp->annee])) {\n $this->data[$objp->annee] = array(\n 'trim1' => 0,\n 'trim2' => 0,\n 'trim3' => 0,\n 'trim4' => 0,\n );\n }\n $this->data[$objp->annee]['trim' . $this->getMonthTrim($objp->mois)] += $objp->Mnttot;\n }\n\n if (!isset($this->data[date('Y')])) {\n $this->data[date('Y')] = [\n 'trim1' => 0,\n 'trim2' => 0,\n 'trim3' => 0,\n 'trim4' => 0,\n ];\n }\n \n }", "title": "" }, { "docid": "f68fa9ea13191190e425cd6dae2e5290", "score": "0.46693626", "text": "protected function collecter_info_marees() {\r\n }", "title": "" }, { "docid": "1dd37a41f96c886a3891f183f52ff904", "score": "0.4666995", "text": "public function preUpgrade()\n {\n $metadataDaos = array(MidasLoader::loadModel('Metadata')->getMetadata(MIDAS_METADATA_TEXT, \"mrbextrator\", \"category\")\n , MidasLoader::loadModel('Metadata')->getMetadata(MIDAS_METADATA_TEXT, \"tmp\", \"category\"));\n \n $db = Zend_Registry::get('dbAdapter');\n $prefix = \"zzz\";\n \n foreach($metadataDaos as $metadataDao)\n {\n if(!$metadataDao) continue;\n $results = $db->query(\"SELECT metadatavalue_id, value, itemrevision_id FROM metadatavalue WHERE metadata_id='\".$metadataDao->getKey().\"' order by value ASC\")\n ->fetchAll();\n foreach($results as $result)\n {\n if(strpos($result['value'], $prefix) !== false)\n {\n continue; // Means it is already the news format\n }\n $newValue = $prefix.trim($result['value']).$prefix;\n $id = $result['metadatavalue_id'];\n $revisionId = $result['itemrevision_id'];\n \n if(!is_numeric($id))\n {\n throw new Zend_Exception(\"Error metadatavalue_id\");\n }\n $db->query(\"UPDATE metadatavalue SET value = '\".mysql_real_escape_string($newValue).\"' WHERE metadatavalue_id='\".$id.\"'\");\n \n $revision = MidasLoader::loadModel(\"ItemRevision\")->load($revisionId);\n if($revision)\n {\n MidasLoader::loadModel(\"Item\")->save($revision->getItem()); // for solr update\n } \n } \n }\n }", "title": "" } ]
005fc6a09c09b750237b7282b7c35727
Starts oAuth authentication if needed, returns valid token
[ { "docid": "2e3e323cda4ae0d7b3379209dbe08669", "score": "0.0", "text": "private function getAuthenticationToken(): string\n\t{\n\t\t$accessTokenFile = $this->getRootPath() . $this->accessTokenFile;\n\n\t\t$tokens = true === file_exists($accessTokenFile)\n\t\t\t? json_decode(json_decode(file_get_contents($accessTokenFile), true), true)\n\t\t\t: null;\n\n\t\t[,$payload,] = [\n\t\t\t...explode('.', $tokens['access_token'] ?? ''),\n\t\t\t'',\n\t\t\t''\n\t\t];\n\t\t$decodedToken = json_decode(base64_decode($payload), true);\n\n\t\tif (true === empty($decodedToken))\n\t\t{\n\t\t\t$this->startAuthenticationHandshake();\n\t\t}\n\n\t\tif (($decodedToken['exp'] ?? 0) - self::TOKEN_SAFE_OFFSET < time())\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$tokens = $this->refreshTokens($tokens['refresh_token'] ?? '');\n\t\t\t}\n\t\t\tcatch (\\Exception $exception)\n\t\t\t{\n\t\t\t\techo 'Could not refresh tokens, deleting tokens: ' . $exception->getMessage(), PHP_EOL;\n\t\t\t\tunlink($accessTokenFile);\n\t\t\t}\n\t\t}\n\t\treturn $tokens['access_token'];\n\t}", "title": "" } ]
[ { "docid": "5097d4403da1121c52f8c522ca3920b7", "score": "0.685641", "text": "public function authenticate() {\n $this->token = $this->client->getLongLivedAccessToken($this->client->getAccessToken('authorization_code',\n ['code' => $_GET['code']]));\n }", "title": "" }, { "docid": "3f84864c6ba6906142baa8bf08afc449", "score": "0.68232214", "text": "function requestAuth(){\n\t\t$consumer = new Zend_Oauth_Consumer($this->config);\n\t\tsession_start();\n\t\t\t/*\n\t\t\t * Check for already authenticated and\n\t\t\t * app has TWITTER ACCESS TOKEN\n\t\t\t */\n\t\tif (!$_SESSION['TWITTER_ACCESS_TOKEN'] || !isset($this->access_token)) {\n\t\t\t/*\n\t\t\t * Redirect to twitter API with REQUEST TOKEN\n\t\t\t */\n\t\t $token = $consumer->getRequestToken();\n\t\t $_SESSION['TWITTER_REQUEST_TOKEN'] = serialize($token);\n\t\t $consumer->redirect();\n\t\t}else{\n\t\t\treturn true;\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "e63df613c050b0b8cd76d83309400cbb", "score": "0.67922485", "text": "public function auth()\n {\n $authed = $this->isAuthenticated();\n if ($authed) return $authed;\n\n $cl = new GuzzleClient();\n\n $res = $cl->request(\n MSGMailerTransportConfig::METHOD,\n $this->getTokenRequestUri(),\n [\n 'form_params' => $this->payload(),\n 'headers' => [\n 'Accept' => 'application/json',\n 'Content-Type' => MSGMailerTransportConfig::CONTENT_TYPE\n ]\n ],\n );\n\n $status_code = $res->getStatusCode();\n\n if (!$status_code == 200) $this->handleErrorCodes($status_code);\n\n $content = json_decode($res->getBody(), true);\n\n ['token_type' => $tokenType, 'expires_in' => $expires_in, 'ext_expires_in' => $ext_expires_in, 'access_token' => $access_token] = $content;\n\n $this->setNextExpiration(Carbon::now(), $expires_in, $access_token);\n\n return $access_token;\n }", "title": "" }, { "docid": "8fac2c6dacd1369d7e0a0e5c4421bc37", "score": "0.67663807", "text": "function fetchAccessToken() {\n\t\t$url = $this->mwOAuthUrl . '/token';\n\t\t$url .= strpos( $url, '?' ) ? '&' : '?';\n\t\t$url .= http_build_query( [\n\t\t\t'format' => 'json',\n\t\t\t'oauth_verifier' => $_GET['oauth_verifier'],\n\n\t\t\t// OAuth information\n\t\t\t'oauth_consumer_key' => $this->gConsumerKey,\n\t\t\t'oauth_token' => $this->gTokenKey,\n\t\t\t'oauth_version' => '1.0',\n\t\t\t'oauth_nonce' => md5( microtime() . mt_rand() ),\n\t\t\t'oauth_timestamp' => time(),\n\n\t\t\t// We're using secret key signatures here.\n\t\t\t'oauth_signature_method' => 'HMAC-SHA1',\n\t\t] );\n\t\t$this->signature = $this->sign_request( 'GET', $url );\n\t\t$url .= \"&oauth_signature=\" . urlencode( $this->signature );\n\t\t$ch = curl_init();\n\t\tcurl_setopt( $ch, CURLOPT_URL, $url );\n\t\t//curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );\n\t\tcurl_setopt( $ch, CURLOPT_USERAGENT, $this->gUserAgent );\n\t\tcurl_setopt( $ch, CURLOPT_HEADER, 0 );\n\t\tcurl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );\n\t\t$data = curl_exec( $ch );\n\n\t\tif ( isset ( $_REQUEST['test'] ) ) {\n\t\t\tprint \"<h1>LOGIN</h1><pre>\" ; print_r ( $data ) ; print \"</pre></hr>\" ;\n\t\t}\n\n\t\tif ( !$data ) {\n//\t\t\theader( \"HTTP/1.1 500 Internal Server Error\" );\n\t\t\techo 'Curl error: ' . htmlspecialchars( curl_error( $ch ) );\n\t\t\texit(0);\n\t\t}\n\t\tcurl_close( $ch );\n\t\t$token = json_decode( $data );\n\t\tif ( is_object( $token ) && isset( $token->error ) ) {\n//\t\t\theader( \"HTTP/1.1 500 Internal Server Error\" );\n\t\t\techo 'Error retrieving token: ' . htmlspecialchars( $token->error );\n\t\t\texit(0);\n\t\t}\n\t\tif ( !is_object( $token ) || !isset( $token->key ) || !isset( $token->secret ) ) {\n//\t\t\theader( \"HTTP/1.1 500 Internal Server Error\" );\n\t\t\techo 'Invalid response from token request';\n\t\t\texit(0);\n\t\t}\n\n\t\t// Save the access token\n\t\tsession_start();\n\t\t$_SESSION['tokenKey'] = $this->gTokenKey = $token->key;\n\t\t$_SESSION['tokenSecret'] = $this->gTokenSecret = $token->secret;\n\t\tif ( $this->use_cookies ) {\n\t\t\t$t = time()+60*60*24*30 ; // expires in one month\n\t\t\tsetcookie ( 'tokenKey' , $_SESSION['tokenKey'] , $t , '/'.$this->tool.'/' ) ;\n\t\t\tsetcookie ( 'tokenSecret' , $_SESSION['tokenSecret'] , $t , '/'.$this->tool.'/' ) ;\n\t\t}\n\t\tsession_write_close();\n\t}", "title": "" }, { "docid": "eb2eaf811b0fad3b9ea083cc338ee763", "score": "0.67005014", "text": "public function request_token() {\r\n global $CFG;\r\n $this->sign_secret = $this->consumer_secret.'&';\r\n $params = $this->prepare_oauth_parameters($this->request_token_api, array(), 'GET');\r\n $url = $this->request_token_api;\r\n if (!empty($params)) {\r\n $url .= (stripos($url, '?') !== false) ? '&' : '?';\r\n $url .= http_build_query($params, '', '&');\r\n }\r\n return redirect($url);\r\n }", "title": "" }, { "docid": "d146bacee19b58e80dd017b131b62182", "score": "0.65432817", "text": "private function authenticate() {\n if ($this->header_token) {\n\n $authorization = explode(':', $this->header_token[0]);\n\n if ($authorization[0] === 'PROVIDER_TOKEN') {\n\n $sql = $this->db->prepare('SELECT access_token FROM provider WHERE access_token = \"' . $authorization[1] . '\"');\n $sql->execute();\n $result = $sql->fetch();\n\n } elseif ($authorization[0] === 'CLIENT_TOKEN') {\n\n $sql = $this->db->prepare('SELECT access_token FROM client WHERE access_token = \"' . $authorization[1] . '\"');\n $sql->execute();\n $result = $sql->fetch();\n\n } else {\n return false;\n }\n\n\n if (!empty($result['access_token'])) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "6031e8feef31971b695bd088ec694262", "score": "0.6519956", "text": "private function getToken()\n {\n $path = '/api/oauth/token';\n\n $headers = array(\n 'Content-Type: application/x-www-form-urlencoded',\n 'Authorization: Basic ' . base64_encode(self::$client_id . ':' . self::$client_secret));\n $data = array(\n 'grant_type' => 'client_credentials',\n );\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, self::$main_url . $path);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // Ignore Verify SSL Certificate\n curl_setopt_array($ch, array(\n CURLOPT_POST => true,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_HTTPHEADER => $headers,\n CURLOPT_POSTFIELDS => http_build_query($data),\n ));\n $output = curl_exec($ch);\n curl_close($ch);\n\n $result = json_decode($output, true);\n self::$access_token = $result['access_token'];\n }", "title": "" }, { "docid": "fb4f9f6b9fd452f1f4370af6fb686ff4", "score": "0.6490652", "text": "function authorize() {\n\t\t$token = NULL;\n\t\t$authorized = empty($_GET['oauth_token']) ? false : true;\n\t\t$url = $authorized ? $this->_auth_access_token_url : $this->_auth_request_url;\n\t\t\n\t\tif ($authorized === true) {\n\t\t\t$token_cache = $this->scope->cache->get($this->_auth_cache_key);\n\t\t\tif (!empty($token_cache) && is_array($token_cache)) {\n\t\t\t\t$token = new OAuth_Token($token_cache['oauth_token'], $token_cache['oauth_token_secret']);\n\t\t\t} else {\n\t\t\t\tthrow new RuntimeException('Not found a valid Request_Token data.');\n\t\t\t}\n\t\t}\n\t\t\n\t\t$instance = $this->initialize($url, NULL, WebClient::HTTP_METHOD_POST, $token);\n\t\t\n\t\t$sResult = $this->scope->http->curl($instance->toUrl(), true, $instance->toPostdata(), array(\n\t\t\t$instance->toHeader()\n\t\t));\n\t\t$dResult = $this->tokenParser($sResult);\n\t\t\n\t\t$this->scope->cache->set($this->_auth_cache_key, $dResult, 0, 'Photobucket Api cache data.');\n\t\t\n\t\tif ($authorized === false) {\n\t\t\t$authorize_url = $this->_authorize_url . '?oauth_token=' . OAuth_Utils::urlencodeRFC3986($dResult['oauth_token']);\n\t\t\t$authorize_url .= '&oauth_callback=' . OAuth_Utils::urlencodeRFC3986(empty($this->_auth_callback) ? $this->getCallbackUri() : $this->_auth_callback);\n\t\t\t\n\t\t\theader('Location: ' . $authorize_url);\n\t\t} else {\n\t\t\tswitch ($this->scope->dataBridge->gets('status')) {\n\t\t\t\tcase 'ready' :\n\t\t\t\t\theader('Location: ' . $this->_auth_success_url);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'denied' :\n\t\t\t\t\texit('The request token is not signed because the End-User denied access to their account on the Authorization page.');\n\t\t\t\tcase 'canceled' :\n\t\t\t\t\texit('The request token is not signed because the End-User canceled the login process on the Login page.');\n\t\t\t}\n\t\t}\n\t\texit(0);\n\t}", "title": "" }, { "docid": "c90c6719e505dcdbe8f459bfc143aa16", "score": "0.64810234", "text": "private function _requestAndVerifyRequestToken() {\n\n if (!$this->user_id) {\n // create a temp user and make a cookie for his record\n $this->user_id = self::_createTempUser();\n setcookie(TP_COOKIE_NAME, $this->sessionId());\n }\n\n // At this point, we shouldn't have anything in the DB with a record of this transaction.\n // Set up the required parameters to recognize an OAuth provider -- known in this OAuthPHP lib as\n // a record in the oauth_consumer_registry table.\n\n $server = array(\n 'consumer_key' => TP_CONSUMER_KEY,\n 'consumer_secret' => TP_CONSUMER_SECRET,\n 'server_uri' => TP_API_BASE,\n 'signature_methods' => array('PLAINTEXT'),\n 'request_token_uri' => $this->getApiEndpoint('oauthRequestTokenUrl'),\n 'authorize_uri' => $this->getApiEndpoint('oauthAuthorizationUrl'),\n 'access_token_uri' => $this->getApiEndpoint('oauthAccessTokenUrl')\n );\n\n // See which known services exist for this user\n $servers = $this->store->listServers('', $this->user_id);\n\n // Refresh the known OAuth providers for this user by deleting them if they already exist...\n foreach ($servers as $server_item) {\n if (($server_item['consumer_key'] == TP_CONSUMER_KEY) &&\n ($server_item['user_id'] == $this->user_id)) {\n $this->store->deleteServer(TP_CONSUMER_KEY, $this->user_id);\n }\n }\n\n // otherwise, create a new record of this OAuth provider.\n $consumer_key = $this->store->updateServer($server, $this->user_id);\n\n $r = $this->store->getServer(TP_CONSUMER_KEY, $this->user_id);\n\n // This creates a generic Request object, so we'll have to fill in the rest...\n $oauth = new OAuthRequester($this->getApiEndpoint('oauthRequestTokenUrl'), '', '');\n $oauth->setParam('oauth_callback', TP_RETURN_URL);\n\n // ..and this adds more parameters, like the timestamp, nonce, version, signature method, etc\n $oauth->sign($this->user_id, $r);\n\n // Begin to build the URL string with the request token endpoint\n $final_url = $this->getApiEndpoint('oauthRequestTokenUrl') . \"?\";\n\n $parameters = array('timestamp', 'callback', 'nonce', 'consumer_key',\n 'version', 'signature_method', 'signature');\n\n foreach ($parameters as $parm) {\n $final_url .= 'oauth_' . $parm . '=' . $oauth->getParam('oauth_' . $parm) . '&';\n }\n\n /* Now execute the long query that may look something like this:\n\n https://www.typepad.com/secure/services/oauth/request_token ?\n oauth_signature=n3lQROBcPnBZvEgplUzHcgkUCrA%3D &\n oauth_timestamp=1269811986 &\n oauth_callback=http%3A%2F%2F127.0.0.1%3A5000%2Flogin-callback &\n oauth_nonce=853433351 &\n oauth_consumer_key=c5139cef2985b86d &\n oauth_version=1.0 &\n oauth_signature_method=HMAC-SHA1\n */\n\n // and go ahead and execute the request.\n $request = new HttpRequest('GET', $final_url);\n TypePad::setCurlopts($request);\n $doc = $request->getResponse()->getContent();\n $response_array = explode(\"&\", $doc);\n\n // TODO: Verbose error handling\n\n // Store the results!\n $response = array();\n foreach ($response_array as $response_str) {\n $pair = explode(\"=\", $response_str);\n $response[$pair[0]] = $pair[1];\n }\n\n // Instead of storing the Request token as a cookie, write it to the db.\n $this->store->addServerToken(TP_CONSUMER_KEY, 'request', $response['oauth_token'],\n $response['oauth_token_secret'], $this->user_id, '');\n\n $this->oauth_token = $response['oauth_token'];\n }", "title": "" }, { "docid": "c56da5a562c6329fbb81dff5a8997acd", "score": "0.6461905", "text": "public function auth() {\n $parameters = new \\StdClass();\n $parameters->client_id = $this->client_id;\n $parameters->client_secret = $this->client_secret;\n \n $response = $this->decodeResponse(\n $this->rawCall(\n 'POST',\n '/auth',\n $parameters,\n false\n )\n );\n \n $this->token = $response[\"token\"];\n \n return $response;\n }", "title": "" }, { "docid": "cfea6d25cbee022215013d9545c590dd", "score": "0.64534116", "text": "static public function requestToken()\n {\n if (Validation::validate(['code' => ['require', 33]]))\n {\n $foo['grant_type'] = 'authorization_code';\n $foo['code'] = $_GET['code'];\n $foo['redirect_uri'] = Foo::root() . 'requestToken';\n $url = self::ZOOM_OAUTH_TOKEN;\n $res = json_decode(Foo::httpsCurl($url, $foo, Header::headerBasic()), true);\n return self::tokenResult(OauthToken::saveToken($res));\n } else {\n self::authorize();\n }\n }", "title": "" }, { "docid": "38c42af37a75a07c445dc7e7d843cf9a", "score": "0.64179385", "text": "public function auth() {\n if (isset($_REQUEST['token']))\n return Cryption::validateApiToken($_REQUEST['token']);\n\n return false;\n }", "title": "" }, { "docid": "e1684e6f1315d29663bf4dd8f0015145", "score": "0.6406742", "text": "public function get_auth_token()\n\t{\n\t\t// first check the cache\n\t\tif ( ! empty( $this->auth_token ) )\n\t\t{\n\t\t\treturn $this->auth_token;\n\t\t}\n\n\t\t$this->auth_token = wp_cache_get( 'auth_token', 'go-marketo' );\n\n\t\tif ( FALSE !== $this->auth_token )\n\t\t{\n\t\t\treturn $this->auth_token;\n\t\t}\n\n\t\t$response = wp_remote_get(\n\t\t\tgo_marketo()->config( 'endpoint' ) . '/identity/oauth/token?grant_type=client_credentials&client_id=' . $this->client_id . '&client_secret=' . $this->client_secret\n\t\t);\n\n\t\tif ( is_wp_error( $response ) || 200 != $response['response']['code'] )\n\t\t{\n\t\t\treturn NULL;\n\t\t}\n\n\t\t$body = json_decode( $response['body'] );\n\n\t\t$this->auth_token = $body->access_token;\n\n\t\t$expires_in = isset( $body->expires_in ) ? $body->expires_in : go_marketo()->config( 'auth_token_ttl' );\n\n\t\twp_cache_set( 'auth_token', $this->auth_token, 'go-marketo', $expires_in );\n\n\t\treturn $this->auth_token;\n\t}", "title": "" }, { "docid": "36682f34674c259ba609e5ceda8784cb", "score": "0.64028436", "text": "private function authenticate()\n {\n $permissions = ['grant_type' => 'client_credentials'];\n $headers = [\n 'Authorization: Basic ' . base64_encode($this->client_id . ':' . $this->client_secret),\n 'Content-Type: application/x-www-form-urlencoded'\n ];\n $session = $this->apiRequest('/v1/oauth2/token', $permissions, 'POST', $headers);\n $response = $session->response();\n\n $this->token = $response->access_token ?? null;\n\n if (empty($this->token) || $session->errors()) {\n throw new Exception('It was not possible to authenticate to the API. Verify that the credentials are correct.');\n }\n\n return $this->token;\n }", "title": "" }, { "docid": "56e30133d5d6ddd0ee95566582e12bec", "score": "0.6391884", "text": "protected function requestToken()\n {\n $requestUrl = $this->config->getAuthUrl() . \"/connect/token\";\n $headers = [ 'Content-Type' => 'application/x-www-form-urlencoded' ];\n $postData =\n \"grant_type=client_credentials\" .\n \"&client_id=\" .\n $this->config->getClientId() .\n \"&client_secret=\" .\n $this->config->getClientSecret();\n $response = $this->client->send(new Request('POST', $requestUrl, $headers, $postData));\n $result = json_decode($response->getBody()->getContents(), true);\n $this->config->setAccessToken($result[\"access_token\"]);\n }", "title": "" }, { "docid": "1f2b6e7e10072c180de94b0e3b8e407c", "score": "0.6384324", "text": "private static function oauth_get_access_token() {\n\t\tif ( ! current_user_can( 'manage_options' ) )\n\t\t\tdie( __( 'Cheatin&#8217; uh?' ) );\n\n\t\t$signature_method = new C2C_OAuthSignatureMethod_HMAC_SHA1();\n\n\t\t$params = array();\n\t\t$params['oauth_verifier'] = $_REQUEST['oauth_verifier'];\n\n\t\t$consumer = new C2C_OAuthConsumer( 'anonymous', 'anonymous', NULL );\n\n\t\t$user_id = get_current_user_id();\n\n\t\t$upgrade_token = new C2C_OAuthConsumer(\n\t\t\tget_user_meta( $user_id, self::$oa_anon_token_name, true ),\n\t\t\tget_user_meta( $user_id, self::$oa_anon_secret_name, true )\n\t\t);\n\n\t\t$request = C2C_OAuthRequest::from_consumer_and_token( $consumer, $upgrade_token, 'GET', self::oauth_url( 'access_token' ), $params );\n\n\t\t$request->sign_request( $signature_method, $consumer, $upgrade_token );\n\n\t\t$ch = self::curl_request( $request->to_url() );\n\n\t\t$oa_response = curl_exec( $ch );\n\n\t\tif ( curl_errno( $ch ) )\n\t\t\tself::error_redirect( curl_error( $ch ) );\n\n\t\tdelete_user_meta( $user_id, self::$oa_anon_token_name );\n\t\tdelete_user_meta( $user_id, self::$oa_anon_secret_name );\n\n\t\t$http_code = curl_getinfo( $ch, CURLINFO_HTTP_CODE );\n\n\t\tif ( $http_code == 200 ) {\n\t\t $access_params = wp_parse_args( $oa_response );\n\n\t\t update_user_meta( $user_id, self::$oa_token_name, $access_params['oauth_token'] );\n\t\t update_user_meta( $user_id, self::$oa_secret_name, $access_params['oauth_token_secret'] );\n\n\t\t\t// TODO: This needs to be handled generically\n//\t\t header( \"Location: \" . self::admin_url( array( 'info_message' => __( 'Authenticated!' ), 'edit' => 'dashboard_last_contacted#dashboard_last_contacted' ) ) );\n\t\t\theader( \"Location: \" . c2c_LastContactedAdmin::import_page_url() . '&info_message=' . __( 'Authenticated!' ) );\n\t\t} else {\n\t\t\tself::error_redirect( $oa_response );\n\t\t}\n\n\t\tdie('');\n\t}", "title": "" }, { "docid": "a9109910533081ee377c259a104ff46a", "score": "0.63730437", "text": "public function _auth() {\n\t\t// checking to the crypted pass\n\t\tif (strlen($this->inputData['pass']) > 10) $this->inputData['pass'] = Signature::decrypting($this->inputData['pass']);\n\t\t// authentification\n\t\t$ldap = new Ldap();\n\t\t$ldap->auth($this->inputData['login'], $this->inputData['pass']);\n\n\t\t// token generation if OU= special org only!\n\t\t$dn = $ldap->getDnByLogin($this->inputData['login'], true);\n\t\tif (empty($dn) || !is_array($dn)) return false;\n\t\tif (!preg_match(\"/\" . self::AUTH_ORG . \"/\", $dn[0])) return false;\n\t\t$token = Signature::encrypting(time() . \"=\" . $_SERVER['REMOTE_ADDR']);\n\n\t\treturn ['token' => $token];\n\t}", "title": "" }, { "docid": "741c274b07ba22128f4f4d46c3bc1011", "score": "0.6330766", "text": "protected function authenticate()\n {\n if (isset($this->authd->data->token->expires)) {\n \n $now = new \\DateTime();\n $expiry = new \\DateTime($this->authd->data->token->expires);\n // subtract one hour to make sure no chance of token expiring during testing;\n if ($now < $expiry) {\n return;\n }\n }\n \n $client = new RestClient($this->ApiConfig['Auth']['Url']);\n \n $data = array(\n 'credentials' => array(\n 'username' => $this->ApiConfig['User'],\n 'key' => $this->ApiConfig['Key'],\n ),\n );\n \n $client->setBody(json_encode($data));\n $client->setFormat('json');\n \n $response = $client->restPost(\n '/' . $this->ApiConfig['Auth']['Ver'] . '/auth', \n $data\n );\n \n $data = json_decode($response->getBody());\n if (isset($data->unauthorized)) {\n unset($this->authd->data);\n throw new \\RuntimeException($data->unauthorized->message, $data->unauthorized->code);\n }\n $this->authd->data = $data->auth;\n \n }", "title": "" }, { "docid": "a43151c95f4a44b6a18079a54c498563", "score": "0.6321414", "text": "private function getOauthToken()\n {\n $client = new Client();\n $response = $client->post($this->sso_endpoint . '/core/connect/token', [\n 'headers' => [\n 'Accept' => 'application/json',\n 'Authorization' => 'Basic ' . $this->auth,\n ],\n 'form_params' => [\n 'grant_type' => 'client_credentials',\n 'scope' => $this->scopes(true),\n ],\n ]);\n\n $this->setTokenFromResponse($response->getBody()->getContents());\n\n return $this->token;\n }", "title": "" }, { "docid": "06a8ccdcfd23109b1aac9d26aa6cb697", "score": "0.63087255", "text": "final protected function get_auth_token() {\r\n if (!isset($this->auth_token[0]))\r\n $this->auth_token = $this->request_auth_token($this->email, $this->password);\r\n return $this->auth_token;\r\n }", "title": "" }, { "docid": "394005eacc4d3ea8567fbf29caf37b49", "score": "0.62627596", "text": "protected function authenticate() {\n // Connect to the server and get an authtoken\n \n $requestParams = array(\n 'userName' => $this->username,\n 'password' => $this->password\n );\n \n $opts = array(\n 'ssl' => array(\n 'ciphers'=>\"SHA1\", // Need to explicitly set SHA1 cipher for some reason\n )\n );\n \n $scontext = stream_context_create($opts);\n $sclient = new CoSoapClient($this->serverUrl . \"/xWeb/Signon.asmx?WSDL\",\n array('stream_context' => $scontext,\n 'cache_wsdl' => WSDL_CACHE_NONE));\n \n $response = $sclient->Authenticate($requestParams);\n \n $this->token = $response->AuthenticateResult;\n \n if(!$this->token) {\n throw new RuntimeException('er.auth');\n }\n }", "title": "" }, { "docid": "74e46727e0ca034a01e806e258cde893", "score": "0.62429065", "text": "protected function authenticate()\n {\n ($config = \\Phork::config()->get('api')) && ($internal = $config->internal);\n\n if (empty($internal)) {\n if (!empty(\\Phork::instance()->auth)) {\n if (\\Phork::auth()->isTokenValid(\\Phork::router()->getVariable(static::URL_TOKEN))) {\n return \\Phork::auth()->isAuthenticated();\n } elseif (!empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_PW'])) {\n return \\Phork::auth()->standardAuth($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']);\n }\n }\n }\n }", "title": "" }, { "docid": "40ab105d3bb7663a70b618a57f79f0cf", "score": "0.6235502", "text": "public function checkAuth()\n\t{\n\t\t$incomingToken = \"\";\n\n\t\tif($this->authType == \"HEADER\")\n\t\t{\n\t\t\tif(isset($_SERVER[\"REMOTE_USER\"]) && strlen($_SERVER[\"REMOTE_USER\"]) > 0)\n\t\t\t\t$incomingToken = $_SERVER[\"REMOTE_USER\"];\n\t\t\telseif(isset($_SERVER[\"REDIRECT_REMOTE_USER\"]) && strlen($_SERVER[\"REDIRECT_REMOTE_USER\"]) > 0)\n\t\t\t\t$incomingToken = $_SERVER[\"REDIRECT_REMOTE_USER\"];\n\t\t\telseif(isset($_SERVER[\"HTTP_AUTHORIZATION\"]) && strlen($_SERVER[\"HTTP_AUTHORIZATION\"]) > 0)\n\t\t\t\t$incomingToken = $_SERVER[\"HTTP_AUTHORIZATION\"];\n\t\t}\n\t\telseif($this->authType == \"URL\")\n\t\t{\n\t\t\tif(isset($_REQUEST[\"auth-token\"]) && strlen($_REQUEST[\"auth-token\"]) > 0)\n\t\t\t\t$incomingToken = $_REQUEST[\"auth-token\"];\n\t\t}\n\n\t\tif($incomingToken == \"\" && intval($_SERVER[\"argc\"]) > 0)\n\t\t{\n\t\t\tforeach ($_SERVER[\"argv\"] as $arg)\n\t\t\t{\n\t\t\t\t$e = explode(\"=\", $arg);\n\n\t\t\t\tif(count($e) == 2 && $e[0] == \"auth-token\")\n\t\t\t\t\t$incomingToken = $e[1];\n\t\t\t}\n\t\t}\n\n\t\treturn strlen($incomingToken) > 0 && $incomingToken == $this->yandexToken;\n\t}", "title": "" }, { "docid": "b894f6bb5aea830c9b175fd340094efd", "score": "0.6222907", "text": "private static function oauth_get_request_token() {\n\t\t$user_id = get_current_user_id();\n\n\t\tdelete_user_meta( $user_id, self::$oa_anon_token_name );\n\t\tdelete_user_meta( $user_id, self::$oa_anon_secret_name );\n\n\t\t$signature_method = new C2C_OAuthSignatureMethod_HMAC_SHA1();\n\n\t\t// TODO: The 'edit' and displayname should both be configured externally\n\t\t$params = array();\n\t\t$params['oauth_callback'] = c2c_LastContactedAdmin::import_page_url() . '&oauth_return=true';\n\t\t//self::admin_url( array( 'oauth_return' => 'true', 'edit' => 'dashboard_last_contacted#dashboard_last_contacted' ) );\n\t\t// TODO: Add filter to the scope\n\t\t$params['scope'] = c2c_GoogleContacts::$contacts_url; // Space seperated list of applications to be made accessible\n\t\t$params['xoauth_displayname'] = 'Last Contacted plugin for WordPress by coffee2code';\n\n\t\t$consumer = new C2C_OAuthConsumer( 'anonymous', 'anonymous', NULL );\n\t\t$request = C2C_OAuthRequest::from_consumer_and_token( $consumer, NULL, 'GET', self::oauth_url( 'request_token' ), $params );\n\t\t$request->sign_request( $signature_method, $consumer, NULL );\n\n\t\t$ch = self::curl_request( $request->to_url() );\n\n\t\t$oa_response = curl_exec( $ch );\n\n\t\tif ( curl_errno( $ch ) )\n\t\t\tself::error_redirect( curl_error( $ch ) );\n\n\t\t$http_code = curl_getinfo( $ch, CURLINFO_HTTP_CODE );\n\n\t\tif ( $http_code == 200 ) {\n\t\t\t$access_params = wp_parse_args( $oa_response );\n\n\t\t\tupdate_user_meta( $user_id, self::$oa_anon_token_name, $access_params['oauth_token'] );\n\t\t\tupdate_user_meta( $user_id, self::$oa_anon_secret_name, $access_params['oauth_token_secret'] );\n\n\t\t\t$url = self::oauth_url( 'authorize_token' ) . '?' . build_query( array( 'oauth_token' => $access_params['oauth_token'] ) );\n\t\t\theader( 'Location: ' . $url );\n\t\t} else {\n\t\t\tself::error_redirect( $oa_response );\n\t\t}\n\n\t\tdie('');\n\t}", "title": "" }, { "docid": "9e16c086a66543720e7cc5f134c8b886", "score": "0.6220897", "text": "public function login() {\n\t\t// do we have an active token in the session ?\n\t\tif($this->getAccessToken()!=null) {\t\n\t\t\t$this->accessToken = $this->getAccessToken();\n\t\t}\n\t\telse {\n\n\t\t\t// first step, nothing set, start dancing\n\t\t\tif(!isset($_GET['oauth_verifier']) && !isset($_GET['oauth_token'])) {\n\n\t\t\t\t//setup the callback url, so we can go back further\n\t\t\t\t$callbackUrl = 'http://'. $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n\n\t\t\t\t// get request token\n \t\t\t$token = $this->obtainRequestToken($callbackUrl);\n\t\t\t \n\t\t\t\t// change, instead of passing through url\n\t\t\t\t$_SESSION['orkut_key'] = $token->key;\n\t\t\t\t$_SESSION['orkut_secret'] = $token->secret;\n\n\t\t\t\t// now we can redirect\n\t\t\t\t$authorizeRedirect = self::AUTHORIZE_URL . \"?oauth_token={$token->key}\";\n\t\t\t\theader(\"Location: $authorizeRedirect\");\n\n\t\t\t\t\n\t\t\t}\n\t\t\t// ok, now we are almost done, just upgrade request token and redirect\n\t\t\telse {\n\n\t\t\t\tif(!isset($_SESSION['orkut_key']))\n\t\t\t\t\tthrow new Exception('session expired, login again.');\n\n\t\t\t\t$this->upgradeRequestToken($_SESSION['orkut_key'], $_SESSION['orkut_secret']);\n\n\t\t\t\t// ok, finally we are ready to go.\n\t\t\t\t$_SESSION['oauth_token'] = serialize($this->accessToken);\n\n\t\t\t\t// unset session stuff\n\t\t\t\t$_SESSION['orkut_key']=NULL;\n\t\t\t\t$_SESSION['orkut_secret']=NULL;\n\n\t\t\t\tunset($_SESSION['orkut_key']);\n\t\t\t\tunset($_SESSION['orkut_secret']);\n\n\n\t\t\t\t//header(\"Location: $originalUrl\");\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "02cdf628566660e42b3899ac7eb5c326", "score": "0.6201858", "text": "function token() {\n\t\t$uri = trim($this->endpoint, '/').'/token';\n\t\t$attachment['code'] = $this->ccode;\n\t\t$attachment['client_id'] = $this->cid;\n\t\t$attachment['client_secret'] = $this->csecret;\n\t\t$attachment['redirect_uri'] = $this->redirect_uri;\n\t\t$attachment['grant_type'] = 'authorization_code';\n\t\t\n\t\t$response = $this->post($uri, $attachment);\n\t\tif (isset($response)) {\n\t\t\tif ( ! empty($response)) {\n\t\t\t\t$response = json_decode($response);\n\t\t\t}\n\t\t\t\n\t\t\treturn $response;\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\t}", "title": "" }, { "docid": "7d87447a1c3b8dca8b4db6e4dbed89fd", "score": "0.6196999", "text": "public function login() {\r\n\r\n $auth = new OAuth2Wrapper();\r\n $response = $auth->token();\r\n // only for application where access token is stored in the session.\r\n Util::sessionStart();\r\n session_unset();\r\n if (isset($response->access_token)) {\r\n $_SESSION[OAuth2Wrapper::$ACCESS_TOKEN] = $auth->accessToken;\r\n $_SESSION[OAuth2Wrapper::$REFRESH_TOKEN] = $auth->refreshToken;\r\n }\r\n $this->view->respond($response);\r\n }", "title": "" }, { "docid": "da59fcf2dd29acbf1c09540a827f23a5", "score": "0.6128976", "text": "public function request_token()\n {\n $params = array(\n 'app_id' => $this->_config['app_id'],\n 'app_host' => URL::base('http', FALSE),\n 'secret_key' => $this->_config['secret_key'],\n 'api_version' => $this->_config['api_version'],\n 'redirect_uri' => $this->_config['redirect_uri'],\n );\n\n return Request::factory($this->_config['request_uri'])\n ->method(Request::POST)\n ->post($params)\n ->execute();\n }", "title": "" }, { "docid": "b31533c692f2416f5c0d21379127a1fe", "score": "0.61230415", "text": "private function requestUserToken() {\n /* url options */\n $options = array(\n 'cmd' => 'login-api',\n 'appid' => Config::APPID,\n 'subcmd' => 'request-token',\n 'nonce' => $this->user->getNonce()\n );\n\n /* how is token returned? XML? Plain text? Encoded with secret?\n * For now it's plain text\n */\n $result = RemoteCall::call(Config::TOKEN_URL . '?' . http_build_query($options));\n\n $token = $_SESSION['token'] = $this->retrieveTokenFromResult($result);\n\n $this->user->setToken($token);\n\n if (setcookie(Config::COOKIE_NAME, md5(Config::SALT . $_SESSION['token']), false, '/', false)) {\n header(\"Location: \" . $_SERVER['SCRIPT_NAME']);\n } else {\n throw new Exception(\"Can not set cookie AFTER output\");\n }\n\n $this->user->store();\n }", "title": "" }, { "docid": "1fd8cb0f2a501e71e4851e58be893823", "score": "0.6119233", "text": "function check_authentication() {\n\t\t// check access_token if existed\n\t\t$access_token = $this->get('access_token');\n\t\n\t\tif ($access_token == false)\n\t\t\t$access_token = $this->post('access_token');\n\t\n\t\tif ($access_token != false) {\n\t\t\t$userid = $this->user_model->check_access_token($access_token);\n\t\t\tif ($userid == false) {\n\t\t\t\t$resp['status'] = 401;\n\t\t\t\t$resp['message'] = 'Access_token provided is not valid.';\n\t\t\t\t$this->response($resp, 401);\n\t\t\t} else {\n\t\t\t\treturn $userid;\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "90cd5ee4167a79038890059fcb9057ff", "score": "0.61094517", "text": "public function requestAuthToken(){\n $params = array();\n $params['secretkey'] = $this->secretKey;\n $response = $this->makeGetRequest('authToken', $params);\n if(isset($response['authToken'])){\n $this->authToken=$response['authToken'];\n }\n return $response;\n }", "title": "" }, { "docid": "f75b292fa4f12c4a04a560ece390a5b9", "score": "0.60820466", "text": "public function authme()\n {\n $parameters = array(\n \"oauth_nonce\" => $this->generate_nonce(),\n \"oauth_timestamp\" => time(),\n \"oauth_consumer_key\" => self::KEY,\n \"oauth_signature_method\" => \"HMAC-SHA1\",\n \"oauth_version\" => \"1.0\",\n \"oauth_callback\" => $this->callback_url\n );\n\n $signature = $this->createSignature($this->request_token_url, $parameters);\n\n $parameters[\"oauth_signature\"] = $signature;\n\n $jeton_str = $this->httpRequest($this->request_token_url, $parameters);\n parse_str($jeton_str, $jeton);\n\n $this->savparams($this->request_token_file_path, $jeton);\n\n $jeton['perms'] = 'delete';\n\n redirect($this->authorize_url .'?oauth_token='. $jeton['oauth_token'] .'&perms='. $jeton['perms']);\n }", "title": "" }, { "docid": "bbcde21a9a10ac25213d2b953660d42f", "score": "0.6065276", "text": "public function requestTokenAndGetAuthToken()\r\n {\r\n $domainPrefix = !empty(SHOP_DOMAIN_PREFIX) ? SHOP_DOMAIN_PREFIX . '.' : '';\r\n $callback = 'http://' . $domainPrefix . $this->shopUrl . self::AUTH_CALLBACK;\r\n if(!$this->oauth->requestToken($callback)) {\r\n return $this->oauth->getErrors();\r\n }\r\n\r\n //save oauth tokens in configs\r\n TwentyThreeHelper::updateShopCredentials(\r\n $this->shopId,\r\n [\r\n 'oauth_token' => $this->oauth->getOAuthToken(),\r\n 'oauth_token_secret' => $this->oauth->getOAuthTokenSecret()\r\n ]\r\n );\r\n $this->oauth->authorize();\r\n return [];\r\n }", "title": "" }, { "docid": "a538c014c0eb02154585e9569610da8d", "score": "0.60561323", "text": "public static function auth()\n {\n /*\n * Storage of client, have data in format [client_1_id => client_1_digest_salt, ...] \n */\n $clientSaltStorage = [\n 'w92w9ue838eu2h5y' => 'Black rock',\n 's392s3i3849ud48d' => 'Crazy cat',\n 'cnrf83f392e2kskd' => 'Happy new year',\n //...\n ];\n\n $params = Request::getParams();\n\n if (!isset($params['authToken']) || !isset($params['clientId'])) {\n //one or both auth parameters omitted\n return false;\n }\n\n if (!in_array($params['clientId'], array_keys($clientSaltStorage))) {\n //unknown client\n return false;\n }\n\n if ($params['authToken'] !== sha1(Request::getFullUrl() . $clientSaltStorage[$params['clientId']])) {\n //digest verification failed\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "dedf4b03607e69c45a19d75a88addaea", "score": "0.60309404", "text": "public function oauth2callback()\n\t{\n\t\tif (array_key_exists('code', $_GET) && !empty($_GET['code']))\n\t\t{\n\t\t\t$code = $_GET['code'];\n\t\t\t// on Dev use:\n\t\t\t//$url = $this->strategy['url_base'].'/web/app_dev.php/oauth/v2/token';\n\t\t\t\n\t\t\t$url = $this->strategy['url_base'].'/oauth/v2/token';\n\t\t\t\n\t\t\t$params = array(\n\t\t\t\t'code' => $code,\n\t\t\t\t'client_id' => $this->strategy['client_id'],\n\t\t\t\t'client_secret' => $this->strategy['client_secret'],\n\t\t\t\t'redirect_uri' => $this->strategy['redirect_uri'],\n\t\t\t\t'grant_type' => 'authorization_code',\n\t\t\t);\n\t\t\tif (!empty($this->strategy['state'])) $params['state'] = $this->strategy['state'];\n\t\t\t\n\t\t\t$response = static::serverPost($url, $params, null, $headers);\n\t\t\t\n\t\t\t$results = json_decode($response);\n\t\t\t\n\t\t\tif (!empty($results) && isset($results->access_token))\n\t\t\t{\n\t\t\t\t$user = $this->user($results->access_token);\n\t\t\t\t\n\t\t\t\t$this->auth = array(\n\t\t\t\t\t'uid' => $user['id'],\n\t\t\t\t\t'info' => array(\n\t\t\t\t\t\t'email' => $user['email'],\n\t\t\t\t\t\t'profile_picture_url' => $user['profile_picture_url'],\n\t\t\t\t\t\t'user' => $user\n\t\t\t\t\t),\n\t\t\t\t\t'credentials' => array(\n\t\t\t\t\t\t'token' => $results->access_token\n\t\t\t\t\t),\n\t\t\t\t\t'raw' => $user\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\tif(array_key_exists('given_name', $user))\n\t\t\t\t{\n\t\t\t\t\t$this->auth['info']['display_name'] = $user['given_name'];\n\t\t\t\t\t$this->mapProfile($user, 'name', 'info.display_name');\n\t\t\t\t}\n\t\t\t\tif(array_key_exists('first_name', $user))\n\t\t\t\t{\n\t\t\t\t\t$this->auth['info']['first_name'] = $user['first_name'];\n\t\t\t\t\t$this->mapProfile($user, 'first_name', 'info.first_name');\n\t\t\t\t}\n\t\t\t\t\n \t\t//$this->mapProfile($user, 'last_name', 'info.last_name');\n\t\t\t\t$this->mapProfile($user, 'email', 'info.email');\n\t\t\t\t$this->mapProfile($user, 'avatar_url', 'info.profile_picture_url');\n\t\t\t\t\n\t\t\t\t$this->callback();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$error = array(\n\t\t\t\t\t'code' => 'access_token_error',\n\t\t\t\t\t'message' => 'Failed when attempting to obtain access token',\n\t\t\t\t\t'raw' => array(\n\t\t\t\t\t\t'response' => $response,\n\t\t\t\t\t\t'headers' => $headers\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t$this->errorCallback($error);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$error = array(\n\t\t\t\t'code' => 'oauth2callback_error',\n\t\t\t\t'raw' => $_GET\n\t\t\t);\n\t\t\t\n\t\t\t$this->errorCallback($error);\n\t\t}\n\t}", "title": "" }, { "docid": "8036326ca3f728e75f1895beb1d62551", "score": "0.6026113", "text": "public function requestAuthCode()\r\n{\r\n\t$url = sprintf($this->GOAUTH . 'auth?scope=%s&redirect_uri=%s&response_type=code&client_id=%s&approval_prompt=force&access_type=offline',\r\n\t\t\turlencode(implode(' ', $this->SCOPES)), urlencode($this->REDIRECT_URI), urlencode($this->CLIENT_ID)\r\n\t);\r\n\theader('Location:' . $url);\r\n}", "title": "" }, { "docid": "dfb31cdf3c40ad5cf0e42238d4e91ce9", "score": "0.59882677", "text": "function handle_auth_request() {\n if(isset($_REQUEST['callback'])) {\n if($_REQUEST['callback'] == 'instagram_auth') {\n $this->retrieve_access_token('instagram');\n } else if($_REQUEST['callback'] == 'linkedin_auth') {\n $this->retrieve_access_token('linkedin');\n }\n }\n }", "title": "" }, { "docid": "8acae48f507938c2256365e5854032c8", "score": "0.5970198", "text": "function access_token()\n\t{\n\t\t// Get post query string parameters\n\t\t$params = array();\n\t\t\t\t\n\t\t// Client id\n\t\tif ($client_id = $this->input->post('client_id'))\n\t\t{\n\t\t\t$params['client_id'] = trim($client_id);\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->_fail('invalid_request', 'The request is missing a required parameter, includes an invalid parameter value, or is otherwise malformed. See client_id.', NULL, array(), 400, 'json');\n\t\t\texit;\n\t\t}\n\t\t\n\t\t// Client secret\n\t\tif ($client_secret = $this->input->post('client_secret'))\n\t\t{\n\t\t\t$params['client_secret'] = trim($client_secret);\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->_fail('invalid_request', 'The request is missing a required parameter, includes an invalid parameter value, or is otherwise malformed. See client_secret.', NULL, array(), 400, 'json');\n\t\t\texit;\n\t\t}\n\t\t\t\t\n\t\t// Client redirect uri\n\t\tif ($redirect_uri = $this->input->post('redirect_uri'))\n\t\t{\n\t\t\t$params['redirect_uri'] = urldecode(trim($redirect_uri));\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->_fail('invalid_request', 'The request is missing a required parameter, includes an invalid parameter value, or is otherwise malformed. See redirect_uri.', NULL, array(), 400, 'json');\n\t\t\texit;\n\t\t}\n\t\t\n\t\tif ($code = $this->input->post('code'))\n\t\t{\n\t\t\t$params['code'] = trim($code);\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->_fail('invalid_request', 'The request is missing a required parameter, includes an invalid parameter value, or is otherwise malformed. See code.', NULL, array(), 400, 'json');\n\t\t\texit;\n\t\t}\n\t\t\n\t\t// Validate the grant type\n\t\tif ($grant_type = $this->input->post('grant_type'))\n\t\t{\n\t\t\t$grant_type = trim($grant_type);\n\t\t\t\n\t\t\tif ( ! in_array($grant_type, array('authorization_code')))\n\t\t\t{\n\t\t\t\t$this->_fail('invalid_request', 'The request is missing a required parameter, includes an invalid parameter value, or is otherwise malformed. See grant_type.', NULL, array(), 400, 'json');\n\t\t\t\texit;\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\t$params['grant_type'] = $grant_type;\n\t\t\t}\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->_fail('invalid_request', 'The request is missing a required parameter, includes an invalid parameter value, or is otherwise malformed. See grant_type.', NULL, array(), 400, 'json');\n\t\t\texit;\n\t\t}\n\t\t\t\t\n\t\t// Validate client_id and redirect_uri\n\t\t$client_details = $this->oauth_server->validate_client($params['client_id'], $params['client_secret'], $params['redirect_uri']); // returns object or FALSE\n\t\t\n\t\tif ($client_details === FALSE )\n\t\t{\n\t\t\t$this->_fail('unauthorized_client', 'The client is not authorized to request an authorization code using this method', NULL, array(), 403, 'json');\n\t\t\texit;\n\t\t}\n\t\t\n\t\t// Respond to the grant type\n\t\tswitch ($params['grant_type'])\n\t\t{\n\t\t\tcase \"authorization_code\":\n\t\t\t\n\t\t\t\t// Validate the auth code\n\t\t\t\t$session = $this->oauth_server->validate_auth_code($params['code'], $params['client_id'], $params['redirect_uri']);\n\n\t\t\t\tif ($session === FALSE)\n\t\t\t\t{\n\t\t\t\t\t$this->_fail('invalid_request', 'The authorization code is invalid.', NULL, array(), 403, 'json');\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Generate a new access_token (and remove the authorize code from the session)\n\t\t\t\t$access_token = $this->oauth_server->get_access_token($session->id);\n\t\t\t\t\n\t\t\t\t// Send the response back to the application\n\t\t\t\t$this->_response(array('access_token' => $access_token));\n\t\t\t\texit;\n\t\t\t\n\t\t\tbreak;\n\t\t}\n\n\t\texit;\n\t}", "title": "" }, { "docid": "e3626d876dbba7fbd5dd56d67a81d686", "score": "0.5969355", "text": "function checkAuthenticationWithToken() {\n\n // Check all necessary fields are filled.\n $fields = ['username' => $this->username, 'token' => $this->token];\n checkFields($fields);\n\n $cursor = $this->collection->findOne(\n [\n 'username' => $this->username,\n 'token' => $this->token\n ],\n [\n 'projection' => [\n 'lastActivenessTimestamp' => 1\n ]\n ]\n );\n\n if (!$cursor) {\n throw new Exception(\"Not authenticated!\");\n }\n\n // Get current timestamp\n $currentTimestamp = $this->configManager->getCurrentTimestamp();\n\n // Get users' lastActivenessTimestamp\n $this->lastActivenessTimestamp = $cursor[\"lastActivenessTimestamp\"];\n $userLastActiveAt = $this->lastActivenessTimestamp;\n $diff = $currentTimestamp - $userLastActiveAt;\n\n // Check the token has expired or not\n if ($diff > $this->expiresIn) {\n throw new Exception(\"Your session has expired! Please sign in again.\");\n }\n\n $this->isAuthenticated = true;\n return $this;\n }", "title": "" }, { "docid": "fffa9b30055b8ecc196024873f26f6f6", "score": "0.59670985", "text": "public function requestToken($callback = '')\r\n {\r\n $config = [\r\n 'realm' => self::OAUTH_REALM,\r\n 'callback' => $callback,\r\n 'consumer_key' => $this->consumerKey,\r\n 'consumer_secret' => $this->consumerSecret,\r\n 'token_secret' => ''\r\n ];\r\n $result = $this->send($config, self::REQUEST_TOKEN_URL);\r\n\r\n if (!empty($result['error'])) {\r\n $this->errors[] = $result['error'];\r\n return false;\r\n }\r\n\r\n parse_str($result['contents'], $parameters);\r\n if (!empty($parameters['oauth_token'])) {\r\n $this->oauthToken = Common::emptyDefault($parameters, 'oauth_token');\r\n $this->oauthTokenSecret = Common::emptyDefault($parameters, 'oauth_token_secret');\r\n return true;\r\n } else {\r\n $this->errors[] = $parameters['error'];\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "44dd9656600286adbe1d878a3abf6da4", "score": "0.59587455", "text": "public function auth()\n {\n return OAuthManager::getInstance();\n }", "title": "" }, { "docid": "c4a4f0e147d1d5def883572936628b83", "score": "0.5954364", "text": "protected function requestToken($responseType = 'flat')\n {\n $this->log('requestToken()');\n\n // Make the request\n $settings = [\n 'responseType' => $responseType,\n 'includeCallback' => true,\n 'includeVerifier' => false,\n ];\n $params = $this->makeRequest($this->_request_token_url, [], 'POST', $settings);\n\n // Add token and secret to the session\n if (is_array($params) && isset($params['oauth_token']) && isset($params['oauth_token_secret'])) {\n $this->log('token set as '.$params['oauth_token']);\n\n $_SESSION['oauth']['token'] = $params['oauth_token'];\n $_SESSION['oauth']['token_secret'] = $params['oauth_token_secret'];\n\n if ($this->_debug) {\n $_SESSION['oauth']['debug']['token'] = $params['oauth_token'];\n $_SESSION['oauth']['debug']['token_secret'] = $params['oauth_token_secret'];\n }\n } else {\n // Throw exception if the required parameters were not found\n $this->log('request did not return oauth tokens');\n\n if ($this->_debug) {\n $_SESSION['oauth']['debug']['response'] = $params;\n }\n\n if (is_array($params)) {\n if (isset($params['errors'])) {\n $response = $params['errors'];\n } else {\n $response = '???';\n }\n } else {\n $response = $params;\n }\n\n throw new IncorrectParametersReturnedException('Incorrect access token parameters returned: '.$response);\n }\n }", "title": "" }, { "docid": "62a26d8ae7739bb378ba5ae2fe104c86", "score": "0.59484595", "text": "public function authenticate()\n\t{\n\t\tif (!$this->client)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// If we don't have an authorization code then get one\n\t\tif (!isset($_GET['code'])) {\n\t\t\t// Direct the user to the login URL, using the public_content scope\n\t\t\theader('Location: ' . $this->client->getLoginUrl(array( 'scope' => 'public_content' )));\n\n\t\t\texit;\n\t\t// If we do\n\t\t} else {\n\t\t\t// Get the access token\n\t\t\t$token = $this->client->getAccessToken($_GET['code']);\n\t\t\t// Save it to the settings\n\t\t\tcraft()->plugins->savePluginSettings($this->plugin,\n\t\t\t\tarray( 'accessToken' => json_encode($token) )\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "8e7e61f9e27dd2b698066ea6b9d073d5", "score": "0.5939818", "text": "abstract public function getAccessToken();", "title": "" }, { "docid": "8e7e61f9e27dd2b698066ea6b9d073d5", "score": "0.5939818", "text": "abstract public function getAccessToken();", "title": "" }, { "docid": "52122dad67b811c3f6ccbbd6caff2450", "score": "0.59384334", "text": "protected function authenticate() \n {\n //Get all headers\n $headers = $this->input->request_headers();\n\n //Checks if header Authorization exists and it not empty\n if (array_key_exists('Authorization', $headers) && !empty($headers['Authorization'])) {\n \n //Decode token\n $decodedToken = AUTHORIZATION::validateToken($headers['Authorization']);\n \n //var_dump( $decodedToken->secret_key == self::$_SECRET_KEY ); exit;\n\n //Check if token is decoded\n if ($decodedToken != false) {\n\n //Checks if secret key is equal with constant\n if ($decodedToken->secret_key == self::$_SECRET_KEY) {\n return true;\n }\n \n }\n }\n return false;\n }", "title": "" }, { "docid": "11ef21fc31c2e13daf189e09ea272170", "score": "0.5933742", "text": "public static function get_oauth_token() {\n\t\tif ( empty( self::$oauth_token ) )\n\t\t\tself::$oauth_token = get_user_meta( get_current_user_id(), self::$oa_token_name, true );\n\n\t\treturn self::$oauth_token;\n\t}", "title": "" }, { "docid": "7c2b9bbd6b3c6f8f7ea08ba1f39668a1", "score": "0.5919513", "text": "public function authenticate(){\n if($this->session->userdata(\"oauth_token\") != \"\" && $this->session->userdata(\"oauth_token\") != \"\"){\n if(!class_exists(\"TwitterOAuth\")){\n $this->load->file(APPPATH.\"libraries/twitteroauth/twitteroauth.php\");\n }\n if($this->oauth == null){\n // Include class file & create object passing request token/secret also\n $oauth = new TwitterOAuth($this->consumer_key, $this->consumer_secret, $this->session->userdata(\"oauth_token\"), $this->session->userdata(\"oauth_token_secret\"));\n $credentials = $oauth->get(\"account/verify_credentials\"); \n\n //Check is we have an error\n if(is_object($credentials) && is_array($credentials->errors)){\n log_message(\"error\", \"Twitter API authentication error occured.\");\n return false;\n }elseif(is_object($credentials)){\n $this->oauth = $oauth;\n return $oauth;\n }else{\n //Let's be lucky\n $this->oauth = $oauth;\n return $oauth;\n } \n }else{\n return $this->oauth;\n } \n }else{\n log_message(\"error\", \"No oAuth tokens found in the session of the current user. File: \".__FILE__.\"\\r\\nLine: \".__LINE__);\n return false;\n }\n }", "title": "" }, { "docid": "f648359938cdac24773bdbca09db4bcf", "score": "0.5915466", "text": "public function login() {\n // Get the transmitted data\n $data = \\Core\\App::getInstance()->request->getBody();\n $auth_data = json_decode($data, true);\n\n // Validate auth data\n if(!isset($auth_data['username']) || !isset($auth_data['password'])) {\n \\Helpers\\Response::error(\\Helpers\\Response::$E_INVALID_LOGIN_DATA);\n return;\n }\n\n $authtoken = \\Core\\User::login($auth_data['username'], $auth_data['password']);\n if($authtoken === false) {\n \\Helpers\\Response::error(\\Helpers\\Response::$E_INVALID_LOGIN_DATA);\n return;\n }\n\n \\Helpers\\Response::success([\n 'authtoken' => $authtoken\n ]);\n }", "title": "" }, { "docid": "be2475c16335a406c35d57f2244edfa0", "score": "0.59039056", "text": "public function authenticate()\n\t{\n\t\t$this->googlize();\n\n\t\treturn $this->client->authenticate();\n\t}", "title": "" }, { "docid": "15f8a7fb8c8cae4b4b9ad8012768e4f2", "score": "0.5901508", "text": "function _login() {\n\t\tif (isset($this->_token)) \n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\t\n\t\tif (!isset($this->_email) || !isset($this->_password)) \n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t$post_data = array();\n\t\t$post_data['Email'] = $this->_email;\n\t\t$post_data['Passwd'] = $this->_password;\n\t\t$post_data['continue'] = 'http://www.google.com/';\n\t\t$post_data['accountType'] = 'HOSTED_OR_GOOGLE';\n\t\t$post_data['source'] = $this->source;\n\t\t$post_data['service'] = 'reader';\n\t\t\n\t\t$this->_channel = curl_init($this->login_url);\n\t\tcurl_setopt($this->_channel, CURLOPT_POST, TRUE);\n\t\tcurl_setopt($this->_channel, CURLOPT_POSTFIELDS, http_build_query($post_data));\n\t\tcurl_setopt($this->_channel, CURLOPT_FOLLOWLOCATION, TRUE);\n\t\tcurl_setopt($this->_channel, CURLOPT_RETURNTRANSFER, TRUE);\n\t\t$result = curl_exec($this->_channel);\n\t\tcurl_close($this->_channel);\n\t\t\n\t\tif (strpos($result, 'BadAuthentication') !== FALSE) {\n\t\t\tthrow new Exception('User credentials were rejected by Google');\n\t\t} else if (strpos($result, 'Auth') === FALSE) {\n\t\t\tthrow new Exception('Unable to get token from google');\n\t\t} else {\n\t\t\t$token_start = strpos($result, 'Auth=');\n\t\t\t$this->_token = substr($result, $token_start + 5);\n\t\t\treturn TRUE;\n\t\t}\n\t}", "title": "" }, { "docid": "d0360530e6a1d97255cf59747c4ad381", "score": "0.5898789", "text": "protected function get_access_token() {\n return array_key_exists( 'access_token', $this->api_credentials ) ? $this->api_credentials['access_token'] : false;\n }", "title": "" }, { "docid": "c079eef1c9f0b9cd5920d13e405e7a08", "score": "0.5898054", "text": "function getTokenCredentials() {\n global $lastError, $currentStatus;\n \n if (isset($_SESSION['accessToken'])) {\n $lastError = 'Temporary credentials may only be exchanged for token credentials once';\n return FALSE;\n }\n \n try {\n $oauth = new OAuth(OAUTH_CONSUMER_KEY, OAUTH_CONSUMER_SECRET);\n $oauth->setToken($_SESSION['requestToken'], $_SESSION['requestTokenSecret']);\n $accessTokenInfo = $oauth->getAccessToken(ACCESS_TOKEN_URL, null, $_SESSION['oauthVerifier']);\n if ($accessTokenInfo) {\n $_SESSION['accessToken'] = $accessTokenInfo['oauth_token'];\n $_SESSION['accessTokenSecret'] = $accessTokenInfo['oauth_token_secret'];\n $_SESSION['noteStoreUrl'] = $accessTokenInfo['edam_noteStoreUrl'];\n $_SESSION['shard'] = $accessTokenInfo['edam_shard'];\n $_SESSION['webApiUrlPrefix'] = $accessTokenInfo['edam_webApiUrlPrefix'];\n // The expiration date is sent as a Java timestamp - milliseconds since the Unix epoch\n $_SESSION['tokenExpires'] = (int)($accessTokenInfo['edam_expires'] / 1000);\n $_SESSION['userId'] = $accessTokenInfo['edam_userId'];\n $currentStatus = 'Exchanged the authorized temporary credentials for token credentials';\n return TRUE;\n } else {\n $lastError = 'Failed to obtain token credentials: ' . $oauth->getLastResponse();\n }\n } catch (OAuthException $e) {\n $lastError = 'Error obtaining token credentials: ' . $e->getMessage();\n } \n return FALSE;\n }", "title": "" }, { "docid": "f863634adea1d2cd9750029f0279cb7c", "score": "0.589698", "text": "public function authorise()\n {\n if (!isset($_GET['code'])) {\n $authorizationUrl = $this->provider->getAuthorizationUrl();\n session()->put(\"oauth2state\", $this->provider->getState());\n header('Location: ' . $authorizationUrl);\n exit;\n// Check given state against previously stored one to mitigate CSRF attack\n } elseif (empty($_GET['state']) || (session()->has(\"oauth2state\") && $_GET['state'] !== session()->get(\"oauth2state\"))) {\n if (session()->has(\"oauth2state\"))\n session()->remove('oauth2state');\n exit('Invalid state');\n } else {\n try {\n // Try to get an access token using the authorization code grant.\n $accessToken = $this->provider->getAccessToken('authorization_code', [\n 'code' => $_GET['code']\n ]);\n // We have an access token, which we may use in authenticated\n // requests against the service provider's API.\n echo 'Access Token: ' . $accessToken->getToken() . \"<br>\";\n echo 'Refresh Token: ' . $accessToken->getRefreshToken() . \"<br>\";\n echo 'Expired in: ' . $accessToken->getExpires() . \"<br>\";\n echo 'Already expired? ' . ($accessToken->hasExpired() ? 'expired' : 'not expired') . \"<br>\";\n\n // Using the access token, we may look up details about the\n // resource owner.\n $resourceOwner = $this->provider->getResourceOwner($accessToken);\n\n\n $user = StarlingUser::updateOrCreate(\n [\n \"customer_uid\" => $resourceOwner->toArray()['customerUid']\n ],\n [\n \"access_token\" => $accessToken->getToken(),\n \"refresh_token\" => $accessToken->getRefreshToken(),\n \"expires_at\" => $accessToken->getExpires()\n ]);\n\n session()->put(\"user_id\", $user->id);\n } catch (\\League\\OAuth2\\Client\\Provider\\Exception\\IdentityProviderException $e) {\n\n print_r($e->getResponseBody());\n // Failed to get the access token or user details.\n exit($e->getMessage());\n\n }\n\n }\n }", "title": "" }, { "docid": "701c947d6a98d381d3f753855ab76af0", "score": "0.58817196", "text": "function getAccessToken() {\n $loginEnable = $this->linkedinIntegrationEnabled();\n if (empty($loginEnable)) {\n return;\n }\n //Check if linkedin login is enable\n $linkedinSettings = (array) Engine_Api::_()->getApi('settings', 'core')->sitelogin_linkedin;\n $client_id = isset($linkedinSettings['clientId']) ? $linkedinSettings['clientId'] : 0;\n $client_secret = isset($linkedinSettings['clientSecret']) ? $linkedinSettings['clientSecret'] : 0;\n\n $redirect_uri = Engine_Api::_()->sitelogin()->getRedirectUrl('linkedin');\n $params = array('grant_type' => 'authorization_code',\n 'client_id' => $client_id,\n 'client_secret' => $client_secret,\n 'code' => $_GET['code'],\n 'redirect_uri' => $redirect_uri,\n 'scope' => 'r_basicprofile r_emailaddress'\n );\n // Access Token request\n $this->_url = 'https://www.linkedin.com/uas/oauth2/accessToken?' . http_build_query($params);\n // Tell streams to make a POST request\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $this->_url);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);\n ob_start();\n curl_exec($ch);\n curl_close($ch);\n $response = ob_get_contents();\n ob_end_clean();\n $token = json_decode($response);\n\n $_SESSION['linkedin_access_token'] = $token->access_token;\n\n return true;\n }", "title": "" }, { "docid": "0db880f2ae00f9f3f50a0a381fcaad33", "score": "0.58711386", "text": "public function refreshOauthToken()\n {\n $this->_log->info('Refresh Oauth Start');\n $applicationId = Mage::helper('squareup_omni/config')->getApplicationId();\n $applicationSecret = Mage::helper('squareup_omni/config')->getApplicationSecret();\n $authToken = Mage::helper('squareup_omni/config')->getOAuthToken();\n\n if (empty($applicationId) || empty($applicationSecret) || empty($authToken)) {\n $this->_log->error('One of the required configuration is missing for oAuth refresh');\n return false;\n }\n\n $oAuthExpire = Mage::helper('squareup_omni/config')->getOAuthExpire();\n if (time() < ($oAuthExpire - ($this->_subDaysRefresh * (24 * 60 * 60)))) {\n $this->_log->info('OAuth refresh is not required because the expire date is more than '\n . $this->_subDaysRefresh . ' days away.');\n return true;\n }\n\n $cronCollection = Mage::getModel('cron/schedule')->getCollection()\n ->addFieldToFilter('job_code', array('eq' => 'oauth_refresh'))\n ->addFieldToFilter('status', array('eq' => 'running'));\n\n if (count($cronCollection) > 1) {\n $this->_log->info('There are more than one cron jobs for OAuth refresh running');\n return false;\n }\n\n $url = 'https://connect.squareup.com/oauth2/clients/' . $applicationId . '/access-token/renew';\n $config = array(\n 'adapter' => 'Zend_Http_Client_Adapter_Socket',\n );\n $oauthRequestHeaders = array (\n 'Authorization' => 'Client ' . $applicationSecret,\n 'Accept' => 'application/json',\n 'Content-Type' => 'application/json'\n );\n $oauthRequestBody = array(\n 'access_token' => $authToken\n );\n\n try {\n $client = new Zend_Http_Client($url, $config);\n $client->setMethod(Zend_Http_Client::POST);\n $client->setHeaders($oauthRequestHeaders);\n $client->setConfig(array('timeout' => 60));\n $client->setRawData(json_encode($oauthRequestBody));\n $response = $client->request();\n $this->_log->info('Refresh Oauth Response: ' . $response->getBody());\n } catch (Exception $e) {\n $this->_log->error($e->__toString());\n return false;\n }\n\n if ($response->getStatus() != 200) {\n $this->_log->error($response->__toString());\n return false;\n }\n\n $responseObj = json_decode($response->getBody());\n Mage::getConfig()->saveConfig('squareup_omni/oauth_settings/oauth_token', $responseObj->access_token);\n Mage::getConfig()->saveConfig('squareup_omni/oauth_settings/oauth_expire', strtotime($responseObj->expires_at));\n\n $this->_log->info('Reinit and refreshing config');\n Mage::app()->getConfig()->reinit();\n Mage::app()->getCacheInstance()->flush();\n $this->_log->info('Refresh oAuth finished');\n\n return true;\n }", "title": "" }, { "docid": "ca6d208ecd535b7aff6d48d3bed3caf8", "score": "0.58637285", "text": "public function oauth2callback() {\n\t\tif (array_key_exists('code', $_GET) && !empty($_GET['code'])) {\n\t\t\t$code = $_GET['code'];\n\t\t\t$url = 'https://api.createsend.com/oauth/token';\n\n\t\t\t$params = array(\n\t\t\t\t'code' => $code,\n\t\t\t\t'client_id' => $this->strategy['client_id'],\n\t\t\t\t'client_secret' => $this->strategy['client_secret'],\n\t\t\t\t'redirect_uri' => $this->strategy['redirect_uri'],\n\t\t\t\t'grant_type' => 'authorization_code',\n\t\t\t);\n\t\t\tif (!empty($this->strategy['state'])) $params['state'] = $this->strategy['state'];\n\n\t\t\t$response = $this->serverPost($url, $params, null, $headers);\n\n\t\t\t//parse_str($response, $results);\n\t\t\t$results = json_decode($response, true);\n\n\t\t\tif (!empty($results) && !empty($results['access_token'])) {\n\n\t\t\t\t$client = $this->clientInfo($results['access_token']);\n\n\t\t\t\t$this->auth = array(\n\t\t\t\t\t'uid' => $client['EmailAddress'],\n\t\t\t\t\t'info' => array(),\n\t\t\t\t\t'credentials' => array(\n\t\t\t\t\t\t'token' => $results['access_token']\n\t\t\t\t\t),\n\t\t\t\t\t'raw' => $client\n\t\t\t\t);\n\n\t\t\t\t$this->mapProfile($client, 'EmailAddress', 'uid');\n\t\t\t\t$this->mapProfile($client, 'Name', 'info.name');\n\t\t\t\t$this->mapProfile($client, 'EmailAddress', 'info.email');\n\t\t\t\t$this->callback();\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$error = array(\n\t\t\t\t\t'code' => 'access_token_error',\n\t\t\t\t\t'message' => 'Failed when attempting to obtain access token',\n\t\t\t\t\t'raw' => array(\n\t\t\t\t\t\t'response' => $response,\n\t\t\t\t\t\t'headers' => $headers\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t$this->errorCallback($error);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$error = array(\n\t\t\t\t'code' => 'oauth2callback_error',\n\t\t\t\t'raw' => $_GET\n\t\t\t);\n\n\t\t\t$this->errorCallback($error);\n\t\t}\n\t}", "title": "" }, { "docid": "2b5bc0232e4493a0ed1ba1e0ef69b5ee", "score": "0.58510756", "text": "private function auth_code() {\n\t\treturn $this->create_token();\n\t}", "title": "" }, { "docid": "c41ff4b88ccd7cfc0a4701c8c3aba216", "score": "0.58503747", "text": "public function generate() {\n if (!isset($_REQUEST['code'])) {\n return false;\n }\n $code = $_REQUEST['code'];\n\n $this->debugInfo(\"Code: \".$code);\n\n // Generate the url to the API that will give us the access token and id token\n $auth_url = $this->generateUrl('token');\n // Make the call\n $response = $this->oauth_client->getAccessToken($auth_url, \"authorization_code\", array(\n \"code\" => $code,\n \"redirect_uri\" => $this->redirect_uri\n ), array(\n 'Auth0-Client' => ApiClient::getInfoHeadersData()->build()\n ));\n\n $auth0_response = $response['result'];\n\n if ($response['code'] !== 200) {\n throw new ApiException($auth0_response['error'] . ': '. $auth0_response['error_description']);\n }\n\n $this->debugInfo(json_encode($auth0_response));\n $access_token = (isset($auth0_response['access_token']))? $auth0_response['access_token'] : false;\n $id_token = (isset($auth0_response['id_token']))? $auth0_response['id_token'] : false;\n\n if (!$access_token) {\n throw new ApiException('Invalid access_token - Retry login.');\n }\n\n if (!$id_token) { // id_token is not mandatory anymore. There is no need to force openid connect\n $this->debugInfo('Missing id_token after code exchange. Remember to ask for openid scope.');\n }\n\n // Set the access token in the oauth client for future calls to the Auth0 API\n $this->oauth_client->setAccessToken($access_token);\n $this->oauth_client->setAccessTokenType(Client::ACCESS_TOKEN_BEARER);\n\n // Set it and persist it, if needed\n $this->setAccessToken($access_token);\n $this->setIdToken($id_token);\n\n return [$this->getAccessToken(), $this->getIdToken()];\n }", "title": "" }, { "docid": "e5f4010b80a14c8b4823c84feb813fda", "score": "0.58469796", "text": "public function checkToken($request)\n {\n // $tokens = new TokenRepository();\n\n //$psr = (new DiactorosFactory)->createRequest($request);\n\n try {\n // $psr = $server->validateAuthenticatedRequest($request);\n\n // $token = $tokens->find(\n // $psr->getAttribute('oauth_access_token_id')\n // );\n\n // $currentDate = new DateTime();\n // $tokenExpireDate = new DateTime($token->expires_at);\n\n // $isAuthenticated = $tokenExpireDate > $currentDate ? true : false;\n\n return json_encode(array('authenticated' => $isAuthenticated));\n } catch (OAuthServerException $e) {\n return json_encode(array('error' => 'Something went wrong with authenticating. Please logout and login again.'));\n }\n }", "title": "" }, { "docid": "7121d490085af656c1ec3874a5424928", "score": "0.58467126", "text": "public static function generateToken()\n {\n if (Config::getEnvironment() == \"live\")\n {\n $url = \"https://api.safaricom.co.ke/oauth/v1/generate?grant_type=client_credentials\";\n }else{\n $url = \"https://sandbox.safaricom.co.ke/oauth/v1/generate?grant_type=client_credentials\";\n }\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n $credentials = base64_encode(Config::getConsumerKey().':'.Config::getConsumerSecret());\n curl_setopt($curl, CURLOPT_HTTPHEADER, array('Authorization: Basic '.$credentials)); //setting a custom header\n curl_setopt($curl, CURLOPT_HEADER, false);\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, Config::isSsl());\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n $curl_response = curl_exec($curl);\n return json_decode($curl_response)->access_token;\n }", "title": "" }, { "docid": "58ae51c3cc06618f885111db468f6241", "score": "0.58438706", "text": "public function loginOauth2()\n {\n $oauthClient = new \\League\\OAuth2\\Client\\Provider\\GenericProvider([\n 'clientId' => env('OAUTH_APP_ID'),\n 'clientSecret' => env('OAUTH_APP_PASSWORD'),\n 'redirectUri' => env('OAUTH_REDIRECT_URI'),\n 'urlAuthorize' => env('OAUTH_AUTHORITY').env('OAUTH_AUTHORIZE_ENDPOINT'),\n 'urlAccessToken' => env('OAUTH_AUTHORITY').env('OAUTH_TOKEN_ENDPOINT'),\n 'urlResourceOwnerDetails' => '',\n 'scopes' => env('OAUTH_SCOPES'),\n ]);\n \n $authUrl = $oauthClient->getAuthorizationUrl();\n \n // Save client state so we can validate in callback\n session(['oauthState' => $oauthClient->getState()]);\n\n // Redirect to AAD signin page\n return redirect()->away($authUrl);\n }", "title": "" }, { "docid": "5c0bcdd96425e578873491198b2a033d", "score": "0.5835163", "text": "public function linked_auth(){\n if( ( isset( $_REQUEST['code'] ) && !empty( $_REQUEST['code'] ) ) && ( isset( $_REQUEST['state'] ) || $_REQUEST['state'] == $this->state ) ){\n try {\n \t\t\t/**\n \t\t\t * Step2: Exchange Authorization Code for a Request Token\n \t\t\t */\n \t\t\t$request = $_REQUEST;\n \t\t\t$redirect_uri = home_url('?action=linked_auth_callback');\n \t\t\t$args = array(\n \t\t\t\t'method' => 'POST',\n \t\t\t\t'timeout' => 45,\n \t\t\t\t'redirection' => 5,\n \t\t\t\t'httpversion' => '1.0',\n \t\t\t\t'blocking' => true,\n \t\t\t\t'headers' => array(),\n \t\t\t\t'body' => array( \n \t\t\t\t\t'grant_type' => 'authorization_code', \n \t\t\t\t\t'code' => $request['code'], \n \t\t\t\t\t'redirect_uri' => $redirect_uri,\n \t\t\t\t\t'client_id' => $this->linkedin_api_key,\n \t\t\t\t\t'client_secret' => $this->linkedin_secret_key),\n \t\t\t\t'cookies' => array()\n \t\t\t\t);\n \t\t\t$remote_post = wp_remote_post( $this->linkedin_token_url, $args );\n if( isset( $remote_post ['body'] ) && !empty( $remote_post ['body'] ) ){\n \t\t\t$data = json_decode( $remote_post ['body'] ); \n }\n else{\n _e( 'Error to connect to Linkedin server!', ET_DOMAIN );\n exit();\n }\n if( !isset( $data->access_token ) || empty( $data->access_token ) ){\n _e( 'Can not get the access token from Linkedin server!', ET_DOMAIN );\n exit(); \n }\n \t\t\t/**\n \t\t\t * Step3: Make authenticated requests and get user's informations\n \t\t\t */\n \t\t\t$args1 = array( \n \t\t\t\t'timeout' => 120, \n \t\t\t\t'httpversion' => '1.1', \n \t\t\t\t'headers' => array(\n \t\t\t\t\t'Authorization' => 'Bearer '.$data->access_token )\n \t\t\t\t);\n \t\t\t$remote_get = wp_remote_get( $this->linkedin_people_url, $args1 );\n if( isset( $remote_get['body'] ) && !empty( $remote_get['body'] ) ){\n \t\t\t $data_user = json_decode($remote_get['body']);\n }\n else{\n _e( 'Error to connect to Linkedin server2!', ET_DOMAIN );\n exit();\n }\n if( !isset( $data_user->id ) || empty( $data_user->id ) ){\n _e( 'Can not get user information from Linkedin server!', ET_DOMAIN );\n exit(); \n }\n // if user is already authenticated before\n if ( $this->get_user( $data_user->id ) ) {\n $user = $this->get_user( $data_user->id );\n $result = $this->logged_user_in( $data_user->id );\n $ae_user = AE_Users::get_instance();\n $userdata = $ae_user->convert( $user );\n $nonce = array(\n 'reply_thread' => wp_create_nonce('insert_reply') ,\n 'upload_img' => wp_create_nonce('et_upload_images') ,\n );\n }\n else {\n // avatar\n $ava_response = isset( $data_user->pictureUrl ) ? $data_user->pictureUrl : '';\n $sizes = get_intermediate_image_sizes();\n $avatars = array();\n if ($ava_response) {\n foreach ($sizes as $size) {\n $avatars[$size] = array(\n $ava_response\n );\n }\n } else {\n $avatars = false;\n } \n $data_user->formattedName = str_replace(' ', '', sanitize_user( $data_user->formattedName ) );\n $username = $data_user->formattedName;\n $params = array(\n 'user_login' => $username,\n 'user_email' => isset( $data_user->emailAddress ) ? $data_user->emailAddress : false,\n 'et_avatar' => $avatars\n );\n //remove avatar if cant fetch avatar\n foreach ( $params as $key => $param ) {\n if ( $param == false ){\n unset($params[$key]);\n }\n }\n // turn on session\n if (!isset($_SESSION)) {\n ob_start();\n @session_start();\n }\n /**\n * set value into session for save later\n *\n */\n $_SESSION['et_auth'] = serialize( $params );\n $_SESSION['et_social_id'] = $data_user->id;\n $_SESSION['et_auth_type'] = 'linkedin';\n \t\t\t}\n header('Location: '.$this->auth_url);\n exit();\n }catch(Exception $e) {\n _e( 'Error to connect to Linkedin server', ET_DOMAIN );\n exit();\n }\n }\n\t}", "title": "" }, { "docid": "ca11837545234ff3dc9508fc24019ddc", "score": "0.5828862", "text": "function restAuth($auth) {\n\t\n\tif (!CLIENT_ID || !CLIENT_SECRET)\n\t\treturn false;\n\n\tif(!isset($auth['refresh_token']) || !isset($auth['scope']) || !isset($auth['domain']))\n\t\treturn false;\n\n\t$queryUrl = 'https://'.$auth['domain'].'/oauth/token/';\n\t$queryData = http_build_query($queryParams = array(\n\t\t'grant_type' => 'refresh_token',\n\t\t'client_id' => CLIENT_ID,\n\t\t'client_secret' => CLIENT_SECRET,\n\t\t'refresh_token' => $auth['refresh_token'],\n\t\t'scope' => $auth['scope'],\n\t));\n\t\n\t$curl = curl_init();\n\n\tcurl_setopt_array($curl, array(\n\t\tCURLOPT_HEADER => 0,\n\t\tCURLOPT_RETURNTRANSFER => 1,\n\t\tCURLOPT_URL => $queryUrl.'?'.$queryData,\n\t));\n\n\t$result = curl_exec($curl);\n\tcurl_close($curl);\n\n\t$result = json_decode($result, 1);\n\t\n\tif (!isset($result['error']))\n\t{\n\t\t/*$appsConfig = Array();\n\t\tif (file_exists(__DIR__.'/config.php'))\n\t\t\tinclude(__DIR__.'/config.php');*/\n\n\t\t$result['application_token'] = $auth['application_token'];\n\t\t/*$appsConfig[$auth['application_token']]['AUTH'] = $result;\n\t\tsaveParams($appsConfig);*/\n\t}\n\telse\n\t{\n\t\t$result = false;\n\t}\n\n\treturn $result;\n}", "title": "" }, { "docid": "d71d3583c9b8e32404bf9470439136ec", "score": "0.58274966", "text": "public function validateAccessToken($redirect = true)\n {\n $this->_do_not_redirect = !$redirect;\n $this->log('validateAccessToken()');\n\n // Check to see if token in session has expired\n if (!empty($this->_expires) && $this->_expires < time()) {\n $this->log('access token expired so reauthorize');\n\n if (strlen($this->_refresh_token) > 0) {\n // use a refresh token to get a new token\n return $this->requestAccessToken();\n }\n\n // Reauthorize\n $this->authorize($this->_scope);\n\n return false;\n }\n\n // Check for existing access token\n if ($this->_access_token) {\n $this->log('has access token');\n\n return true;\n }\n\n // Reauthorize if no token was found\n if (!$this->_access_token) {\n $this->log('access token empty so authorize');\n\n // OAuth flows\n if ($this->isOauth1()) {\n // OAuth 1.0\n $this->log('authorizing with OAuth1.0a spec');\n\n // Request token and authorize app\n if (!isset($_GET['oauth_token']) && !isset($_GET['oauth_verifier'])) {\n $this->log('initializing authorization');\n\n // Request token\n $this->requestToken();\n // Authorize token\n $this->authorize();\n\n return false;\n }\n\n // Request access token\n if ($_GET['oauth_token'] != $_SESSION['oauth']['token']) {\n unset($_SESSION['oauth']['token'], $_SESSION['oauth']['token_secret']);\n\n return false;\n }\n\n $this->requestAccessToken();\n unset($_SESSION['oauth']['token'], $_SESSION['oauth']['token_secret']);\n\n return true;\n }\n\n // OAuth 2.0\n $this->log('authorizing with OAuth2 spec');\n\n // Authorize app\n if (!isset($_GET['state']) && !isset($_GET['code'])) {\n $this->authorize($this->_scope);\n\n return false;\n }\n\n if ($this->_debug) {\n $_SESSION['oauth']['debug']['received_state'] = $_GET['state'];\n }\n\n // Request an access token\n if ($_GET['state'] != $_SESSION['oauth']['state']) {\n unset($_SESSION['oauth']['state']);\n\n return false;\n }\n\n unset($_SESSION['oauth']['state']);\n $this->requestAccessToken('POST', [], 'json');\n\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "9a057a5fbb1b6047b475366527fb5ad2", "score": "0.5827433", "text": "public function getOauthToken()\n {\n return $this->oauth_token;\n }", "title": "" }, { "docid": "9a057a5fbb1b6047b475366527fb5ad2", "score": "0.5827433", "text": "public function getOauthToken()\n {\n return $this->oauth_token;\n }", "title": "" }, { "docid": "b97769e81a9aed4428a068f28e425791", "score": "0.5819435", "text": "function getRequestToken($oauth_callback = NULL) { \r\n $parameters = array(); \r\n if (!empty($oauth_callback)) { \r\n $parameters['oauth_callback'] = $oauth_callback; \r\n } \r\n $request = $this->oAuthRequest($this->requestTokenURL(), 'GET', $parameters);\t\r\n $token = OAuthUtil::parse_parameters($request); \r\n $this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']); \r\n return $token; \r\n }", "title": "" }, { "docid": "4561115ae31b7935d93677fd1bb1b99c", "score": "0.5817711", "text": "public function token_get()\n {\n //Initialize array\n $tokenData = array();\n\n //Set token secret key\n $tokenData['secret_key'] = self::$_SECRET_KEY;\n\n //Make token and get it\n $output['token'] = AUTHORIZATION::generateToken($tokenData);\n\n //Return response\n $this->set_response($output, REST_Controller::HTTP_OK); \n }", "title": "" }, { "docid": "71e1a540bc1da82a6f7ef91880940d52", "score": "0.5816794", "text": "private function generateAuthorizationToken() {\r\n\t\t$urlGetToken = $this->domain . '/pub/token/?grant_type=refresh_token&client_id=' . $this->application_id . '&client_secret=' . $this->application_secret . '&refresh_token=' . $this->authentication_refresh_code . '&scope=granted_permission&redirect_uri=app_URL';\r\n\r\n $ch = curl_init();\r\n\t\tcurl_setopt($ch, CURLOPT_URL, $urlGetToken); \r\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n\r\n\t\tcurl_setopt($ch, CURLOPT_ENCODING, \"\");\r\n\t\tcurl_setopt($ch, CURLOPT_AUTOREFERER, true);\r\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); # required for https urls\r\n\r\n\t\t$response = curl_exec($ch);\r\n\r\n\t\tif(!$response){\r\n\t\t\tdie('Error: \"' . curl_error($ch) . '\" - Code: ' . curl_errno($ch));\r\n\t\t}\r\n\r\n\t\tcurl_close($ch);\r\n\r\n\t\treturn $response;\r\n\t}", "title": "" }, { "docid": "d0fa9a2617bef344cf3b21dc575a493f", "score": "0.58146334", "text": "public function login()\n {\n $client = new \\Google_Client();\n $client->setApplicationName('Contrexx Login');\n $client->setClientId($this->applicationData[0]);\n $client->setClientSecret($this->applicationData[1]);\n $client->setRedirectUri(\\Cx\\Lib\\SocialLogin::getLoginUrl(self::OAUTH_PROVIDER));\n $client->setDeveloperKey($this->applicationData[2]);\n $client->setUseObjects(true);\n $client->setApprovalPrompt('auto');\n $client->setScopes(self::$scopes);\n self::$google = new \\Google_Oauth2Service($client);\n self::$googleplus = new \\Google_PlusService($client);\n\n\n if (isset($_GET['code'])) {\n try {\n $client->authenticate();\n } catch (\\Google_AuthException $e) {\n }\n }\n\n if (!$client->getAccessToken()) {\n \\Cx\\Core\\Csrf\\Controller\\Csrf::header('Location: ' . $client->createAuthUrl());\n exit;\n }\n\n self::$userdata = $this->getUserData();\n $this->getContrexxUser(self::$userdata['oauth_id']);\n }", "title": "" }, { "docid": "7bc71b7737438df0703cbb13890b8a33", "score": "0.58145416", "text": "protected function access_token(Request $request)\n {\n $rules = [\n 'grant_type' => 'required',\n 'client_id' => 'required',\n 'client_secret' => 'required',\n 'username' => 'sometimes',//|exists:users,username\n 'email' => 'sometimes',//|exists:users,email\n 'password' => 'required|min:6',\n ];\n $validator = $this->makeValidation($request, $rules);\n\n if (!$validator->getData()->status) {\n return $validator;\n }\n/* $user = User::where('email', $request->get('email'))->first();\n if (!isset($user)) {\n return response_api(false, null, null, null, array(['fieldname' => 'User', 'message' => 'You are not a member with us']));\n }\n if ($user->status == 'suspend')\n return response_api(false, null, null, null, array(['fieldname' => 'Status suspend', 'message' => 'User was suspended by admin']));*/\n $request->request->add([\n 'grant_type' => $request->get('grant_type'),\n 'client_id' => $request->get('client_id'),\n 'client_secret' => $request->get('client_secret'),\n 'username' => $request->get('username'),\n 'password' => $request->get('password'),\n 'scope' => null\n ]);\n\n $proxy = Request::create(\n env('APP_URL').'/oauth/token',\n 'POST'\n );\n // turn on mobile\n // DeviceToken::where('user_id', $user->id)->update(['status' => 'on']);\n return Route::dispatch($proxy);\n }", "title": "" }, { "docid": "2772d9959d74fcf893bee2ea3154d609", "score": "0.5805073", "text": "public function oAuth(){\n\n // Get config\n $this->getConfig();\n\n // Set config for api calls\n $this->instagramBasicDisplayApi->setConfig($this->moduleConfig);\n\n // Get the OAuth callback code\n //$code = '';\n $code = \\Drupal::request()->query->get('code');\n\n // Get the short lived access token (valid for 1 hour)\n $token = $this->instagramBasicDisplayApi->getOAuthToken($code, true);\n // Exchange this token for a long lived token (valid for 60 days)\n $token = $this->instagramBasicDisplayApi->getLongLivedToken($token);\n\n // Save token into DB\n if($this->storage->setAccessToken($token)){\n $response = '<h2>Access token successfully saved to database</h2>';\n }else{\n $response = '<h2>Error saving access token to database</h2>';\n }\n\n $build[] = array(\n '#type' => 'markup',\n '#markup' => $response,\n );\n $build['#cache']['max-age'] = 0;\n\n return $build;\n\n }", "title": "" }, { "docid": "b4822ac350014fd3abb2332c5b011ad3", "score": "0.5803204", "text": "private function GetToken()\n\t{\n\t\ttry {\n\t\t\t$params = $this->getParams();\n\t\t\t$postData = array(\n\t\t\t\t'UserApiKey' => $params->apikey,\n\t\t\t\t'SecretKey' => $params->secretkey,\n\t\t\t\t'System' => $this->ModuleNameVersion()\n\t\t\t);\n\t\t\t$postString = json_encode($postData);\n\n\t\t\t$ch = curl_init($params->apidomain . $this->getApiTokenUrl());\n\t\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\n\t\t\t\t'Content-Type: application/json'\n\t\t\t));\n\t\t\tcurl_setopt($ch, CURLOPT_HEADER, false);\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\n\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $postString);\n\n\t\t\t$result = curl_exec($ch);\n\t\t\tcurl_close($ch);\n\n\t\t\t$response = json_decode($result);\n\n\t\t\tif (is_object($response)) {\n\t\t\t\t$resultVars = get_object_vars($response);\n\t\t\t\tif (is_array($resultVars)) {\n\t\t\t\t\t@$IsSuccessful = $resultVars['IsSuccessful'];\n\t\t\t\t\tif ($IsSuccessful == true) {\n\t\t\t\t\t\t@$TokenKey = $resultVars['TokenKey'];\n\t\t\t\t\t\t$resp = $TokenKey;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$resp = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $resp;\n\t\t} catch (Exeption $e) {\n\t\t\techo 'Error GetToken : ' . $e->getMessage();\n\t\t}\n\t}", "title": "" }, { "docid": "57550d66cbb15c301fc165af45b9a031", "score": "0.5801814", "text": "public function _authenticate() {\n if ($this->_isPublic) {\n return;\n }\n\n if ($accessToken = \\Flannel\\Core\\Input::server('HTTP_ACCESS_TOKEN')) {\n try {\n $data = \\Flannel\\Core\\JWT::decode($accessToken);\n $user = (new \\Model_User())->load($data->id, 'uuid');\n\n // If the access key doesn't match, block the user\n if ($data->ak != $user->getAccessKey()) {\n $this->unauthorized();\n }\n\n // Block access if the status isn't enabled\n if ($user->getStatus() != \\Model_User::STATUS_ENABLED) {\n $this->unauthorized();\n }\n\n // Block access if the failed login attempts are too high\n if ($user->getFailedLoginAttempts() >= 6) {\n $this->unauthorized();\n }\n\n // All checks have passed, let the user in\n $this->_user = $user;\n\n // Add the access token to the header\n header(\"Access-Token: $accessToken\");\n\n // Force the return\n return true;\n } catch (Exception $e) {\n $this->unauthorized();\n }\n }\n\n // Default to block access\n $this->unauthorized();\n }", "title": "" }, { "docid": "a4036cbb4a27d1a272f5d9987bd3cdab", "score": "0.57920736", "text": "function getOauthToken() {\n return $this->oauth_token;\n }", "title": "" }, { "docid": "79087552924ef033b3a74df6a8a1cb59", "score": "0.5791086", "text": "public function authorize()\n {\n if(!$this->session->token || !$this->session->token_secret) {\n $this->rooftop->getOAuthAccess();\n }\n\n return $this->rooftop->setOAuthAccess($this->session->token, $this->session->token_secret);\n }", "title": "" }, { "docid": "4209b7c89b96ed6bc76a15882cf34a18", "score": "0.5783867", "text": "public function initiateAuthentication()\n {\n $data = [\n \"response_type\" => \"code\",\n \"client_id\" => $this->getClientId(),\n \"redirect_uri\" => $this->getReturnUri(),\n ];\n\n header(\"Location: \" . $this->getAuthorizeUrl() . \"?\" . http_build_query($data));\n die();\n }", "title": "" }, { "docid": "f19fea9adeb1c49d93015c2829056bf2", "score": "0.57828504", "text": "private function getToken(){\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t//return array('oauth_token'=>'2316991279-qIRJpXaqHaA7CZ1PWSXQus00ux3tyDbFyHDu1Vm', 'oauth_token_secret'=>'d7wzdM4UhAAf2ejTT9CWeJdW94nkLPZZXilqJ5mQQYbEy');\n\t\t\n\t\t$oauth_nonce = md5(uniqid(rand(), true));\n\t\t$oauth_timestamp = time();\n\t\t$url=$this->config['TOKEN_URL'];\n\t\t\n\t\t$signature_parts=array();\n\t\t\n\t\t\n\t\t$signature_parts[]='oauth_consumer_key='.$this->config['API_KEY'];\n\t\t$signature_parts[]='oauth_nonce='.$oauth_nonce;\n\t\t$signature_parts[]='oauth_signature_method=HMAC-SHA1';\n\t\t$signature_parts[]='oauth_timestamp='.$oauth_timestamp;\n\t\t$signature_parts[]='oauth_version=1.0';\n\t\t//$signature_parts[]='oauth_callback='.$this->config['REDIRECT_URI'];\n\t\t\n\t\t$signature_base='POST&'.rawurlencode($url).'&'.rawurlencode(implode('&', $signature_parts));\n\t\t//$signature_base='GET&'.rawurlencode($url).'&'.rawurlencode(implode('&', $signature_parts));\n\t\t//$signature_base=' GET&https%3A%2F%2Fapi.twitter.com%2Foauth%2Frequest_token&oauth_consumer_key%3DzBD3u6X66IUFhZLzWUaxy91Yn%26oauth_nonce%3D7ebc8554ffd31c93c2a281efb89847ab%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1467567144%26oauth_version%3D1.0';\n\t\t\n\t\t//echo $signature_base;\n\t\t$key = $this->config['CLIENT_SECRET'].\"&\";\n\t\t$oauth_signature = base64_encode(hash_hmac(\"sha1\", $signature_base, $key, true));\n\t\t\n\t\t//var_dump($oauth_signature);\n\t\t\n\t\t\n\t\t/*$oauth_base_text = \"POST&\";\n\t\t $oauth_base_text .= urlencode('https://api.twitter.com/oauth/request_token').\"&\";\n\t\t$oauth_base_text .= urlencode(\"oauth_consumer_key=\".$this->config['API_KEY'].\"&\");\n\t\t$oauth_base_text .= urlencode(\"oauth_nonce=\".$oauth_nonce.\"&\");\n\t\t$oauth_base_text .= urlencode(\"oauth_signature_method=HMAC-SHA1&\");\n\t\t$oauth_base_text .= urlencode(\"oauth_timestamp=\".$oauth_timestamp.\"&\");\n\t\t$oauth_base_text .= urlencode(\"oauth_version=1.0\");\n\t\t$oauth_base_text .= urlencode(\"oauth_callback=\".urlencode($this->config['REDIRECT_URI']).\"&\");\n\t\t\n\t\t$key = $this->config['CLIENT_SECRET'].\"&\";\n\t\t\t\n\t\t$oauth_signature = base64_encode(hash_hmac(\"sha1\", $oauth_base_text, $key, true));\n\t\t*/\n\t\t\n\t\t\n\t\t$params=array();\n\t\t/*$params[]='oauth_consumer_key='.$this->config['API_KEY'];\n\t\t $params[]='oauth_nonce='.$oauth_nonce;\n\t\t$params[]='oauth_signature='.rawurlencode($oauth_signature);\n\t\t$params[]='oauth_signature_method=HMAC-SHA1';\n\t\t$params[]='oauth_timestamp='.$oauth_timestamp;\n\t\t$params[]='oauth_version=1.0';\n\t\t$params[]='oauth_callback='.rawurlencode($this->config['REDIRECT_URI']);*/\n\t\t\n\t\t\n\t\t$params['oauth_consumer_key']=$this->config['API_KEY'];\n\t\t$params['oauth_nonce']=$oauth_nonce;\n\t\t$params['oauth_signature']=urlencode($oauth_signature);\n\t\t$params['oauth_signature_method']='HMAC-SHA1';\n\t\t$params['oauth_timestamp']=$oauth_timestamp;\n\t\t$params['oauth_version']='1.0';\n\t\t\n\t\t$href = $url/*.'?'.implode('&', $params)*/;\n\t\t\n\t\t$curl = curl_init();\n\t\tcurl_setopt($curl, CURLOPT_URL, $href);\n\t\tcurl_setopt($curl, CURLOPT_POST, 1);\n\t\tcurl_setopt($curl, CURLOPT_POSTFIELDS, array());\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n\t\tcurl_setopt($curl, CURLINFO_HEADER_OUT, 1);\n\t\tcurl_setopt($curl, CURLOPT_HEADER, false);\n\t\t//curl_setopt($curl, CURLOPT_HEADERFUNCTION, array($this, 'curlHeader'));\n\t\tif(!empty($params)) {\n\t\t\tuksort($params, 'strcmp');\n\t\t\t$encoded_quoted_pairs = array();\n\t\t\tforeach ($params as $k => $v) {\n\t\t\t\t$encoded_quoted_pairs[] = \"{$k}=\\\"{$v}\\\"\";\n\t\t\t}\n\t\t\t$header = 'Authorization: OAuth ' . implode(', ', $encoded_quoted_pairs);\n\t\t\t\t\n\t\t\t\t\n\t\t}\n\t\tcurl_setopt($curl, CURLOPT_HTTPHEADER, array($header));\n\t\t\n\t\t$result = curl_exec($curl);\n\t\tcurl_close($curl);\n\t\tparse_str($result, $tokenInfo);\n\t\t\n\t\tif(isset($tokenInfo['oauth_token'])){\n\t\t\treturn $tokenInfo;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t\n\t\t$oauth_nonce = md5(uniqid(rand(), true));\n\t\t$oauth_timestamp = time();\n\t\t\n\t\t\n\t\t\n\t\t$url=$this->config['TOKEN_URL'];\n\t\t\n\t\t$oauth_base_text = \"GET&\";\n\t\t$oauth_base_text .= urlencode($url).\"&\";\n\t\t$oauth_base_text .= urlencode(\"oauth_callback=\".urlencode($this->config['REDIRECT_URI']).\"&\");\n\t\t$oauth_base_text .= urlencode(\"oauth_consumer_key=\".$this->config['API_KEY'].\"&\");\n\t\t$oauth_base_text .= urlencode(\"oauth_nonce=\".$oauth_nonce.\"&\");\n\t\t$oauth_base_text .= urlencode(\"oauth_signature_method=HMAC-SHA1&\");\n\t\t$oauth_base_text .= urlencode(\"oauth_timestamp=\".$oauth_timestamp.\"&\");\n\t\t$oauth_base_text .= urlencode(\"oauth_version=1.0\");\n\t\t\n\t\t$key = $this->config['CLIENT_SECRET'].\"&\";\n\t\t\t\n\t\t$oauth_signature = base64_encode(hash_hmac(\"sha1\", $oauth_base_text, $key, true));\n\t\t\n\t\t\n\t\t\n\t\t$params=array();\n\t\t$params['oauth_consumer_key']=$this->config['API_KEY'];\n\t\t$params['oauth_nonce']=$oauth_nonce;\n\t\t$params['oauth_signature_method']='HMAC-SHA1';\n\t\t$params['oauth_signature']=$oauth_signature;\n\t\t$params['oauth_version']='1.0';\n\t\t$params['oauth_timestamp']=$oauth_timestamp;\n\t\t$params['oauth_callback']=urlencode($this->config['REDIRECT_URI']);\n\t\t\n\t\t\n\t\t$href = $url . '?' . urldecode(http_build_query($params));\n\t\t\n\t\t$curl = curl_init();\n\t\tcurl_setopt($curl, CURLOPT_URL, $href);\n\t\tcurl_setopt($curl, CURLOPT_POST, 0);\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n\t\t$result = curl_exec($curl);\n\t\tcurl_close($curl);\n\t\t//echo $result;\n\t\tparse_str($result, $tokenInfo);\n\t\t\n\t\tif(isset($tokenInfo['oauth_token'])){\n\t\t\treturn $tokenInfo;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "2fccadf135540b384005e910fcef0eb8", "score": "0.5780843", "text": "function get_auth_token()\r\n\t{\r\n\t\t//get_auth_token\r\n\t\t$data = $this->custom_db->single_table_records('temp_cache', '*', array('domain_list_fk' => get_domain_auth_id(), 'type' => 'travelyaari'));\r\n\t\tif ($data['status']== SUCCESS_STATUS) {\r\n\t\t\treturn $data['data'][0];\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "c55dddd284ba16680d037ee5988b714f", "score": "0.5773308", "text": "public function call() {\n\t\t$token_received = $this->app->request->headers->get('Authorization');\n\t}", "title": "" }, { "docid": "70f510106d308fbaa8253337171c629b", "score": "0.5765219", "text": "function checkAuth() {\r\n\t\t//only deal with tokens on first login attempt - otherwise call the parent function\r\n\t\tif ($this->getAuthData('checkedToken')) {\r\n\t\t\t$this->log('token already checked - calling parent auth function');\r\n\t\t\treturn parent::checkAuth();\r\n\t\t}\r\n\t\t$this->setAuthData('checkedToken',true); // critical - without this the parent function is never called\r\n\t\t$this->log('checking token');\r\n global $_COOKIE;\r\n\t\tif (!array_key_exists($this->tokenCookieName,$_COOKIE)) {\r\n\t\t\t$this->log('cookie not set - initial auth failed');\r\n\t\t\treturn parent::checkAuth();\r\n\t\t}\r\n $user_id=$_COOKIE[$this->tokenCookieName]['user_id'];\r\n $token=$_COOKIE[$this->tokenCookieName]['token'];\r\n\r\n if (!$user_id || !$token) {\r\n\t\t\t$this->log('user_id or token is null - initial auth failed');\r\n return parent::checkAuth();\r\n }\r\n\r\n\t\t$db=createDB();\r\n\t\t// maintenance - delete all entries older than one month - probability 5%\r\n\t\tif (mt_rand(1,20)==20) {\r\n\t\t\t$db->exec('DELETE FROM user_remember_me WHERE TIMESTAMPDIFF(DAY,NOW(),created_on)>31');\r\n\t\t}\r\n\t\t$result=$db->query(\"SELECT token,username FROM user_remember_me urm,users u WHERE urm.user_id=$user_id AND u.user_id=urm.user_id\");\r\n\t\t// there can be many entries in the database if the user uses multiple computers\r\n\t\twhile ($row=$result->fetchRow()) { \r\n\t\t\t$this->log('checking tokens...');\r\n\t\t\tif ($token==$row['token']) {\r\n\t\t\t\t$this->log('token found - should log in now');\r\n $this->token=$token; // necessary for updateToken to work properly\r\n\t\t\t\t$this->updateToken();\r\n\t\t\t\t$this->username=$row['username'];\r\n $this->setAuthData('usedToken',true);\r\n return true; // the return true is what actually logs them on\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn parent::checkAuth(); // used to return false - but that led to blank screens\r\n\t}", "title": "" }, { "docid": "3e30d2e324b1d4cf8aa5b17bc2c94f26", "score": "0.5759131", "text": "public function Init()\n {\n if ((isset(Application::$Request['code']) && !isset(Application::$Session['oauthv2c']))\n ||\n (isset(Application::$Request['code']) && isset(Application::$Session['oauthv2c']) && Application::$Session['oauthv2c'] != Application::$Request['code'])\n )\n {\n if ($token = $this->GetTokenByCode(Application::$Request['code']))\n {\n if ($userInfo = $this->GetMe($token))\n {\n $this->StartSession(Application::$Request['code'], $token, $userInfo);\n Application::$Security->UserLogin($this->CurrentUserInfo->login);\n }\n else\n {\n $this->CloseSession();\n }\n }\n else\n {\n $this->CloseSession();\n }\n }\n elseif (isset(Application::$Session['oauthv2t']))\n {\n $this->RestartSession();\n }\n }", "title": "" }, { "docid": "9d53899777c7941aef5e70431573b3d9", "score": "0.57561946", "text": "public function getRequestToken();", "title": "" }, { "docid": "48f70027e906648a3f4da9cd1e6e30b5", "score": "0.57535213", "text": "public function grant_access_token() {\n $filters = array(\n \"grant_type\" => array(\"filter\" => FILTER_VALIDATE_REGEXP, \"options\" => array(\"regexp\" => REGEX_TOKEN_GRANT_TYPE), \"flags\" => FILTER_REQUIRE_SCALAR),\n \"scope\" => array(\"flags\" => FILTER_REQUIRE_SCALAR),\n \"code\" => array(\"flags\" => FILTER_REQUIRE_SCALAR),\n \"redirect_uri\" => array(\"filter\" => FILTER_VALIDATE_URL, \"flags\" => array(FILTER_FLAG_SCHEME_REQUIRED, FILTER_REQUIRE_SCALAR)),\n \"username\" => array(\"flags\" => FILTER_REQUIRE_SCALAR),\n \"password\" => array(\"flags\" => FILTER_REQUIRE_SCALAR),\n \"assertion_type\" => array(\"flags\" => FILTER_REQUIRE_SCALAR),\n \"assertion\" => array(\"flags\" => FILTER_REQUIRE_SCALAR),\n \"refresh_token\" => array(\"flags\" => FILTER_REQUIRE_SCALAR),\n );\n\n $input = filter_input_array(INPUT_POST, $filters);\n\n // Grant Type must be specified.\n if (!$input[\"grant_type\"])\n $this->error(ERROR_BAD_REQUEST, ERROR_INVALID_REQUEST);\n\n // Make sure we've implemented the requested grant type\n if (!in_array($input[\"grant_type\"], $this->get_supported_grant_types()))\n $this->error(ERROR_BAD_REQUEST, ERROR_UNSUPPORTED_GRANT_TYPE);\n\n // Authorize the client\n $client = $this->get_client_credentials();\n\n if ($this->auth_client_credentials($client[0], $client[1]) === false)\n $this->error(ERROR_BAD_REQUEST, ERROR_INVALID_CLIENT_CREDENTIALS);\n\n if (!$this->authorize_client($client[0], $input[\"grant_type\"]))\n $this->error(ERROR_BAD_REQUEST, ERROR_UNAUTHORIZED_CLIENT);\n\n // Do the granting\n switch ($input[\"grant_type\"]) {\n case AUTH_CODE_GRANT_TYPE:\n if (!$input[\"code\"] || !$input[\"redirect_uri\"])\n $this->error(ERROR_BAD_REQUEST, ERROR_INVALID_REQUEST);\n\n $stored = $this->get_stored_auth_code($input[\"code\"]);\n\n if ($stored === null || $input[\"redirect_uri\"] != $stored[\"redirect_uri\"] || $client[0] != $stored[\"client_id\"])\n $this->error(ERROR_BAD_REQUEST, ERROR_INVALID_GRANT);\n\n if ($stored[\"expires\"] > time())\n $this->error(ERROR_BAD_REQUEST, ERROR_INVALID_GRANT);\n\n break;\n case USER_CREDENTIALS_GRANT_TYPE:\n if (!$input[\"username\"] || !$input[\"password\"])\n $this->error(ERROR_BAD_REQUEST, ERROR_INVALID_REQUEST);\n\n $stored = $this->check_user_credentials($client[0], $input[\"username\"], $input[\"password\"]);\n\n if ($stored === false)\n $this->error(ERROR_BAD_REQUEST, ERROR_INVALID_GRANT);\n\n break;\n case ASSERTION_GRANT_TYPE:\n if (!$input[\"assertion_type\"] || !$input[\"assertion\"])\n $this->error(ERROR_BAD_REQUEST, ERROR_INVALID_REQUEST);\n\n $stored = $this->check_assertion($client[0], $input[\"assertion_type\"], $input[\"assertion\"]);\n\n if ($stored === false)\n $this->error(ERROR_BAD_REQUEST, ERROR_INVALID_GRANT);\n\n break;\n case REFRESH_TOKEN_GRANT_TYPE:\n if (!$input[\"refresh_token\"])\n $this->error(ERROR_BAD_REQUEST, ERROR_INVALID_REQUEST);\n\n $stored = $this->get_refresh_token($input[\"refresh_token\"]);\n\n if ($stored === null || $client[0] != $stored[\"client_id\"])\n $this->error(ERROR_BAD_REQUEST, ERROR_INVALID_GRANT);\n\n if ($stored[\"expires\"] > time())\n $this->error(ERROR_BAD_REQUEST, ERROR_INVALID_GRANT);\n\n break;\n case NONE_GRANT_TYPE:\n $stored = $this->check_none_access($client[0]);\n\n if ($stored === false)\n $this->error(ERROR_BAD_REQUEST, ERROR_INVALID_REQUEST);\n }\n\n // Check scope, if provided\n if ($input[\"scope\"] && (!is_array($stored) || !isset($stored[\"scope\"]) || !$this->check_scope($input[\"scope\"], $stored[\"scope\"])))\n $this->error(ERROR_BAD_REQUEST, ERROR_INVALID_SCOPE);\n\n if (!$input[\"scope\"])\n $input[\"scope\"] = null;\n\n $token = $this->create_access_token($client[0], $input[\"scope\"]);\n\n $this->send_json_headers();\n echo json_encode($token);\n }", "title": "" }, { "docid": "2bca4fbbed181257228c7f461e84137f", "score": "0.5749313", "text": "function getLoginObject($config) {\n\t\t// step1 -> get access token\n\t\t$oauth2 = $this->_getOAuth2Instance($config);\n\t\tif(!$this->request()->query('code', false)){\n\t\t\t$this->request()->session()->delete('oauth_token');\n\n\t\t\t// append state param to make the request more secured\n\t\t\t$state = $this->_createOAuth2State();\n\t\t\t$this->request()->session()->save('oauth_state', $state);\n\t\t\t$oauth2->setState($state);\n\n\t\t\t$oauth2 = $this->_getOAuth2Instance();\n\t\t\t$authUrl = $oauth2->getAuthenticationUrl();\n\n\t\t\theader('Location: ' . $authUrl);\n\t\t\tdie('Redirect');\n\t\t}else if(!$this->request()->session()->get('oauth_token', false)){\n\t\t\t$accessToken = $oauth2->requestAccessToken();\n\t\t\t$this->request()->session()->save('oauth_token', $accessToken);\n\t\t}else{\n\t\t\t$accessToken = $this->request()->session()->get('oauth_token', false);\n\t\t}\n\n\t\t// verify oauth state\n\t\t$oauthState = $this->request()->query('state', '');\n\t\t$state = $this->request()->session()->get('oauth_state', 'invalid');\n\t\tif($oauthState!=$state){\n\t\t\tthrow new OAuth2Exception('The state parameter from OAuth2 response doesn\\'t match the users state parameter.');\n\t\t}\n\n\t\t$oauth2->setAccessToken($accessToken);\n\n\t\tif($this->isArray($accessToken) && isset($accessToken['result']['error']))\n\t\t{\n\t\t\t$this->request()->session()->delete('oauth_token');\n\t\t\t$this->_redirectToLoginPage($config);\n\t\t}\n\n\t\t// step2 -> return the login object with auth token\n\t\t$login = new Login('', '');\n\t\t$login->setAttribute('oauth2_server', $oauth2);\n\t\t$login->setAttribute('oauth2_roles', $this->_oauth2Roles);\n\n\t\treturn $login;\n\t}", "title": "" }, { "docid": "44cae3b5d76de0141d8b38654d2abae1", "score": "0.57490885", "text": "abstract public function hasAccessToken();", "title": "" }, { "docid": "411d40db0e932a1899cd597fecb5c6bd", "score": "0.5743816", "text": "public function auth()\n {\n if($this->session->userdata('access_token') && $this->session->userdata('access_token_secret'))\n {\n // User is already authenticated. Add your user notification code here.\n redirect(base_url('/'));\n }\n else\n {\n // Making a request for request_token\n $request_token = $connection->getRequestToken(base_url('/twitter/callback'));\n\n $this->session->set_userdata('request_token', $request_token['oauth_token']);\n $this->session->set_userdata('request_token_secret', $request_token['oauth_token_secret']);\n\n if($connection->http_code == 200)\n {\n $url = $connection->getAuthorizeURL($request_token);\n redirect($url);\n }\n else\n {\n // An error occured. Make sure to put your error notification code here.\n redirect(base_url('/'));\n }\n }\n }", "title": "" }, { "docid": "43a8121e7f38bae09c66043ced1591c7", "score": "0.57435125", "text": "public function getAccessToken();", "title": "" }, { "docid": "43a8121e7f38bae09c66043ced1591c7", "score": "0.57435125", "text": "public function getAccessToken();", "title": "" }, { "docid": "913823329fef32aa72c451f9499ce708", "score": "0.57413584", "text": "public function __construct() {\n if (!session()->get('oauth_token')) {\n Log::debug('Calling an API to get a new Access token');\n // Acquire a new token to be used by subsequent API calls\n $response = Http::post(env('APP_API_URL'). self::URI_OAUTH_TOKEN,\n [\n 'grant_type' => 'client_credentials',\n 'client_id' => env('APP_API_CLIENT_ID'),\n 'client_secret' => env('APP_API_CLIENT_SECRET')\n ]);\n\n if ($response->successful()) {\n $access_token = $response->json()['access_token'];\n session()->put('access_token', $access_token);\n Log::debug('Received new Access token');\n } else {\n Log::debug('Unable to authenticate the Application.');\n }\n }\n }", "title": "" }, { "docid": "e0bb9f5cb3d147bb3b186d28f0146d6b", "score": "0.5737915", "text": "private function access_token() {\n\t\treturn $this->create_token();\n\t}", "title": "" }, { "docid": "f648151f3c57b05619b7303cf8fcb514", "score": "0.5734957", "text": "public function authenticate()\n {\n if(!$this->isConnected()){\n return $this->getOauth()->authenticate();\n }\n return true;\n }", "title": "" }, { "docid": "f21eadb3a28bb7520fd6a1dfe0532776", "score": "0.57258403", "text": "private function getToken(){\n $useToken = false;\n\n $data = '{\n \"username\" : \"'.$this->apiLogin.'\",\n \"password\" : \"'.$this->apiPassword.'\"\n }';\n\n $result = $this->post('/authentication/v1/partner/', $data, $useToken);\n\n $response = $this->jsonDecode($result);\n\n if(array_key_exists(\"accessToken\", $response))\n return $response[\"accessToken\"];\n else\n return null;\n\n }", "title": "" }, { "docid": "1be13232a6a915ec9c6dc6720d9b5cd3", "score": "0.57184166", "text": "public function check() {\n\n if ($this->user !== null) {\n return true;\n }\n\n $response = app(Response::class);\n $request = app(Request::class);\n\n if (is_array($tokenPayload = $this->authenticator->isTokenValid( $request ))) {\n return $response->header('Authorization', 'Bearer '. $this->authenticator->generateToken($tokenPayload) );\n }\n\n if (is_array( $refreshToken = $this->authenticator->isRefreshTokenValid($request) )) {\n\n $this->authenticator->revokeRefreshToken($request);\n $this->authenticator->generateRefreshToken(false, $refreshToken['user_id']);\n\n return $response->header(\n 'Authorization',\n 'Bearer '. $this->authenticator->generateToken( User::find($refreshToken['user_id'])->toArray() )\n );\n }\n\n $this->user = null;\n \n return false;\n }", "title": "" }, { "docid": "60be5363298d954b12ac4f85791c4ac4", "score": "0.57166356", "text": "function retrieveToken()\r\n{\r\n $header = 'Authorization: Basic ' . base64_encode($_SESSION['clientid'] . ':' . $_SESSION['clientsecret']);\r\n $fields_string = '';\r\n $fields = array(\r\n 'grant_type' => 'authorization_code',\r\n 'code' => $_GET['code']\r\n );\r\n foreach ($fields as $key => $value) {\r\n $fields_string .= $key . '=' . $value . '&';\r\n }\r\n rtrim($fields_string, '&');\r\n $ch = curl_init();\r\n\r\n curl_setopt_array(\r\n $ch,\r\n array(\r\n CURLOPT_URL => CREST_BASE_URL . CREST_TOKEN_URL,\r\n CURLOPT_POST => true,\r\n CURLOPT_POSTFIELDS => $fields_string,\r\n CURLOPT_HTTPHEADER => array($header),\r\n CURLOPT_RETURNTRANSFER => true,\r\n CURLOPT_USERAGENT => USER_AGENT,\r\n CURLOPT_SSL_VERIFYPEER => true,\r\n CURLOPT_SSL_CIPHER_LIST => 'TLSv1', //prevent protocol negotiation fail\r\n )\r\n );\r\n $resBody = curl_exec($ch);\r\n $info = curl_getinfo($ch);\r\n $err = curl_errno($ch);\r\n $errmsg = curl_error($ch);\r\n if ($err != 0) {\r\n throw new Exception($errmsg, $err);\r\n }\r\n if (!in_array($info['http_code'], array(200, 302))) {\r\n throw new Exception(\r\n 'HTTP response not OK: ' . (int)$info['http_code'] . '. response body: ' . $resBody,\r\n $info['http_code']\r\n );\r\n }\r\n curl_close($ch);\r\n $response = json_decode($resBody);\r\n\r\n $_SESSION['refresh_token'] = $response->refresh_token;\r\n $_SESSION['step'] = 3;\r\n}", "title": "" }, { "docid": "36c7f4439e2349f1b06d6f860d98ae2b", "score": "0.5710028", "text": "public function int_callback(){\n\t\tif (array_key_exists('code', $_GET) && !empty($_GET['code'])){\n\t\t\t$url = 'https://oauth.vk.com/access_token'; //DGB 2012-11-06 Notice VK documentation is wrong, because they DO require HTTPS\n\t\t\t$params = array(\n\t\t\t\t'client_id' =>$this->strategy['app_id'],\n\t\t\t\t'client_secret' => $this->strategy['app_secret'],\n\t\t\t\t'code' => $_GET['code'], \n\t\t\t\t'redirect_uri'=> $this->strategy['redirect_uri'],\n\t\t\t);\n\t\t\t$response = $this->serverGet($url,$params,false,$headers);\n\t\t\tif (empty($response)){\n\t\t\t\t$error = array(\n\t\t\t\t\t'code' => 'Get access token error',\n\t\t\t\t\t'message' => 'Failed when attempting to get access token',\n\t\t\t\t\t'raw' => array(\n\t\t\t\t\t\t'headers' => $headers\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\texit();\n\t\t\t\t$this->errorCallback($error);\n\t\t\t}\n\t\t\t$results=json_decode($response,true);\t\n\t\t\t$vkuser_ = $this->getuser($results['access_token'],$results['user_id']); \n\t\t\t$vkuser = $vkuser_['response']['0'];\n\t\t\t\t$this->auth = array(\n\t\t\t\t\t'provider' => 'VKontakte',\n\t\t\t\t\t'uid' => $vkuser['uid'],\n\t\t\t\t\t'info' => array(\n\t\t\t\t\t),\n\t\t\t\t\t'credentials' => array(\n\t\t\t\t\t\t'token' => $results['access_token'],\n\t\t\t\t\t\t'expires' => date('c', time() + $results['expires_in'])\n\t\t\t\t\t),\n\t\t\t\t\t'raw' => $vkuser\n\t\t\t\t);\n\t\t\t\n\t\t\t\tif (!empty($vkuser['first_name'])) $this->auth['info']['name'] = $vkuser['first_name'];\n\t\t\t\tif (!empty($vkuser['screen_name'])) $this->auth['info']['nickname'] = $vkuser['screen_name'];\n\t\t\t\tif (!empty($vkuser['sex']) and ($vkuser['sex']!='0')) $this->auth['info']['gender']=($vkuser['sex']=='1')?'female':'male';\n\t\t\t\tif (!empty($vkuser['photo_big'])) $this->auth['info']['image'] = $vkuser['photo_big'];\n\t\t\t\tif (!empty($results['email'])) $this->auth['info']['email'] = $results['email'];\n\n $this->callback();\n\n\t\t\t\t // If the data doesn't seem to be written to the session, it is probably because your sessions are\n\t\t\t\t// stored in the database and your session table is not encoded in UTF8. \n\t\t\t\t// The following lines will jump over the security but will allow you to use\n\t\t\t\t // the plugin without utf8 support in the database.\n\n // $completeUrl = Configure::read('Opauth._cakephp_plugin_complete_url');\n // if (empty($completeUrl)) $completeUrl = Router::url('/opauth-complete');\n // $CakeRequest = new CakeRequest('/opauth-complete');\n // $data['auth'] = $this->auth;\n // $CakeRequest->data = $data;\n // $Dispatcher = new Dispatcher();\n // $Dispatcher->dispatch( $CakeRequest, new CakeResponse() );\n // exit();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$error = array(\n\t\t\t\t'code' => isset($_GET['error'])?$_GET['error']:0,\n\t\t\t\t'message' => isset($_GET['error_description'])?$_GET['error_description']:'',\n\t\t\t\t'raw' => $_GET\n\t\t\t);\n\t\t\t\n\t\t\t$this->errorCallback($error);\n\t\t}\n\t}", "title": "" }, { "docid": "5cc56fc38d0bda0635da7a93b5fa420d", "score": "0.57092714", "text": "function getRequestToken( $oauth_callback = NULL )\n\t{\n\t\t$parameters = array();\n\t\tif( ! empty( $oauth_callback ) ) :\n\t\t\t$parameters[\"oauth_callback\"] = $oauth_callback;\n\t\tendif;\n\t\t$request = $this -> oAuthRequest( $this -> requestTokenURL(), 'GET', $parameters );\n\t\t$token = OAuthUtil::parse_parameters( $request );\n\t\t$this -> token = new OAuthConsumer( $token['oauth_token'], $token['oauth_token_secret'] );\n\t\treturn $token;\n\t}", "title": "" }, { "docid": "29d76dfd9e4f9833f5521d5e52155d48", "score": "0.57054186", "text": "function indieAuth($endpoint, $token, $me = '') {\n /**\n * Check token is valid\n */\n if ( $me == '' ) { $me = $_SERVER['HTTP_HOST']; }\n $ch = curl_init($endpoint);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_HTTPHEADER,\n Array(\"Accept: application/json\",\"Authorization: $token\"));\n $token_response = strval(curl_exec($ch));\n curl_close($ch);\n if (empty($token_response)) {\n # strval(FALSE) is an empty string\n quit(502, 'connection_problem', 'Unable to connect to token service');\n }\n $response = json_decode($token_response, true, 2);\n if (!is_array($response) || json_last_error() !== \\JSON_ERROR_NONE) {\n parse_str($token_response, $response);\n }\n if (empty($response) || isset($response['error']) || ! isset($response['me']) || ! isset($response['scope']) ) {\n quit(401, 'insufficient_scope', 'The request lacks authentication credentials');\n } elseif ($response['me'] != $me) {\n quit(401, 'insufficient_scope', $me . ' lacks valid authentication credentials');\n } elseif (is_array($response['scope']) && !in_array('create', $response['scope']) && !in_array('post', $response['scope'])) {\n quit(403, 'forbidden', 'Client does not have access to this resource');\n } elseif ((FALSE === stripos($response['scope'], 'create')) && (FALSE === stripos($response['scope'], 'post'))) {\n quit(403, 'Forbidden', 'Client does not have access to this resource');\n }\n // we got here, so all checks passed. return true.\n return true;\n}", "title": "" }, { "docid": "14b8194406e3a7aeb8e22cf45efcf5ad", "score": "0.5704572", "text": "function authorize()\n\t{\n\t\t$user_id = $this->session->userdata('user_id');\n\t\t$client = $this->session->userdata('client_details');\n\t\t$params = $this->session->userdata('params');\n\t\t\n\t\t// Check if the user is signed in\n\t\tif ($user_id == FALSE)\n\t\t{\n\t\t\t$this->session->set_userdata('sign_in_redirect', array('oauth', 'authorize'));\n\t\t\tredirect(site_url('oauth/signin'), 'location');\n\t\t}\n\t\t\n\t\t// Check the client params are stored\n\t\tif ($client == FALSE)\n\t\t{\n\t\t\t$this->_fail('invalid_request', 'No client details have been saved. Have you deleted your cookies?', NULL, array(), 400);\n\t\t\texit;\n\t\t}\n\t\t\n\t\t// Check the request parameters are still stored\n\t\tif ($params == FALSE)\n\t\t{\n\t\t\t$this->_fail('invalid_request', 'No client details have been saved. Have you deleted your cookies?', NULL, array(), 400);\n\t\t\texit;\n\t\t}\n\t\t\n\t\t// Has the user authorized the application?\n\t\t$doauth = $this->input->post('doauth');\n\t\tif ($doauth)\n\t\t{\t\t\n\t\t\tswitch($doauth)\n\t\t\t{\n\t\t\t\t// The user has approved the application.\n\t\t\t\tcase \"Approve\":\n\t\t\t\t\t$authorized = FALSE;\n\t\t\t\t\t$action = 'newrequest';\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t// The user has denied the application\n\t\t\t\tcase \"Deny\":\n\t\t\t\t\n\t\t\t\t\t$error_params = array(\n\t\t\t\t\t\t'error' => 'access_denied',\n\t\t\t\t\t\t'error_description' => 'The resource owner or authorization server denied the request.'\n\t\t\t\t\t);\n\t\t\t\t\tif ($params['state'])\n\t\t\t\t\t{ \n\t\t\t\t\t\t$error_params['state'] = $params['state']; \n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$redirect_uri = $this->oauth_server->redirect_uri($params['redirect_uri'], $error_params);\n\t\t\t\t\t$this->session->unset_userdata(array('params'=>'','client_details'=>'', 'sign_in_redirect'=>''));\n\t\t\t\t\tredirect($redirect_uri, 'location');\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t// Does the user already have an access token?\n\t\t\t$authorized = $this->oauth_server->access_token_exists($user_id, $client->client_id);\n\t\t\t\n\t\t\tif ($authorized)\n\t\t\t{\n\t\t\t\t$match = $this->oauth_server->validate_access_token($authorized->access_token, $params['scope']);\n\t\t\t\t$action = $match ? 'finish' : 'approve';\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Can the application be auto approved?\n\t\t\t\t$action = ($client->auto_approve == 1) ? 'newrequest' : 'approve';\n\t\t\t}\n\t\t}\n\t\t\n\t\tswitch ($action)\n\t\t{\n\t\t\tcase 'approve':\n\t\t\t\n\t\t\t\t$requested_scopes = $params['scope'];\n\t\t\t\t$scopes = $this->oauth_server->scope_details($requested_scopes);\n\t\t\t\n\t\t\t\t$vars = array(\n\t\t\t\t\t'client_name' => $client->name,\n\t\t\t\t\t'scopes' => $scopes\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$this->_data = $vars;\n\t\t\t\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'newrequest':\n\t\t\t\n\t\t\t\t$code = $this->oauth_server->new_auth_code($client->client_id, $user_id, $params['redirect_uri'], $params['scope'], $authorized->access_token);\n\t\t\t\t\n\t\t\t\t$this->fast_code_redirect($params['redirect_uri'], $params['state'], $code);\n\t\t\t\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'finish':\n\n\t\t\t\t$code = $this->oauth_server->new_auth_code($client->client_id, $user_id, $params['redirect_uri'], $params['scope'], $authorized->access_token);\n\t\t\t\t\n\t\t\t\t$this->fast_token_redirect($params['redirect_uri'], $params['state'], $code);\n\t\t\t\t\n\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "660d8123a350ab3f517512c29ea82c7a", "score": "0.5702947", "text": "public function requestAccessToken()\n {\n return $this->getAccessToken();\n }", "title": "" } ]
533a31bd18a7086bca65f0b6ee02d54c
Instantiate a field model
[ { "docid": "6df967c9d04fd1e2a93461a140c91771", "score": "0.0", "text": "private function loadChannelField(\\SplFileInfo $file)\n\t{\n\t\tstatic $fieldtypes = array();\n\n\t\tif (empty($fieldtypes))\n\t\t{\n\t\t\t$fieldtypes = ee('Model')->get('Fieldtype')->all()->pluck('name');\n\t\t}\n\n\t\t$name = $file->getFilename();\n\n\t\tif (substr_count($name, '.') !== 1)\n\t\t{\n\t\t\tthrow new ImportException(\"Invalid field definition: {$name}\");\n\t\t}\n\n\t\tlist($name, $type) = explode('.', $name);\n\n\t\tif ( ! in_array($type, $fieldtypes))\n\t\t{\n\t\t\tthrow new ImportException(\"Fieldtype not installed: {$type}\");\n\t\t}\n\n\t\t$data = json_decode(file_get_contents($file->getRealPath()), TRUE);\n\n\t\t// unusual item that has no defaults\n\t\tif ( ! isset($data['list_items']))\n\t\t{\n\t\t\t$data['list_items'] = '';\n\t\t}\n\n\t\t$field = ee('Model')->make('ChannelField');\n\t\t$field->site_id = $this->site_id;\n\t\t$field->field_name = $name;\n\t\t$field->field_type = $type;\n\n\t\t$field_data = array();\n\n\t\tforeach ($data as $key => $value)\n\t\t{\n\t\t\tif ($type == 'grid' && $key == 'columns')\n\t\t\t{\n\t\t\t\t$this->importGrid($field, $value);\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ($key == 'settings')\n\t\t\t{\n\t\t\t\t$field_data = array_merge($field_data, $value);\n\n\t\t\t\tif ($type == 'file')\n\t\t\t\t{\n\t\t\t\t\t$this->importFileField($field, $field_data);\n\t\t\t\t}\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ($key == 'list_items' && is_array($value))\n\t\t\t{\n\t\t\t\t$value = implode(\"\\n\", $value);\n\t\t\t}\n\n\t\t\t$field_data['field_'.$key] = $value;\n\t\t}\n\n\t\tif ($type == 'relationship')\n\t\t{\n\t\t\t$field_data = $this->importRelationshipField($field, $field_data);\n\t\t}\n\n\t\t$field->set($field_data);\n\n\t\t$this->applyOverrides($field, $name);\n\n\t\treturn $field;\n\t}", "title": "" } ]
[ { "docid": "8c4513e59a96984fd330ee0b5e41bd14", "score": "0.71221346", "text": "public function getFieldInstance() {\r\n\t\tif($this->fieldInstance) return $this->fieldInstance;\r\n\r\n\t\t$params = $this->params;\r\n\t\t$name = $this->name;\r\n\t\t$type = $this->type;\r\n\t\r\n\t\t// check if it's relation\r\n\t\tif (isset( $params[ \"has\" ] )) {\r\n\t\t\t$relation = \"has\";\r\n\t\t\t$relationOwns = 0;\r\n\t\t} elseif (isset( $params[ \"owns\" ] )) {\r\n\t\t\t$relation = \"owns\";\r\n\t\t\t$relationOwns = 1;\r\n\t\t}\r\n\t\t\r\n\t\t// save info about relation to be ready to say it to another side\r\n\t\tif (isset( $relation )) {\r\n\t\t\t\r\n\t\t\tlist ($quantity, $relationTargetBase) = explode( \" \", $params[ $relation ], 2 );\r\n\t\t\t\r\n\t\t\tif ($quantity == \"one\") {\r\n\t\t\t\t$this->fieldInstance = new O_Dao_Field_ToOne( $this, $name, $relationOwns, \r\n\t\t\t\t\t\t$relationTargetBase );\r\n\t\t\t} else {\r\n\t\t\t\t$this->fieldInstance = new O_Dao_Field_ToMany( $this, $name, $relationOwns, \r\n\t\t\t\t\t\t$relationTargetBase );\r\n\t\t\t\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// Custom field\r\n\t\t\tif (isset( $params[ \"custom-field-type\" ] )) {\r\n\t\t\t\t$fieldType = $params[ \"custom-field-type\" ];\r\n\t\t\t\tif (!class_exists( $fieldType )) {\r\n\t\t\t\t\tthrow new O_Ex_Config( \"Field type custom class not found\" );\r\n\t\t\t\t}\r\n\t\t\t\t$this->fieldInstance = new $fieldType( $this, $type, $this->name );\r\n\t\t\t\tif (!$this->fieldInstance instanceof O_Dao_Field_iFace) {\r\n\t\t\t\t\tthrow new O_Ex_Config( \"Wrong field type interface\" );\r\n\t\t\t\t}\r\n\t\t\t\t// Alias field\r\n\t\t\t} elseif (isset( $params[ \"alias\" ] ) && strpos( $params[ \"alias\" ], \r\n\t\t\t\t\t\".\" )) {\r\n\t\t\t\t$this->fieldInstance = new O_Dao_Field_Alias( $this, $params[ \"alias\" ] );\r\n\t\t\t\t// Alias for a number of other fields\r\n\t\t\t} elseif (isset( $params[ \"one-of\" ] ) && strpos( \r\n\t\t\t\t\t$params[ \"one-of\" ], \";\" )) {\r\n\t\t\t\t$this->fieldInstance = new O_Dao_Field_OneOf( $this );\r\n\t\t\t\t// Relative field\r\n\t\t\t} elseif (isset( $params[ \"relative\" ] ) && strpos( \r\n\t\t\t\t\t$params[ \"relative\" ], \"->\" )) {\r\n\t\t\t\t$this->fieldInstance = new O_Dao_Field_Relative( $this );\r\n\t\t\t\t// Image file\r\n\t\t\t} elseif (isset( $params[ \"image\" ] )) {\r\n\t\t\t\t$this->fieldInstance = new O_Dao_Field_Image( $this, $type, $this->name );\r\n\t\t\t\t// File\r\n\t\t\t} elseif (isset( $params[ \"file\" ] )) {\r\n\t\t\t\t$this->fieldInstance = new O_Dao_Field_File( $this, $type, $this->name );\r\n\t\t\t\t// Atomic field\r\n\t\t\t} else {\r\n\t\t\t\t$this->fieldInstance = new O_Dao_Field_Atomic( $this, $type, $this->name );\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->fieldInstance->setFieldInfo($this);\r\n\t\treturn $this->fieldInstance;\r\n\t}", "title": "" }, { "docid": "cfe5b26fe176b90b5d34ce9c32c9959a", "score": "0.6797946", "text": "public function __construct(){\n $this->objFields = new Fields();\n }", "title": "" }, { "docid": "090e373844ebbed3b9972f3f42ba0a8b", "score": "0.6774742", "text": "public function testInstantiateField()\n {\n $element = new FieldElement();\n $binding = Binding::fromElement($element);\n $this->assertInstanceOf('\\Abivia\\NextForm\\Form\\Binding\\FieldBinding', $binding);\n $this->assertEquals($element, $binding->getElement());\n\t}", "title": "" }, { "docid": "2dcb48cea2b5ac6d24292aafb03ea415", "score": "0.64679563", "text": "function entity_field_create_instance() {\n entity_property_info_cache_clear();\n}", "title": "" }, { "docid": "3d3edee480a8ef70b65c4ba523e6b578", "score": "0.6382218", "text": "public function __construct(Field $field)\n {\n $this->field = $field;\n }", "title": "" }, { "docid": "50ef731daae1797428fa35f2220933a5", "score": "0.6380544", "text": "public function __construct($field) \r\n {\r\n $this->_field = $field;\r\n }", "title": "" }, { "docid": "a9a21159e5dc3b45050d992687dc5b22", "score": "0.6368226", "text": "public function createField(Field $field)\n {\n parent::createEntity($field);\n\n return $field;\n }", "title": "" }, { "docid": "2c07590e1eac19cf45f58f270dc2e877", "score": "0.6280144", "text": "public function __construct($field)\n {\n $this->field = $field;\n }", "title": "" }, { "docid": "edf0d4c37af37383773f001f4dad6f6a", "score": "0.6261819", "text": "function create(AgreementModelField $field)\n {\n $class = 'AgreementModel'.ucfirst($field->getType()).'FieldRenderer';\n\n if($field->getIdentifier() == 'size')\n $class = 'AgreementModel'.ucfirst($field->getIdentifier()).'FieldRenderer';\n \n return new $class($field);\n }", "title": "" }, { "docid": "d25207f33efdadf81f3d0821663dae4e", "score": "0.6202757", "text": "function create_field( $field ) {\n}", "title": "" }, { "docid": "a9f1a35fec6dea1a282a942be9ad9830", "score": "0.6200227", "text": "public function newInstance(): Model;", "title": "" }, { "docid": "abd30e1564858511b7fb74fb8ecfb546", "score": "0.6136582", "text": "public static function make($fields);", "title": "" }, { "docid": "32f3524ecae66c92bee7c8fd8f7501fb", "score": "0.61081976", "text": "function create_field( $field )\n\t{\n\t\tinclude( $this->settings['path'] . 'views/field.php' );\n\t}", "title": "" }, { "docid": "0b7fde95c58bef2c70972bef5d89f138", "score": "0.6057341", "text": "function create_field( $field )\n\t{\n\t\t// let post_object create the field\n\t\t$field['type'] = 'post_object';\n\t\t\n\t\tdo_action('acf/create_field', $field );\n\t}", "title": "" }, { "docid": "be43e1da38c9a93582f05645b9f56c01", "score": "0.604714", "text": "public function __construct( $field = null ){\n\t\t$this->field = $field;\n\t}", "title": "" }, { "docid": "51e66f7d1fa2a97d53175f7c674a7072", "score": "0.6017072", "text": "public function __construct()\n {\n $this->setFields([\n 'mapped_field' => (new StringField)->map(),\n 'unique_field' => (new StringField)->unique(),\n ]);\n }", "title": "" }, { "docid": "dd079ca973f8bb6ff045c50a8d27a967", "score": "0.6014846", "text": "public function createField(array $fieldInfo) : DBField{\n $field = new DBField();\n $field->name = $fieldInfo['Field'];\n $field->type = $fieldInfo['Type'];\n $field->null = $fieldInfo['Null'] == 'YES';\n $field->primary = $fieldInfo['Key'] == 'PRI';\n $field->default = $fieldInfo['Default'];\n $field->extra = $fieldInfo['Extra'];\n return $field;\n }", "title": "" }, { "docid": "0a475aae232b4deab3927600b9aabb48", "score": "0.60121995", "text": "public static function make($fields = null) : SimplemdeFields\n {\n return new self($fields, SimplemdeField::class);\n }", "title": "" }, { "docid": "fe78d4727d8ae5f45e03d7ba51e26cc2", "score": "0.60095775", "text": "public static function getInstance(string $field) : \\codename\\core\\value\\text\\modelfield {\n return self::$cached[$field] ?? self::$cached[$field] = new self($field);\n }", "title": "" }, { "docid": "c1e353fdc80b599e3781bfaeeba6ad91", "score": "0.5967475", "text": "public function __construct()\n {\n parent::__construct();\n $this->fields = [\n \"topic\" => new IntegerField(),\n \"text\" => new StringField(),\n \"created\" => new IntegerField([\"default\" => time()]),\n ];\n }", "title": "" }, { "docid": "80dd98d0f42acefbdc42c0deacf249a4", "score": "0.5936222", "text": "public function newModel();", "title": "" }, { "docid": "61e0aa8d3ca6260d318ce18dd86826e6", "score": "0.5928028", "text": "public abstract function createField(array $fieldInfo) : \\Howl\\Core\\DBField;", "title": "" }, { "docid": "be91065e778da11e90cd9aee92253d0b", "score": "0.5918425", "text": "public static function field($field, $options = NULL)\n\t{\n\t\t$class = Yada::class_name('field', $field);\n\t\treturn new $class($options);\n\t}", "title": "" }, { "docid": "f84850e0868bcfddc2fa4574dcd935fd", "score": "0.59148884", "text": "function __construct(){\n\t\t\t$this->model = new model(); //variabel model merupakan objek baru yang dibuat dari class model\n\t\t}", "title": "" }, { "docid": "5859ea36b6afb159c0dc8aafbe16531b", "score": "0.5886161", "text": "static function __model($f = false){\n\t\t/////////////////////////////////////////\n\t\t// begin custom fields definition:\n if($f === false) $f = new stdClass();\n\n\t\t// define custom database fields\n $f->modelname = zajDb::text();\n $f->parent = zajDb::text();\n $f->field = zajDb::text();\n $f->locale = zajDb::text();\n $f->value = zajDb::textarea();\n\n\t\t// do not modify the line below!\n return parent::__model($f);\n\t}", "title": "" }, { "docid": "1b55c8eda1ae16984956faf3fd3bfb4c", "score": "0.58667517", "text": "public static function make($fields = null) : EasymdeFields\n {\n return new self($fields, EasymdeField::class);\n }", "title": "" }, { "docid": "2185c9a92fca9e6ccca8d6047c803497", "score": "0.5864705", "text": "public function makeModel();", "title": "" }, { "docid": "8cd40b04ca2dc38b8bedf8c8bd89631a", "score": "0.58502483", "text": "public static function fieldsFactory(): FieldsFactory\n {\n //====================================================================//\n // Initialize Field Factory Class\n if (isset(self::$fieldsFactory)) {\n return self::$fieldsFactory;\n }\n //====================================================================//\n // Initialize Class\n self::$fieldsFactory = new FieldsFactory();\n //====================================================================//\n // Load Translation File\n Splash::translator()->load(\"objects\");\n\n return self::$fieldsFactory;\n }", "title": "" }, { "docid": "ad446e0b65c6b624e87be630cbcd42c1", "score": "0.58299446", "text": "public function field()\n {\n return $this->belongsTo('Streams\\Model\\FieldModel');\n }", "title": "" }, { "docid": "aa07f81bedfa3036eaed22d0329265c4", "score": "0.5827116", "text": "public function __construct(DvsField $Field)\n\t{\n\t\t$this->Field = $Field;\n//\t\t$this->GlobalField = $GlobalField;\n\t}", "title": "" }, { "docid": "2e688bd2be44f1a46f885495bec3394a", "score": "0.58227074", "text": "function __construct($fieldName) {\r\n\t\t$this->fieldName = $fieldName;\r\n\t}", "title": "" }, { "docid": "752588d3578f207f32d435ba2ae93726", "score": "0.58000886", "text": "public function initialize_fields() {\n\t\t\tWPS\\Core\\Fields::get_instance();\n\t\t}", "title": "" }, { "docid": "e976a926a1483689f08d435e07fee893", "score": "0.57866925", "text": "function __construct()\n {\n $this->fields_map = new Fields_map();\n }", "title": "" }, { "docid": "455b39c759dc5b3a0e4f8b0808999d9c", "score": "0.57849526", "text": "public function createModel()\n {\n $model = $this->getModel();\n return new $model;\n }", "title": "" }, { "docid": "829c5edb3b23d724b3952e44ea51573c", "score": "0.5772548", "text": "public function field();", "title": "" }, { "docid": "829c5edb3b23d724b3952e44ea51573c", "score": "0.5772548", "text": "public function field();", "title": "" }, { "docid": "571b8f369aa0eeb15e12d8bac481f7c2", "score": "0.5745251", "text": "public function __construct() {\n\n\t\tself::$numInstances++; \n\n\t\t$this->set('label', ''); \t// primary clikable label\n\t\t$this->set('description', ''); \t// descriptive copy, below label\n\t\t$this->set('icon', ''); // optional icon name to accompany label\n\t\t$this->set('notes', ''); \t// highlighted descriptive copy, below output of input field\n\t\t$this->set('head', ''); \t// below label, above description\n\t\t$this->set('required', 0); \t// set to 1 to make value required for this field\n\t\t$this->set('requiredIf', ''); // optional conditions to make it required\n\t\t$this->set('collapsed', ''); \t// see the collapsed* constants at top of class (use blank string for unset value)\n\t\t$this->set('showIf', ''); \t\t// optional conditions selector\n\t\t$this->set('columnWidth', ''); \t// percent width of the field. blank or 0 = 100.\n\t\t$this->set('skipLabel', self::skipLabelNo); // See the skipLabel constants\n\t\t$this->set('wrapClass', ''); // optional class to apply to the Inputfield wrapper (contains InputfieldHeader + InputfieldContent)\n\t\t$this->set('headerClass', ''); // optional class to apply to InputfieldHeader wrapper\n\t\t$this->set('contentClass', ''); // optional class to apply to InputfieldContent wrapper\n\t\t$this->set('textFormat', self::textFormatBasic); // format applied to description and notes\n\t\t$this->set('renderValueFlags', 0); // see renderValue* constants, applicable to renderValue mode only\n\n\t\t// default ID attribute if no 'id' attribute set\n\t\t$this->defaultID = $this->className() . self::$numInstances; \n\n\t\t$this->setAttribute('id', $this->defaultID); \n\t\t$this->setAttribute('class', ''); \n\t\t$this->setAttribute('name', ''); \n\n\t\t$value = $this instanceof InputfieldHasArrayValue ? array() : null;\n\t\t$this->setAttribute('value', $value); \n\t}", "title": "" }, { "docid": "a89e9ae9de746848fb7abcdb587367fb", "score": "0.57434225", "text": "public function create(): VirtualFieldEntity\n {\n return new VirtualFieldEntity($this->virtualFieldName, $this->virtualType);\n }", "title": "" }, { "docid": "97ddebe08e98a2e23bdd5f81a81a9b56", "score": "0.57418025", "text": "public function newInstance()\n {\n return $this->model->newInstance();\n }", "title": "" }, { "docid": "ab47b39a66f859979e745ff22733bd44", "score": "0.5739448", "text": "public static function newModel()\n {\n $model = static::$model;\n\n return new $model;\n }", "title": "" }, { "docid": "ab47b39a66f859979e745ff22733bd44", "score": "0.5739448", "text": "public static function newModel()\n {\n $model = static::$model;\n\n return new $model;\n }", "title": "" }, { "docid": "b5be396bb18e3cf33395ce05e68a79bc", "score": "0.5724626", "text": "public function createInstance()\n {\n $class = $this->getClass();\n $model = new $class;\n\n return $model;\n }", "title": "" }, { "docid": "b372539ddc474e9f583894aa0bb1e60e", "score": "0.57197523", "text": "private function makeAttributes(){\n\n foreach ($this->fields as $key => $field) {\n\n $key = strtolower($key);\n\n if (is_array($field)) {\n $this->{$key} = new Field($key);\n if (isset($field['validates'])) {\n\n $validates = $field['validates'];\n //correção para forçar um array de validades\n if (!isset($validates[0])) {\n $validates = [$validates];\n }\n\n foreach ($validates as $key1 => $validate) {\n if (isset($validate['require'])) {\n $this->{$key}->setRequired((bool)$validate['require']);\n break;\n }\n }\n }\n if (isset($field['type'])) {\n $this->{$key}->setType($field['type']);\n }\n if( isset($field['ignore']) ){\n $this->{$key}->setIgnore($field['ignore']);\n }\n if( isset($field['date_format']) ){\n $this->{$key}->setDateFormat($field['date_format']);\n }\n if( isset($field['empty_value']) ){\n $this->{$key}->setEmptyValue($field['empty_value']);\n }\n } else {\n $this->{strtolower($field)} = new Field(strtolower($field));\n }\n }\n\n $this->created_at = new Field('created_at', date('Y-m-d H:i:s'));\n $this->created_at->setValue(date('Y-m-d H:i:s'));\n $this->id = new Field('id');\n\n }", "title": "" }, { "docid": "58d96fdf95843a17f5c9c81f7442b4c5", "score": "0.5714677", "text": "abstract public function createModel();", "title": "" }, { "docid": "84cd49aed1baa64d1664b3dd285167ed", "score": "0.57136565", "text": "public function __construct()\n {\n $this->fields = array_merge($this->parentFields, $this->fields);\n if (Cache::has('admin_' . $this->table . '_field_construct')) {\n $values = Cache::get('admin_' . $this->table . '_field_construct');\n $this->fields = $values;\n }\n }", "title": "" }, { "docid": "9ffaacf950b6127f20a534b0f3539554", "score": "0.5711122", "text": "public function getFieldInstanceByName($name)\n\t{\n\t\tswitch ($name) {\n\t\t\tcase 'value':\n\t\t\t\treturn Vtiger_Field_Model::getInstance($this->get('field'), Vtiger_Module_Model::getInstance($this->get('tabid')));\n\t\t\tcase 'roles':\n\t\t\tcase 'roleid':\n\t\t\t\treturn Vtiger_Field_Model::getInstance('roleid', Vtiger_Module_Model::getInstance('Users'));\n\t\t\tcase 'smowners':\n\t\t\tcase 'assign':\n\t\t\t\treturn Vtiger_Field_Model::getInstance('assigned_user_id', Vtiger_Module_Model::getInstance($this->get('tabid')));\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "81a5b10991f08e2f6d5c8c9834e09519", "score": "0.56825054", "text": "public function __construct($fields){\n $this->fields = $fields;\n }", "title": "" }, { "docid": "99c01c9c09025eda4348b8c2db08ea2d", "score": "0.56819504", "text": "public function __construct()\n {\n $this->model = new PembeliModel();\n }", "title": "" }, { "docid": "358da1a7df049a56e5fb26973bc06350", "score": "0.56631905", "text": "public function load_fields() {}", "title": "" }, { "docid": "7e7de1bf8a41dbf49e7882b022b3306c", "score": "0.5657187", "text": "abstract protected function makeFieldDefinition($field_name, $definition);", "title": "" }, { "docid": "e9b6f637b02b3b72e6e47f1428a55733", "score": "0.56563115", "text": "public function __construct()\n {\n $this->model = app()->make($this->model);\n }", "title": "" }, { "docid": "caf03e64f38c2e5490de6a58cb41dbc0", "score": "0.56480753", "text": "public function initModel(){\n // init Model\n $model = \"App\\Api\\V1\\Models\\\\\".ucfirst(substr($this->resource,0,-1));\n $this->model = new $model;\n }", "title": "" }, { "docid": "fed88c17548dfdd00aa1281b24dca1f0", "score": "0.5645966", "text": "protected function create_field(field_category &$cat, $context) {\n $data = new stdClass;\n $data->shortname = \\local_eliscore\\context\\helper::get_class_for_level($context).'_testfield';\n $data->name = ' Test Field';\n $data->categoryid = $cat->id;\n $data->description = 'Test Field';\n $data->datatype = 'text';\n $data->forceunique = '0';\n $data->mform_showadvanced_last = 0;\n $data->multivalued = '0';\n $data->defaultdata = '';\n $data->manual_field_enabled = '1';\n $data->manual_field_edit_capability = '';\n $data->manual_field_view_capability = '';\n $data->manual_field_control = 'text';\n $data->manual_field_options_source = '';\n $data->manual_field_options = '';\n $data->manual_field_columns = 30;\n $data->manual_field_rows = 10;\n $data->manual_field_maxlength = 2048;\n\n $field = new field($data);\n $field->save();\n\n $fieldcontext = new field_contextlevel();\n $fieldcontext->fieldid = $field->id;\n $fieldcontext->contextlevel = $context;\n $fieldcontext->save();\n\n $owner = new field_owner();\n $owner->fieldid = $field->id;\n $owner->plugin = 'manual';\n $owner->params = serialize(array(\n 'required' => false,\n 'edit_capability' => '',\n 'view_capability' => '',\n 'control' => 'text',\n 'columns' => 30,\n 'rows' => 10,\n 'maxlength' => 2048,\n 'startyear' => '1970',\n 'stopyear' => '2038',\n 'inctime' => '0'\n ));\n $owner->save();\n\n return $field;\n }", "title": "" }, { "docid": "883b068535cae200591068c9b28f5a8e", "score": "0.56401736", "text": "static function factory($type, $name, $label=null) {\r\n\t\t$type = str_replace(\" \", '_', ucwords(str_replace(\"_\", ' ', $type)));\r\n\r\n\t\t$class = 'Carbon_Field_' . $type;\r\n\r\n\t\tif (!class_exists($class)) {\r\n\t\t\tthrow new Carbon_Exception ('Unknown field \"' . $type . '\".');\r\n\t\t}\r\n\r\n\t\tif ( strpos($name, '-') !== false ) {\r\n\t\t\tthrow new Carbon_Exception ('Forbidden character \"-\" in name \"' . $name . '\".');\r\n\t\t}\r\n\r\n\t\t$field = new $class($name, $label);\r\n\t\t$field->type = $type;\r\n\r\n\t\treturn $field;\r\n\t}", "title": "" }, { "docid": "3f29f09c63b185cb60fe8692799fbcbf", "score": "0.56364113", "text": "final public static function instance_new($modelname) {\n $object = new $modelname($modelname);\n $object->_new_record_state = TRUE;\n foreach (ApplicationSql::fieldnames($modelname) as $field)\n $object->_fields[$field] = NULL;\n return $object;\n }", "title": "" }, { "docid": "f139558fe526c3f9b00a09c92ad8ebca", "score": "0.5634216", "text": "public function __construct(){\n if(!isset(static::$tableName) || empty(static::$tableName)){\n throw new Exception(\"static var tableName not set\");\n }\n \n if(!isset(static::$pk) || empty(static::$pk)){\n throw new Exception(\"static var pk not set\");\n }\n\n if(!isset(static::$fields) || empty(static::$fields)){\n $fields = Cache::get('model', get_called_class());\n\n if(empty($fields)){\n $db = Loader::db();\n $data = $db->getAll(sprintf(\"DESCRIBE %s\", static::$tableName));\n $fields = array();\n foreach($data as $field){\n if($field['Field'] != static::$pk){\n array_push($fields, $field['Field']);\n }\n }\n\n \n Cache::set('model', get_called_class(), $fields, $expire = false);\n }\n\n static::$fields = $fields;\n }\n\n }", "title": "" }, { "docid": "ddfdf19cb34bb43e4dd15fa62bb6cabe", "score": "0.56266963", "text": "public function run()\n {\n $types = FieldType::getValues();\n foreach ($types as $type) {\n factory(App\\Field::class, [\n 'type' => $type,\n ])->create();\n }\n }", "title": "" }, { "docid": "389541915b51fc9d6ff521e3f7670be8", "score": "0.56149817", "text": "function __construct($name,$parentModel,$definition)\n {\n $definition[\"MULTIPLICITY\"] = $definition[\"MULTIPLICITY\"] ? $definition[\"MULTIPLICITY\"] : \"1:N\";\n $this->targetObject = $definition[\"OBJECT\"];\n parent::__construct($name,$parentModel,$definition);\n if($this->definition[\"FIELD\"]) { \n \n $this->definition[\"FIELDS\"]=array($name=>$this->definition[\"FIELD\"]);\n unset($this->definition[\"FIELD\"]);\n } \n }", "title": "" }, { "docid": "8aa5f4a296137f628df6bf53275217e5", "score": "0.56059116", "text": "public static function newModel(): Model\n {\n return new static::$model;\n }", "title": "" }, { "docid": "082f4bf1fee39bb42b46a84aa54a178a", "score": "0.56002176", "text": "protected function init_custom_field($cl = null) {\n // Set up our custom field.\n $field = new field(array(\n 'name' => 'testcustomfieldname',\n 'datatype' => 'char',\n 'multivalued' => 1\n ));\n $fieldcategory = new field_category(array('name' => 'testcategoryname'));\n $field = field::ensure_field_exists_for_context_level($field, $cl ? $cl : self::CONTEXTLEVEL, $fieldcategory);\n\n field_data::set_for_context_and_field(null, $field, array('value1'));\n\n return $field;\n }", "title": "" }, { "docid": "0aab12855616b43c75ec5ffb89644ff7", "score": "0.55679196", "text": "abstract public function modelFactory();", "title": "" }, { "docid": "0aab12855616b43c75ec5ffb89644ff7", "score": "0.55679196", "text": "abstract public function modelFactory();", "title": "" }, { "docid": "32b3b184fc30b689888c7da92b062fca", "score": "0.55609953", "text": "public function __construct() {\n \n \n $this->load->model('obj/type');\n }", "title": "" }, { "docid": "ec520df2720a063d1e4bb968bb27d5a0", "score": "0.5554853", "text": "public function instantiate_model()\n {\n $model = ucwords($this->table).'_model';\n\n $model = new $model();\n\n return $model;\n }", "title": "" }, { "docid": "1285e800c90e9ec99928924e6ecae11f", "score": "0.5550828", "text": "private function buildField(FieldDefinition $fieldDefinition): Field\n {\n // DEFINE THE FIELD\n $fieldData = [\n Field::FIELD_DOMID => uniqid($fieldDefinition->name, false),\n Field::FIELD_NAME => $fieldDefinition->name,\n Field::FIELD_TITLE => $this->translate($fieldDefinition->name . '_TITLE'),\n Field::LABEL => $this->translate($fieldDefinition->name . '_LABEL'),\n Field::FIELD_DESCRIPTION => $this->translate($fieldDefinition->name . '_DESCRIPTION'),\n Field::FIELD_VALIDATOR => $fieldDefinition->type,\n Field::FIELD_TYPE => self::getDisplayType($fieldDefinition),\n Field::FIELD_REQUIRED => $fieldDefinition->required,\n Field::FIELD_PLACEHOLDER => $this->translate(($fieldDefinition->displayName ?? $fieldDefinition->name) . '_PLACEHOLDER'),\n Field::FIELD_MULTIPLE => false,\n Field::FIELD_READONLY => $fieldDefinition->readonly,\n Field::FIELD_VALUE => ''\n ];\n if ($fieldDefinition->foreign) {\n $fieldData = self::doForeign($fieldDefinition, $fieldData);\n }\n if (in_array($fieldDefinition->displayType, [DisplayType::SELECT, DisplayType::SELECT_MULTIPLE], true)) {\n $fieldData[Field::FIELD_ELEMENTS] = [];\n if (! empty($fieldDefinition->enum)) {\n $class = $fieldDefinition->enum;\n if (class_exists($class)) {\n $a = explode('\\\\', $class);\n $b = end($a);\n $enumName = str_replace('Validator', '', $b);\n foreach ($class::ENUMERATION as $display => $value) {\n $fieldData[Field::FIELD_ELEMENTS][$value] = [\n 'value' => $value,\n 'display' => $this->translate(\"{$enumName}_$display\")\n ];\n }\n }\n }\n }\n // NOW ADD DATA\n if (! empty($this->entry)) {\n $fieldData[Field::FIELD_VALUE] = $this->entry->{$fieldDefinition->name};\n }\n if (isset($fieldDefinition->foreign['type'])) {\n $fieldData[Field::FIELD_MULTIPLE] = true;\n if ($fieldDefinition->foreign['type'] !== 'json') {\n $fieldData[Field::FIELD_MULTIPLE] = true;\n $fieldData[Field::FIELD_VALUE] = explode(',', (string)($fieldData[Field::FIELD_VALUE] ?? ''));\n }\n }\n\n return new Field($fieldData);\n }", "title": "" }, { "docid": "70f1515cd43ddfb8e0daf845a10ebe41", "score": "0.55468047", "text": "function __construct()\n {\n parent::__construct();\n $this->model = new Dynamic_model('data');\n }", "title": "" }, { "docid": "45b3803531830931cc4ee3301e0f0efc", "score": "0.55460066", "text": "protected function createModel()\n {\n $class = '\\\\' . ltrim($this->model, '\\\\');\n\n return new $class;\n }", "title": "" }, { "docid": "d102d36f707a2c53f53f65a53faa6a97", "score": "0.554007", "text": "public function __construct() {\n\t try {\n parent::__construct('form_fields');\n $this->App->load_util('form_fields');\n } catch (AppException $e) {\n\t throw $e;\n }\n\t}", "title": "" }, { "docid": "ed447f035e94d1085ed9311ffd66d940", "score": "0.55374044", "text": "public function createModel()\n {\n $class = '\\\\'.ltrim($this->model, '\\\\');\n\n return new $class;\n }", "title": "" }, { "docid": "ed447f035e94d1085ed9311ffd66d940", "score": "0.55374044", "text": "public function createModel()\n {\n $class = '\\\\'.ltrim($this->model, '\\\\');\n\n return new $class;\n }", "title": "" }, { "docid": "0ef4b1c5b9e2e3457ef0204b1e173ccf", "score": "0.5535873", "text": "function __construct()\n {\n parent::__construct($this->table, $this->field);\n }", "title": "" }, { "docid": "fb5938e592bcd1b8fb706e89d861af03", "score": "0.55130005", "text": "public function __construct() {\n parent::__construct();\n\n $this->addFieldMapping('c4m_media', 'image')\n ->separator(';');\n $this->addFieldMapping('c4m_media:file_replace')\n ->defaultValue(FILE_EXISTS_REPLACE);\n $this->addFieldMapping('c4m_media:source_dir')\n ->defaultValue(drupal_get_path('module', 'c4m_demo_content') . '/images');\n\n $this->addFieldMapping('c4m_body', 'body')\n ->arguments(array('format' => 'full_html'));\n\n $this->addFieldMapping('c4m_has_video', 'video');\n\n $this->addFieldMapping('c4m_related_topic', 'topics_list');\n\n $this->addFieldMapping('c4m_vocab_geo', 'geo_entries')\n ->arguments(array('source_type' => 'tid'));\n\n $this->addFieldMapping('c4m_intro_text', 'intro');\n\n $this->addFieldMapping('c4m_banner', 'banner');\n $this->addFieldMapping('c4m_banner:file_replace')\n ->defaultValue(FILE_EXISTS_REPLACE);\n $this->addFieldMapping('c4m_banner:source_dir')\n ->defaultValue(drupal_get_path('module', 'c4m_demo_content') . '/images');\n\n $this->addFieldMapping('uid', 'uid')\n ->sourceMigration('C4mDemoContentCreateUsers');\n }", "title": "" }, { "docid": "15254ed6377f006dccafb14b2df603eb", "score": "0.5510213", "text": "public function initialize()\n {\n // attributes\n $this->setName('ad_categories_fields');\n $this->setPhpName('AdCategoriesFields');\n $this->setClassname('Admin\\\\AdminBundle\\\\Model\\\\AdCategoriesFields');\n $this->setPackage('src.Admin.AdminBundle.Model');\n $this->setUseIdGenerator(true);\n // columns\n $this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);\n $this->addForeignKey('category_id', 'CategoryId', 'INTEGER', 'ad_categories', 'id', false, null, null);\n $this->addColumn('name', 'Name', 'VARCHAR', false, 255, null);\n $this->getColumn('name', false)->setPrimaryString(true);\n $this->addColumn('filter_name', 'FilterName', 'VARCHAR', false, 255, null);\n $this->getColumn('filter_name', false)->setPrimaryString(true);\n $this->addColumn('type', 'Type', 'INTEGER', false, null, null);\n $this->addColumn('sort', 'Sort', 'INTEGER', false, null, null);\n $this->addForeignKey('parent_field_id', 'ParentFieldId', 'INTEGER', 'ad_categories_fields', 'id', false, null, null);\n $this->addColumn('helper', 'Helper', 'VARCHAR', false, 255, null);\n $this->getColumn('helper', false)->setPrimaryString(true);\n $this->addColumn('mask', 'Mask', 'VARCHAR', false, 255, null);\n $this->getColumn('mask', false)->setPrimaryString(true);\n $this->addColumn('postfix', 'Postfix', 'VARCHAR', false, 255, null);\n $this->getColumn('postfix', false)->setPrimaryString(true);\n $this->addColumn('show_in_filter', 'ShowInFilter', 'BOOLEAN', false, 1, null);\n $this->addColumn('required', 'Required', 'BOOLEAN', false, 1, false);\n $this->addColumn('show_in_table', 'ShowInTable', 'BOOLEAN', false, 1, false);\n $this->addColumn('show_on_map', 'ShowOnMap', 'BOOLEAN', false, 1, false);\n $this->addColumn('enabled', 'Enabled', 'BOOLEAN', false, 1, false);\n $this->addColumn('listing', 'Listing', 'BOOLEAN', false, 1, false);\n $this->addColumn('deleted', 'Deleted', 'BOOLEAN', false, 1, false);\n // validators\n }", "title": "" }, { "docid": "4492d858660d1f70636475df138ed6f7", "score": "0.55059487", "text": "public function field()\n {\n return $this->belongsTo('App\\Field');\n }", "title": "" }, { "docid": "edf3ad4f362e574223d92efaba9b1cf2", "score": "0.5500493", "text": "public function __construct() {\n\t\t\t$this->field_type = 'quiz-templates-load';\n\n\t\t\tparent::__construct();\n\t\t}", "title": "" }, { "docid": "92d63f40b45511c444dce04e1e87919b", "score": "0.55002296", "text": "abstract protected function setupFields();", "title": "" }, { "docid": "5fc95fe6306b1ebddc0f24aa302966dc", "score": "0.5498979", "text": "public function __construct() {\n\t\tparent::__construct();\n \t\t$this->children = new InputfieldsArray(); \n\t\t$this->set('skipLabel', Inputfield::skipLabelFor); \n\t\t$this->requiredLabel = $this->_('Missing required value');\n\t\t$columnWidthSpacing = $this->wire('config')->inputfieldColumnWidthSpacing; \n\t\t$columnWidthSpacing = is_null($columnWidthSpacing) ? 1 : (int) $columnWidthSpacing; \n\t\t$this->set('columnWidthSpacing', $columnWidthSpacing); \n\t\t$this->set('useDependencies', true); // whether or not to use consider field dependencies during processing\n\t\t// allow optional override of any above settings with a $config->InputfieldWrapper array. \n\t\t$settings = $this->wire('config')->InputfieldWrapper; \n\t\tif(is_array($settings)) foreach($settings as $key => $value) $this->set($key, $value);\n\t\t$this->set('renderValueMode', false); \n\t\t$this->set('quietMode', false); // suppress label, description and notes\n\t}", "title": "" }, { "docid": "3506bf359721d19965ce2721447d6b62", "score": "0.5496572", "text": "public function createModel()\n {\n $class = $this->config->model;\n\n return new $class;\n }", "title": "" }, { "docid": "6e3bea29cbef59bdd0a1cc69665bda64", "score": "0.5495591", "text": "function create_single_field($name, $value)\n {\t \t\n \tif(empty($value)) { return; }\n \t\n \tif($value === 'null') { return; }\n\n \t$keyword = new Keyword_Model();\n \t\n \t$keyword->item_id = $this->database_id();\n \t$keyword->keyword_type = 'field';\n \t$keyword->name = $name;\n\t\t\n\t\t$schema = $this->ensure_schema_model();\n\t\t\n\t\tif($schema->set_keyword_value($keyword, $this->item_type, $value))\n\t\t{\n\t\t\t$keyword->create();\n\t\t}\n\t\t\n\t\t$this->add_keyword($keyword);\n }", "title": "" }, { "docid": "03e51c5157cf524dfbb3948df5ae69fc", "score": "0.54916304", "text": "public function __construct()\n {\n $this->pkName = 'carID'; //set the pkName of this object to carID\n $this->inputColDefinitions(); //load column definitions\n $this->inputBindTypes(); //load the bind types\n }", "title": "" }, { "docid": "9b5cff349fa6029d81fa17ea1c4bdf16", "score": "0.54911125", "text": "function create_er_field_instance($field_name, $field_id, $bundle) {\n $er_instance = array(\n 'field_name' => $field_name,\n 'field_id' => $field_id,\n 'entity_type' => 'node',\n 'bundle' => $bundle,\n 'label' => ucwords(str_replace('_', ' ', $field_name)),\n 'widget' => array(\n 'weight' => '42',\n 'type' => 'inline_entity_form',\n 'module' => 'inline_entity_form',\n 'active' => 1,\n 'settings' => array(\n 'fields' => array(\n ),\n 'type_settings' => array(\n 'allow_existing' => 0,\n 'match_operator' => 'CONTAINS',\n 'delete_references' => 0,\n 'override_labels' => 0,\n 'label_singular' => 'node',\n 'label_plural' => 'nodes',\n ),\n ),\n ),\n 'settings' => array(\n 'user_register_form' => false,\n ),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'entityreference_entity_view',\n 'settings' => array(\n 'view_mode' => 'default',\n 'link' => false,\n ),\n 'module' => 'entityreference',\n 'weight' => 3,\n ),\n 'full' => array(\n 'label' => 'hidden',\n 'type' => 'entityreference_entity_view',\n 'settings' => array(\n 'view_mode' => 'full',\n 'link' => false,\n ),\n 'module' => 'entityreference',\n 'weight' => 3,\n ),\n ),\n 'required' => 0,\n 'description' => '',\n );\n\n $instance = field_info_instance('node', $field_name, $bundle);\n if ( ! isset($instance) ) {\n return field_create_instance($er_instance);\n }\n return field_update_instance($er_instance);\n}", "title": "" }, { "docid": "987d81430fa985e021a8a582d9ead1e1", "score": "0.5481671", "text": "public function __construct() {\n\t\t//just to prevent \"model\" to be called as constructor by PHP.\n\t}", "title": "" }, { "docid": "1fc4a67762a15c198ab67b67d4a0545d", "score": "0.5480368", "text": "public function instantiateFieldAndReturn($field_config_ob) {\n $return_field_object = new date_fieldSQL($field_config_ob);\n // $return_field_object->field_config_data = $return_field_object->data;\n // $return_field_object->data = NULL;\n // // $value_one = fieldSQL::instantiateFieldAndReturn($field_config_ob);\n // $value_one = new date_fieldSQL($field_config_ob);\n // $value_one->field_select_is_hidden = 0;\n // $value_one->field_join_is_hidden = 1;\n // // $value_one = fieldSQL::instantiate_fieldsFromEntityBundle($field_config_ob);\n // $field_config_ob->field_column_name .= '2';\n // // $value_two = fieldSQL::instantiateFieldAndReturn($field_config_ob);\n // $value_two = new date_fieldSQL($field_config_ob);\n // $value_two->field_select_is_hidden = 0;\n // $value_two->field_join_is_hidden = 1;\n // // $value_two = fieldSQL::instantiate_fieldsFromEntityBundle($field_config_ob);\n // $return_field_object->field_field_object_array[] = $value_one;\n // $return_field_object->field_field_object_array[] = $value_two;\n return $return_field_object;\n }", "title": "" }, { "docid": "83d0e8b024334763062dafb43e8a0779", "score": "0.5479979", "text": "public function __CONSTRUCT(){\n $this->model = new Tipomovimiento();\n }", "title": "" }, { "docid": "4fea697a08bbf1a1a55b1af2be34fb1f", "score": "0.5478613", "text": "public function create()\n {\n $autoIncrementField = $this->getAutoIncrementField();\n if ($autoIncrementField && $this->$autoIncrementField === null) {\n $this->$autoIncrementField = $this->getNextAutoIncrementId();\n }\n\n $fields = $this->getFields();\n foreach ($this->getAutoFilledData(self::OP_CREATE) as $field => $value) {\n /** @noinspection NotOptimalIfConditionsInspection */\n if (!in_array($field, $fields, true) || $this->$field !== null) {\n continue;\n }\n $this->$field = $value;\n }\n\n $this->validate($fields);\n\n $this->fireEvent('model:beforeSave');\n $this->fireEvent('model:beforeCreate');\n\n $fieldValues = [];\n $defaultValueFields = [];\n foreach ($fields as $field) {\n if ($this->$field !== null) {\n $fieldValues[$field] = $this->$field;\n } elseif ($field !== $autoIncrementField) {\n $defaultValueFields[] = $field;\n }\n }\n\n foreach ($this->getJsonFields() as $field) {\n if (is_array($this->$field)) {\n $fieldValues[$field] = json_encode($this->$field, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);\n }\n }\n\n /**\n * @var \\ManaPHP\\DbInterface $connection\n */\n $connection = $this->_di->getShared($this->getDb($this));\n\n if ($autoIncrementField && $this->$autoIncrementField === null) {\n $this->$autoIncrementField = (int)$connection->insert($this->getSource($this), $fieldValues, true);\n } else {\n $connection->insert($this->getSource($this), $fieldValues);\n }\n\n if ($defaultValueFields) {\n if ($r = static::query(null, $this)->select($defaultValueFields)->where($this->_getPrimaryKeyValuePairs())->fetch(true)) {\n foreach ($r[0] as $field => $value) {\n $this->$field = $value;\n }\n }\n }\n\n $this->_snapshot = $this->toArray();\n\n $this->fireEvent('model:afterCreate');\n $this->fireEvent('model:afterSave');\n\n return $this;\n }", "title": "" }, { "docid": "35e4c4cecd80e585dd7f1701106041c9", "score": "0.54767156", "text": "public static function createInstance()\n {\n return new EmailRepeaterField('ISerializable', 'ISerializable', 'ISerializable');\n }", "title": "" }, { "docid": "e1b90e7cbe4d68bc35e4eba88d58d763", "score": "0.5472098", "text": "protected function attachDynamicFields() {\n # Get Dynamic Entity Fields from Database\n $oMyFieldsDB = CoreEntityModel::$aEntityTables['core-form-fields']->select(['form'=>$this->sSingleForm]);\n if(count($oMyFieldsDB) > 0) {\n foreach($oMyFieldsDB as $oField) {\n $sFieldName = $oField->fieldkey;\n if(!property_exists($this,$sFieldName)) {\n # Assign Value from Object to Data based on type\n switch($oField->type) {\n case 'text':\n case 'textarea':\n case 'code':\n case 'email':\n case 'url':\n case 'featuredimage':\n case 'tel':\n case 'upload':\n $this->$sFieldName = '';\n break;\n case 'select':\n case 'currency':\n case 'hidden':\n case 'number':\n case 'boolselect':\n $this->$sFieldName = 0;\n break;\n case 'date':\n case 'datetime':\n $this->$sFieldName = '0000-00-00 00:00:00';\n break;\n default:\n break;\n }\n }\n }\n }\n }", "title": "" }, { "docid": "ae95f68e6764166c34dae8330b1b54db", "score": "0.54699886", "text": "public static function createInstance()\n {\n return new CommandRepeaterField('ISerializable', 'ISerializable', 'ISerializable', 'ISerializable');\n }", "title": "" }, { "docid": "ae95f68e6764166c34dae8330b1b54db", "score": "0.54699886", "text": "public static function createInstance()\n {\n return new CommandRepeaterField('ISerializable', 'ISerializable', 'ISerializable', 'ISerializable');\n }", "title": "" }, { "docid": "4379f6d06f05ebf354bea02a43c6dae1", "score": "0.5469917", "text": "public static function createFromFieldStorageDefinition(FieldStorageDefinitionInterface $storageDefinition) {\n $field_definition = new static();\n $field_definition->setFieldStorageDefinition($storageDefinition);\n return $field_definition;\n }", "title": "" }, { "docid": "f173c5bb9421eb4fb63f98c9a0e64963", "score": "0.5468881", "text": "public function createField(array $data, int $user_id) : Field\n {\n $data['user_id'] = $user_id;\n return $this->create($data);\n }", "title": "" }, { "docid": "d34a222690d3429c79723404382c8284", "score": "0.5453034", "text": "public function __construct()\n {\n //$this->_model_factory = ModelFactory::getInstance();\n }", "title": "" }, { "docid": "68c6d55b7a6d510ada55490caab9ab27", "score": "0.54431164", "text": "public function field(Model $model, string $attr): InputField\n {\n return new InputField($model, $attr);\n }", "title": "" }, { "docid": "b443a476e08a3cb714facb7d6d995c2a", "score": "0.5442041", "text": "public static function model()\r\n {\r\n return new self();\r\n }", "title": "" }, { "docid": "b443a476e08a3cb714facb7d6d995c2a", "score": "0.5442041", "text": "public static function model()\r\n {\r\n return new self();\r\n }", "title": "" }, { "docid": "b443a476e08a3cb714facb7d6d995c2a", "score": "0.5442041", "text": "public static function model()\r\n {\r\n return new self();\r\n }", "title": "" }, { "docid": "6e1cbaa6c4f122a5fc2e9ac3cb746a5f", "score": "0.5436773", "text": "function __construct()\r\n\t{\r\n\t\tparent::Model();\r\n\t}", "title": "" }, { "docid": "bd8a3cf967f3c95a0e90533ac2039c4b", "score": "0.542598", "text": "public function __construct()\n {\n if ( ! empty($this->modelName)) {\n $this->modelName = $this->modelsDir . $this->modelName;\n\n $this->model = new $this->modelName;\n\n $this->orderAble = $this->model->getOrderAble();\n\n $this->filterAble = $this->model->getFilterAble();\n\n $this->getItemsPerPageFromGet();\n }\n }", "title": "" }, { "docid": "a5cf71bc77b2ce00c58b869719e46c2c", "score": "0.5424505", "text": "public function __construct($name, $field = null)\n {\n parent::__construct($name);\n $this->setField($field);\n }", "title": "" }, { "docid": "e0e8dd071a181d8139d4bc1b8b9b32ff", "score": "0.5422832", "text": "protected function createModel()\r\n {\r\n $this->geamGenerate('model');\r\n }", "title": "" }, { "docid": "557402e08fbb841337b09847443d56b2", "score": "0.54177", "text": "public static function make(string $name = null, string $label = null) : ViewField\n {\n return new self($name, $label);\n }", "title": "" } ]
511a75411c43ea1586618d764f9210c3
Find the confirmation emails that are not yet sent.
[ { "docid": "8fd42cf518f658e4df717c0fa295293b", "score": "0.5651543", "text": "public function findBySentDate()\n { \n $qb = $this->getEntityManager()->createQueryBuilder();\n \n return $qb ->select('c')\n ->from('Headoo\\EcommerceBundle\\Entity\\ConfirmationEmail','c')\n ->where($qb->expr()->lte('c.sendAt', ':date'))\n ->andwhere('c.sentAt is NULL')\n ->setParameter('date', date(\"Y-m-d H:i:s\"))\n ->orderBy('c.id', 'asc')\n ->getQuery()\n ->getResult();\n }", "title": "" } ]
[ { "docid": "900baea961fcb06ce0805f40db7ddfb6", "score": "0.6183217", "text": "function getEmailsToSend()\n {\n $this->recursive = -1;\n // use the php date to get php time with timezone instead of now() in\n // mysql, just in case the DB has different timezone setting with php\n return $this->find('all', array(\n 'conditions' => array('EmailSchedule.date <=' => date('Y-m-d H:i:s'), 'EmailSchedule.sent' => '0'),\n ));\n }", "title": "" }, { "docid": "a8cc584a3474a5543b5723e081eda24e", "score": "0.61219794", "text": "public function getMailsSend()\n {\n return 0;\n }", "title": "" }, { "docid": "cf89c9f01d6b2c62c6c3cb506aa3074b", "score": "0.61076415", "text": "public function notConfirmed()\n {\n $sql = <<<END\n SELECT id, email, entered AS date\n FROM {$this->tables['user']} u\n WHERE id IN (\n -- users with only subscription in user history\n SELECT id\n FROM (\n -- select users who have only one result row, either only subscriptions or only non-subscriptions\n SELECT id, MAX(subscription) AS subscription\n FROM (\n -- group user history into subscription and non-subscriptions, results in either one or two rows\n SELECT id, subscription\n FROM (\n -- find user history rows within the period\n SELECT u.id, IF(summary = 'Subscription' OR summary = 'Re-Subscription', 1, 0) AS subscription\n FROM {$this->tables['user']} u\n JOIN {$this->tables['user_history']} uh ON u.id = uh.userid\n WHERE u.confirmed = 0 AND u.blacklisted = 0\n ) AS t\n GROUP BY id, subscription\n ) AS t2\n GROUP BY id\n HAVING COUNT(*) = 1\n ) AS t3\n WHERE subscription = 1\n )\nEND;\n\n return $this->dbCommand->queryAll($sql);\n }", "title": "" }, { "docid": "b4bf70371313b50c6cadf490301eefe0", "score": "0.6010732", "text": "public function dontSeeEmailIsSent()\n {\n $this->seeEmailIsSent(0);\n }", "title": "" }, { "docid": "37b925f8b426ac458696db90b102aaf3", "score": "0.6003017", "text": "private function get_all_last_sent_uncached() {\n\n\t\t$storage = $this->get_uncached_options();\n\n\t\tif ( isset( $storage['last_sent'] ) ) {\n\t\t\t$last_sent = $storage['last_sent'];\n\n\t\t\tif ( count( $last_sent ) === count( $this->get_notifications() ) ) {\n\t\t\t\treturn $last_sent;\n\t\t\t}\n\n\t\t\treturn $this->fill_last_sent( $last_sent );\n\t\t}\n\n\t\treturn $this->fill_last_sent();\n\t}", "title": "" }, { "docid": "43d28f282dd89d3e530df1b4c26866a1", "score": "0.5879664", "text": "public function getUndeliveredRecipients()\n {\n return $this->undeliveredTo;\n }", "title": "" }, { "docid": "f9588312092f096200500cd81d25ed0c", "score": "0.586385", "text": "private function get_all_resend_at_uncached() {\n\n\t\t$storage = $this->get_uncached_options();\n\n\t\tif ( isset( $storage['resend_at'] ) ) {\n\t\t\t$resend_at = $storage['resend_at'];\n\n\t\t\tif ( count( $resend_at ) === count( $this->get_notifications() ) ) {\n\t\t\t\treturn $resend_at;\n\t\t\t}\n\n\t\t\treturn array_merge( array_fill_keys( array_keys( $this->get_notifications() ), 0 ), $resend_at );\n\t\t}\n\n\t\treturn array_fill_keys( array_keys( $this->get_notifications() ), 0 );\n\t}", "title": "" }, { "docid": "19cb63120dcc21df27246346daac0aa9", "score": "0.586168", "text": "public static function checkSendEmails()\r\n {\r\n $nMailings = EmailSendQueue::getNMailings();\r\n\r\n if($nMailings > 0)\r\n Cron::sendEmails();\r\n }", "title": "" }, { "docid": "4d82b5c5099be375f1fea9b05fad4bf6", "score": "0.5776014", "text": "public static function disable_emails() {\n\t\t$email_actions = array(\n\t\t\t'woocommerce_low_stock',\n\t\t\t'woocommerce_no_stock',\n\t\t\t'woocommerce_product_on_backorder',\n\t\t\t'woocommerce_order_status_pending_to_processing',\n\t\t\t'woocommerce_order_status_pending_to_completed',\n\t\t\t'woocommerce_order_status_processing_to_cancelled',\n\t\t\t'woocommerce_order_status_pending_to_failed',\n\t\t\t'woocommerce_order_status_pending_to_on-hold',\n\t\t\t'woocommerce_order_status_failed_to_processing',\n\t\t\t'woocommerce_order_status_failed_to_completed',\n\t\t\t'woocommerce_order_status_failed_to_on-hold',\n\t\t\t'woocommerce_order_status_cancelled_to_processing',\n\t\t\t'woocommerce_order_status_cancelled_to_completed',\n\t\t\t'woocommerce_order_status_cancelled_to_on-hold',\n\t\t\t'woocommerce_order_status_on-hold_to_processing',\n\t\t\t'woocommerce_order_status_on-hold_to_cancelled',\n\t\t\t'woocommerce_order_status_on-hold_to_failed',\n\t\t\t'woocommerce_order_status_completed',\n\t\t\t'woocommerce_order_fully_refunded',\n\t\t\t'woocommerce_order_partially_refunded',\n\t\t);\n\n\t\tforeach ( $email_actions as $action ) {\n\t\t\tremove_action( $action, array( 'WC_Emails', 'send_transactional_email' ), 10, 10 );\n\t\t}\n\t}", "title": "" }, { "docid": "17ed269c484638e1c00c46a49d49f3ab", "score": "0.5764176", "text": "public static function getAllContactInvitationConfirmedNotifications(){\n global $db, $session;\n $rs_arr = [];\n $query = SEL_ALL.\" notifications_table WHERE(n_type=2 AND n_to='{$session->user_id}') ORDER BY n_id DESC\";\n $rs = $db->query($query);\n if($rs && $db->num_rows($rs) > 0){\n while($row = $db->fetch_array($rs)){\n array_push($rs_arr, array(\n \"n_id\"=>$row[\"n_id\"],\n \"n_from\"=>Admin::getUserName($row[\"n_from\"]),\n \"n_from_id\"=>$row[\"n_from\"],\n \"date_of_entry\"=>dateToString2($row[\"date_of_entry\"]),\n \"profile_image\"=>Admin::getProfileImageFromDb($row[\"n_from\"])\n ));\n }\n }\n return ($rs_arr == null ? null : $rs_arr);\n }", "title": "" }, { "docid": "b1227685dc4d0fa92a814c06988be5b6", "score": "0.57487196", "text": "public function getEmailNotSentCount()\n {\n $db = Tools::getDatabaseConnection();\n\n // If the newsletter didn't start, then it means all emails are \"not sent\"\n if (!$this->getBeginTime()) {\n return $this->getEmailCount();\n }\n\n $numberOfNotSent = $db->exec_SELECTcountRows('*', 'tx_newsletter_domain_model_email', 'end_time = 0 AND newsletter = ' . $this->getUid());\n\n return (int) $numberOfNotSent;\n }", "title": "" }, { "docid": "34d7912ed1d0f733a778e49fa3de337e", "score": "0.57459795", "text": "function learndash_notifications_get_all_delayed_emails( $where = array() ) {\n\tglobal $wpdb;\n\n\t$sql = \"SELECT * FROM {$wpdb->prefix}ld_notifications_delayed_emails\";\n\n\tif ( ! empty( $where ) ) {\n\t\t$sql .= \" WHERE \";\n\n\t\t$total = count( $where );\n\t\t$count = 0;\n\t\tforeach ( $where as $key => $value ) {\n\t\t\t$count++;\n\n\t\t\t$key = sanitize_text_field( $key );\n\t\t\t$value = sanitize_text_field( $value );\n\n\t\t\t$pattern = \"$key\\\".{0,6}\\\"?$value(;|\\\"|\\')\";\n\t\t\t$sql .= \"shortcode_data REGEXP '$pattern'\";\n\n\t\t\tif ( $count < $total ) {\n\t\t\t\t$sql .= \" AND \";\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $wpdb->get_results( $sql, ARRAY_A );\n}", "title": "" }, { "docid": "3135dc00949f5559f36b9925a54a1e89", "score": "0.5717971", "text": "function check_if_we_sent_email() {\n}", "title": "" }, { "docid": "b3170fdccfd104463cc9fcc779d7dc17", "score": "0.57034534", "text": "public function getRecieveEmails()\n {\n return $this->recieve_emails;\n }", "title": "" }, { "docid": "e2875204620333c898cac8f0571b82ef", "score": "0.5701377", "text": "public function hasPendingEmail();", "title": "" }, { "docid": "d9e7b36fffdf87c8195b521bef6de5f9", "score": "0.5685388", "text": "public function grabSentEmails()\n {\n try {\n return $this->client->getEmails();\n } catch (ConfigurationException $e) {\n throw new ModuleException($this, $e->getMessage());\n }\n }", "title": "" }, { "docid": "849a86269f3bacbae7550e0a2b5e42c7", "score": "0.5679837", "text": "public function getnotsentnewsletter()\n {\n $query = \"SELECT n.id as newsletterId, n.newsletter_message_id, n.mail_to, n.status, nm.*, u.email,u.identifier FROM \".$this->_name.\" n\n\t\t\t INNER JOIN NewsletterMessage nm ON nm.id = n.newsletter_message_id\n\t\t\t INNER JOIN User u ON u.identifier = n.mail_to\n\t\t\t WHERE n.status IN ('not sent') AND (mail_at > DATE_ADD(NOW(), INTERVAL -1 HOUR) AND mail_at < NOW())\";\n\n if(($result = $this->getQuery($query,true)) != NULL)\n return $result;\n else\n return \"NO\";\n }", "title": "" }, { "docid": "0bd1040ff4ee11df57fa0420386b982c", "score": "0.5675098", "text": "public function getAllEmailAddresses() {\r\n $saveCurrentFolder = $this->folder;\r\n $emails = array();\r\n foreach ($this->getFolders() as $folder) {\r\n $this->selectFolder($folder);\r\n foreach ($this->getMessages(false) as $message) {\r\n $emails[] = $message['from'];\r\n $emails = array_merge($emails, $message['to']);\r\n if (isset($message['cc']))\r\n $emails = array_merge($emails, $message['cc']);\r\n }\r\n }\r\n $this->selectFolder($saveCurrentFolder);\r\n return array_unique($emails);\r\n }", "title": "" }, { "docid": "5cf49571717018c90728662e212ab417", "score": "0.56382835", "text": "public function getConfirms()\n {\n return $this->confirms;\n }", "title": "" }, { "docid": "79e2c8e1afa77329422fdd50770adfa7", "score": "0.563229", "text": "public static function getAllContactDeclinedNotf(){\n global $db, $session;\n $rs_arr = [];\n $query = SEL_ALL.\" notifications_table WHERE(n_type=3 AND n_to='{$session->user_id}') ORDER BY n_id DESC\";\n $rs = $db->query($query);\n if($rs && $db->num_rows($rs) > 0){\n while($row = $db->fetch_array($rs)){\n array_push($rs_arr, array(\n \"n_id\"=>$row[\"n_id\"],\n \"n_from\"=>Admin::getUserName($row[\"n_from\"]),\n \"n_from_id\"=>$row[\"n_from\"],\n \"n_type\"=>$row[\"n_type\"],\n \"date_of_entry\"=>dateToString2($row[\"date_of_entry\"]),\n \"profile_image\"=>Admin::getProfileImageFromDb($row[\"n_from\"])\n ));\n }\n }\n return ($rs_arr == null ? null : $rs_arr);\n }", "title": "" }, { "docid": "26930bec23dd885d269d6b2efadb2b24", "score": "0.56183964", "text": "private function resetEmails()\n {\n $this->emails = [];\n }", "title": "" }, { "docid": "9af728a7c9665144c22091b5af52156a", "score": "0.55780226", "text": "public function getCountConfirmedUsers() {\r\n\t\treturn $this->database->table(self::TABLE_NAME)->where(Array('email_confirmation' => 'confirmed'))->count();\r\n\t}", "title": "" }, { "docid": "a3bbf6e69d5fc17dbcc9fb3231a5fb3a", "score": "0.55732656", "text": "protected function getEmails()\n {\n $path = base_path() . '/app/Mail/';\n $files = [\n 'ActivationEmail' => $path . 'ActivateAccount.php',\n ];\n\n return $files;\n }", "title": "" }, { "docid": "e69d44aae60eb7d8590d6cda12f1fbf1", "score": "0.5559815", "text": "private function get_all_last_sent() {\n\n\t\t$last_sent = ITSEC_Modules::get_setting( 'notification-center', 'last_sent' );\n\n\t\tif ( ! is_array( $last_sent ) || empty( $last_sent ) ) {\n\t\t\treturn $this->fill_last_sent();\n\t\t}\n\n\t\treturn $this->fill_last_sent( $last_sent );\n\t}", "title": "" }, { "docid": "211160a28b7b42452619d9d0ce3f9690", "score": "0.5542232", "text": "function listPendingDeliveries() {\n\t\t$query = \"SELECT q.* FROM `\".BIT_DB_PREFIX.\"switchboard_recipients` WHERE `complete_date` IS NULL\";\n\t\t$result = $this->mDb->query($query, $pUserId);\n\t\t$ret = array();\n\t\twhile($res = $result->fetchRow()) {\n\t\t\t$ret[$res['message_id']][$res['delivery_style']][] = $res['user_id'];\n\t\t}\n\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "2fd3169273684ca9dd9d82f4816af013", "score": "0.5499702", "text": "public function getUndeliveredRecipients()\n {\n return $this->client->getUndeliveredRecipients();\n }", "title": "" }, { "docid": "b6f0bbd5e1a23ddcc49daf55c6dd7fb4", "score": "0.5491891", "text": "public function getMails() {\n return $this->mails;\n }", "title": "" }, { "docid": "b2e8b469946ee6a2160752d3759c5077", "score": "0.5486705", "text": "public function getMails()\n {\n return $this->Mails;\n }", "title": "" }, { "docid": "dbf2dafe52c5fe9d870c37787fc779d0", "score": "0.5475075", "text": "protected function registerConfirmEmailReplace():array\n {\n return [];\n }", "title": "" }, { "docid": "cb7ef0d6a04b68edcede9940b50593fd", "score": "0.54711264", "text": "function awaitingFriendConfirm(){\n\t\tif (!is_null($this->awaitingFriends)){\n\t\t\treturn $this->awaitingFriends;\n\t\t}\n\t\t$tempfriends_t = new table_tempfriends();\n\t\t$users_t = new table_users();\n\t\t$profile_t = new table_profile();\n\t\t$query = 'SELECT '\n\t\t\t.TABLE_USERS.'.'.$users_t->field_id.' as inviter,'\n\t\t\t.TABLE_USERS.'.'.$users_t->field_name.' as name,'\n\t\t\t.TABLE_PROFILE.'.'.$profile_t->field_picture.' as picture,'\n\t\t\t.TABLE_TEMPFRIENDS.'.'.$tempfriends_t->field_date.' as date FROM '\n\t\t\t\t.TABLE_TEMPFRIENDS.','.TABLE_USERS.','.TABLE_PROFILE\n\t\t\t.' WHERE '.TABLE_TEMPFRIENDS.'.'.$tempfriends_t->field_invited\n\t\t\t.\" = '\".$this->userid.\"' AND \".TABLE_USERS.'.'.$users_t->field_id.' = '\n\t\t\t.TABLE_TEMPFRIENDS.'.'.$tempfriends_t->field_inviter.' AND '\n\t\t\t.TABLE_USERS.'.'.$users_t->field_id\n\t\t\t.' = '.TABLE_PROFILE.'.'.$profile_t->field_id;\n\t\t$result = db::query($query);\n\t\t$this->awaitingFriends = array();\n\t\twhile($row = db::fetch_assoc($result)){\n\t\t\t$this->awaitingFriends[] = $row;\n\t\t}\n\t\treturn $this->awaitingFriends;\n\t}", "title": "" }, { "docid": "c353b97c4fc65255b130b8db7d246adc", "score": "0.5458728", "text": "function GetUnsentSubscribers($queueid=0, $reasoncode=0)\n\t{\n\t\t$subscribers = array();\n\t\t$query = \"SELECT emailaddress FROM \" . SENDSTUDIO_TABLEPREFIX . \"list_subscribers ls, \" . SENDSTUDIO_TABLEPREFIX . \"queues_unsent qu WHERE ls.subscriberid=qu.recipient AND qu.queueid=\" . intval($queueid) . \" AND qu.reasoncode=\" . intval($reasoncode);\n\t\t$result = $this->Db->Query($query);\n\t\twhile ($row = $this->Db->Fetch($result)) {\n\t\t\t$subscribers[] = $row['emailaddress'];\n\t\t}\n\t\treturn $subscribers;\n\t}", "title": "" }, { "docid": "5f075e73763393cecf6c86a412d01e76", "score": "0.5457795", "text": "public function getDefaultRecipients()\n\t{\n\t\t$to = $this->member ? $this->author()->email : $this->email;\n\t\t$cc = array();\n\t\t$bcc = array();\n\t\tforeach ( $this->notify as $notify )\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$email = ( $notify['type'] === 'm' ) ? \\IPS\\Member::load( $notify['value'] )->email : $notify['value'];\n\t\t\t}\n\t\t\tcatch ( \\OutOfRangeException $e )\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( $email != $to )\n\t\t\t{\n\t \t\t\tif ( isset( $notify['bcc'] ) and $notify['bcc'] )\n\t\t\t\t{\n\t\t\t\t\t$bcc[] = $email;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$cc[] = $email;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn array( 'to' => $to, 'cc' => $cc, 'bcc' => $bcc );\n\t}", "title": "" }, { "docid": "1d90df08c09fbede519876fa71c4c0a7", "score": "0.54576087", "text": "public function checkNewMail($account) {\n\t\t$mails = $this->find(\n\t\t\t'all',\n\t\t\tarray(\n\t\t\t\t'conditions' => Set::flatten(array($this->alias => $account))\n\t\t\t)\n\t\t);\n\n\t\t// @todo save to the db here\n\n\t\t// @todo delete messages from server here\n\n\t\treturn $mails;\n\t}", "title": "" }, { "docid": "907d4eb8857e2ef8bf7b0bdfc082598e", "score": "0.54573053", "text": "public function renderNotifyEmail() {\n $notifyEmails = $this->notifyEmailService->getAllNotSentNotifyEmails();\n\n foreach($notifyEmails as $id=>$row) {\n $notDownloadedCount = $this->notifyEmailService->getNotDownloadedCountByNotifyEmailId($id);\n if($notDownloadedCount[\"pocet\"] == 0) {\n $this->notifyEmailService->notifyByEmail($id);\n $this->notifyEmailService->markAsSent($id);\n }\n }\n $this->terminate();\n\n }", "title": "" }, { "docid": "f68fa643c89333dc305ffdedb93d40ec", "score": "0.5452012", "text": "public function getSendinFinalConfirmEmail()\n {\n $sendinFinalConfirmEmail = $this->getGeneralConfig('SendinFinalConfirmEmail', Mage::app()->getStore()->getStoreId());\n if (!$sendinFinalConfirmEmail) {\n return false;\n }\n return $sendinFinalConfirmEmail;\n }", "title": "" }, { "docid": "cce5e37c70df07ee3e9713def69b6c43", "score": "0.5449899", "text": "public static function getIncompleteEnrolments()\n {\n $activeEnrolments = self::getActiveEnrolments();\n $filteredArray = array();\n if ($activeEnrolments) {\n foreach ($activeEnrolments as $enrolment) {\n\n if (!key_exists('redundant', $enrolment)) {\n /*Eliminate any confirmations*/\n if (key_exists('method', $enrolment)) {\n /*Will need an alternative way to detect completion maybe*/\n if ($enrolment['method'] == \"initial\") {\n array_push($filteredArray, $enrolment);\n }\n if ($enrolment['method'] == \"epayment\") {\n array_push($filteredArray, $enrolment);\n }\n } else {\n /*prevent enquiries from being sent, and skip any enrolments that have been marked \"redundant\"*/\n if (!key_exists('is_enquiry', $enrolment)) {\n\n array_push($filteredArray, $enrolment);\n }\n }\n }\n\n }\n }\n\n return $filteredArray;\n }", "title": "" }, { "docid": "e4d9f99351bb67e5422e1b62c078f386", "score": "0.5447369", "text": "function check_emails(){\n if( version_compare( SP_VERSION, \"2.3.7\" ) >= 0 ){\n error_log( 'SP Emails: Checking e-mail now!' );\n SP_Fetch_Mail::sp_fetch_mail();\n }\n }", "title": "" }, { "docid": "bc35dce957e93ba9cb457144087cb056", "score": "0.542477", "text": "public function fl_confirm_email(){\n \t$resourceRequest = jan_generateResourceRequest();\n \t\n \tif($resourceRequest === false){\n \t\t$this->error = 'USER: '.__LINE__. ' Could not generate the resource request.';\n \t\treturn false;\n \t}\n \t\n \t//Retreive post data\n \t$data = $resourceRequest->postData;\n \t \n \t$data = json_decode($data, true);\n \t \n \tif(is_null($data)){\n \t\t$this->error = 'USER: '.__LINE__. ' Posted data was not found or malformed.';\n \t\treturn false;\n \t}\n \t\n \t$confirmationToken = $data['email_confirmation_token'];\n \t//$email = $data['email'];\n \t\n \t//Check to see if there is a match using email and validation token\n \t$userDataSQL = 'SELECT email_confirmed from fl_users WHERE email_confirmation_token = ?';\n \t\n \t$userDataResult = jan_stmtQuery2($userDataSQL, array($confirmationToken));\n \t\n \tif($userDataResult === false){\n \t\t$this->error = 'USER: '.__LINE__. ' An error occured querying the user record.';\n \t\treturn false;\n \t}\n \t\n \tif(sizeof($userDataResult['data']) == 0){\n \t\t$this->error = 'USER: '.__LINE__. ' No user matched by posted data.';\n \t\treturn false;\n \t}\n \t\n \tif(sizeof($userDataResult['data']) > 1){\n \t\t$this->error = 'USER: '.__LINE__. ' An unknown error has occured multiple user records matched by posted data.';\n \t\treturn false;\n \t}\n \t\n \t//TODO - ZOIDBERG\n \tif($userDataResult['data'][0]['email_confirmed'] == 'true'){\n \t\t\n \t\t//User already validated\n \t\t$this->success = 'User exists but has already confirmed email';\n\t\t\treturn array();\n \t\n \t}\n \t\n \t$validateUserSQL = \"UPDATE fl_users SET email_confirmed = 'true' WHERE email_confirmation_token = ?\";\n \t$validateUserResult = jan_stmtQuery2($validateUserSQL, array($confirmationToken));\n \t\n \t\t if($validateUserResult === false){\n \t\t$this->error = 'USER: '.__LINE__. ' Unable to complete update of email confirmation.';\n \t\treturn false;\n \t}\n \t\n \treturn array('rows_affected'=>$validateUserResult['affected_rows']);\n \n }", "title": "" }, { "docid": "4fab67d45a0d2f4ef3ce0942c6df122f", "score": "0.54236054", "text": "public static function unRepliedFanMail(){\n global $db, $session;\n $result = 0;\n $query = \"SELECT * FROM fan_mail WHERE(mail_to='{$session->user_id}' AND no_of_replies = 0)\";\n $rs = $db->query($query);\n if($rs)\n $result = $db->num_rows($rs);\n return $result;\n }", "title": "" }, { "docid": "5fc6f69462c86c6e1967fac520c6312c", "score": "0.5412889", "text": "function send_unpaid_invoice_frequency_reminders()\n\t{\n\t\tglobal $ilance, $ilconfig, $ilpage;\n\t\t$cronlog = '';\n\t\t$count = 0;\n\t\t$message = array();\n\t\t$remindfrequency = $ilance->datetimes->fetch_date_fromnow($ilconfig['invoicesystem_resendfrequency']);\n\t\t$expiry = $ilance->db->query(\"\n\t\t\tSELECT user_id, invoiceid, projectid, buynowid, description, paiddate, invoicetype, duedate, createdate, amount, paid, totalamount, transactionid, isif, isfvf, currency_id, istaxable\n\t\t\tFROM \" . DB_PREFIX . \"invoices\n\t\t\tWHERE (invoicetype = 'commission' OR invoicetype = 'credential' OR invoicetype = 'debit')\n\t\t\t\tAND isdeposit = '0'\n\t\t\t\tAND iswithdraw = '0'\n\t\t\t\tAND ispurchaseorder = '0'\n\t\t\t\tAND (status = 'unpaid' OR status = 'scheduled')\n\t\t\t\tAND amount > 0\n\t\t\t\tAND projectid > 0 \n\t\t\", 0, null, __FILE__, __LINE__);\n\t\tif ($ilance->db->num_rows($expiry) > 0)\n\t\t{\n\t\t\twhile ($reminder = $ilance->db->fetch_array($expiry, DB_ASSOC))\n\t\t\t{\n\t\t\t\t$user = $ilance->db->query(\"\n\t\t\t\t\tSELECT user_id, email, username, autopayment, first_name, available_balance\n\t\t\t\t\tFROM \" . DB_PREFIX . \"users\n\t\t\t\t\tWHERE user_id = '\" . $reminder['user_id'] . \"'\n\t\t\t\t\tLIMIT 1\n\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\tif ($ilance->db->num_rows($user) > 0)\n\t\t\t\t{\n\t\t\t\t\t$res_user = $ilance->db->fetch_array($user, DB_ASSOC);\n\t\t\t\t\t// does user have sufficient funds within online account to cover invoice\n\t\t\t\t\t// before we send an unpaid reminder?\n\t\t\t\t\tif ($res_user['available_balance'] >= $reminder['totalamount'] AND $res_user['autopayment'] == '1')\n\t\t\t\t\t{\n\t\t\t\t\t\t// pay invoice using funds available via online account\n\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"invoices\n\t\t\t\t\t\t\tSET status = 'paid',\n\t\t\t\t\t\t\tpaid = '\" . $reminder['totalamount'] . \"',\n\t\t\t\t\t\t\tpaymethod = 'account',\n\t\t\t\t\t\t\tpaiddate = '\" . DATETIME24H . \"',\n\t\t\t\t\t\t\tcustommessage = '\" . $ilance->db->escape_string('{_automated_debit_from_account_balance_via_billing_and_payments}') . \"'\n\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\tAND invoiceid = '\" . $reminder['invoiceid'] . \"'\n\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t// adjust customers online account balances\n\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"users\n\t\t\t\t\t\t\tSET total_balance = total_balance - $reminder[totalamount],\n\t\t\t\t\t\t\tavailable_balance = available_balance - $reminder[totalamount]\n\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t// handle the insertion fee and/or final value fee automatic payment settlement and set the fields in the auction table to paid\n\t\t\t\t\t\tif ($reminder['isif'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// this is an insertion fee.. update auction listing table\n\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"projects\n\t\t\t\t\t\t\t\tSET isifpaid = '1'\n\t\t\t\t\t\t\t\tWHERE project_id = '\" . $reminder['projectid'] . \"'\n\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($reminder['isfvf'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// this is a final value fee.. update auction listing table\n\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"projects\n\t\t\t\t\t\t\t\tSET isfvfpaid = '1'\n\t\t\t\t\t\t\t\tWHERE project_id = '\" . $reminder['projectid'] . \"'\n\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// this could also be a payment from the \"seller\" for an unpaid \"buy now\" escrow fee OR unpaid \"buy now\" fvf.\n\t\t\t\t\t\t// let's check the buynow order table to see if we have a matching invoice to update as \"ispaid\"..\n\t\t\t\t\t\t// this scenerio would kick in once a buyer or seller deposits funds, this script runs and tries to pay the unpaid fees automatically..\n\t\t\t\t\t\t// at the same time we need to update the buy now order table so the presentation layer knows what's paid, what's not.\n\t\t\t\t\t\t$buynowcheck = $ilance->db->query(\"\n\t\t\t\t\t\t\tSELECT escrowfeeinvoiceid, escrowfeebuyerinvoiceid, fvfinvoiceid, fvfbuyerinvoiceid\n\t\t\t\t\t\t\tFROM \" . DB_PREFIX . \"buynow_orders\n\t\t\t\t\t\t\tWHERE project_id = '\" . $reminder['projectid'] . \"'\n\t\t\t\t\t\t\t\tAND orderid = '\" . $reminder['buynowid'] . \"'\n\t\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\tif ($ilance->db->num_rows($buynowcheck) > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$resbuynow = $ilance->db->fetch_array($buynowcheck, DB_ASSOC);\n\t\t\t\t\t\t\tif ($reminder['invoiceid'] == $resbuynow['escrowfeeinvoiceid'])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// invoice being paid is from seller paying a buy now escrow fee\n\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"buynow_orders\n\t\t\t\t\t\t\t\t\tSET isescrowfeepaid = '1'\n\t\t\t\t\t\t\t\t\tWHERE orderid = '\" . $reminder['buynowid'] . \"'\n\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if ($reminder['invoiceid'] == $resbuynow['escrowfeebuyerinvoiceid'])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// invoice being paid is from buyer paying a buy now escrow fee\n\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"buynow_orders\n\t\t\t\t\t\t\t\t\tSET isescrowfeebuyerpaid = '1'\n\t\t\t\t\t\t\t\t\tWHERE orderid = '\" . $reminder['buynowid'] . \"'\n\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if ($reminder['invoiceid'] == $resbuynow['fvfinvoiceid'])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// invoice being paid is from seller paying a buy now fvf\n\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"buynow_orders\n\t\t\t\t\t\t\t\t\tSET isfvfpaid = '1'\n\t\t\t\t\t\t\t\t\tWHERE orderid = '\" . $reminder['buynowid'] . \"'\n\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if ($reminder['invoiceid'] == $resbuynow['fvfbuyerinvoiceid'])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// invoice being paid is from buyer paying a buy now fvf\n\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"buynow_orders\n\t\t\t\t\t\t\t\t\tSET isfvfbuyerpaid = '1'\n\t\t\t\t\t\t\t\t\tWHERE orderid = '\" . $reminder['buynowid'] . \"'\n\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// adjust members total amount paid for subscription plan\n\t\t\t\t\t\t$ilance->accounting_payment->insert_income_spent($res_user['user_id'], sprintf(\"%01.2f\", $reminder['totalamount']), 'credit');\n\t\t\t\t\t\t// remove old invoice logs now that it's paid in full\n\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\tDELETE FROM \" . DB_PREFIX . \"invoicelog\n\t\t\t\t\t\t\tWHERE invoiceid = '\" . $reminder['invoiceid'] . \"'\n\t\t\t\t\t\t\");\n\t\t\t\t\t\t$existing = array (\n\t\t\t\t\t\t\t'{{provider}}' => $res_user['username'],\n\t\t\t\t\t\t\t'{{invoiceid}}' => $reminder['invoiceid'],\n\t\t\t\t\t\t\t'{{new_txn_transaction}}' => $reminder['transactionid'],\n\t\t\t\t\t\t\t'{{invoice_amount}}' => $ilance->currency->format($reminder['totalamount'], $reminder['currency_id']),\n\t\t\t\t\t\t\t'{{description}}' => $reminder['description'],\n\t\t\t\t\t\t\t'{{datepaid}}' => print_date(DATETIME24H, $ilconfig['globalserverlocale_globaltimeformat'], 0, 0),\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$ilance->email->mail = $res_user['email'];\n\t\t\t\t\t\t$ilance->email->slng = fetch_user_slng($res_user['user_id']);\n\t\t\t\t\t\t$ilance->email->get('transaction_payment_complete');\n\t\t\t\t\t\t$ilance->email->set($existing);\n\t\t\t\t\t\t$ilance->email->send();\n\t\t\t\t\t\t$ilance->email->mail = SITE_EMAIL;\n\t\t\t\t\t\t$ilance->email->slng = fetch_site_slng();\n\t\t\t\t\t\t$ilance->email->get('transaction_payment_complete_admin');\n\t\t\t\t\t\t$ilance->email->set($existing);\n\t\t\t\t\t\t$ilance->email->send();\n\t\t\t\n\t\t\t\t\t\t($apihook = $ilance->api('send_unpaid_invoice_frequency_reminders_paid_sent_end')) ? eval($apihook) : false;\n\t\t\t\t\t}\n\t\t\t\t\t// insufficient funds in account balance\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// unpaid invoice reminder for this customer\n\t\t\t\t\t\t$logs = $ilance->db->query(\"\n\t\t\t\t\t\t\tSELECT invoicelogid, date_sent, date_remind\n\t\t\t\t\t\t\tFROM \" . DB_PREFIX . \"invoicelog\n\t\t\t\t\t\t\tWHERE user_id = '\" . $reminder['user_id'] . \"'\n\t\t\t\t\t\t\t\tAND invoiceid = '\" . $reminder['invoiceid'] . \"'\n\t\t\t\t\t\t\tORDER BY invoicelogid DESC\n\t\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\tif ($ilance->db->num_rows($logs) == 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\tINSERT INTO \" . DB_PREFIX . \"invoicelog\n\t\t\t\t\t\t\t\t(invoicelogid, user_id, invoiceid, invoicetype, date_sent, date_remind)\n\t\t\t\t\t\t\t\tVALUES(\n\t\t\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t\t\t'\" . $res_user['user_id'] . \"',\n\t\t\t\t\t\t\t\t'\" . $reminder['invoiceid'] . \"',\n\t\t\t\t\t\t\t\t'\" . $reminder['invoicetype'] . \"',\n\t\t\t\t\t\t\t\t'\" . DATETODAY . \"',\n\t\t\t\t\t\t\t\t'\" . $remindfrequency . \"')\n\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\tif ($ilconfig['invoicesystem_unpaidreminders'])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$url = '';\n\t\t\t\t\t\t\t\t$project_type = fetch_auction('project_state', $reminder['projectid']);\n\t\t\t\t\t\t\t\tif ($project_type == 'service')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$url = HTTPS_SERVER . $ilpage['rfp'] . '?id=' . ($reminder['projectid']);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if ($project_type == 'product')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$url = HTTPS_SERVER . $ilpage['merch'] . '?id=' . ($reminder['projectid']);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$url = !empty($url) ? \"URL: \" . $url : \"\";\n\t\t\t\t\t\t\t\t$crypted = array ('id' => $reminder['invoiceid']);\n\t\t\t\t\t\t\t\t$invoiceurl = HTTP_SERVER . $ilpage['invoicepayment'] . '?crypted=' . encrypt_url($crypted);\n\t\t\t\t\t\t\t\tif (!isset($message[$res_user['user_id']]))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$message[$res_user['user_id']]['email'] = $res_user['email'];\n\t\t\t\t\t\t\t\t\t$message[$res_user['user_id']]['first_name'] = $res_user['first_name'];\n\t\t\t\t\t\t\t\t\t$message[$res_user['user_id']]['body'] = '';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$message[$res_user['user_id']]['body'] .= \"{_description}: \" . $reminder['description'] . \"\n\" . $url . \"\n{_pay_invoice}: \" . $invoiceurl . \" \n{_due_date}: \" . print_date($reminder['duedate']) . \"\n{_transaction_id}: \" . $reminder['transactionid'] . \"\n{_amount}: \" . $ilance->currency->format($reminder['amount'], $reminder['currency_id']) . \"\n\" . (($reminder['istaxable'] == '1') ? '{_tax}: ' . $reminder['taxinfo'] : '') . \"\n{_total_amount}: \" . $ilance->currency->format($reminder['totalamount'], $reminder['currency_id']) . \"\n{_amount_paid}: \" . $ilance->currency->format($reminder['paid'], $reminder['currency_id']) . \"\n\\n**********************************************\n\";\n\t\t\t\t\t\t\t\t$count++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ($ilance->db->num_rows($logs) > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// it appears we have a log for this invoice id ..\n\t\t\t\t\t\t\t$reslogs = $ilance->db->fetch_array($logs, DB_ASSOC);\n\t\t\t\t\t\t\t// time to send an update to this user for this invoice\n\t\t\t\t\t\t\t// make sure we didn't already send one today\n\t\t\t\t\t\t\tif ($reslogs['date_remind'] == DATETODAY AND $reslogs['date_sent'] == DATETODAY)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// we've sent a reminder to this user for this invoice today already.. do nothing until next reminder frequency \n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if ($reslogs['date_remind'] == DATETODAY AND $reslogs['date_sent'] != DATETODAY)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// time to send a new frequency reminder.. update table with new email sent date as today\n\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"invoicelog\n\t\t\t\t\t\t\t\t\tSET date_sent = '\" . DATETODAY . \"',\n\t\t\t\t\t\t\t\t\tdate_remind = '\" . $remindfrequency . \"'\n\t\t\t\t\t\t\t\t\tWHERE invoiceid = '\" . $reminder['invoiceid'] . \"'\n\t\t\t\t\t\t\t\t\t\tAND user_id = '\" . $reminder['user_id'] . \"'\n\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\tif ($ilconfig['invoicesystem_unpaidreminders'])\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$url = '';\n\t\t\t\t\t\t\t\t\t$project_type = fetch_auction('project_state', $reminder['projectid']);\n\t\t\t\t\t\t\t\t\tif ($project_type == 'service')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$url = HTTPS_SERVER . $ilpage['rfp'] . '?id=' . ($reminder['projectid']);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if ($project_type == 'product')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$url = HTTPS_SERVER . $ilpage['merch'] . '?id=' . ($reminder['projectid']);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$url = !empty($url) ? \"URL: \" . $url : \"\";\n\t\t\t\t\t\t\t\t\t$crypted = array ('id' => $reminder['invoiceid']);\n\t\t\t\t\t\t\t\t\t$invoiceurl = HTTP_SERVER . $ilpage['invoicepayment'] . '?crypted=' . encrypt_url($crypted);\n\t\t\t\t\t\t\t\t\tif (!isset($message[$res_user['user_id']]))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$message[$res_user['user_id']]['email'] = $res_user['email'];\n\t\t\t\t\t\t\t\t\t\t$message[$res_user['user_id']]['first_name'] = $res_user['first_name'];\n\t\t\t\t\t\t\t\t\t\t$message[$res_user['user_id']]['body'] = '';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$message[$res_user['user_id']]['body'] .= \"{_description}: \" . $reminder['description'] . \"\n\" . $url . \"\n{_pay_invoice}: \" . $invoiceurl . \" \n{_due_date}: \" . print_date($reminder['duedate']) . \"\n{_transaction_id}: \" . $reminder['transactionid'] . \"\n{_amount}: \" . $ilance->currency->format($reminder['amount'], $reminder['currency_id']) . \"\n\" . (($reminder['istaxable'] == '1') ? '{_tax}: ' . $reminder['taxinfo'] : '') . \"\n{_total_amount}: \" . $ilance->currency->format($reminder['totalamount'], $reminder['currency_id']) . \"\n{_amount_paid}: \" . $ilance->currency->format($reminder['paid'], $reminder['currency_id']) . \"\n\\n**********************************************\n\";\n\t\t\t\t\t\t\t\t $count++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\t\t\t($apihook = $ilance->api('send_unpaid_invoice_frequency_reminders_unpaid_sent_end')) ? eval($apihook) : false;\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\tif (count($message) > 1)\n\t\t\t{\n\t\t\t\tforeach ($message as $key => $value)\n\t\t\t\t{\n\t\t\t\t\t$ilance->email->mail = $value['email'];\n\t\t\t\t\t$ilance->email->slng = fetch_user_slng($key);\n\t\t\t\t\t$ilance->email->get('cron_expired_subscription_invoices_reminder_items');\n\t\t\t\t\t$ilance->email->set(array (\n\t\t\t\t\t\t'{{messagebody}}' => $value['body'],\n\t\t\t\t\t\t'{{firstname}}' => $value['first_name'],\n\t\t\t\t\t\t'{{transactions_url}}' => HTTPS_SERVER . $ilpage['accounting'] . '?cmd=transactions&status=unpaid',\n\t\t\t\t\t));\n\t\t\t\t\t$ilance->email->send();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $cronlog;\n\t}", "title": "" }, { "docid": "70117723f44805b8981f13af23d7ba08", "score": "0.54054224", "text": "public function getMails(): array\n {\n return $this->mails;\n }", "title": "" }, { "docid": "2cc6ce1c5c632107fc5bc7a238ffdffb", "score": "0.5405132", "text": "public function getAllEmails()\n {\n $emails = $this->jsonEmail($this->mailcatcher()->get('messages'));\n\n if ( empty($emails) ) {\n $this->fail('No messages returned');\n }\n\n return $emails;\n }", "title": "" }, { "docid": "776fc579e1bd65098dc2647a75db1012", "score": "0.53925747", "text": "public function getEmails()\n {\n return $this->emails;\n }", "title": "" }, { "docid": "4ddfef51c024a6ab7bc5e770d7e0bfe0", "score": "0.53906685", "text": "private function _getUpcommingNotificatons()\n {\n // New notification kind of comming with not every request, but sometimes\n return (rand(1, 7) != 2) ? false : $this->_generateRandomNotificationSet(2);\n }", "title": "" }, { "docid": "a57d75d33229961c13882564804a9a73", "score": "0.53884953", "text": "public function getAllEmailsToNotify(): array\n {\n return $this->config['email']['admins'];\n }", "title": "" }, { "docid": "334ddb660f244439f3b309bf4f2704e5", "score": "0.53761315", "text": "public function getWhoToNotifyByEmail()\n\t{\n\t\t//return array\n\t\t$group = Group::model()->findByPk($this->groupId);\n\t\t$emails = $group->getMembersByStatus(self::STATUS_ACTIVE);\n\t\treturn $emails->data;\n\t}", "title": "" }, { "docid": "243f1293f8fef97790b8757c497a07ef", "score": "0.53692", "text": "protected function unanswered()\n\t{\n\t\treturn $this->builder->where('replies_count', 0);\n\t}", "title": "" }, { "docid": "8aa383303e2166fc16f6a3a8e2cf59ea", "score": "0.53659725", "text": "public function thatDoesNotCollectEmails()\n {\n return $this->state([\n 'collect_email_addresses' => false,\n ]);\n }", "title": "" }, { "docid": "b5152127f7012e691096ebed9fc4d37c", "score": "0.5351523", "text": "public function get_unfinished_responses() {\n global $DB;\n $responses = array();\n\n $completedtmp = $this->get_current_completed_tmp();\n if ($completedtmp) {\n $responses = $DB->get_records('feedback_valuetmp', ['completed' => $completedtmp->id]);\n }\n return $responses;\n }", "title": "" }, { "docid": "07f9b4fea26cf05b71443e46ffb83dd4", "score": "0.5328245", "text": "public function grabLastSentEmail()\n {\n $this->seeEmailIsSent();\n $messages = $this->grabSentEmails();\n return end($messages);\n }", "title": "" }, { "docid": "ac9ad7c00eedaffc938d528e257c42f5", "score": "0.5325675", "text": "function check_for_sending_notification()\n {\n $table_name = $this->wpdb->prefix . $this->review_table_name;\n $results = $this->wpdb->get_results(\"SELECT * FROM $table_name WHERE flag = 0\", ARRAY_A);\n foreach($results as $result){\n if (strtotime($result['reg_date'])<strtotime('-2 days') && !$result['product_id']) {\n //Send email to client\n //set flag to 1\n } elseif (strtotime($result['reg_date'])<strtotime('-6 days') && $result['product_id']){\n //Send email to recipient\n //set flag to 1\n }\n }\n }", "title": "" }, { "docid": "ff75ff2b65260579612be394130c2a20", "score": "0.5319068", "text": "protected function assertEmailsSent() {\n // There should be one user activation email.\n $captured_emails = \\Drupal::state()->get('system.test_mail_collector', []);\n $this->assertCount(1, $captured_emails);\n $this->assertEquals('user_status_activated', $captured_emails[0]['id']);\n }", "title": "" }, { "docid": "5ddd42e3b95eb63c3b1d81e8f291bb74", "score": "0.53111446", "text": "public static function invalidEmails(): array\n {\n return [\n [''],\n ['string'],\n ['<tag>'],\n [['[email protected]', '1.0', '', 'string']],\n ];\n }", "title": "" }, { "docid": "10b98be1586386160a044d5c58548fd5", "score": "0.5296441", "text": "function learndash_notifications_delete_delayed_emails() {\n\tglobal $wpdb;\n\n\t$timestamp = strtotime( '-2 hours' );\n\n\t$sql = \"DELETE FROM {$wpdb->prefix}ld_notifications_delayed_emails WHERE `sent_on` <= {$timestamp}\";\n\n\t$count = $wpdb->query( $sql );\n\n\tdo_action( 'learndash_notifications_delete_delayed_emails', $count );\n}", "title": "" }, { "docid": "d6113950c3d8828d84d57a2e2b20a083", "score": "0.5286196", "text": "private function get_email_array()\n {\n\t\t$emails = array();\n\t\tforeach($this->data AS $row) if(!empty($row['email_address'])) array_push($emails, $row['email_address']);\n\t\t\n\t\treturn $emails;\n\t}", "title": "" }, { "docid": "65d693a4b07a9a1cdc0f0eaa8876a8bf", "score": "0.5283892", "text": "public function emails() {\n\t\t$faq = $this->db->query ( \"\n\t\tselect a.cod_lista, a.remetente as remetente,a.email as email,b.descricao as assunto,c.cidade as unidade from isp_city10.site_emails_lista a inner join isp_city10.site_emails b on a.cod_email = b.cod_email inner join isp_city10.sys_unidade c on a.cod_unidade = c.cod_unidade;\n\t\t\" );\n\t\t\n\t\tif ($faq) {\n\t\t\treturn $faq;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "e0c594b869c6fd1c7c0dee47a3b8888d", "score": "0.5278216", "text": "function getEmailsVacationON()\n {\n\t$query = \"SELECT id, account, ini_date, end_date, subject, body FROM messages_vacations WHERE vacation = 'yes'\";\n\t$result=$this->_DB->fetchTable($query,true);\n\tif($result==FALSE){\n $this->errMsg = $this->_DB->errMsg;\n return false;\n }\n\treturn $result;\n }", "title": "" }, { "docid": "a007e89dce7034433f55e6b636531ef4", "score": "0.5276696", "text": "public function nonrepeatemail(){\n $gmc= new \\GearmanClient();\n $gmc->addServer();\n $gmc->setCompleteCallback([$this,\"reverse_complete\"]);\n ini_set('memory_limit', '-1'); \n ini_set('max_execution_time', -1);\n $todayDate = date('Y/m/d H:00');\n $this->loadModel('Campaigns');\n $this->loadModel('Messages');\n $newCampaigns = $this->Campaigns->find()\n ->Contain([\n 'Messages' => function($q){return $q->select([\n 'Messages.promo_code','Messages.customer_id','Messages.status','Messages.campaign_id','Messages.store_id','Messages.id'\n ])\n ->where(['Messages.status' => 1]);},\n 'Messages.Customers' => function($q){return $q->where(['Customers.email !=' => ''])->select(['Customers.name','Customers.email']);},\n ])\n ->select([\n 'Campaigns.id','Campaigns.repeat','Campaigns.status','Campaigns.message', 'Campaigns.campaign_type', 'Campaigns.send_date',\n 'Campaigns.subject'\n ])\n ->hydrate(false)\n ->where([\n 'Campaigns.repeat' => 0,\n 'Campaigns.status' => 1,\n 'Campaigns.campaign_type' => \"email\",\n 'Campaigns.send_date' => $todayDate\n ])\n ->toArray();\n\n $this->loadModel('Stores');\n foreach($newCampaigns as $newCampaign){\n $check = $this->Campaigns->find()->where(['status' => 1,'id' => $newCampaign['id']]);\n if($check){\n $this->Campaigns->updateAll(['status' => 0],['id' => $newCampaign['id']]);\n foreach($newCampaign['messages'] as $message){\n $dt = [\n \"message\"=>$newCampaign['message'],\n 'store_id'=>$message['store_id'],\n 'email' => $message['customer']['email'],\n 'promo_code' => $message['promo_code'],\n 'cst_name' => $message['customer']['name'],\n 'message_id' => $message['id'],\n 'subject' => $newCampaign['subject'],\n 'campaign_id' => $newCampaign['id']\n ];\n $task= $gmc->addTaskBackground(\"nonrepeatemail\", serialize($dt),null);\n continue;\n }\n }\n $this->Campaigns->updateAll(['status' => 0],['id' => $newCampaign['id']]);\n }\n $gmc->runTasks();\n exit;\n }", "title": "" }, { "docid": "34fc9074f4381a46e61e0b12d10467f4", "score": "0.5273632", "text": "private function _triggerEmailNotifications() {\n if ( nullInt($this->settings['site_id']) > 0 ) {\n $rslt = $this->_sendEmailNotification();\n return array( 'sent' => $rslt );\n }\n\n // If We're Here, It's Not Good\n $this->_setMetaMessage(\"There is no Site Record specified for the Token\", 400);\n return false;\n }", "title": "" }, { "docid": "2df04bd75ce37615774ab1d156ef6c1b", "score": "0.52660877", "text": "function forgetValidateExisringEmail()\n\t{\n\n\t\t$ObjClsDBInteraction = new class_dbconnector();\n\n\t\t$sSQL = \"SELECT email FROM tbl_users WHERE id IS NOT NULL\";\n\t\tif(isset($this->email) && $this->email!=\"\")\n\t\t{\n\t\t\t$sSQL .= \" AND email = '$this->email' \";\n\t\t}\n\t\tif(isset($this->id) && $this->id!=\"\")\n\t\t{\n\t\t\t$sSQL .= \" AND id != $this->id\";\n\t\t}\n\t\t//get users by user type\n\t\tif(isset($this->user_type) && $this->user_type!=\"\")\n\t\t{\n\t\t\t$sSQL .= \" AND user_type = $this->user_type\";\n\t\t}\n\t\t//echo $sSQL . \";<br><br><br>\";\n\t\t$objRecordSet = $ObjClsDBInteraction -> select($sSQL);\n\t\tif(mysql_num_rows($objRecordSet)>0)\n\t\t{\n\t\t\t$objRecordSet = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$objRecordSet = false;\n\t\t}\n\t\t$ObjClsDBInteraction->connection_close();\n\t\treturn $objRecordSet;\n\t}", "title": "" }, { "docid": "1349eeb2f7ef487fef0f51c36f23f050", "score": "0.52642643", "text": "public function clearDeletedMail()\n {\n return $this->clearDeletedQueue('mail');\n }", "title": "" }, { "docid": "0c8a113354bdbbb17ea7452b33c7b724", "score": "0.52621466", "text": "private function get_all_resend_at() {\n\n\t\t$resend_at = ITSEC_Modules::get_setting( 'notification-center', 'resend_at' );\n\n\t\tif ( ! is_array( $resend_at ) || empty( $resend_at ) ) {\n\t\t\t$resend_at = array();\n\t\t}\n\n\t\treturn array_merge( array_fill_keys( array_keys( $this->get_notifications() ), 0 ), $resend_at );\n\t}", "title": "" }, { "docid": "dfc9ab56b59a584f48ce2eeb5de627ea", "score": "0.5226961", "text": "public function reportUnsubs()\n {\n $unsubs = array(6);\n $c = $this->modx->newQuery('Unsubscriber');\n $c->where(array(\n 'newsletter' => $this->config['newsletter_ids']\n )\n );\n $c->limit($this->options['limit']);\n \n // Get the count of fails\n $count = $this->modx->getCount('Unsubscriber', $c);\n // No fail mails at all - Positive\n if($count <= 0)\n return false;\n $items = $this->modx->getCollection('Unsubscriber', $c);\n foreach($items as $item) {\n $list[] = $item->toArray('', false, true);\n }\n return array('type' => 'unsubs', 'tab' => 'subscriber', 'data' => $list);\n }", "title": "" }, { "docid": "4f5bd11b946370ae4cfe480d85fffa50", "score": "0.52184296", "text": "protected function _remove_mails($Users_to_send)\n\t{\n\t\t$Users_Exclude_emails = $this->rule->ausers_excludeusers;\n\t\t$Users_Exclude_emails = explode(PHP_EOL, $Users_Exclude_emails);\n\t\t$Users_Exclude_emails = array_map('trim', $Users_Exclude_emails);\n\n\t\tforeach ($Users_Exclude_emails as $cur_email) {\n\t\t\t$cur_email = StringHelper::trim($cur_email);\n\n\t\t\tif ($cur_email == \"\") {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tforeach ($Users_to_send as $v => $k) {\n\t\t\t\tif ($k['email'] == $cur_email) {\n\t\t\t\t\tunset($Users_to_send[$v]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $Users_to_send;\n\t}", "title": "" }, { "docid": "70ad23c8c39e0f63711dc0796d71fecb", "score": "0.521715", "text": "public function getExchangedMessages()\n {\n return $this->messages;\n }", "title": "" }, { "docid": "fe3badcaf825b412804a095506b0e515", "score": "0.52118343", "text": "function sendAuctionEmails() {\n\t\t$time = time();\n\t\t$toDate = date('Y-m-d H:i:s', $time);\n\t\t$lastTime = $time - (2592000*2); // 60*60*24*30*2\n\t\t$fromDate = date('Y-m-d H:i:s', $lastTime);\n\n /* Get the collection */\n $orders = Mage::getModel('sales/order')->getCollection()\n ->addAttributeToSelect('customer_id')\n ->addAttributeToFilter ('created_at', array (\n 'from' => $fromDate,\n 'to' => $toDate\n ) )\n ->addAttributeToFilter ( 'status', array (\n 'eq' => Mage_Sales_Model_Order::STATE_COMPLETE\n ) );\n\n $cusstomers=$this->getAllCusstomersIds();\n\n\t\tforeach ($orders as $order) {\n\t\t\tif(($key = array_search($order->getCustomerId(), $cusstomers)) !== false) {\n\t\t\t\tunset($cusstomers[$key]);\n\t\t\t}\n\t\t}\n\n\t\t$sendcusstomers = Mage::getModel('backorder/backorder')\n\t\t->getCollection()\n\t\t->addFieldToFilter ('send_time', array (\n\t\t\t\t'from' => $fromDate,\n\t\t\t\t'to' => $toDate\n\t\t) )\n\t\t->addFieldToSelect('customer_id');\n\n\t\tforeach ($sendcusstomers as $sendcusstomer) {\n\t\t\tif(($key = array_search($sendcusstomer->getCustomerId(), $cusstomers)) !== false) {\n\t\t\t\tunset($cusstomers[$key]);\n\t\t\t}\n\t\t}\n\n\t\t$sender = Mage::getModel('core/email_template');\n\t\tforeach($cusstomers as $custId) {\n\t\t\t$customer_data = Mage::getModel('customer/customer')->load($custId);\n\t\t\t$email = $customer_data->getSubscriberEmail();\n\t\t\t$name = $customer_data->getSubscriberFullName();\n\n\t\t\t$backorderModel = Mage::getModel('backorder/backorder');\n\n\t\t\t$backorderModel\n\t\t\t->setCustomerId($custId)\n\t\t\t->save();\n\n\t\t\t$sender->emulateDesign($customer_data->getStoreId());\n\t\t\t$successSend = $sender->send($email, $name, array('subject'=>'We havent heard from you for a while','customer' => $customer_data));\n\t\t\t$sender->revertDesign();\n\t\t}\n\n\n\t}", "title": "" }, { "docid": "466e0808462d34431346dbef67e56809", "score": "0.5207936", "text": "public function email_send_list() {\n $email_listing = EmailSending::orderBy('id', 'DESC')->select(['id', 'subject', 'success', 'failed', 'created_at'])->get();\n return($email_listing);\n }", "title": "" }, { "docid": "76e2157988689b37dd05ea016f5426a3", "score": "0.5200211", "text": "public function getPendingActivations()\n {\n return $this->pending_activations;\n }", "title": "" }, { "docid": "121e7916888c080b5062e7a2d7953d86", "score": "0.5192705", "text": "public function sendPendingMail () {\n //get pending mail\n $criteria = new CDbCriteria();\n $criteria->compare('runTime', '<' . time());\n $criteria->compare('status', 'pending');\n $criteria->limit = 100;\n $criteria->order = 'runTime ASC';\n $emails = DbMailOutbox::Model()->findAll($criteria);\n if (!empty($emails)) {\n\n //get mailer extension\n Yii::import('ext.YiiMailer.YiiMailer');\n $this->mailer = new YiiMailer();\n\n foreach ($emails as $i => $email) {\n //clear mailer data from previous email\n $this->mailer->clear();\n\n //set recipients\n if(strpos($email->sendFrom,'@completeintel.com') !== false){\n $this->mailer->setFrom($email->sendFrom, Yii::app()->params['name']);\n } else {\n $this->mailer->setFrom($email->sendFrom, $email->sendFrom);\n }\n $this->mailer->Sender = $email->sendFrom;\n $this->mailer->ReturnPath = $email->sendFrom;\n\n if (strpos($email->sendTo, ',') !== false) {\n $this->mailer->setTo(explode(',', $email->sendTo));\n } else {\n $this->mailer->setTo($email->sendTo);\n }\n\n if (strpos($email->sendCc, ',') !== false) {\n $this->mailer->setCc(explode(',', $email->sendCc));\n } else {\n $this->mailer->setCc($email->sendCc);\n }\n\n if (strpos($email->sendBcc, ',') !== false) {\n $this->mailer->setBcc(explode(',', $email->sendBcc));\n } else {\n $this->mailer->setBcc($email->sendBcc);\n }\n \n\n //attach files\n if (!empty($email->attach)) {\n $email->formatSerialised('attach', 'array');\n foreach ($email->attach as $attachment) {\n $path = $attachment;\n if (!file_exists($path) || !is_file($path)) {\n $path = YiiBase::getPathOfAlias('root') . '/' . $attachment;\n }\n $this->mailer->setAttachment($path);\n }\n }\n\n //set email content\n $this->mailer->setBody($this->emogrify($email->body));\n $this->mailer->setSubject($email->subject);\n\n $this->mailer->isHTML(true);\n $this->mailer->clearLayout();\n $this->mailer->clearView();\n\n //send and log outcome\n if ($this->mailer->send()) {\n $email->status = 'sent';\n $email->sentTime = time();\n } else {\n $email->status = 'failed';\n }\n $email->save();\n }\n }\n }", "title": "" }, { "docid": "af9f0f010af250ff177555824788cd05", "score": "0.5181951", "text": "public function OpenConfirmations(){\n return $this->owner->getManyManyComponents(\n 'FriendConfirmed'\n )->leftJoin(\n \"Member_FriendRequested\", \n \"\\\"Member_FriendRequested\\\".\\\"MemberID\\\" = \\\"FriendConfirmed\\\".\\\"ChildID\\\" AND \\\"Member_FriendRequested\\\".\\\"ChildID\\\" = \\\"FriendConfirmed\\\".\\\"MemberID\\\"\",\n \"FriendConfirmed\"\n )->where(\"\\\"FriendConfirmed\\\".\\\"MemberID\\\" IS NULL AND \\\"FriendConfirmed\\\".\\\"ChildID\\\" IS NULL\");\n }", "title": "" }, { "docid": "45be5a5a0d9173b61cc2dd8e987330b1", "score": "0.51791465", "text": "function missingfrommc($listsandnumbers) {\n\t\t$returnarray = array();\n\t// for each mailchimp list get the members list and get the relevant db entries\n\t// compare the two and construct an assoc array to return\n\t// the mailchimp list returns the email address only\t\n\tforeach($this->listselect as $listname=>$listsql) {\n\t\t$listid =$listsandnumbers[$listname]['id']\t;\n\t\t$mcdetails = $this->getmailchimplistdetail($listid);\n\t\t$mcemails =array();\n\t\t$i=0;\n\n\t\tforeach($mcdetails as $amember){\n\t\t\tif($amember['status']!='unsubscribed') $mcemails[$i] = strtolower($amember['email']);\n\t\t\t$i++;\n\t\t}\t\t\n\t//\tprint \" mcemails for \".$listname.\"*****\";\n\t//\tvar_export($mcemails);\t\t// get the unique emails appropriate from members db\n\t//\techo \"getting sql select \".var_export($listsql,true).\" \";\n\t\t$membemails= $this->db->exec($listsql['sqlselect']);\n\t\t$onlyemails =array();\n\t\t$i=0;\n\t\tforeach($membemails as $amember){\n\t\t$onlyemails[$i] = strtolower($amember['email']);\n\t\t$i++;\n\t\t}\n\t//\t\tprint \" onlyemails for \".$listname.\"*****\";\n\t//\tvar_export($onlyemails);\n\t$this->onlyemails[$listname] = $onlyemails;\n\t$this->mcemails[$listname] = $mcemails;\n\t\t$notinmc =array_diff($onlyemails,$mcemails);\t\n\n\t//\t\t\tprint \" notinmc for \".$listname.\"*****\";\n\t//\tvar_export($notinmc);\n/*******************\n** Now have an array of email addresses\n**\tso need to construct a set of arrays \n** includes an array keyed by the list name\n** then value is an assoc with keys 'id' for list number\n**\t and 'missing' is an array of emails. \n**\teach email array contains email, FNAME,LNAME,LOC,MTYPE and MNUM \n**\t the values come from $membemails\n**\tThat is passed eventually to addemailtomc\n*********************/\n\t//var_export($notinmc);\n\n//print \" #367 \".$listname.\" \";\n\t$returnarray[$listname]['id']=$listid;\n// print \" #369 \".$listid.\" \";\n//var_export(\t$returnarray);\n\t$j=0;\n\t$returnarray[$listname]['missing']=array();\t\n\tforeach($notinmc as $eml) {\n//print \"309 \".$eml.\" \";\n\n \n/********** Now get the details for that particular email from $membemails***/\n\tforeach($membemails as $amember){\n\t\tif (strtolower($amember['email']) ==strtolower($eml)) {\n\t\t\t//print \" Found one \".$eml;\t\t\t$returnarray[$listname]['missing'][$j]=array();\n\t\t\t$returnarray[$listname]['missing'][$j]['email']=$eml;\n\t\t\t$returnarray[$listname]['missing'][$j]['FNAME']=$amember['forename'];\n\t\t\t$returnarray[$listname]['missing'][$j]['LNAME']=$amember['surname'];\n\t\t\t$returnarray[$listname]['missing'][$j]['LOC']=$amember['location'];\n\t\t\t$returnarray[$listname]['missing'][$j]['MTYPE']=$amember['membtype'];\n\t\t\t$returnarray[$listname]['missing'][$j]['MNUM']=$amember['membnum'];\n\t\t\t}\n\t\t\t$j++;\n\t\t}\n\n\t\t}\n\t\t\t\n\t}\n\n\n\t//\t print \" #396 \";var_export(\t$returnarray);\n\treturn $returnarray;\n}", "title": "" }, { "docid": "043750ea0cb6b7db5f73e94427684985", "score": "0.5175092", "text": "public function sendUnsentEvents()\n {\n $db = Database::getInstance();\n $currentTime = time();\n $arrEvents = $db->prepare('SELECT * FROM tl_calendar_events WHERE published = 1 AND pnSent != 1 AND (pushOnPublish = 1 OR sendDoublePn = 1)')\n ->execute()->fetchAllAssoc();\n\n foreach ($arrEvents as $event) {\n\n //send on senddate if published || send if published\n if (($event['sendDoublePn'] && ($event['pnSendDate'] <= $currentTime) && (\n (!$event['start'] || ($currentTime >= $event['start'])) &&\n (!$event['stop'] || ($currentTime >= $event['stop']))\n )) || ($event['sendOnPublished'] && (\n (!$event['start'] || ($currentTime >= $event['start'])) &&\n (!$event['stop'] || ($currentTime >= $event['stop']))\n ))) {\n //$pid = $event['pid'];\n\n $parser = System::getContainer()->get('contao.insert_tag.parser');\n $url = $parser->replace('{{event_url::' . $event['id'] . '}}');\n\n //ToDo ask for url selection\n if ($event['url']) {\n $url = $event['url'];\n }\n $sendEvent = new PushNotificationEvent();\n $sendEvent->setTitle($event['title']);\n $sendEvent->setMessage(strip_tags($event['teaser']));\n if ($url) {\n $sendEvent->setClickUrl($url);\n }\n $sendEvent->setSubscriptionTypes($event['subscriptionTypes'] ? \\Contao\\StringUtil::deserialize($event['subscriptionTypes']) : []);\n System::getContainer()->get('event_dispatcher')->dispatch($sendEvent, $sendEvent::NAME);\n $db->prepare('UPDATE tl_calendar_events SET pnSent = 1 WHERE id = ?')\n ->execute($event['id']);\n }\n }\n }", "title": "" }, { "docid": "dd9307cd80c0720f733fa2d534f11c0b", "score": "0.5174186", "text": "public static function get_form_emails($form_name='')\n\t{\n\t\t$form_name = ($form_name != '') ? $form_name : self::$posting_form_name;\n\n\t\t$form = self::get_form_settings($form_name);\n\n\t\t$emails = ! empty($form['emails']) ? $form['emails'] : array();\n\n\t\treturn $emails;\n\t}", "title": "" }, { "docid": "60857a8fee665750962a2f8051cfd6c2", "score": "0.5173827", "text": "public static function processEmails() {\n\n $sql = \"SELECT * FROM tbl_emails WHERE status = 0 LIMIT 1 \";\n\n $results = Yii::app()->db->createCommand($sql)->queryAll();\n\n $success = 0;\n\n $today = Calendar::today(Calendar::FORMAT_DBDATETIME);\n\n while (count($results) == 1) {\n\n $result = $results[0];\n\n $id = $result['id'];\n $html = $result['body'];\n $to = $result['recipient'];\n $subject = $result['subject'];\n $from = $result['sender'];\n $bcc = $result['bcc'];\n\n $response = Emails::sendMail($html, $subject, $to, $from, $bcc, false);\n\n if ($response[0]->status != 'sent') {\n $status = 2; //error\n Yii::log('Email status: ' . print_r($response, true), CLogger::LEVEL_ERROR, 'error_email');\n } else {\n $status = 1; //success\n }\n\n $transaction = Yii::app()->db->beginTransaction();\n $sql = \"UPDATE tbl_emails SET status=$status, sent='$today' WHERE id=$id\";\n Yii::app()->db->createCommand($sql)->execute();\n $transaction->commit();\n\n if ($status == 1) {\n echo \"Email sent to $to </br>\";\n } else {\n echo \"Error with mail $to </br>\";\n }\n\n $sql = \"SELECT * FROM tbl_emails WHERE status = 0 LIMIT 1 \";\n\n $results = Yii::app()->db->createCommand($sql)->queryAll();\n\n\n $success++;\n }\n\n return $success;\n }", "title": "" }, { "docid": "b88a7f4255a0a41410d24497a478c944", "score": "0.5168766", "text": "protected function getMailIDs()\n {\n // Read all messaged into an array:\n $mailsIds = $this->mailbox->searchMailbox('ALL');\n if (!$mailsIds) {\n return false;\n }\n\n // If we found mails we need the repositories\n $this->initRepositories(['sender', 'imapfolder', 'blacklist']);\n\n return $mailsIds;\n }", "title": "" }, { "docid": "372596d0075cef368427de0357c07b3f", "score": "0.5164514", "text": "public function get_pending_requests() {\n return $this->get_users_list(PENDING_USER, REGULAR_USER);\n }", "title": "" }, { "docid": "a5457d725d60fa11fe799ad07323ccae", "score": "0.5161377", "text": "protected function report_missing()\n\t{\n\t\t$missing = array();\n\t\t\n\t\t$list = array();\n\t\tforeach ($this->receivers as $row)\n\t\t{\n\t\t\t$list[] = $row[$this->players_by_id ? 'up_id' : 'up_name'];\n\t\t}\n\t\t\n\t\tforeach ($this->players_list as $row)\n\t\t{\n\t\t\tif (!in_array($row, $list))\n\t\t\t{\n\t\t\t\t$missing[] = $row;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->errors[] = \"Følgende mottakere\".($this->players_by_id ? ' med ID' : '').' finnes ikke: '.implode(\", \", $missing);\n\t}", "title": "" }, { "docid": "c4563685e08b00c369fd1b3b52952b7b", "score": "0.5156604", "text": "public function purge()\n {\n return MailQueue::deleteAll('sent_time IS NOT NULL');\n }", "title": "" }, { "docid": "1a94a00126b8f5e723ea575d72eaa673", "score": "0.51512367", "text": "public function collectAllEmails() {\n\t\t$emails = Download::emails($this->token, $this->server);\n\t\t$firstNames = Download::firstNames($this->token, $this->server);\n\t\t$lastNames = Download::lastNames($this->token, $this->server);\n\t\t$recordIds = array_unique(array_merge(array_keys($emails), array_keys($firstNames), array_keys($lastNames)));\n\n\t\t$rows = array();\n\t\tforeach ($recordIds as $recordId) {\n\t\t\t$rows[$recordId] = array(\n\t\t\t\t\t\t\t\"last_name\" => $lastNames[$recordId],\n\t\t\t\t\t\t\t\"first_name\" => $firstNames[$recordId],\n\t\t\t\t\t\t\t\"email\" => $emails[$recordId],\n\t\t\t\t\t\t);\n\n\t\t}\n\t\treturn $rows;\n\t}", "title": "" }, { "docid": "156aab3b37b89e2dcafb5a805156a07a", "score": "0.5150013", "text": "public function getSentEmails($settingName = \"all\") {\n\t\tif ($settingName = \"all\") {\n\t\t\t$sentAry = array();\n\t\t\tforeach ($this->data as $name => $setting) {\n\t\t\t\tif ($setting['sent']) {\n\t\t\t\t\t$sentAry[$name] = $setting['sent'];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $sentAry; \n\t\t} else if ($this->data[$settingName] && $this->data[$settingName]['sent']) {\n\t\t\treturn $this->data[$settingName]['sent'];\n\t\t}\n\t\treturn array();\n\t}", "title": "" }, { "docid": "01be804b6cb3bbb277f796804d190025", "score": "0.5144963", "text": "public function getSentEmails(){\n try {\n //all sent emails\n $sent_emails = $this->email_model->allSentEmails();\n if(\\Auth::user()->user_type == \"general\"){\n //projects as per logged in general user\n $projects_user = $this->commonGetProjects();\n //sent emails emails as per logged in general user\n $sent_emails = $this->email_model->sentEmailsByProject($projects_user);\n }//End if\n //return list sent emails view with sent emails data\n return view('emails.list_sent_emails', compact('sent_emails'));\n } catch (\\Exception $e) {\n return response()->json(['exc' => utf8_encode($e->getMessage())]);\n }//End try-catch\n }", "title": "" }, { "docid": "8f74a934ad1f72c4a2179d41985d971d", "score": "0.5142469", "text": "public function sendNotificationEmailsTask()\n {\n $emails = get_option($this->emailsKey);\n\n if (count($emails) == 0) {\n return;\n } else {\n $currentTS = time();\n\n $options = get_option($this->optionsKey);\n $lastBotVisit = $options['lastBotVisit'];\n $sendTreshold = $options['sendTreshold'];\n $resendTreshold = $options['resendTreshold'];\n\n $subject = 'Google Bot visit';\n $message = sprintf('Your page has not been visited by Google Bot for %s day(s).', $sendTreshold);\n\n foreach ($emails as $email => $emailData) {\n if ($this->shouldEmailBeSent($lastBotVisit, $currentTS, $sendTreshold, $resendTreshold, $emailData)) {\n $emailSent = wp_mail($email, $subject, $message);\n if ($emailSent) {\n $emails[$email]['lastSentTS'] = $currentTS;\n $emails[$email]['botVisitTimeAtNotification'] = $lastBotVisit;\n $emails[$email]['sent'] = true;\n }\n }\n }\n update_option($this->emailsKey, $emails);\n }\n }", "title": "" }, { "docid": "a96fcadb19f4adcdb2ea236879ceb0e9", "score": "0.5140413", "text": "public function my_email_subscriptions() {\n\t\tglobal $wpdb, $woocommerce;\n\n\t\t$user = wp_get_current_user();\n\t\t$emails = $wpdb->get_results( $wpdb->prepare(\"SELECT COUNT(*) AS num, user_email, order_id FROM {$wpdb->prefix}followup_email_orders WHERE (user_id = %d OR user_email = %s) AND is_sent = 0 AND order_id > 0 GROUP BY order_id\", $user->ID, $user->user_email) );\n\n\t\tif ( $user->ID == 0 )\n\t\t\treturn;\n\n\t\t$args = array(\n\t\t\t'user' => $user,\n\t\t\t'emails' => $emails,\n\t\t\t'unsubscribed' => ( isset($_GET['fue_order_unsubscribed']) ) ? true : false // phpcs:ignore WordPress.Security.NonceVerification.Recommended\n\t\t);\n\n\t\tob_start();\n\n\t\twc_get_template( 'my-account-emails.php', $args, 'follow-up-emails', trailingslashit( FUE_TEMPLATES_DIR ) );\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "015f0738220dba633b4c89e69a4251b1", "score": "0.5125377", "text": "public function friendRequestsSent(){\n $user_id = Auth::id();\n $sent = User::find($user_id)->friendshipsSent;\n $received = User::find($user_id)->friendshipsReceived;\n\n\n return $sent->except($received->modelKeys());\n }", "title": "" }, { "docid": "ee970ceb5270ad37bc40ee5bdf4b8e75", "score": "0.5120599", "text": "private function getUnreadEmail()\n {\n $repo = App::make(EmailsRepository::class);\n\n return $repo->getEmails([\n 'type' => Email::UNREAD,\n 'with_reply' => true,\n 'users' => (array)$this->userId,\n 'not_moved' => true,\n ])->get()->count();\n }", "title": "" }, { "docid": "286ad453e85d728968611a4e7ba1831f", "score": "0.5120059", "text": "protected function getUsersEmails()\n {\n return array_filter(array_map(function ($user) {\n $foundUser = $this->userRepository->findByUsername($user);\n\n if (count($foundUser) && $foundUser->email) {\n return $foundUser->email;\n }\n }, $this->users));\n }", "title": "" }, { "docid": "7781ddedb11b85b005a550f8f4385cdf", "score": "0.5116938", "text": "public static function getAllMails()\n {\n $addrs = array();\n $c = new Criteria();\n $alumnos = self::doSelect($c);\n foreach($alumnos as $alumno)\n {\n $addrs[] = $alumno->getEmail();\n }\n return $addrs;\n }", "title": "" }, { "docid": "d917399dd67ed575d6c5da15922d65e3", "score": "0.5112971", "text": "public static function reportPendingAfipInvoices() {\n\t\t//si no hay email configurado no se procesa\n\t\tif(!is_null(Mage::getStoreConfig('afip/config/afip_invoice_pending_email'))){\n\t\t\t$today = new DateTime();\n\t\t\t$date_to_compare = $today->format('Y-m-d'); //fecha de hoy\n\t\t\t\n\t\t\t//facturas afip del dia anterior sin realizarce\n\t\t\t$pending_invoices = Mage::getModel('afip/invoice')->getCollection()\n\t\t\t->addFieldToFilter('status',array('eq' => AfipInvoice::PENDING));\n\t\t\t\n\t\t\t$pending_invoices->getSelect()->joinInner(\n\t\t\t\t\tarray('sfi' => 'sales_flat_invoice'), 'main_table.order_invoice_id = sfi.entity_id and created_at < \"'.$date_to_compare.'\"', array('created_at')\n\t\t\t);\n\t\t\t$pending_invoices->getSelect()->__toString();\n\t\t\t\n\t\t\t if(count($pending_invoices)){\n\t\t\t\t\n\t\t\t\t$templateId = 'afip_invoices_pending';\n\t\t\t\t$emailTemplate = Mage::getModel('core/email_template')->loadDefault($templateId);\n\t\t\t\t\n\t\t\t\t$vars = array('count' => count($pending_invoices),'date_to_compare'=>$today->format('d/m/Y'));\n\t\t\t\t\n\t\t\t\t$emailTemplate->getProcessedTemplate($vars);\n\t\t\t\t\n\t\t\t\t$emailTemplate->setSenderEmail(Mage::getStoreConfig('trans_email/ident_support/email', 1));\n\t\t\t\t$emailTemplate->setSenderName(Mage::getStoreConfig('trans_email/ident_support/name', 1));\n\t\t\t\t\n\t\t\t\t$receiveEmail = Mage::getStoreConfig('afip/config/afip_invoice_pending_email');\n\t\t\t\t$receiveName = \"Usershop\";\n\t\t\t\t\t\n\t\t\t\t$emailTemplate->setTemplateSubject('Facturas pendientes de autorizar por AFIP');\n\t\t\t\t\t\n\t\t\t\t$emailTemplate->send($receiveEmail,$receiveName, $vars);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "54f83396ec604ee723b3d8e430a7d226", "score": "0.5111803", "text": "private function fill_last_sent( $last_sent = array() ) {\n\t\t$activated = ITSEC_Modules::get_setting( 'global', 'activation_timestamp' );\n\n\t\tif ( $last_sent ) {\n\t\t\treturn array_merge( array_fill_keys( array_keys( $this->get_notifications() ), $activated ), $last_sent );\n\t\t}\n\n\t\treturn array_fill_keys( array_keys( $this->get_notifications() ), $activated );\n\t}", "title": "" }, { "docid": "6828a9a9529b463ddb73de1dab52f59e", "score": "0.51112", "text": "public function thatCollectsEmails()\n {\n return $this->state([\n 'collect_email_addresses' => true,\n ]);\n }", "title": "" }, { "docid": "9f49d8d007547bdc39b1b4b0dfede463", "score": "0.5108327", "text": "public function reportFailed()\n {\n $failed = array(6);\n $c = $this->modx->newQuery('Queue');\n $c->where(array(\n 'state:IN' => $failed,\n 'newsletter:IN' => $this->config['newsletter_ids']\n )\n );\n $c->limit($this->options['limit']);\n\n // Get the count of fails\n $fail_count = $this->modx->getCount('Queue', $c);\n // No fail mails at all - Positive\n if($fail_count <= 0)\n return false;\n // Grab the failed mails with subscriber information\n $c->leftJoin('Subscriber', 'Subscriber');\n $c->select($this->modx->getSelectColumns('Subscriber', 'Subscriber', '', array('id', 'email')));\n $c->select($this->modx->getSelectColumns('Queue', 'Queue', '', array('id', 'state', 'newsletter', 'error')));\n // $c->prepare();\n // echo $c->toSQL();\n $items = $this->modx->getCollection('Queue', $c);\n foreach($items as $item) {\n $list[] = $item->toArray('', false, true);\n }\n return array('type' => 'failed', 'tab' => 'queue', 'data' => $list, 'count' => count($list));\n }", "title": "" }, { "docid": "2735c71ad9484c7bbfc440f67dda245a", "score": "0.5102862", "text": "abstract public function getNotConfirmed($email);", "title": "" }, { "docid": "21e4dcc78d39ddfa9345a9799ddf26b5", "score": "0.51006407", "text": "public function getAllMails()\n {\n $req = $this->_db->query('SELECT mail FROM ' . $this->_table);\n\n $array = $req->fetchAll(\\PDO::FETCH_COLUMN, 0);\n\n return $array;\n }", "title": "" }, { "docid": "cc77f93d5f223781c3238411c8a7d370", "score": "0.509781", "text": "public function sendnotifications($hash = \"\") {\r\n if ($hash == '9d3bb895f22bf0afa958d68c2a58ded7') {\r\n $mails = array();\r\n $expired_orders = $this->orders_model->get_expired_orders();\r\n if ($expired_orders) {\r\n foreach ($expired_orders as $order) {\r\n $couriers = $this->orders_model->get_biders($order->consignment_id);\r\n foreach ($couriers as $courier) {\r\n $mail = $this->load->view('templates/emailtemplate', array(\r\n 'to' => $courier->email,\r\n 'to_name' => $courier->name,\r\n 'subject' => '6connect email notification',\r\n 'message' => array(\r\n 'title' => 'Order expired',\r\n 'name' => $courier->name,\r\n 'content' => array('Tender ' . $order->public_id . ' expired'),\r\n 'link_title' => '',\r\n 'link' => ''), TRUE)\r\n );\r\n array_push($mails, $mail);\r\n }\r\n $owners = $this->orders_model->get_owner($order->consignment_id);\r\n foreach ($owners as $owner) {\r\n $mail = $this->load->view('templates/emailtemplate', array(\r\n 'to' => $owner->email,\r\n 'to_name' => $owner->name,\r\n 'subject' => '6connect email notification',\r\n 'message' => array(\r\n 'title' => 'Order expired',\r\n 'name' => $owner->name,\r\n 'content' => array('Tender ' . $order->public_id . ' expired'),\r\n 'link_title' => '',\r\n 'link' => ''), TRUE)\r\n );\r\n array_push($mails, $mail);\r\n }\r\n }\r\n }\r\n $expiring_orders = $this->orders_model->get_expiring_orders();\r\n if ($expiring_orders) {\r\n foreach ($expiring_orders as $order) {\r\n $owners = $this->orders_model->get_owner($order->consignment_id);\r\n foreach ($owners as $owner) {\r\n $mail = array(\r\n 'to' => $owner->email,\r\n 'to_name' => $owner->name,\r\n 'subject' => '6connect email notification',\r\n 'message' => $this->load->view('templates/emailtemplate', array(\r\n 'title' => 'Order expire soon',\r\n 'name' => $owner->name,\r\n 'content' => array('Tender ' . $order->public_id . ' will expire soon'),\r\n 'link_title' => '',\r\n 'link' => ''), TRUE)\r\n );\r\n array_push($mails, $mail);\r\n }\r\n }\r\n }\r\n\r\n $expired_tenders = $this->service_requests_model->get_expired_tenders();\r\n if ($expired_tenders) {\r\n foreach ($expired_tenders as $stender) {\r\n $couriers = $this->service_requests_model->get_biders($stender->req_id);\r\n foreach ($couriers as $courier) {\r\n $mail = array(\r\n 'to' => $courier->email,\r\n 'to_name' => $courier->name,\r\n 'subject' => '6connect email notification',\r\n 'message' => $this->load->view('templates/emailtemplate', array(\r\n 'title' => 'Service tender expired',\r\n 'name' => $courier->name,\r\n 'content' => array('Tender \\'' . $stender->name . '\\' expired'),\r\n 'link_title' => '',\r\n 'link' => ''), TRUE)\r\n );\r\n array_push($mails, $mail);\r\n }\r\n $owners = $this->service_requests_model->get_owners($stender->req_id);\r\n foreach ($owners as $owner) {\r\n $mail = array(\r\n 'to' => $owner->email,\r\n 'to_name' => $owner->name,\r\n 'subject' => '6connect email notification',\r\n 'message' => $this->load->view('templates/emailtemplate', array(\r\n 'title' => 'Service tender expired',\r\n 'name' => $owner->name,\r\n 'content' => array('Tender \\'' . $stender->name . '\\' expired'),\r\n 'link_title' => '',\r\n 'link' => ''), TRUE)\r\n );\r\n array_push($mails, $mail);\r\n }\r\n }\r\n }\r\n\r\n\r\n $expiring_tenders = $this->service_requests_model->get_expiring_tenders();\r\n if ($expiring_tenders) {\r\n foreach ($expiring_tenders as $tender) {\r\n $owners = $this->service_requests_model->get_owners($tender->req_id);\r\n foreach ($owners as $owner) {\r\n $mail = array(\r\n 'to' => $owner->email,\r\n 'to_name' => $owner->name,\r\n 'subject' => '6connect email notification',\r\n 'message' => $this->load->view('templates/emailtemplate', array(\r\n 'title' => 'Tender expire soon',\r\n 'name' => $owner->name,\r\n 'content' => array('Tender \\'' . $tender->name . '\\' will expire soon'),\r\n 'link_title' => '',\r\n 'link' => ''), TRUE)\r\n );\r\n array_push($mails, $mail);\r\n }\r\n }\r\n }\r\n if ($mails) {\r\n foreach ($expired_orders as $order) {\r\n $this->orders_model->updateOrder(array('inform_expire' => 2), $order->consignment_id);\r\n }\r\n foreach ($expiring_orders as $order) {\r\n $this->orders_model->updateOrder(array('inform_expire' => 1), $order->consignment_id);\r\n }\r\n foreach ($expired_tenders as $tender) {\r\n $this->service_requests_model->updateExpireInfo(array('inform_expire' => 2), $tender->req_id);\r\n }\r\n foreach ($expiring_tenders as $order) {\r\n $this->service_requests_model->updateExpireInfo(array('inform_expire' => 1), $tender->req_id);\r\n }\r\n foreach ($mails as $m) {\r\n send_mail($m['to'], $m['to_name'], $m['subject'], $m['message']);\r\n }\r\n }\r\n } else {\r\n show_404();\r\n }\r\n }", "title": "" }, { "docid": "7ea95bf386c6c12bedc6b23d10cbeefc", "score": "0.5097347", "text": "function show_mass_resend_email()\n\t{\n\t\tglobal $wpdb;\n\t\t\n\t\tglobal $current_user;\n\t\tget_currentuserinfo();\n\t\t\n\t\t$error = '';\n\t\t\n\t\t$resend_ids_string = get_option('formbuilder_db_resend_ids');\n\t\t$vals = explode(',', $resend_ids_string);\n\t\t\n\t\tforeach($vals as $val)\n\t\t{\n\t\t\tif(strpos($val, ':'))\n\t\t\t{\n\t\t\t\tlist($key, $value) = explode(':', $val);\n\t\t\t\t$params[$key] = $value;\n\t\t\t}\n\t\t\telseif(is_numeric($val))\n\t\t\t{\n\t\t\t\t$email_ids[] = $val;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!is_array($email_ids))\n\t\t\t$error .= \"No email ID's detected. \";\n\t\t\n\t\tif($current_user->user_login != $params['Name'])\n\t\t\t$error .= \"You are trying to resend someone else's send list. \";\n\t\t\n\t\tif($params['Time'] < time() - (3600))\n\t\t\t$error .= \"The time period in which you could have resent these emails has expired. Please try again. \"; \n\t\t\n\t\tforeach($email_ids as $email_id)\n\t\t\tif(!eregi('^[0-9]+$', $email_id)) $error .= \"Invalid email ID(s) detected. \";\n\t\t\n\t\tif(!$error)\n\t\t{\n\t\t\tforeach($email_ids as $email_id)\n\t\t\t{\n\t\t\t\t$sql = \"SELECT * FROM \" . FORMBUILDER_TABLE_RESULTS . \" WHERE id='$email_id' ORDER BY timestamp DESC LIMIT 0,\" . $this->result_limit . \";\";\n\t\t\t\t$result = $wpdb->get_row($sql, ARRAY_A);\n\t\t\t\tif($result == false) $error .= \"No email found with that ID.\";\n\t\t\t\t$form_data = $this->xmltoarray($result['xmldata']);\n\t\t\t\t$form_data['timestamp'] = $result['timestamp'];\n\t\t\t\t$forms[] = $form_data;\n\t\t\t}\n\t\t}\n\n\t\t?>\n\t\t<?php formbuilder_admin_nav('formResults'); ?>\n\t\t<h3><?php _e('Mass ReSend Form Results', 'formbuilder'); ?>: </h3>\n\t\t\n\t\t<?php\n\t\t\n\t\t\tif(!$error)\n\t\t\t{\n\t\t\t\tif($_GET['fbxmlconfirm_resend'] == 'yes')\n\t\t\t\t{\n\t\t\t\t\tforeach($email_ids as $email_id)\n\t\t\t\t\t{\n\t\t\t\t\t\t$result = $this->resend_email($email_id);\n\t\t\t\t\t\tif(!$result)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t<p class='fbxml-warning'><?php _e('Error resending email. Error message was:', 'formbuilder'); ?> <?php echo $this->resend_email_errors; ?></p>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t<p class='fbxml-message'><?php _e('Sending Email Now.', 'formbuilder'); ?></p>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo \"<meta HTTP-EQUIV='REFRESH' content='0; url=\" . FB_ADMIN_PLUGIN_PATH\n\t\t\t\t\t\t . \"&fbaction=formResults&fbxmlaction=mass-resend&fbxmlconfirm_resend=sent'>\";\n\t\t\t\t\t\t return;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif($_GET['fbxmlconfirm_resend'] == 'sent')\n\t\t\t\t{\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t<p class='fbxml-message'><?php _e('These emails have been re-sent.', 'formbuilder'); ?></p>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t?>\n\t\t\t\t\t\t<p class='fbxml-warning'><?php _e('Are you sure you want to resend the following emails? They will be sent using the standard FB email controls.', 'formbuilder'); ?></p>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t?>\n\n\t\t<fieldset class=\"options metabox-holder\">\n\t\t\t<div class=\"info-box-formbuilder postbox\">\n\t\t\t\t<h3 class=\"info-box-title hndle\"><?php _e('Emails to be resent:', 'formbuilder'); ?> </h3>\n\t\t\t\t<div class=\"fbxml-form-details inside\">\n\t\t\t\t<?php\n\t\t\t\t\tif($error)\n\t\t\t\t\t{\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<p class='fbxml-warning'><?php echo $error; ?></p>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach($forms as $form_data)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$message = \"\";\n\t\t\t\t\t\t\tforeach($form_data['form'] as $key=>$value) {\n\t\t\t\t\t\t\t\t\t$message .= strtoupper($key) . \": \" . $value . \"\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(strlen($message) > 140) $message = substr($message, 0, 140) . \"...\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo date(\"F j, Y, g:i a\", $form_data['timestamp']) . \": \" . $message . \"<br/>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</fieldset>\n\t\t\n\t\t\n\t\t<div class=\"fbxml-controls\">\n\t\t\t<ul>\n\t\t\t\t<li><a href=\"<?php echo FB_ADMIN_PLUGIN_PATH; ?>&fbaction=formResults&fbxmlaction=mass-resend&fbxmlconfirm_resend=yes\" class='fbxml-control-confirm'><?php _e('Yes. Resend all.', 'formbuilder'); ?></a></li>\n\t\t\t\t<li><a href=\"<?php echo FB_ADMIN_PLUGIN_PATH; ?>&fbaction=formResults\" class='fbxml-control-deny'><?php _e('No. Do not resend it.', 'formbuilder'); ?></a></li>\n\t\t\t</ul>\n\t\t</div>\n\n\t\t<?php\n\t}", "title": "" }, { "docid": "53acabf6ee2979ede8108ff4ea9818c4", "score": "0.5095971", "text": "public function getWhoToNotifyByEmail()\n\t{\n\t\treturn $this->getMembersByStatus(User::STATUS_ACTIVE)->data;\n\t}", "title": "" }, { "docid": "277441dff05d3faeb545a23aed41f3cc", "score": "0.50952446", "text": "public function getEventsForEmailNotification()\n\t{\n\t\t$calendarService = $this->_getCalendarService();\n\t\t$calendarId = $this->_getImprint()->calendarId;\n\n\t\t$events = $calendarService->events->listEvents($calendarId, array(\n\t\t\t'q' => 'Contact Method:',\n\t\t\t'singleEvents' => 'true',\n\t\t\t'fields' => 'items(end,id,recurrence,recurringEventId,start,status,summary,description)',\n\t\t\t'timeMin' => date('c', time()),\n\t\t\t'timeMax' => date('c', strtotime('now, +1 day')),\n\t\t));\n\n\t\t$notifications = array();\n\t\tforeach ($events['items'] as $event) {\n\t\t\tforeach (explode(\"\\n\", $event['description']) as $line) {\n\t\t\t\t$pair = explode(':', $line, 2);\n\t\t\t\tif (count($pair) != 2) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tlist ($key, $value) = $pair;\n\t\t\t\t$event['reservation'][$key] = trim($value);\n\t\t\t}\n\n\t\t\tif (isset($event['reservation']['Contact Method'])) {\n\t\t\t\tswitch ($event['reservation']['Contact Method']) {\n\t\t\t\t\tcase 'Email':\n\t\t\t\t\t\t$notifications['email'][] = $event;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'Phone':\n\t\t\t\t\t\t$notifications['phone'][] = $event;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $notifications;\n\t}", "title": "" }, { "docid": "7c049b019318ed9a88775e2382c62650", "score": "0.50908744", "text": "protected function awaitingEmailConfirmation(): bool\n {\n if (auth()->check()) {\n $requireConfirmation = (setting('registration-confirmation') || setting('registration-restrict'));\n if ($requireConfirmation && !auth()->user()->email_confirmed) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "bf44922e5a8620aabb4c71951e1a8908", "score": "0.50885725", "text": "public function printEmails()\n {\n $list = $this->emails;\n\n if($list != null){\n echo \"=============== \". count($list) .\" Found from: \". $this->sourceFile .\" ================\";\n echo \"<br />\";\n foreach($list as $email) {\n echo $email . \"<br />\";\n }\n echo \"=============== by emailR34P3R ===============\";\n }\n else {\n echo \"No emails found.\";\n }\n }", "title": "" }, { "docid": "8c1b9bca859f1e8b6f538b2a21e6fe7b", "score": "0.508697", "text": "public static function getAllContactInvitationNotifications(){\n global $db, $session;\n $rs_arr = [];\n $query = SEL_ALL.\" notifications_table WHERE(n_type=1 AND n_to='{$session->user_id}') ORDER BY n_id DESC\";\n $rs = $db->query($query);\n if($rs && $db->num_rows($rs) > 0){\n while($row = $db->fetch_array($rs)){\n array_push($rs_arr, array(\n \"n_id\"=>$row[\"n_id\"],\n \"n_from\"=>Admin::getUserName($row[\"n_from\"]),\n \"n_from_id\"=>$row[\"n_from\"],\n \"date_of_entry\"=>dateToString2($row[\"date_of_entry\"]),\n \"profile_image\"=>Admin::getProfileImageFromDb($row[\"n_from\"])\n ));\n }\n }\n return ($rs_arr == null ? null : $rs_arr);\n }", "title": "" } ]
f7d0d7621ed38d094318c98d480628b1
Adds support for pages with threaded comments
[ { "docid": "329993a5bb4b3b86380dfef0e4f77c90", "score": "0.0", "text": "function alpha_scripts() {\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t}\n\n\t\t// Register scripts\n\t\twp_register_script( 'bootstrap-js', 'http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js', array( 'jquery' ), false, true );\n\t\twp_register_script( 'alpha-custom', SCRIPTS . '/scripts.js', array( 'jquery' ), false, true );\n\n\t\t// Load the custom scripts\n\t\twp_enqueue_script( 'bootstrap-js' );\n\t\twp_enqueue_script( 'alpha-custom' );\n\n\t\t// Load the stylesheets\n\t\twp_enqueue_style('bootstrap-css','https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css');\n\t\twp_enqueue_style( 'font-awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' );\n\t\twp_enqueue_style( 'font-awesome', THEMEROOT . '/css/font-awesome.min.css' );\n\t\twp_enqueue_style( 'alpha-master', THEMEROOT . '/css/style.css' );\n\t}", "title": "" } ]
[ { "docid": "21445ec32fab0fb810af548cd1909679", "score": "0.71080005", "text": "function enable_threaded_comments()\n{\n if (!is_admin()) {\n if (is_singular() AND comments_open() AND (get_option('thread_comments') == 1)) {\n wp_enqueue_script('comment-reply');\n }\n }\n}", "title": "" }, { "docid": "3d8b8fbe3a53523e13a89caedef4ab9d", "score": "0.64982045", "text": "function agriflex_threaded_comments() {\n\n if ( is_singular() && get_option( 'thread_comments' ) )\n wp_enqueue_script( 'comment-reply' );\n\n}", "title": "" }, { "docid": "f8b9063753d2354a13c35fbb2108962f", "score": "0.64704555", "text": "function render_as_comment_topic($content_type,$content_id,$allow_comments,$invisible_if_no_comments,$forum_name,$post_warning,$preloaded_comments,$explicit_allow,$reverse,$highlight_by_user,$allow_reviews)\n\t{\n\t\tif ((get_forum_type()=='ocf') && (!addon_installed('ocf_forum'))) return new ocp_tempcode();\n\n\t\t$topic_id=$GLOBALS['FORUM_DRIVER']->find_topic_id_for_topic_identifier($forum_name,$content_type.'_'.$content_id);\n\n\t\t// Settings we need\n\t\t$max_thread_depth=get_param_integer('max_thread_depth',intval(get_option('max_thread_depth')));\n\t\t$num_to_show_limit=get_param_integer('max_comments',intval(get_option('comments_to_show_in_thread')));\n\t\t$start=get_param_integer('start_comments',0);\n\n\t\t// Load up posts from DB\n\t\tif (is_null($preloaded_comments))\n\t\t{\n\t\t\tif (!$this->load_from_topic($topic_id,$num_to_show_limit,$start,$reverse))\n\t\t\t\tattach_message(do_lang_tempcode('MISSING_FORUM',escape_html($forum_name)),'warn');\n\t\t} else\n\t\t{\n\t\t\t$this->_inject_posts_for_scoring_algorithm($preloaded_comments);\n\t\t}\n\n\t\tif (!$this->error)\n\t\t{\n\t\t\tif ((count($this->all_posts_ordered)==0) && ($invisible_if_no_comments))\n\t\t\t\treturn new ocp_tempcode();\n\n\t\t\t$may_reply=has_specific_permission(get_member(),'comment',get_page_name());\n\n\t\t\t// Prepare review titles\n\t\t\tglobal $REVIEWS_STRUCTURE;\n\t\t\tif ($allow_reviews)\n\t\t\t{\n\t\t\t\tif (array_key_exists($content_type,$REVIEWS_STRUCTURE))\n\t\t\t\t{\n\t\t\t\t\t$this->set_reviews_rating_criteria($REVIEWS_STRUCTURE[$content_type]);\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\t$this->set_reviews_rating_criteria(array(''));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Load up reviews\n\t\t\tif ((get_forum_type()=='ocf') && ($allow_reviews))\n\t\t\t{\n\t\t\t\t$all_individual_review_ratings=$GLOBALS['SITE_DB']->query_select('review_supplement',array('*'),array('r_topic_id'=>$topic_id));\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$all_individual_review_ratings=array();\n\t\t\t}\n\n\t\t\t$forum_id=$GLOBALS['FORUM_DRIVER']->forum_id_from_name($forum_name);\n\n\t\t\t// Posts\n\t\t\tlist($posts,$serialized_options,$hash)=$this->render_posts($num_to_show_limit,$max_thread_depth,$may_reply,$highlight_by_user,$all_individual_review_ratings,$forum_id);\n\n\t\t\t// Pagination\n\t\t\t$results_browser=NULL;\n\t\t\tif ((!$this->is_threaded) && (is_null($preloaded_comments)))\n\t\t\t{\n\t\t\t\tif ($this->total_posts>$num_to_show_limit)\n\t\t\t\t{\n\t\t\t\t\trequire_code('templates_results_browser');\n\t\t\t\t\t$results_browser=results_browser(do_lang_tempcode('COMMENTS'),NULL,$start,'start_comments',$num_to_show_limit,'max_comments',$this->total_posts,NULL,NULL,true);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Environment meta data\n\t\t\t$this->inject_rss_url($forum_name,$content_type,$content_id);\n\t\t\t$this->inject_meta_data();\n\n\t\t\t// Make-a-comment form\n\t\t\tif ($may_reply)\n\t\t\t{\n\t\t\t\t$post_url=get_self_url();\n\t\t\t\t$form=$this->get_posting_form($content_type,$content_id,$allow_reviews,$post_url,$post_warning);\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$form=new ocp_tempcode();\n\t\t\t}\n\n\t\t\t// Existing review ratings\n\t\t\t$reviews_rating_criteria=array();\n\t\t\tif ((get_forum_type()=='ocf') && ($allow_reviews))\n\t\t\t{\n\t\t\t\tforeach ($this->reviews_rating_criteria as $review_title)\n\t\t\t\t{\n\t\t\t\t\t$_rating=$GLOBALS['SITE_DB']->query_value('review_supplement','AVG(r_rating)',array('r_rating_type'=>$review_title,'r_topic_id'=>$topic_id));\n\t\t\t\t\t$rating=mixed();\n\t\t\t\t\t$rating=is_null($_rating)?NULL:$_rating;\n\t\t\t\t\t$reviews_rating_criteria[]=array('REVIEW_TITLE'=>$review_title,'REVIEW_RATING'=>make_string_tempcode(is_null($rating)?'':float_format($rating)));\n\t\t\t\t\tif (!is_null($rating))\n\t\t\t\t\t{\n\t\t\t\t\t\t$GLOBALS['META_DATA']+=array(\n\t\t\t\t\t\t\t'rating'=>float_to_raw_string($rating),\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Direct links to forum\n\t\t\t$forum_url=is_null($topic_id)?'':$GLOBALS['FORUM_DRIVER']->topic_url($topic_id,$forum_name,true);\n\t\t\tif (($GLOBALS['FORUM_DRIVER']->is_staff(get_member())) || ($forum_name==get_option('comments_forum_name')))\n\t\t\t{\n\t\t\t\t$authorised_forum_url=$forum_url;\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$authorised_forum_url='';\n\t\t\t}\n\n\t\t\t// Show it all\n\t\t\treturn do_template('COMMENTS_WRAPPER',array(\n\t\t\t\t'_GUID'=>'a89cacb546157d34vv0994ef91b2e707',\n\t\t\t\t'RESULTS_BROWSER'=>$results_browser,\n\t\t\t\t'TYPE'=>$content_type,\n\t\t\t\t'ID'=>$content_id,\n\t\t\t\t'REVIEW_RATING_CRITERIA'=>$reviews_rating_criteria,\n\t\t\t\t'FORUM_LINK'=>$forum_url,\n\t\t\t\t'AUTHORISED_FORUM_LINK'=>$authorised_forum_url,\n\t\t\t\t'FORM'=>$form,\n\t\t\t\t'COMMENTS'=>$posts,\n\t\t\t\t'HASH'=>$hash,\n\t\t\t\t'SERIALIZED_OPTIONS'=>$serialized_options,\n\t\t\t));\n\t\t}\n\n\t\treturn new ocp_tempcode();\n\t}", "title": "" }, { "docid": "8da66c24470d14f977039ec9dcdaab8b", "score": "0.64584494", "text": "function PageComments() {\n\t\tif($this->data() && $this->data()->ProvideComments) {\n\t\t\treturn new PageCommentInterface($this, 'PageComments', $this->data());\n\t\t} else {\n\t\t\tif(isset($_REQUEST['executeForm']) && $_REQUEST['executeForm'] == 'PageComments.PostCommentForm') {\n\t\t\t\techo \"Comments have been disabled for this page\";\n\t\t\t\tdie();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "82f29cf068edd7d2c044ff60fcc90d48", "score": "0.64000136", "text": "function wpf_get_comments_pagination() {\n\tif ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) )\n\t\twpf_comments_pagination();\n}", "title": "" }, { "docid": "7ef7342e70ff7f88b0e61ec7c2f87e9e", "score": "0.62487626", "text": "function moderation()\n{\n $commentManager = new Gaetan\\P5\\Model\\CommentManager();\n $reportCount = $commentManager->countReport();\n $reportsByPage = 10;\n $countPages = ceil($reportCount / $reportsByPage);\n\n if (isset($_GET['page']) && $_GET['page'] > 0 && $_GET['page'] <= $countPages) {\n $currentPage = intval($_GET['page']);\n }\n else {\n $currentPage = 1;\n }\n $start = ($currentPage - 1) * $reportsByPage;\n\n $comments = $commentManager->getReportedList($start, $reportsByPage);\n $action = 'moderation';\n $isActive = 'moderation';\n\n require('../view/pagination.php');\n require('../view/backoffice/moderationView.php');\n}", "title": "" }, { "docid": "4a4a059d474e7169cdb60a9a5d29d025", "score": "0.6171399", "text": "function custom_pings($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment;\n ?>\n <li id=\"comment-<?php comment_ID() ?>\" <?php comment_class() ?>>\n <div class=\"comment-author\"><?php printf(__('By %1$s on %2$s at %3$s', 'colabsthemes'),\n get_comment_author_link(),\n get_comment_date(),\n get_comment_time() );\n edit_comment_link(__('Edit', 'colabsthemes'), ' <span class=\"meta-sep\">|</span> <span class=\"edit-link\">', '</span>'); ?></div>\n <?php if ($comment->comment_approved == '0') _e('\\t\\t\\t\\t\\t<span class=\"unapproved\">Your trackback is awaiting moderation.</span>\\n', 'colabsthemes') ?>\n <div class=\"comment-content\">\n <?php comment_text() ?>\n </div>\n<?php }", "title": "" }, { "docid": "6c9d81467dc47cc50bdb3c60874211a4", "score": "0.6158871", "text": "function display_comments($parent, $level) {\n\t\n\t $query_string = $_SERVER['QUERY_STRING'];\n\t\n\t if($query_string == \"\") {\n\t\t $url = $_SERVER['PHP_SELF'];\n\t } elseif (substr($query_string, 0, 9) == \"parent_id\"){\n\t\t //if url contains ?parent_id= then we dont want to add that as a new page into the DB\n\t\t $url = $_SERVER['PHP_SELF'];\n\t } else {\n\t\t //PHP_SELF does not grab variables if there are variables being passed in the url, but QUERY_STRING does...so if there\n\t\t //are variables in the url, append them to PHP_SELF\n\t\t $url = $_SERVER['PHP_SELF'] . \"?\" . $_SERVER['QUERY_STRING'];\n\t }\n\t \t \n\t $sql = mysql_query(\"SELECT page_id FROM comment_pages WHERE page='\" . $url . \"'\");\n\t $row = mysql_fetch_array($sql);\n\t $page_id = $row['page_id'];\n\t \n\t //if the url has the unsubscribe variable, unsubscribe the user from the thread\n\t if(substr_count($url, 'unsubscribe') != 0){\n\t\t include(\"/Library/WebServer/commontools/threaded_comments/threaded_comments_subscriptions.php\");\n\t\t exit();\n\t } elseif($page_id == \"\") {\n\t\t //if the page has not been inserted into the database and given a page_id, insert it in the\n\t \t //database and give it a page_id\n\t\t $site = $_SESSION['site'];\n\t\t mysql_query(\"INSERT INTO comment_pages (site, page) VALUES('$site','$url')\") or die(mysql_error());\n\t }\n\n\t $sql = mysql_query(\"SELECT * FROM comments WHERE parent_id='\" . $parent . \"' AND page_id='\" . $page_id . \"' ORDER BY comment_id\");\n\t \n\t while($row = mysql_fetch_array($sql)) {\n\t $comment_id = $row['comment_id'];\n\t \n\t echo \"<div style=\\\"width:\" . $width . \"px;\\\">\n\t\t <table class=\\\"comments-table\\\" style='margin-left:\" . (50*$level) . \"px;'>\n\t\t\t <tr>\n\t\t\t \t <td>Posted By: </td>\n\t\t\t\t <td><strong>\" . $row['name'] . \"</strong> on \" . $row['date_of_post'] . \" at \" . $row['time_of_post'] . \"</td>\n\t\t\t </tr>\n\t\t </table>\n\t\t <!--I put the comment in its own table because when you click reply the form messes up the whole format of the comment. \n\t\t a seperate table fixes this-->\n\t\t <table class=\\\"comments-table\\\" style='margin-left:\" . (50*$level) . \"px;'>\n\t\t\t <tr>\n\t\t\t\t <td colspan='3'>\" . $row['comment'] . \"</td>\n\t\t\t\t <td></td>\n\t\t\t </tr>\n\t\t </table>\n\t\t <table class=\\\"comments-table\\\" style='margin-left:\" . (50*$level) . \"px;'>\n\t\t\t <tr>\n\t\t\t\t <td><a href=\\\"javascript:toggle_display(\" . $comment_id . \")\\\">Reply</a>\n\t\t\t\t \n\t\t\t\t\t <span id=\\\"\" . $comment_id . \"\\\" style='display:none;'>\n\t\t\t\t\t \n\t\t\t\t\t\t<!-- kmb [11/24/09] took the parent_id GET var out of the form and put the fundID in so as to avoid the blank screen on loading only the parent_id GET var. the parent_id is now passed as a hidden field a little further down -->\t\t\t\t \n\t\t\t\t\t\t<!--<form name=\\\"nested_comment\\\" method=\\\"POST\\\" onsubmit=\\\"return validate_form(this);\\\" action=\\\"\" . $_SERVER['PHP_SELF'] . \"?parent_id=\" . $comment_id . \"\\\">-->\n\t\t\t\t\t \n\t\t\t\t\t\t<form name=\\\"nested_comment\\\" method=\\\"POST\\\" onsubmit=\\\"return validate_form(this);\\\" action=\\\"\" . $url . \"\\\">\n\t\t\t\t\t\t <table>\n\t\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t\t\t\t<td colspan=\\\"2\\\"><strong>Reply to an existing comment</strong></td>\n\t\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t\t\t <td>Name:</td>\n\t\t\t\t\t\t\t\t <td><input type=\\\"text\\\" name=\\\"name\\\" size=\\\"35\\\"></td>\n\t\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t\t\t <td>Email:</td>\n\t\t\t\t\t\t\t\t <td><input type=\\\"text\\\" name=\\\"email\\\" size=\\\"35\\\"></td>\n\t\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t\t\t <td valign=\\\"top\\\">Comment:</td>\n\t\t\t\t\t\t\t\t <td><textarea name=\\\"comment\\\" cols=\\\"30\\\" rows=\\\"5\\\"></textarea></td>\n\t\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>Subscribe:</td>\n\t\t\t\t\t\t\t\t\t<td><input type=\\\"checkbox\\\" name=\\\"allComments\\\" value=\\\"allComments\\\" class=\\\"commentSubscribe\\\"> (to this comment page)</td>\n\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t <td><input type=\\\"hidden\\\" name=\\\"stage\\\" value=\\\"1\\\" />\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t <!-- kmb [11/24/09]: added parent_id as a hidden field so that we can access it as a POST var -->\n\t\t\t\t\t\t\t\t <input type=\\\"hidden\\\" name=\\\"parent_id\\\" value=\\\"\". $comment_id .\"\\\" />\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t </td>\n\t\t\t\t\t\t\t\t <td><input type=\\\"submit\\\" value=\\\"Submit\\\" name=\\\"submit_nested\\\" class=\\\"commentSubmit\\\" /></td>\n\t\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t </table>\n\t\t\t\t\t\t </form>\n\t\t\t\t\t </span>\n\t\t\t\t </td>\n\t\t\t </tr>\n\t\t </table>\n\t\t </div>\n\t\t <hr>\";\n\t\t \n\t\t //call the function recursively. Use the current comment ID as the parent_id and indent the new comments 1 level. \n\t\t display_comments($comment_id, $level+1);\n\t \n\t } // end while($row = mysql_fetch_array($sql)) \n\t \n}", "title": "" }, { "docid": "49b420fa01533d33f1c934defe2d4597", "score": "0.6152343", "text": "function remove_comment_support() {\n remove_post_type_support(\"post\", \"comments\");\n remove_post_type_support(\"page\", \"comments\");\n }", "title": "" }, { "docid": "2e7be50ee72a4dcc8b936964897729d7", "score": "0.6110379", "text": "function ld_disable_comments() {\n\n\tremove_post_type_support( 'sfwd-courses', 'comments' );\n\tremove_post_type_support( 'sfwd-lessons', 'comments' );\n\tremove_post_type_support( 'sfwd-topic', 'comments' );\n\tremove_post_type_support( 'sfwd-quiz', 'comments' );\n\tremove_post_type_support( 'sfwd-essays', 'comments' );\n\n}", "title": "" }, { "docid": "4f25a25184d95242306cc3b6171d74f0", "score": "0.6094939", "text": "public function testForumGetPostsThreadedPaged()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "13483166b4b81780d6268c0af0a2cd04", "score": "0.6090498", "text": "private function comments_wrapper($page_name, $tool_id, $post_id)\n\t{\n\t\tvalid::id_key($post_id);\n\t\tif($_POST AND $this->account_user->logged_in($this->site_id))\n\t\t{\n\t\t\tif(empty($_POST['body']))\n\t\t\t\tdie('Reply cannot be empty.');\n\t\t\t\n\t\t\t$new_comment = ORM::Factory('forum_cat_post_comment');\n\t\t\t$new_comment->fk_site\t\t\t= $this->site_id;\n\t\t\t$new_comment->forum_cat_post_id = $post_id;\n\t\t\t$new_comment->account_user_id\t= $this->account_user->get_user()->id;\n\t\t\t$new_comment->body\t\t\t\t= $_POST['body'];\n\t\t\t$new_comment->created\t\t\t= time();\n\t\t\t$new_comment->save();\n\t\t\t#die('Thank you, your comment has been added!'); # send data to javascript if enabled.\n\t\t}\n\n\n\t\t$account_user_id = ($this->account_user->logged_in($this->site_id))\n\t\t\t? $this->account_user->get_user()->id\n\t\t\t: FALSE;\n\t\t\t\n\t\t# get the post with child comment.\n\t\t$post = ORM::Factory('forum_cat_post', $post_id)\n\t\t\t->select(\"\n\t\t\t\tforum_cat_posts.*, forum_cats.name, forum_cats.url,\n\t\t\t\t(SELECT account_user_id \n\t\t\t\t\tFROM forum_comment_votes\n\t\t\t\t\tWHERE forum_cat_post_comment_id = forum_cat_posts.forum_cat_post_comment_id\n\t\t\t\t\tAND account_user_id = '$account_user_id'\n\t\t\t\t) AS has_voted\n\t\t\t\")\n\t\t\t->join('forum_cats', 'forum_cats.id', 'forum_cat_posts.forum_cat_id')\n\t\t\t->where(array(\n\t\t\t\t'forum_cat_posts.fk_site' => $this->site_id,\n\t\t\t\t'forum_cat_posts.id' => $post_id\n\t\t\t))\n\t\t\t->find();\n\t\tif(TRUE != $post->loaded)\n\t\t\tdie('render 404 not found');\n\n\t\t$primary = new View('public_forum/forums/posts_comments_wrapper');\n\t\t$primary->post\t\t\t= $post;\n\t\t$primary->page_name \t= $page_name;\t\n\t\t$primary->is_logged_in\t= $this->account_user->logged_in($this->site_id);\t\n\t\t$primary->account_user\t= $account_user_id;\n\t\t$primary->comments_list = self::comments_list($page_name, $post_id);\n\t\t$primary->selected\t\t= self::tab_selected('votes');\t\t\n\t\treturn $primary;\n\t}", "title": "" }, { "docid": "15336e19f9d6c86561664886fee1aa34", "score": "0.60892504", "text": "function peg_comments($atts) {\n global $thisarticle, $thiscomment, $prefs;\n\n extract(lAtts(array(\n 'form' => 'comments',\n 'wraptag' => ($prefs['comments_are_ol'] ? 'ol' : ''),\n 'break' => ($prefs['comments_are_ol'] ? 'li' : 'div'),\n 'class' => 'comments',\n 'breakclass' => '',\n 'limit' => 0,\n 'offset' => 0,\n 'sort' => 'posted ASC',\n ),$atts));\n\n assert_article();\n\n // extract($thisarticle);\n if (!$thisarticle['comments_count']) return '';\n $thisid = intval($thisarticle['thisid']);\n\n // $txp_discuss = safe_pfx('txp_discuss');\n // $peg_discuss = safe_pfx('peg_discuss');\n if(!empty($thiscomment)) {\n $peg_children = $thiscomment['peg_children'];\n } else {\n // safe_query(\"CREATE TEMPORARY TABLE $peg_discuss (SELECT * FROM $txp_discuss WHERE parentid=$thisid AND visible=\".VISIBLE.\")\");\n $rs = safe_rows('discussid, peg_children', 'txp_discuss', \"parentid=$thisid AND visible=\".VISIBLE);\n $peg_children = $rows = array();\n foreach($rs as $vars) {\n $rows[] = $vars['discussid'];\n if($vars['peg_children']) $peg_children = array_merge($peg_children, explode(',', $vars['peg_children']));\n }\n $peg_children = implode(',', $peg_children ? array_diff($rows, $peg_children) : $rows);\n }\n if(empty($peg_children)) return '';\n\n $qparts = \"discussid IN($peg_children) AND parentid=$thisid AND visible=\".VISIBLE.\n ($sort ? \" ORDER BY $sort\" : '').\n ($limit || $offset ? ' LIMIT '.intval($offset).', '.intval($limit) : '');\n\n $rs = safe_rows('*, unix_timestamp(posted) as time', 'txp_discuss', $qparts);\n $out = '';\n\n if ($rs) {\n\n foreach ($rs as $vars) {\n $GLOBALS['thiscomment'] = $vars;\n $comments[] = peg_parse_form_recursively($form).n;\n unset($GLOBALS['thiscomment']);\n }\n\n $out .= doWrap($comments,$wraptag,$break,$class,$breakclass);\n }\n\n return $out;\n}", "title": "" }, { "docid": "7ce0eac8db7a0341c41260d46a5d699a", "score": "0.60848373", "text": "private function comments_list($page_name, $post_id)\n\t{\n\t\t$order = (empty($_GET['sort']) OR 'oldest' != $_GET['sort'])\n\t\t\t? 'desc' : 'asc';\n\t\t$sort_by = (empty($_GET['sort']) OR 'votes' == $_GET['sort'])\n\t\t\t? 'vote_count' : 'created';\n\n\t\t$account_user_id = ($this->account_user->logged_in($this->site_id))\n\t\t\t? $this->account_user->get_user()->id\n\t\t\t: FALSE;\n\t\t\t\n\t\t$comments = ORM::Factory('forum_cat_post_comment')\n\t\t\t->select(\"\n\t\t\t\tforum_cat_post_comments.*,\n\t\t\t\t(SELECT account_user_id \n\t\t\t\t\tFROM forum_comment_votes\n\t\t\t\t\tWHERE forum_cat_post_comment_id = forum_cat_post_comments.id\n\t\t\t\t\tAND account_user_id = '$account_user_id'\n\t\t\t\t) AS has_voted\n\t\t\t\")\n\t\t\t->where(array(\n\t\t\t\t'forum_cat_post_comments.forum_cat_post_id' => $post_id,\n\t\t\t\t'forum_cat_post_comments.fk_site' => $this->site_id,\n\t\t\t\t'forum_cat_post_comments.is_post !=' => '1',\n\t\t\t))\n\t\t\t->orderby(\"forum_cat_post_comments.$sort_by\", \"$order\")\n\t\t\t->find_all();\n\t\tif(0 == $comments->count())\n\t\t\treturn 'No comments yet';\n\n\t\t$primary = new View('public_forum/forums/comments_list');\n\t\t$primary->is_logged_in\t= $this->account_user->logged_in($this->site_id);\t\n\t\t$primary->page_name\t\t= $page_name;\n\t\t$primary->account_user\t= $account_user_id;\t\t\t\n\t\t$primary->comments\t\t= $comments;\n\t\treturn $primary;\n\t}", "title": "" }, { "docid": "fcfc892ef554cb3a64f0e6c31ab6f9e7", "score": "0.60833323", "text": "function tmpl_commentlist($postDS, &$comments, $withContainer = false)\n{\n if($withContainer) print('<div class=\"comment_list\" id=\"comments_'.$postDS['m_key'].'\">');\n\n if($comments['count'] > 3 && sizeof($comments['list'])==3)\n\t{\n\t\t?><div class=\"comment_item smalltext\">&nbsp; <a onclick=\"loadThread(<?= $postDS['m_key'] ?>)\">▼ Show entire conversation</a> (<?= $comments['count'] ?>)</div><?\n\t}\n\n if(sizeof($comments['votes']) > 0)\n {\n \tforeach($comments['votes'] as $voteDS)\n\t\t{\n\t\t\t$vData = HubbubMessage::unpackData($voteDS);\n ?><div class=\"comment_item smalltext\">&nbsp; <?= htmlspecialchars(substr($vData['text'], 1)) ?> (<?= $voteDS['votecount'] ?>)</div><?\n\t\t}\n }\n\n if(sizeof($comments['list'])) foreach($comments['list'] as $comment)\n\t{\n $data = HubbubMessage::unpackData($comment);\n\t $metaElements = array(\n\t ageToString($comment['m_created']));\n if(object('user')->entity == $comment['m_owner'] || object('user')->entity == $comment['m_author']) $metaElements[] = '<a onclick=\"deleteComment('.$comment['m_key'].')\">Delete</a>';\n\t\t?><div id=\"comment_item_<?= $comment['m_key'] ?>\" class=\"comment_item comment_entry\">\n\t\t\t\t<div class=\"comment_img\"><img src=\"img/anonymous.png\" width=\"32\"/></div>\n\t\t\t\t<div class=\"comment_text\"><?= HubbubEntity::linkFromId($comment['m_author']) ?>\n\t\t\t\t <?= h2_post_excerpt($data['text'], $comment['m_key']) ?>\t\n\t\t\t\t <div class=\"comment_meta\"><?= implode(' · ', $metaElements) ?></div></div>\n\t\t</div><?\n\t}\n\n if($withContainer) { ?></div><? }\n}", "title": "" }, { "docid": "e2aa291ab445566f4a3c59585570c4cb", "score": "0.60739106", "text": "function removeCommentsSupport() {\n\t\t\tremove_post_type_support('post', 'comments');\n\t\t\tremove_post_type_support('page', 'comments');\n\t\t}", "title": "" }, { "docid": "28404b4654ad54f72751e5776090a171", "score": "0.60600114", "text": "function twentytwelve_comment( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment;\n switch ( $comment->comment_type ) :\n case 'pingback' :\n case 'trackback' :\n // Display trackbacks differently than normal comments.\n ?>\n <li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\">\n <p><?php _e( 'Pingback:', 'twentytwelve' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'twentytwelve' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n <?php\n break;\n default :\n // Proceed with normal comments.\n global $post;\n ?>\n <li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n <article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n <header class=\"comment-meta comment-author vcard\">\n <?php\n echo get_avatar( $comment, 44 );\n printf( '<cite><b class=\"fn\">%1$s</b> %2$s</cite>',\n get_comment_author_link(),\n // If current post author is also comment author, make it known visually.\n ( $comment->user_id === $post->post_author ) ? '<span>' . __( 'Post author', 'twentytwelve' ) . '</span>' : ''\n );\n printf( '<a href=\"%1$s\"><time datetime=\"%2$s\">%3$s</time></a>',\n esc_url( get_comment_link( $comment->comment_ID ) ),\n get_comment_time( 'c' ),\n /* translators: 1: date, 2: time */\n sprintf( __( '%1$s at %2$s', 'twentytwelve' ), get_comment_date(), get_comment_time() )\n );\n ?>\n </header><!-- .comment-meta -->\n\n <?php if ( '0' == $comment->comment_approved ) : ?>\n <p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'twentytwelve' ); ?></p>\n <?php endif; ?>\n\n <section class=\"comment-content comment\">\n <?php comment_text(); ?>\n <?php edit_comment_link( __( 'Edit', 'twentytwelve' ), '<p class=\"edit-link\">', '</p>' ); ?>\n </section><!-- .comment-content -->\n\n <div class=\"reply\">\n <?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'twentytwelve' ), 'after' => ' <span>&darr;</span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n </div><!-- .reply -->\n </article><!-- #comment-## -->\n <?php\n break;\n endswitch; // end comment_type check\n}", "title": "" }, { "docid": "12e2d085fd39b7e1684b2edf8841aa25", "score": "0.6059467", "text": "function ctrs_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\n\tif ( 'pingback' == $comment->comment_type || 'trackback' == $comment->comment_type ) : ?>\n\n\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class(); ?>>\n\t <div class=\"comment-body\">\n\t Pingback: <?php comment_author_link(); ?> <?php edit_comment_link( 'Edit', '<span class=\"edit-link\">', '</span>' ); ?>\n\t </div>\n\n\t<?php else : ?>\n\n\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?>>\n\t <article id=\"div-comment-<?php comment_ID(); ?>\" class=\"comment-body cf\">\n\t <footer class=\"comment-meta\">\n\t <div class=\"comment-author vcard\">\n\t <?php if ( 0 != $args['avatar_size'] ) { echo get_avatar( $comment, $args['avatar_size'] ); } ?>\n\t <?php printf( '%s <span class=\"says\">says:</span>', sprintf( '<cite class=\"fn\">%s</cite>', get_comment_author_link() ) ); ?>\n\t </div><!-- .comment-author -->\n\n\t <div class=\"comment-metadata\">\n\t <a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\">\n\t <time datetime=\"<?php comment_time( 'c' ); ?>\">\n\t <?php printf( '%1$s at %2$s', get_comment_date(), get_comment_time() ); ?>\n\t </time>\n\t </a>\n\t <?php edit_comment_link( 'Edit', '<span class=\"edit-link\">', '</span>' ); ?>\n\t </div><!-- .comment-metadata -->\n\n\t <?php if ( '0' == $comment->comment_approved ) : ?>\n\t <p class=\"comment-awaiting-moderation\">Your comment is awaiting moderation.</p>\n\t <?php endif; ?>\n\t </footer><!-- .comment-meta -->\n\n\t <div class=\"comment-content\">\n\t <?php comment_text(); ?>\n\t </div><!-- .comment-content -->\n\n\t <?php\n\t comment_reply_link( array_merge( $args, array(\n\t 'add_below' => 'div-comment',\n\t 'depth' => $depth,\n\t 'max_depth' => $args['max_depth'],\n\t 'before' => '<div class=\"reply\">',\n\t 'after' => '</div>',\n\t ) ) );\n\t ?>\n\t </article><!-- .comment-body -->\n\n\t<?php\n\tendif;\n}", "title": "" }, { "docid": "b8cae7110ac28791103fb4cbee276ab2", "score": "0.6059271", "text": "function sf_topic_as_comments($comments)\n{\n\tglobal $wp_query;\n\n\tsf_load_includes();\n\tsf_initialise_globals();\n\n\tif($comments)\n\t{\n\t\t$postid = $comments[0]->comment_post_ID;\n\t} else {\n\t\t$postid = $wp_query->post->ID;\n\t}\n\t$link = sf_blog_links_postmeta('read', $postid, '');\n\tif(!$link) return $comments;\n\n\t$link = explode('@', $link->meta_value);\n\n\t# quick permission check\n \tif(!sf_can_view_forum($link[0])) return $comments;\n\n\t$topicid = $link[1];\n\t$thread = sf_get_thread_for_comments($topicid);\n\tif($thread)\n\t{\n\t\t$index = count($comments);\n\t\tforeach($thread as $post)\n\t\t{\n\t\t\t$comments[$index]->comment_ID = 0;\n\t\t\t$comments[$index]->comment_post_ID = $postid;\n\n\t\t\tif($post['user_id'] == \"\")\n\t\t\t{\n\t\t\t\t$comments[$index]->comment_author = stripslashes($post['guest_name']);\n\t\t\t\t$comments[$index]->comment_author_email = stripslashes($post['guest_email']);\n\t\t\t\t$comments[$index]->comment_author_url = \"\";\n\t\t\t} else {\n\t\t\t\t$comments[$index]->comment_author = stripslashes($post['display_name']);\n\t\t\t\t$comments[$index]->comment_author_email = stripslashes($post['user_email']);\n\t\t\t\t$comments[$index]->comment_author_url = sf_check_url($post['user_url']);\n\t\t\t}\n\t\t\t$comments[$index]->comment_author_IP = \"\";\n\t\t\t$comments[$index]->comment_date = $post['post_date'];\n\t\t\t$comments[$index]->comment_date_gmt = $post['post_date'];\n\t\t\t$comments[$index]->comment_content = sf_filter_content(stripslashes($post['post_content']), \"\");\n\t\t\t$comments[$index]->comment_karma = 0;\n\t\t\t$comments[$index]->comment_approved = 1;\n\t\t\t$comments[$index]->comment_agent = \"\";\n\t\t\t$comments[$index]->comment_type = \"\";\n\t\t\t$comments[$index]->comment_parent = 0;\n\t\t\t$comments[$index]->user_id = $post['user_id'];\n\t\t\t$comments[$index]->comment_subscribe = \"N\";\n\t\t\t$comments[$index]->comment_reply_ID = 0;\n\n\t\t\t$index++;\n\t\t}\n\t}\n\treturn $comments;\n}", "title": "" }, { "docid": "6967b36fe7ead8904334e75a6bca6f05", "score": "0.6034478", "text": "function custom_comments($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment;\n $GLOBALS['comment_depth'] = $depth;\n ?>\n <li id=\"comment-<?php comment_ID() ?>\" <?php comment_class() ?>>\n <div class=\"comment-author vcard\"><?php commenter_link() ?></div>\n <div class=\"comment-meta\"><?php printf(__('Posted %1$s at %2$s <span class=\"meta-sep\">|</span> <a href=\"%3$s\" title=\"Permalink to this comment\">Permalink</a>', 'evoratecwpf3'),\n get_comment_date(),\n get_comment_time(),\n '#comment-' . get_comment_ID() );\n edit_comment_link(__('Edit', 'evoratecwpf3'), ' <span class=\"meta-sep\">|</span> <span class=\"edit-link\">', '</span>'); ?></div>\n <?php if ($comment->comment_approved == '0') _e(\"\\t\\t\\t\\t\\t<span class='unapproved'>Your comment is awaiting moderation.</span>\\n\", 'evoratecwpf3') ?>\n <div class=\"comment-content\">\n <?php comment_text() ?>\n </div>\n <?php // echo the comment reply link\n if($args['type'] == 'all' || get_comment_type() == 'comment') :\n comment_reply_link(array_merge($args, array(\n 'reply_text' => __('Reply','evoratecwpf3'),\n 'login_text' => __('Log in to reply.','evoratecwpf3'),\n 'depth' => $depth,\n 'before' => '<div class=\"comment-reply-link\">',\n 'after' => '</div>'\n )));\n endif;\n ?>\n<?php }", "title": "" }, { "docid": "72f39117ffaf44b2bd227b3e6459d9d2", "score": "0.60308766", "text": "private function extend_comments() {\n foreach ( $this->comments as &$comment ) {\n $cid = $comment->comment_ID;\n\n // Get author link\n $comment->author_link = get_comment_author_link( $cid );\n\n // Set comment classes\n $classes = $this->comment_has_parent( $comment ) ? 'reply ' . $this->comment_class : $this->comment_class;\n\n switch ( $comment->comment_approved ) {\n case 1:\n $classes .= ' comment-approved';\n break;\n case 0:\n $classes .= ' comment-hold';\n break;\n case 'spam':\n $classes .= ' comment-spam';\n break;\n }\n\n global $comment_depth;\n\n $comment_depth = $this->get_comment_depth( $cid );\n\n $comment->comment_class = comment_class( $classes, $cid, $this->comment_post_id, false );\n\n // Load a reply link\n if ( $this->reply ) {\n $this->reply_args['depth'] = $comment_depth;\n $comment->reply_link = \\get_comment_reply_link( $this->reply_args, $cid );\n\n if ( ! empty( $comment->reply_link ) ) {\n $comment->reply = true;\n }\n else {\n $comment->reply = false;\n }\n }\n\n // Set an avatar\n if ( ! empty( $this->avatar_args ) ) {\n extract( $this->avatar_args );\n $id_or_email = isset( $id_or_email ) ? $id_or_email : null;\n $size = isset( $size ) ? $size : null;\n $default = isset( $default ) ? $default : null;\n $alt = isset( $alt ) ? $alt : null;\n $comment->avatar = get_avatar( $id_or_email, $size, $default, $alt );\n }\n else {\n $comment->avatar = false;\n }\n\n // Load a custom profile picture\n $pic = apply_filters( 'dustpress/comments/profile_picture', $comment );\n if ( is_string( $pic ) ) {\n $comment->profile_pic = $pic;\n }\n else {\n $comment->profile_pic = false;\n }\n\n // Filter comment\n $comment = apply_filters( 'dustpress/comments/comment', $comment );\n }\n // Sort replies\n if ( $this->threaded ) {\n $this->comments = $this->threadify_comments( $this->comments );\n }\n }", "title": "" }, { "docid": "8e7ea8e0e6de680b819df091365a9bde", "score": "0.6029042", "text": "function COXYMallComments() {\r\n\t}", "title": "" }, { "docid": "6c86724e6ae85524cac693d6c67a47f3", "score": "0.5966582", "text": "function sunset_get_comments_nav(){\n\t// if( get_comment_pages_count() > 1 /*&& get_option('page_comments')*/ ) {\n\t\t\trequire( get_template_directory().'/template-parts/sunset-comment-nav.php' );\n\t// }\n}", "title": "" }, { "docid": "6ae4f215dd3554496015c8536009bb80", "score": "0.59508544", "text": "public function testForumGetPostsThreadedPagedFromChild()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "73824b56e8b96f8254fb043b69c85fb2", "score": "0.5945023", "text": "abstract public function getCommentThreadId();", "title": "" }, { "docid": "d9c05b041ff9f4b75c585a4739e23ad6", "score": "0.5932143", "text": "function lt3_get_comments_template()\n{\n if ( LT3_ENABLE_GLOBAL_COMMENTS ) comments_template();\n}", "title": "" }, { "docid": "5e99de268df1b347f8374abf684002ff", "score": "0.59111977", "text": "function lt3_advanced_comment( $comment, $args, $depth )\n{\n $GLOBALS['comment'] = $comment; ?>\n <li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n <div class=\"comment-vcard\">\n <?php echo get_avatar( $comment,$size='56',$default='<path_to_url>' ); ?>\n </div>\n <div class=\"comment-body\">\n <div class=\"comment-author\">\n <a href=\"<?php the_author_meta( 'user_url' ); ?>\">\n <?php printf( __( '%s' ), get_comment_author_link() ); ?>\n </a> said:\n </div>\n <?php if ( $comment->comment_approved == '0' ) : ?>\n <div>\n <em><?php _e( 'Your comment is awaiting moderation.' ); ?></em>\n <br>\n </div>\n <?php endif; ?>\n <div class=\"comment-text\"><?php comment_text() ?></div>\n <div class=\"comment-meta\">\n <small>on the <?php printf( __( '%1$s' ), get_comment_date( 'l, F j, Y' ) ); ?>\n <?php if ( current_user_can( 'edit_post' ) ) : ?>\n ( <?php edit_comment_link( __( 'Edit' ), '', '' ) ?><?php lt3_delete_comment_link(); ?> )\n <?php endif; ?>\n </small>\n </div>\n <div class=\"reply\">\n <?php comment_reply_link(\n array_merge( $args,\n array( 'depth' => $depth, 'max_depth' => $args['max_depth'] )\n )\n ); ?>\n </div>\n </div>\n<?php }", "title": "" }, { "docid": "c242d690c7a24df2605f2e5530ab6716", "score": "0.59025484", "text": "function _tk_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\n\tif ( 'pingback' == $comment->comment_type || 'trackback' == $comment->comment_type ) : ?>\n\n\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class( 'media' ); ?>>\n\t\t<div class=\"comment-body\">\n\t\t\t<?php _e( 'Pingback:', '_tk' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( 'Edit', '_tk' ), '<span class=\"edit-link\">', '</span>' ); ?>\n\t\t</div>\n\n\t<?php else : ?>\n\n\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?>>\n\t\t<article id=\"div-comment-<?php comment_ID(); ?>\" class=\"comment-body media\">\n\t\t\t<a class=\"pull-left\" href=\"#\">\n\t\t\t\t<?php if ( 0 != $args['avatar_size'] ) echo get_avatar( $comment, $args['avatar_size'] ); ?>\n\t\t\t</a>\n\t\t\t\n\t\t\t<div class=\"media-body\">\n\t\t\t\t<div class=\"media-body-wrap panel\">\n\t\t\t\t\t\n\t\t\t\t\t<h5 class=\"media-heading\"><?php printf( __( '%s <span class=\"says\">says:</span>', '_tk' ), sprintf( '<cite class=\"fn\">%s</cite>', get_comment_author_link() ) ); ?></h5>\n\t\t\t\t\t<p class=\"comment-meta\">\n\t\t\t\t\t\t<a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\">\n\t\t\t\t\t\t\t<time datetime=\"<?php comment_time( 'c' ); ?>\">\n\t\t\t\t\t\t\t\t<?php printf( _x( '%1$s at %2$s', '1: date, 2: time', '_tk' ), get_comment_date(), get_comment_time() ); ?>\n\t\t\t\t\t\t\t</time>\n\t\t\t\t\t\t</a> \n\t\t\t\t\t\t<?php edit_comment_link( __( '<span style=\"margin-left: 5px;\" class=\"glyphicon glyphicon-edit\"></span> Edit', '_tk' ), '<span class=\"edit-link\">', '</span>' ); ?>\n\t\t\t\t\t</p>\n\t\n\t\t\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\n\t\t\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', '_tk' ); ?></p>\n\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\n\t\t\t\t\t<div class=\"comment-content\">\n\t\t\t\t\t\t<?php comment_text(); ?>\n\t\t\t\t\t</div><!-- .comment-content -->\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t<footer class=\"reply comment-reply panel-footer\">\n\t\t\t\t\t\t<?php comment_reply_link( array_merge( $args, array( 'add_below' => 'div-comment', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t\t\t</footer><!-- .reply -->\n\n\t\t\t\t</div>\n\t\t\t</div><!-- .media-body -->\n\n\t\t</article><!-- .comment-body -->\n\n\t<?php\n\tendif;\n}", "title": "" }, { "docid": "ca32017cde4f8b8cdee43444c8517422", "score": "0.5882528", "text": "function timelineComments($user_id, $post_id, $type=null) { \n\t\tglobal $CONF, $LANG, $userApp, $marxTime, $user;\n\n\t\t$action = new actions;\n\n\t\t$this->post_id = $post_id;\n\t\tisset($_GET['sort']) && $_GET['sort'] == 'newest' ? $this->sort = 'newest' : $this->sort = 'oldest';\n\t\t$get_comments = $this->doComments(1, 'post', 3);\n\n\t // Show Comments\n\t\t$read_ = '';\n\n\t\t// Sort the posts\n\t\t$slink = !trueAjax() ? permalink($CONF['url'].'/index.php?a='.$_GET['a'].'&u='.$_GET['u'].'&read='.$_GET['read'].'&sort=%s#comment') : '';\n\t\tif (isset($_GET['sort']) && $_GET['sort'] == 'newest') {\n\t\t\t$sort = '<a href=\"'.sprintf($slink, 'oldest').'\" class=\"dropdown-item\">'.$LANG['sort_oldest'].' <i class=\"fa fa-sort-desc p-1\"></i> </a>';\n\t\t} else {\n\t\t\t$sort = '<a href=\"'.sprintf($slink, 'newest').'\" class=\"dropdown-item\">'.$LANG['sort_newest'].' <i class=\"fa fa-sort-asc p-1\"></i> </a>';\n\t\t}\n\t\t// Show old comments\n\t if (empty($type)) {\n\t if ($get_comments) {\n\t \tforeach ($get_comments as $key) {\n\t \t\t$userApp->user_id = $key['writer_id'];\n\t $us = $userApp->collectUserName(null, 0, $key['writer_id']);\n\n\t\t if ($user['id'] == $key['writer_id']) {\n\t\t $delete = '\n\t\t <a class=\"dropdown-item\" onclick=\"delete_the('.$key['id'].', 9)\">'\n\t\t .$LANG['delete'].' <i class=\"fa fa-trash p-1\"></i> </a>';\n\t\t } else {\n\t\t $delete = '<div class=\"px-3\">'.$LANG['hello'].'</div>';\n\t\t }\n\t\t $time = '<small><span><i class=\"fa fa-clock-o \"></i> '.$marxTime->timeAgo(strtotime($key['date'])).'</span></small>';\n\t\t $loctn = '<small><span><i class=\"fa fa-clock-o \"></i> '.$us['address'].'</span></small>';\n\t \t\t\t\t\n\t \t\t\t\t// Show replies\n\t\t\t\t\t$this->reply_id = $key['id'];\n\t\t\t\t\t$reply_block = '';\n\t\t\t\t\t$get_reply = $this->doComments(1, 'post', 3);\n\t\t\t\t\tif ($get_reply) {\n\t\t\t\t\t foreach ($get_reply as $k) {\n\t\t\t\t\t \t$u = $userApp->collectUserName(null, 0, $k['writer_id']);\n\t\t\t\t\t \t$t = '<small><span><i class=\"fa fa-clock-o \"></i> '.$marxTime->timeAgo(strtotime($k['date'])).'</span></small>';\n\t\t \t\t$l = '<small><span><i class=\"fa fa-clock-o \"></i> '.$u['address'].'</span></small>';\n\n\t\t \t\t$reply_block .= '\n\t\t\t\t\t \t<div class=\"p-1 px-4 reply-comment\">\n\t\t\t\t \t\t\t<div class=\"text-info mx-2\">\n\t\t\t\t\t\t\t \t<span class=\"commentors-avatar\">\n\t\t\t\t\t\t\t \t<img class=\"rounded-circle\" src=\"'.$CONF['url'].'/uploads/faces/'.$u['photo'].'\" alt=\"'.$u['username'].'_Photo\">\n\t\t\t\t\t\t\t </span>\n\t\t\t\t\t\t\t <span class=\"comment-user\">\n\t\t\t\t\t\t\t \t<p><a href=\"'.$us['profile'].'\" class=\"blue-grey-text\">'.$u['fullname'].'</a><p>\n\t\t\t\t\t \t\t\t'.$l.' &nbsp; '.$t.'\n\t\t\t\t\t \t\t</span>\n\t\t\t\t\t \t\t</div>\n\t\t\t\t\t \t \t'.$action->decodeMessage($k['comment'], 1).'\n\t\t\t\t\t \t</div>';\n\t\t\t\t\t }\t\t\t\t\t\n\t\t\t\t\t}\t\t\t \n\n\t\t\t\t if (!$key['reply_id']) {\n\t\t \t\t$comment_block = '\n\t\t\t\t\t <div class=\"p-2 px-4\">'.$action->decodeMessage($key['comment'], 1).'\t\t\t\t\t\t \n\t\t\t\t\t\t <a class=\"text-info\" onclick=\"hidden_form('.$key['id'].')\">'.$LANG['reply'].'</a>\n\n\t\t\t\t\t\t\t <div class=\"form-inline md-form\" id=\"form_'.$key['id'].'\" style=\"display: none;\"> \n\t\t\t\t\t\t\t <input id=\"reply_'.$key['id'].'\" class=\"form-control form-control-sm m-2 col-sm-9\" type=\"text\" placeholder=\"Reply\">\n\t\t\t\t\t\t\t <button onclick=\"write_real_comment('.$user['id'].', '.$user_id.', '.$post_id.', 0, '.$key['id'].')\" class=\"btn btn-sm btn-info\">Reply</button>\n\t\t\t\t\t\t\t </div>\n\t\t\t\t\t\t\t <div id=\"new-reply_'.$key['id'].'\"></div> \n\t\t\t\t\t </div>';\t\t\t \t\n\t\t\t\t }\n\t \t\n\t\t $read_ .= '\n\t\t\t\t <div class=\"m-2 flex\" id=\"comment_'.$key['id'].'\">\n\t\t\t\t <div class=\"text-info mx-2\">\n\t <button class=\"btn btn-flat btn-flat-icon float-right\" type=\"button\" data-toggle=\"dropdown\" aria-expanded=\"false\">\n\t <em class=\"fa fa-ellipsis-h\"></em>\n\t </button>\t\n\t <div class=\"dropdown-menu dropdown-scale dropdown-menu-right\" role=\"menu\" style=\"position: absolute; transform: translate3d(-136px, 28px, 0px); top: 0px; left: 0px; will-change: transform;\">\n\t '.$delete.'\n\t '.$sort.'\n\t </div>\n\t\t\t\t \t<span class=\"commentors-avatar\">\n\t\t\t\t \t<img class=\"rounded-circle\" src=\"'.$CONF['url'].'/uploads/faces/'.$us['photo'].'\" alt=\"'.$us['username'].'_Photo\">\n\t\t\t\t </span>\n\t\t\t\t <span class=\"comment-user\">\t\n\t\t\t\t \t<p><a href=\"'.$us['profile'].'\" class=\"blue-grey-text\">'.$us['fullname'].'</a></p>\n\t\t\t\t \t'.$loctn.' &nbsp; '.$time.'\n\t\t\t\t </span>\n\t\t\t\t </div>\n\t\t <div id=\"comment\"></div>\n\t\t\t\t\t<div class=\"border-bottom p-2\">\n\t\t\t\t\t '.$comment_block.'\n\t\t\t\t\t '.$reply_block.'\n\t\t\t\t\t </div>\n\t\t\t\t\t</div>';\t \t\t \n\t \t}\n\t }\n\t $read_ .= '<div id=\"new-comment\"></div>';\n\n\t // If you just posted a new comment\n\t } else {\n\t \t$t = '<small><span><i class=\"fa fa-clock-o \"></i> '.$marxTime->timeAgo(strtotime('Now')).'</span></small>';\n\t\t\t$l = '<small><span><i class=\"fa fa-clock-o \"></i> '.$this->sender['address'].'</span></small>';\n\n\t\t\tif ($this->type == 0) { \n\t\t\t\t$read_ = '\n\t\t \t<div class=\"p-1 px-4 reply-comment\">\n\t\t \t\t\t<div class=\"text-info mx-2\">\n\t\t\t\t \t<span class=\"commentors-avatar\">\n\t\t\t\t \t<img class=\"rounded-circle\" src=\"'.$CONF['url'].'/uploads/faces/'.$this->sender['photo'].'\" alt=\"'.$this->sender['username'].'_Photo\">\n\t\t\t\t </span>\n\t\t\t\t <span class=\"comment-user\">\n\t\t\t\t \t<p><a href=\"'.$this->sender['profile'].'\" class=\"blue-grey-text\">'.$this->sender['fullname'].'</a><p>\n\t\t \t\t\t'.$l.' &nbsp; '.$t.'\n\t\t \t\t</span> \n\t\t \t\t</div>\n\t\t \t \t'.$action->decodeMessage($this->comment, 1).'\n\t\t \t</div>';\t \t\n\t\t\t} else {\n\t\t\t\t$read_ = ' \n\t\t\t\t<div class=\"border-bottom p-2\" id=\"comments\">\n\t\t\t\t <div class=\"m-2 flex\">\n\t\t\t\t <div class=\"text-info mx-2\">\n\t\t\t\t \t<span class=\"commentors-avatar\">\n\t\t\t\t \t<img class=\"rounded-circle\" src=\"'.$CONF['url'].'/uploads/faces/'.$this->sender['photo'].'\" alt=\"'.$this->sender['username'].'_Photo\">\n\t\t\t\t </span>\n\t\t\t\t <span class=\"comment-user\">\t\n\t\t\t\t \t<p><a href=\"'.$this->sender['profile'].'\" class=\"blue-grey-text\">'.$this->sender['fullname'].'</a></p>\n\t\t\t\t \t'.$l.' &nbsp; '.$t.'\n\t\t\t\t </span>\t \n\t\t\t\t </div>\n\t\t\t\t <div class=\"p-2 px-4\">'.$action->decodeMessage($this->comment, 1).'</div> \n\t\t\t\t </div>\n\t\t\t\t</div>'; \t\n\t\t\t}\n\t }\n\n return $read_;\t\t\n\t}", "title": "" }, { "docid": "813eab5e17ab6291cd15f70ca8e72a37", "score": "0.58765495", "text": "function cmsms_slider_post_comments($type = 'post', $show = true) {\r\n\tif (comments_open()) {\r\n\t\tif ($type == 'post') {\r\n\t\t\t$out = '<a class=\"cmsms_slider_post_comments cmsms_theme_icon_comment\" href=\"' . esc_url(get_comments_link()) . '\" title=\"' . esc_attr__('Comment on', 'pet-rescue') . ' ' . get_the_title() . '\">' . get_comments_number() . '</a>';\r\n\t\t} elseif ($type == 'project') {\r\n\t\t\t$out = '<a class=\"cmsms_slider_project_comments cmsms_theme_icon_comment\" href=\"' . esc_url(get_comments_link()) . '\" title=\"' . esc_attr__('Comment on', 'pet-rescue') . ' ' . get_the_title() . '\">' . get_comments_number() . '</a>';\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tif ($show) {\r\n\t\t\techo $out;\r\n\t\t} else {\r\n\t\t\treturn $out;\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "4d41f93d5344672ae0e667adb6d63d49", "score": "0.58676106", "text": "function _moz_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\n\tif ( 'pingback' == $comment->comment_type || 'trackback' == $comment->comment_type ) : ?>\n\n\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class( 'media' ); ?>>\n\t\t<div class=\"comment-body\">\n\t\t\t<?php _e( 'Pingback:', '_moz' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( 'Edit', '_moz' ), '<span class=\"edit-link\">', '</span>' ); ?>\n\t\t</div>\n\n\t<?php else : ?>\n\n\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?>>\n\t\t<article id=\"div-comment-<?php comment_ID(); ?>\" class=\"comment-body media\">\n\t\t\t<a class=\"pull-left\" href=\"#\">\n\t\t\t\t<?php if ( 0 != $args['avatar_size'] ) echo get_avatar( $comment, $args['avatar_size'] ); ?>\n\t\t\t</a>\n\n\t\t\t<div class=\"media-body\">\n\t\t\t\t<div class=\"media-body-wrap panel panel-default\">\n\n\t\t\t\t\t<div class=\"panel-heading\">\n\t\t\t\t\t\t<h5 class=\"media-heading\">\n\t\t\t\t\t\t\t<?php printf( __( '%s', '_moz' ), sprintf( '<cite class=\"fn\">%s</cite>', get_comment_author_link() ) ); ?>\n\t\t\t\t\t\t\t<span class=\"comment-meta\">\n\t\t\t\t\t\t\t\t<a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\">\n\t\t\t\t\t\t\t\t\t<time datetime=\"<?php comment_time( 'c' ); ?>\">\n\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\tprintf( _x( '%1$s - %2$s', '1: date, 2: time', '_moz' ), get_comment_date(), get_comment_time() );\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t</time>\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t<?php edit_comment_link( __( '<span style=\"margin-left: 5px;\" class=\"glyphicon glyphicon-edit\"></span> Edit', '_moz' ), '<span class=\"edit-link\">', '</span>' ); ?>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</h5>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\n\t\t\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', '_moz' ); ?></p>\n\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t<div class=\"comment-content panel-body\">\n\t\t\t\t\t\t<?php comment_text(); ?>\n\t\t\t\t\t</div><!-- .comment-content -->\n\n\t\t\t\t\t<?php comment_reply_link(\n\t\t\t\t\t\tarray_merge(\n\t\t\t\t\t\t\t$args, array(\n\t\t\t\t\t\t\t\t'add_below' => 'div-comment',\n\t\t\t\t\t\t\t\t'depth' \t=> $depth,\n\t\t\t\t\t\t\t\t'max_depth' => $args['max_depth'],\n\t\t\t\t\t\t\t\t'before' \t=> '<footer class=\"reply comment-reply panel-footer\">',\n\t\t\t\t\t\t\t\t'after' \t=> '</footer><!-- .reply -->'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t); ?>\n\n\t\t\t\t</div>\n\t\t\t</div><!-- .media-body -->\n\n\t\t</article><!-- .comment-body -->\n\n\t<?php\n\tendif;\n}", "title": "" }, { "docid": "76af2fb5575966396480b2ff927f5f5b", "score": "0.58501196", "text": "public function view_thread()\n {\n redirect_if_admin();\n $thread = new Thread();\n $thread->page_num = Param::get('page_num',1);\n $view_thread = $thread->get(Param::get('id'));\n $thread->id = $view_thread->id;\n $comments = $thread->getComments($thread->id, ITEMS_PER_PAGE); \n $page = new Pagination();\n $page->total_rows = $thread->countComments();\n $page->per_page = ITEMS_PER_PAGE;\n $page->extra_query = array(\"id=$thread->id\");\n $paginate = $page->pageIt();\n $this->set(get_defined_vars());\n }", "title": "" }, { "docid": "981501a0dbcbe2511a2a9baf9c331448", "score": "0.58400375", "text": "function dt_comment( $comment, $args, $depth ) {\n\n $GLOBALS['comment'] = $comment;\n switch ( $comment->comment_type ) :\n case 'pingback' :\n case 'trackback' :\n // Display trackbacks differently than normal comments.\n ?>\n <li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\">\n <p><?php _e( 'Pingback:', 'detheme' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'detheme' ), '<span class=\"edit-link\">', '</span>' ); ?></p></li>\n <?php\n break;\n \n default :\n // Proceed with normal comments.\n\n ?>\n <div class=\"dt-reply-line\"></div>\n <li class=\"comment_item media\" id=\"comment-<?php print $comment->comment_ID; ?>\">\n <div class=\"pull-left text-center\">\n <?php $avatar_url = get_avatar_url($comment,array('size'=>100)); ?>\n <a href=\"<?php comment_author_url(); ?>\"><img src=\"<?php echo esc_url($avatar_url); ?>\" class=\"author-avatar img-responsive\" alt=\"<?php comment_author(); ?>\"></a>\n <?php dt_comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'detheme' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n <?php dt_edit_comment_link( __( 'Edit', 'detheme' ), '', '' ); ?>\n </div>\n <div class=\"media-body\">\n <div class=\"col-12 col-xs-12 col-sm-5 dt-comment-author\"><?php comment_author(); ?></div>\n <div class=\"col-12 col-xs-12 col-sm-7 dt-comment-date secondary_color_text text-right\"><?php comment_date('g:i A - j F, Y') ?></div>\n <div class=\"col-12 col-xs-12 dt-comment-comment\"><?php comment_text(); ?></div>\n </div>\n </li>\n\n <?php\n break;\n endswitch; // end comment_type check\n}", "title": "" }, { "docid": "30cc3db39ce19fba2b45277118681894", "score": "0.5838433", "text": "function twentytwelve_comment( $comment, $args, $depth ) {\r\n\t$GLOBALS['comment'] = $comment;\r\n\tswitch ( $comment->comment_type ) :\r\n\t\tcase 'pingback' :\r\n\t\tcase 'trackback' :\r\n\t\t// Display trackbacks differently than normal comments.\r\n\t?>\r\n\t<li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\">\r\n\t\t<p><?php _e( 'Pingback:', 'twentytwelve' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'twentytwelve' ), '<span class=\"edit-link\"><i class=\"icon-edit\"></i> ', '</span>' ); ?></p>\r\n\t<?php\r\n\t\t\tbreak;\r\n\t\tdefault :\r\n\t\t// Proceed with normal comments.\r\n\t\tglobal $post;\r\n\t?>\r\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\r\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\r\n\t\t\t<?php echo get_avatar( $comment, 48 ); ?>\r\n\t\t\t<header class=\"comment-meta comment-author vcard\">\r\n\t\t\t\t<?php\r\n\t\t\t\t\tprintf( '<cite><i class=\"icon-user\"></i> %1$s <i class=\"icon-time\"></i> <a href=\"%2$s\"><time datetime=\"%3$s\">%4$s</time></a></cite>',\r\n\t\t\t\t\t\tget_comment_author_link(),\r\n\t\t\t\t\t\t// If current post author is also comment author, make it known visually.',\r\n\t\t\t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\r\n\t\t\t\t\t\tget_comment_time( 'c' ),\r\n\t\t\t\t\t\t/* translators: 1: date, 2: time */\r\n\t\t\t\t\t\tsprintf( __( '%1$s at %2$s', '' ), get_comment_date(), get_comment_time() )\r\n\t\t\t\t\t);\r\n\t\t\t\t?>\r\n\t\t\t</header><!-- .comment-meta -->\r\n\r\n\t\t\t<section class=\"comment-content comment\">\r\n\t\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\r\n\t\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( '评论正在等待审核.', 'twentytwelve' ); ?></p>\r\n\t\t\t\t<?php endif; ?>\r\n\t\t\t\t<?php comment_text(); ?>\r\n\t\t\t</section><!-- .comment-content -->\r\n\r\n\t\t\t<footer>\r\n\t\t\t\t<?php edit_comment_link( __( '编辑'), '<i class=\"icon-edit\"></i> ', '' ); ?>\r\n\t\r\n\t\t\t\t<?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( '回复', 'twentytwelve' ), 'before' => '<span><i class=\"icon-share-alt\"></i></span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\r\n\t\r\n\t\t\t</footer>\r\n\t\t</article><!-- #comment-## -->\r\n\t<?php\r\n\t\tbreak;\r\n\tendswitch; // end comment_type check\r\n}", "title": "" }, { "docid": "210ba01368f707cc1d06a9336e802b7a", "score": "0.5823151", "text": "private static function disableCommentsPostTypesSupport()\n {\n add_action('admin_init', function () {\n $post_types = get_post_types();\n\n foreach ($post_types as $post_type) {\n if (post_type_supports($post_type, 'comments')) {\n remove_post_type_support($post_type, 'comments');\n remove_post_type_support($post_type, 'trackbacks');\n }\n }\n });\n }", "title": "" }, { "docid": "0291b33f4adfdc2ed0358ca89691b6f2", "score": "0.58226407", "text": "function add_comments_for_story($el_story_id, $wp_story_id) {\n $added = array();\n $comments = Db::find(\"threadedcomment\", array(\"el_object_pk\" => $el_story_id,\n \"el_is_public\" => \"True\",\n \"el_is_removed\" => \"False\"), \n array(\"sort\" => array(\"el_submit_date\" => 1)) );\n foreach($comments as $comment) {\n $parent = $comment[\"el_parent_pk\"] ?\n $added[$comment[\"el_parent_pk\"]] :\n NULL;\n $new_id = $this->add_comment($comment, $parent, $wp_story_id);\n $added[$comment[\"el_id\"]] = $new_id;\n }\n }", "title": "" }, { "docid": "364914b4b4b2da56af5c38d08fa4e215", "score": "0.5821903", "text": "public function write_comment()\n { \n redirect_if_admin();\n $comment = new Comment;\n $comment->thread_id = Param::get('id'); \n $comment->user_id = get_session('logged_in', 'id');\n $comment->body = Param::get('body');\n $page = Param::get('page_next', 'write');\n switch ($page) {\n case 'write':\n break;\n case 'write_end': \n redirect(url('thread/view_thread', array('id' => $comment->thread_id)));\n try {\n $comment->write($comment->thread_id);\n } catch (ValidationException $e) {\n $page = 'write';\n } \n break; \n default:\n throw new NotFoundException(\"{$page} is not found\");\n break;\n }\n }", "title": "" }, { "docid": "b33391ce0d00a600ca6f9d45121ce2e1", "score": "0.58209395", "text": "function beacon_disable_comments_post_types_support() {\n $post_types = get_post_types();\n foreach ($post_types as $post_type) {\n if(post_type_supports($post_type, 'comments')) {\n remove_post_type_support($post_type, 'comments');\n remove_post_type_support($post_type, 'trackbacks');\n }\n }\n}", "title": "" }, { "docid": "c2a0c3c19a54d53571621338c7f21fb6", "score": "0.581608", "text": "function basestation_do_post_comments_link() {\n if ( comments_open() || ( '0' != get_comments_number() && ! comments_open() ) ) : ?>\n <span class=\"comments-link\"><i class=\"meta-icon icon-comment\"></i><?php comments_popup_link( __( ' Leave a comment', 'basestation' ), __( ' 1 Comment', 'basestation' ), __( ' % Comments', 'basestation' ) ); ?></span>\n <?php endif;\n }", "title": "" }, { "docid": "9347c352350424f759dd8a0710bede91", "score": "0.5801725", "text": "function creare_disable_comments_post_types_support() {\n\t$post_types = get_post_types();\n\tforeach ($post_types as $post_type) {\n\t\tif(post_type_supports($post_type, 'comments')) {\n\t\t\tremove_post_type_support($post_type, 'comments');\n\t\t\tremove_post_type_support($post_type, 'trackbacks');\n\t\t}\n\t}\n}", "title": "" }, { "docid": "c962e7490e16834c273c67b21a66db14", "score": "0.579197", "text": "function dokan_comment( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment;\n switch ( $comment->comment_type ) :\n case 'pingback' :\n case 'trackback' :\n ?>\n <li class=\"post pingback\">\n <p><?php _e( 'Pingback:', 'dokan' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( '(Edit)', 'dokan' ), ' ' ); ?></p>\n <?php\n break;\n default :\n ?>\n <li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n <article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n <footer>\n <div class=\"comment-author vcard\">\n <div class=\"comment-avatar\">\n <?php echo get_avatar( $comment, 75 ); ?>\n </div>\n <?php printf( __( '%s <span class=\"says\">says:</span>', 'dokan' ), sprintf( '<cite class=\"fn\">%s</cite>', get_comment_author_link() ) ); ?>\n\n <a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\"><time pubdate datetime=\"<?php comment_time( 'c' ); ?>\">\n <?php\n /* translators: 1: date, 2: time */\n printf( __( '%1$s at %2$s', 'dokan' ), get_comment_date(), get_comment_time() );\n ?>\n </time>\n </a>\n <?php edit_comment_link( __( '(Edit)', 'dokan' ), ' ' );\n ?>\n </div><!-- .comment-author .vcard -->\n <?php if ( $comment->comment_approved == '0' ) : ?>\n <em><?php _e( 'Your comment is awaiting moderation.', 'dokan' ); ?></em>\n <br />\n <?php endif; ?>\n </footer>\n\n <div class=\"comment-content\"><?php comment_text(); ?></div>\n\n <div class=\"reply\">\n <?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n </div><!-- .reply -->\n </article><!-- #comment-## -->\n\n <?php\n break;\n endswitch;\n}", "title": "" }, { "docid": "78d8975096588e048ebfb351ddb2d8bd", "score": "0.57913536", "text": "function twentyten_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase '' :\n\t?>\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<div id=\"comment-<?php comment_ID(); ?>\">\n\t\t<div class=\"comment-author\">\n\t\t\t<?php echo get_avatar( $comment, 40 ); ?>\n\t\t\t<?php printf( __( '%s', 'twentyten' ), sprintf( '<cite class=\"fn\">%s</cite>', get_comment_author_link() ) ); ?>\n\t\t</div><!-- .comment-author .vcard -->\n\t\t<?php if ( $comment->comment_approved == '0' ) : ?>\n\t\t\t<em><?php _e( 'نظر شما در انتظار تایید است.', 'twentyten' ); ?></em>\n\t\t\t<br />\n\t\t<?php endif; ?>\n\n\t\t<div class=\"comment-meta commentmetadata\"><a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\">\n\t\t\t<?php\n\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\tprintf( __( '%1$s at %2$s', 'twentyten' ), get_comment_date(), get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)', 'twentyten' ), ' ' );\n\t\t\t?>\n\t\t</div><!-- .comment-meta .commentmetadata -->\n\n\t\t<div class=\"comment-body\"><?php comment_text(); ?></div>\n\n\t\t<div class=\"reply\">\n\t\t\t<?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t</div><!-- .reply -->\n\t</div><!-- #comment-## -->\n\n\t<?php\n\t\t\tbreak;\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t?>\n\t<li class=\"post pingback\">\n\t\t<p><?php _e( 'Pingback:', 'twentyten' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __('(Edit)', 'twentyten'), ' ' ); ?></p>\n\t<?php\n\t\t\tbreak;\n\tendswitch;\n}", "title": "" }, { "docid": "4b17d73cd452759f9cc0cd92488d6a18", "score": "0.5786439", "text": "function wedesign_comments($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment; ?>\n <li <?php comment_class('media'); ?> id=\"comment-<?php comment_ID(); ?>\">\n <div class=\"avatar icon-overlay icn-link\">\n <a href=\"#\"><?php echo get_avatar( $comment, $size='75' ); ?></a>\n </div><!-- /.avatar -->\n \n <div class=\"commentbody\">\n \n <div class=\"author\">\n <?php printf('<h3>%s</h3>', get_comment_author_link()) ?>\n <div class=\"meta\">\n <span class=\"date\"><?php echo human_time_diff( get_comment_time('U'), current_time('timestamp') ) . ' ago'; ?></span>\n </div><!-- /.meta -->\n </div><!-- /.author -->\n \n <div class=\"message\">\n <?php if ($comment->comment_approved == '0') : ?>\n <div class=\"alert-message success\">\n \t<p><?php _e('Your comment is awaiting moderation.','wedesign') ?></p>\n </div>\n <?php endif; ?>\n \n <?php comment_text() ?>\n \n <ul class=\"meta\">\n <li class=\"reply\"><?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?></li>\n <?php edit_comment_link(__('Edit','wedesign'),'<i class=\"fa fa-pencil-square-o\"></i>') ?>\n <li class=\"votes\">24</li>\n <li class=\"upvote\"><a href=\"#\"><i class=\"fa fa-thumbs-o-up\"></i></a></li>\n <li class=\"downvote\"><a href=\"#\"><i class=\"fa fa-thumbs-o-down\"></i></a></li>\n </ul><!-- /.meta -->\n </div><!-- /.message -->\n \n </div><!-- /.commentbody -->\n <!-- </li> is added by wordpress automatically -->\n<?php\n}", "title": "" }, { "docid": "6b3d79e3890aa8399a4d9860b539c36b", "score": "0.578332", "text": "function rhm_override_comment_default($post_content, $post){\n\tif($post->post_type)\n\tswitch($post->post_type){\n\t\tcase 'page':\n\t\t\t$post->comment_status = 'closed';\n\t\tbreak;\n\t}\n\treturn $post_content;\n}", "title": "" }, { "docid": "d14124745d3b2f67cb8c197c47c90eca", "score": "0.577866", "text": "function df_disable_comments_post_types_support() {\n $post_types = get_post_types();\n foreach ($post_types as $post_type) {\n if(post_type_supports($post_type, 'comments')) {\n remove_post_type_support($post_type, 'comments');\n remove_post_type_support($post_type, 'trackbacks');\n }\n }\n}", "title": "" }, { "docid": "35c260654907fc1c91fa0c3cf793af00", "score": "0.5774239", "text": "function tkno_disable_comments_post_types_support() {\n $post_types = get_post_types();\n foreach ($post_types as $post_type) {\n if(post_type_supports($post_type, 'comments')) {\n remove_post_type_support($post_type, 'comments');\n remove_post_type_support($post_type, 'trackbacks');\n }\n }\n}", "title": "" }, { "docid": "db542d963cd0505e796c2dcb524ac33e", "score": "0.57690144", "text": "function twentyten_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase '' :\n\t?>\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<div id=\"comment-<?php comment_ID(); ?>\">\n\t\t<div class=\"comment-author vcard\">\n\t\t\t<?php echo get_avatar( $comment, 40 ); ?>\n\t\t\t<?php printf( __( '%s <span class=\"says\">says:</span>', 'twentyten' ), sprintf( '<cite class=\"fn\">%s</cite>', get_comment_author_link() ) ); ?>\n\t\t</div><!-- .comment-author .vcard -->\n\t\t<?php if ( $comment->comment_approved == '0' ) : ?>\n\t\t\t<em class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'twentyten' ); ?></em>\n\t\t<?php endif; ?>\n\n\t\t<div class=\"comment-meta commentmetadata\"><a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\">\n\t\t\t<?php\n\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\tprintf( __( '%1$s at %2$s', 'twentyten' ), get_comment_date(), get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)', 'twentyten' ), ' ' );\n\t\t\t?>\n\t\t</div><!-- .comment-meta .commentmetadata -->\n\n\t\t<div class=\"comment-body\"><?php comment_text(); ?></div>\n\n\t\t<div class=\"reply\">\n\t\t\t<?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t</div><!-- .reply -->\n\t</div><!-- #comment-## -->\n\n\t<?php\n\t\t\tbreak;\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t?>\n\t<li class=\"post pingback\">\n\t\t<p><?php _e( 'Pingback:', 'twentyten' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( '(Edit)', 'twentyten' ), ' ' ); ?></p>\n\t<?php\n\t\t\tbreak;\n\tendswitch;\n}", "title": "" }, { "docid": "45905f2400a41d702f4a62432f20aa03", "score": "0.5762834", "text": "function bk_comment( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment;\n switch ( $comment->comment_type ) :\n case '' :\n ?>\n <li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n <div id=\"comment-<?php comment_ID(); ?>\">\n <div class=\"comment-author vcard\">\n <?php echo get_avatar( $comment, 40 ); ?>\n <?php printf( __( '%s <span class=\"says\">says:</span>', 'bk' ), sprintf( '<cite class=\"fn\">%s</cite>', get_comment_author_link() ) ); ?>\n </div><!-- .comment-author .vcard -->\n <?php if ( $comment->comment_approved == '0' ) : ?>\n <em class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'bk' ); ?></em>\n <br />\n <?php endif; ?>\n\n <div class=\"comment-meta commentmetadata\"><a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\">\n <?php\n /* translators: 1: date, 2: time */\n printf( __( '%1$s at %2$s', 'bk' ), get_comment_date(), get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)', 'bk' ), ' ' );\n ?>\n </div><!-- .comment-meta .commentmetadata -->\n\n <div class=\"comment-body\"><?php comment_text(); ?></div>\n\n <div class=\"reply\">\n <?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n </div><!-- .reply -->\n </div><!-- #comment-## -->\n\n\t<?php\n break;\n case 'pingback' :\n case 'trackback' :\n\t?>\n\t<li class=\"post pingback\">\n <p><?php _e( 'Pingback:', 'bk' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( '(Edit)', 'bk' ), ' ' ); ?></p>\n\t<?php\n break;\n\tendswitch;\n}", "title": "" }, { "docid": "9d21e8463570c5a5fa3301c08ed83911", "score": "0.5754489", "text": "function basestation_comment( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment;\n switch ( $comment->comment_type ) :\n case 'pingback' :\n case 'trackback' :\n ?>\n <li class=\"post pingback\">\n <p><?php _e( 'Pingback:', 'basestation' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( '(Edit)', 'basestation' ), ' ' ); ?></p>\n <?php\n break;\n default :\n ?>\n <li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n <article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n <footer>\n <div class=\"comment-author\">\n <?php echo get_avatar( $comment, 40 ); ?>\n <?php printf( __( '%s', 'basestation' ), sprintf( '<cite class=\"name\">%s</cite>', get_comment_author_link() ) ); ?>\n </div><!-- .comment-author -->\n <?php if ( $comment->comment_approved == '0' ) : ?>\n <em><?php _e( 'Your comment is awaiting moderation.', 'basestation' ); ?></em>\n <br />\n <?php endif; ?>\n\n <div class=\"comment-meta commentmetadata\">\n <a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\"><time datetime=\"<?php comment_time( 'c' ); ?>\">\n <?php\n /* translators: 1: date, 2: time */\n printf( __( '%1$s at %2$s', 'basestation' ), get_comment_date(), get_comment_time() ); ?>\n </time></a>\n <?php edit_comment_link( __( '(Edit)', 'basestation' ), ' ' );\n ?>\n </div><!-- .comment-meta .commentmetadata -->\n </footer>\n\n <div class=\"comment-content\"><?php comment_text(); ?></div>\n\n <div class=\"reply\">\n <?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n </div><!-- .reply -->\n </article><!-- #comment-## -->\n\n <?php\n break;\n endswitch;\n}", "title": "" }, { "docid": "2f98bb05bdc30595209c7350739b2276", "score": "0.5752615", "text": "function df_disable_comments_post_types_support() {\n\t$post_types = get_post_types();\n\tforeach ($post_types as $post_type) {\n\t\t\t\tif(post_type_supports($post_type, 'comments')) {\n\t\t\t\t\t\tremove_post_type_support($post_type, 'comments');\n\t\t\t\t\t\tremove_post_type_support($post_type, 'trackbacks');\n\t\t\t\t}\n\t}\n}", "title": "" }, { "docid": "2491d915f521615c4fdb6ee82025986e", "score": "0.5743011", "text": "function gp_comm_comments_enable() {\n\tglobal $gp_comm_comments_form;\n\t$gp_comm_comments_form = true;\n}", "title": "" }, { "docid": "bc780e3c9b297d5788a418ba8a292399", "score": "0.5742531", "text": "function sgb_comment( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment;\n switch ( $comment->comment_type ) :\n case 'pingback' :\n break;\n case 'trackback' :\n break;\n default :\n global $post;\n ?>\n <li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n <article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n <header class=\"comment-meta comment-author vcard\">\n <?\n $avatar_size = 54;\n if ( '0' != $comment->comment_parent ) {\n $avatar_size = 27;\n }\n echo get_avatar( $comment, $avatar_size);\n ?>\n <cite class=\"fn\"><?php echo get_comment_author(); ?></cite>\n <time pubdate datetime=\"\" class=\"pull-right hidden-phone\">Am <?php comment_time('d,M Y'); ?> um <?php comment_time('H:i:s'); ?> Uhr</small></time>\n </header>\n <section class=\"comment-content comment well well-small\">\n <span class=\"reply pull-right btn\">\n <?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( '<span class=\"hidden-phone\">Antworten</span> <i class=\"icon-comments-alt\"></i>', 'sgb' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n </span>\n <?php if ( '0' == $comment->comment_approved ) : ?>\n <p class=\"comment-awaiting-moderation\"><?php _e( 'Ihr Kommentar wartet auf seine Freischaltung.', 'sgb' ); ?></p>\n <?php endif; ?>\n <?php comment_text(); ?>\n </section>\n <footer>\n </article>\n </li>\n <?php\n endswitch;\n }", "title": "" }, { "docid": "220e5f08e4e5eee151fa6e98d040b0ea", "score": "0.57422364", "text": "function bunchy_show_entry_comments_link() {\n\t$show = true;\n\t$comments_threshold = absint( bunchy_get_theme_option( 'posts', 'comments_threshold' ) );\n\n\tif ( $comments_threshold && $comments_threshold >= get_comments_number() ) {\n\t\t$show = false;\n\t}\n\n\treturn apply_filters( 'bunchy_show_entry_comments_link', $show );\n}", "title": "" }, { "docid": "2762a599d78c46dee1651940ac71485a", "score": "0.5731831", "text": "function phptemplate_comment_wrapper($content, $node) {\r\n if (!$content || $node->type == 'forum') {\r\n return '<div id=\"comments\">'. $content .'</div>';\r\n }\r\n else {\r\n return '<div id=\"comments\"><h2 class=\"comments\">'. t('Comments') .'</h2>'. $content .'</div>';\r\n }\r\n}", "title": "" }, { "docid": "2cb97817102475c7704c164f24000ab1", "score": "0.5730579", "text": "function better_mag_comment( $comment, $args, $depth ){\r\n\r\n $GLOBALS['comment'] = $comment;\r\n\r\n switch ($comment->comment_type):\r\n\r\n case 'pingback':\r\n case 'trackback':\r\n ?>\r\n\r\n <li <?php better_attr( 'comment', 'post pingback' ); ?>>\r\n <p><span><?php Better_Translation()->_echo( 'comments_pingback' ); ?></span> <?php comment_author_link(); ?><?php edit_comment_link( ' <i class=\"fa fa-edit\"></i> ' . Better_Translation()->_get( 'comments_edit' ), '', '' ); ?></p>\r\n <?php\r\n break;\r\n\r\n\r\n default:\r\n ?>\r\n\r\n <li <?php better_attr( 'comment' ); ?>>\r\n <article class=\"comment\">\r\n <div <?php better_attr( 'comment-avatar' ); ?>><?php echo get_avatar( $comment, 60 ); ?></div>\r\n\r\n <div class=\"comment-meta\">\r\n <p <?php better_attr( 'comment-author', 'comment-author' ); ?>><span itemprop=\"givenName\"><strong class=\"h-title\"><?php comment_author_link(); ?></strong></span></p>\r\n <a <?php better_attr( 'comment-url', 'comment-time' ); ?>>\r\n <time <?php better_attr( 'comment-published' ); ?>><i class=\"fa fa-calendar\"></i> <?php comment_date( get_option( 'date_format' ) ); ?> <i class=\"fa fa-clock-o\"></i> <?php comment_time( get_option( 'time_format' ) ); ?></time>\r\n </a>\r\n </div>\r\n\r\n <div <?php better_attr( 'comment-content' ); ?> >\r\n <div class=\"the-content\"><?php comment_text(); ?></div>\r\n <?php if ($comment->comment_approved == '0'): ?>\r\n <em class=\"comment-awaiting-moderation\"><?php Better_Translation()->_echo( 'comments_awaiting_message' ); ?></em>\r\n <?php endif; ?>\r\n </div>\r\n\r\n <?php\r\n comment_reply_link( array_merge( $args, array(\r\n 'reply_text' => '<i class=\"fa fa-reply\"></i> ' . Better_Translation()->_get( 'comments_reply' ),\r\n 'depth' => $depth,\r\n 'max_depth' => $args['max_depth']\r\n ) ) );\r\n\r\n edit_comment_link( ' <i class=\"fa fa-edit\"></i> ' . Better_Translation()->_get( 'comments_edit' ), '', '' );\r\n ?>\r\n </article>\r\n <?php\r\n break;\r\n endswitch;\r\n\r\n }", "title": "" }, { "docid": "880f2bf363417f032d993862f643d0ce", "score": "0.5725151", "text": "function colabs_list_comments($comment, $args, $depth) {\n\t$GLOBALS['comment'] = $comment;\n\t$GLOBALS['comment_depth'] = $depth;\n?>\n\n\t<li <?php comment_class(); ?>>\n\t\t<div id=\"comment-<?php comment_ID(); ?>\" class=\"comment-entry\">\n\t\t\t<?php if ( $comment->comment_approved == '0' ) : ?>\n\t\t\t\t<em class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'colabsthemes' ); ?></em>\n\t\t\t<?php endif; ?>\n\n\t\t\t<div class=\"comment-avatar\">\n\t\t\t<?php commenter_link() ?>\n\t\t\t</div>\n\n\t\t\t<div class=\"comment-content\">\n\t\t\t\t<div class=\"comment-meta\">\n\t\t\t\t <span class=\"comment-author\"><?php echo get_comment_author_link(); ?></span> \n\t\t\t\t <time><?php printf( __( '%1$s', 'colabsthemes' ), get_comment_date() ) ?></time>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"comment-text entry-content\">\n\t\t\t\t\t<?php comment_text(); ?>\n\t\t\t\t</div>\n\t\t\t\t<?php \n\t\t\t\tcomment_reply_link( \n\t\t\t\t\tarray_merge( \n\t\t\t\t\t\t$args, \n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'reply_text' => __( 'Reply', 'colabsthemes' ),\n\t\t\t\t\t\t\t\t'depth' => $depth,\n\t\t\t\t\t\t\t\t'max_depth' => $args['max_depth']\n\t\t\t\t\t\t) \n\t\t\t\t\t) \n\t\t\t\t); \n\t\t\t\t?>\n\t\t\t</div>\n\t\t</div>\n \n<?php }", "title": "" }, { "docid": "6b3583e5637053ad45dc3b33b5feb5d5", "score": "0.5722527", "text": "function nutmeg_comment( $comment, $args, $depth ) {\n\n\tif ( 'pingback' == $comment->comment_type || 'trackback' == $comment->comment_type ) : ?>\n\n\t\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class(); ?>>\n\t\t\t<div class=\"comment-body\">\n\t\t\t\t<?php esc_html_e( 'Pingback:', 'nutmeg' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( esc_html__( 'Edit', 'nutmeg' ), '<span class=\"edit-link\">', '</span>' ); ?>\n\t\t\t</div>\n\n\t\t\t<?php else : ?>\n\n\t\t\t\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?>>\n\t\t\t\t\t<article id=\"div-comment-<?php comment_ID(); ?>\" class=\"comment-body\">\n\n\t\t\t\t\t\t<div class=\"comment-author vcard\">\n\t\t\t\t\t\t\t<?php if ( 0 != $args['avatar_size'] ) echo get_avatar( $comment, $args['avatar_size'] ); ?>\n\t\t\t\t\t\t</div><!-- .comment-author -->\n\n\t\t\t\t\t\t<header class=\"comment-meta\">\n\t\t\t\t\t\t\t<?php printf( '<cite class=\"fn\">%s</cite>', get_comment_author_link() ); ?>\n\n\t\t\t\t\t\t\t<div class=\"comment-metadata\">\n\t\t\t\t\t\t\t\t<a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\">\n\t\t\t\t\t\t\t\t\t<time datetime=\"<?php comment_time( 'c' ); ?>\">\n\t\t\t\t\t\t\t\t\t\t<?php /* translators: 1: date, 2: time */ printf( esc_html_x( '%1$s at %2$s', '1: date, 2: time', 'nutmeg' ), get_comment_date(), get_comment_time() ); ?>\n\t\t\t\t\t\t\t\t\t</time>\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t</div><!-- .comment-metadata -->\n\n\t\t\t\t\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\n\t\t\t\t\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php esc_html_e( 'Your comment is awaiting moderation.', 'nutmeg' ); ?></p>\n\t\t\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t\t\t<div class=\"comment-tools\">\n\t\t\t\t\t\t\t\t<?php edit_comment_link( esc_html__( 'Edit', 'nutmeg' ), '<span class=\"edit-link\">', '</span>' ); ?>\n\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\tcomment_reply_link( array_merge( $args, array(\n\t\t\t\t\t\t\t\t\t'add_below' => 'div-comment',\n\t\t\t\t\t\t\t\t\t'depth' => $depth,\n\t\t\t\t\t\t\t\t\t'max_depth' => $args['max_depth'],\n\t\t\t\t\t\t\t\t\t'before' => '<span class=\"reply\">',\n\t\t\t\t\t\t\t\t\t'after' => '</span>',\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</div><!-- .comment-tools -->\n\t\t\t\t\t\t</header><!-- .comment-meta -->\n\n\t\t\t\t\t\t<div class=\"comment-content\">\n\t\t\t\t\t\t\t<?php comment_text(); ?>\n\t\t\t\t\t\t</div><!-- .comment-content -->\n\t\t\t\t\t</article><!-- .comment-body -->\n\n\t\t\t\t\t<?php\n\t\t\t\tendif;\n\t\t\t}", "title": "" }, { "docid": "f1fb5d36f7fbe14442622451e9611b9a", "score": "0.57170993", "text": "public function commented() {\r\n\t}", "title": "" }, { "docid": "00d0392921a1c6ab21195c53366952c3", "score": "0.5711912", "text": "public function getThreadedComments()\n {\n return $this->comments()->with('owner')->get()->threaded();\n }", "title": "" }, { "docid": "f6b5127bc1254b1f9daaa11922f154b3", "score": "0.5708366", "text": "function twentytwelve_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t\t// Display trackbacks differently than normal comments.\n\t?>\n\t<li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\">\n\t\t<p><?php _e( 'Pingback:', 'twentytwelve' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'twentytwelve' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n\t<?php\n\t\t\tbreak;\n\t\tdefault :\n\t\t// Proceed with normal comments.\n\t\tglobal $post;\n\t?>\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n\t\t\t<header class=\"comment-meta comment-author vcard\">\n\t\t\t\t<?php\n\t\t\t\t\techo get_avatar( $comment, 44 );\n\t\t\t\t\tprintf( '<cite class=\"fn\">%1$s %2$s</cite>',\n\t\t\t\t\t\tget_comment_author_link(),\n\t\t\t\t\t\t// If current post author is also comment author, make it known visually.\n\t\t\t\t\t\t( $comment->user_id === $post->post_author ) ? '<span> ' . __( 'Post author', 'twentytwelve' ) . '</span>' : ''\n\t\t\t\t\t);\n\t\t\t\t\tprintf( '<a href=\"%1$s\"><time datetime=\"%2$s\">%3$s</time></a>',\n\t\t\t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\n\t\t\t\t\t\tget_comment_time( 'c' ),\n\t\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\t\tsprintf( __( '%1$s at %2$s', 'twentytwelve' ), get_comment_date(), get_comment_time() )\n\t\t\t\t\t);\n\t\t\t\t?>\n\t\t\t</header><!-- .comment-meta -->\n\n\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\n\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'twentytwelve' ); ?></p>\n\t\t\t<?php endif; ?>\n\n\t\t\t<section class=\"comment-content comment\">\n\t\t\t\t<?php comment_text(); ?>\n\t\t\t\t<?php edit_comment_link( __( 'Edit', 'twentytwelve' ), '<p class=\"edit-link\">', '</p>' ); ?>\n\t\t\t</section><!-- .comment-content -->\n\n\t\t\t<div class=\"reply\">\n\t\t\t\t<?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'twentytwelve' ), 'after' => ' <span>&darr;</span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t</div><!-- .reply -->\n\t\t</article><!-- #comment-## -->\n\t<?php\n\t\tbreak;\n\tendswitch; // end comment_type check\n}", "title": "" }, { "docid": "f6b5127bc1254b1f9daaa11922f154b3", "score": "0.5708366", "text": "function twentytwelve_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t\t// Display trackbacks differently than normal comments.\n\t?>\n\t<li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\">\n\t\t<p><?php _e( 'Pingback:', 'twentytwelve' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'twentytwelve' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n\t<?php\n\t\t\tbreak;\n\t\tdefault :\n\t\t// Proceed with normal comments.\n\t\tglobal $post;\n\t?>\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n\t\t\t<header class=\"comment-meta comment-author vcard\">\n\t\t\t\t<?php\n\t\t\t\t\techo get_avatar( $comment, 44 );\n\t\t\t\t\tprintf( '<cite class=\"fn\">%1$s %2$s</cite>',\n\t\t\t\t\t\tget_comment_author_link(),\n\t\t\t\t\t\t// If current post author is also comment author, make it known visually.\n\t\t\t\t\t\t( $comment->user_id === $post->post_author ) ? '<span> ' . __( 'Post author', 'twentytwelve' ) . '</span>' : ''\n\t\t\t\t\t);\n\t\t\t\t\tprintf( '<a href=\"%1$s\"><time datetime=\"%2$s\">%3$s</time></a>',\n\t\t\t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\n\t\t\t\t\t\tget_comment_time( 'c' ),\n\t\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\t\tsprintf( __( '%1$s at %2$s', 'twentytwelve' ), get_comment_date(), get_comment_time() )\n\t\t\t\t\t);\n\t\t\t\t?>\n\t\t\t</header><!-- .comment-meta -->\n\n\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\n\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'twentytwelve' ); ?></p>\n\t\t\t<?php endif; ?>\n\n\t\t\t<section class=\"comment-content comment\">\n\t\t\t\t<?php comment_text(); ?>\n\t\t\t\t<?php edit_comment_link( __( 'Edit', 'twentytwelve' ), '<p class=\"edit-link\">', '</p>' ); ?>\n\t\t\t</section><!-- .comment-content -->\n\n\t\t\t<div class=\"reply\">\n\t\t\t\t<?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'twentytwelve' ), 'after' => ' <span>&darr;</span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t</div><!-- .reply -->\n\t\t</article><!-- #comment-## -->\n\t<?php\n\t\tbreak;\n\tendswitch; // end comment_type check\n}", "title": "" }, { "docid": "ec9c55ffabad75dc99aba55340eb02b7", "score": "0.56820947", "text": "function magazilla_get_post_comments($template_type = 'page', $show = true) {\n\t$out = '';\n\t\n\t\n\tif (comments_open()) {\n\t\tif ($template_type == 'page') {\n\t\t\t$out = magazilla_get_comments('cmsmasters_post_comments');\n\t\t} elseif ($template_type == 'post') {\n\t\t\t$cmsmasters_option = magazilla_get_global_options();\n\t\t\t\n\t\t\tif ($cmsmasters_option['magazilla' . '_blog_post_comment']) {\n\t\t\t\t$out = magazilla_get_comments('cmsmasters_post_comments');\n\t\t\t}\n\t\t}\n\t}\n\t\n\t\n\tif ($show) {\n\t\techo wp_kses_post($out);\n\t} else {\n\t\treturn wp_kses_post($out);\n\t}\n}", "title": "" }, { "docid": "7f791d516a0a0339363513119d1fd06d", "score": "0.5681385", "text": "function twentytwelve_comment( $comment, $args, $depth ) {\n\t\n\t$GLOBALS['comment'] = $comment;\n\t\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t\t// Display trackbacks differently than normal comments.\n\t\t?>\n\t\t<li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\">\n\t\t\t<p><?php _e( 'Pingback:', 'twentytwelve' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'twentytwelve' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n\t\t\t<?php\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t// Proceed with normal comments.\n\t\t\tglobal $post;\n\t\t?>\n\t\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n\t\t\t\t\n\t\t\t\t<section class=\"comment-content comment\">\n\t\t\t\t\t<?php comment_text(); ?>\n\t\t\t\t\t<?php edit_comment_link( __( 'Edit', 'twentytwelve' ), '<p class=\"edit-link\">', '</p>' ); ?>\n\t\t\t\t</section><!-- .comment-content -->\n\t\t\t\t\n\t\t\t\t<header class=\"comment-meta comment-author vcard\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\tprintf( '<time datetime=\"%1$s\">%2$s</time>',\n\t\t\t\t\t\t\tget_comment_time( 'c' ),\n\t\t\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\t\t\tsprintf( __( '%1$s', 'twentytwelve' ), get_comment_date( 'F j, Y' ) )\n\t\t\t\t\t\t);\n\t\t\t\t\t\tprintf( '<cite class=\"fn\">%1$s %2$s</cite>',\n\t\t\t\t\t\t\tget_comment_author_link(),\n\t\t\t\t\t\t\t// If current post author is also comment author, make it known visually.\n\t\t\t\t\t\t\t( $comment->user_id === $post->post_author ) ? '<span> ' . __( 'Post author', 'twentytwelve' ) . '</span>' : ''\n\t\t\t\t\t\t);\n\t\t\t\t\t\t\n\t\t\t\t\t?>\n\t\t\t\t</header><!-- .comment-meta -->\n\t\n\t\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\n\t\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'twentytwelve' ); ?></p>\n\t\t\t\t<?php endif; ?>\n\t\t\t\t\n\t\t\t</article><!-- #comment-## -->\n\t\t\t<?php\n\t\tbreak;\n\tendswitch; // end comment_type check\n}", "title": "" }, { "docid": "062fef83794b43e2e34de2909c4b0136", "score": "0.56802297", "text": "private function my_comments_list($page_name)\n\t{\n\t\t$order = (empty($_GET['sort']) OR 'oldest' != $_GET['sort'])\n\t\t\t? 'desc' : 'asc';\n\t\t$sort_by = (empty($_GET['sort']) OR 'newest' == $_GET['sort'] OR 'oldest' == $_GET['sort'])\n\t\t\t? 'created' : 'vote_count';\n\n\t\t$comments = ORM::factory('forum_cat_post_comment')\n\t\t\t->with('forum_cat_post')\n\t\t\t->where(array(\n\t\t\t\t'forum_cat_post_comments.fk_site'\t=> $this->site_id,\n\t\t\t\t'account_user_id'\t\t=> $this->account_user->get_user()->id,\n\t\t\t\t'is_post'\t=> '0'\n\t\t\t))\n\t\t\t->orderby(\"forum_cat_post_comments.$sort_by\", $order)\n\t\t\t->find_all();\n\t\tif(0 == $comments->count())\n\t\t\treturn 'No comments added yet.';\n\t\t\t\n\t\t$view = new View('public_forum/forums/my_comments_list');\n\t\t$view->comments = $comments;\n\t\t$view->page_name = $page_name;\n\t\treturn $view;\n\t}", "title": "" }, { "docid": "8aa4ee14c14c09eb0d783bd723d40e6d", "score": "0.5674941", "text": "function template_commentmain()\n{\n\t ProfileCommentsCopyright();\n}", "title": "" }, { "docid": "3d9e81e1292fd8232b27f35f58155857", "score": "0.5669548", "text": "function kebo_comment_pagination($nav_class = '') {\n\n //read the page links but do not echo\n $comment_page = paginate_comments_links('echo=0');\n \n //if there are page links, echo the navigation div and the page links\n if (!empty($comment_page)) {\n echo \"<div class=\\\"pagination pagination-centered $nav_class\\\">\\n\";\n echo paginate_comments_links(array(\n 'base' => add_query_arg('cpage', '%#%'),\n 'format' => '',\n 'echo' => true,\n 'prev_text' => '&laquo; Prev',\n 'next_text' => 'Next &raquo;'\n ));\n echo \"\\n</div>\\n\";\n }\n }", "title": "" }, { "docid": "963ca8ac79b722ce7055e01ee5debc67", "score": "0.56630516", "text": "function VkontakteComments()\n {\n /*?>\n <!-- В тег <head> на странице Вашего сайта необходимо добавить следующий код: -->\n <script src=\"http://userapi.com/js/api/openapi.js\" type=\"text/javascript\" charset=\"windows-1251\"></script>*/?>\n <script type=\"text/javascript\">\n VK.init({\n apiId: 2385265,\n onlyWidgets: true\n });\n </script>\n <?/*\n В тело страницы необходимо добавить элемент DIV,\n в котором будут отображаться комментарии,\n задать ему уникальный id и добавить в него код инициализации виджета\n */?>\n <!-- Put this div tag to the place, where the Comments block will be -->\n <div id=\"vk_comments\"></div>\n <script type=\"text/javascript\">\n VK.Widgets.Comments(\"vk_comments\", {limit: 5, width: \"686\", attach: false});\n //VK.Widgets.Comments(\"vk_comments\");\n </script>\n <?\n }", "title": "" }, { "docid": "33597dfec01a2a13f34dcbcfefb5cbc2", "score": "0.56626546", "text": "function user_role_moderation_show_comments($uid) {\r\n\tif($uid) {\r\n\t\t$sql= \"SELECT c.comment AS ucomment,\r\n \t\tc.*, n.*\r\n \t\tFROM {comments} c\r\n \t\tLEFT JOIN {node} n\r\n \t\tON c.nid = n.nid \r\n \t\tWHERE c.uid = $uid\r\n \t\tAND n.status = '1'\r\n \t\tORDER BY c.timestamp DESC\r\n \t\tLIMIT 0, 20\";\r\n\r\n\t\t$result = db_query($sql);\r\n\t\t$list = '<ul class=\"comments\">';\r\n $num_row =0;\r\n\t\twhile ($rs = db_fetch_object($result)) {\r\n\t\t\t$comment = $rs->ucomment;\r\n\t\t\t$cid=$rs->cid;\r\n\t\t\t$nid=$rs->nid;\r\n\r\n\t\t\t$title = $rs->title;\r\n $num_row++;\r\n\r\n\t\t\t$list .= '<li>';\r\n \r\n // load the node + the comment objects\r\n \t\t$c = _comment_load($cid);\r\n \t\t$n = node_load($c->nid);\r\n \r\n // title + the comment (XSS filtered)\r\n $list .= '<h5 class=\"comment-title\">' . check_plain($n->title) . '</h5>';\r\n $list .= '<p>' . check_markup($comment, $c->format). '</p>';\r\n \r\n $list .= '<ul class=\"comment-button\">' . '<li>' .\r\n l('Delete comment', 'comment/delete/' . $cid, array(\r\n attributes => array (\r\n 'id' => 'cid_delete_' . $cid,\r\n 'class' => 'colorbox-form ui-state-default ui-corner-all',\r\n 'title' => 'Delete the comment',\r\n )\r\n )\r\n ) .\r\n '</li>' .\r\n '<li>' .\r\n l('Edit comment', 'comment/edit/' . $cid, array(\r\n attributes => array (\r\n 'id' => 'cid_edit_' . $cid,\r\n 'class' => 'colorbox-form ui-state-default ui-corner-all',\r\n 'title' => 'Edit the comment',\r\n )\r\n )\r\n ) .\r\n '</li>' .\r\n '<li>' .\r\n l('Reply', 'comment/reply/' . $nid . '/' . $cid, array(\r\n attributes => array (\r\n 'id' => 'cid_reply_' . $cid,\r\n 'class' => 'colorbox-form ui-state-default ui-corner-all',\r\n 'title' => 'Reply to the comment',\r\n )\r\n )\r\n ) .\r\n '</li>' .\r\n '</ul>';\r\n\r\n $list .= '</li>';\r\n }\r\n\t\t$list .= '</ul>';\r\n \r\n $out['output'] = $list;\r\n $out['total'] = $num_row;\r\n\t\treturn $out;\r\n\t} else {\r\n\t\treturn FALSE;\r\n\t}\r\n}", "title": "" }, { "docid": "e9fe55bc392599df7570c12a1d0edd54", "score": "0.5660145", "text": "public function getThreadedComments()\n {\n return $this->comments()->get()->threaded();\n }", "title": "" }, { "docid": "494a0a50ef60629e1fe18ba1a7638997", "score": "0.5656124", "text": "function wpf_paginate_comments( $args = array() ) {\n\tglobal $wpf_theme;\n\n\treturn $wpf_theme->paginate( wp_parse_args( $args, array( 'type' => 'comments' ) ) );\n}", "title": "" }, { "docid": "bd593b0fa98786976350a7b4b0494ef9", "score": "0.5649359", "text": "function p2_responsive_comments( $comment, $args ) {\n\t$GLOBALS['comment'] = $comment;\n\n\tif ( !is_single() && get_comment_type() != 'comment' )\n\t\treturn;\n\n\t$depth = prologue_get_comment_depth( get_comment_ID() );\n\t$can_edit_post = current_user_can( 'edit_post', $comment->comment_post_ID );\n\n\t$reply_link = prologue_get_comment_reply_link(\n\t\tarray( 'depth' => $depth, 'max_depth' => $args['max_depth'], 'before' => ' | ', 'reply_text' => __( 'Reply', 'p2' ) ),\n\t\t$comment->comment_ID, $comment->comment_post_ID );\n\n\t$content_class = 'commentcontent';\n\tif ( $can_edit_post )\n\t\t$content_class .= ' comment-edit';\n\n\t?>\n\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class(); ?>>\n\t\t<?php do_action( 'p2_comment' ); ?>\n\n\t\t<?php echo get_avatar( $comment, 32 ); ?>\n\t\t<h4>\n\t\t\t<?php echo get_comment_author_link(); ?>\n\t\t\t<span class=\"meta\">\n\t\t\t\t<?php echo p2_date_time_with_microformat( 'comment' ); ?>\n\n\t\t\t</span>\n\t\t</h4>\n\t\t<div id=\"commentcontent-<?php comment_ID(); ?>\" class=\"<?php echo esc_attr( $content_class ); ?>\"><?php\n\t\t\t\techo apply_filters( 'comment_text', $comment->comment_content );\n\n\t\t\t\tif ( $comment->comment_approved == '0' ): ?>\n\t\t\t\t\t<p><em><?php esc_html_e( 'Your comment is awaiting moderation.', 'p2' ); ?></em></p>\n\t\t\t\t<?php endif; ?>\n\n\t\t\t\t<span class=\"actions\">\n\t\t\t\t\t<a href=\"<?php echo esc_url( get_comment_link() ); ?>\"><?php _e( 'Permalink', 'p2' ); ?></a>\n\t\t\t\t\t<?php\n\t\t\t\t\techo $reply_link;\n\n\t\t\t\t\tif ( $can_edit_post )\n\t\t\t\t\t\tedit_comment_link( __( 'Edit', 'p2' ), ' | ' );\n\n\t\t\t\t\t?>\n\t\t\t\t</span>\n\t\t</div>\n\n\t<?php\n}", "title": "" }, { "docid": "5ce1ea0bfd154a5d63a9cf55b0c3a0aa", "score": "0.5645744", "text": "function comments_theme($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment;\n extract($args, EXTR_SKIP);\n\n if ('div' == $args['style']) {\n $tag = 'div';\n $add_below = 'comment';\n } else {\n $tag = 'li';\n $add_below = 'div-comment';\n }\n?>\n <<?php echo $tag ?> <?php comment_class(empty($args['has_children']) ? '' : 'parent') ?>\n id = \"comment-<?php comment_ID() ?>\">\n <?php if ('div' != $args['style']) : ?>\n <div id=\"div-comment-<?php comment_ID() ?>\" class=\"comment-body\">\n <?php endif; ?>\n <div class=\"comment-meta commentmetadata\">\n <div class=\"comment-author vcard\">\n <?php if ($args['avatar_size'] != 0) echo get_avatar($comment, $args['avatar_size']); ?>\n <?php printf(__('<b class=\"fn\">%s</b> <span class=\"says\">says:</span>'), get_comment_author_link()) ?>\n <span class=\"comment-date\"><?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()) ?></span>\n <?php if ($comment->comment_approved == '0') : ?>\n <em class=\"comment-awaiting-moderation\"><?php _e('Your comment is awaiting moderation.') ?></em>\n <?php endif; ?>\n <?php edit_comment_link(__('(Edit)'), ' ', ''); ?>\n </div>\n </div>\n <div class=\"comment-text\"><?php comment_text() ?></div>\n <div class=\"reply\">\n <?php comment_reply_link(array_merge($args, array('add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n </div>\n <?php if ('div' != $args['style']) : ?>\n </div>\n <?php endif; ?>\n<?php \n}", "title": "" }, { "docid": "ae20c6df9e14e78182365aa3bd475582", "score": "0.56413686", "text": "function oy_add_comment_reply() {\n\t// threaded comments (when in use).\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) )\n\t\twp_enqueue_script( 'comment-reply' );\n}", "title": "" }, { "docid": "884f42d00018f0d9f5aad307e51f2f6b", "score": "0.56336987", "text": "function displayComments(&$obj, &$comments, $tag)\n{\n\t$logged_in = $obj->GetUser();\n\t$current_user = $obj->GetUserName();\n\t$is_owner = $obj->UserIsOwner();\n\t$prev_level = NULL;\n\t$threaded = 0;\n\tif ($_SESSION['show_comments'][$tag] == COMMENT_ORDER_THREADED)\n\t{\n\t\t$threaded = 1;\n\t}\n\n\t?>\n\t<div class=\"commentscontainer\">\n\t<?php\n\tforeach ($comments as $comment)\n\t{\n\t\t# Handle legacy or non-threaded comments\n\t\tif (!isset($comment['level']) || !$threaded)\n\t\t{\n\t\t\t$comment['level'] = 0;\n\t\t}\n\n\t\t# Keep track of closing <div> tags to effect nesting\n\t\tif (isset($prev_level) && ($comment['level'] <= $prev_level))\n\t\t{\n\t\t\tfor ($i=0; $i<$prev_level-$comment['level']+1; ++$i)\n\t\t\t{\n\t\t\t\techo '</div><!--closing comment level '.$i.'-->'.\"\\n\";\n\t\t\t}\n\t\t}\n\n\t\t# Alternate light/dark comment styles per level\n\t\t$comment_class = '';\n\t\tif ($comment['level'] % 2 == 1)\n\t\t{\n\t\t\t$comment_class = \"comment-layout-1\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$comment_class = \"comment-layout-2\";\n\t\t}\n\n\t\tif ($comment['status'] == 'deleted') {\n?>\n\t<div class=\"<?php echo $comment_class ?>\">\n\t\t<div class=\"commentdeleted\"><?php echo T_(\"[Comment deleted]\") ?></div>\n<?php\n\t\t}\n\t\telse\n\t\t{\n\t\t\t# Some stats\n\t\t\t//$comment_author = $obj->LoadUser($comment['user'])? $obj->Format($comment['user']) : $comment['user'];\n\t\t\t$comment_author = $obj->FormatUser($comment['user']);\n\t\t\t$comment_ts = sprintf(\"%s\", $comment['time']);\n?>\n\t<div id=\"comment_<?php echo $comment['id'] ?>\" class=\"<?php echo $comment_class ?>\" >\n\t\t<div class=\"commentheader\">\n\t\t<div class=\"commentauthor\"><?php echo T_(\"Comment by \").$comment_author ?></div>\n\t\t<div class=\"commentinfo\"><?php echo $comment_ts ?></div>\n\t\t</div>\n\t\t<div class=\"commentbody\">\n\t\t<?php echo $comment['comment'] ?>\n\t\t</div>\n<?php\n\t\t\tif ($obj->HasAccess('comment_post'))\n\t\t\t{\n\t\t\t\techo '<div class=\"commentaction\">';\n\t\t\t\techo\n\t\t\t\t$obj->FormOpen(\"processcomment\",\"\",\"post\",\"\",\"\",FALSE,\"#comments\");\n?>\n\t\t<input type=\"hidden\" name=\"comment_id\" value=\"<?php echo $comment['id'] ?>\" />\n<?php\n?>\n\t\t<input type=\"submit\" name=\"submit\" value=\"<?php echo T_(\"Reply\") ?>\" />\n<?php\n\t\t\t\t/* Conditions for which delete button is displayed:\n\t\t\t\t * 1. Current user owns the page the comment is on:\n\t\t\t\t * 2. Current user owns the comment;\n\t\t\t\t * 3. Current non-logged-in user matches IP or\n\t\t\t\t * hostname of comment\n\t\t\t\t */\n\t\t\t\tif ($logged_in & \n\t\t\t\t\t($is_owner || \n\t\t\t\t $current_user == $comment['user']) || \n\t\t\t\t\t$obj->config['anony_delete_own_comments'] && $current_user == $comment['user'])\n\t\t\t\t{\n?>\n\t\t<input type=\"submit\" name=\"submit\" value=\"<?php echo T_(\"Delete\") ?>\" />\n<?php\n\t\t\t\t}\n\t\t\t\techo $obj->FormClose();\n\t\t\t\techo \"</div>\";\n\t\t\t}\n\t\t}\n\t\t$prev_level = $comment['level'];\n\t}\n\tfor ($i=0; $i<$prev_level+1; ++$i)\n\t{\n\t\tprint '</div><!--closing comment level (end)-->'.\"\\n\";\n\t}\n\t?>\n\t</div>\n\t<?php\n}", "title": "" }, { "docid": "7474612f6b677eef5e4965a01085b2d2", "score": "0.5625243", "text": "function custom_comment($comment, $args, $depth) {\r\n$GLOBALS['comment'] = $comment; ?>\r\n<li <?php comment_class(); ?> id=\"comment-<?php comment_ID( ); ?>\">\r\n<div class=\"the_comment clearfix\">\r\n<?php if(function_exists('get_avatar')) { echo get_avatar($comment, '120'); } ?>\r\n<div class=\"the_comment_author\"><?php\r\necho sprintf( __('<span>%1$s</span> says', 'designcrumbs'), get_comment_author_link() );\r\n?></div>\r\n<?php if ($comment->comment_approved == '0') : //message if comment is held for moderation ?>\r\n<span class=\"moderation\"><?php _e('Your comment is awaiting moderation', 'designcrumbs'); ?>.</span>\r\n<?php endif; ?>\r\n<div class=\"the_comment_text\"><?php comment_text() ?></div>\r\n<small class=\"commentmetadata\">\r\n<a href=\"<?php comment_link() ?>\" class=\"comment_permalink\"><i class=\"fa fa-clock-o\"></i><?php comment_date(get_option( 'date_format' )) ?> - <?php comment_date('g:i a') ?></a>\r\n</small>\r\n<div class=\"reply\">\r\n<?php edit_comment_link( '<i class=\"fa fa-pencil\"></i>' . __('Edit', 'designcrumbs') ); ?><?php echo comment_reply_link(array('reply_text' => '<i class=\"fa fa-reply\"></i>' . __('Reply', 'designcrumbs'), 'depth' => $depth, 'max_depth' => $args['max_depth'])); ?>\r\n</div>\r\n</div>\r\n<?php }", "title": "" }, { "docid": "ad756b08ac9a673d451e5f6272b61384", "score": "0.56249434", "text": "function phptemplate_comment_wrapper($content, $node) {\n if (!$content || $node->type == 'forum') {\n return '<div id=\"comments\">'. $content .'</div>';\n }\n else {\n return '<div id=\"comments\"><h2 class=\"comments\">'. t('Comments') .'</h2>'. $content .'</div>';\n }\n}", "title": "" }, { "docid": "f4c56aaa3421477fb7bc9e2506cacc69", "score": "0.5618635", "text": "function geo_comment_nav() { if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) :\n ?>\n <nav class=\"navigation comment-navigation\">\n <h2 class=\"screen-reader-text\"><?php esc_html_e('Comment navigation', 'geo'); ?></h2>\n <div class=\"nav-links\">\n <?php\n if ( $prev_link = get_previous_comments_link( esc_html__('Older Comments', 'geo') ) ) :\n printf( '<div class=\"nav-previous\">%s</div>', $prev_link );\n endif;\n\n if ( $next_link = get_next_comments_link( esc_html__('Newer Comments', 'geo') ) ) :\n printf( '<div class=\"nav-next\">%s</div>', $next_link );\n endif;\n ?>\n </div><!-- .nav-links -->\n </nav><!-- .comment-navigation -->\n <?php\n endif;\n }", "title": "" }, { "docid": "41d0507b78ba7e9a80ffa627152d9742", "score": "0.56167674", "text": "public function view() \n {\n $thread = Thread::get(Param::get('thread_id'));\n $comments = array();\n $current_page = max(Param::get('page'), SimplePagination::MIN_PAGE_NUM);\n $pagination = new SimplePagination($current_page,self::MAX_ROWS_PER_PAGE);\n $comments = Comment::getAll($thread->id);\n $remaining_comments = array_slice($comments, $pagination->start_index + SimplePagination::MIN_PAGE_NUM);\n $pagination->checkLastPage($remaining_comments);\n\n $page_links = createPaginationLinks(count($comments), $current_page, $pagination->count, 'thread_id='. $thread->id);\n\n $comments = array_slice($comments, $pagination->start_index, $pagination->count);\n\n $this->set(get_defined_vars());\n }", "title": "" }, { "docid": "01f12ce2dc526e65189856c58caa0553", "score": "0.5611976", "text": "function df_disable_comments_status() {\n return false;\n}", "title": "" }, { "docid": "7310a05b4dcd7f76aec2bf1c7aba4e0a", "score": "0.5598735", "text": "public function has_page_comments() {\n\t\treturn '1' === get_option( 'page_comments' );\n\t}", "title": "" }, { "docid": "91a67429fb9300a95d716a16ac2286df", "score": "0.55930173", "text": "function custom_comment_number( $comments_per_page, $comment_status ) {\n $comments_per_page = 10;\n \n return $comments_per_page;\n}", "title": "" }, { "docid": "f8d47d162f4cbfce846601e2f3c90791", "score": "0.55919755", "text": "function list_pings($comment, $args, $depth) {\r\n $GLOBALS['comment'] = $comment;\r\n?>\r\n <li id=\"comment-<?php comment_ID(); ?>\"><i class=\"icon icon-share-alt\"></i>&nbsp;<?php comment_author_link(); ?>\r\n<?php \r\n}", "title": "" }, { "docid": "c94e9f8e838bff15065cfc5901b50adc", "score": "0.5591375", "text": "function g1_wp_list_comments_callback( $comment, $args, $depth ) {\n add_filter( 'get_avatar', 'g1_add_avatar_microdata' );\n add_filter( 'get_comment_author', 'g1_add_comment_author_microdata' );\n add_filter( 'get_comment_author_link', 'g1_add_comment_author_link_metadata' );\n\n\n $GLOBALS['comment'] = $comment;\n switch ( $comment->comment_type ) :\n case '' :\n ?>\n\t<li <?php comment_class(empty( $args['has_children'] ) ? '' : 'parent' ); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<article itemscope itemprop=\"comment\" itemtype=\"http://schema.org/Comment\" id=\"comment-<?php comment_ID(); ?>\">\n <header itemprop=\"author\" itemscope itemtype=\"http://schema.org/Person\">\n <div itemprop=\"author\" itemscope itemtype=\"http://schema.org/Person\">\n <?php echo get_avatar( $comment, 60 ); ?>\n <?php printf( '<cite>%s</cite>', get_comment_author_link() ); ?>\n </div>\n\n <p class=\"g1-meta\">\n <a itemprop=\"url\" href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\">\n <time itemprop=\"commentTime\" datetime=\"<?php echo get_comment_date( 'Y-m-d') . 'T' . get_comment_time('H:i:s') ?>\">\n <?php printf( __( '%1$s at %2$s', 'g1_theme' ), get_comment_date(), get_comment_time() ); ?>\n </time>\n </a>\n <?php edit_comment_link( __('(Edit)', 'g1_theme' ), ' ' ); ?>\n </p>\n </header>\n\n <?php if ( '0' == $comment->comment_approved ) : ?>\n <p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'g1_theme' ); ?></p>\n <?php endif; ?>\n\n <div itemprop=\"text\" class=\"comment-body\">\n <?php comment_text(); ?>\n </div>\n\n <footer class=\"reply g1-meta\">\n <?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n </footer>\n </article><!-- END: #comment-## -->\n\n <?php\n break;\n case 'pingback' :\n case 'trackback' :\n ?>\n <li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\">\n <p><?php _e( 'Pingback:', 'g1_theme' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'g1_theme' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n <?php\n break;\n endswitch;\n\n\n remove_filter( 'get_avatar', 'g1_add_avatar_microdata' );\n remove_filter( 'get_comment_author', 'g1_add_comment_author_microdata' );\n remove_filter( 'get_comment_author_link', 'g1_add_comment_author_link_metadata' );\n}", "title": "" }, { "docid": "b408953036e9f29331ed2d90e0b41226", "score": "0.55882454", "text": "function mytheme_comment($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment; ?>\n <li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID() ?>\">\n <div id=\"comment-<?php comment_ID(); ?>\">\n <div class=\"comment-author vcard\">\n <?php echo get_avatar($comment,$size='48',$default='' ); ?>\n\n <?php printf(__('<cite class=\"fn\">%s</cite> <span class=\"says\">says:</span>'), get_comment_author_link()) ?>\n </div>\n <?php if ($comment->comment_approved == '0') : ?>\n <em><?php _e('Your comment is awaiting moderation.') ?></em>\n <br />\n <?php endif; ?>\n\n <div class=\"comment-meta commentmetadata\"><a href=\"<?php //echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()) ?></a><?php edit_comment_link(__('(Edit)'),' ','') ?></div>\n\n <?php comment_text() ?>\n\n <div class=\"reply\">\n <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n </div>\n </div>\n<?php\n }", "title": "" }, { "docid": "947381299bf138013e7b513e7586f379", "score": "0.5588042", "text": "public function check_comment_template() {\n\t\tif (!is_singular()) {\n\t\t\treturn;\n\t\t}\n\t\tif (!defined('DISABLE_COMMENTS_REMOVE_COMMENTS_TEMPLATE') || DISABLE_COMMENTS_REMOVE_COMMENTS_TEMPLATE === true) {\n\t\t\t// Kill the comments template.\n\t\t\tadd_filter('comments_template', [$this, 'dummy_comments_template'], 20);\n\t\t}\n\t\t// Remove comment-reply script for themes that include it indiscriminately\n\t\twp_deregister_script('comment-reply');\n\t\t// feed_links_extra inserts a comments RSS link\n\t\tremove_action('wp_head', 'feed_links_extra', 3);\n\t}", "title": "" }, { "docid": "2026729b42c1c271c8e5b6c44c4f8346", "score": "0.55838174", "text": "function rog_comment( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment;\n switch ( $comment->comment_type ) :\n case 'pingback' :\n case 'trackback' :\n ?>\n <li class=\"post pingback\">\n <p><?php _e( 'Pingback:', 'twentyeleven' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( 'Edit', 'twentyeleven' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n <?php\n break;\n default :\n ?>\n <li <?php comment_class('clearfix'); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n <div class=\"comment-container\">\n <div class=\"avatar-holder\">\n <?php\n $avatar_size = 68;\n if ( '0' != $comment->comment_parent )\n $avatar_size = 39;\n echo get_avatar( $comment, $avatar_size );\n ?>\n </div>\n <div class=\"comment-entry\" id=\"comment-<?php comment_ID(); ?>\">\n <div class=\"comment-head\">\n <?php\n printf( __( '%1$s %2$s <span class=\"says\">said:</span>', 'twentyeleven' ),\n sprintf( '<span class=\"name\">%s</span>', get_comment_author_link() ),\n sprintf( '<span class=\"date\"><a href=\"%1$s\">%3$s</a></spam>',\n esc_url( get_comment_link( $comment->comment_ID ) ),\n get_comment_time( 'c' ),\n /* translators: 1: date, 2: time */\n sprintf( '%1$s at %2$s', get_comment_date(), get_comment_time() )\n )\n );\n ?>\n <?php edit_comment_link( 'Изменить','<span class=\"edit\">', '</span>' ); ?>\n \n <?php if ( $comment->comment_approved == '0' ) : ?>\n <em class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'twentyeleven' ); ?></em>\n <br />\n <?php endif; ?>\n </div>\n\n <div class=\"comment-text\"><?php comment_text(); ?></div>\n \n <div class=\"reply\">\n <?php comment_reply_link( array_merge( $args, array( 'reply_text' => 'Цитата <span>&darr;</span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n </div><!-- .reply -->\n </div>\n </div>\n <?php\n break;\n endswitch;\n}", "title": "" }, { "docid": "6fa239ff5d1e52e38fe570bd9468cc95", "score": "0.55810153", "text": "protected function _adForumViewAboveThreadList()\r\n\t{\r\n\t}", "title": "" }, { "docid": "3f6b9e6a6edd61f8e80c02a1d5b138f8", "score": "0.55804783", "text": "function obtera_comments($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment; ?>\n <li id=\"comment-<?php comment_ID() ?>\" <?php comment_class(); ?>>\n <div class=\"media my-3 d-flex align-items-center\">\n <?php if (get_option('show_avatars') == '1') : ?>\n <img loading=\"lazy\" class=\"lazy mr-3 author-avatar\" alt=\"\" data-src=\"<?php echo get_avatar_url($comment, array('size' => 32)); ?>\">\n <?php endif; ?>\n <div class=\"media-body\">\n <div class=\"reply float-right\">\n <?php comment_reply_link(array_merge($args, array('reply_text' => 'Reply', 'add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth']))); ?>\n </div>\n <a class=\"author-name\" href=\"<?php echo get_comment_author_url($comment); ?>\" target=\"_blank\" rel='external nofollow'>\n <?php echo get_comment_author($comment); ?>\n </a>\n <small class=\"d-block text-muted author-date\"><?php printf(__('%1$s'), get_comment_date(), get_comment_time()) ?></small>\n </div>\n </div>\n <div class=\"authors-comment\">\n <?php if ($comment->comment_approved == 0) : ?>\n <small class=\"text-info\">Your comment is awaiting for approval.</small>\n <?php endif; ?>\n <?php comment_text(); ?>\n </div>\n <hr>\n <?php\n }", "title": "" }, { "docid": "dad87282c458bcb77ad535df61f3a98e", "score": "0.5565851", "text": "function specialization() {\n phrasecomment::init();\n if (!empty($this->config->title)) {\n $this->title = $this->config->title;\n } else {\n $this->config->title = 'Inline Comments';\n } \n if (empty($this->config->qid)) $this->config->qid = '0';\n \n }", "title": "" }, { "docid": "098cc4c4db096253f527c694c8038370", "score": "0.55582094", "text": "function gigya_add_comments_ui(&$node) {\n // Check if comments component is enabled.\n if (_gigya_is_component_enabled('comments') && empty($gigya_comments_ui_added)) {\n static $gigya_comments_ui_added = TRUE;\n // Add the comments ui.\n gigya_comments_add_ui($node->nid, $node->type);\n // Remove login link we have at in the gigya comment widget.\n unset($node->{'content'}['links']['comment']['#links']['comment_forbidden']);\n }\n}", "title": "" }, { "docid": "783e20dbd420f34b73c2f01288056207", "score": "0.5553626", "text": "function list_pings($comment, $args, $depth) {\r\n\r\n $GLOBALS['comment'] = $comment;\r\n\r\n?>\r\n\r\n <li id=\"comment-<?php comment_ID(); ?>\"><i class=\"icon icon-share-alt\"></i>&nbsp;<?php comment_author_link(); ?>\r\n\r\n<?php \r\n\r\n\r\n\r\n}", "title": "" }, { "docid": "ee287a64376a2f93792ec1aecd4a38a6", "score": "0.55535334", "text": "function tkno_disable_comments_status() {\n return false;\n}", "title": "" }, { "docid": "215956e0165640129547c383680d39a6", "score": "0.5548253", "text": "public function testComments()\n {\n $document = $this->parse('comment.rst');\n\n $render = $document->render();\n $this->assertNotContains('Testing comment', $render);\n $this->assertContains('Text before', $render);\n $this->assertContains('Text after', $render);\n \n $document = $this->parse('multi-comment.rst');\n\n $render = $document->render();\n $this->assertNotContains('multi-line', $render);\n $this->assertNotContains('Blha', $render);\n $this->assertContains('Text before', $render);\n $this->assertContains('Text after', $render);\n }", "title": "" }, { "docid": "66ad63d62427ae974ce48278c6fdb76a", "score": "0.5532383", "text": "function cmsmasters_profile_comments($template_type = 'page', $show = true) {\n\t$out = '';\n\t\n\t\n\tif (comments_open()) {\n\t\tif ($template_type == 'page') {\n\t\t\t$out = cmsmasters_comments('cmsmasters_profile_comments');\n\t\t} elseif ($template_type == 'post') {\n\t\t\t$cmsmasters_option = cmsmasters_get_global_options();\n\t\t\t\n\t\t\tif ($cmsmasters_option[CMSMASTERS_SHORTNAME . '_profile_post_comment']) {\n\t\t\t\t$out .= '<div class=\"profile_details_item\">' . \n\t\t\t\t\t'<div class=\"profile_details_item_title\">' . esc_html__('Comments', 'mall') . ':' . '</div>' . \n\t\t\t\t\t'<div class=\"profile_details_item_desc details_item_desc_comments\">' . \n\t\t\t\t\t\tcmsmasters_comments('cmsmasters_profile_comments') . \n\t\t\t\t\t'</div>' . \n\t\t\t\t'</div>';\n\t\t\t}\n\t\t}\n\t}\n\t\n\t\n\tif ($show) {\n\t\techo $out;\n\t} else {\n\t\treturn $out;\n\t}\n}", "title": "" }, { "docid": "44cab984b1db3a777276d98f89eb3853", "score": "0.5531608", "text": "function bento_theme_comment($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment; ?>\n <li <?php comment_class('box grey'); ?> id=\"li-comment-<?php comment_ID() ?>\">\n <div id=\"comment-<?php comment_ID(); ?>\">\n <div class=\"comment-author vcard\">\n <?php echo get_avatar($comment,$size='48',$default='<path_to_url>' ); ?>\n <?php printf(__('<strong><cite class=\"fn\">%s</cite></strong>'), get_comment_author_link()) ?>\n </div>\n \n <?php if ($comment->comment_approved == '0') : ?>\n <em><?php _e('Your comment is awaiting moderation.') ?></em>\n <br />\n <?php endif; ?>\n \n </div>\n\n <div class=\"comment-meta commentmetadata\">\n <a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()) ?></a>\n |\n <?php edit_comment_link(__('Edit'),' ','') ?>\n </div>\n\n <?php comment_text() ?>\n\n\n\n <div class=\"reply\">\n <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n </div>\n <div class=\"clearfix\">\n </div>\n\n<?php }", "title": "" }, { "docid": "2baced244146f91a17a0b65541175838", "score": "0.5531575", "text": "function list_pings($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment;\n?>\n <li id=\"comment-<?php comment_ID(); ?>\"><i class=\"fa fa-share-alt\"></i>&nbsp;<?php comment_author_link(); ?>\n<?php \n}", "title": "" }, { "docid": "28de4b1e3f9e397dc7fff2cb900a90c1", "score": "0.5531398", "text": "function wp_bootstrap_comments($comment, $args, $depth) {\r\n $GLOBALS['comment'] = $comment; ?>\r\n <li <?php comment_class(); ?>>\r\n <div id=\"comment-<?php comment_ID(); ?>\" class=\"comment-item depth-1 parent\">\r\n <div class=\"comment-item-box\">\r\n <div class=\"comment-author\">\r\n <?php echo get_avatar( $comment, $size='60' ); ?>\r\n </div><!--//comment-author-->\r\n <div class=\"comment-body\">\r\n <?php printf('<cite class=\"name\">%s Says:</cite>', get_comment_author_link()) ?>\r\n <p class=\"time\"><?php comment_time('F j, Y '); ?></p>\r\n <div class=\"content\">\r\n <?php comment_text() ?>\r\n </div><!--//content-->\r\n <a class=\"comment-reply-link btn btn-cta btn-cta-secondary\" href=\"#\">Reply</a>\r\n </div><!--//comment-body--> \r\n </div><!--//comment-box--> \r\n </div><!--//comment-item depth-1-->\r\n <!-- </li> is added by wordpress automatically -->\r\n\r\n<?php\r\n}", "title": "" }, { "docid": "d6a79fe606d49a2ee176ddb4c519f89a", "score": "0.5514546", "text": "function k2_theme_comment_nav()\n{\n // Are there comments to navigate through?\n if (get_comment_pages_count() > 1 && get_option('page_comments')) :\n ?>\n <nav class=\"navigation comment-navigation\" role=\"navigation\">\n <h2 class=\"screen-reader-text\"><?php esc_html_e('Comment navigation', 'k2-theme'); ?></h2>\n <div class=\"nav-links\">\n <?php\n if ($prev_link = get_previous_comments_link(esc_html__('Older Comments', 'k2-theme'))) :\n printf('<div class=\"nav-previous\">%s</div>', $prev_link);\n endif;\n\n if ($next_link = get_next_comments_link(esc_html__('Newer Comments', 'k2-theme'))) :\n printf('<div class=\"nav-next\">%s</div>', $next_link);\n endif;\n ?>\n </div><!-- .nav-links -->\n </nav><!-- .comment-navigation -->\n <?php\n endif;\n}", "title": "" }, { "docid": "b36d8c0cd2fc954f36feb5db5d30bb92", "score": "0.54998964", "text": "function getComments($post_id){\r\n\t//$startDiv = '';\t\t//placed in the makePost function instead\r\n\t//$endDiv = '';\t\t\t//ditto ^^\r\n\t$html = '';\r\n\tmysqlConnect();\r\n\t\r\n\t$res = mysql_query(\"SELECT user_id,id,text FROM replies WHERE post_id='$post_id' AND is_deleted='0'\");\r\n\tif (mysql_num_rows($res)){\r\n\t\t$replies = array();\r\n\t\twhile ($row = mysql_fetch_array($res)){\r\n\t\t\t$replies[$row['id']] = array('user_id' => $row['user_id'], 'text'=>$row['text']);\r\n\t\t}\r\n\t\tksort($replies);\r\n\t\tforeach ($replies as $id => $values){\r\n\t\t\t$html = $html.makeComment($values['user_id'],$values['text'],$id);\r\n\t\t}\r\n\t}\r\n\telse{\r\n\t}\r\n\treturn $html;\r\n}", "title": "" }, { "docid": "5a2a9e9c8ae4ad0359dbfd3c97c25a59", "score": "0.5497285", "text": "function disallow_comments() {\n\n update_option( 'default_comment_status', 'closed' );\n\n\n}", "title": "" }, { "docid": "49ac800f757f3e5ba77c2df192ceed03", "score": "0.54942816", "text": "function starkers_comment( $comment, $args, $depth ) {\n\t\t$GLOBALS['comment'] = $comment; \n\t\t?>\n\t\t<?php if ( $comment->comment_approved == '1' ): ?>\t\n\t\t<li>\n\t\t\t<article id=\"comment-<?php comment_ID() ?>\">\n\t\t\t\t<?php echo get_avatar( $comment ); ?>\n\t\t\t\t<h4><?php comment_author_link() ?></h4>\n\t\t\t\t<time><a href=\"#comment-<?php comment_ID() ?>\" pubdate><?php comment_date() ?> at <?php comment_time() ?></a></time>\n\t\t\t\t<?php comment_text() ?>\n\t\t\t</article>\n\t\t<?php endif;\n\t}", "title": "" } ]
381f372930ba1daae8a9ead310b80bd1
Generate slug url for article, check other record in database ensure we get a unique url for each article, append duplicate number if neccessary
[ { "docid": "d2e6dea5347e67b28fe8420dc73bea6c", "score": "0.6058995", "text": "public function generate_slug($title, $object_id = NULL)\n {\n $title = make_url($title, 255);\n\n // we may need to exclude object itselve sfrom checking\n if (is_numeric($object_id) AND $object_id > 0)\n {\n $this->db->where( 'id !=', $object_id );\n }\n \n // get all slug match with generated title\n $items = $this->db->select( 'slug' )->like( 'slug', $title , 'right')->get( 'content' )->result();\n\n // not found, we can use it\n if (empty($items))\n {\n return $title;\n }\n \n // start number tracking\n $number = 0;\n \n // find the most value number\n foreach ($items as $item)\n {\n if (preg_match('~^'.preg_quote($title).'-(?<number>\\d+)$~', $item->slug, $match))\n {\n if ($match['number'] > $number)\n {\n $number = $match['number'];\n }\n }\n }\n \n // add one to max number, this is the append number\n $number++;\n \n $title .= '-'.$number;\n \n return $title;\n }", "title": "" } ]
[ { "docid": "2aa66fd821c20898ae419bd7053b79e4", "score": "0.69660735", "text": "function generate_slug($title)\n{\n $slug = str_slug($title, '-');\n $existing_slug = DB::table('page')->select('id')->where('slug', $slug)->first();\n if (!empty($existing_slug)) {\n //slug already exists so we add the page id to make it unique\n $slug = $slug . '-' . $existing_slug['id'];\n }\n return $slug;\n}", "title": "" }, { "docid": "b2478ea7d2d47cfa913caf0c8d154113", "score": "0.6938932", "text": "private function createSlug() {\r\n \r\n if (!empty($this->slug)) {\r\n return;\r\n }\r\n \r\n $proposal = ContentUtility::generateUrlSlug($this->name, 14);\r\n \r\n $result = $this->db->fetchAll(\"SELECT id FROM event_categories WHERE slug = ?\", $proposal); \r\n \r\n if (count($result)) {\r\n $proposal .= count($result);\r\n }\r\n \r\n $this->slug = $proposal;\r\n \r\n }", "title": "" }, { "docid": "28e93066f0a7634322437b5677172ed5", "score": "0.69217455", "text": "private function generateSlug()\n {\n $i = 0;\n\n while ($this->getCountBySlug($this->generateSlugByIncrementer($i)) > 0) {\n $i++;\n }\n\n return $this->generateSlugByIncrementer($i);\n }", "title": "" }, { "docid": "ed073a29adbc1916ad2640fc4a9ffd2b", "score": "0.6838108", "text": "private function getUniqueSlug()\n\t{\n\t\tglobal $wpdb;\n \t\t\n\t\t// WP function -- formatting class\n\t\t$slug = sanitize_title( $this->getName( array( 'format' => '%first%-%last%' ) ) );\n\t\t\n\t\t$query = $wpdb->prepare( 'SELECT slug FROM ' . CN_ENTRY_TABLE . ' WHERE slug = %s', $slug );\n\t\t\n\t\tif ( $wpdb->get_var( $query ) )\n\t\t{\n\t\t\t$num = 2;\n\t\t\tdo\n\t\t\t{\n\t\t\t\t$alt_slug = $slug . \"-$num\";\n\t\t\t\t$num++;\n\t\t\t\t$slug_check = $wpdb->get_var( $wpdb->prepare( 'SELECT slug FROM ' . CN_ENTRY_TABLE . ' WHERE slug = %s', $alt_slug ) );\n\t\t\t}\n\t\t\twhile ( $slug_check );\n\t\t\t\n\t\t\t$slug = $alt_slug;\n\t\t}\n\t\t\n\t\treturn $slug;\n\t}", "title": "" }, { "docid": "118991c4f235280ee078886b1b3b9d75", "score": "0.6810301", "text": "public function generateUrl()\n\t{\n\t\t$url = Str::slug(Input::get('title'));\n\t\t$urlCount = count(Page::where('url', '=', $url)->get());\n\t\treturn ($urlCount > 0) ? \"{$url}-{$urlCount}\" : $url;\n\t}", "title": "" }, { "docid": "0b7cf6b30bcd61edd16111a7f766a3d1", "score": "0.67153174", "text": "public function getUniqueSlug()\n {\n $slug = $this->getSlug($this->Owner->{$this->title_col});\n $this->pk_col = $this->Owner->getMetaData()->tableSchema->primaryKey;\n $this->Owner->{$this->slug_col} = $slug;\n\n $matches = $this->getMatches($this->Owner->slug);\n\n if($matches){\n\t\t\t$ar_matches = array();\n\t\t\tforeach ($matches as $match){\n\t\t\t\tif($match->{$this->pk_col} == $this->Owner->{$this->pk_col} && $match->{$this->slug_col} == $this->Owner->{$this->slug_col}){\n\t\t\t\t} else {\n\t\t\t\t\t$ar_matches[] = $match->slug;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$new_slug = $slug;\n\t\t\t$index = 1;\n\t\t\twhile ($index > 0) {\n\t\t\t\tif (in_array($new_slug, $ar_matches)){\n\t\t\t\t\t$new_slug = $slug.'-'.$index;\n\t\t\t\t\t$index++;\n\t\t\t\t} else {\n\t\t\t\t\t$slug = $new_slug;\n\t\t\t\t\t$index = -1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n return $slug;\n }", "title": "" }, { "docid": "dee04b0892305cc6a45630d1f34f60b9", "score": "0.6617468", "text": "private function _generate_unique_slug($name){\n\t\t\n\t\t//\"Slugify\" the character's name\n\t\t$name = $this->string_manip->slugify($name);\n\t\t\n\t\t//Get a count of rows that match this title\n\t\t$number = $this->db->where('slug',$name)->count_all_results('characters');\n\t\t\n\t\t//DEBUG\n\t\t//echo $number;die;\n\t\t\n\t\t//If number is greater than 0, check for others and find what upper number to add\n\t\tif($number > 0){\n\t\t\t\n\t\t\t//Set flag and counter\n\t\t\t$flag \t= FALSE;\n\t\t\t$cnt \t= 1;\n\t\t\t\n\t\t\t//Loop\n\t\t\twhile($flag == FALSE){\n\t\t\t\t\n\t\t\t\t//Check for slug with number\n\t\t\t\t$number = $this->db->where('slug',$name.\"-\".$cnt)->count_all_results('characters');\n\t\t\t\t\n\t\t\t\t//If the amount matched is 0, that's the number to use!\n\t\t\t\tif($number == 0){\n\t\t\t\t\t\n\t\t\t\t\t//Set flag and title\n\t\t\t\t\t$flag \t= TRUE;\n\t\t\t\t\t$name \t= $name . \"-\" . $cnt;\n\t\t\t\t\n\t\t\t\t//Matches, so increment to check the next number...\n\t\t\t\t} else {\n\t\t\t\t\t$cnt++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t//Output the title\n\t\treturn $name;\n\t\t\n\t}", "title": "" }, { "docid": "5e892b6d92374488eaf3b6bd534e785a", "score": "0.65807265", "text": "public function unique_slug($str, $i = 0) {\n if($i == 0) {\n $this->db->where('slug', $str);\n } else {\n $this->db->where('slug', $str.'_'.$i);\n }\n\n if(count($this->quiz_m->get())) {\n $this->unique_slug($str, $i+=1); \n } else {\n $url = ($i == 0)? $str : $str.'_'.$i;\n return $url;\n }\n }", "title": "" }, { "docid": "a45dbb6012abfc7ca08defb6205b8eb5", "score": "0.65227276", "text": "public function slug(){\n\t\t$hashids = $this->getHashids();\n\t\t$this->slugId = $hashids->encode($this->{$this->getKeyName()});\n\n\t\treturn $this->slugId;\n\t}", "title": "" }, { "docid": "587603498e53100d3fb1fec2a91c3ab0", "score": "0.63868445", "text": "public function setup_slug() {\n $newsCategories = $this->NewsCategory->find('all', array('recursive' => 0));\n //debug($newsCategories);\n $ok = 0;\n $fail = 0;\n \n foreach ($newsCategories as $newsCategory) {\n //debug($newsCategory);\n $newsCategory['NewsCategory']['slug'] = '';\n $newsCategory_id = $newsCategory['NewsCategory']['id'];\n \n $this->NewsCategory->id = $newsCategory_id;\n \n if($this->NewsCategory->save($newsCategory)) {\n $ok++;\n } else {\n $fail++;\n }\n echo 'ok:' . $ok . ' fail:' . $fail . '<br/>';\n }\n $this->render(false); \n }", "title": "" }, { "docid": "14142ea43ae89a37e809feb5eb1246a8", "score": "0.6362814", "text": "public function slug()\n {\n $timestamp = base_convert(substr(microtime(true) * 1000, 0, 13), 10, self::BASE);\n $counter = substr(base_convert((int) $this->safeCounter(), 10, self::BASE), -4);\n $fingerprint = substr($this->fingerprint(), 0, 1).substr($this->fingerprint(), -1);\n $random = substr($this->randomBlock(), -2);\n\n return (substr($timestamp, -2).$counter.$fingerprint.$random);\n }", "title": "" }, { "docid": "e813aa7fbe7fc5de4457972119150ac3", "score": "0.6300179", "text": "public function initializeSlug(){\n if (empty($this->slug)) {\n $slugify = new Slugify();\n $this->slug = $slugify->slugify($this->poste.''.$this->entreprise->getId());\n }\n }", "title": "" }, { "docid": "a6baf51bec8601a8cbb61072167faa74", "score": "0.6299022", "text": "function fix_unique_url_title()\n\t{\n\t\tglobal $IN, $DB, $REGX;\n\n\t\t$entry_id = $IN->GBL('entry_id');\n\t\t$weblog_id = $IN->GBL('weblog_id');\n\t\t$url_title = $IN->GBL('url_title');\n\t\t$sql_entry = '';\n\n\t\tif (!$url_title) return;\n\n\t\tif ($entry_id != '')\n\t\t{\n\t\t\t$sql_entry = \"AND entry_id != '{$entry_id}'\";\n\t\t\t$url_query = $DB->query(\"SELECT url_title FROM exp_weblog_titles WHERE entry_id = '{$entry_id}'\");\n\n\t\t\tif ($url_query->row['url_title'] != $url_title)\n\t\t\t{\n\t\t\t\t$url_title = $REGX->create_url_title($url_title);\n\t\t\t\t// and remove possible digit from the end\n\t\t\t\t$url_title = preg_replace('/([^_\\-])(\\d+)?$/','$1',$url_title);\n\t\t\t}\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$url_title = $REGX->create_url_title($url_title);\n\t\t}\n\n\t\t// Is the url_title a pure number? Let the main code handle it.\n\t\tif (is_numeric($url_title)) return;\n\n\t\t// Is the URL Title empty? Let the main code handle it.\n\t\tif (trim($url_title) == '') return;\n\t\n\t\t/** ---------------------------------\n\t\t/**\tIs URL title unique?\n\t\t/** ---------------------------------*/\n\n\t\t$sql = \"SELECT url_title FROM exp_weblog_titles WHERE url_title REGEXP '^{$url_title}[[:digit:]]+$' AND weblog_id = '{$weblog_id}' {$sql_entry} ORDER BY entry_id ASC\";\n\t\t$query = $DB->query($sql);\n\t\t$titles = array();\n\t\tforeach($query->result AS $row)\n\t\t{\n\t\t\t$titles[] = $row['url_title'];\n\t\t}\n\t\n\t\t// nothing found? No problem!\n\t\tif (!count($titles)) return;\n\n\t\t$unique = FALSE;\n\t\t$i = count($titles);\n\n\t\twhile ($unique == FALSE)\n\t\t{\n\t\t\t$temp = ($i == 0) ? $url_title : $url_title.$i;\n\t\t\t$i++;\n\t\t\n\t\t\tif (!in_array($temp, $titles)) // BINGO!\n\t\t\t{\n\t\t\t\t$_POST['url_title'] = $temp;\n\t\t\t\t$unique = TRUE;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5c44df3902adf3f321f8990c414cc329", "score": "0.62377024", "text": "static function get_unique_slug( $slug, $type, $id = 0 )\n {\n global $wpdb;\n\n $slug = stripslashes($slug);\n $retval = $slug;\n\n // We have to create a somewhat complex query to find the next available slug. The query could easily\n // be simplified if we could use MySQL REGEX, but there are still hosts using MySQL 5.0, and REGEX is\n // only supported in MySQL 5.1 and higher\n $field = '';\n $table = '';\n switch ($type) {\n case 'image':\n $field = 'image_slug';\n $table = $wpdb->nggpictures;\n break;\n case 'album':\n $field = 'slug';\n $table = $wpdb->nggalbum;\n break;\n case 'gallery':\n $field = 'slug';\n $table = $wpdb->nggallery;\n break;\n }\n\n // Generate SQL query\n $query = array();\n $query[] = \"SELECT {$field}, SUBSTR({$field}, %d) AS 'i' FROM {$table}\";\n $query[] = \"WHERE ({$field} LIKE %s AND CONVERT(SUBSTR({$field}, %d), SIGNED) BETWEEN 1 AND %d) OR {$field} = %s\";\n $query[] = \"ORDER BY CAST(i AS SIGNED INTEGER) DESC LIMIT 1\";\n $query = $wpdb->prepare(implode(\" \", $query), strlen(\"{$slug}-\")+1, $wpdb->esc_like(\"{$slug}-\") . '%', strlen(\"{$slug}-\")+1, PHP_INT_MAX, $slug);\n\n // If the above query returns a result, it means that the slug is already taken\n if (($last_slug = $wpdb->get_var($query))) {\n\n // If the last known slug has an integer attached, then it means that we need to increment that integer\n $quoted_slug = preg_quote($slug, '/');\n if (preg_match(\"/{$quoted_slug}-(\\\\d+)/\", $last_slug, $matches)) {\n $i = intval($matches[1]) + 1;\n $retval = \"{$slug}-{$i}\";\n }\n else $retval = \"{$slug}-1\";\n }\n\n return $retval;\n }", "title": "" }, { "docid": "a606d01abe787d4ca33b264caa6b3792", "score": "0.62134266", "text": "public function _unique_slug($str)\n {\n // UNLESS it's the slug for the current news\n \n $id = $this->uri->segment(4);\n $this->db->where('slug', $this->input->post('slug'));\n !$id || $this->db->where('id !=', $id);\n \n $news = $this->news_model->get();\n \n if(count($news))\n {\n $this->form_validation->set_message('_unique_slug', '%s should be unique');\n return FALSE;\n }\n \n return TRUE;\n }", "title": "" }, { "docid": "2f15807f64554fb68a224cb3ee9c464a", "score": "0.621162", "text": "public function generateIdSlug()\n {\n $this->setSlugValue(Slug::fromId($this->getKey()));\n }", "title": "" }, { "docid": "ab6ffc3d557dc7174170662c7fdef58d", "score": "0.6141819", "text": "public function incrementSlug($slug){\n $max = static::whereTitle($this->title)->latest('id')->skip(1)->value('slug');\n\n if (is_numeric($max[-1])) {\n return pred_replace_callback('/(\\d+)$/', function ($mathces) {\n return $mathces[1] + 1;\n }, $max);\n }\n\n return \"{$slug}-2\";\n }", "title": "" }, { "docid": "f7a498e9808ce17108af4d561038b4fe", "score": "0.61293525", "text": "public function _unique_slug($str)\n {\n // UNLESS it's the slug for the current page\n \n $id = $this->uri->segment(4);\n $this->db->where('slug', $this->input->post('slug'));\n !$id || $this->db->where('id !=', $id);\n \n $page = $this->qa_m->get();\n \n if(sw_count($page))\n {\n $this->form_validation->set_message('_unique_slug', '%s should be unique');\n return FALSE;\n }\n \n return TRUE;\n }", "title": "" }, { "docid": "7b890ea357f102a99de263d249f2cbd2", "score": "0.6120127", "text": "public static function unique_slug( $slug ) {\n\t\tglobal $db;\n\n\t\t$current_user_id = User_Manager::get_current_user()->ID;\n\t\t$check_sql = \"SELECT `gallery_slug` FROM $db->galleries WHERE `gallery_slug` = %s AND `user_id` = %d LIMIT 1\";\n\n\t\t$slug_check = $db->get_field( $db->prepare( $check_sql, array( $slug, $current_user_id ) ) );\n\n\t\tif ( $slug_check ) {\n\t\t\t/*\n\t\t\t * Slugs exists, append a suffix and check again\n\t\t\t * until we find an unique slug.\n\t\t\t */\n\t\t\t$suffix = 2; // Start with suffix = 2 because there is already one gallery with the same slug\n\t\t\tdo {\n\t\t\t\t$alt_slug = $slug . '-' . $suffix;\n\t\t\t\t$slug_check = $db->get_field( $db->prepare( $check_sql, array( $alt_slug, $current_user_id ) ) );\n\t\t\t\t$suffix = $suffix + 1;\n\t\t\t} while ( $slug_check );\n\n\t\t\t// Unique slug found\n\t\t\t$slug = $alt_slug;\n\t\t}\n\n\t\treturn $slug;\n\t}", "title": "" }, { "docid": "947395d23445e9951662d891568aef31", "score": "0.6074029", "text": "public function checkIfSlugIsUnique( $slug )\n {\n $i = 0;\n $this->base_slug = $slug;\n\n while( $this->post->whereSlug( $slug )->get()->count() > 0 )\n {\n $i++;\n $slug = $this->base_slug . '-' . $i;\n }\n\n return $slug;\n }", "title": "" }, { "docid": "162fb3ad21289d3abd0e97fd530d30a2", "score": "0.6070182", "text": "function _slug($sname) {\n $sector = ($sname) ? $sname : '';\n\n $replace_array = array('.', '*', '/', '\\\\', '\"', '\\'', ',', '{', '}', '[', ']', '(', ')', '~', '`');\n\n $slug = $sector;\n $slug = trim($slug);\n $slug = str_replace($replace_array, \"\", $slug);\n //.,*,/,\\,\",',,,{,(,},)[,]\n $slug = url_title($slug, 'dash', true);\n\n $this->db->limit(1);\n $this->db->where('package_uri_alias', $slug);\n $rs = $this->db->get('package');\n if ($rs->num_rows() > 0) {\n $suffix = 2;\n do {\n $slug_check = false;\n $alt_slug = substr($slug, 0, 200 - (strlen($suffix) + 1)) . \"-$suffix\";\n $this->db->limit(1);\n $this->db->where('package_uri_alias', $alt_slug);\n $rs = $this->db->get('package');\n if ($rs->num_rows() > 0)\n $slug_check = true;\n $suffix++;\n }while ($slug_check);\n $slug = $alt_slug;\n }\n return $slug;\n }", "title": "" }, { "docid": "8419a6c21166b717bb8c859addadb5b7", "score": "0.6038623", "text": "public function _unique_slug($str)\n {\n // UNLESS it's the slug for the current page\n \n $id = $this->uri->segment(4);\n $this->db->where('slug', $this->input->post('slug'));\n !$id || $this->db->where('id !=', $id);\n \n $page = $this->page_m->get();\n \n if(count($page))\n {\n $this->form_validation->set_message('_unique_slug', '%s should be unique');\n return FALSE;\n }\n \n return TRUE;\n }", "title": "" }, { "docid": "3129b4804e0980f740045709b341e16d", "score": "0.6036957", "text": "public function slugify() {\n $text = preg_replace('~[^\\pL\\d]+~u', '-', $this->titre);\n\n // transliterate\n $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n\n // remove unwanted characters\n $text = preg_replace('~[^-\\w]+~', '', $text);\n\n // trim\n $text = trim($text, '-');\n\n // remove duplicate -\n $text = preg_replace('~-+~', '-', $text);\n\n // lowercase\n $text = strtolower($text);\n\n if (empty($text)) {\n return 'n-a';\n }\n\n $this->slug = $text;\n }", "title": "" }, { "docid": "8d8ab16620de589b5166a1a5f13b369e", "score": "0.6015899", "text": "protected function makeSlugUnique($slug)\n {\n $config = $this->getSluggableConfig();\n if (!$config['unique']) {\n return $slug;\n }\n\n $separator = $config['separator'];\n\n // find all models where the slug is like the current one\n $list = $this->getExistingSlugs($slug);\n\n // if ...\n // \ta) the list is empty\n // \tb) our slug isn't in the list\n // \tc) our slug is in the list and it's for our model\n // ... we are okay\n if (\n count($list) === 0 ||\n !in_array($slug, $list) ||\n (array_key_exists($this->getKey(),\n $list) && $list[$this->getKey()] === $slug)\n ) {\n return $slug;\n }\n\n $suffix = $this->generateSuffix($slug, $list);\n\n return $slug . $separator . $suffix;\n }", "title": "" }, { "docid": "4652b7303f581c51296e71e7ed223733", "score": "0.60151416", "text": "public function _unique_slug($str)\n {\n // unless it's the slug for the current page\n $id = $this->uri->segment(4);\n $this->db->where('slug', $this->input->post('slug'));\n !$id || $this->db->where('id !=', $id);\n $page = $this->menucat_m->get();\n\n if(count($page))\n {\n $this->form_validation->set_message('_unique_slug', '%s should be unique');\n return FALSE;\n }\n\n return TRUE;\n }", "title": "" }, { "docid": "42190fd8ed53912e0088900560e6047e", "score": "0.59703964", "text": "public function makeSlug($posts, $title)\n\t{\n\t\t// todo remove any disallowed chars\n\t\t$slug = strtolower($title);\n\t\t$slug = str_replace(' ', '-', $slug);\n\n\t\t// check if slug already exsists, if it does append a number to it\n\t\t$duplicateValue = 0;\n\n\t\tif ( count($posts) > 0 && $posts != null)\n\t\t{\n\t\t\tforeach ($posts as $key => $post) {\n\t\t\t\tif ($post->slug == $slug)\n\t\t\t\t\t$duplicateValue++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($duplicateValue > 0)\n\t\t\t$slug = $slug.'-'.$duplicateValue;\n\n\t\treturn $slug;\n\t}", "title": "" }, { "docid": "8fe1b3f9aea63d45dd4b43685babef3a", "score": "0.59660506", "text": "public function _unique_slug($str)\n {\n // UNLESS it's the slug for the current categories\n \n $id = $this->uri->segment(4);\n $this->db->where('slug', $this->input->post('code'));\n !$id || $this->db->where('id !=', $id); \n $categories = $this->comman_model->get('products',false); \n\t//\techo $this->db->last_query();die;\n if(count($categories))\n {\n $this->form_validation->set_message('_unique_slug', '%s should be unique');\n return FALSE;\n }\n \n return TRUE;\n }", "title": "" }, { "docid": "c20961a3999adb683241abeaea80e2ee", "score": "0.5965683", "text": "private function _generateEntrySlug(EntryModel $entry)\n\t{\n\t\t$slug = ($entry->slug ? $entry->slug : $entry->title);\n\n\t\t// Remove HTML tags\n\t\t$slug = preg_replace('/<(.*?)>/', '', $slug);\n\n\t\t// Remove apostrophes\n\t\t$slug = str_replace(array('\\'', '’'), array('', ''), $slug);\n\n\t\t// Make it lowercase\n\t\t$slug = strtolower($slug);\n\n\t\t// Convert extended ASCII characters to basic ASCII\n\t\t$slug = StringHelper::asciiString($slug);\n\n\t\t// Slug must start and end with alphanumeric characters\n\t\t$slug = preg_replace('/^[^a-z0-9]+/', '', $slug);\n\t\t$slug = preg_replace('/[^a-z0-9]+$/', '', $slug);\n\n\t\t// Get the \"words\"\n\t\t$slug = implode('-', array_filter(preg_split('/[^a-z0-9]+/', $slug)));\n\n\t\tif ($slug)\n\t\t{\n\t\t\t// Make it unique\n\t\t\t$conditions = array('and', 'sectionId = :sectionId', 'locale = :locale', 'slug = :slug');\n\t\t\t$params = array(':sectionId' => $entry->sectionId, ':locale' => $entry->locale);\n\n\t\t\tif ($entry->id)\n\t\t\t{\n\t\t\t\t$conditions[] = 'id != :entryId';\n\t\t\t\t$params[':entryId'] = $entry->id;\n\t\t\t}\n\n\t\t\tfor ($i = 0; true; $i++)\n\t\t\t{\n\t\t\t\t$testSlug = $slug.($i != 0 ? \"-{$i}\" : '');\n\t\t\t\t$params[':slug'] = $testSlug;\n\n\t\t\t\t$totalEntries = craft()->db->createCommand()\n\t\t\t\t\t->select('count(id)')\n\t\t\t\t\t->from('entries_i18n')\n\t\t\t\t\t->where($conditions, $params)\n\t\t\t\t\t->queryScalar();\n\n\t\t\t\tif ($totalEntries == 0)\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$entry->slug = $testSlug;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$entry->slug = '';\n\t\t}\n\t}", "title": "" }, { "docid": "230b9a9fefbc8e4cb8e6ca077a4e72e7", "score": "0.5923885", "text": "function theSlug( $id )\r\n\t\t{\r\n\t\t\t$STH = $this->DBH->query('SELECT slug from shdw_products WHERE id ='. $id ); \r\n\t\t\t# Get results by row\r\n\t\t\twhile( $row = $STH->fetch() )\r\n\t\t\t\t$this->slug= $row['slug'];\t\r\n\t\t\t\r\n\t\t\treturn SITE_URL . $this->slug;\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "448d4b3690abc3dce1f1b051b8130ac6", "score": "0.592087", "text": "function getUniqueSlug(\\Illuminate\\Database\\Eloquent\\Model $model, $value, $existing_id = null)\n {\n\n // $slug = \\Illuminate\\Support\\Str::slug($value);\n $slug = url_slug($value);\n// dd($slug);\n\n $req_lang = request()->language_id;\n//dd($existing_id);\n if(isset($existing_id)){\n $lang = $model->where('id', $existing_id)->first()['language_id'];\n// dd($lang);\n $slugCount = count($model->whereRaw(\"slug REGEXP '^{$slug}(-[0-9]+)?$' and id != '{$existing_id}' and language_id = '{$lang}'\")->get());\n// dd('set', $lang, $slugCount);\n }else{\n $slugCount = count($model->whereRaw(\"slug REGEXP '^{$slug}(-[0-9]+)?$' and id != '{$model->id}' and language_id = '{$req_lang}' \")->get());\n// dd('notset', $slugCount, $req_lang);\n }\n// dd(($slugCount > 0) ? \"{$slug}-{$slugCount}\" : $slug);\n return ($slugCount > 0) ? \"{$slug}-{$slugCount}\" : $slug;\n }", "title": "" }, { "docid": "c4085810322ab991cf3e59981a7f6a06", "score": "0.59197944", "text": "public function getSlug();", "title": "" }, { "docid": "c4085810322ab991cf3e59981a7f6a06", "score": "0.59197944", "text": "public function getSlug();", "title": "" }, { "docid": "c4085810322ab991cf3e59981a7f6a06", "score": "0.59197944", "text": "public function getSlug();", "title": "" }, { "docid": "d0874f28c8bf1f780a9d1473427fed9d", "score": "0.5893196", "text": "public function get_slug();", "title": "" }, { "docid": "d0874f28c8bf1f780a9d1473427fed9d", "score": "0.5893196", "text": "public function get_slug();", "title": "" }, { "docid": "9fa08f3e50fa9934fbeac177ed81b18f", "score": "0.58820015", "text": "private function generateSlugByIncrementer($i)\n {\n if ($i == 0) $i = '';\n\n if ($this->created_at) {\n $date = date('m-d-Y', strtotime($this->created_at));\n } else {\n $date = date('m-d-Y');\n }\n\n return Str::slug(\"{$date} - {$this->title}\" . $i);\n }", "title": "" }, { "docid": "e03623b149137d9e8193c8ad9d190c93", "score": "0.5874836", "text": "protected function getSlug($row)\n\t{\n\t\t//return empty($row->slug) ? '' : $objname = preg_replace(\"/[^A-Za-z0-9]/\", \"-\", $row->slug);\n\t\t// $$$ hugh - slug doesn't always exist??\n\t\tif (!isset($row->slug)) {\n\t\t\treturn '';\n\t\t}\n\t\t$row->slug = str_replace(\":\", '-', $row->slug);\n\t\t$row->slug = JApplication::stringURLSafe($row->slug);\n\t\treturn $row->slug;\n\t}", "title": "" }, { "docid": "77e9a3b66d5ccb2aeb452e33cad793de", "score": "0.5858435", "text": "private function __getNextSlug(Model $Model) {\r\n\t\t$new = '';\r\n\t\t$prev = $Model->find('first', array(\r\n\t\t\t'contain' => array(),\r\n\t\t\t'fields' => array(\"{$Model->alias}.{$Model->tinySlug}\", \"{$Model->alias}.created\"),\r\n\t\t\t'order' => \"{$Model->alias}.{$this->settings[$Model->alias]['orderField']} DESC\"));\r\n\r\n\t\tif (empty($prev)) {\r\n\t\t\t$new = $this->settings[$Model->alias]['codeset'][0];\r\n\t\t} else {\r\n\t\t\t$new = $this->__toShort($Model, (string) $this->__toDecimal($Model, $prev[$Model->alias][$Model->tinySlug]) + 1);\r\n\t\t\t$attempts = 0;\r\n\t\t\t$maxAttempts = 5; // Overriden after the first attempt\r\n\t\t\t$new = $prev[$Model->alias][$Model->tinySlug];\r\n\r\n\t\t\t// Check if this slug does not already exists\r\n\t\t\tdo {\r\n\t\t\t\tif ($attempts == 1) {\r\n\t\t\t\t\t$maxAttempts = $Model->find('count', array(\r\n\t\t\t\t\t\t'conditions' => array(\r\n\t\t\t\t\t\t\t$Model->alias . '.created' => $prev[$Model->alias]['created'])));\r\n\t\t\t\t}\r\n\t\t\t\t$new = $this->__toShort($Model, $this->__toDecimal($Model, $new) + 1);\r\n\t\t\t\t$existing = $Model->find('count', array(\r\n\t\t\t\t\t'conditions' => array(\r\n\t\t\t\t\t\t$Model->alias . '.' . $Model->tinySlug => $new)));\r\n\t\t\t\t$attempts++;\r\n\t\t\t} while (!empty($existing) && $attempts < $maxAttempts);\r\n\t\t}\r\n\t\treturn $new;\r\n\t}", "title": "" }, { "docid": "0bc8840ed96130729cd212e1d1e48880", "score": "0.58360255", "text": "public function slugStrategy()\n {\n return 'id';\n }", "title": "" }, { "docid": "42608d32600dda935f3b5a4098af1fcf", "score": "0.58289456", "text": "function gen_slug($url)\n\t{\n\t\t//prepare string with basic normalization\n\t\t$url = strtolower($url);\n\t\t$url = strip_tags($url);\n\t\t$url = stripslashes($url);\n\t\t$url = html_entity_decode($url);\n\n\t\t//Remove any quotes\n\t\t$url = str_replace('\\\"','',$url);\n\n\t\t//Replace non-alpha chars with '-'\n\t\t$match = '/[^a-z0-9]+/';\n\t\t$replace = '-';\n\t\t$url = preg_replace($match, $replace, $url);\n\t\t$url = trim($url, '-');\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "91c02715c363f74f795448b296df20ef", "score": "0.58248484", "text": "public function initializeSlug()\n {\n if(empty($this->slug))\n {\n $slugify = new Slugify;\n $this->slug = $slugify->slugify($this->departure.'-'.$this->arrival);\n }\n }", "title": "" }, { "docid": "af9bc315b192feda69ee98bce3e103d4", "score": "0.58195347", "text": "function wsu_redirect_publication_id() {\n\t/* @var WPDB $wpdb */\n\tglobal $wpdb;\n\n\tif ( ! isset( $_SERVER['HTTP_HOST'] ) ) {\n\t\treturn;\n\t}\n\n //pattern: \n //http://news.wsu.edu/pages/publications.asp?Action=Detail&PublicationID=36331&TypeID=1\n\tif ( isset( $_GET['PublicationID'] ) && isset( $_GET['Action'] ) && 'Detail' === $_GET['Action'] && 0 !== absint( $_GET['PublicationID'] ) ) {\n\t\t$publication_id = absint( $_GET['PublicationID'] );\n\t\t$post_id = $wpdb->get_var( $wpdb->prepare( \"SELECT post_id FROM wp_postmeta WHERE meta_key = '_publication_id' AND meta_value = %s\", $publication_id ) );\n\t\tif ( 0 !== absint( $post_id ) ) {\n\t\t\twp_safe_redirect( get_permalink( $post_id ), 301 );\n\t\t\texit;\n\t\t}\n\t}\n\n //pattern: \n //http://news.wsu.edu/articles/36828/1/New-cyber-security-firm-protects-Seattle-businesses\n $actual_link = \"http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]\";\n \n\tif ( strpos( $actual_link,'/articles/')>-1 ) {\n $urlparts = explode('/',$actual_link);\n\t\t$publication_id = absint( $urlparts[4] );\n\t\t$post_id = $wpdb->get_var( $wpdb->prepare( \"SELECT post_id FROM wp_postmeta WHERE meta_key = '_publication_id' AND meta_value = %s\", $publication_id ) );\n\t\tif ( 0 !== absint( $post_id ) ) {\n\t\t\twp_safe_redirect( get_permalink( $post_id ), 301 );\n\t\t\texit;\n\t\t}\n\t} \n\n\treturn;\n}", "title": "" }, { "docid": "c86ab53d0164b8f25d0ea7275760f5c5", "score": "0.581664", "text": "public function findSlug($slug) {\n\n $this->db->where('slug', $slug);\n $subt = $this->db->get('subtemas');\n\n if($subt->num_rows() > 0) {\n $slug = $slug . '-' . rand(0,20);\n }\n\n return $slug;\n }", "title": "" }, { "docid": "7cae2fbf99eb756f17e026078712b4b0", "score": "0.5802951", "text": "public function formatSlug($value)\n {\n $slug = $value ? str_slug($value) : '';\n\n if ($slug) {\n $other_slugs = self::withoutGlobalScopes()\n ->where('slug', 'like', $slug . '%')\n ->where('id', '!=', $this->id)\n ->get();\n } else {\n $other_slugs = self::withoutGlobalScopes()\n ->whereNull('slug')\n ->where('id', '!=', $this->id)\n ->get();\n }\n\n if ($other_slugs->count() >= 1) {\n $slug = $slug . '-' . ($other_slugs->count() + 1);\n }\n\n return $slug;\n }", "title": "" }, { "docid": "b9ccce03e5c0f06318705a071df4c02d", "score": "0.5758607", "text": "function short_url($url){\n $randomNumber = rand(3,7);\n $shorturl = getRandomSlug($randomNumber);\n\n include '../config.php';\n\n $conn = new mysqli($servername,$username,$password,$dbname);\n if($conn -> connect_error){\n die(\"Conn failed\");\n }\n\n \n// making secured query string\n$url = mysqli_real_escape_string($conn, $url);\n$shorturl = mysqli_real_escape_string($conn, $shorturl);\n\n $sql = \"SELECT * FROM urls WHERE shorturl='$shorturl'\";\n\n // if any results found\n // change the shorturl\n if ($result = mysqli_query($conn,$sql)) {\n $shorturl .= getRandomSlug(1);\n $sql = \"SELECT * FROM urls WHERE shorturl='$shorturl'\";\n if ($result = mysqli_query($conn,$sql)) {\n $shorturl .= getRandomSlug(1);\n }\n }\n\n $sql = \"INSERT INTO urls(url, shorturl, created_at) VALUES('$url', '$shorturl', now())\";\n\n if($conn->query($sql)===TRUE){\n // created successfully\n }\n\n else{\n echo 'Error';\n }\n\n $conn -> close();\n\n return $shorturl;\n\n\n}", "title": "" }, { "docid": "428ebc9d824368c720c679c5ec60e246", "score": "0.5757481", "text": "public function slug($slug, $tableName) {\n $slug = strtolower($slug);\n $slug = strip_tags($slug);\n $slug = stripslashes($slug);\n $slug = html_entity_decode($slug);\n\n # Remove quotes (can't, etc.)\n $slug = str_replace('\\'', '', $slug);\n\n # Replace non-alpha numeric with hyphens\n $match = '/[^a-z0-9]+/';\n $replace = '-';\n $slug = preg_replace($match, $replace, $slug);\n\n $slug = trim($slug, '-');\n $firstSlug = $slug;\n\n\n $i = 0;\n while (true) {\n if ($this->databaseoperations->uniqueSlug($slug, $tableName) == false) {\n return $slug;\n break;\n } else {\n $slug = $firstSlug . \"-\" . $i;\n //$slug = $this->slugFreeUrl($slug);\n }\n $i++;\n }\n }", "title": "" }, { "docid": "7c1364305cfac4e3791df5fa375af3a7", "score": "0.5754728", "text": "private function makeSlug($bean, $property_name, $slug_string) {\n\t\t$string = $this->neatTrim( $slug_string, 100 ); // Maximum of 100 characters with complete words\n\t\t$slug = $this->slugify( $string );\n\t\tif ( $this->uniqueSlug( $bean, $property_name, $slug ) ) {\n\t\t\treturn $slug;\n\t\t} else {\n\t\t\t// Create slug with uniqid() and check again\n\t\t\treturn $this->makeSlug( $bean, $property_name, $slug . '-' . uniqid() );\n\t\t}\n\t}", "title": "" }, { "docid": "7114906bca4d5877dfcacfcc7040df21", "score": "0.57470495", "text": "function _acf_apply_unique_field_slug( $slug, $post_ID, $post_status, $post_type, $post_parent, $original_slug ) {\n}", "title": "" }, { "docid": "2a79b78f172f6566fb1bc0fc17b8dfcb", "score": "0.5738123", "text": "public function generateSlug($name);", "title": "" }, { "docid": "8e3e680fa61ec3abfbc452d4e6f69c3f", "score": "0.57372797", "text": "function get_valid_slug($slug , $id = NULL)\n\t{\t\n\t\t$counter = 0;\n\t\t$mySlug = $slug;\n\t\tif(!empty($id))\n\t\t{\n\t\t\t$options['conditions']['Entry.id <>'] = $id;\n\t\t}\n\t\twhile(TRUE)\n\t\t{\n\t\t\t$options['conditions']['Entry.slug'] = $mySlug;\n\t\t\t$findSlug = $this->find('first' , $options);\n\t\t\tif(empty($findSlug))\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$mySlug = $slug.'-'.(++$counter);\n\t\t\t}\n\t\t}\n\t\treturn $mySlug;\n\t}", "title": "" }, { "docid": "9b13f7fdfc6bd82b2934698e02b3dd36", "score": "0.5706871", "text": "protected function generateUniqueKey($title) {\n\n //Получим обьект строки для заголовка\n $oTitle = new Default_Plugin_String($title);\n //Преобразуем заголовок сообщения к нижнему регистру\n $oTitle = $oTitle->toLower()->translit();\n\n // Преобразуем заголовок сообщения в транслит.\n $url = strval($oTitle);\n\n\n $filters = array(\n // replace & with 'and' for readability\n '/&+/' => 'and',\n // replace non-alphanumeric characters with a hyphen\n '/[^a-z0-9]+/i' => '-',\n // replace multiple hyphens with a single hyphen\n '/-+/' => '-'\n );\n\n\n // apply each replacement\n foreach ($filters as $regex => $replacement)\n $url = preg_replace($regex, $replacement, $url);\n\n // remove hyphens from the start and end of string\n $url = trim($url, '-');\n\n // restrict the length of the URL\n $url = trim(substr($url, 0, 255));\n\n // set a default value just in case\n if (strlen($url) == 0)\n $url = 'post';\n\n\n // find similar URLs\n $query = sprintf(\"select info_key from %s where info_key like ?\", $this->_table);\n\n $query = $this->_db->quoteInto($query, $url . '%');\n $result = $this->_db->fetchCol($query);\n\n\n // if no matching URLs then return the current URL\n if (count($result) == 0 || !in_array($url, $result))\n return $url;\n\n // generate a unique URL\n $i = 2;\n do {\n $_url = $url . '-' . $i++;\n } while (in_array($_url, $result));\n\n return $_url;\n }", "title": "" }, { "docid": "431d732d88143dfa7cbb1f3869838e3a", "score": "0.5687616", "text": "private function ValidSlug($slug = '')\n\t{\t$rawslug = $slug = str_replace(' ', '_', preg_replace(\"/[^a-z0-9 ]/\", \"\", strtolower($slug)));\n\t\twhile ($this->SlugExists($slug))\n\t\t{\t$slug = $rawslug . ++$count;\n\t\t}\n\t\treturn $slug;\n\t}", "title": "" }, { "docid": "1e7a06069906df183d2388b3b060bbbf", "score": "0.5674969", "text": "public function updateSlug()\n {\n $this->slug = (new Slugify())->slugify($this->title);\n }", "title": "" }, { "docid": "9fe26e8bb902daf8eeec59178360ffb0", "score": "0.5674726", "text": "public function slugify()\n {\n $slugify = new Cocur\\Slugify\\Slugify();\n $this->slug = $slugify->slugify($this->nombre);\n }", "title": "" }, { "docid": "34a0bd20ffd0b3e51eeef4eaff8295c3", "score": "0.56736606", "text": "protected function makeSlugUnique($slug, $separator = '_', $alreadyExists = false)\n {\n if (!$alreadyExists) {\n $slug2 = $slug;\n } else {\n $slug2 = $slug . $separator;\n }\n\n $query = PrincipalQuery::create('q')\n ->where('q.NameSlug ' . ($alreadyExists ? 'REGEXP' : '=') . ' ?', $alreadyExists ? '^' . $slug2 . '[0-9]+$' : $slug2)->prune($this)\n ;\n\n if (!$alreadyExists) {\n $count = $query->count();\n if ($count > 0) {\n return $this->makeSlugUnique($slug, $separator, true);\n }\n\n return $slug2;\n }\n\n // Already exists\n $object = $query\n ->addDescendingOrderByColumn('LENGTH(name_slug)')\n ->addDescendingOrderByColumn('name_slug')\n ->findOne();\n\n // First duplicate slug\n if (null == $object) {\n return $slug2 . '1';\n }\n\n $slugNum = substr($object->getNameSlug(), strlen($slug) + 1);\n if ('0' === $slugNum[0]) {\n $slugNum[0] = 1;\n }\n\n return $slug2 . ($slugNum + 1);\n }", "title": "" }, { "docid": "71e5ebf8c1ed9aae9bd5f5419845cd62", "score": "0.5673297", "text": "function buildFriendlyUrl($title, $itemid)\r\n\t{\r\n\t\tglobal $DIR_PLUGINS;\r\n\r\n\t\tif(!empty($title))\r\n\t\t{\r\n\t\t\t$title = strip_tags($title);\r\n\t\t\t$title = str_replace('8220', '', $title);\r\n\t\t\t$title = str_replace('8221', '', $title);\r\n\r\n\t\t\t// includes the string manipulation class\r\n\t\t\trequire_once $DIR_PLUGINS . 'urlcontroller/UrlControllerStrings.php';\r\n\t\t\t$title = UrlControllerStrings::convertSpecialChars($title);\r\n\t\t\t$title = UrlControllerStrings::replaceRepeatedChars($title, '--', '-');\r\n\r\n\t\t\t$title = trim($title, \"\\x00..\\x2F\");\r\n\t\t\t$title = substr($title, 0, 70);\r\n\t\t}\r\n\r\n\t\tif(empty($title))\r\n\t\t{\r\n\t\t\t$title = 'post-' . $itemid;\r\n\t\t}\r\n\r\n\t\t$result = sql_query('SELECT urlid FROM ' . $this->table . ' WHERE url = \\'' . $title . '\\' AND itemid != ' . $itemid . ' ORDER BY urlid DESC LIMIT 0,1');\r\n\t\t$urlid = 1;\r\n\t\tif (mysql_num_rows($result) > 0)\r\n\t\t{\r\n\t\t\twhile ($o = mysql_fetch_object($result))\r\n\t\t\t{\r\n\t\t\t\t$urlid = $o->urlid + 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// protected words for titles ('archive', by example)\r\n\t\t// this condition will be valid if this is the first ocurrence of the title,\r\n\t\t// so set it to 2. next time it will be find in the query above.\r\n\t\telseif(in_array($title, $this->getItemProtectedWords()))\r\n\t\t{\r\n\t\t\t$urlid = 2;\r\n\t\t}\r\n\r\n\t\treturn array('url' => $title, 'urlid' => $urlid);\r\n\t}", "title": "" }, { "docid": "884455630a836cbfc10ea02c69deb5a0", "score": "0.56669724", "text": "private function _validateUrlField () {\n if (empty($this->urlField)) {\n // If do not need to work with SEO:url, then skip further work\n return;\n }\n\n $model = $this->owner;\n\n // Add UNIQUE validator for SEO:url field\n $validator = Validator::createValidator(UniqueValidator::className(), $model,\n $this->urlField, [\n 'filter' => $this->uniqueUrlFilter\n ]);\n\n // If SEO: url is not filled by the user, then generate its value\n $urlFieldVal = trim((string) $model->{$this->urlField});\n if ($urlFieldVal === '') {\n $urlFieldVal = $this->_getProduceValue($this->urlProduceField);\n }\n // Transliterated string and remove from it the extra characters\n $seoUrl = $this->_getSeoName($urlFieldVal, $this->maxUrlLength, $this->toLowerSeoUrl);\n\n // If there is a match with banned names, then add to the url underbar\n // to the end\n while (in_array($seoUrl, $this->stopNames)) {\n $seoUrl .= '_';\n }\n\n $model->{$this->urlField} = $seoUrl;\n // Start the first unique validation\n $validator->validateAttribute($model, $this->urlField);\n\n // Run the validation of up to 50 times, until there is a unique SEO:url\n // name\n $i = 0;\n while ($model->hasErrors($this->urlField)) {\n // Remove the error message received in the last validation\n $model->clearErrors($this->urlField);\n\n // If failed 50 times, then something went wrong...\n if (++$i > 50) {\n // We establish SEO: url to a random hash\n $model->{$this->urlField} = md5(uniqid());\n // Finish \"infinite\" loop\n break;\n }\n\n // Add \"_\" at the end of SEO:url\n $newSeoUrl = $model->{$this->urlField} . '_';\n $model->{$this->urlField} = $newSeoUrl;\n // Run the validator again, because in the previous line, we changed\n // the value of adding a suffix\n $validator->validateAttribute($model, $this->urlField);\n }\n }", "title": "" }, { "docid": "ba687a62b858d8aa08f638c597ec4a85", "score": "0.56665665", "text": "public function standalone_settings_unique_slugs() {\n\n\t\t?>\n\t\t<div class=\"notice error below-h2\">\n\t\t\t<p><?php echo ( esc_html__( 'The gallery slug and album link must be unique.', 'envira-standalone' ) ); ?></p>\n\t\t</div>\n\t\t<?php\n\n\t}", "title": "" }, { "docid": "f3f94625f5d521e0d460402b2c4aa45d", "score": "0.5665075", "text": "public static function generateSlug($permalinkId, $string, $int = 1)\n {\n // Replace non letter or digits by -\n $slug = preg_replace('~[^\\pL\\d]+~u', '-', $string);\n // Convert special chars\n $pattern = array('é','è','ë','ê','É','È','Ë','Ê','á','à','ä','â','å','Á','À','Ä','Â','Å','ó','ò','ö','ô','Ó','Ò','Ö','Ô','í','ì','ï','î','Í','Ì','Ï','Î','ú','ù','ü','û','Ú','Ù','Ü','Û','ý','ÿ','Ý','ø','Ø','œ','Œ','Æ','ç','Ç');\n $replace = array('e','e','e','e','E','E','E','E','a','a','a','a','a','A','A','A','A','A','o','o','o','o','O','O','O','O','i','i','i','I','I','I','I','I','u','u','u','u','U','U','U','U','y','y','Y','o','O','a','A','A','c','C');\n $slug = str_replace($pattern, $replace, $slug);\n // Remove unwanted characters\n $slug = preg_replace('~[^-\\w]+~', '', $slug);\n // Trim\n $slug = trim($slug, '-');\n // Remove duplicate -\n $slug = preg_replace('~-+~', '-', $slug);\n // Lowercase\n $slug = strtolower($slug);\n\n if (empty($slug)) {\n return false;\n }\n\n if ($int > 1) {\n $slug = $slug . '-' . $int;\n }\n\n // If permalink name exists call self again to generate new name\n $exists = (bool) Permalink::where('slug', $slug)->where('id', '!=', $permalinkId)->first();\n if ($exists) {\n $int += 1;\n return self::generateSlug($permalinkId, $string, $int);\n }\n\n return $slug;\n }", "title": "" }, { "docid": "fcd37cca97c916e2dc85aa0dead8a2a7", "score": "0.566263", "text": "protected function createSlug()\n {\n $slug = $this->createRawSlug();\n $slug = $this->limitSlugSize($slug);\n $slug = $this->makeSlugUnique($slug);\n\n return $slug;\n }", "title": "" }, { "docid": "d0b020fd48bf9430a769d70d4682da05", "score": "0.5655007", "text": "public function get_slug($para1=NULL,$para2=DEFAULT_LANGUAGE,$para3=NULL,$para4=NULL)\r\r\r\n {\r\r\r\n $options = array('slug'=>$para1,'lang'=>switch_language($para2),'page'=>$para3,'html'=>$para4);\r\r\r\n \r\r\r\n if(isset($options['html'])){\r\r\r\n $slug = $this->slug_model->get_slug(array('slug'=>$options['slug'].SLUG_CHARACTER_URL,'onehit'=>TRUE));\r\r\r\n switch($slug->type){\r\r\r\n case SLUG_TYPE_NEWS:\r\r\r\n echo modules::run('news/get_news_detail',$slug->type_id,$options['lang']);\r\r\r\n break;\r\r\r\n case SLUG_TYPE_PRODUCTS:\r\r\r\n echo modules::run('products/get_products_detail',$slug->type_id,$options['lang']);\r\r\r\n break;\r\r\r\n case SLUG_TYPE_GALLERY:\r\r\r\n echo modules::run('gallery/get_gallery_detail',$slug->type_id,$options['lang']);\r\r\r\n break;\r\r\r\n case SLUG_TYPE_VIDEOS:\r\r\r\n echo modules::run('videos/get_videos_detail',$slug->type_id,$options['lang']);\r\r\r\n break;\r\r\r\n case SLUG_TYPE_FAQ:\r\r\r\n echo modules::run('faq/get_faq_detail',$slug->type_id,$options['lang']);\r\r\r\n break;\r\r\r\n case SLUG_TYPE_PAGES:\r\r\r\n echo modules::run('pages/page_detail',$options['lang']);\r\r\r\n break;\r\r\r\n// case SLUG_TYPE_DOWNLOAD:\r\r\r\n// break;\r\r\r\n }\r\r\r\n }else{\r\r\r\n $slug = $this->slug_model->get_slug(array('slug'=>$options['slug'],'onehit'=>TRUE));\r\r\r\n switch($slug->type){\r\r\r\n case SLUG_TYPE_NEWS_CATEGORIES:\r\r\r\n echo modules::run('news/get_list_news_by_cat',$slug->type_id, $options['page'], $options['lang']);\r\r\r\n break;\r\r\r\n case SLUG_TYPE_PRODUCTS_CATEGORIES:\r\r\r\n echo modules::run('products/get_list_products_by_cat',$slug->type_id, $options['page'], $options['lang']);\r\r\r\n break;\r\r\r\n case SLUG_TYPE_GALLERY_CATEGORIES:\r\r\r\n echo modules::run('gallery/get_list_gallery_by_cat',$slug->type_id, $options['page'], $options['lang']);\r\r\r\n break;\r\r\r\n case SLUG_TYPE_VIDEOS_CATEGORIES:\r\r\r\n echo modules::run('videos/get_list_videos_by_cat',$slug->type_id, $options['page'], $options['lang']);\r\r\r\n break;\r\r\r\n case SLUG_TYPE_FAQ_CATEGORIES:\r\r\r\n echo modules::run('faq/get_list_faq_by_cat',$slug->type_id, $options['page'], $options['lang']);\r\r\r\n break;\r\r\r\n// case SLUG_TYPE_PAGES_CATEGORIES:\r\r\r\n// break;\r\r\r\n case SLUG_TYPE_DOWNLOAD_CATEGORIES:\r\r\r\n echo modules::run('download/download_list',$slug->type_id, $options['page'], $options['lang']);\r\r\r\n break;\r\r\r\n }\r\r\r\n }\r\r\r\n \r\r\r\n }", "title": "" }, { "docid": "c18b2ff8847cd448e6a3c653810dc12c", "score": "0.5652598", "text": "protected function makeSlugUnique($occasion, $slug)\n {\n $list = Occasion::all()->pluck('slug', $occasion->getKeyName());\n\n $separator = '-';\n\n // If we have no slugs already, or the slug we want to\n // check is not present, then return it\n if(\n $list->count() === 0 ||\n $list->contains($slug) === FALSE\n ) {\n return $slug;\n }\n\n // If the slug is in the list, but it is of our own model,\n // then also just return it\n if ($list->has($occasion->getKey()))\n {\n $currentSlug = $list->get($occasion->getKey());\n\n if (\n $currentSlug === $slug ||\n strpos($currentSlug, $slug) === 0\n ) {\n return $currentSlug;\n }\n }\n\n // Add a suffix to the slug, e.g. '-1'\n $suffix = $this->generateSuffix($slug, $separator, $list, $occasion);\n\n return $slug . $separator . $suffix;\n }", "title": "" }, { "docid": "4038f67e1dd36e503b3fe13b22d1b929", "score": "0.565213", "text": "protected function generateUniqueSlug($baseSlug, $iteration)\n {\n $result = parent::generateUniqueSlug($baseSlug, $iteration);\n\n return str_replace('-','_', $result);\n }", "title": "" }, { "docid": "b44620d0c0900bed3cd0495872c4648f", "score": "0.5640048", "text": "public function legacy_slug()\n {\n // Get the page and attempt to 301 redirect\n /** @var \\Nails\\Common\\Service\\Uri $oUri */\n $oUri = Factory::service('Uri');\n $iId = (int) $oUri->rsegment(3);\n\n if ($iId) {\n $oPage = $this->oPageModel->getById($iId);\n if ($oPage && $oPage->is_published) {\n redirect($oPage->published->slug, 'location', 301);\n }\n }\n\n // --------------------------------------------------------------------------\n\n // We don't know what to do, *falls over*\n show404();\n }", "title": "" }, { "docid": "c936a3d08687d429d3ca7a08f2be6465", "score": "0.56264746", "text": "public function getIdentSlug()\n {\n $scheduleUrl = $this->getData('link');\n\n // Remove the Horaro hostname from the URL\n if (strpos($scheduleUrl, Horaro::HORARO_HOST) === 0) {\n $scheduleUrl = substr($scheduleUrl, strlen(Horaro::HORARO_HOST));\n }\n\n // Replace the slashes by dashes, as Fatboy Slim told us\n $scheduleIdentSlug = str_replace('/', '-', trim($scheduleUrl, '/'));\n\n return $scheduleIdentSlug;\n }", "title": "" }, { "docid": "faa6790c1f6475b3ccb2bf527198387a", "score": "0.5623129", "text": "abstract protected function getSlugString($data);", "title": "" }, { "docid": "2a3524853931e5303a528e0d1d9dfdbf", "score": "0.5611451", "text": "public function initializeSlug()\n {\n if (empty($this->slug)) {\n $slugify = new Slugify();\n $this->slug = $slugify->slugify($this->prenom . '_' . $this->nom);\n }\n }", "title": "" }, { "docid": "03792d07f2c67da7fd633de5bd0ce607", "score": "0.5600451", "text": "public function get_unique_slug($slug, $count=0, $productID=false)\n {\n if ($count>0) {\n \t\n $slug = $slug.'-'.$count;\n }\n \n //check to see if this exists in products\n $sql = 'SELECT * FROM '.PERCH_DB_PREFIX.'shop_products WHERE productSlug= '.$this->db->pdb($slug);\n \n if($productID) {\n \t$sql.= ' AND productID != '.$this->db->pdb($productID);\n }\n \n \n $row = $this->db->get_row($sql);\n \n if(is_array($row)) {\n $count++;\n return $this->get_unique_slug($slug, $count);\n }else{\n return $slug;\n }\n }", "title": "" }, { "docid": "fe5378c4bc5d058f49356f86fc06ac8d", "score": "0.5597016", "text": "public function initializeSlug() {\n if(empty($this->slug)){\n $slugify = new Slugify();\n $this->slug = $slugify->slugify($this->title);\n }\n }", "title": "" }, { "docid": "26ba0bb2108cb6e5edd717c99d84ba43", "score": "0.5590298", "text": "public function createSlug($data, array $unique = array())\n {\n $slug = sanitize_title($data);\n $next = 1;\n\n while (in_array($slug, $unique)) {\n $slug = sanitize_title($data . ' ' . $next++);\n }\n\n return $slug;\n }", "title": "" }, { "docid": "ac6f171c007ef0362f291ba0be474a53", "score": "0.5583721", "text": "public function initSlug()\n {\n if (empty($this->slug)) {\n $slugify = new Slugify();\n $this->slug = $slugify->slugify($this->title);\n }\n }", "title": "" }, { "docid": "e46186a95c498572a8bf36446a7a9e16", "score": "0.55801785", "text": "public function createSlug($title, $id = 0)\n {\n // Normalize the title\n $slug = str_slug($title);\n // Get any that could possibly be related.\n // This cuts the queries down by doing it once.\n $allSlugs = $this->getRelatedSlugs($slug, $id);\n // If we haven't used it before then we are all good.\n if (! $allSlugs->contains('url_key', $slug)){\n return $slug;\n }\n // Just append numbers like a savage until we find not used.\n for ($i = 1; $i <= 10; $i++) {\n $newSlug = $slug.'-'.$i;\n if (! $allSlugs->contains('url_key', $newSlug)) {\n return $newSlug;\n }\n }\n throw new \\Exception('Can not create a unique slug');\n }", "title": "" }, { "docid": "6b35472c08eed3767db0522354a543af", "score": "0.55565", "text": "public function initializeSlug()\n {\n if(empty($this->slug)){\n $slugify = new Slugify();\n $this->slug = $slugify->Slugify($this->title);\n }\n }", "title": "" }, { "docid": "0a67f900bfe7a2c874357b0a2e80ca60", "score": "0.5556374", "text": "function Slug($string) {\n $slug = strtolower(trim(preg_replace('~[^0-9a-z]+~i', '-', html_entity_decode(preg_replace('~&([a-z]{1,2})(?:acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml);~i', '$1', htmlentities($string, ENT_QUOTES, 'UTF-8')), ENT_QUOTES, 'UTF-8')), '-'));\n $slug_exists = slug_exist($slug);\n \n if($slug_exists) {\n $i = 1; $baseSlug = $slug;\n while(slug_exist($slug)){\n $slug = $baseSlug . \"-\" . $i++; \n }\n }\n \n return $slug;\n}", "title": "" }, { "docid": "f8e43f61acee40de3fbd015684db323a", "score": "0.5555335", "text": "function create_slug($string){\n $string = preg_replace( '/[«»\"\"!?,.!@£$%^&*{};:()]+/', \"\", $string );\n $string = strtolower($string);\n $slug=preg_replace('/[^A-Za-z0-9-]+/', '-', $string);\n return $slug;\n}", "title": "" }, { "docid": "05e59e34e0d1bbf97a86e58e46c1ad35", "score": "0.5540731", "text": "public function getUrlSlugAttribute()\n {\n return url('forums/' . str_slug($this->slug) . '-' . $this->id);\n }", "title": "" }, { "docid": "d45844e96d2a143fad9a18bd5db0f0fd", "score": "0.5536514", "text": "public function getFullSlug(): string;", "title": "" }, { "docid": "11b34c9f73f3a7a2b7a7c7de7b26c194", "score": "0.5527144", "text": "public function generateSlug($title, $id=null) {\n\t\t$slug = str_slug(strip_tags($title));\n\t\t$slugStr = $slug;\n\t\t$exists = $this->getLastSlug($slugStr, $id);\n\t\t$slugStr = substr($slugStr, 0, 100);//limit to 100 chars\n\t\tif($exists) {\n\t\t\t$slugStr .='-'.$exists->id;\n\t\t}\n\t\treturn $slugStr;\n\t}", "title": "" }, { "docid": "6cb04b54c4d9bcd5115dd69ce3d5aa1d", "score": "0.5521605", "text": "function _slugshow($sname) {\n $sector = ($sname) ? $sname : '';\n\n $replace_array = array('.', '*', '/', '\\\\', '\"', '\\'', ',', '{', '}', '[', ']', '(', ')', '~', '`');\n\n $slug = $sector;\n $slug = trim($slug);\n $slug = str_replace($replace_array, \"\", $slug);\n //.,*,/,\\,\",',,,{,(,},)[,]\n $slug = url_title($slug, 'dash', true);\n\n $this->db->limit(1);\n $this->db->where('show_uri_alias', $slug);\n $rs = $this->db->get('show');\n if ($rs->num_rows() > 0) {\n $suffix = 2;\n do {\n $slug_check = false;\n $alt_slug = substr($slug, 0, 200 - (strlen($suffix) + 1)) . \"-$suffix\";\n $this->db->limit(1);\n $this->db->where('show_uri_alias', $alt_slug);\n $rs = $this->db->get('show');\n if ($rs->num_rows() > 0)\n $slug_check = true;\n $suffix++;\n }while ($slug_check);\n $slug = $alt_slug;\n }\n return $slug;\n }", "title": "" }, { "docid": "029f61fdabdfe378e4db35980823cd99", "score": "0.5517976", "text": "public function create_slug($string)\n\t{\n\t\t$CI =& get_instance();\n\t\t$CI->load->helper(array('url', 'text', 'string'));\n\t\t$string = strtolower(url_title(convert_accented_characters($string), $this->replacement));\n\t\treturn reduce_multiples($string, $this->_get_replacement(), TRUE);\n\t}", "title": "" }, { "docid": "9ca7f14ff61cbd535f68d3d19211ae9f", "score": "0.5517541", "text": "public function getSluggyfier(string $title, string $class, string $field): string\n {\n\n $lowerTitle = strtolower($title);\n $slug = str_replace(' ', '-', $lowerTitle);\n $articles = $this->em->getRepository($class)->findBy(array(\n $field => $slug\n ));\n $nbArticles = count($articles);\n\n if ($nbArticles > 0){\n $slug = $slug . '-' . ($nbArticles + 1);\n }\n\n return $slug;\n }", "title": "" }, { "docid": "b375b62e605d665d726e38fa4bc82346", "score": "0.55066603", "text": "public function generateUniqueShortUrl()\n {\n $shorten = $this->generateRandomString();\n\n if ($this->url->whereShorten($shorten)->first()) {\n return $this->generateUniqueShortUrl();\n }\n\n return $shorten;\n }", "title": "" }, { "docid": "45df7dec923f8441aa2daeb8eb70c04d", "score": "0.54500854", "text": "public function slugGenerator($title) {\n $slug = str_replace(\"\", \"-\", strtolower($title));\n $slug = preg_replace(\"/[^A-Za-z0-9\\-]/\", \"-\", $slug);\n $slug = preg_replace(\"/-+$&/\", \"-\", $slug);\n return $slug;\n }", "title": "" }, { "docid": "55b2f616dff4962c5ccb84a5aebe449d", "score": "0.5433923", "text": "function philosophy_cpt_slug_url_fix($post_link,$id){\n\n $p = get_post($id);\n if(is_object($p) && 'chapter' == get_post_type($id)){\n\n $parent_post_id = get_field('parent_book');\n $parent_post = get_post($parent_post_id);\n\n if($parent_post){\n $post_link = str_replace(\"%book%\",$parent_post->post_name,$post_link);\n }\n }\n return $post_link;\n}", "title": "" }, { "docid": "c2e6ee2df20f3477a52777c6e60a24c3", "score": "0.54314584", "text": "function as_slug_this($content) {\n\t\treturn preg_replace(\"/-$/\",\"\",preg_replace('/[^a-z0-9]+/i', \"-\", strtolower($content)));\n\t}", "title": "" }, { "docid": "d287a5cff592c472a291c868fbcd7cce", "score": "0.5429761", "text": "public function createSlug($id = false, $name = false) {\n \n $timer = Debug::GetTimer(); \n \n if (filter_var($id, FILTER_VALIDATE_INT) && !$name) {\n $name = $this->db->fetchOne(\"SELECT organisation_name FROM organisation WHERE organisation_id = ?\", $id); \n } elseif (filter_var($id, FILTER_VALIDATE_INT) && is_string($name)) {\n // Do nothing\n } elseif (isset($this->name) && !empty($this->name)) {\n $name = $this->name;\n $id = $this->id;\n } else {\n return false;\n }\n \n $proposal = ContentUtility::generateUrlSlug($name, 200);\n \n /**\n * Check that we haven't used this slug already\n */\n \n $result = $this->db->fetchAll(\"SELECT organisation_id FROM organisation WHERE organisation_slug = ? AND organisation_id != ?\", array($proposal, $id)); \n \n if (count($result)) {\n $proposal .= count($result);\n }\n \n if (isset($this->slug) || empty($this->slug)) {\n $this->slug = $proposal;\n }\n \n /**\n * Add this slug to the database\n */\n \n $data = array(\n \"organisation_slug\" => $proposal\n );\n \n $where = array(\n \"organisation_id = ?\" => $id\n );\n \n $rs = $this->db->update(\"organisation\", $data, $where); \n \n Debug::LogEvent(__METHOD__, $timer); \n \n /**\n * Return it\n */\n \n return $proposal;\n }", "title": "" }, { "docid": "64990ae41fe6e294ee10e08f8dd1f08f", "score": "0.54245573", "text": "public function shortenURL() {\n $this->JSONview();\n $view = $this->getActionView();\n $link = new Link(array(\n \"user_id\" => $this->user->id,\n \"short\" => \"\",\n \"item_id\" => RequestMethods::get(\"item\"),\n \"live\" => 1\n ));\n $link->save();\n \n $item = Item::first(array(\"id = ?\" => RequestMethods::get(\"item\")), array(\"url\", \"title\", \"image\", \"description\"));\n $m = Registry::get(\"MongoDB\")->urls;\n $doc = array(\n \"link_id\" => $link->id,\n \"item_id\" => RequestMethods::get(\"item\"),\n \"user_id\" => $this->user->id,\n \"url\" => $item->url,\n \"title\" => $item->title,\n \"image\" => $item->image,\n \"description\" => $item->description,\n \"created\" => date('Y-m-d', strtotime(\"now\"))\n );\n $m->insert($doc);\n\n $longURL = RequestMethods::get(\"domain\") . '/' . base64_encode($link->id);\n $googl = Registry::get(\"googl\");\n $object = $googl->shortenURL($longURL);\n\n $facebook = new \\Curl\\Curl();\n $facebook->post('https://graph.facebook.com/?id='. $longURL .'&scrape=true');\n $facebook->close();\n\n $link->short = $object->id;\n $link->save();\n\n $view->set(\"shortURL\", $object->id);\n }", "title": "" }, { "docid": "4260c30d15bbd461a46aad293634f156", "score": "0.5423002", "text": "public function generateUniqueURLSegment($title)\n {\n $URLSegment = singleton(SiteTree::class)->generateURLSegment($title);\n $prevurlsegment = $URLSegment;\n $i = 1;\n while ( !$this->validURLSegment($URLSegment) ) {\n $URLSegment = $prevurlsegment . \"-\" . $i;\n $i++;\n }\n\n return $URLSegment;\n\n }", "title": "" }, { "docid": "c3b13fd3bd1e883beb86721f10e36105", "score": "0.5419012", "text": "public function getSlug()\n {\n return $this->slug ?: '';\n }", "title": "" }, { "docid": "42ac6dbc518303be32a56098ee95646a", "score": "0.54000396", "text": "private function checkSlug($slug, $increment = 0)\n {\n $result = $this->model->where('slug', $slug);\n\n if($result->exists()) {\n return $this->checkSlug($slug.'-'.$increment, $increment++);\n }\n\n return $slug;\n }", "title": "" }, { "docid": "e6f5f02898c5b4f4029020a7a545466c", "score": "0.53789055", "text": "function testUseRandomHashIfNoSlugAvailable() {\n\t\t$this->model->create(array('id' => 1, 'name' => \"?!\"));\n\t\t$this->model->save();\n\t\t$result = $this->model->find('first', array('conditions' => array('Page.id' => 1)));\n\t\t$this->assertEqual($result['Page']['slug'], md5(\"?!\"));\n\n\t}", "title": "" }, { "docid": "b77c168af5de5e8a914d380d311d7463", "score": "0.5378772", "text": "function StrToPermalink($str, $database) {\n $str=trim($str);\n $str=strtolower($str);\n $str = preg_replace('/[^\\p{L}\\p{N}\\s]/u', '', $str);\n \n // Check if it already exists\n $num=0;\n $curperma=$str;\n while(ExistsInDB(\"SELECT * FROM \".$database.\" WHERE permalink='\".$curperma.\"'\")==true) {\n $num++;\n $curperma=$str.\"-\".$num;\n }\n\n return $curperma;\n }", "title": "" }, { "docid": "3c341a33fc9144cd4737ab40853a35ee", "score": "0.537824", "text": "function add_site_slug( $row, $user_blog ) {\n\t\treturn '<i>' . str_replace( '/', '', $user_blog->path ) . '</i><br>' . $row;\n\t}", "title": "" }, { "docid": "b6d80c05f1c602000157bcfb4cf88f6a", "score": "0.5372505", "text": "public function getSlug(): string\n {\n return (new Slugify())->slugify($this->nomProjet);\n }", "title": "" }, { "docid": "c3f955398dc3ea27092140d5ec8fdb5f", "score": "0.5368511", "text": "protected function generateUniqueUri()\n {\n return md5('route' . ++$this->routeCount);\n }", "title": "" }, { "docid": "bcc5e9dca1b9231686c008a29ada5a49", "score": "0.53552467", "text": "public function getUniqueSlug(\\Illuminate\\Database\\Eloquent\\Model $model, $value)\n\t{\n\t\t$traits = class_uses($model);\n\n\t\tif (in_array('SoftDeletingTrait', $traits))\n\t\t{\n\t\t\t$allSlugs = $model->select('slug')->where('slug', 'like', $value.'%')\n\t\t\t\t\t\t \t\t\t->where('id', '<>', $model->id)\n\t\t\t\t\t\t \t\t\t->withTrashed()\n\t\t\t\t\t\t \t\t\t->get();\n\t\t} else {\n\t\t\t$allSlugs = $model->select('slug')->where('slug', 'like', $value.'%')\n\t\t\t\t\t\t\t\t\t->where('id', '<>', $model->id)\n\t\t\t\t\t\t \t\t\t->get();\n\t\t}\n\n\n\t\tif (! $allSlugs->contains('slug', $value)){\n\t\t\treturn $value;\n\t\t}\n\n\t\tfor ($i = 1; $i <= 10; $i++) {\n\t\t\t$newSlug = $value.'-'.$i;\n\t\t\tif (! $allSlugs->contains('slug', $newSlug)) {\n\t\t\t\treturn $newSlug;\n\t\t\t}\n\t\t}\n\n\t\tthrow new \\Exception('Can not create a unique slug');\n\t}", "title": "" }, { "docid": "f792894dfcc7d3efa3b2b06608503b64", "score": "0.53499544", "text": "public static function generateUrl($url, $urlType, $posterID = 0, $langID = 1) {\n $from = explode(',', \"ą,č,ę,ė,į,š,ų,ū,ž,ç,æ,œ,á,é,í,ó,ú,à,è,ì,ò,ù,ä,ë,ï,ö,ü,ÿ,â,ê,î,ô,û,å,e,i,ø,u,(,),[,],'\");\n $to = explode(',', 'a,c,e,e,i,s,u,u,z,c,ae,oe,a,e,i,o,u,a,e,i,o,u,a,e,i,o,u,y,a,e,i,o,u,a,e,i,o,u,,,,,,');\n //Do the replacements, and convert all other non-alphanumeric characters to spaces\n $url = strtolower($url);\n $url = preg_replace('~[^\\w\\d]+~', '-', str_replace($from, $to, trim($url)));\n //Remove a - at the beginning or end and make lowercase\n $url = substr(preg_replace('/^-/', '', preg_replace('/-$/', '', $url)), 0, 180);\n\n $snUrl = new SnUrl();\n $snUrl->OwnerType = $urlType;\n $snUrl->ID_OWNER = $posterID;\n $snUrl->ID_LANGUAGE = $langID;\n $snUrl = $snUrl->getOne();\n\n //if url not exists\n if (!$snUrl) {\n for ($i = 0; $i < 1000; $i++) {\n $snUrl = new SnUrl();\n $snUrl->OwnerType = $urlType;\n $turl = $url;\n if ($i > 0) {\n $turl = $url . $i;\n }\n $snUrl->URL = $turl;\n\t\t\t\t$snUrl->ID_LANGUAGE = $langID;\n $snUrl = $snUrl->getOne();\n\n if (!$snUrl) {\n $url = $turl;\n break;\n }\n }\n } else {\n //if url exists, check if nothing changed and if changed generate new and delete old\n if ($snUrl->URL != $url) {\n $snUrl->delete();\n\n for ($i = 0; $i < 1000; $i++) {\n $snUrl = new SnUrl();\n $snUrl->OwnerType = $urlType;\n $turl = $url;\n if ($i > 0) {\n $turl = $url . $i;\n }\n $snUrl->URL = $turl;\n\t\t\t\t\t$snUrl->ID_LANGUAGE = $langID;\n $snUrl = $snUrl->getOne();\n\n if (!$snUrl) {\n $url = $turl;\n break;\n }\n }\n } else {\n return TRUE;\n }\n }\n return $url;\n }", "title": "" }, { "docid": "70a4f3b439b00fcbed55eb63e04781e4", "score": "0.5341947", "text": "public function testStaticSlugGeneratorWhenEntriesExist()\n {\n $post = Post::create(array('title' => 'My Test Post'));\n $this->assertEquals('my-test-post', $post->slug);\n\n $slug = SlugService::createSlug(Post::class, 'slug', 'My Test Post');\n $this->assertEquals('my-test-post-1', $slug);\n }", "title": "" }, { "docid": "a24dcfc54c4dffe9838fc0e6d8278897", "score": "0.53361493", "text": "function snax_mycred_override_format_slugs( $slug ) {\n\tif ( strpos( $slug, 'quiz' ) > -1 ) {\n\t\t$slug = 'quiz';\n\t}\n\tif ( strpos( $slug, 'list' ) > -1 ) {\n\t\t$slug = 'list';\n\t}\n\tif ( strpos( $slug, 'poll' ) > -1 ) {\n\t\t$slug = 'poll';\n\t}\n\treturn $slug;\n}", "title": "" }, { "docid": "c673b4b836cc8a079f60b2bedc0d2789", "score": "0.5333565", "text": "public function getProductSlug();", "title": "" } ]
cf80577616ef2e218fc9ef4fa4f0a8f8
find customer by hash of email
[ { "docid": "88eb19216d09ce92a817123b31f49412", "score": "0.67002124", "text": "public static function findByEmailHash($hash) {\n\n $table = new Yourdelivery_Model_DbTable_Newsletterrecipients();\n return $table->select()\n ->where(sprintf('md5(CONCAT(\"%s\",email,\"%s\"))=?', SALT, SALT), $hash)\n ->query()\n ->fetch();\n }", "title": "" } ]
[ { "docid": "92135c94569c8f8563f4d63da809e327", "score": "0.66522497", "text": "public function getCustomerByEmailPassword($email, $password);", "title": "" }, { "docid": "adf6c9cfc712b91e04e0ef4f6b8af601", "score": "0.6534343", "text": "function lookup($email) {\n\n\t\t// get salt\n\t\t$user_salt = substr(hash('md5', str_replace('@', hex2bin($GLOBALS['site_key']), $email)), 0, 22);\n\n\t\t// create lookup\n\t\treturn crypt($email,'$2y$10$' . $user_salt . '$');\n\t\t\n\t}", "title": "" }, { "docid": "1d28bc498adbcae8feac062854ab6f99", "score": "0.65000796", "text": "function getByHash($hash) {\n\t\t$cond = new Criteria();\n\t\t$cond->add(RegistrationUserPeer::VERIFICATIONHASH, $hash);\n\t\t$todosObj = RegistrationUserPeer::doSelectJoinUserInfo($cond);\n\t\treturn $todosObj[0];\n \t}", "title": "" }, { "docid": "d6557f2e3cd473e39402c7997d47d413", "score": "0.63026917", "text": "function consulta_email_clientes_erp($hash_email) {\n $this->pdo = new Connection();\n $query = \"SELECT email FROM clientes_erp_email WHERE hash = \" . $hash_email .\"\";\n try {\n $stmt = $this->pdo->prepare($query);\n $stmt->execute();\n $result = $stmt->fetchAll(PDO::FETCH_OBJ);\n } catch (PDOException $exc) {\n echo $exc->getMessage();\n }\n return $result;\n }", "title": "" }, { "docid": "4d79c90531de5e88ed54badc6acd41b2", "score": "0.6256836", "text": "public function find($email, $token = null);", "title": "" }, { "docid": "14bb69eedf385e0f22b02f70f3f3fbcd", "score": "0.6164154", "text": "public function findCustomerByEmail($email) {\n\t\t$customerList = $this->getCustomerList();\n\t\tif ($customerList) {\n\t\t\tforeach ($customerList as $customer) {\n\t\t\t\tif ($customer['Email'] == $email) {\n\t\t\t\t\t$user = $customer;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ($user) {\n\t\t\treturn $user;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "9908b0b787c584169babfa9eca934b36", "score": "0.61147916", "text": "function get_by_email($email)\n\t{\n\t\treturn $this->db->get_where('a3m_account', array('email' => $email))->row();\n\t}", "title": "" }, { "docid": "25ef668e4cb422e8b4060750f9e01186", "score": "0.6087375", "text": "public function get_customer_by_email($email) {\n\n $customer = Mage::getModel('customer/customer')\n ->getCollection()\n ->addFieldToFilter('email', $email)\n ->getFirstItem();\n \n $customer_id = $customer->getId();\n if ((int) $customer_id > 0) {\n return $customer;\n }\n \n return false;\n }", "title": "" }, { "docid": "fad7d4f714ac49b4fc1c60c6360e7d63", "score": "0.6030738", "text": "function finduser($email){\n}", "title": "" }, { "docid": "3ce1e6f3c3cc2934792bb0bc299a191a", "score": "0.5942084", "text": "private function findUserByEmail()\n {\n $query = \"SELECT * FROM \" . $this->table . \" WHERE email LIKE '\" . $this->email . \"' LIMIT 1\";\n return $this->mysqli->query($query);\n }", "title": "" }, { "docid": "7e27c849d91f8d602adac775e3b57648", "score": "0.59336394", "text": "public function getCustomer($email){\n $sql = \"SELECT * FROM user WHERE email = '$email'\";\n\t\t\n return $this->db->excetue($sql);\n }", "title": "" }, { "docid": "f01047cd7ebfcfc6a87717f4505e8d06", "score": "0.59316313", "text": "public function findCustomerByEmail($request){\n\n $customer = Customer::where('email', $request->input('email'))->first();\n\n //dd($customer);\n\n if($customer){\n // great we know the lead has got an account, we want to return the customer id\n\n // but lets say they've submitted a few leads off, without having an account. they then sign up for an account\n // 4 form submits later, we want to then sign update all the forms sent from this customer.\n\n Lead::where('email', $customer->email)->update(['customer_id' => $customer->id]);\n\n // now we can return the customer ID\n return $customer->id;\n }\n }", "title": "" }, { "docid": "b95e75a73ef7400848d7f69b266389d3", "score": "0.5903052", "text": "function buscarPorEmail($email){\n $usuarios = abrirBaseDatos();\n if($usuarios !=null){\n foreach ($usuarios as $usuario) {\n if($email === $usuario['email']){\n return $usuario;\n }\n }\n }\n return null;\n}", "title": "" }, { "docid": "bc3a87fa50046acb294277a510456d3f", "score": "0.5892367", "text": "public function findByEmail(string $email);", "title": "" }, { "docid": "3dd8ab16334afe962c6bf0131bc3933b", "score": "0.58675015", "text": "public function findByEmail ($email);", "title": "" }, { "docid": "f3fc9244f1f7e891c7bd948844d93e8e", "score": "0.58500856", "text": "public function getCustomerEmail();", "title": "" }, { "docid": "f3fc9244f1f7e891c7bd948844d93e8e", "score": "0.58500856", "text": "public function getCustomerEmail();", "title": "" }, { "docid": "f3fc9244f1f7e891c7bd948844d93e8e", "score": "0.58500856", "text": "public function getCustomerEmail();", "title": "" }, { "docid": "5aa58b1eb08b2f0559d94ee73050beb3", "score": "0.58197767", "text": "function find_user_by_email($email) {\n global $db;\n\n $sql = \"SELECT * FROM users \";\n $sql .= \"WHERE email='\" . db_escape($db, $email) . \"' \";\n $sql .= \"LIMIT 1\";\n $result = mysqli_query($db, $sql);\n confirm_result_set($result);\n $user = mysqli_fetch_assoc($result); // find first\n mysqli_free_result($result);\n return $user; // returns an assoc. array\n}", "title": "" }, { "docid": "154b895828de12bdb96450d64c133640", "score": "0.58133817", "text": "public function findUser($email);", "title": "" }, { "docid": "0837b6a65e7c4fe7a51e8c9af282dc33", "score": "0.5777137", "text": "function fetchUserDetailsByEmail($email = NULL, $token = NULL) {\n global $db, $db_table_prefix;\n if ($email != NULL) {\n $sql = \"SELECT * FROM \" . $db_table_prefix . \"admin\n\t\t\t\tWHERE\n\t\t\t\temail = '\" . $db->sql_escape(sanitize($email)) . \"'\n\t\t\t\";\n } else {\n $sql = \"SELECT * FROM \" . $db_table_prefix . \"admin\n\t\t\t\tWHERE \n\t\t\t\tactivationtoken = '\" . $db->sql_escape(sanitize($token)) . \"'\n\t\t\t\";\n }\n $result = $db->sql_query($sql);\n $row = $db->sql_fetchrow($result);\n //$db->sql_close();\n return ($row);\n}", "title": "" }, { "docid": "cf439cc26631dfbea7af50df09ba3b92", "score": "0.5776114", "text": "protected function _lookupCustomerId()\n {\n return Mage::getModel('customer/customer')\n ->setWebsiteId(Mage::app()->getWebsite()->getId())\n ->loadByEmail($this->_quote->getCustomerEmail())\n ->getId();\n }", "title": "" }, { "docid": "4042dfca0c183bb3c9cdc13ba77103e4", "score": "0.57575285", "text": "public function check_customer_email_existing(){\n\t\t$query=\"select * from `\".$this->table_name_admin.\"` where `email`='\".$this->user_email.\"'\";\n $result=mysqli_query($this->conn,$query);\n\t\t$value = mysqli_fetch_array($result);\n\t\tif(mysqli_num_rows($result)>0){\n return $value[0];\n\t\t}else{\n\t\t$query2=\"select * from `\".$this->table_name.\"` where `user_email`='\".$this->user_email.\"'\";\n\t\t$result_user=mysqli_query($this->conn,$query2);\n\t\t$value1 = mysqli_fetch_array($result_user);\n\t\treturn $value1[0];\n\t\t}\n\t}", "title": "" }, { "docid": "4bd93b50d03f9343cfe530273d4e2b72", "score": "0.57425684", "text": "function searchUser($email){\n \n $emailDecod = [];\n \n if (isset($archivo)) {\n $archivo = fopen('usuarios.json', 'r'); //abre en modo lectura\n } else {\n $archivo = fopen('usuarios.json', 'r');\n } \n \n while (($linea = fgets($archivo)) !== false) {\n $emailDecod = json_decode($linea, true); \n \n if ($emailDecod['email'] === $email) { \n return $email;\n break;\n } \n \n \n }\n fclose($archivo);\n \n \n \n}", "title": "" }, { "docid": "2fd8219fc0bdb66d0048aae48718268a", "score": "0.5707021", "text": "public function find_email($email){\n $sql = mainModel::connect()->prepare(\"SELECT idAccount, accountDni, accountCode\n FROM accounts WHERE accountEmail = '$email'\");\n $sql->bindParam(':Email', $email);\n $sql->execute();\n\n return $sql->fetch();\n }", "title": "" }, { "docid": "74552675424051a0fbf4413d16ce8c29", "score": "0.5705107", "text": "public function getByEmail($email){\n\n $this->load(array(\"email=?\", $email));\n $query = $this->query;\n return $query[0];\n\n }", "title": "" }, { "docid": "3cdf7d549491a9b3f9506dc0f74f8f13", "score": "0.5702494", "text": "public function verifymail($cusemail){\r\n\t\t\r\n\t\t//write the sql query to check if name exists\r\n\t\t$sql = \"SELECT `customer_email` FROM `customer` WHERE `customer_email` = '$cusemail'\";\r\n\r\n\t\t//return the executed the query\r\n\t\treturn $this->db_query($sql);\r\n\t}", "title": "" }, { "docid": "ba42c72dbbf0f1feff5846e3fde169d8", "score": "0.5687084", "text": "function authorize_user($email, $password_hash)\n{\n $redis = getRedis();\n $id = sha1($email. $password_hash);\n $user_data = json_decode($redis->get($id), true);\n\n return !isset($user_data['email']) ? null : $id;\n}", "title": "" }, { "docid": "4a116fa668e2a3c4a495aef3d11b4d74", "score": "0.56675583", "text": "function get_by_email($email)\n {\n $this->db->where($this->email, $email);\n return $this->db->get($this->table)->row();\n }", "title": "" }, { "docid": "9d0b0cf02b840a3223b3b9e64adc2fff", "score": "0.5635862", "text": "public function findByEmail($email);", "title": "" }, { "docid": "b30325fbe5976a9b76240e872de8b629", "score": "0.5622529", "text": "function getOneUtilisateurByEmailPassword(string $email, string $password) {\n global $connexion;\n \n $query = \"SELECT * FROM utilisateur WHERE mail = :email AND password = SHA1(:password)\";\n \n $stmt = $connexion->prepare($query);\n $stmt->bindParam(\":email\", $email);\n $stmt->bindParam(\":password\", $password);\n $stmt->execute();\n \n return $stmt->fetch();\n}", "title": "" }, { "docid": "2708ecbad252d44b76e53e4128f1776f", "score": "0.56134707", "text": "function buscarDatos($usuarios, $email){\r\n foreach ($usuarios as $usuario) {\r\n if ($email == $usuario[\"email\"]) {\r\n return $usuario;\r\n break;\r\n }\r\n }\r\n}", "title": "" }, { "docid": "1dfa11e6fd3afa227fde1e8d814708b5", "score": "0.56133723", "text": "function casEmailLookup($username) {\n global $CASAuth;\n return $username.\"@\".$CASAuth[\"EmailDomain\"];\n}", "title": "" }, { "docid": "5d65d560a8b7577617f7ae302daf427e", "score": "0.5612972", "text": "public function getTokenByEmail($email){\r\n\r\n }", "title": "" }, { "docid": "05228f7f0f206077d0e10943e36cf5cf", "score": "0.5605222", "text": "public function getCustomerAddressHash()\n {\n return $this->getAddressHelper()\n ->getHash($this->getCustomerAddress());\n }", "title": "" }, { "docid": "835b783532d18d1c3b3f68403dadc3b0", "score": "0.55972075", "text": "public function getUserByEmail(){\n $this->email=$this->sanitize($this->email);\n $filter = ['email'=>$this->email];\n $option = [];\n $all_users=$this->database->queryData($this->collection_name,$filter,$option);\n if(count($all_users)==1){\n return $all_users;\n }else{\n return FALSE;\n }\n }", "title": "" }, { "docid": "05e7863aa65ae11b9e3cde1c6bbb64e7", "score": "0.5589363", "text": "public function findUserByEmail($mail) {\n \n $user = null;\n \n $this->db->select(\"*\")->from(\"tb_user\");\n $this->db->join('tb_profile', 'tb_profile.idProfile = tb_user.idProfileKf', 'left');\n $this->db->join('tb_profiles', 'tb_profiles.idProfiles = tb_user.idSysProfileFk', 'left');\n $this->db->join('tb_addres', 'tb_addres.idAdress = tb_user.idAddresKf', 'left');\n $this->db->join('tb_company', 'tb_company.idCompany = tb_user.idCompanyKf', 'left');\n $query = $this->db->where(\"tb_user.emailUser =\", $mail)->get();\n if($query->num_rows() > 0){ \n $user = $query->row_array();\n return $user;\n } \n else\n {\n return null;\n }\n }", "title": "" }, { "docid": "134be46175486e8420ed0e92be242842", "score": "0.5589284", "text": "public function getCustomerByOCEmailId($email_id){\n\t\t$result = $this->db->query(\"SELECT c.*,CONCAT(oc.firstname,' ',oc.lastname) as oc_customer,o.name as organization,toc.organization_id FROM \".DB_PREFIX.\"ts_customers c LEFT JOIN \".DB_PREFIX.\"customer oc ON (c.customer_id = oc.customer_id) LEFT JOIN \".DB_PREFIX.\"ts_organization_customers toc ON (c.id = toc.customer_id) LEFT JOIN \".DB_PREFIX.\"ts_organizations o ON (toc.organization_id = o.id) WHERE c.customer_id = '\".(int)$email_id.\"' \")->row;\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "dc1a6d9dd5af2ebe51c996a10a35479c", "score": "0.5582432", "text": "function getClientIdfromClientInfo($email,$hashedpass)\n {\n\t\t$qry2=\"SELECT clientid FROM client_info \n\t\t\t\t WHERE email='\".$email.\"' AND password='\".$hashedpass.\"' \";\n\t\t$res2=getData($qry2);\n\t $count_res2=mysqli_num_rows($res2);\n\t if($count_res2>0)\n\t\t{\n\t\t\twhile($row2=mysqli_fetch_array($res2))\n\t\t\t{\n\t\t\t\t$clientid\t=\t$row2['clientid']; \n\t\t\t}\n\t\t\treturn $clientid;\t\n\t\t} \n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t} \n }", "title": "" }, { "docid": "6142fc65251a20051bfce580aed929a1", "score": "0.55823284", "text": "function findCustomer($params_where){\n $customer = $this->_getwhere(array(\n 'table' => $this->table_customers,\n 'param_where' => $params_where\n ));\n return $customer;\n }", "title": "" }, { "docid": "9dceec57da298d72b1b1c2455bccea06", "score": "0.5571447", "text": "public function getUserByEmail() {\n $db = init_db();\n $req = $db->prepare( \"SELECT * FROM user WHERE user_confirmed = 1 && email = ?\" );\n $req->execute( array( $this->getEmail()));\n $db = null;\n return $req->fetch();\n }", "title": "" }, { "docid": "d9a74ff1e34dd7c7c979a26ba83e0ca8", "score": "0.55691993", "text": "public static function findByEmailOrTelOrCustomerOrVerificationcode($email = null, $tel = null, $customerId = null, $verificationCode = null){ \n $db = Zend_Registry::get('dbAdapterReadOnly');\n \n $row = null;\n if (!is_null($email) && strlen(trim($email))>0) {\n $select = $db->select()->from('rabatt_check')->where('email = ?', $email);\n $row = $db->fetchRow($select); \n }\n\n if (is_null($row) && !is_null($tel) && strlen(trim($tel))>0) {\n $select = $db->select()->from('rabatt_check')->where('tel = ?', $tel);\n $row = $db->fetchRow($select); \n }\n\n if (is_null($row) && !is_null($customerId) && strlen(trim($customerId))>0) {\n $select = $db->select()->from('rabatt_check')->where('customerId = ?', $customerId);\n $row = $db->fetchRow($select); \n }\n\n if (is_null($row) && !is_null($verificationCode) && strlen(trim($verificationCode))>0) {\n $vselect = $db->select()->from('rabatt_codes_verification')->where('registrationCode = ?', $verificationCode);\n $vrow = $db->fetchRow($vselect);\n \n if (is_array($vrow)) {\n $select = $db->select()->from('rabatt_check')->where('rabattVerificationId = ?', $vrow['id']);\n $row = $db->fetchRow($select); \n }\n }\n \n return $row;\n }", "title": "" }, { "docid": "998a70eeffa0dc0f05f7cdba02f39f23", "score": "0.5564825", "text": "function get_user_details_by_email($email)\r\n {\r\n $this->db->where(\"usr_email\", $email);\r\n $result = $this->db->get('users');\r\n if($result)\r\n {\r\n return $result;\r\n } else {\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "269c4f4400f8f66025997df7866e27d8", "score": "0.55629814", "text": "public function authenticateOnLoginByHash() { \n $id=Yii::app()->request->getQuery('id');\n $ucode=Yii::app()->request->getQuery('ucode');\n if(!is_null($id) && !is_null($ucode)) \n {\n $user=User::model()->findByPk(array('id'=>':id', ':id'=>$id));\n if($user !== null && $user->email_hash == $ucode)\n {\n $user->authenticateOnLoginByHashFromEmail();\n Yii::app()->user->login($user,Yii::app()->params['loginDuration']);\n }\n } \n }", "title": "" }, { "docid": "729a84e2839b5fee5ba9cfe1fd15b074", "score": "0.555553", "text": "public function getByEmail($email, $passwd = null, $ignore_guest = true)\n {\n if (!Validate::isEmail($email) || ($passwd && !Validate::isPasswd($passwd))) {\n return null;\n }\n $result = Db::getInstance()->getRow('\n SELECT *\n FROM `'._DB_PREFIX_.'customer`\n WHERE `email` = \\''.pSQL($email).'\\'\n '.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER).'\n '.(isset($passwd) ? 'AND `passwd` IN (\\''.pSQL(Tools::encrypt($passwd)).'\\', \\''.sha1($passwd).'\\')' : '').'\n AND `deleted` = 0\n '.($ignore_guest ? ' AND `is_guest` = 0' : ''));\n\n if (!$result)\n return false;\n $this->id = $result['id_customer'];\n foreach ($result as $key => $value)\n if (array_key_exists($key, $this))\n $this->{$key} = $value;\n\n return $this;\n }", "title": "" }, { "docid": "45f06bacbcc73678e934446557c5a23f", "score": "0.5551251", "text": "public function getEmailVerify(string $data_hash)\n {\n \n $this->db->where('sha1(email)', $data_hash);\n $this->db->from('user');\n $this->db->limit(1);\n \n $query = $this->db->get();\n\n if ($query->num_rows() == 1) {\n $this->db->set('is_verify', '1');\n $this->db->where('sha1(email)', $data_hash);\n $this->db->update('user');\n return true;\n } else {\n return false;\n }\n \n }", "title": "" }, { "docid": "9433e3d1f3a2d3c60342673671aeb41c", "score": "0.5548613", "text": "function get_passhash_for_email ( $email ) {\n\t$dbconn = pg_connect(\"host=localhost port=5432 dbname=noaa user=noaa password=123\");\n\n\t$result = pg_query_params ( $dbconn,\n\t\t\t'SELECT passhash_md5\n\t\t\tFROM users\n\t\t\tWHERE email = $1',\n\t\t\tarray ( $email ) \n\t\t\t);\n\n\t/* \n\t * string $passhash_md5_original\n\t */\n\t// to read the password from the result\n\twhile ( $row = pg_fetch_row( $result ) ) {\n\t\t$passhash_md5_original = $row[0];\n\t}\n\n\treturn $passhash_md5_original;\n}", "title": "" }, { "docid": "11d8b395e4ba85d54c2dc5644df80042", "score": "0.55435264", "text": "public function getContactByEmail($email);", "title": "" }, { "docid": "f04f49d13ede4fd85d9e911f96edbe47", "score": "0.5537639", "text": "function get_user_from_hash($hash = '') {\n\n\tif (!$hash) {\n\t\treturn false;\n\t}\n\n\t$users = elgg_get_entities_from_metadata(array(\n\t\t'types' => 'user',\n\t\t'metadata_names' => [\n\t\t\t'discovery_permanent_hash',\n\t\t\t'discovery_temporary_hash',\n\t\t],\n\t\t'metadata_values' => $hash,\n\t\t'limit' => 1,\n\t));\n\n\treturn $users ? $users[0] : false;\n}", "title": "" }, { "docid": "547ac33d04f27223b22f182c0e682f84", "score": "0.55361015", "text": "public function findByEmail(Email $email);", "title": "" }, { "docid": "3c1275f307a77a3fe52839dcf09af5f9", "score": "0.5535806", "text": "public function getUserByEmailAndPassword($email, $password) {\n $result = mysqli_query($this->db->con,\"SELECT * FROM users WHERE email = '$email'\") or die(mysqli_connect_errno());\n // check for result \n $no_of_rows = mysqli_num_rows($result);\n if ($no_of_rows > 0) {\n $result = mysqli_fetch_array($result);\n $salt = $result['salt'];\n $encrypted_password = $result['encrypted_password'];\n $hash = $this->checkhashSSHA($salt, $password);\n // check for password\n if ($encrypted_password == $hash) {\n return $result;\n }\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "3d606c85d9fd2ee5a3e950166aae77e6", "score": "0.55307883", "text": "function getByEmail($email) {\n $this->getConnection();\n $params = array(\":email\" => $email);\n $request = \"SELECT ID_CLIENT, DATE_CREATION, EMAIL, TELEPHONE, NOM, PRENOM, NEWSLETTER\n FROM CLIENT\n WHERE EMAIL=:email\";\n $result = $this->prepare_select($request, $params);\n return $result;\n }", "title": "" }, { "docid": "55caabd185af2709da903107ef8ac793", "score": "0.5524612", "text": "public function checkExistingContact($email)\n {\n $url = \"https://crm.zoho.com/crm/private/json/Contacts/searchRecords\";\n $query =\"authtoken=\".$this->apiauthtoken.\"&scope=crmapi&criteria=(Email:\".$email.\")\";\n //echo \"urlQuery----\".$url.$query;\n $srch_result = json_decode($this->curlRequest($url,$query),true);\n\n $contactId ='';\n if(isset($srch_result['response']['result'])){\n $contact_result = $srch_result['response']['result']['Contacts']['row']['FL'];\n foreach ($contact_result as $rows){\n //print_r($rows);\n if($rows['val'] == 'CONTACTID')\n { \n $contactId = $rows['content'];\n }\n }\n \n }\n return $contactId;\n\n }", "title": "" }, { "docid": "da4ce41b2595fb69ec53312385b18967", "score": "0.5515891", "text": "function LookupAccount($email) {\n\t\tglobal $adb;\n\t\tif($this->_cachedAccountIds[$email]) {\n\t\t\t$this->log(\"Reusing Cached Account Id for email: $email\");\n\t\t\treturn $this->_cachedAccountIds[$email];\n\t\t}\n\n\t\t$accountid = false;\n\t\t$accountres = $adb->pquery(\"SELECT accountid FROM vtiger_account INNER JOIN vtiger_crmentity ON crmid = accountid WHERE setype=? AND (email1 = ? OR email2 = ?) AND deleted = ?\", Array('Accounts', $email, $email, 0));\n\t\tif($adb->num_rows($accountres)) {\n\t\t\t$deleted = $adb->query_result($accountres, 0, 'deleted');\n\t\t\tif ($deleted != 1) {\n\t\t\t\t$accountid = $adb->query_result($accountres, 0, 'accountid');\n\t\t\t}\n\t\t}\n\t\tif($accountid) {\n\t\t\t$this->log(\"Caching Account Id found for email: $email\");\n\t\t\t$this->_cachedAccountIds[$email] = $accountid;\n\t\t} else {\n\t\t\t$this->log(\"No matching Account found for email: $email\");\n\t\t}\n\t\treturn $accountid;\n\t}", "title": "" }, { "docid": "390e85e52a60e72fe10ed2e91feea679", "score": "0.550699", "text": "public function getUserByEmail($email){\n $sql = DB::open()->prepare(\"SELECT u.iduser, u.fullname, u.photo, u.email, u.cpf, u.idagency, a.aglogo FROM hz_users u\n LEFT JOIN hz_agencies a ON a.idagency = u.idagency WHERE email = :email LIMIT 1\");\n $sql->execute([\n \":email\" => filter_var($email, FILTER_SANITIZE_EMAIL)\n ]);\n return ($sql->rowCount() > 0) ? $sql->fetchObject() : null;\n }", "title": "" }, { "docid": "1737c333a05753f80f59867c609ac42f", "score": "0.5505847", "text": "public function getCustomerByEmail($email) {\n\n\t\ttry {\n\t\t $request = $this->client->get(\"customers/$email\"); \n\t\t $response = $request->send();\n\t\t} catch (ResponseException $e) {\n\t $response = $e->getResponse();\n\t\t \n\t\t}\n\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "cab472a3880b9780d75ae9c781dc20c2", "score": "0.550541", "text": "public function checkHash($param)\n {\n // return true if hash match\n $columnConditions = ['hash' => $param['code']];\n $check = QueryBuilder::selectWhere(\"email, hash\" ,'verify', $columnConditions);\n if($check) return $check;\n else return false;\n }", "title": "" }, { "docid": "973228c149865b626e07806003cf1d5c", "score": "0.54859257", "text": "public function findUserByEmail($email);", "title": "" }, { "docid": "fe487370fadb70122d8851f89e1be6fe", "score": "0.54822767", "text": "public function objectFromHash($hash) {\n $this->database->select('*')\n ->from('users')\n ->where('activate_hash', $hash);\n $records = $this->database->get();\n if ($records->num_rows() > 0) {\n return $records->row(0);\n }\n return NULL;\n }", "title": "" }, { "docid": "3907e893c457beb7fd7b75d76c122e65", "score": "0.54709333", "text": "public function find_by_email_pwd($email, $password) {\n $where = ['email' => $email,'password' => $password];\n $result = $this->db->getWhere($where)->result();\n return $result;\n }", "title": "" }, { "docid": "c106a52ba3d7c690d4b6c3c4baff9ad7", "score": "0.5459677", "text": "public function byHash( $hash );", "title": "" }, { "docid": "4f6c8a467bcf9a3a999f8bbe782dae73", "score": "0.54588914", "text": "public static function findByUsername($email)\n {\n return static::findOne(['email' => $email]); //получение из бд нужную почту\n }", "title": "" }, { "docid": "02aee7a197cb087d18ec5f1cfffc0b4f", "score": "0.5446233", "text": "public static function searchUser($hash) {\n\n require_once(\"config/connection.php\");\n \n //Hacemos la conexión\n $db = Connection::connect();\n\n //Consulta\n $sql = \"SELECT nick FROM users WHERE hash = :hash\";\n\n //Preparar consulta\n $resultado = $db->prepare($sql);\n\n //Ejecutar consulta\n $resultado->execute(array(\":hash\"=>$hash));\n\n //Contar usuario\n $count = $resultado->rowCount();\n\n //Si encontró el usuario, devuielve el nick\n if ($count > 0) {\n \n while($row = $resultado->fetch(PDO::FETCH_ASSOC)) {\n $nick = $row[\"nick\"]; \n }\n\n return $nick;\n\n }else {\n return false;\n }\n \n }", "title": "" }, { "docid": "661c5221e8044af9dcef87ba94b26eb9", "score": "0.544448", "text": "public static function find_by_email($email){\r\n $query = self::$database->prepare(\"SELECT * FROM \".static::$table_name.\" WHERE email = :email\");\r\n $query->bindParam(':email',$email);\r\n \r\n $object_array= static::find_by_sql($query);\r\n if(!empty($object_array)){\r\n //retorna o primeiro elemento do inicio do array\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "0d6d0fc426c9caed45dbbcbc35202eff", "score": "0.54390925", "text": "public static function konsumenByEmail($email) {\n\t\t\n $app = \\Slim\\Slim::getInstance();\n \n $sql = \"SELECT konsumen_id, nama, alamat, nohp, email, api_key, status, created_at, last_login, updated_at FROM konsumen WHERE email =:email\"; \n \n $stmt = $app->db->prepare($sql);\n $stmt->execute(array('email'=>$email));\n \n $user=$stmt->fetch(PDO::FETCH_ASSOC);\n \n if($stmt->rowCount() > 0)\n {\n\n // $stmt->close();\n return $user;\n } else {\n return FALSE;\n }\n }", "title": "" }, { "docid": "048bbdf213d44b032eccd853a9fbd69d", "score": "0.54383564", "text": "public function findOneByEmail($email);", "title": "" }, { "docid": "048bbdf213d44b032eccd853a9fbd69d", "score": "0.54383564", "text": "public function findOneByEmail($email);", "title": "" }, { "docid": "0d1eaf0336f1bc088cad3dc868662872", "score": "0.5435098", "text": "public static function getByEmail($email){\n return self::where('email',$email)->first();\n }", "title": "" }, { "docid": "f3c0375c549c69d1f1e2c16babe9a311", "score": "0.54305965", "text": "function fetch_customer_contact_name($proposal_hash) {\r\n\t\tif (!$proposal_hash)\r\n\t\t\treturn;\r\n\r\n\t\t$result = $this->db->query(\"SELECT t2.contact_name AS c\r\n\t\t\t\t\t\t\t\t\tFROM proposals t1\r\n\t\t\t\t\t\t\t\t\tLEFT JOIN customer_contacts t2 ON t2.contact_hash = t1.customer_contact\r\n\t\t\t\t\t\t\t\t\tWHERE t1.proposal_hash = '$proposal_hash' and t1.deleted = 0\");\r\n\t\treturn $this->db->result($result, 0, 'c');\r\n\t}", "title": "" }, { "docid": "47ed2304e1e1540835f580e832c1586e", "score": "0.5422523", "text": "function getUserByEmail() {\n $data = array(\n \"email\" => $this->input->post('email'),\n \"password\" => md5($this->input->post('password'))\n );\n\n $this->db->where($data);\n $result = $this->db->get('user');\n\n return $result->result_array();\n\n }", "title": "" }, { "docid": "7f747010b74eb5ffe1c21a3aecee3f36", "score": "0.54209757", "text": "function verifEmailBdd(string $email)\n {\n $sql = \"SELECT * FROM user WHERE mail = ?\";\n $resultat = $this->getDb()->fetchAssoc($sql, array((string) $email));\n return $resultat;\n }", "title": "" }, { "docid": "bd2d456cb88322d2b7321198b5bdd66a", "score": "0.54201597", "text": "public function getByHash( $hash )\n\t\t{\n\t\t\treturn $this->fetchRow(\n\t\t\t\t$this->select()\n\t\t\t\t\t->where( 'name like ?', '%'. $hash .'%' )\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "bf2fed2009f744b364b14159cf59beee", "score": "0.5419682", "text": "public function byHash($hash);", "title": "" }, { "docid": "db20b0881a9d996c1c993b90c9af0bca", "score": "0.541629", "text": "public function findByLoginAndPass($email, $hash) {\n $sql = \"SELECT * FROM `users` WHERE email='\" . $email . \n \"' AND passhash='\" . $hash . \"'\";\n $array = $this->db->execQuery($sql);\n if(!is_null($array[0]['id'])) {\n return new User($array[0]);\n }\n return null;\n }", "title": "" }, { "docid": "04e164b695c176c8044b0545150f0356", "score": "0.5407051", "text": "public function getByEmail($email) {\r\n $select = $this->_createSelectQuery();\r\n $select->field('id');\r\n \t$select->field('statut');\r\n \t$select->field('email');\r\n \t$select->field('password');\r\n \t$select->field('creation_date');\r\n \t$select->field('language');\r\n \t$select->field('last_connection_date');\r\n \t$select->field('last_persistent_connection_date');\r\n \t$select->field('user_agent');\r\n \t$select->field('ip_address');\r\n \t$select->field('tmp_password');\r\n \t$select->field('tmp_password_expiration_date');\r\n \t$select->field('tmp_email');\r\n \t$select->field('tmp_email_validation_key');\r\n \t$select->field('tmp_email_expiration_date');\r\n \t$select->field('activation_key');\r\n \t$select->field('activation_expiration_date');\r\n $select->from($this->_tableName);\r\n $select->addConditionEquals('email', $email);\r\n\r\n return self::_buildObjectFromRow($this->_selectFirst($select));\r\n }", "title": "" }, { "docid": "a5726d0a01ce3fe87ab9c30daaa9eca3", "score": "0.53992605", "text": "public function fetchUserFromHash($hash)\n\t{\n\t\t$this->loadAndExecutePreparedQuery(self::CHECK_CONFIRMATION_HASH_KEY, array($hash));\n\n\t\treturn ( $this->fetchNextRecord(array('userId')) );\n\t}", "title": "" }, { "docid": "bd5b24ee1ec90e43cc4bbec02c643961", "score": "0.539605", "text": "function get_member_from_email_address($email_address)\n\t{\n\t\tforeach ($this->MEMBER_ROWS_CACHED as $id=>$row)\n\t\t{\n\t\t\tif ($row['m_email_address']==$email_address) return $id;\n\t\t}\n\t\t$row=$this->connection->query_select('f_members',array('*'),array('m_email_address'=>$email_address),'',1);\n\t\tif (!array_key_exists(0,$row)) return NULL;\n\t\t$id=$row[0]['id'];\n\t\t$this->MEMBER_ROWS_CACHED[$id]=$row[0];\n\t\treturn $id;\n\t}", "title": "" }, { "docid": "5f2c256f67dad8168a222dfdd674a665", "score": "0.53805405", "text": "public static function findByPasswordResetToken($token)\n {\n $token = new Token($token);\n $hashed_token = $token->getHash();\n\n $sql = 'SELECT * FROM USERACC\n WHERE UA_PASSWORD_RESET_HASH = :token_hash';\n\n $db = static::getDB();\n\n $stmt = $db->prepare($sql);\n $stmt->bindParam(':token_hash',$hashed_token, PDO::PARAM_STR);\n $stmt->setFetchMode(PDO::FETCH_CLASS, get_called_class());\n $stmt->execute();\n\n $user = $stmt->fetch();\n\n // check expiration date\n if($user)\n {\n\n if(strtotime($user->UA_PASSWORD_RESET_EXPIRY) > time())\n {\n //echo strtotime($user->password_reset_expiry);\n return $user;\n }\n }\n }", "title": "" }, { "docid": "e37819a0118bd4902cdd9e4b70d23eae", "score": "0.53780234", "text": "function get_user_by_email($contact) \n\t{\t\t\n if(empty($contact)) return false;\n return $data=$this->sp_call_single_result(\"SP_GET_USER_BY_EMAIL('\".$contact.\"')\");\t\t\n }", "title": "" }, { "docid": "731ca79cbc48a0fac54cb092e7524300", "score": "0.5375203", "text": "function findByEmail($email) {\n return $this->db->GetRow(\"SELECT * FROM \".T_USERS.\" WHERE LOWER(\".T_USERS.\".user_email)=?\",array(strtolower(trim($email))));\n }", "title": "" }, { "docid": "1daa93feb8e345f508c73fae8dbdebac", "score": "0.5369808", "text": "public static function byEmail($email){\n\n return static::whereEmail($email)->first();\n }", "title": "" }, { "docid": "c63ab2ca9dc357748c37ea27a3bd14eb", "score": "0.5364474", "text": "public function loadByEmail($email) {\n\t\t$db = DB::Instance();\n\t\t$query = 'SELECT DISTINCT u.* FROM users u JOIN person_contact_methods pcm \n\t\t\t\tON (u.person_id=pcm.person_id AND type=\\'E\\' AND lower(contact)='.$db->qstr(strtolower($email)).' AND u.username LIKE '.$db->qstr('%//'.Omelette::getUserSpace()).')';\n\t\t$rows = $db->GetArray($query);\n\t\t\n\t\tif(!is_array($rows) || count($rows)!=1) {\n\t\t\treturn false;\n\t\t}\n\t\t$this->_data=$rows[0];\n\t\t$user = $this->load($rows[0]['username']);\n\t\tif($user===false) {\n\t\t\treturn false;\n\t\t}\n\t\treturn $user;\n\t}", "title": "" }, { "docid": "75419677d14b2dc81caf67db06be400f", "score": "0.5361391", "text": "public function getByEmail($email)\n {\n $customers = $this->em->getRepository('SkedAppCoreBundle:Customer')\n ->findByEmail($email);\n\n if ($customers) {\n return $customers[0];\n }\n return false;\n }", "title": "" }, { "docid": "6ad4077663033bfed1371fb1a424c6a0", "score": "0.53610426", "text": "public function getEmailHash() {\n /**\n * Add vissza az e-mail hash-t figyelembe véve a Gravatar PHP \n * implementásciót\n */\n return hash('md5', strtolower(trim($this->email)));\n }", "title": "" }, { "docid": "fbd28ec9e46f1bd86d75ba8b4ef660a1", "score": "0.5352011", "text": "public function getUserByEmail() {\n $returnValue = false;\n $query = 'SELECT `id`, `email`, `password`, `username`, `color`, CONCAT(`id`,\"\") AS `image` '\n . 'FROM `' . config::PREFIX . 'user` '\n . 'WHERE `email` = :email';\n\n $stmt = database::getInstance()->prepare($query);\n $stmt->bindValue(':email', $this->email, PDO::PARAM_STR);\n\n if ($stmt->execute()) {\n $data = $stmt->fetch(PDO::FETCH_OBJ);\n if (is_object($data)) {\n $this->id = $data->id;\n $this->email = $data->email;\n $this->password = $data->password;\n $this->username = $data->username;\n $this->color = $data->color;\n $this->image = $data->image;\n $returnValue = true;\n }\n }\n return $returnValue;\n }", "title": "" }, { "docid": "99d10e54fe4785aaf6bfb1bd191090c6", "score": "0.5351", "text": "public function loadUserByEmail($email);", "title": "" }, { "docid": "d026e1c53d3077d34464401aeeeb8841", "score": "0.5344275", "text": "public function getSuperByEmailAndPassword($email, $password1) {\n \n $stmt = $this->conn->prepare(\"SELECT * FROM supers WHERE email = ?\");\n \n $stmt->bind_param(\"s\", $email);\n \n if ($stmt->execute()) {\n $super = $stmt->get_result()->fetch_assoc();\n $stmt->close();\n \n // verifying super password\n $salt = $super['salt'];\n $password2 = $super['password'];\n $hash = $this->checkhashSSHA($salt, $password1);\n // check for password equality\n if ($password2 == $hash) {\n // super authentication details are correct\n return $super;\n }\n } else {\n return NULL;\n }\n }", "title": "" }, { "docid": "d53021dd2386989fbdb85453acef4d03", "score": "0.5343913", "text": "public function getClientByEmail($email)\n {\n $collection = $this->_getCollection(self::COLLECTION);\n\n foreach ($collection as $index => $value) {\n if ($value['email'] == $email) {\n return $value;\n }\n }\n\n return null;\n }", "title": "" }, { "docid": "e0cb5967e5ca152fc2f11df01440ee6e", "score": "0.5341167", "text": "function get_customer_email()\n{\n $customer = get_customer();\n if(!$customer) return FALSE;\n return $customer['email'];\n}", "title": "" }, { "docid": "1f89392148ada827a989b451c408bab7", "score": "0.53383434", "text": "function checkEmail($email) {\n global $engine;\n $engine->mysql->where (\"email\", $email);\n $data = $engine->mysql->getOne($engine->prefix.\"accounts\");\n return $data['id'];\n }", "title": "" }, { "docid": "3f5f62f20328b63622af5e3edaf37f80", "score": "0.53377527", "text": "public function getUserDetailsByEmailAddress()\n {\n $query = 'SELECT * FROM '.$this->table.' WHERE email = :email';\n $stmt = $this->conn->prepare($query);\n $stmt->bindValue(':email', $this->email, PDO::PARAM_STR);\n\n $stmt->execute();\n return $stmt->fetch(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "18ca461cab0cab7aa88315d7bf45986a", "score": "0.53369427", "text": "function getByEmail()\r\n{\r\n $this->query = \"SELECT *\r\n\t\t\tFROM USUARIOS\r\n\t\t\tWHERE \r\n\t\t\t\temail = '$this->email'\r\n\t\t\t\";\r\n\r\n\t$this->get_one_result_from_query();\r\n\t\r\n\tif ($this->feedback['code'] == '00007')\r\n\t{\r\n\t\t$this->code=\"000075\";\r\n\t\t$this->ok=false; // no existe usuario con ese email\r\n\t\t$this->construct_response();\r\n\t\t\treturn $this->feedback; \r\n\t}\r\n\r\n\treturn $this->rows;\r\n}", "title": "" }, { "docid": "b42f3969267ec423c9d94aa502d21a82", "score": "0.532832", "text": "public function checkEmail($email)\n{\n $query = \"SELECT `first_name` ,`user_email`, `hash`\n FROM `members`\n WHERE `user_email` = '\" . $email . \"' Limit 1\";\n $result = mysqli_query($this->dbCon, $query);\n if (($result) && (mysqli_num_rows($result) == 1)) \n {\n //$user_data = mysqli_fetch_array($result);\n return true;\n \n}\nelse\n{\n return false;\n}\n\n}", "title": "" }, { "docid": "287c01e7ab23846cb54373a6feacb91f", "score": "0.53271604", "text": "static function hash($email,$password) {\n\t\t$em_hash = sprintf(\"%u\",crc32($email));\n\t\treturn hash('sha1',$em_hash.$password);\n\t}", "title": "" }, { "docid": "af86d702ddfec654431e7cafccca06b1", "score": "0.5326516", "text": "public function getByEmail($email)\n {\n \t$user = User::where('email','=',$email);\n \treturn $user;\n }", "title": "" }, { "docid": "3c8c886c3f801943f0f5b4f39c44369b", "score": "0.5299743", "text": "function findEmail($email) {\n\n $status = array('error'=>false, 'errorMsgs'=>array(), 'techMsgs'=>array(), 'msgs'=>array(), 'data'=>array());\n\n $this->userInfo = array();\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tt_address');\n $queryBuilder->getRestrictions()->removeAll();\n $statement = $queryBuilder\n ->select('*')\n ->from('tt_address')\n ->where(\n $queryBuilder->expr()->eq('email', $queryBuilder->createNamedParameter($email))\n )\n ->execute();\n $row = $statement->fetch(); \n if ($row){\n $status['table'] = 'tt_address';\n $status['data'] = $row;\n\n if( $row['hidden'] || $row['deleted'] ){\n $status['subscriptionStatus'] = 'unsubscribed';\n }else{\n $status['subscriptionStatus'] = 'subscribed';\n } \n \n return $status;\n\n }else{\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('fe_users');\n $statement = $queryBuilder\n ->select('uid', 'name', 'module_sys_dmail_newsletter')\n ->from('fe_users')\n ->where(\n $queryBuilder->expr()->eq('email', $queryBuilder->createNamedParameter($email))\n )\n ->execute();\n $row = $statement->fetch(); \n if ($row){\n $status['table'] = 'fe_users';\n $status['data'] = $row;\n\n if( $row['module_sys_dmail_newsletter'] ){\n $status['subscriptionStatus'] = 'subscribed';\n }else{\n $status['subscriptionStatus'] = 'unsubscribed';\n }\n return $status;\n\n }else{ \n $status['subscriptionStatus'] = 'notFound';\n return $status;\n } \n }\n }", "title": "" }, { "docid": "274b043b015aa562baa763960f6b041c", "score": "0.5298434", "text": "public function getUserByEmailAndPassword($email, $password) {\n \t$con = $this->db->connect();\n $result = mysqli_query($con, \"SELECT * FROM `users` WHERE email = '$email'\") or die(mysql_error());\n // check for result \n $no_of_rows = mysqli_num_rows($result);\n if ($no_of_rows > 0) {\n $result = mysqli_fetch_array($result);\n $salt = $result['salt'];\n $encrypted_password = $result['encrypted_password'];\n $hash = $this->checkhashSSHA($salt, $password);\n // check for password equality\n if ($encrypted_password == $hash) {\n // user authentication details are correct\n return $result;\n }\n } else {\n // user not found\n return false;\n }\n }", "title": "" }, { "docid": "f212939d16df718688ebb388ab27b983", "score": "0.5286167", "text": "public function checkCredentialsEmail()\n {\t\n\t\t$this->sql = \"SELECT cust_id FROM customer WHERE cust_email = '\".addslashes($this->cust_email).\"';\";\n\t\t$this->connect->query($this->sql);\n\t\t$result = $this->connect->resultArray();\n\t\tif(!empty($result[0]))\n\t\t{\n\t\tforeach ($result[0] as $col => $val)\n\t\t{\n\t\t$this->$col = $val;\t\n\t\t}\n\t\t}\n }", "title": "" }, { "docid": "b9062b736db4b20d29d39b24dd3d441c", "score": "0.5285752", "text": "public function getSenderActivationMail($email);", "title": "" }, { "docid": "692e9d2dce8a0fd76dcf33e826bda833", "score": "0.52848613", "text": "function verifyMember($hash)\n\t{\n\n\t\t$this->db->select('*');\n\t\t$this->db->from('g_member');\n\t\t$this->db->where('HASH', $hash);\n\t\t$this->db->where('STATUS', 'PENDING');\n\n\t\t$query = $this->db->get();\n\n\t\treturn $query;\n\t}", "title": "" } ]
44d504d92986c1ceda063567f1c9516f
Dispatch a command to its appropriate handler in the current process.
[ { "docid": "c0b492c47309f577ca54003b85a2e111", "score": "0.0", "text": "function dispatch_now(mixed $job, mixed $handler = null): mixed\n{\n return Container::getInstance()->make(Dispatcher::class)->dispatchNow($job, $handler);\n}", "title": "" } ]
[ { "docid": "b27a183aac937068343b19ad0d491757", "score": "0.74430346", "text": "public function dispatchToQueue($command);", "title": "" }, { "docid": "f803baf1b07e9b2f4b714faefed0f0af", "score": "0.70906484", "text": "public function dispatch($inputCommand) {\n\t\t$app = $this->getApplication();\n\t\t$commandParts = explode(' ', $inputCommand);\n\t\t$app->setCommandParts($commandParts);\n \n try{\n call_user_func_array(array($app, 'handle'), $commandParts);\n } catch(Exception $e) {\n self::sendCommand('throw ' . get_class($e) . ' ' . $e->getMessage() . ' ' . $e->getCode());\n }\n\t}", "title": "" }, { "docid": "9e8493b98e3a1f6b0c6ae14bd79faf70", "score": "0.6991001", "text": "private static function _dispatch($command)\n\t{\n\t\t$dispatcher = self::_getDispatcher();\n\t\t$commandEvent = new CommandEvent(PluginEvents::COMMAND, $command, self::_getIO(), self::_getIO());\n\t\t$dispatcher->dispatch($commandEvent->getName(), $commandEvent);\n\t}", "title": "" }, { "docid": "969f3737018c52573240649a14d0c003", "score": "0.6916745", "text": "public function dispatch(PhoreAbstractCmd $cmd);", "title": "" }, { "docid": "a9392fa5b63518281ed85de2fba504a5", "score": "0.68865955", "text": "public function handle()\n {\n foreach ($this->usedCommands as $type => $commandName) {\n $method = 'call' . ucfirst(strtolower($type));\n\n if (!method_exists($this, $method)) {\n $method = 'callDefault';\n }\n\n call_user_func_array(\n [$this, $method],\n [ $commandName, $type]\n );\n }\n }", "title": "" }, { "docid": "b35ba01cecf5d9f97e1d37f1415dcdfe", "score": "0.6729807", "text": "public function dispatch($command){\n\t\tswitch($command) {\n\t\t\tcase 'refreshsourcedata': return $this->refreshSourceData($_POST['path']);\n\t\t\tcase 'refreshdatabase': return $this->refreshDatabase();\n\t\t\tdefault:\n\t\t\t\treturn new Response(Response::NOTFOUND, \"Command '$command' not recognized\");\n\t\t}\n\t}", "title": "" }, { "docid": "5214e37f7ef7f297626c807c465967f6", "score": "0.6680022", "text": "protected function dispatch(string $cmd, string $arg)\n {\n $this->log->info(\"C: {$cmd} \" . mb_strimwidth($arg, 0, 50, \"...\"));\n $cmd = strtoupper($cmd);\n switch ($cmd) {\n case 'HELO':\n $this->heloCommand($arg);\n break;\n\n case 'EHLO':\n $this->ehloCommand($arg);\n break;\n\n case 'AUTH':\n $this->authCommand($arg);\n break;\n\n case 'MAIL':\n $this->mailCommand($arg);\n break;\n\n case 'RCPT':\n $this->rcptCommand($arg);\n break;\n\n case 'DATA':\n // Data command might take longer\n // with big attachments and the such.\n $this->resetTimer(20);\n $this->dataCommand($arg);\n break;\n\n case 'RSET':\n $this->rsetCommand($arg);\n break;\n\n case 'HELP':\n $this->helpCommand($arg);\n break;\n\n case 'QUIT':\n $this->quitCommand($arg);\n break;\n\n case 'NOOP':\n $this->noopCommand($arg);\n break;\n\n default:\n $this->notImplemented();\n }\n }", "title": "" }, { "docid": "4cb5190c7ef134ed018cc813614d2d4e", "score": "0.6672525", "text": "public function handle(Command $command);", "title": "" }, { "docid": "4cb5190c7ef134ed018cc813614d2d4e", "score": "0.6672525", "text": "public function handle(Command $command);", "title": "" }, { "docid": "f7a617dbc33a2a84b27fcfa8101f8f84", "score": "0.6320383", "text": "public function dispatch(CommandInterface $command): void\n {\n $this->commandBus->dispatch($command);\n }", "title": "" }, { "docid": "d92454afadfbdf3eac9ce87da61d571b", "score": "0.6319451", "text": "public function execute($command)\n\t{\n\t\t// Check if the given Command is an Object\n\t\tif ( ! is_object($command) ) throw new BadCommandException($command);\n\n\t\t// Get the qulified handler Classname to handle the Command\n\t\t$handler = get_class($command) . 'Handler';\n\n\t\t// Check if the Handler exists\n\t\tif ( ! class_exists($handler) ) throw new HandlerNotFoundException($handler);\n\n\t\t// Resolve the Handler ... and we're done\n\t\treturn App::make($handler)->handle($command);\n\t}", "title": "" }, { "docid": "6a191bf513b6b044e8d4c8281724460c", "score": "0.6221417", "text": "public function handle(Command $command)\n {\n }", "title": "" }, { "docid": "fd606a72e28cc57aef381974c68acf60", "score": "0.61916506", "text": "abstract protected function queueCommand($command);", "title": "" }, { "docid": "69eec097a6b79aed310542cba6f5ddae", "score": "0.6118612", "text": "public function handle()\n {\n foreach ($this->commands as $clz) {\n app($clz)->handle($this);\n }\n }", "title": "" }, { "docid": "5627dd03acc956841b9d8fb5011377c1", "score": "0.59217834", "text": "public function handle() {\n\t\t\n\t\tif(in_array( $this->http_method, self::$verbs)){\n\t\t\t$this->dispatch();\n\t\t}else {\n\t\t\terror_405();\n\t\t}\n\t}", "title": "" }, { "docid": "91fb063f260319a90a2b840bba24345e", "score": "0.5910704", "text": "public function handle(TacticianCommandHandled $oCommand)\n {\n $oInnerCommand = $oCommand->getCommand();\n \n \n if($oInnerCommand instanceof HasEventInterface) {\n \n $this->oEventDispatcher->dispatch($oInnerCommand->getEventName(),$oInnerCommand->getEvent());\n }\n \n }", "title": "" }, { "docid": "ed99656daa9c1225c09fa6d0bcac81c9", "score": "0.5866004", "text": "public function process()\n {\n $this->availableCommands = $this->availableCommands();\n\n // Check if command exists\n // If not, return\n if (! $this->commandExists()) {\n return $this->fail('cli_error_command_not_found');\n }\n\n $commandClass = $this->getCommand($this->commandCalled);\n\n if (! class_exists($commandClass)) {\n return $this->fail('cli_error_command_not_found');\n }\n\n // Try and initialize command\n $command = new $commandClass();\n\n $command->loadOptions();\n\n if ($command->option('-h', false)) {\n return $command->help();\n }\n\n // Run command\n $message = $command->handle();\n\n // Return output and end\n $this->complete($message);\n }", "title": "" }, { "docid": "6f4475cf8fcdff97a0bbb248c1d3ead3", "score": "0.5840959", "text": "public function handle()\n {\n $httpMethod = $_SERVER['REQUEST_METHOD'];\n $uri = $_SERVER['REQUEST_URI'];\n\n // Strip query string (?foo=bar) and decode URI\n if (false !== $pos = \\strpos($uri, '?')) {\n $uri = \\substr($uri, 0, $pos);\n }\n $uri = \\rawurldecode($uri);\n\n $routeInfo = $this->dispatcher->dispatch($httpMethod, $uri);\n switch ($routeInfo[0]) {\n case FastRoute\\Dispatcher::NOT_FOUND:\n \\http_response_code(404);\n\n echo $this->blade->view('errors.404');\n break;\n case FastRoute\\Dispatcher::METHOD_NOT_ALLOWED:\n// $allowedMethods = $routeInfo[1];\n \\http_response_code(405);\n // ... 405 Method Not Allowed\n break;\n case FastRoute\\Dispatcher::FOUND:\n $handler = $routeInfo[1];\n $vars = $routeInfo[2];\n\n echo $this->routeHandler->$handler($this->blade, $vars);\n break;\n }\n }", "title": "" }, { "docid": "4799bf38acf5ac6aa4f2d565af431bf5", "score": "0.58327377", "text": "public function getHandler($command)\n\t{\n\t\t// not required as it is just a decorator around another bus\n\t}", "title": "" }, { "docid": "852bdd39614012a487de259a4352afa0", "score": "0.57771707", "text": "public function handle(CommandInterface $command);", "title": "" }, { "docid": "852bdd39614012a487de259a4352afa0", "score": "0.57771707", "text": "public function handle(CommandInterface $command);", "title": "" }, { "docid": "8c05d5c641610e3dd7323905d6e6787f", "score": "0.57459646", "text": "function execute() {\n\t\t$command = $this->command;\n\t\t$this->$command();\n\t}", "title": "" }, { "docid": "a1abfb77e56f8e6840d6be651c94c404", "score": "0.57323015", "text": "public function handle() {\n\t\t$actions = func_get_args();\n\t\t\n\t\tif ($actions == array('*')) {\n\t\t\t$this->__handledActions = array('*');\n\t\t} else if (is_array($actions) && !empty($actions)) {\n\t\t\t$this->__handledActions = array_intersect($actions, get_class_methods($this->Controller));\n\t\t}\n\t}", "title": "" }, { "docid": "f04b0bc2c4b22c6210324ff84ac9b312", "score": "0.57146335", "text": "public function dispatch($cmd, $params)\n {\n Args::opt_string($cmd);\n Args::req_array($params);\n\n $method = !isset($cmd) ? 'cmd_default' : \"cmd_$cmd\";\n $method = str_replace('-', '_', $method);\n\n if (!method_exists($this, $method))\n return \"{$this->topic}: Unknown command \\\"$cmd\\\"\";\n\n try {\n return $this->{$method}($params);\n } catch (ReportableException $re) {\n return sprintf(\"%s %s: %s\", $this->topic, $cmd, $re->getMessage());\n }\n }", "title": "" }, { "docid": "8f393888b6f5a75df36add7969004c4a", "score": "0.5702508", "text": "public function handle()\n {\n if ($this->useTransaction) {\n\n \\DB::transaction(function () {\n $this->executeHandle();\n });\n\n } else {\n $this->warn(\"WARNING: This command is executing without using a transaction.\");\n $this->executeHandle();\n }\n }", "title": "" }, { "docid": "a754c4b1f04e35ff54de14112008647c", "score": "0.5692283", "text": "public function handle(): void\n {\n $this->action->execute();\n }", "title": "" }, { "docid": "65cddde5f441dd02b01dc2cb4764383c", "score": "0.5675755", "text": "public function handle()\n {\n $this->action();\n\n if (method_exists($this, 'fire')) {\n return parent::fire();\n } else {\n return parent::handle();\n }\n }", "title": "" }, { "docid": "14b7da495af6b7c433ed146396d92e9b", "score": "0.5660841", "text": "public function handle()\n {\n $this->call('make:drupaljsonapi-interface', [\n 'name' => $this->getEntityNameInput()\n ]);\n\n $this->fire();\n\n $this->call('make:drupaljsonapi-cachedecorator', [\n 'name' => $this->getEntityNameInput()\n ]);\n }", "title": "" }, { "docid": "214db64564eb5fb525dcefc082b37a72", "score": "0.5621779", "text": "function commandProcessor($commandId)\n{\n\tglobal $ajax;\n\n\tswitch ((int)$commandId)\n\t{\n\t\tcase 1:\t\t// View\n\t\t\tviewRecordView();\n\t\t\tbreak;\n\t\tcase 2:\t\t// Update\n\t\t\tupdateRecordView();\n\t\t\tbreak;\n\t\tcase 3:\t\t// Insert\n\t\t\tinsertRecordView();\n\t\t\tbreak;\n\t\tcase 4:\t\t// Delete\n\t\t\tdeleteRecordView();\n\t\t\tbreak;\n\t\tcase 5:\t// Submit Update\n\t\t\tupdateRecordAction();\n\t\t\tbreak;\n\t\tcase 6:\t// Submit Insert\n\t\t\tinsertRecordAction();\n\t\t\tbreak;\n\t\tcase 7:\t// Submit Delete\n\t\t\tdeleteRecordAction();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t// If we get here, then the command is undefined.\n\t\t\t$ajax->sendCode(ajaxClass::CODE_NOTIMP,\n\t\t\t\t'The command ' . $_POST['COMMAND'] .\n\t\t\t\t' has not been implemented');\n\t\t\texit(1);\n\t\t\tbreak;\n\t}\n}", "title": "" }, { "docid": "b6f999f7bd7163d17f625fa1eca6df2c", "score": "0.5620836", "text": "public function dispatch() {}", "title": "" }, { "docid": "b2ec6a4f4eb0f71218ecb3e3e682a1f8", "score": "0.5619888", "text": "public function handle() {\n\t\t$route = $this->param( 'route' );\n\t\t$route = preg_replace( '#([^a-zA-Z0-9-])#', '', $route );\n\t\t$method_name = $route . 'Action';\n\n\t\treturn $this->{$method_name}();\n\t}", "title": "" }, { "docid": "88455c4310bdd25a76f49254d141352d", "score": "0.56123406", "text": "public function dispatch()\n\t{\n\t\t// Check everything is setup\n\t\tif (!count($this->_actionMap)) {\n\t\t\tthrow new Exception('Cannot execute - no actions defined');\n\t\t}\n\t\t\n\t\t// Parse the URI\n\t\t$requestName\t= $this->_getRequestAction();\n\t\t\n\t\t// Populate PHP _GET variable\n\t\t$this->_populateGet();\n\t\t\n\t\t// Find the action to execute\n\t\t$action\t= $this->_getActionHandler($requestName);\n\t\t\n\t\t// Execute the action\n\t\tswitch (HagfishController::getActionType($action)) {\n\t\t\t\n\t\t\tcase HagfishController::TYPE_CLASS:\n\t\t\t\t$this->_executeClassAction($action); \n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase HagfishController::TYPE_HAGFISH_ACTION:\n\t\t\t\t$this->_executeHagfishAction($action); \n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase HagfishController::TYPE_OBJECT:\n\t\t\t\t$this->_executeObjectAction($action); \n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase HagfishController::TYPE_FUNCTION:\n\t\t\t\t$this->_executeFunctionAction($action);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase HagfishController::TYPE_CLOSURE:\n\t\t\t\t$this->_executeClosureAction($action);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase HagfishController::TYPE_UNKNOWN:\n\t\t\t\tthrow new Exception('No valid handler for ' . $requestName);\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "34aae6b28532b99c2fb2e1e2b691c6b6", "score": "0.5608617", "text": "abstract public function runHandler();", "title": "" }, { "docid": "7be08e53ee7897162aca1841e2b1a8ca", "score": "0.56010395", "text": "public function handle()\n {\n $this->info('Start running command');\n RequestWasReceived::dispatch()\n ->onConnection('database');\n $this->info('Finish running command');\n\n return;\n }", "title": "" }, { "docid": "47e6b90ecfc2cde55c39b48b33c3d291", "score": "0.55800825", "text": "public function dispatch() {\n $httpMethod = $_SERVER['REQUEST_METHOD'];\n $uri = $_SERVER['REQUEST_URI'];\n\n // Strip query string (?foo=bar) and decode URI\n if (false !== $pos = strpos($uri, '?')) {\n $uri = substr($uri, 0, $pos);\n }\n\n $uri = rawurldecode($uri);\n\n $routeInfo = $this->dispatcher->dispatch($httpMethod, $uri);\n switch ($routeInfo[0]) {\n case FastRoute\\Dispatcher::NOT_FOUND:\n // ... 404 Not Found\n http_response_code(404);\n echo '404 not found';\n break;\n case FastRoute\\Dispatcher::METHOD_NOT_ALLOWED:\n $allowedMethods = $routeInfo[1];\n http_response_code(405);\n echo '405 Method Not Allowed';\n // ... 405 Method Not Allowed\n break;\n case FastRoute\\Dispatcher::FOUND:\n $handler = $routeInfo[1];\n $vars = $routeInfo[2];\n list($class, $method) = explode(\":\", $handler, 2);\n call_user_func_array(array(new $class, $method), $vars);\n break;\n }\n }", "title": "" }, { "docid": "d95ad8fdede5b1e70ac46843e5e4af70", "score": "0.55750394", "text": "public function dispatch();", "title": "" }, { "docid": "d95ad8fdede5b1e70ac46843e5e4af70", "score": "0.55750394", "text": "public function dispatch();", "title": "" }, { "docid": "b40bdddb25579c4a2a9d2d2449cfccea", "score": "0.55627316", "text": "public function handle()\n {\n $action = $this->argument('action');\n if (!in_array($action, self::$actions)) {\n echo \"命令参数:{action} {--id=} {--type=} {--time=}\" . PHP_EOL;\n exit;\n }\n $this->$action($this->option('id'), $this->option('type'), $this->option('time'));\n }", "title": "" }, { "docid": "efc6a1265057f62f03fa1589071aa1b9", "score": "0.55228156", "text": "public function handle()\n {\n $action_method_name = 'action_' . $this->argument('action');\n\n $action_method_name = str_replace('-', '_', $action_method_name);\n\n if (!method_exists($this, $action_method_name)) {\n $this->error('Bad action - ' . $this->argument('action'));\n return;\n }\n\n $this->$action_method_name();\n }", "title": "" }, { "docid": "f9a4bc1a6b52927d8baa607827863489", "score": "0.55211073", "text": "public function dispatch(): void {}", "title": "" }, { "docid": "15f49e41392fe4249ea4e09fafb1eaf0", "score": "0.55167705", "text": "public function handle()\n {\n $request = new Request();\n $subCon = new SubjectController();\n $subCon->staticSubjectLeagues($request);\n\n $type = $this->argument('type');\n switch ($type) {\n case \"pc\":\n $this->onPcHandler($request);\n break;\n case \"mobile\":\n $this->onMobileHandler($request);\n break;\n case \"mip\":\n $this->onMipHandler($request);\n break;\n case \"all\":\n $this->onPcHandler($request);\n $this->onMobileHandler($request);\n $this->onMipHandler($request);\n break;\n }\n $this->onCommonHandler($request);\n }", "title": "" }, { "docid": "a3aa5d5e8de1c1c8b8c9710ab41ffa66", "score": "0.54949063", "text": "public function dispatch() {\n EventBus::dispatch($this);\n }", "title": "" }, { "docid": "d7d7e185738b5f8777f655068ef45050", "score": "0.54903513", "text": "public function dispatch(): void;", "title": "" }, { "docid": "3a181daed0900bb2af9f368264e53607", "score": "0.54788715", "text": "public function handle()\n {\n if (parent::handle() === false && ! $this->option('force')) {\n return;\n }\n\n if ($this->option('facade')) {\n $this->call(\"route:facade\", $this->getCommandOptions());\n }\n\n $this->callSilent('route:clear');\n }", "title": "" }, { "docid": "61da06a327f27c54b2f0816e7a389674", "score": "0.54784185", "text": "public function handle()\n\t{\n\t\tApp::call([$this->notification, 'handle']);\n\t}", "title": "" }, { "docid": "516cb006685cd5c1edfa8865b1a52c53", "score": "0.54499006", "text": "function commandProcessor($commandId)\n{\n\tglobal $ajax;\n\n\tswitch ((int)$commandId)\n\t{\n\t\tcase 90:\n\t\t\tloadModule();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t// If we get here, then the command is undefined.\n\t\t\t$ajax->sendCode(ajaxClass::CODE_NOTIMP,\n\t\t\t\t'The command ' . $_POST['COMMAND'] .\n\t\t\t\t' has not been implemented');\n\t\t\texit(1);\n\t\t\tbreak;\n\t}\n}", "title": "" }, { "docid": "4a18d454d03aec47e82f8d1c7b814615", "score": "0.54480404", "text": "public function handle()\n {\n $this->call('make:tactician:command', $this->getNameArgument());\n $this->call('make:tactician:handler', $this->getNameArgument());\n }", "title": "" }, { "docid": "416be3401d9f109bc1af82e1e3893d1c", "score": "0.54435605", "text": "public function dispatch()\n\t{\n\t\t$this->checkRoute();\n\n\t\t//create controller object\n\t\t$controllerClass = $this->controller();\n\t\t$controller = new $controllerClass();\n\n\t\t//get controller method\n\t\t$method = $this->method();\n\t\t$params = $this->id() ? array($this->id()) : array($this->params());\n\n\t\t// call class method with params\n\t\tcall_user_func_array(array($controller, $method), $params);\n\t}", "title": "" }, { "docid": "06c007c3dd52d917f5c755fe0a2d02ef", "score": "0.54395014", "text": "public function handle()\n {\n $this->validateRequest() or $this->sendErrorResponse();\n\n $context = $this->context();\n $task = $this->task();\n $requestData = $this->request->all();\n\n if (!$context) {\n $this->ajaxJsonRequest->sendJsonError([\n 'message' => $this->invalidContextMessage(),\n ]);\n }\n\n $this->dispatcher->dispatch($context, $task, $requestData);\n }", "title": "" }, { "docid": "e3f30504ad22290090acdc25d24d1a9e", "score": "0.5435311", "text": "public function handle()\n\t{\n\t\ttry {\n\t\t\tif ($this->option('interactive')) {\n\t\t\t\textract($this->runInteractiveConnect());\n\t\t\t} else {\n\t\t\t\textract($this->getArgumentConnect());\n\t\t\t}\n\n\t\t\t$this->buildMethod($model, $relation, $toModel);\n\t\t} catch (Exception $e) {\n\t\t\treturn $this->error($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "91bc27d08fea6118df79ee6df5514b5c", "score": "0.54267573", "text": "public function execute()\n {\n $req = array(\n 'path' => $this->path, // current middleware uri\n 'originalUrl' => parse_url($_SERVER['REQUEST_URI']), // requested uri\n 'host' => $_SERVER['HTTP_HOST'], // server http host\n 'ip' => $_SERVER['REMOTE_ADDR'], // remote client ip address\n 'method' => $_SERVER['REQUEST_METHOD'], // http request method\n 'require' => function ($path) { require $path; } // require method\n );\n $this->_exec($req);\n }", "title": "" }, { "docid": "a8cb4da615ee18702e117b36d0edab9a", "score": "0.5416993", "text": "function dispatch(){\n # variables, then in POST variables, and if not found\n # call the 'main' event\n\n if (\n array_key_exists($this->event_var,$_GET) && \n $_GET[$this->event_var] != '' &&\n $this->_isa_child_class_method($_GET[$this->event_var])\n ){\n $event = $_GET[$this->event_var];\n } elseif (\n array_key_exists($this->event_var,$_POST) && \n $_POST[$this->event_var] != '' &&\n $this->_isa_child_class_method($_POST[$this->event_var])\n ){\n $event = $_POST[$this->event_var];\n } else {\n $event = 'main';\n }\n\n # Invoke event; Make method call\n $this->$event();\n\n }", "title": "" }, { "docid": "4139db7095688bba8bc821e07de4e624", "score": "0.54158556", "text": "public function backendInvoke() {\n drush_set_context('DRUSH_LOG_CALLBACK', '_drushd_print_log');\n $this->isDaemon = TRUE;\n $this->outputHandler = new OutputHandler($this->logFilename);\n $this->outputHandler->start();\n\n // @todo, actually add some error handling inside the command methods. ;)\n try {\n $this->callCommandMethod();\n } catch (Exception $e) {\n drush_log(dt('Caught exception: @message', array('@message' => $e->getMessage())), 'error');\n }\n\n $this->outputHandler->end();\n }", "title": "" }, { "docid": "7c15ca27f9f4c4869de14d93ecf10a9a", "score": "0.54136276", "text": "public function handle()\n {\n $this->fire();\n }", "title": "" }, { "docid": "35e1021fbb840db178ac2fd61e959215", "score": "0.5372164", "text": "public function handleCommand(): void\n {\n $commandName = $this->argument('name');\n\n $this->createEventFile($commandName);\n $this->createEventHandlerFile($commandName);\n }", "title": "" }, { "docid": "18b298c0e840987fad4b87a54b5ae37f", "score": "0.53535527", "text": "function performCommand($cmd)\n\t{\n\t\tswitch ($cmd)\n\t\t{\n\t\t\tcase \"configure\":\n\t\t\tcase \"save\":\n\t\t\t\t$this->$cmd();\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "36422c88646dbd8afe7b1ad0a05b8b98", "score": "0.53348404", "text": "public function handle()\n {\n //\n\t\tglobal $argv;\n $arg = $this->argument('action');\n $argv[1] = $argv[2];\n $argv[2] = isset($argv[3]) ? \"-{$argv[3]}\" : '';\n switch ($arg) {\n case 'start':\n $this->start();\n break;\n case 'stop':\n break;\n case 'restart':\n break;\n case 'reload':\n break;\n case 'status':\n break;\n case 'connections':\n break;\n }\n }", "title": "" }, { "docid": "8ee686696658d5f18b75e2f78c0d2759", "score": "0.53317225", "text": "public function handle()\n\t{\n\t\tswitch ($this->option('function')) {\n\t\t\tcase 'pull':\n\t\t\t\t$this->dispatch(new \\App\\Jobs\\PullProperties());\n\t\t\t\tbreak;\n\n\t\t\tcase 'remove':\n\t\t\t\t$this->dispatch(new \\App\\Jobs\\RemoveProperties());\n\t\t\t\tbreak;\n\n\t\t\tcase 'clean':\n\t\t\t\t$this->dispatch(new \\App\\Jobs\\RemoveUnrelatedImages());\n\t\t\t\tbreak;\n\n\t\t\tcase 'elastic';\n\t\t\t\t$this->dispatch(new \\App\\Jobs\\CleanElastic());\n\t\t\t\tbreak;\n\n\t\t\tcase 'killall';\n\t\t\t\t$this->dispatch(new \\App\\Jobs\\KillAllProperties());\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$this->error('Your must specify either a pull, clean, or remove function');\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "2317199ad75b5cf3d719323dd5491902", "score": "0.5329504", "text": "public function dispatch() {\n\t\tforeach ( self::$handlers as $event => $args ) {\n\t\t\t$class\t= 'BB\\\\'. $event\n\t\t\t\n\t\t\tif ( null == $args ) {\n\t\t\t\tself::$loaded[] = new $class();\n\t\t\t} else {\n\t\t\t\tself::$loaded[] = new $class( $args );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "297cd86f3414add772b1a88eb3954d62", "score": "0.5329488", "text": "protected function handle()\n {\n if ($this->request->hostname->website) {\n app('Illuminate\\Contracts\\Bus\\Dispatcher')\n ->dispatchNow(new WebserverCommand($this->request->hostname->website_id, 'update'));\n }\n }", "title": "" }, { "docid": "b4e2d65f5e4642490790a6325dabd6cf", "score": "0.53083", "text": "public function send(Command $command) : Response;", "title": "" }, { "docid": "1d26fc346809e3bf25f85c96dfc957ee", "score": "0.5292289", "text": "public function dispatch(AsyncJob $job)\n {\n $command = $job->getCommand();\n if (!array_key_exists($command, $this->knownHandlers)) {\n throw new InvalidArgumentException(\"Unknown async job type '$command'.\");\n }\n\n // clear entity cache to make sure the job will load fresh data from DB\n $jobId = $job->getId();\n $this->entityManager->clear();\n $jobReloaded = $this->asyncJobs->findOrThrow($jobId);\n\n\n // pending handler is set so it can be interrupted by async handler\n $this->pendingHandler = $this->knownHandlers[$command];\n $this->pendingHandler->execute($jobReloaded);\n $this->pendingHandler = null;\n }", "title": "" }, { "docid": "fd3128a2291fde4d0781de4989a143b1", "score": "0.5284708", "text": "private function translateToHandler($command)\n {\n $reflection = new ReflectionClass($command);\n\n $commandName = $reflection->getShortName();\n $namespace = $reflection->getNameSpaceName();\n\n if (! stripos($commandName, 'Command')) {\n throw new InvalidCommandException('The provided command name is invalid. Command must have \"Command” in it!');\n }\n\n $handler = $namespace . '\\\\Handlers\\\\' . str_replace('Command', 'CommandHandler', $commandName);\n \n if (! class_exists($handler)) {\n throw new HandlerNotRegisteredException(\"The command handler class $handler does not exist\");\n }\n\n return $handler;\n }", "title": "" }, { "docid": "32e8e4b54d51c4761224d9a231a125f3", "score": "0.52835673", "text": "public function resolveHandler($command)\n {\n if ($command instanceof SelfHandlingInterface) {\n return $command;\n }\n\n $className = get_class($command);\n\n if (isset($this->handlers[$className])) {\n return Yii::createObject(explode('@', $this->handlers[$className])[0]);\n }\n\n throw new InvalidParamException(\"No handler registered for command $className\");\n }", "title": "" }, { "docid": "e69ea66c54e81fd4b2cdb99996d3e74d", "score": "0.5279537", "text": "public function dispatch()\n {\n // strange situation, we should flag it\n if (empty($_SERVER['argc'])) {\n return self::_error('$_SERVER[argc] is not defined, how come?');\n }\n\n $argc = $_SERVER['argc'];\n\n // if there are not enough arguments\n if ($argc < 2) {\n return self::_error(\n 'FaZend ' . FaZend_Revision::VERSION . ' (' . FaZend_Revision::get() . \") is alive\\n\" .\n 'You started the application from the command line (\"php index.php\" or something), not from Web. ' .\n 'In such a case you should specify a class name, ' . \n 'which has to be located in APPLICATION_PATH/cli and should be ' .\n 'an instance of FaZend_Cli_Interface, e.g. \"php index.php Backup\" (\"Backup\" is a sample class name).'\n );\n }\n\n // strange situation, we should flag it\n if (empty($_SERVER['argv'])) {\n return self::_error('$_SERVER[argv] is not defined, how come?');\n }\n\n $argv = $_SERVER['argv'];\n\n $cliName = $argv[1];\n\n return $this->call($cliName);\n }", "title": "" }, { "docid": "425abc65cd714cbb4d39d0ae19a0a77e", "score": "0.52543443", "text": "public function handle()\n {\n MessagingAmqpService::declareSysQueues();\n ExchangeService::bindAllExchanges();\n MessagingAmqpService::listen(\n config('amqp.commands_queue'),\n [ MessageService::class, 'consumeLog' ]\n );\n }", "title": "" }, { "docid": "c32a2f03001410502a26e12c2dcb41ca", "score": "0.52506053", "text": "public function doExecute( ipsRegistry $registry )\n\t{\n\t\t/* What to do? */\n\t\tswitch( $this->request['do'] )\n\t\t{\n\t\t\tdefault:\n\t\t\tcase 'albumSelector':\n\t\t\t\t$this->_albumSelectorSplash();\n\t\t\tbreak;\n\t\t\tcase 'albumSelectorPane':\n\t\t\t\t$this->_albumSelectorPane();\n\t\t\tbreak;\n\t\t\tcase 'select':\n\t\t\t\t$this->_select();\n\t\t\tbreak;\n }\n }", "title": "" }, { "docid": "aa8bbf7146871b540b1e702d389416ad", "score": "0.52420384", "text": "public function handleInput($command)\n {\n $command = (!$command && strlen($command) == 0) ? false : rtrim($command);\n\n if ('exit' === $command || false === $command) {\n $this->close();\n }\n\n $this->emit('data', [ $command, $this ]);\n\n $this->output->write($this->getPrompt());\n }", "title": "" }, { "docid": "7bd9838525829881fc611656a17b3293", "score": "0.5233339", "text": "public function run(): void\n {\n $router = $this->container->get(RouterInterface::class);\n\n // Resolve the controller and arguments for the requested route\n $response = $router->handle($this->request);\n\n // Send the response\n $response->send();\n }", "title": "" }, { "docid": "c965fdef9d6abd0afe1a01a870db0ace", "score": "0.52316326", "text": "public function handle()\n {\n $action = $this->argument('action');\n\n if ($action == 'handles') {\n $this->handles();\n }\n\n }", "title": "" }, { "docid": "d6883ad18a94f63b713b829a7deff571", "score": "0.52310884", "text": "public static function dispatch()\n\t{\n\t\t// Get the route in correct format\n\t\t$path = self::parseRoute();\n\n\t\t// If the route exists\n\t\tif (isset(self::$_routes[$path]))\n\t\t{\n\t\t\t$route = self::$_routes[$path];\n\n\t\t\t// Determine the correct controller and method to be called\n\t\t\tif (isset($route['action']))\n\t\t\t{\n\t\t\t\t// Split the action by the @-sign\n\t\t\t\t$action = explode('@', $route['action']);\n\n\t\t\t\t$method = $action[0];\n\t\t\t\t$controller = $action[1];\n\t\t\t}\n\n\t\t\tif (isset($route['module']))\n\t\t\t{\n\t\t\t\tinclude_once (EEZ_MODULE_DIR . DS . $route['module'] . DS . \"/controller/\" . DS . $controller . \".php\");\n\t\t\t}\n\n\t\t\t// If the route has any specified filters\n\t\t\tif (isset($route['filter']))\n\t\t\t{\n\t\t\t\t// If the filter return false we redirect the user to the homepage\n\t\t\t\tif (Filter::run($route['filter']) == false)\n\t\t\t\t{\n\t\t\t\t\theader(\"location: index\");\n\t\t\t\t\texit();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Create an object of the controller and call the method\n\t\t\t$controller = new $controller();\n\t\t\t$controller->$method();\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttrigger_error(\"This page does not exist\");\n\t\t}\n\n\t}", "title": "" }, { "docid": "395d97d860cf4f461ae158d51dcd4e0c", "score": "0.5226456", "text": "public function handleUnknownCommand(string $command) {\n\n }", "title": "" }, { "docid": "ac4714a6dc4b3885f9213272ce2ae50f", "score": "0.52161735", "text": "public function resolveHandlerMethod($command)\n {\n if ($command instanceof SelfHandlingInterface) {\n return 'handle';\n }\n\n $className = get_class($command);\n\n if (isset($this->handlers[$className])) {\n $parts = explode('@', $this->handlers[$className]);\n return isset($parts[1]) ? $parts[1] : 'handle';\n }\n\n throw new InvalidParamException(\"No handler registered for command $className\");\n }", "title": "" }, { "docid": "0439e7c087d7cf1ac37e15dd50ee12d3", "score": "0.52122927", "text": "public function callCommandHandler($commandHandler, $message, $channel, $sender, CommandReply $sendto) {\n\t\t$successfulHandler = null;\n\n\t\tforeach (explode(',', $commandHandler->file) as $handler) {\n\t\t\tlist($name, $method) = explode(\".\", $handler);\n\t\t\t$instance = Registry::getInstance($name);\n\t\t\tif ($instance === null) {\n\t\t\t\t$this->logger->log('ERROR', \"Could not find instance for name '$name'\");\n\t\t\t} else {\n\t\t\t\t$arr = $this->checkMatches($instance, $method, $message);\n\t\t\t\tif ($arr !== false) {\n\t\t\t\t\t// methods will return false to indicate a syntax error, so when a false is returned,\n\t\t\t\t\t// we set $syntaxError = true, otherwise we set it to false\n\t\t\t\t\t$syntaxError = ($instance->$method($message, $channel, $sender, $sendto, $arr) === false);\n\t\t\t\t\tif ($syntaxError == false) {\n\t\t\t\t\t\t// we can stop looking, command was handled successfully\n\n\t\t\t\t\t\t$successfulHandler = $handler;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $successfulHandler;\n\t}", "title": "" }, { "docid": "e3f2e6463d95273cb9272bf1bd20eff2", "score": "0.521108", "text": "public function handle()\n { \n if (empty($this->route->getParameters())) {\n throw new InvalidArguments(\n 'Route parameters doesn\\'t exsists. Have to use HandleWithoutParams'\n );\n }\n\n $controller = '\\Atomic\\Application\\Controllers\\\\' . $this->route->getControllerName();\n $this->controller = new $controller;\n $this->action = $this->route->getActionName();\n $this->parameters = $this->route->getParameters();\n\n return call_user_func_array([$this->controller, $this->action], $this->parameters);\n }", "title": "" }, { "docid": "66d74e2fde87e20575dd00550292b6ce", "score": "0.52082074", "text": "public function __invoke() {\n $this->execute_responder(\n $this->execute_domain($this->method, $this->request_path, $this->input)\n );\n }", "title": "" }, { "docid": "189c83e4e463c31a681b1cc7af25ff73", "score": "0.52078956", "text": "public function handle()\n {\n $this->queueInitialize();\n $this->parseCommand();\n }", "title": "" }, { "docid": "6aefaf825c359d5482b102b611e2536c", "score": "0.5201432", "text": "public function dispatch() {\n\t\t$shell = $this->shiftArgs();\n\n\t\tif (!$shell) {\n\t\t\t$this->help();\n\t\t\treturn false;\n\t\t}\n\t\tif (in_array($shell, array('help', '--help', '-h'))) {\n\t\t\t$this->help();\n\t\t\treturn true;\n\t\t}\n\n\t\t$Shell = $this->_getShell($shell);\n\n\t\t$command = null;\n\t\tif (isset($this->args[0])) {\n\t\t\t$command = $this->args[0];\n\t\t}\n\n\t\tif ($Shell instanceof Shell) {\n\t\t\t$Shell->initialize();\n\t\t\treturn $Shell->runCommand($command, $this->args);\n\t\t}\n\t\t$methods = array_diff(get_class_methods($Shell), get_class_methods('Shell'));\n\t\t$added = in_array($command, $methods);\n\t\t$private = $command[0] === '_' && method_exists($Shell, $command);\n\n\t\tif (!$private) {\n\t\t\tif ($added) {\n\t\t\t\t$this->shiftArgs();\n\t\t\t\t$Shell->startup();\n\t\t\t\treturn $Shell->{$command}();\n\t\t\t}\n\t\t\tif (method_exists($Shell, 'main')) {\n\t\t\t\t$Shell->startup();\n\t\t\t\treturn $Shell->main();\n\t\t\t}\n\t\t}\n\n\t\tthrow new MissingShellMethodException(array('shell' => $shell, 'method' => $command));\n\t}", "title": "" }, { "docid": "647b8d8ec35cc76d9ae313f067fd9f90", "score": "0.5200241", "text": "public function handle()\n {\n $job = app(SynchronizationJob::class, [$this->integrationService]);\n app('Illuminate\\Bus\\Dispatcher')->dispatch($job);\n }", "title": "" }, { "docid": "828a90cd576336baf474b143c024f285", "score": "0.51962185", "text": "function executeAndProcess() {\r\n\t\t//Queued responses\r\n\t\tforeach ( $this->queue as $qk => $q ) {\r\n\t\t\t$q->Call ();\r\n\t\t\tunset ( $this->queue [$qk] );\r\n\t\t}\r\n\t\t\r\n\t\t$this->Execute ( true );\r\n\t}", "title": "" }, { "docid": "153dfd0b7080c497e531c8b984ba865c", "score": "0.5193546", "text": "public function dispatch(Server $server, Frame $frame): void\n {\n $fd = $frame->fd;\n /** @var Connection $conn */\n $conn = Session::mustGet();\n $info = $conn->getModuleInfo();\n\n // Want custom message handle, will don't trigger message parse and dispatch.\n if ($method = $info['eventMethods']['message'] ?? '') {\n $class = $info['class'];\n \\server()->log(\"Message: conn#{$fd} call custom message handler '{$class}::{$method}'\", [], 'debug');\n\n /** @var WsModuleInterface $module */\n $module = Swoft::getSingleton($class);\n $module->$method($server, $frame);\n return;\n }\n\n // Use swoft message dispatcher\n $parseClass = $info['messageParser'] ?? RawTextParser::class;\n\n /** @var MessageParserInterface $parser */\n $parser = Swoft::getSingleton($parseClass);\n if (!$parser) {\n throw new WsMessageException(\"message parser bean '$parseClass' is not exists\");\n }\n\n try {\n $msg = $parser->decode($frame->data);\n } catch (Throwable $e) {\n throw new WsMessageParseException(\"parse message error '{$e->getMessage()}\", 500, $e);\n }\n\n // Set parser to context\n Context::mustGet()->setParser($parser);\n\n $data = $msg->getData();\n $cmdId = $msg->getCmd() ?: $info['defaultCommand'];\n\n /** @var Router $router */\n $router = Swoft::getBean('wsRouter');\n\n [$status, $handler] = $router->matchCommand($info['path'], $cmdId);\n if ($status === Router::NOT_FOUND) {\n throw new WsMessageRouteException(\"message command '$cmdId' is not found, in module {$info['path']}\");\n }\n\n [$ctlClass, $ctlMethod] = $handler;\n\n \\server()->log(\"Message: conn#{$fd} call message command handler '{$ctlClass}::{$ctlMethod}'\", $msg->toArray(), 'debug');\n\n $object = Swoft::getBean($ctlClass);\n $params = $this->getBindParams($ctlClass, $ctlMethod, $frame, $data);\n $result = $object->$ctlMethod(...$params);\n\n // If result is not null, encode and replay\n if ($result instanceof Response) {\n $result->send();\n } elseif ($result instanceof Message) {\n $server->push($fd, $parser->encode($result));\n } elseif ($result !== null) {\n $server->push($fd, $parser->encode(Message::new($cmdId, $result)));\n }\n }", "title": "" }, { "docid": "c92ecff2b04347f4a65b0babb364ef17", "score": "0.5191578", "text": "protected function handle($command, $data) {\n\n return false;\n\n }", "title": "" }, { "docid": "61fbb5ac27bed0330ba230d75eb1492d", "score": "0.51891077", "text": "private function handle()\n {\n $route = $this->getSelectedRoute();\n\n if ($route !== null) {\n $this->callController($route[\"controller\"]);\n return;\n }\n\n http_response_code(404);\n }", "title": "" }, { "docid": "cee5b8044c6dee54d67717b01a89732e", "score": "0.51831555", "text": "public function execute()\n {\n switch ($_SERVER[\"REQUEST_METHOD\"]) {\n case \"POST\":\n $this->handlePostRequest();\n break;\n }\n }", "title": "" }, { "docid": "61dbfc960cb858602531daee055336f6", "score": "0.51768315", "text": "public function runCommand(CommandInterface $command) {\n $this->tLog(LogLevel::NOTICE, \"Running command: {command} ({guid})\", [\n 'command' => $command->getCommand(),\n 'guid' => $command->getGuid()\n ]);\n\n $commandName = $command->getCommand();\n if ($command->isExpired()) {\n $this->tLog(LogLevel::WARNING, \"Tried to run expired command: {command} ({guid}) ({expiry} sec)\", [\n 'command' => $commandName,\n 'guid' => $command->getGuid(),\n 'expiry' => $command->getExpiry()\n ]);\n return new CommandResponse(CommandResponse::RESPONSE_EXPIRED);\n }\n\n // Call callable explicit handler\n if (is_callable($command->getHandler())) {\n $response = $this->container->call($command->getHandler(), [\n 'command' => $command\n ]);\n if ($response instanceof CommandResponse) {\n return $this->handleCommandResponse($command, $response);\n }\n }\n\n // Look for built-in handler on the client\n if (method_exists($this->client, \"command_{$commandName}\")) {\n $response = $this->container->call([$this->client, \"command_{$commandName}\"], [\n 'command' => $command\n ]);\n if ($response instanceof CommandResponse) {\n return $this->handleCommandResponse($command, $response);\n }\n }\n\n // Fire command event to allow post-handlers (old style)\n $this->fire('command', [$command]);\n return new CommandResponse(CommandResponse::RESPONSE_NO_HANDLER);\n }", "title": "" }, { "docid": "3dcc9637430dc3e57e942a2d737071a1", "score": "0.51757836", "text": "protected function RunCommands($cmd){\n\n\t\t$this->cmds\t= array_change_key_case($this->cmds, CASE_LOWER);\n\t\t$cmd\t\t= strtolower($cmd);\n\n\t\tif( !isset($this->cmds[$cmd]) ){\n\t\t\t$this->DefaultDisplay();\n\t\t\treturn;\n\t\t}\n\n\t\t$cmds = (array)$this->cmds[$cmd];\n\t\tarray_unshift($cmds, $cmd);\n\n\t\tforeach($cmds as $cmd){\n\t\t\tif( method_exists($this,$cmd) ){\n\t\t\t\t$this->$cmd();\n\t\t\t}elseif( is_callable($cmd) ){\n\t\t\t\tcall_user_func($cmd, $this);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "0ebef2c89d84ee66aad2c47cef5c5d5d", "score": "0.51747733", "text": "public function run($command)\n {\n $this->_command = $command;\n\n if ($this->_parseCommand()) {\n\n $this->_commander->execute($command);\n\n } else {\n\n $this->_fail();\n\n }\n }", "title": "" }, { "docid": "6f5df162c12c417b4204d8a1e4a708eb", "score": "0.51747143", "text": "public function run() { \r\n $this->setArguments();\r\n \r\n $command_class_name = $this->command_class_name;\r\n \r\n $current_command_class = new $command_class_name($this->module_name);\r\n \r\n $current_command_class->init();\r\n \r\n $current_command_class->action($this->method_name, $this->controller_arguments);\r\n }", "title": "" }, { "docid": "df84102538dda869bf9fbb15ff153de3", "score": "0.5173292", "text": "function dispatch();", "title": "" }, { "docid": "4c55d29409453cfdb1117540ef544380", "score": "0.516831", "text": "public function handle(){\n\n //make somethings\n }", "title": "" }, { "docid": "5c65b7efaeaec66576b8d34a89bea956", "score": "0.51657254", "text": "private function invokeHandler($route) {\n\n\t\t\t$components = explode(\"/\", $route->handler);\n\t\t\t$controller = ucfirst($components[0]);\n\t\t\t$action = $components[1];\n\n\t\t\t// Get the prototype of the controller action\n\t\t\ttry {\n\n\t\t\t\t$controllerBlueprint = new ReflectionClass($controller);\n\t\t\t\t$actionBlueprint = $controllerBlueprint->getMethod($action);\n\n\t\t\t}\n\t\t\tcatch (Exception $e) {\n\n\t\t\t\t$this->httpCode(\"500\");\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\t$paramsList = [];\n\t\t\tif (!empty($route->params)) {\n\n\t\t\t\tif ($actionBlueprint->getNumberOfParameters() == 0) {\n\n\t\t\t\t\t$this->httpCode(\"500\");\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t\t$params = $actionBlueprint->getParameters();\n\t\t\t\tforeach ($params as $param) {\n\t\t\t\t\t$paramsList[$param->getPosition()] = (isset($route->params[\":\".$param->name]) ? $route->params[\":\".$param->name] : null);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t$controllerObject = new $controller;\n\n\t\t\t$controllerObject->execute($action, $paramsList);\n\n\t\t}", "title": "" }, { "docid": "01f794b62818fc14f20d616e4fd241e1", "score": "0.516435", "text": "function handle ($cmd = 'do') {\n\t\tglobal $status, $page_head;\n\t\tif(!($do = trim($_REQUEST[$cmd].''))) return '';\n\t\tlist($module,$task) = split('-',$do);\n\t\tif($module == $this->prefix){\n\t\t\t$page_head = translate('cms_head_'.$this->prefix);\n\t\t\tif(isset($this->tasks[$task])){\n\t\t\t\treturn eval($this->tasks[$task]);\n\t\t\t}else return '';\n\t\t}else return '';\n\t}", "title": "" }, { "docid": "6d8a77392e6d0a3b1448653b46f185de", "score": "0.51572657", "text": "public function handle()\n {\n $this->matchingService->notifyMatching();\n }", "title": "" }, { "docid": "9de29ecaa93befa7ced2f67d5b72f8aa", "score": "0.5141786", "text": "public function handle(Message $message);", "title": "" }, { "docid": "a1b8b3b167d426e01efef13fc67812f6", "score": "0.5138225", "text": "final public function Dispatch(): void {\n Modules::EventDispatcher()::Dispatch($this);\n }", "title": "" }, { "docid": "5ca96057a6b2efa75d899f57ebad270d", "score": "0.5133628", "text": "public function execute($command)\n\t{\n\t\ttry\n\t\t{\n\t\t\t$this->db->beginTransaction();\n\n\t\t\t$response = $this->decoratedBus->execute($command);\n\n\t\t\t$this->db->commit();\n\n\t\t\treturn $response;\n\t\t}\n\t\tcatch(PDOException $e)\n\t\t{\n\t\t\t$this->db->rollback();\n\n\t\t\tthrow new Exceptions\\InternalException($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "ada4d8e4c90398c3b275a558ad66c2a4", "score": "0.5130795", "text": "public static function handle() {\n\t\t// build request\n\t\tself::buildRequest();\n\t}", "title": "" }, { "docid": "3a8e5cbd3cfdf04643a44cd531b8d542", "score": "0.5124265", "text": "public function execute() {\n\n\t\t$possibleOptions = array(\n\t\t\t'type' => false,\n\t\t\t'export-path' => true\n\t\t);\n\n\t\tif (($options = $this->_controller->getInstanceOptions($possibleOptions)) === FALSE) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->_controller->addOutput(\"Loading Responder\");\n\t\t$responder = Billrun_Responder::getInstance($options);\n\t\t$this->_controller->addOutput(\"Responder loaded\");\n\n\t\tif ($responder) {\n\t\t\t$paths = $responder->respond($options);\n\t\t\t$this->_controller->addOutput(\"Responder responded on \" . count($paths) . \" files.\");\n\t\t} else {\n\t\t\t$this->_controller->addOutput(\"Responder cannot be loaded\");\n\t\t}\n\t}", "title": "" }, { "docid": "2c19be5a3e0ec61a99dc7fb50044490f", "score": "0.51163274", "text": "public function handle()\n {\n $conversions = array_keys(config('media.conversion_sizes'));\n\n if ($conversions) {\n $model = config('media.model');\n\n $media = $model::all();\n\n $media->each(function ($media) use ($conversions) {\n PerformConversions::dispatch(\n $media, $conversions\n );\n });\n }\n }", "title": "" }, { "docid": "1ed09c212301902151de48cf6cac9a78", "score": "0.51137465", "text": "protected function fire(string $command, ?Closure $handler = null, bool $sameEnvironment = true): int\n\t{\n\t\t$process = popen($this->buildCommand($command, sameEnvironment: $sameEnvironment), 'r');\n\n\t\twhile(!feof($process))\n\t\t{\n\t\t\t$read = fread($process, 4096);\n\n\t\t\tif($handler !== null)\n\t\t\t{\n\t\t\t\t$handler($read);\n\t\t\t}\n\t\t}\n\n\t\treturn pclose($process);\n\t}", "title": "" }, { "docid": "c1242650e69850150d4ac52e8b5b61d4", "score": "0.5111988", "text": "public function dispatch()\n {\n $dispatcher = $this->getMessageDispatcher();\n $dispatcher->post('beforeDispatch', $this);\n\n // Get config\n $config = $this->getConfig();\n\n // Cache setup\n $this->_setupCache($config);\n\n // Load namespaces\n $this->_parseNamespaces($config);\n\n // Load resources\n $dispatcher->post('beforeLoadResources', $this);\n $this->_parseResources($config);\n $dispatcher->post('afterLoadResources', $this);\n\n $this->_sortDispatchDependencies();\n\n // Init script dispatch loop\n foreach ($this->getResources() as $resource) {\n \t$resource->dispatch();\n }\n\n\n $dispatcher->post('afterDispatch', $this);\n }", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "7548cceeccd1f7feab2b0b9a477ef6f8", "score": "0.0", "text": "public function run()\n {\n DB::table('admins')->delete();\n $adminRecords = [\n [\n 'name' => 'Abyan Fawwaz',\n 'type' => 'admin',\n 'mobile' => '081238201029',\n 'email' => '[email protected]',\n 'password' => '$2y$10$WNGF01MUiKiBJRc/z5im/uxDrx72uXSkXsR0T.RiqIBNq1tzbts6G', // 1234\n 'image' => '',\n 'status' => '1',\n ], [\n 'name' => 'Nafhidah Ramdhani Qurrahman',\n 'type' => 'admin',\n 'mobile' => '082333889670',\n 'email' => '[email protected]',\n 'password' => '$2y$10$O20AcnSjWsUgvogA0IQcheca7CKCH0PIGz9iJDyxt1/rYY1E0NaJG', //1234\n 'image' => '',\n 'status' => '1',\n ],\n ];\n foreach ($adminRecords as $key => $record) {\n \\App\\Admin::create($record);\n }\n }", "title": "" } ]
[ { "docid": "0f3b5af0ec9d12efa26e1e338ab5064a", "score": "0.7990139", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker\\Factory::create();\n $password = \\Illuminate\\Support\\Facades\\Hash::make('test');\n $userId = $faker->randomNumber();\n\n \\App\\User::create([\n 'id' => $userId,\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => $password\n ]);\n\n \\App\\Todo::create([\n 'content' => $faker->sentence,\n 'user_id' => $userId,\n 'visibility' => $faker->randomElement([100, 200])\n ]);\n }", "title": "" }, { "docid": "8f01082498701661be6630c4addc755b", "score": "0.79691", "text": "public function run()\n {\n // detta körs vid db:seed\n // factory(Article::class,300)->create();\n // factory(Category::class,5)->create();\n factory(Ad::class,5)->create();\n // factory(User::class,20)->create();\n }", "title": "" }, { "docid": "0caf1f41d749049c79dcee0ddc48e099", "score": "0.79576045", "text": "public function run()\n {\n //\n\n $faker = \\Faker\\Factory::create();\n\n // if(Student::count() > 0)\n // {\n // Student::truncate();\n // }\n //\n // foreach(range(1,50) as $index)\n // {\n // Student::create([\n // 'address' => $faker->address,\n // 'yr_lvl' => $faker->randomElement(array('1','2','3','4')),\n // 'contact_no' => $faker->phoneNumber,\n // ]);\n // }\n\n foreach(Student::all() as $student)\n {\n $student->address = $faker->address;\n $student->yr_lvl = $faker->randomElement(array('1','2','3','4'));\n $student->contact_no = $faker->phoneNumber;\n $student->save();\n }\n }", "title": "" }, { "docid": "a162b4d98ad799521bfbbe2602539337", "score": "0.7948028", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Product::factory(10)->create(); \n /*creates/persists 10 records containing random data in each field of the Product model \n to the Products table see product.php and productfactory.php*/\n\n $this->call([\n CategoryTableSeeder::class,\n ProductsTableSeeder::class,\n ]);\n /*Within the DatabaseSeeder class, you may use the call method to execute \n additional seed classes. Using the call method allows you to break up your \n database seeding into multiple files so that no single seeder class becomes \n too large. The call method accepts an array of seeder classes \n see https://laravel.com/docs/8.x/seeding#calling-additional-seeders*/\n\n }", "title": "" }, { "docid": "ba1fd7ffe86f718016562e5e7f3d0db5", "score": "0.7946498", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n for ($i = 1; $i <= 10; $i++) {\n $f = \\Faker\\Factory::create();\n $u = new \\App\\Models\\User();\n $u->name = $f->name;\n $u->email = $f->email;\n $u->password = bcrypt(\"passwrd\");\n $u->save();\n }\n for ($i = 1; $i <= 10; $i++) {\n \n $p = new \\App\\Models\\Post();\n $p->title = \"Titre $i\";\n $p->content = \"content $i\";\n $p->fk_user_id = rand(1, 10);\n $p->save();\n }\n for ($i = 1; $i <= 10; $i++) {\n $f = \\Faker\\Factory::create();\n $c = new \\App\\Models\\Comment();\n $c->content = \"content $i\";\n $c->fk_post_id = rand(1, 10);\n $c->save();\n \n }\n \n }", "title": "" }, { "docid": "0101ffecfe9e2bc8f41a9f3f15357902", "score": "0.7926206", "text": "public function run()\n {\n User::truncate();\n factory(User::class)->create([\n \t\t'name' => 'jzfan',\n \t\t'email' => '[email protected]',\n \t\t'password' => bcrypt(env('APP_PASSWORD'))\n \t]);\n\n $this->call(DocSeeder::class);\n $this->call(TagSeeder::class);\n\n Article::truncate();\n factory(Article::class, 33)->create()->each( function ($a) {\n $ids = Tag::inRandomOrder()->take(mt_rand(1,2))->get(['id'])->pluck('id')->toArray();\n $a->tags()->sync($ids);\n });\n }", "title": "" }, { "docid": "7eaa482d1073c7bf6206b3ccd55aa838", "score": "0.7922365", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Book::truncate();\n $categories = Category::all()->pluck('id')->toArray();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few books in our database:\n for ($i = 0; $i < 50; $i++) {\n Book::create([\n 'name' => $faker->sentence,\n 'author' => $faker->name,\n 'userBorrowing' => $faker->name,\n 'publicationDate' => $faker->dateTime,\n 'category_id' => $faker->randomElement($categories)\n ]);\n }\n }", "title": "" }, { "docid": "2bf001b914b9803c6c7ffaeccd8507d1", "score": "0.7909579", "text": "public function run()\n {\n //Let's truncate our existing records to start from scratch\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n //And now lets create a few articles in the database\n for($i=0; $i<50; $i++){\n Article::create([\n 'title'=>$faker->sentence,\n 'body'=>$faker->paragraph,\n ]);\n }\n }", "title": "" }, { "docid": "875e48bfadb1812597cf1b4427db282e", "score": "0.78953356", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => \"testuser\",\n 'email' => \"[email protected]\",\n 'password' => 123456,\n ]);\n\n DB::table('todos')->insert([\n 'userId' => 1,\n 'title' => str_random(10),\n 'description' => str_random(10),\n 'location' => str_random(10),\n 'priority' => 1,\n 'duration' => 10,\n ]);\n\n DB::table('todos')->insert([\n 'userId' => 1,\n 'title' => str_random(10),\n 'description' => str_random(10),\n 'location' => str_random(10),\n 'priority' => 2,\n 'duration' => 10,\n ]);\n\n DB::table('todos')->insert([\n 'userId' => 1,\n 'title' => str_random(10),\n 'description' => str_random(10),\n 'location' => str_random(10),\n 'priority' => 3,\n 'duration' => 10,\n ]);\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "75520aa5ef1c4b5beb70e1fffd17219d", "score": "0.78905594", "text": "public function run()\n {\n // prevent db error from key constraint when refresh seeder\n DB::statement('SET foreign_key_checks=0');\n DB::table('artists')->truncate();\n DB::statement('SET foreign_key_checks=1');\n\n $artists = [\n ['name' => 'Peck Palitchoke', 'gender' => 'male', 'year_debut' => 2002],\n ['name' => 'Off Pongsak', 'gender' => 'gay', 'year_debut' => 2004],\n ['name' => 'Ice Saranyu', 'gender' => 'female', 'year_debut' => 2006]\n ];\n\n foreach ( $artists as $artist ) {\n DB::table('artists')->insert($artist);\n }\n }", "title": "" }, { "docid": "55d9b723c4b58bee847f2a9a84675a9b", "score": "0.7879272", "text": "public function run()\n {\n $this->call([RoleTableSeeder::class]);\n // factory('App\\User', 10)->create();\n // factory('App\\Restaurant', 2)->create();\n // factory('App\\Review', 10)->create();\n // factory('App\\Branch', 10)->create();\n // factory('App\\Favourites', 10)->create();\n // factory('App\\Food', 10)->create();\n // factory('App\\Order', 10)->create();\n // factory('App\\Cart', 10)->create();\n // factory('App\\Address', 10)->create();\n // factory('App\\Cusine', 10)->create();\n // factory('App\\Category', 10)->create();\n $this->call([UserTableSeeder::class]);\n\n }", "title": "" }, { "docid": "06a0f4e8af73952d77f8c3e61cdb001c", "score": "0.7874097", "text": "public function run()\n {\n $absences = Absence::select('id')->get();\n $faker = Factory::create();\n foreach($absences as $absence) {\n Salary::create([\n 'absence_id' => $absence->id,\n 'salary' => $faker->randomFloat(2, 000.00),\n 'deduction' => $faker->randomFloat(2, 000.00),\n 'incentives' => $faker->randomFloat(2, 000.00),\n 'rate' => $faker->randomFloat(2, 000.00),\n 'note' => $faker->paragraph(),\n ]);\n }\n }", "title": "" }, { "docid": "c7dbd4f39c483600425a3997608ed291", "score": "0.78713816", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(\\App\\Models\\User::class, 3)->create();\n\n $venues = factory(\\App\\Models\\Venue::class, 3)->create();\n\n foreach ($venues as $venue) {\n $spaces = factory(\\App\\Models\\Space::class, 3)->create(['venue_id' => $venue->id]);\n\n foreach ($spaces as $space) {\n factory(\\App\\Models\\Event::class, 3)->create(['space_id' => $space->id]);\n }\n }\n }", "title": "" }, { "docid": "3cedc8816dfe76ba5974d742d155b710", "score": "0.7870294", "text": "public function run()\n {\n // Role::factory(10)->create();\n $this->call(RoleSeeder::class);\n User::factory(5)->create();\n $this->call(UserSeeder::class);\n Ciudade::factory(50)->create();\n $this->call(DocumentoSeeder::class);\n Sucursale::factory(20)->create();\n Bodega::factory(15)->create();\n Categoria::factory(10)->create();\n Producto::factory(30)->create();\n Movimiento::factory(20)->create();\n DetalleMovimiento::factory(150)->create();\n Stock::factory(7)->create();\n }", "title": "" }, { "docid": "53c3fc9356cfac33e6c75ef193aaec0e", "score": "0.7865162", "text": "public function run()\n {\n $data = [];\n $faker = Faker::create();\n foreach(range(1, 50) as $id) {\n array_push($data, [\n 'book_id' => $id,\n 'book_title' => $faker->sentence(),\n 'book_isbn' => $faker->isbn13(),\n 'book_author' => $faker->name(),\n ]);\n }\n $this->table(self::TABLE)->insert($data)->saveData();\n }", "title": "" }, { "docid": "4e429ae65b9f4755a0232dffc1b6fc40", "score": "0.7858297", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('password')\n ]);\n\n //for DB testing\n Company::create([\n 'name' => 'Google',\n 'email' => '[email protected]',\n 'website' => 'google.com',\n //must be uploaded from a dir\n 'logo' => 'GoogleLogo.jpg'\n ]);\n\n Employee::create([\n 'Fname' => 'Karim',\n 'Lname' => 'Mohamed',\n 'email' => '[email protected]',\n 'phone' => '01012223157',\n 'company' => (App\\Company::where('name', 'Google')->get())[0]['id']\n ]);\n }", "title": "" }, { "docid": "8dd0a11975791010926c995f22dc2fcc", "score": "0.7852334", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(CountriesTableSeeder::class);\n $this->call(GenresTableSeeder::class);\n\n /*\n * Lets build up some Artists with albums and songs!!\n */\n $artists = factory(MusicEntity::class, 10)->create();\n\n foreach ($artists as $artist) {\n $num = rand(1, 3);\n $albums = factory(Album::class, $num)->create([\n 'entity_id' => $artist->id\n ]);\n\n foreach($albums as $album) {\n $num = rand(2, 5);\n factory(Song::class, $num)->create([\n 'album_id' => $album->id\n ]);\n }\n }\n }", "title": "" }, { "docid": "373cb9fecce4f57fe1bad31ef6fa3b64", "score": "0.7847707", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'isAdmin' => 1,\n ]);\n\n DB::table('genres')->insert([\n ['genre' => 'Adventure',],\n ['genre' => 'Horror',],\n ['genre' => 'Romance',],\n ['genre' => 'Thriller',],\n ['genre' => 'Fantasy',],\n ['genre' => 'Sci-Fi',],\n ]);\n\n DB::table('library_sections')->insert([\n ['section' => 'Circulation',],\n ['section' => 'Periodical Section',],\n ['section' => 'General Reference',],\n ['section' => \"Children's Section\",],\n ['section' => 'Fiction',],\n ]);\n\n $this->call([\n BooksTableSeeder::class,\n ]);\n\n }", "title": "" }, { "docid": "af924d893f0a488a1ed6506d4a8b16f0", "score": "0.7843368", "text": "public function run()\n {\n \t\n \t$faker = Faker::create();\n \tforeach (range(1,20) as $index) {\n\t DB::table('articles')->insert([\n\t 'users_id' \t\t\t=> $faker->numberBetween($min = 10, $max = 22),\n\t 'categories_id'\t\t=>\t$faker->numberBetween($min = 1, $max = 7),\n\t 'articles_title' \t=> $faker->sentence($nbWords = 6, $variableNbWords = true),\n\t 'articles_desc' \t=> $faker->realText($maxNbChars = 200, $indexSize = 2),\n\t 'articles_img'\t=>\t$faker->imageUrl($width = 640, $height = 480),\n\t ]);\n }\n }", "title": "" }, { "docid": "c27a981505cafa0186cd23eade2f3e5c", "score": "0.7837256", "text": "public function run()\n {\n // (1) データを一旦削除する\n DatabaseSeeder::truncateTable('authors');\n\n // (2) DBファサードを利用したデータの挿入\n $authors = [];\n $now = \\Carbon\\Carbon::now();\n for ($i = 1; $i <= 10; $i++) {\n $authors[] = [\n 'name' => '著者名' . $i,\n 'furigana' => 'フリガナ' . $i,\n 'romaji' => 'Romaji' . $i,\n ];\n }\n foreach ($authors as $author) {\n $author['created_at'] = $now;\n $author['updated_at'] = $now;\n DB::table('authors')->insert($author);\n }\n\n // (3) Eloquentを利用したデータの挿入\n for ($i = 11; $i <= 20; $i++) {\n \\App\\Author::create([\n 'name' => '著者名' . $i,\n 'furigana' => 'フリガナ' . $i,\n 'romaji' => 'Romaji' . $i,\n ]);\n }\n\n }", "title": "" }, { "docid": "d7e2cf7219878c25b4c489434f79df0f", "score": "0.78368884", "text": "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n factory(Category::class, 5)->create();\n\n factory(Tag::class, 5)->create();\n\n factory(Post::class, 5)->create();\n\n factory(User::class)->create([\n 'name' => 'Editor',\n 'email' => '[email protected]',\n 'password' => bcrypt(123456),\n 'remember_token' => str_random(10),\n ]);\n\n factory(User::class)->create([\n 'name' => 'Redactor',\n 'email' => '[email protected]',\n 'password' => bcrypt(123456),\n 'remember_token' => str_random(10),\n ]);\n }", "title": "" }, { "docid": "ff9c9f41b8583d5fa030c46812b685b5", "score": "0.78350115", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n $faker = Faker::create();\n foreach (range(1,5) as $i) {\n $event = \\App\\Event::create(['title' => $faker->sentence(4), 'content' => $faker->paragraph,]);\n foreach (range(1,4) as $j) {\n $eventtime = \\App\\Eventtime::create(['start' => $faker->dateTime, 'end' => $faker->dateTime, 'deadline' => $faker->dateTime, 'event_id' => $event->id,]);\n }\n }\n }", "title": "" }, { "docid": "13ff4378f19c233bd2953ab046a7ca63", "score": "0.78308827", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // factory(User::class , 250)->create();\n // factory(Category::class, 50)->create();\n // factory(Tag::class, 150)->create();\n // factory(Media::class, 900)->create();\n // factory(Movie::class, 300)->create();\n factory(Post::class, 200)->create();\n factory(Review::class, 1000)->create();\n }", "title": "" }, { "docid": "110e358df564a6632d686a707753a8ab", "score": "0.782553", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n customers::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n customers::create([\n 'CustomerCode' => $faker->regexify('HITECH[0-9]{10}'),\n 'CompanyName' => $faker->name,\n 'ContactName' => $faker->name,\n 'ContactNumber' => $faker->phoneNumber,\n 'ContactEmail' => $faker->email,\n 'Active' => $faker->randomElement($array = array ('0','1')),\n ]);\n }\n }", "title": "" }, { "docid": "403a48418cf71af865b92d4a39814719", "score": "0.7798298", "text": "public function run()\n {\n User::factory(20)->create();\n Movie::factory(250)->create();\n Review::factory(20)->create();\n Celebrity::factory(30)->create();\n $this->call(GenreSeeder::class);\n CelebrityMovie::factory(500)->create();\n GenreMovie::factory(300)->create();\n }", "title": "" }, { "docid": "489b0d2d936ce46517d7d20cfcaec95b", "score": "0.7797721", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(UserTableSeeder::class);\n \n DB::table('education')->delete();\n Education::create(\n ['edu_id' => '0', 'edu_level' => 'None'],\n ['edu_id' => '1', 'edu_level' => 'Preschool'],\n ['edu_id' => '2', 'edu_level' => 'Elementary'],\n ['edu_id' => '3', 'edu_level' => 'High school'],\n ['edu_id' => '4', 'edu_level' => 'College']\n );\n \n DB::table('completed')->delete();\n Completed::create(\n ['id_completed' => '0', 'author' => 'Patient'],\n ['id_completed' => '1', 'author' => 'Caregiver'],\n ['id_completed' => '2', 'author' => 'Caregiver-assisted']\n );\n \n DB::table('admin')->delete();\n Admin::create(\n ['id_admin' => '0', 'email' => '[email protected]', 'password' => 'pass']\n );\n\n Model::reguard();\n }", "title": "" }, { "docid": "515a80d8a59476421e3e9209aed7e1d5", "score": "0.7795941", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret')\n ]);\n\n Ponente::create([\n \"nombre\" => \"Andres Garcia\",\n \"pais\" => \"Colombia\",\n \"foto\" => \"https://avatars0.githubusercontent.com/u/11448559?s=400&v=4\",\n ]);\n\n Ponente::create([\n \"nombre\" => \"Lenon Ishimokawa\",\n \"pais\" => \"Peru\",\n \"foto\" => \"https://pbs.twimg.com/profile_images/3146414977/8f0470628bbb73087c016e3411271d9a_400x400.jpeg\",\n ]);\n\n Ponencia::create([\n \"nombre\" => \"Introducción a Erlang\",\n \"ponente_id\" => 1,\n ]);\n\n Ponencia::create([\n \"nombre\" => \"Cultura Empresarial\",\n \"ponente_id\" => 2,\n ]);\n\n }", "title": "" }, { "docid": "7a10d5366c277b1d134d43167e17aa68", "score": "0.7794069", "text": "public function run()\n {\n // Uncomment the below to wipe the table clean before populating\n DB::table('qualities')->delete();\n \n $qualities = array(\n ['id' => 1, 'name' => 'BRRip', 'created_at' => new DateTime, 'updated_at' => new DateTime],\n ['id' => 2, 'name' => 'HDRip', 'created_at' => new DateTime, 'updated_at' => new DateTime],\n ['id' => 3, 'name' => 'CAM', 'created_at' => new DateTime, 'updated_at' => new DateTime],\n );\n \n // Uncomment the below to run the seeder\n DB::table('qualities')->insert($qualities);\n }", "title": "" }, { "docid": "cf6e576d77ec7e61d3a1c29015470c69", "score": "0.7792257", "text": "public function run()\n {\n DB::table('residences')->delete();\n\n $faker = Faker::create('ja_JP');\n\n for($i = 0; $i < 50; $i++) {\n Residence::create([\n 'name' => $faker->country,\n 'zip_code' => $faker->postcode,\n 'prefecture' => $faker->prefecture,\n 'city' => $faker->city,\n 'town' => $faker->streetAddress,\n ]);\n }\n }", "title": "" }, { "docid": "4618ec20458257eb8a391e2de6fd731f", "score": "0.7790338", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(\\App\\User::class,5)->create();\n factory(\\App\\Article::class,5)->create()->each(function($article){\n factory(\\App\\Comment::class,rand(1,5))->create(['article_id'=>$article->id]);\n });\n factory(\\App\\Product::class,15)->create();\n\n\n }", "title": "" }, { "docid": "54a55a0bd6e4a678e410cf1dfa061d10", "score": "0.7782346", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n (new \\Database\\Seeders\\MotivoSeeder())->run();\n (new \\Database\\Seeders\\UnidadeSeeder())->run();\n \\App\\Models\\Fornecedor::factory(10)->create();\n \\App\\Models\\SiteContato::factory(10)->create();\n (new \\Database\\Seeders\\ProdutoSeeder())->run();\n (new \\Database\\Seeders\\ProdutoDetalheSeeder())->run();\n }", "title": "" }, { "docid": "7e8831c14e0491fffed673a778ecc070", "score": "0.7774981", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n $faker = Faker::create();\n \tforeach (range(1,10) as $index) {\n\t DB::table('products')->insert([\n\t 'prod_name' => $faker->prod_name,\n\t ]);\n\t}\n }", "title": "" }, { "docid": "fc0b361c365c6b92f3ba8a90848e5ba6", "score": "0.7773412", "text": "public function run()\n {\n echo \"Seeding Test Database\\n\";\n\n $this->call(TransactionTypesSeeder::class);\n\n factory('App\\Staff', 5)->create();\n\n //creating 5 course\n factory('App\\Course', 5)->create();\n\n // create 10 students under each course\n foreach (App\\Course::all() as $course)\n {\n factory('App\\Student', 10)->create(['course_id' => $course->id]);\n }\n\n // create 10 transactions for each student\n foreach (\\App\\Student::all() as $student)\n {\n factory('App\\Transaction', 10)->create([\n 'transactable_type' => get_class($student),\n 'transactable_id' => $student->id,\n 'transaction_type_id' => 4, \n ]);\n }\n\n // create 10 transactions for each staff\n foreach (\\App\\Staff::all() as $staff)\n {\n factory('App\\Transaction', 10)->create([\n 'transactable_type' => get_class($staff),\n 'transactable_id' => $staff->id,\n 'transaction_type_id' => 8,\n ]);\n }\n\n factory('App\\Transaction', 100)->create();\n\n create('App\\User', [\n 'email' => '[email protected]',\n 'password' => bcrypt('starman')\n ]);\n\n echo \"\\nDone Seeding Test Database\\n\";\n\n }", "title": "" }, { "docid": "5e8f614ea5d3b065f74ac68b6c0bfd49", "score": "0.7770983", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(Bodega::class)->create(['nombre' => 'Centro']);\n factory(Bodega::class)->create(['nombre' => 'Oriente']);\n factory(Bodega::class)->create(['nombre' => 'Occidente']);\n factory(Bodega::class)->create(['nombre' => 'Sur']);\n\n factory(Producto::class, 25)->create();\n }", "title": "" }, { "docid": "c08ab3c54b5cf158d74c2f91b1a83a6f", "score": "0.7770674", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n \\DB::transaction( function() {\n $faker = \\Faker\\Factory::create();\n \n $user = App\\Models\\User::create([\n 'name' => 'johndoe',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n ]);\n\n $users = factory(\\App\\Models\\User::class,9)->create();\n $users->push($user);\n\n $tags = factory(\\App\\Models\\Tag::class, 50)->create();\n $posts = factory(\\App\\Models\\Post::class, 50)->make();\n\n foreach ($posts as $post) {\n $post->user()->associate( $faker->numberBetween( 1, $users->count() ) );\n $post->save();\n $post->tags()->attach( $faker->randomElements( $tags->pluck('id')->toArray(), $faker->numberBetween(1,5) ) );\n }\n });\n }", "title": "" }, { "docid": "41b3b99e4653eac64fc3bd7bf53d3e8a", "score": "0.7769877", "text": "public function run()\n {\n // $this->call('UsersTableSeeder');\n factory(Editorial::class,20)->create();\n factory(Author::class,20)->create();\n factory(Stand::class,20)->create();\n\n }", "title": "" }, { "docid": "5462b29e32986e60e6b10637f187f3d4", "score": "0.7760697", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\t\tDB::table('students')->truncate();\n\n\t\t$faker = Factory::create();\n\n\t\tforeach (range(1, 100) as $i) {\n\t\t\t$userId = $faker->unique()->numberBetween(1,100);\n\n\t\t\tStudent::create([\n\t\t\t\t'user_id' => $userId,\n\t\t\t\t'name' => User::findOrFail($userId)->name,\n\t\t\t\t'unique_roll_no' => $faker->unique()->numberBetween(10000,20000),\n\t\t\t]);\n\t\t}\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1');\n }", "title": "" }, { "docid": "79c4f8330890b03c55cb5d186d792181", "score": "0.77599823", "text": "public function run()\n {\n // Storage::deleteDirectory('public/products');\n // Storage::makeDirectory('public/products');\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n \n Product::factory(50)->create();\n Articulo::factory(50)->create();\n }", "title": "" }, { "docid": "fa9933c5c1c506357883b4b9ea9711ab", "score": "0.7750727", "text": "public function run()\n {\n //获取学校 ID\n $school_ids = School::all()->pluck('id')->toArray();\n //获取用户 ID\n $user_ids = User::all()->pluck('id')->toArray();\n\n $faker = app(Faker\\Generator::class);\n\n foreach ($user_ids as $user_id) {\n \t$student = factory(Student::class)\n \t\t\t\t->make()\n \t\t\t\t->toArray();\n \t// 从学校的 ID 数组中随机取出一个数\n\t\t\t$student['user_id'] = $user_id;\n\n\t\t\t// 从分类的 ID 数组中随机取出一个数\n\t\t\t$student['school_id'] = $faker->randomElement($school_ids);\n\n \tStudent::insert($student);\n }\n }", "title": "" }, { "docid": "ba9a7024d1831fd332e2d4733c2621aa", "score": "0.7748642", "text": "public function run()\n {\n \t// DB::table('salereturns')->delete();\n\n $salereturns = array(\n\n );\n\n // Uncomment the below to run the seeder\n // DB::table('salereturns')->insert($salereturns);\n }", "title": "" }, { "docid": "1bfba078282431a2d4f5aabaee7f9a1c", "score": "0.7741953", "text": "public function run()\n {\n\n //Roles_users seeding for another users is in email seeder because of really low speed\n\n DB::table('roles')->insert([\n [\"name\" => \"god\"],\n [\"name\" => \"manager\"],\n [\"name\" => \"team lead\"],\n [\"name\" => \"worker\"],\n\n ]);\n\n DB::table('role_user')->insert([\n [\n \"role_id\" => 3,\n \"user_id\"=> 1\n ],\n\n [\n \"role_id\" => 3,\n \"user_id\"=> 2\n ],\n\n [\n \"role_id\" => 1,\n \"user_id\"=> 3\n ],\n\n ]);\n\n\n\n }", "title": "" }, { "docid": "19f0aa36449738c9cf2926519151472e", "score": "0.774149", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n DB::table('perfil')->insert([\n 'nombre' => 'Secretaria',\n 'estado' => 'Habilitado',\n ]);\n DB::table('perfil')->insert([\n 'nombre' => 'Paciente',\n 'estado' => 'Habilitado',\n ]);\n DB::table('users')->insert([\n 'name' => 'Paula',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'perfil_id' => '1'\n ]);\n DB::table('users')->insert([\n 'name' => 'Alejandro',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'perfil_id' => '2'\n ]);\n }", "title": "" }, { "docid": "51b506fa28941547a4dc56357321b629", "score": "0.77403784", "text": "public function run()\n {\n // user's seed.\n for( $i = 0; $i < 5; $i++ ){\n DB::table('users')->insert([\n 'name' => 'のーねーむ'.$i.'世',\n 'email' => \"sample'.$i.'@user.com\",\n 'email_verified_at' => NULL,\n 'password' => \"sampleuser\",\n ]);\n\n // article's seed.\n DB::table('articles')->insert([\n 'title' => 'タイトル',\n 'descript' => '説明文',\n 'image_thumb' => 'none',\n 'user_id' => intval($i /3 + 1),\n ]);\n }\n }", "title": "" }, { "docid": "a63cef085d1335aaf44a27cc6ef08271", "score": "0.77402407", "text": "public function run()\n\t{\n DB::table('posts')->delete();\n\n $faker = Faker::create();\n\n\t\tforeach(range(1, 20) as $index)\n\t\t{\n Post::create([\n 'title'=> $faker->paragraph(1),\n 'content'=> $faker->paragraph(40),\n 'status' => 'published',\n 'user_id' => $faker->numberBetween(1,4)\n ]);\n\t\t}\n\t}", "title": "" }, { "docid": "472f096d7693039a79156886d0a71454", "score": "0.77307725", "text": "public function run()\n {\n $faker = Faker::create();\n\n for($i=0 ; $i<40 ; $i++)\n {\n DB::table('posts')->insert([\n 'title'=>$faker->text($maxNvchars = 50),\n 'text'=>$faker->text,\n 'price'=>$faker->randomNumber(4),\n 'user_id'=>rand(1,5),\n 'category_id'=>rand(1,5),\n 'country_id'=>rand(1,6),\n ]);\n }\n }", "title": "" }, { "docid": "2bf248199c041989fda1e66fd2e772b1", "score": "0.77219385", "text": "public function run()\n {\n // Create a faker instance\n $faker = Faker::create();\n\n // For covering the services, we get the count from service model.\n // So that way the foreign key service_id won't give us any problems.\n $numAdmins= 5;//default\n if(Schema::hasTable('admins'))\n $numAdmins = Admin::all()->count();\n for ($i=0; $i < 20; $i++) {\n News::create(\n [\n 'admin_id'=>$faker->numberBetween(1,$numAdmins),\n 'title'=>$faker->text(45),\n 'content'=>$faker->text(1545),\n 'image'=>$faker->text(145),\n 'status'=>$faker->numberBetween(0,1), \n\t\t\t\t\t'role_id'=>0,\n\t\t\t\t\t'role'=>0 \n\n ]\n );\n }\n }", "title": "" }, { "docid": "6f1de7adc99a9b9837fa169ecebd13d6", "score": "0.77218735", "text": "public function run()\n {\n // per disabilitare un attimo le foreign keys: DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // questo lo chiami quando fai php artisan db:seed senza specificare quale seed vuoi lanciare\n \n // $this->call(UsersTableSeeder::class);\n $this->call(SeedUsersTable::class);\n $this->call(SeedAlbumCategoriesTable::class); // lo mettiamo prima di album perchè nel seeder di album avremo bisogno della categoria per popolare la tabella pivot\n $this->call(SeedAlbumsTable::class);\n $this->call(SeedPhotosTable::class);\n \n }", "title": "" }, { "docid": "5ed343ae0259ef81c0aa0f7fe77f0cd1", "score": "0.7720708", "text": "public function run()\n {\n // Create a Faker instance\n $faker = Faker\\Factory::create();\n \n // Create 25 cats\n $sex = ['male', 'female'];\n \n for ($i=0; $i<25; $i++) {\n DB::table('cats')->insert([\n 'name' => $faker->lastName,\n 'sex' => $sex[rand(0, 1)],\n 'date_of_birth' => $faker->date,\n 'owner_email' => $faker->unique()->email,\n 'breed_id' => rand(1, 5)\n ]);\n }\n }", "title": "" }, { "docid": "3ac5a0a336cf8fd4fc401490bf6c932a", "score": "0.7718651", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n DB::table('users')->insert([\n 'name' => 'Ana',\n 'email' => '[email protected]',\n 'password' => Hash::make('123'),\n ]);\n\n $faker = Faker::create();\n $betters = 25;\n $horses = 7;\n\n foreach(range(1, $horses) as $_) {\n DB::table('horses')->insert([\n 'name' => $faker->firstName(),\n 'runs' => rand(15, 30),\n 'wins' => rand(1, 15),\n 'about' => $faker->realText(400, 4),\n ]);\n }\n\n foreach(range(1, $betters) as $_) {\n DB::table('betters')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n 'bet' => rand(1, 75),\n 'horse_id' => rand(1, $horses),\n ]);\n }\n \n }", "title": "" }, { "docid": "b2d221a2b44c9d38602db6a3cf36a881", "score": "0.77172613", "text": "public function run()\n {\n DatabaseSeeder::truncateTable('documents');\n\n $documents = [\n [\n 'id' => 1,\n 'team_id' => 1,\n 'title' => \"This is document ONE\",\n 'body' => \"This is document BODY. I love this service.\",\n ],\n [\n 'id' => 2,\n 'team_id' => 1,\n 'title' => \"This is document TWO\",\n 'body' => \"This is document BODY. I love this service.\",\n ],\n [\n 'id' => 3,\n 'team_id' => 1,\n 'title' => \"This is document THREE\",\n 'body' => \"This is document BODY. I love this service.\",\n ],\n ];\n\n foreach ($documents as $document) {\n DB::table('documents')->insert($document);\n }\n }", "title": "" }, { "docid": "b79d13053105ee6fab709dcdfaf1dc7c", "score": "0.77166504", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class, 5)->create();\n factory(Categoria::class, 5)->create();\n factory(Publicacao::class, 5)->create();\n factory(Comentario::class, 20)->create()->each(function () {\n return factory(AvaliacaoComentario::class, 2)->create();\n });\n }", "title": "" }, { "docid": "acb60748659a59cad7e83ff2180fc299", "score": "0.7716107", "text": "public function run()\n {\n factory(App\\Models\\Article::class,50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProductsTableSeeder::class);\n $this->call(PermissionTableSeeder::class);\n $this->call(RolesTableSeeder::class);\n $this->call(RolesPermissionTableSeeder::class);\n $this->call(RoleUserTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n $this->call(CountryTableSeeder::class);\n $this->call(PostTableSeeder::class);\n\n }", "title": "" }, { "docid": "887911080e539150f3373a1e5e8123e6", "score": "0.77119416", "text": "public function run()\n {\n $this->call(CountrySeeder::class);\n $this->call(CategorySeeder::class);\n $this->call(RestaurantSeeder::class);\n \n for ( $i = 1; $i < 11; $i++ )\n {\n $this->call(UserTableSeeder::class);\n }\n\n $this->call(PostSeeder::class);\n\n for ( $i = 1; $i < 110; $i++ )\n {\n $this->call(CommentSeeder::class);\n }\n\n $this->call(RoleSeeder::class);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => 'password',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n 'country_id' => rand(1,5),\n ]);\n }", "title": "" }, { "docid": "4ffc4c50ccfe475a3fc31f7404686879", "score": "0.77106845", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n DB::table('roles')->insert([\n ['role' => 'seller'],\n ['role' => 'buyer'],\n ]);\n\n DB::table('software_types')->insert([\n ['type' => 'desktop'],\n ['type' => 'website'],\n ['type' => 'mobile'],\n ]);\n\n\n DB::table('statuses')->insert([\n ['status' => 'waiting for payment'],\n ['status' => 'bought'],\n ]);\n }", "title": "" }, { "docid": "f99c83563bbcd82a0574dec2f094bc74", "score": "0.77098095", "text": "public function run()\n {\n //Seeder for testdata: roles\n DB::table('roles')->insert(\n [\n [\n 'name' => 'Groendienst',\n 'description' => 'Werknemer van de groendienst'\n ],\n [\n 'name' => 'Participatie',\n 'description' => 'Deelenemer'\n ],\n [\n 'name' => 'Communicatie',\n 'description' => 'Werknemer van de Communicatie'\n ],\n [\n 'name' => 'Administrator',\n 'description' => 'Administrator van het systeem'\n ],\n ]);\n }", "title": "" }, { "docid": "9a1ca203d7b2f055587d44a29773ef68", "score": "0.77081645", "text": "public function run()\n {\n // Seeding user\n $this->call([UsersTableSeeder::class]);\n\n // Create datas\n factory(User::class, 20)->create()->each(function($user) {\n $admin = User::where('username', 'socfisystem')->first();\n factory(News::class, 1)->create([\n 'created_by' => $admin->id,\n 'updated_by' => $admin->id,\n ]);\n if ($user->role == constants('user.role.field_owner')) {\n factory(Stadium::class, 1)->create([\n 'owned_by' => $user->id,\n 'created_by' => $admin->id,\n 'updated_by' => $user->id,\n ])->each(function($stadium) {\n factory(Field::class, 5)->create([\n 'stadium_id' => $stadium->id,\n ]);\n });\n }\n });\n\n }", "title": "" }, { "docid": "cec9ce5395fb48321516d5ea5bd93483", "score": "0.7706121", "text": "public function run()\n {\n /// Let's truncate our existing records to start from scratch.\n Product::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n Product::create([\n 'title' => 'Laptop',\n 'sku' => '12345',\n ]);\n Product::create([\n 'title' => 'Mobile',\n 'sku' => '11223',\n ]);\n \n for ($i = 0; $i < 50; $i++) {\n Product::create([\n 'title' => $faker->word,\n 'sku' => $faker->randomDigit,\n ]);\n }\n }", "title": "" }, { "docid": "916fb78efa832d5ce8fb9fe439c2de95", "score": "0.77051544", "text": "public function run()\n {\n User::factory(10)->create();\n\n DB::table('roles')->insert([\n [\n \"name\" => \"admin\",\n ],\n [\n \"name\" => \"webmaster\",\n ],\n [\n \"name\" => \"visiteur\",\n ],\n [\n \"name\" => \"junior\",\n ],\n [\n \"name\" => \"senior\",\n ]\n ]);\n\n DB::table('role_user')->insert([\n [\n \"role_id\" => \"1\",\n \"user_id\" => \"2\"\n ],\n [\n \"role_id\" => \"1\",\n \"user_id\" => \"4\"\n ],\n [\n \"role_id\" => \"2\",\n \"user_id\" => \"2\"\n ],\n [\n \"role_id\" => \"2\",\n \"user_id\" => \"3\"\n ],\n ]);\n }", "title": "" }, { "docid": "6f4530393b63875c49b9e614112c6164", "score": "0.7704119", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Model\\Employee::class, 5)->create();\n factory(App\\Model\\Client::class, 25)->create();\n factory(App\\Model\\Appointment::class,50)->create();\n factory(App\\Model\\Availability::class,25)->create();\n }", "title": "" }, { "docid": "7af5e923843a3ebb1827eaa3d1e893c2", "score": "0.7702275", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n DB::table(\"posts\")->insert([\n \"title\" => $faker->sentence(),\n \"content\" => $faker->text(400),\n \"user_id\" => $faker->numberBetween(1, 3)\n ]);\n }", "title": "" }, { "docid": "cd620141e4600a2811b641086e2fc91f", "score": "0.7697799", "text": "public function run()\n {\n //\n $faker = Faker::create();\n foreach (range(1, 50) as $index) {\n DB::table('posts')->insert([\n 'title' => $faker->word,\n 'content' => $faker->text,\n ]);\n }\n }", "title": "" }, { "docid": "f1a119de6be7fe4300539c533720cb97", "score": "0.76974744", "text": "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // //$this->call(ContactTableSeeder::class);\n // $this->call(ParentAccountSeeder::class);\n // $this->call(AccountTypeSeeder::class);\n // $this->call(AccountSeeder::class);\n \n // DB::table('users')->insert([\n // 'name' => 'admin',\n // 'role_id' => 1 ,\n // 'email' => '[email protected]',\n // 'password' => Hash::make('secret'),\n // ]);\n // DB::table('activations')->insert([\n // 'user_id' => 1, 'completed' => 1 ,'code' => 1\n // ]);\n // $this->call(HospitalSeeder::class);\n $this->call(DoctorSeeder::class);\n // $this->call(PatientSeeder::class);\n\n\n }", "title": "" }, { "docid": "fbebf4a69057e8dcc9100c8401807d89", "score": "0.7694848", "text": "public function run()\n {\n //\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n // Vorhandene Tabellen leeren\n DB::table('users')->truncate();\n DB::table('roles')->truncate();\n DB::table('role_user')->truncate();\n DB::table('employees')->truncate();\n DB::table('tasks')->truncate();\n DB::table('projects')->truncate();\n\n // Seeder\n $this->call(UserSeeder::class);\n $this->call(EmployeeSeeder::class);\n $this->call(RoleSeeder::class);\n $this->call(RoleUserSeeder::class);\n// $this->call(EmployeeSeeder::class);\n// $this->call(TaskSeeder::class);\n\n // Factory\n// factory(App\\Role::class, 3)->create();\n factory(App\\Employee::class, 10)->create();\n factory(App\\Project::class, 10)->create();\n factory(App\\Task::class, 30)->create();\n// factory(App\\Employee::class, 10)->create()->each(function($employee){\n// $employee->tasks()->save(factor(App\\Task::class)->make());\n// });\n }", "title": "" }, { "docid": "bebecae020a6a76fef2203d618d51b7c", "score": "0.7692975", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n // factory(App\\Garage::class, 10)->create();\n // factory(App\\Service::class, 10)->create();\n factory(App\\Sparepart::class, 10)->create();\n // factory(App\\Mechanician::class, 30)->create();\n // factory(App\\Speciality::class, 10)->create();\n\n // factory(App\\Mechanician::class,20)->create()->each(function ($a) {\n // $a->specialities()->attach(\n // \\App\\Speciality::all()->random()->id\n // );\n // });\n\n $garages = factory(App\\Garage::class, 30)->create();\n $services = factory(App\\Service::class, 20)->create();\n\n $recipes = factory(App\\Mechanician::class, 30)->create();\n $ingredients = factory(App\\Speciality::class, 20)->create();\n\n $recipes->each(function (App\\Mechanician $r) use ($ingredients) {\n $r->specialities()->attach(\n $ingredients->random(rand(5, 10))->pluck('id')->toArray()\n );\n });\n\n $garages->each(function (App\\Garage $r) use ($services) {\n $r->services()->attach(\n $services->random(rand(5, 10))->pluck('id')->toArray()\n );\n });\n }", "title": "" }, { "docid": "506957a6fd7655f83c10ce08ce5e2c1f", "score": "0.7689321", "text": "public function run()\n {\n //\n DB::table('articles')->insert([\n 'title'=>'Artikel Umum',\n 'content'=>'Animasi'\n ]);\n\n $this->call(UserTableSeeder::class);\n $this->call(ArticleTableSeeder::class);\n }", "title": "" }, { "docid": "e4a73c87ba18b46ef47ba3c7c37cddd9", "score": "0.7689198", "text": "public function run()\n {\n // factory(App\\User::class, 1)->create()->each(function ($user) {\n // $meals = factory(App\\Meal::class, 3)->make();\n // $user->meals()->saveMany($meals);\n // });\n\n DB::table('users')->insert([\n 'name' => 'Félix',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n }", "title": "" }, { "docid": "dff14891e1b1a527873a916e575fb85b", "score": "0.76873535", "text": "public function run()\n {\n // number of database records to create\n $numRows = 100;\n \n // create Faker object\n $faker = Faker::create(); \n\n for ($i = 0; $i < $numRows; $i++) {\n // create model object\n $book = new \\Foobooks\\Book();\n $book->title = $faker->sentence($nbWords = 6);\n $book->author = $faker->name;\n $book->published = $faker->year('now');\n $book->cover = $faker->imageUrl(320, 240, 'cats');\n $book->purchase_link = $faker->url;\n $book->page_count = $faker->numberBetween(101,999);\n\n $book->save(); // insert new book in table\n }\n\n }", "title": "" }, { "docid": "652e16bca4baba4e9e5088bfa7e4256c", "score": "0.7687097", "text": "public function run()\n {\n $faker = Faker\\Factory::create('ja_JP');\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('diaries')->truncate();\n for ($i=1; $i < 11; $i++) {\n DB::table('diaries')->insert([\n [\n 'account_id' => rand(1, 5),\n 'name' => $faker->realText(10),\n 'body' => $faker->realText(30),\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n ]);\n }\n }", "title": "" }, { "docid": "150f5fd738e490e8cb388a3b9a514918", "score": "0.768424", "text": "public function run()\n {\n /* ===== ORDER IS IMPORTANT ===== */\n /* ===== KEEP THE ORDER SAME ===== */\n // update voyager tables\n $this->seed('DataTypesTableSeeder');\n $this->seed('DataRowsTableSeeder');\n $this->seed('MenusTableSeeder');\n $this->seed('MenuItemsTableSeeder');\n $this->seed('PermissionsTableSeeder');\n $this->seed('PermissionRoleTableSeeder');\n $this->seed('SettingsTableSeeder');\n }", "title": "" }, { "docid": "50b509186722d57e3f283904e55a2017", "score": "0.76801497", "text": "public function run()\n {\n DB::table('users')->insert([\n \"firstname\" => \"Admin\",\n \"lastname\" => \"\",\n \"email\" => \"[email protected]\",\n \"password\" => bcrypt(\"admin\"),\n \"address1\" => \"\",\n \"address2\" => \"\",\n \"city\" => \"\",\n \"state\" => \"\",\n \"postal\" => \"\",\n \"country\" => \"\",\n \"dayphone\" => \"\",\n \"evephone\" => \"\" ,\n \"status\" => 1,\n \"role\" => 1,\n \"pick\" => 1,\n ]);\n /*$this->call(CategoriesTableSeeder::class);\n $this->call(ProductsTableSeeder::class);\n $this->call(OrdersTableSeeder::class);*/\n $this->call(PublishedUsersTableSeeder::class);\n $this->call(PUblishedCategoriesTableSeeder::class);\n $this->call(PublishedProductsTableSeeder::class);\n }", "title": "" }, { "docid": "1261a27da11241a4cf972a2cb8ce933e", "score": "0.7676899", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n Category::truncate();\n Book::truncate();\n Author::truncate();\n Inventory::truncate();\n Rental::truncate();\n DB::table('book_category')->truncate();\n\n $usersQuantity = 50;\n $categoriesQuantity = 12;\n $booksQuantity = 1000;\n $rentalsQuantity = 500;\n\n factory(User::class, $usersQuantity)->create();\n factory(Category::class, $categoriesQuantity)->create();\n factory(Author::class, $usersQuantity)->create();\n factory(Inventory::class, $booksQuantity)->create();\n factory(Book::class, $booksQuantity)->create()->each(\n function($book){\n $rand_int = (int)rand(1,3);\n $categories = Category::all()->random($rand_int)->pluck('id');\n $book->categories()->attach($categories);\n });\n factory(Rental::class, $rentalsQuantity)->create();\n }", "title": "" }, { "docid": "70332d4dd9ea8bddbdb855a21a57ba73", "score": "0.7675955", "text": "public function run()\n {\n\n // Clear db\n DB::table('users')->delete();\n\n\n // Add admin\n User::create([\n 'name' => \"Admin\",\n 'email' => \"[email protected]\",\n 'password' => bcrypt('secret'),\n 'is_admin' => true,\n 'is_blocked' => false\n ]);\n\n $faker = Faker::create(\"es_ES\");\n \tforeach (range(1,10) as $index) {\n\t User::create([\n\t 'name' => $faker->name,\n\t 'email' => $faker->email,\n 'password' => bcrypt('secret'),\n 'is_admin' => false,\n 'is_blocked' => false\n\t ]);\n }\n\n }", "title": "" }, { "docid": "674ef1387eb7da916e33415ab534ddce", "score": "0.76752734", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Pizza::truncate();\n\n //$faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n \n Pizza::create([\n 'name' => 'Pepperoni',\n 'price' => 17,\n ]);\n\n Pizza::create([\n 'name' => 'Chesse',\n 'price' => 15,\n ]);\n\n Pizza::create([\n 'name' => 'Tunna',\n 'price' => 21,\n ]);\n\n Pizza::create([\n 'name' => 'Chicken',\n 'price' => 20,\n ]);\n\n Pizza::create([\n 'name' => 'Four Cheese',\n 'price' => 23,\n ]);\n\n Pizza::create([\n 'name' => 'Fugazzeta',\n 'price' => 22,\n ]);\n\n Pizza::create([\n 'name' => 'Veggie',\n 'price' => 20,\n ]);\n\n Pizza::create([\n 'name' => 'Neapolitan',\n 'price' => 18,\n ]);\n\n }", "title": "" }, { "docid": "1f73b9ae8aea0bd52347552e5bd463f2", "score": "0.7672805", "text": "public function run()\n {\n $this->call(userSeederTable::class);\n \n $this->deleteImages('public/storage');\n\n $companies = Companies::factory(60)->create();\n\n foreach ($companies as $company) {\n Employees::factory(random_int(10, 55))->create([\n 'company_id' => $company->id\n ]);\n }\n }", "title": "" }, { "docid": "dc0764ad26e2640379396900a74177b1", "score": "0.76724046", "text": "public function run()\n {\n $this->call(UserSeeder::class);\n $this->call(Categoryseeder::class);\n $this->call(SliderSeeder::class);\n $this->call(ShopSeeder::class);\n $this->call(ProductSeeder::class);\n\n $this->call(DivisionSeeder::class);\n $this->call(DistrictSeeder::class);\n $this->call(UpazilaSeeder::class);\n\n $this->call(WholeSaleSeeder::class);\n\n\n Customer::create([\n 'customer_name' => \"Motiur Rahaman\",\n 'customer_phone' => \"01717849968\",\n 'customer_email' => \"[email protected]\",\n 'customer_password' => Hash::make(\"123456\")\n ]);\n\n \\App\\CustomerAddress::create([\n 'customer_id' => 1,\n 'division_id' => 1,\n 'district_id' => 4,\n 'upazila_id' => 8,\n 'customer_address' => \"Mirpur-1, Dhaka\",\n ]);\n\n\n AppSetting::create([\n 'app_version' => 1,\n ]);\n\n \\App\\DeliveryCharge::create([\n 'product_quantity' => 20,\n 'delivery_charge' => 150,\n 'extra_charge' => 2,\n ]);\n\n }", "title": "" }, { "docid": "fb735e0674576f30b38510e01cd5b82b", "score": "0.7672133", "text": "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n DB::table('format')->insert([\n 'name' => \".pdf\",\n ]);\n DB::table('format')->insert([\n 'name' => \".doc\",\n ]);\n\n DB::table('format')->insert([\n 'name' => \".docx\",\n ]);\n\n DB::table('category')->insert([\n 'name' => \"Math\",\n ]);\n DB::table('category')->insert([\n 'name' => \"Science\",\n ]);\n DB::table('category')->insert([\n 'name' => \"History\",\n ]);\n DB::table('category')->insert([\n 'name' => \"Information technology\",\n ]);\n DB::table('category')->insert([\n 'name' => \"Physics\",\n ]);\n DB::table('login')->insert([\n 'username' => \"[super[user]21*]\",\n 'password' => \"4baba96e17fd7a4e6eefc2646b8613b3\",//#bufe99*{}.\n 'role' => 1,\n ]);\n\n\n\n }", "title": "" }, { "docid": "b26f1f51c2148be017ae4079c5199faf", "score": "0.7671181", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1,20) as $index) {\n //$user_id = $faker->unique()->randomNumber();\n $user_id = Uuid::generate(1);\n DB::table('users')->insert([\n 'uuid' => $user_id,\n 'name' => $faker->name,\n 'email' => $faker->email,\n //'password' => bcrypt('secret'),\n 'password' => \"Password\"\n ]);\n\n DB::table('posts')->insert([\n 'id' => $faker->unique()->randomNumber(),\n 'name' => $faker->name,\n 'title' => $faker->email,\n 'comment' => 'Comment',\n 'user_uuid' => $user_id,\n ]);\n }\n }", "title": "" }, { "docid": "85f06c7e39f58ee9db90ae41a6974d8d", "score": "0.7669802", "text": "public function run()\n {\n \\app\\Models\\User::factory(10)->create();\n $this->all([\n \tatletasSeeder::class;\n ])\n $this->all([\n \ttreinadorsSeeder::class;\n ])\n }", "title": "" }, { "docid": "486cb94d1299d4cfd88c17b330f0d002", "score": "0.76662165", "text": "public function run()\n {\n $this->call(RoleSeeder::class);\n User::factory(10)->create();\n Team::factory(10)->create();\n Curso::factory(100)->create();\n CursoUser::factory(300)->create();\n Comment::factory(300)->create();\n // $this->call(CursoSeeder::class); \n }", "title": "" }, { "docid": "eaa36d59ca2e60fd62bc0e84251fcaea", "score": "0.76654196", "text": "public function run()\n {\n \\App\\Models\\Category::factory(20)->create();\n // \\App\\Models\\Book::factory(20)->create();\n // \\App\\Models\\User::factory(20)->create();\n\n\n $categories = \\App\\Models\\Category::all();\n\n \\App\\Models\\User::factory(20)->create()->each(function ($u) {\n \\App\\Models\\Book::factory(5)->create()->each(function ($e) use ($u) {\n \\App\\Models\\Rent::factory(3)->create([\n 'user_id' => $u->id,\n 'book_id' => $e->id,\n ]);\n });\n });\n\n \\App\\Models\\Book::all()->each(function ($book) use ($categories) {\n $book->categories()->attach(\n $categories->random(rand(1, 3))->pluck('id')->toArray()\n );\n });\n }", "title": "" }, { "docid": "cc3e3b72d7075a692504f192e197435f", "score": "0.7663564", "text": "public function run()\n {\n $faker = Faker::create();\n foreach(range(0,10) as $i){\n DB::table('articles')->insert([\n // 'id' => $faker->number,\n 'title' => $faker->text($maxNbChars = 10),\n 'content' => $faker->text($maxNbChars = 250),\n 'featured_image' => $faker->imageUrl($width = 640, $height = 480),\n ]);\n }\n }", "title": "" }, { "docid": "968b6011cb032390f6dd8b525a4924d9", "score": "0.766269", "text": "public function run()\n {\n $this->call(RootSeeder::class);\n factory(Group::class)->create();\n factory(Logo::class)->create();\n factory(Role::class)->create();\n factory(GroupLogo::class)->create();\n factory(Image::class, 10)->create();\n factory(Legal::class)->create();\n }", "title": "" }, { "docid": "e4f397a4c2f49094b9935b19b9d67db2", "score": "0.7659322", "text": "public function run()\n {\n //\n User::create([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('password'),\n 'remember_token' => Str::random(10),\n 'icon' => 'default.png',\n 'status_id' => 1,\n 'birthday' => new Carbon()\n ]);\n Blog::create([\n 'user_id' => 1,\n 'title' => 'First Blog Title',\n 'status_id' => 1,\n 'overview' => 'First Blog Overview'\n ]);\n\n for($i=0;$i<100;$i++){\n $user = factory(User::class)->create();\n factory(Blog::class)->create(['user_id' => $user->id]);\n }\n }", "title": "" }, { "docid": "c41be59946930292e3a505d369f043a6", "score": "0.76536876", "text": "public function run()\n {\n //'name', 'gender','date_of_birth','date_of_death','pond_number'\n\n //Frogs::truncate();\n\n Frogs::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Frogs::create([\n 'name' => $faker->sentence,\n 'gender' => $faker->paragraph,\n ]);\n }\n \n // Frogs::create([\n // 'name' => \"ahmad\",\n // 'gender' => \"male\",\n // 'date_of_birth' => 1/1/2011,\n // 'date_of_death' => 1/5/2011,\n // 'pond_number' => \"5\",\n // ]);\n }", "title": "" }, { "docid": "88206af2dec4b3ed1b8ec18b635baa65", "score": "0.76521623", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(ProgramSeeder::class);\n // factory(App\\Pengumuman::class, 15)->create();\n // factory(App\\PengumumanUser::class, 25)->create();\n // factory(App\\Beasiswa::class, 10)->create();\n factory(App\\Grade::class, 5)->create();\n }", "title": "" }, { "docid": "313aeed96c4bd858a954787d0283397e", "score": "0.7650298", "text": "public function run()\n {\n User::create([\n 'name'=> 'Alperen',\n 'email' => '[email protected]',\n 'password' => Hash::make('1'),\n ]);\n User::factory(3)->create();\n Post::factory(30)->create();\n Tags::factory(15)->create();\n }", "title": "" }, { "docid": "44be4106819867e13c1f2aa9b59c5345", "score": "0.76495284", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'foo baz',\n 'password' => bcrypt('123456'),\n 'email' => '[email protected]'\n ]);\n factory(Owner::class, 20)->create();\n factory(Vehicle::class, 20)->create();\n }", "title": "" }, { "docid": "227a554bd767da41dd6e01a001677119", "score": "0.7648249", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n for($i = 0; $i < 10; $i++) {\n DB::table('country')->insert([\n 'name' => $faker->country\n ]);\n\n DB::table('city')->insert([\n 'name' => $faker->city\n ]);\n\n DB::table('street')->insert([\n 'name' => $faker->streetAddress\n ]);\n\n DB::table('adress')->insert([\n 'country_id' => rand(1, $i + 1),\n 'city_id' => rand(1, $i + 1),\n 'street_id' => rand(1, $i + 1)\n ]);\n\n DB::table('user')->insert([\n 'firstname' => $faker->firstName,\n 'lastname' => $faker->lastName,\n 'adress_id' => rand(1, $i + 1)\n ]);\n }\n }", "title": "" }, { "docid": "2a2e06c37c669b5d94df1eccc70512b4", "score": "0.76466334", "text": "public function run()\n {\n //Seeds 30 Fake Users to your Database\n factory(App\\User::class, 30)->create();\n\n //Seeds 100 Posts to your database\n factory(App\\Post::class, 100)->create();\n }", "title": "" }, { "docid": "a8195d71e0e715cdcb7e5140984e62d0", "score": "0.76453394", "text": "public function run()\n {\n $faker = Faker::create('id_ID');\n\n for ($i = 0; $i < 50; $i++) {\n $classroom_ids = Classroom::pluck('id');\n\n Student::create([\n 'name' => $faker->name(),\n 'classroom_id' => $classroom_ids->random()\n ]);\n }\n }", "title": "" }, { "docid": "6e38b7f1d6b050d66f22bbbc3c89bf71", "score": "0.764472", "text": "public function run()\n {\n Model::unguard();\n\n factory(App\\Country::class,100)->create();\n factory(App\\User::class,10)->create();\n factory(App\\Role::class,4)->create();\n factory(App\\Article::class,100)->create();\n factory(App\\Phone::class,10)->create();\n factory(App\\UserRole::class,10)->create();\n\n\n // DB::table('user_role')->insert(\n // [\n // 'user_id' => factory(App\\User::class)->create()->id,\n // 'role_id' => factory(App\\Role::class)->create()->id,\n // ]\n // );\n\n\n Model::reguard();\n }", "title": "" }, { "docid": "f90119a214bcd1e3ab9d8129e755741b", "score": "0.76443666", "text": "public function run()\n {\n $faker = Faker::create();\n\n foreach (range(1,50) as $index) {\n DB::table('news')->insert([\n 'title' => $faker->sentence($nbWords = 6, $variableNbWords = true),\n 'content' => $faker->text($maxNbChars = 200),\n 'image' =>$faker->imageUrl($width = 640, $height = 480),\n 'category_id' => $faker->numberBetween($min = 1, $max = 6),\n 'created_at' => $faker->dateTime($max = 'now'),\n 'updated_at' => $faker->dateTime($max = 'now'),\n ]);\n }\n }", "title": "" }, { "docid": "24f462ce09bba401539316bfbccf3d9e", "score": "0.76434624", "text": "public function run()\n {\n // Uncomment the below to wipe the table clean before populating\n DB::table('recipe_tags')->delete();\n \n $recipe_tags= array(\n ['tag' => 'fast food', 'recipe_id' => 1],\n ['tag' => 'apitisers', 'recipe_id' => 1]\n );\n \n // Uncomment the below to run the seeder\n DB::table('recipe_tags')->insert($recipe_tags);\n }", "title": "" }, { "docid": "2d9f4eea1121e05b1f00ad8444e9902d", "score": "0.76428723", "text": "public function run()\n {\n $this->truncateTable();\n\n $faker = \\Faker\\Factory::create();\n $faker->addProvider(new \\Bezhanov\\Faker\\Provider\\Food($faker));\n\n foreach (range(1, 50) as $index) {\n DB::table('products')->insert([\n 'id' => Str::uuid(),\n 'name' => $faker->ingredient,\n 'price' => $faker->numberBetween($min = 500, $max = 10000),\n 'stock' => $faker->numberBetween($min = 3, $max = 10),\n 'description'=> $faker->paragraph($nb =8),\n 'start_sale' => date('Y-m-d H:i:s'),\n 'end_sale' => date('Y-m-d H:i:s', strtotime(date('Y-m-d H:i:s') . ' +1 day'))\n ]);\n }\n }", "title": "" }, { "docid": "ef86f91ef66143e3a212e72c445ea0b5", "score": "0.76414895", "text": "public function run()\n {\n Eloquent::unguard();\n\n //disable foreign key check for this connection before running seeders\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n \n Speakers::truncate();\n factory(App\\Speakers::class, 15)->create();\n\n Members::truncate();\n factory(App\\Members::class, 5)->create();\n\n Supporters::truncate();\n factory(App\\Supporters::class, 10)->create();\n\n Workshops::truncate();\n factory(App\\Workshops::class, 10)->create();\n SponsorsGroups::truncate();\n factory(App\\SponsorsGroups::class, 5)->create();\n\n Sponsors::truncate();\n factory(App\\Sponsors::class, 15)->create();\n\n Jobs::truncate();\n factory(App\\Jobs::class, 15)->create();\n\n Topics::truncate();\n factory(App\\Topics::class, 6)->create();\n\n Talk::truncate();\n factory(App\\Talk::class, 10)->create();\n\n ScheduleItem::truncate();\n\n foreach (Talk::all() as $talk) {\n $talk->speakers()->sync(App\\Speakers::all()->random(1)->first());\n }\n\n foreach (Workshops::all() as $workshop) {\n $workshop->speakers()->sync(App\\Speakers::all()->random(1)->first());\n }\n\n App\\VideoGroups::truncate();\n factory(App\\VideoGroups::class, 4)->create();\n\n App\\Videos::truncate();\n factory(App\\Videos::class, 40)->create();\n\n App\\EventImages::truncate();\n factory(App\\EventImages::class, 4)->create();\n \n User::truncate();\n $user = new User;\n $user->name = 'Admin';\n $user->email = '[email protected]';\n $user->password = bcrypt('123456');\n $user->save();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "6b9fe259ece034836737de7a2cdf1b43", "score": "0.76399595", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Role::create([\n \t\"id\"=>1,\n \t\"role\"=>\"admin\"\n ]);\n\n Role::create([\n \t\"id\"=>2,\n \t\"role\"=>\"client\"\n ]);\n\n Role::create([\n \t\"id\"=>3,\n \t\"role\"=>\"technician\"\n ]);\n\n \tUser::create([\n \t\t\"id\"=>1,\n \t\t\"role_id\"=>2,\n \t\t\"name\"=>\"zulham\",\n \t\t\"email\"=>\"[email protected]\",\n \t\t\"password\"=>bcrypt(\"zulhamganteng\")\n \t]);\n\n }", "title": "" }, { "docid": "f72423a7b3ea8663bb1d7c1c15c6fab1", "score": "0.76394016", "text": "public function run()\n {\n m_mahasiswas::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n m_mahasiswas::create([\n 'id' => $faker->rand(),\n 'nim' => $faker->sentence,\n 'matkul' =>$faker->sentence,\n 'semester'=>$faker->rand(),\n 'imei'=>$faker->rand(),\n ]);\n }\n }", "title": "" }, { "docid": "390972c962a38f478d5c7d736c09ca0e", "score": "0.7632495", "text": "public function run()\n {\n Model::unguard();\n \n // Truncate all tables before seeding.\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n foreach ($this->toTruncate as $table) {\n DB::table($table)->truncate();\n }\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n \n // Run the seeds.\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n $this->call(StatusTableSeeder::class);\n $this->call(LanguageTableSeeder::class);\n $this->call(PartOfSpeechTableSeeder::class);\n $this->call(ScientificAreaTableSeeder::class);\n $this->call(ScientificFieldTableSeeder::class);\n $this->call(ScientificBranchTableSeeder::class);\n \n Model::reguard();\n }", "title": "" }, { "docid": "29f17a90397058e8dff76a6f8742dd8a", "score": "0.7632352", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(forum\\User::class, 10)->create()->each(function($user){ \n $user->temas()->save(factory(forum\\Models\\Tema::class)->make());\n });\n\n factory(forum\\Models\\Tema::class, 10)->create();\n\n factory(forum\\Models\\Postagem::class, 50)->create();\n\n factory(forum\\Models\\Resposta::class, 50)->create();\n\n }", "title": "" }, { "docid": "de84d4e81016a7a36df1001bf862c372", "score": "0.7631422", "text": "public function run()\n {\n $this->call([\n DbSeeder::class\n ]);\n // DB::table('users')->insert([\n // 'name' => 'admin',\n // 'apellido' => 'Rodriguez',\n // 'nro_documento' => '84758',\n // 'direccion' => 'UAGRM',\n // 'telefono' => 12345678,\n // 'email' => '[email protected]',\n // 'password' => Hash::make('0120'),\n // 'rol' => 'admin',\n // 'puntos_acumulados' => 0,\n // ]);\n // DB::table('users')->insert([\n // 'name' => 'diego',\n // 'apellido' => 'Rodriguez',\n // 'nro_documento' => '84758',\n // 'direccion' => 'UAGRM',\n // 'telefono' => 12345678,\n // 'email' => '[email protected]',\n // 'password' => Hash::make('0120'),\n // 'rol' => 'user',\n // 'puntos_acumulados' => 0,\n // ]);\n // DB::table('users')->insert([\n // 'name' => 'mariela',\n // 'apellido' => 'Rodriguez',\n // 'nro_documento' => '84758',\n // 'direccion' => 'UAGRM',\n // 'telefono' => 12345678,\n // 'email' => '[email protected]',\n // 'password' => Hash::make('0120'),\n // 'rol' => 'user',\n // 'puntos_acumulados' => 0,\n // ]);\n }", "title": "" }, { "docid": "10587759df251e2ff692802a53c072b8", "score": "0.7630561", "text": "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n factory(App\\Brand::class, 10)->create()->each(function ($brand) {\n for ($i=0; $i < 4; $i++) { \n $product = factory(App\\Product::class)->make();\n $brand->products()->save($product);\n $product->quantityprices()->save(factory(App\\QuantityPrice::class)->make());\n if ($i % 2) {\n $product->quantityprices()->save(factory(App\\QuantityPrice::class)->make());\n }\n }\n });\n factory(App\\User::class)->create(['email' => '[email protected]']);\n factory(App\\User::class)->create(['email' => '[email protected]']);\n }", "title": "" } ]
992ea331e6ea58b8603e840dbf59feec
/ Reviews model check that clients first
[ { "docid": "4ffc084a35cfd54995e35205a2079b01", "score": "0.0", "text": "function checkExistingClient($clientId){\n $db = acmeConnect();\n $sql = 'SELECT clientId FROM clients WHERE clientId = :clientId';\n $stmt = $db->prepare($sql);\n $stmt->bindValue(':clientId', $clientId, PDO::PARAM_INT);\n $stmt->execute();\n $matchClient = $stmt->fetch(PDO::FETCH_NUM);\n $stmt->closeCursor();\n if(empty($matchClient)){\n return null;\n } else {\n return 1;\n }\n}", "title": "" } ]
[ { "docid": "61e5c7716fa2eb6d6354a96f244d69fd", "score": "0.6097941", "text": "public function show(ClientReview $clientReview)\n {\n //\n }", "title": "" }, { "docid": "07b88a012548b20421a0273b9626748b", "score": "0.5591808", "text": "public function beforeSave (Client $client) {\n }", "title": "" }, { "docid": "f8b0c480f342ec235512fd59fcc6cca3", "score": "0.5585696", "text": "public function show($client_id)\n {\n \n $client = Client::find($client_id);\n $tps= Type::all();\n $photographers = User::role('photographer')->get();\n return view('client.show',compact('client','bookings','tps','photographers'))->with('i', (request()->input('page', 1) - 1) * 5);\n }", "title": "" }, { "docid": "f10acb544acde52d063b4a457f2d9045", "score": "0.5505777", "text": "public function isClient()\n {\n $role = Role::join('role_user', 'roles.id', '=', 'role_user.role_id')\n ->where('user_id', Auth::user()->id)\n ->first();\n return $role->name == 'client' ? true : false;\n }", "title": "" }, { "docid": "a47cce1bbb9dd65bfeb2255e7bd13f6c", "score": "0.5449338", "text": "public function clients()\n\t{\n\t\treturn $this->hasOne(config('core.acl.clients_model'));\n\t}", "title": "" }, { "docid": "14dd27eb094fa6d481990063a9719882", "score": "0.53477585", "text": "public function view(Authenticatable $user, Client $client)\n {\n if ($user->canDo('user.client.view') && $user->isAdmin()) {\n return true;\n }\n\n return $client->user_id == user_id() && $client->user_type == user_type();\n }", "title": "" }, { "docid": "cae35d855374fbbd3a247e7b8c66326d", "score": "0.52933884", "text": "public function index()\n {\n return User::has('client')->get();\n }", "title": "" }, { "docid": "40cb42d2b571add966af28c665285fae", "score": "0.52811307", "text": "public function client()\n {\n return $this->belongsTo('App\\Models\\Client','client_id');\n }", "title": "" }, { "docid": "8348933f1359f71c8f2eefdcd86ce8e0", "score": "0.52784914", "text": "public function clients()\n {\n \treturn $this->belongsTo('App\\Client');\n }", "title": "" }, { "docid": "5a84d76119864bcfe1ac2aaa13ab9c38", "score": "0.5275266", "text": "public function getIsClientAttribute()\n {\n return $this->role == 2;\n }", "title": "" }, { "docid": "364310009b59360e923277fd90bf1d5c", "score": "0.5234661", "text": "public function check_if_edit_link_is_shown_to_client()\n {\n $response = $this->post('/babyshowers', [\n 'name_mama' => 'Mothers name',\n 'name_papa' => 'Fathers name',\n 'email' => '[email protected]',\n 'name_bebe' => 'Babys name',\n 'birth_date' => Carbon::now()->addMonths('2'),\n 'event_date' => Carbon::now()->addDays('10'),\n ]);\n\n $response->assertOk();\n $this->assertCount(1, Babyshower::all());\n\n \n\n $response->assertSee($response->getOriginalContent()->getData()['linkEdit']);\n\n }", "title": "" }, { "docid": "c5236db33cd322ca036ebe49ec943cdc", "score": "0.5227326", "text": "function can_see_user_recently_viewed_articles($viewedUser, $viewer = null)\n{\n if (!$viewer && \\Auth::check()) $viewer = \\Auth::user();\n\n // if user found and this user is the entity author, return TRUE\n return ($viewer && (($viewer->id == $viewedUser->id) || $viewer->is_admin));\n}", "title": "" }, { "docid": "8c99e885bb262d79194750a680ed29de", "score": "0.52198696", "text": "public function getReviewer()\n {\n\t\treturn $this->hasOne(AuditPlanReviewer::className(), ['audit_plan_id' => 'id'])->andOnCondition(['reviewer_status' => '1']);\n }", "title": "" }, { "docid": "a0f35974d5ebb5d3c9567c721a3c598c", "score": "0.5218125", "text": "public function index(Client $client)\n {\n $client = $client->where('company',Auth::user()->company)->get();\n return Res_Client::collection($client);\n }", "title": "" }, { "docid": "2797b953bfff9779a0c11f11035f3973", "score": "0.520988", "text": "public function reviews() {\n\t\t// pass reviews to view\n\t}", "title": "" }, { "docid": "bfa16c81507d48f64870eb1781002d30", "score": "0.5177972", "text": "public function client()\n {\n return $this->belongsTo(Client::class,'client_id');\n }", "title": "" }, { "docid": "29e6ea254b48e37624e2bdda353faf96", "score": "0.5163189", "text": "public function show(Client $client)\n {\n $client->orders = $client->orders()->with('products')->with('products.images')->get();\n foreach($client->orders as $order)\n {\n $status = OrderController::getStatus($order->status);\n $order->status = $status ? $status['label'] : null;\n }\n return $client;\n }", "title": "" }, { "docid": "227f4de85e4bfb7098070070f6358916", "score": "0.51601106", "text": "public function client()\n {\n return $this->belongsTo(Client::class, 'client_id');\n }", "title": "" }, { "docid": "51f67635edf90768a2b90638ce301568", "score": "0.51575893", "text": "public function interview(){\n $entreprises = Suivi::where('user_id', Auth::user()->id)->where([\n ['interview_date', '!=', null],\n ['interview_date', '>', date(\"Y-m-d\")]\n ])->orderBy('interview_date')->orderBy('created_at','desc')->get();\n if ($entreprises->isEmpty()){\n return view('home', ['entreprises' => $entreprises, 'vide' => 'Aucun entretien à venir !']);\n }else{\n return view('home', ['entreprises' => $entreprises]);\n }\n }", "title": "" }, { "docid": "95d09d26615da2096b24abe04d0b1b1c", "score": "0.5157089", "text": "public function beforeSave()\n {\n if (\n isset($this->data['ClientNotification']['clientId'])\n && isset($this->data['ClientNotification']['merchDataEntryId'])\n && !isset($this->id)\n ) {\n $options = array(\n 'conditions' => array(\n 'clientId' => $this->data['ClientNotification']['clientId'],\n 'merchDataEntryId' => $this->data['ClientNotification']['merchDataEntryId']\n )\n );\n\n if ($this->find('first', $options) !== false) {\n $this->setWarnings(\n \"Duplicate entry for clientId: {$this->data['ClientNotification']['clientId']}, merchDataEntryId: {$this->data['ClientNotification']['merchDataEntryId']}\"\n );\n unset($this->data);\n }\n }\n\n return parent::beforeSave();\n }", "title": "" }, { "docid": "474ab9e9d39b2a2b0be4678b5ba96c78", "score": "0.5140206", "text": "public function client()\n {\n return $this->belongsTo(User::class,'client_id');\n }", "title": "" }, { "docid": "e0f4f1efdaeefa661f3b3f1e7bcc08fd", "score": "0.5121132", "text": "public function review()\n {\n return true;\n }", "title": "" }, { "docid": "45393d81b7cb935a896b657145f5f676", "score": "0.51202285", "text": "public function client()\n {\n return $this->belongsTo(Client::class);\n }", "title": "" }, { "docid": "5755bf3e83497b66cedeb2580c1e2919", "score": "0.5110745", "text": "public function show(Client $client)\n {\n //\n }", "title": "" }, { "docid": "5755bf3e83497b66cedeb2580c1e2919", "score": "0.5110745", "text": "public function show(Client $client)\n {\n //\n }", "title": "" }, { "docid": "5755bf3e83497b66cedeb2580c1e2919", "score": "0.5110745", "text": "public function show(Client $client)\n {\n //\n }", "title": "" }, { "docid": "5755bf3e83497b66cedeb2580c1e2919", "score": "0.5110745", "text": "public function show(Client $client)\n {\n //\n }", "title": "" }, { "docid": "5755bf3e83497b66cedeb2580c1e2919", "score": "0.5110745", "text": "public function show(Client $client)\n {\n //\n }", "title": "" }, { "docid": "5755bf3e83497b66cedeb2580c1e2919", "score": "0.5110745", "text": "public function show(Client $client)\n {\n //\n }", "title": "" }, { "docid": "5755bf3e83497b66cedeb2580c1e2919", "score": "0.5110745", "text": "public function show(Client $client)\n {\n //\n }", "title": "" }, { "docid": "fd4a5c9a0920c28d04cb547d3a6b10bf", "score": "0.51053905", "text": "public function client()\n {\n return $this->belongsTo('App\\Client', 'client_id', 'user_id');\n }", "title": "" }, { "docid": "3cc173e20c68761c4bc1087810301c1d", "score": "0.5101432", "text": "function renderMyReviews() {\n # presmerovani na hlavni stranku pokud se nejedna o reviewera nebo publishera\n $this->redirectIfNotReviewerOrPublisher();\n\n $userId = $this->session->getUserId(); # ziskani id uzivatele\n $reviewedId = $this->guideModel->getGuideState('reviewed')['id'];\n $reviews = $this->reviewModel->getEditableReviews($userId, $reviewedId); # ziskani recenzi uzivatele\n $this->__render(self::MY_REVIEWS_VIEW, ['reviews' => $reviews]);\n }", "title": "" }, { "docid": "274eca8bab47f1ece15e84ae9bd49f17", "score": "0.50777525", "text": "public function client()\n {\n return $this->belongsTo(Client::class)->withDefault(['name' => 'Deleted']);\n }", "title": "" }, { "docid": "00a8164b0ab12ceb9150d3dad163a0b0", "score": "0.50754523", "text": "public function index($clientId)\n {\n $request = app()->make('request');\n\n $presentations = ClientPresentation::orderBy($request->sort_column, $request->order_by)\n ->where(function($query) use ($request) {\n if($request->has('keyword')){\n $query->where('presentation_mode', 'LIKE', '%'.$request->keyword.'%');\n // ->orWhere('userType','LIKE','%'.$request->keyword.'%');\n }\n })\n ->where('client_id', $clientId)\n ->with('user')\n ->with('mode_of_presentation')\n ->with('presentation_status')\n ->with('action_plan')\n ->with('company')\n ->paginate($request->per_page);\n \n return response()->json([\n 'model' => $presentations,\n 'columns' => ClientPresentation::$columns\n ]);\n }", "title": "" }, { "docid": "a8a37a8828e2d64b2c0aa13e465cdd3e", "score": "0.50623083", "text": "public function index()\n {\n \n\n $data['userRecords'] = $this->client_model->clientListing();\n\n foreach ($data['userRecords'] as $client ) \n {\n $client->reservations = $this->reservation_model->ReservationListing(0 , 0 , null , $client->userId );\n\n }\n $this->global['pageTitle'] = 'Clients';\n $this->loadViews(\"client/list\", $this->global, $data, NULL);\n }", "title": "" }, { "docid": "3453a1eefa12a080dffe0ec12e65dba2", "score": "0.50556344", "text": "function bbp_is_single_view()\n{\n}", "title": "" }, { "docid": "df137274283b61c45b593019f9a7420e", "score": "0.50456154", "text": "public function client()\n {\n return $this->belongsTo(Client::class);\n }", "title": "" }, { "docid": "df137274283b61c45b593019f9a7420e", "score": "0.50456154", "text": "public function client()\n {\n return $this->belongsTo(Client::class);\n }", "title": "" }, { "docid": "df137274283b61c45b593019f9a7420e", "score": "0.50456154", "text": "public function client()\n {\n return $this->belongsTo(Client::class);\n }", "title": "" }, { "docid": "3dd519b01251fa8f94e18794617ba78e", "score": "0.5039629", "text": "function is_client($order) {\r\n \r\n $is_paying_customer = $this->get_paying_customer($order->customer_id);\r\n $order_zero_cart = ($order->total == '0.00');\r\n $order_completed = ($order->status == 'completed');\r\n $is_client = ($order_completed and ($is_paying_customer and !$order_zero_cart));\r\n\r\n return $is_client;\r\n }", "title": "" }, { "docid": "5a8e2f536a7056e9f71e6f17c4df79e7", "score": "0.50284773", "text": "public function authorize()\n {\n return $this->user() && $this->user()->can('view_clients_list', $this->partnerId);\n }", "title": "" }, { "docid": "5ebee7df05a017b44ab28ad4854cb733", "score": "0.5026364", "text": "public function isReviewer() {\n return $this->hasRole('reviewer');\n }", "title": "" }, { "docid": "1c518af258674290f8a305eb261a6e4a", "score": "0.50224155", "text": "public function client(){\n return $this->belongsTo(Client::class);\n }", "title": "" }, { "docid": "aa0aca84d42ed54e8e1a41a26309b4e7", "score": "0.5001923", "text": "public function select_client() {\n\t\tif ($this->request->is('post')) {\n\t\t\tif ($this->request->data['Type']['type']=='new') {\n\t\t\t\tif ($this->Project->Client->saveAll($this->request->data, array('validate'=>'first'))) {\n\t\t\t\t\t$this->Session->setFlash(__('The client has been saved'));\n\t\t\t\t\t$this->redirect(array('action' => 'add', $this->Project->Client->id));\n\t\t\t\t} else {\n\t\t\t\t\t$this->Session->setFlash(__('The client could not be saved. Please, try again.'));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$this->redirect(array('action' => 'add', $this->request->data['Client']['client_id']));\n\t\t\t}\n\t\t}\n\t\t\n\t\t$clients = $this->Project->Client->find('list');\n\t\t$this->set(compact('clients'));\n\t}", "title": "" }, { "docid": "6285a66d2f10fc93bacbe34fb37e71ab", "score": "0.5001645", "text": "public function index() {\n\n $user = Auth::user()->id;\n\n // Grab all the user clients\n $clients = $this->client->where('user_id', $user)->get();\n //Include deleted clients\n if (Input::get('withTrashed')) {\n \n } else if (Input::get('onlyTrashed')) {\n\n $clients = $this->client->onlyTrashed()->where('user_id', $user)->get();\n }\n\n return View::make('clients.index', compact('clients'));\n }", "title": "" }, { "docid": "ded58d444f6d1a5a084ac69b6857c64d", "score": "0.49999538", "text": "public function client($value='')\n {\n\t return $this->belongsTo(\\App\\Client::class);\n }", "title": "" }, { "docid": "55ed306f22414d16d45a104bee3b2f1a", "score": "0.49981895", "text": "public function getReviews();", "title": "" }, { "docid": "55ed306f22414d16d45a104bee3b2f1a", "score": "0.49981895", "text": "public function getReviews();", "title": "" }, { "docid": "58742fe482ac90a43baa179cf40698e3", "score": "0.4995424", "text": "public function create()\n {\n //mostviewed\n }", "title": "" }, { "docid": "a80fafa86d9ace3b43b9f25540f1c848", "score": "0.49899077", "text": "public function client()\n {\n return $this->belongsTo('App\\Client');\n }", "title": "" }, { "docid": "a80fafa86d9ace3b43b9f25540f1c848", "score": "0.49899077", "text": "public function client()\n {\n return $this->belongsTo('App\\Client');\n }", "title": "" }, { "docid": "a80fafa86d9ace3b43b9f25540f1c848", "score": "0.49899077", "text": "public function client()\n {\n return $this->belongsTo('App\\Client');\n }", "title": "" }, { "docid": "a80fafa86d9ace3b43b9f25540f1c848", "score": "0.49899077", "text": "public function client()\n {\n return $this->belongsTo('App\\Client');\n }", "title": "" }, { "docid": "a80fafa86d9ace3b43b9f25540f1c848", "score": "0.49899077", "text": "public function client()\n {\n return $this->belongsTo('App\\Client');\n }", "title": "" }, { "docid": "b8a63f24f4aa2658d1ca8660e6d1f715", "score": "0.49864787", "text": "public function index()\n {\n\n return $this->repository->with(['owner', 'client'])->findWhere(['owner_id' => Authorizer::getResourceOwnerId()]);\n\n\n }", "title": "" }, { "docid": "cef0dd9fb63437f1065b3766ea41a51c", "score": "0.49808457", "text": "function detail($clientes_id)\n {\n $this->load->database();\n $data['tb_cliente'] = $this->Cliente_model->get_tb_cliente($clientes_id);\n \n if(isset($data['tb_cliente']['clientes_id']))\n {\n\n $this->load->view('cliente_detail',$data);\n } \n else\n {\n redirect('/cliente/index');\n //$this->load->view('cliente'); \n } \n }", "title": "" }, { "docid": "9db295f8520606827d33dceab67290f3", "score": "0.49726862", "text": "public function clients()\n {\n $term = '';\n if(Auth::user()->admin && !Session::has('id'))\n {\n $query = User::OrderBy('created_at', (Input::get('id') == 'old') ? 'asc' : 'desc')\n ->where('admin', '=', '0')\n ->where('manager', '=', '0');\n }\n if(!Auth::user()->admin || Session::has('id'))\n {\n $city = Auth::user()->city;\n if(!Auth::user()->admin)\n {\n $city = Auth::user()->city;\n }\n if(Auth::user()->admin && Session::has('id'))\n {\n $city=Session::get('city_id');\n }\n $query = User::OrderBy('created_at', (Input::get('id') == 'old') ? 'asc' : 'desc')\n ->where('city', '=', $city)\n ->where('admin', '=', '0')\n ->where('manager', '=', '0');\n }\n if ($term = Request::get('email'))\n {\n $query = $query->where('email', 'LIKE', '%' . $term . '%');\n }\n $clients = $query->get();\n return View::make('users.index', compact('clients', 'term'));\n }", "title": "" }, { "docid": "99847315fd2076faacf1e88c50a56017", "score": "0.49622464", "text": "function index($clientId) {\n\n\t\t/* Load the required models and helpers*/\n\t\t$this->load->model('user');\n\t\t$this->load->helper('form');\n\n\t\t/* Load the client and trainer */\n\t\t$user = $this->user->getById(activeUser()->id);\n\t\t$client = $this->user->getById($clientId);\n\n\t\t/* Make sure the logged in user is trainer and the client belongs to him */\n\t\tif (!$this->verifyTrainer($user, $client->id)) {\n\t\t\treturn;\n\t\t}\n\n\t\t$data = array(\n\t\t\t'client' => $client,\n\t\t\t'plans' => $client->getTrainingPlansByTrainer($user->id),\n\t\t\t'template' => platform() . '/trainer/client_plans'\n\t\t);\n\n\t\t/* Show template */\n\t\t$this->load->view(platform() . '/page', $data);\n\t}", "title": "" }, { "docid": "e99a9f4870f6dab85aa9375a090e46c1", "score": "0.4941499", "text": "public function getIsReviewer()\n {\n return $this->hasRole(Role::GROUP_REVIEWER);\n }", "title": "" }, { "docid": "466519538283c395139d0c977ef92bb4", "score": "0.49371874", "text": "function getReviewsByClient($clientId){\n $db = phpmotorsConnect();\n $sql = 'SELECT \n reviews.*, clients.clientFirstname, clients.clientLastname, clients.clientId, inventory.invId, inventory.invMake, inventory.invModel\n FROM\n reviews, clients, inventory\n WHERE \n clients.clientId = :clientId\n AND \n clients.clientId = reviews.clientId\n AND\n reviews.invId = inventory.invId\n ORDER BY reviews.reviewDate DESC;';\n $stmt = $db->prepare($sql);\n $stmt->bindValue(':clientId', $clientId, PDO::PARAM_STR);\n $stmt->execute();\n $invInfo = $stmt->fetchAll(PDO::FETCH_ASSOC);\n $stmt->closeCursor();\n return $invInfo;\n}", "title": "" }, { "docid": "6819dd2ecb8ee382408431fb8b75de67", "score": "0.49322334", "text": "public static function isClient()\n {\n return isset($_SESSION['client_user']);\n }", "title": "" }, { "docid": "5cd739f76ced8e7361226bb13cd2f058", "score": "0.49317035", "text": "public function authorize()\n\t{\n\t\treturn request()->invoice->user_id == request()->user()->id;\n\t}", "title": "" }, { "docid": "3b45b74c3588ac92b9706de3c3e14930", "score": "0.49303016", "text": "private function allClientVehicles()\n\t{\n\t\t$result = $this->clientVehicle->all();\n\t\t$this->smarty->assign('clientVehicles',$result);\n\t\t\n\t\tif(isset($result))\n\t\t{\n\t\t\t//Load view\n\t\t\tif(isset($_GET['deleted']) && $_GET['deleted']==true) \t\t\t\n\t\t\t\t$this->smarty->assign('deleted',true);\n\t\t\t$this->smarty->display('./views/Clientvehicle/index.tpl');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Ohh well... :(\n\t\t\t$this->smarty->display('./views/error.tpl');\n\t\t}\n\t}", "title": "" }, { "docid": "e0d1f1738db3dcc9b86a8467e3fa25d3", "score": "0.4929058", "text": "public function show(Client $Client)\n {\n //\n }", "title": "" }, { "docid": "c1d2c9d795fcf1cb047ec9681ec318fb", "score": "0.4922367", "text": "function isReviewer($userId) {\n if($this->reviewerCache === null) {\n $dao =& $this->_getDao();\n $dar = $dao->getReviewerList($this->table->getId());\n $dar->rewind();\n while($dar->valid()) {\n $row = $dar->current();\n $this->reviewerCache[$row['reviewer_id']] = true;\n $dar->next();\n }\n }\n if(isset($this->reviewerCache[$userId])) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "0cb064228f30bc2ef79c72d5c5b464f3", "score": "0.49193782", "text": "function cliente() {\n return $this->belongsTo('App\\Models\\Clientes', 'clientes_id');\n }", "title": "" }, { "docid": "5b6aee8cc85f956e4b575571a0a05477", "score": "0.49188006", "text": "protected function getPreAdvices()\n {\n $request = Mage::getResourceModel('gene_doddle/request_collection')\n ->addFieldToFilter('order_id', $this->getOrder()->getId());\n\n if($request->count()) {\n return $request;\n }\n\n return false;\n }", "title": "" }, { "docid": "2b0e292d4b26d0e19019f576fbf50831", "score": "0.49160644", "text": "public function getIsFirstAttribute()\n {\n return $this->id == $this->thread->firstPost->id;\n }", "title": "" }, { "docid": "af02abcdd8556c5a666f4df883736a15", "score": "0.4911717", "text": "public function showClientInformations()\n\t{\n\t\tif (!empty($client = Client::where('user_id', Auth::user()->id)->with('user', 'contacts_facturation')->first()))\n\t\t{\n\t\t\t$client->list_groupe_id = app('App\\Http\\Controllers\\UserInformationsController')->getGroupesName($client->list_groupe_id);\n\t\t\t$client->user->user_type_id = 'Client';\n\n\t\t\t$client->addresses_livraison = app('App\\Http\\Controllers\\ContactController')->getContactsIn($client->addresses_livraison);\n\n\t\t\treturn Response::json($client);\n\t\t}\n\t\treturn Response::json([\n\t\t\t'user' =>\n\t\t\t\t['user_type_id' => 'Guest']\n\t\t]);\n\t}", "title": "" }, { "docid": "1a037fe785ff26970bb3930650b01a7a", "score": "0.49029085", "text": "public function show(Client $client,Statut $statut)\n { \n $statuts_client=Statut::where('type_statut','client')->get();\n return view('clients.show',[\n 'client' =>$client,\n 'statut'=>$statut,\n 'statuts_client'=>$statuts_client]); \n }", "title": "" }, { "docid": "9b29c6f6892a5a90526bc116f14a88f5", "score": "0.48986188", "text": "public function showClients()\n{\n}", "title": "" }, { "docid": "b659deed342a011ae0fe32852fcaaf0c", "score": "0.48941183", "text": "public function client(){\n return $this->belongsTo('App\\Client');\n }", "title": "" }, { "docid": "d6d1211a3aa6c3cfb70419246f369e2a", "score": "0.4891629", "text": "public function authorize()\n {\n return is_client_or_staff();\n }", "title": "" }, { "docid": "d6d1211a3aa6c3cfb70419246f369e2a", "score": "0.4891629", "text": "public function authorize()\n {\n return is_client_or_staff();\n }", "title": "" }, { "docid": "0e83d3b63936b00ed1820fef57f07d73", "score": "0.4891353", "text": "public function client()\n {\n return $this->hasOne('App\\Models\\Client');\n }", "title": "" }, { "docid": "25435531dd7d05e2ed76cddbf9154ddc", "score": "0.4886116", "text": "public function beforeAction($clientId){\n\t\t$this->setView('default');\n\t\tif($clientId != \"admin\"){\n\t\t\t$client = $this->em->getRepository(Client::class)->findBy(array('clientId' => $clientId));\n\t\t\tif(!$client){\n\t\t\t\tthrow new ForbiddenRequestException;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "2787d4f276f979e2ef7956c82489540e", "score": "0.4880099", "text": "public function authorize()\n {\n $checker = new ProtectPaidContent();\n $client = $checker->requireClient();\n\n return $this->compteClient->client->id == $client->id;\n }", "title": "" }, { "docid": "5b5d2df71fbf039af24765bffbb8628a", "score": "0.4877928", "text": "public function edit(Client $client)\n {\n $communes=Commune::all(['id','name_commune']);\n $residences=Residence::all(['id','label']);\n $motifs=Motif::all(['id','motif']);\n $statuts_rdv=Statut::where('type_statut','rdv')->get();\n $marches=Marche::all(['id','code_marche']);\n return view('clients.edit',[\n 'client'=>$client,\n 'communes'=>$communes,\n 'residences'=>$residences,\n 'motifs'=>$motifs,\n 'statuts_rdv'=>$statuts_rdv,\n 'marches'=>$marches\n ]);\n }", "title": "" }, { "docid": "de0e30aa7906691b48a6244222ca9e7f", "score": "0.48760405", "text": "public function index($clientId)\n {\n $request = app()->make('request');\n\n $acquisitions = ClientAcquisition::orderBy($request->sort_column, $request->order_by)\n ->where(function($query) use ($request) {\n if($request->has('keyword')){\n //$query->where('mann', 'LIKE', '%'.$request->keyword.'%');\n if($request->has('acquired_by') && $request->acquired_by != null) {\n $query->where('acquired_by' , $request->acquired_by);\n }\n //add additional filtering fields here\n }\n })\n ->where('client_id', $clientId)\n ->with('user')\n ->with('manner_of_acquisition')\n ->with('company')\n ->with('status')\n ->paginate($request->per_page);\n \n return response()->json([\n 'model' => $acquisitions,\n 'columns' => ClientAcquisition::$columns\n ]);\n }", "title": "" }, { "docid": "fd6f46a46e802dd17c086d0b9ba84196", "score": "0.48752984", "text": "public function get_view()\n {\n if( $this->get_author()->get_id() == $_SESSION['watch_id'] )\n { \n return $this->get_watch_id_author_view(); \n }\n else\n { \n return $this->get_watch_id_reader_view(); \n }\n }", "title": "" }, { "docid": "bb9f02cb5fe725fdf1280a61567eef43", "score": "0.4872028", "text": "public function isAuthor(object $gateauOrRecette) {\n\n if($this->id == $gateauOrRecette->user_id) {\n return true;\n }\n else {\n return false;\n }\n\n}", "title": "" }, { "docid": "98e2d018413e2699a549b9bc4a5202e3", "score": "0.48691073", "text": "public function testPagosPorCliente()\n {\n \n $cliente = Cliente::where('email', '[email protected]')->first();\n $this->assertEquals($cliente->pagos->count(), 1);\n $this->assertTrue($cliente->pagos->contains('codigo', '1'));\n\n $cliente = Cliente::where('email', '[email protected]')->first();\n $this->assertEquals($cliente->pagos->count(), 2);\n $this->assertTrue($cliente->pagos->contains('codigo', '3'));\n $this->assertTrue($cliente->pagos->contains('codigo', '4'));\n \n }", "title": "" }, { "docid": "09b6c6bad7c8f5b66344412213340084", "score": "0.4866815", "text": "public function fetchView();", "title": "" }, { "docid": "5333f56ad72acfc32bb7e1f47a344e44", "score": "0.48625448", "text": "private function popular_clients() {\n \n $query = \"SELECT c1, c2, c3, c4, c5 FROM entry\";\n \n $arr = array();\n \n $unfiltered = $this->db->get_query($query, $arr);\n \n $this->u_clients = $unfiltered;\n \n $this->sort_clients();\n \n }", "title": "" }, { "docid": "fa735f0b654c2c8dae8ff4fb01340ff5", "score": "0.48606563", "text": "public function index()\n {\n return view('dashboard.pages.all_clientreview')->with('reviews',ClientReview::all());\n\n }", "title": "" }, { "docid": "7c70628d08aa232cbaaaab6b770f114e", "score": "0.48594075", "text": "public function hasView(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "7c70628d08aa232cbaaaab6b770f114e", "score": "0.48594075", "text": "public function hasView(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "43ffb0dd263a27eef75880128637f90b", "score": "0.48540702", "text": "public function view_client_actif()\n {\n $data['clients'] = $this->client_model->get_client_actif();\n var_dump($this->session->userdata());\n\n $this->load->view('templates/header');\n $this->load->view('clients/clientViewActif', $data);\n $this->load->view('templates/footer');\n }", "title": "" }, { "docid": "c853ada1db219a34ffc97c5814a07d4d", "score": "0.48435816", "text": "public function client()\n {\n return $this->belongsTo(User::class, 'project_client_id', 'id');\n }", "title": "" }, { "docid": "1f6eca90dd85312c20c4d60f7646bda2", "score": "0.48388988", "text": "public function detailClientAction()\n {\n $dataRequest = $this->request->getJsonPost();\n\n $fields = array(\n \"id_client\"\n );\n\n if ($this->_checkFields($dataRequest, $fields)) {\n\n try {\n\n $client = Client::findFirst(array(\n \"conditions\" => \"id = ?1\",\n \"bind\" => array(1 => $dataRequest->id_client)\n ));\n\n $cityModel = new Client();\n $citySql = $cityModel->searchCity();\n while ($row = $citySql->fetch(PDO::FETCH_ASSOC)) {\n\n\n $city[] = array(\n \n \"id\" => $row['id'],\n \"city\" => $row['city'],\n\n );\n }\n\n\n if ($client->id){\n $this->setJsonResponse(ControllerBase::SUCCESS, ControllerBase::SUCCESS_MESSAGE, array(\n \"return\" => true,\n \"data\" => $client,\n \"city\" => $city,\n \"status\" => ControllerBase::SUCCESS\n ));\n\n } else {\n\n $this->setJsonResponse(ControllerBase::FAILED, ControllerBase::SUCCESS_MESSAGE, array(\n \"return\" => false,\n \"message\" => \"No se encontro el cliente\",\n \"status\" => ControllerBase::FAILED\n ));\n }\n \n } catch (Exception $e) {\n $this->logError($e, $dataRequest);\n }\n }\n }", "title": "" }, { "docid": "254aa1a0b8982c83c8a509683707774f", "score": "0.48383036", "text": "public function client()\n {\n\n return $this->belongsToMany(Client::class)->withTimestamps();\n\n }", "title": "" }, { "docid": "baf4f030efcbf69f2654b0c159a0f945", "score": "0.4836561", "text": "function ifViewedByReceiver($viewer,$viewed)\n{\n\t$cnt = 0;\n $sql=\"SELECT count(*) cnt FROM jsadmin.VIEW_CONTACTS_LOG WHERE `VIEWER` = '$viewed' AND `VIEWED` = '$viewer' AND SOURCE='\".CONTACT_ELEMENTS::CALL_DIRECTLY_TRACKING.\"'\";\n $res=mysql_query_decide($sql) or logError(\"Due to a temporary problem your request could not be processed. Please try after a couple of minutes\",$sql,\"ShowErrTemplate\");\n\t$row = mysql_fetch_array($res);\n\t$cnt = $row[0];\n\treturn $cnt;\n}", "title": "" }, { "docid": "6a8c293e12b3cd698df053567d172ea3", "score": "0.48361832", "text": "public function testDeveVisualizarClienteCadastrado()\n {\n $cliente = Cliente::find(1);\n $this\n ->actingAs($cliente->pessoa->user)\n ->get(route('clientes.show', [$cliente]))\n ->assertSee($cliente->pessoa->nome);\n }", "title": "" }, { "docid": "a9eec08bd2634b226e22284b841c3331", "score": "0.4834358", "text": "function getClientReviews($clientId){\n $db = acmeConnect();\n $sql = 'SELECT reviewId, reviewText, reviewDate, inventory.invName FROM reviews JOIN inventory ON inventory.invId = reviews.invId WHERE clientId = :clientId ORDER BY reviews.reviewDate DESC';\n $stmt = $db->prepare($sql);\n $stmt->bindParam(':clientId', $clientId, PDO::PARAM_INT);\n $stmt->execute();\n $clientData = $stmt->fetchAll(PDO::FETCH_ASSOC);\n $stmt->closeCursor();\n return $clientData;\n}", "title": "" }, { "docid": "87b865ae9dda338a543a9d6db0b90d25", "score": "0.48321345", "text": "public function client()\n {\n return $this->hasOne(User::class, 'id', 'client_id');\n }", "title": "" }, { "docid": "8197e63f0c7c3626f37a3eeac25fb402", "score": "0.48260236", "text": "public function client()\n {\n return $this->belongsToMany(Client::class);\n }", "title": "" }, { "docid": "987a801bdc8deef57845d21bc48564cd", "score": "0.48213536", "text": "function refer_check($user_id) {\n\t\t\tApp::import('model','ReferredBusiness');\n\t\t $this->ReferredBusiness = new ReferredBusiness();\n\t\t\t$time = mktime(0,0,0,date('m')-1,date('d'),date('Y'));\t\t\t\t\t\t\n\t\t\t$check_user = $this->ReferredBusiness->find('count',array('conditions'=>array('ReferredBusiness.front_user_id'=>$user_id,'ReferredBusiness.refered_date>'.$time)));\n\t\t\tif($check_user) {\n\n\t\t\t\treturn false;\n\t\t\t}\t\n\t\t\treturn true;\n\t}", "title": "" }, { "docid": "19aa712c32cda084bd96421a185a9dc8", "score": "0.48184368", "text": "public function isReflexive() {\n\t\treturn $this->model == $this->foreign;\n\t}", "title": "" }, { "docid": "6651e6fc7b69e67a363f1b74c9754583", "score": "0.4814869", "text": "public function isReviewed(): bool\n {\n return true;\n }", "title": "" }, { "docid": "e5dd808af01a173daeb79c0c14bfb7e9", "score": "0.48122403", "text": "function clientes(){\n \n }", "title": "" }, { "docid": "de32b2930280e3e8ca57a25fe30e9bb0", "score": "0.48080245", "text": "public function index()\n {\n //\n if((Input::get('package_id'))!='')\n {\n $id = Input::get('package_id');\n return $this->response()->collection(ReviewModel::where('candybrush_reviews_package_id', $id)->where('candybrush_reviews_admin_verified',1)->get(),new ReviewTransformer());\n }\n elseif((Input::get('user_id'))!=''){\n $id = Input::get('user_id');\n return $this->response()->collection(ReviewModel::where('candybrush_reviews_user_id', $id)->where('candybrush_reviews_admin_verified',1)->get(),new ReviewTransformer());\n }\n return $this->error('user_id or package_id must be required');\n }", "title": "" } ]
42ad8a79475e047ad9fe8992e1a9869a
Get Upload instance for this event
[ { "docid": "e05ce1540d44d0d754e356230569edfb", "score": "0.78396815", "text": "public function getUpload()\n {\n return $this->upload;\n }", "title": "" } ]
[ { "docid": "ce036657ea4d0f461c3f5ccb4410a750", "score": "0.7088966", "text": "public function getUploadEventHandler();", "title": "" }, { "docid": "b1ff7ec1aec18179b926a98531b84196", "score": "0.7040534", "text": "public function getUpload() {\n\t\treturn $this->loadMediaUploadView();\n\t}", "title": "" }, { "docid": "b4221dc67016d07d46a016dc42177c37", "score": "0.68658453", "text": "public function upload()\n {\n return $this->hasOne(Upload::class, 'id', 'upload_id');\n }", "title": "" }, { "docid": "7dc5f9585c6df74f5db56a69eb7ec32f", "score": "0.67108506", "text": "public function getCaminhoUpload()\n {\n return $this->caminhoUpload;\n }", "title": "" }, { "docid": "48b805ef4a5ab37a369e066b52acc9d1", "score": "0.6577435", "text": "public function getUploadId()\n {\n return $this->data['upload_id'];\n }", "title": "" }, { "docid": "ee1bfe52d0e2c40edcbbc73cf742529e", "score": "0.64554775", "text": "public function getCdUpload()\n {\n return $this->cd_upload;\n }", "title": "" }, { "docid": "5dcca76184eb17f07d66137fc0140fea", "score": "0.64263976", "text": "public function uploadImage()\n {\n return ImgUpload::uploadImage($this);\n }", "title": "" }, { "docid": "4ba491032ba44e2bde722ccdb4d9ab5b", "score": "0.641592", "text": "public function uploadDocument() {\n // the following data will return an array (you may need to use\n // getInstances method)\n $image = UploadedFile::getInstances($this, 'evidencias');\n\n // if no image was uploaded abort the upload\n if (empty($image)) {\n return false;\n }\n return $image;\n }", "title": "" }, { "docid": "99179608468a4a08873eba0663176234", "score": "0.6326568", "text": "public function getUploader()\n\t{\n\t\t$sfUsers = sfCore::getClass('sfUsers');\n\t\treturn $sfUsers::fetchUser($this->uploader);\n\t}", "title": "" }, { "docid": "7fff420d4c455f33f889afae176efd95", "score": "0.6315009", "text": "function getUploadDirectory() {\r\n return $this->directory;\r\n }", "title": "" }, { "docid": "2c0f3023912b3dbcde78d9c239bd4b4a", "score": "0.62006104", "text": "public function getUploadField()\n {\n return $this->component->getUploadField($this->gridField);\n }", "title": "" }, { "docid": "2c0f3023912b3dbcde78d9c239bd4b4a", "score": "0.62006104", "text": "public function getUploadField()\n {\n return $this->component->getUploadField($this->gridField);\n }", "title": "" }, { "docid": "d6dab4fc8deb1cd32b966b21e0f84aa0", "score": "0.6182557", "text": "protected function getFiles_UploadService()\n {\n return new \\phpbb\\files\\upload(${($_ = isset($this->services['filesystem']) ? $this->services['filesystem'] : ($this->services['filesystem'] = new \\phpbb\\filesystem\\filesystem())) && false ?: '_'}, ${($_ = isset($this->services['files.factory']) ? $this->services['files.factory'] : ($this->services['files.factory'] = new \\phpbb\\files\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['language']) ? $this->services['language'] : $this->getLanguageService()) && false ?: '_'}, ${($_ = isset($this->services['php_ini']) ? $this->services['php_ini'] : ($this->services['php_ini'] = new \\bantu\\IniGetWrapper\\IniGetWrapper())) && false ?: '_'}, ${($_ = isset($this->services['request']) ? $this->services['request'] : ($this->services['request'] = new \\phpbb\\request\\request(NULL, true))) && false ?: '_'});\n }", "title": "" }, { "docid": "53eb0a67fcb65c5cda37ab30108252c9", "score": "0.61803234", "text": "protected function _getUploader()\n {\n if ($this->_fileUploader === null) {\n $this->_fileUploader = $this->_uploaderFactory->create();\n\n $this->_fileUploader->init();\n\n $dirConfig = DirectoryList::getDefaultConfig();\n $dirAddon = $dirConfig[DirectoryList::MEDIA][DirectoryList::PATH];\n\n if (!empty($this->_parameters[Import::FIELD_NAME_IMG_FILE_DIR])) {\n $tmpPath = $this->_parameters[Import::FIELD_NAME_IMG_FILE_DIR];\n } else {\n $tmpPath = $dirAddon . '/' . $this->_mediaDirectory->getRelativePath('import');\n }\n\n if (!$this->_fileUploader->setTmpDir($tmpPath)) {\n throw new LocalizedException(\n __('File directory \\'%1\\' is not readable.', $tmpPath)\n );\n }\n $destinationDir = \"catalog/product\";\n $destinationPath = $dirAddon . '/' . $this->_mediaDirectory->getRelativePath($destinationDir);\n\n $this->_mediaDirectory->create($destinationPath);\n if (!$this->_fileUploader->setDestDir($destinationPath)) {\n throw new LocalizedException(\n __('File directory \\'%1\\' is not writable.', $destinationPath)\n );\n }\n }\n return $this->_fileUploader;\n }", "title": "" }, { "docid": "daad49e2eec630f42cebc129327cd9c8", "score": "0.61014384", "text": "public function getAvatarUpload()\n {\n if (null !== $this->avatarUpload) {\n return $this->avatarUpload;\n }\n \n $fileName = $this->avatarUploadFileName;\n if (!empty($fileName) && !$this->_uploadBasePath) {\n throw new \\RuntimeException('Invalid upload base path in ' . get_class($this) . '#getAvatarUpload().');\n }\n \n $filePath = $this->_uploadBasePath . 'avatarupload/' . $fileName;\n if (!empty($fileName) && file_exists($filePath)) {\n $this->avatarUpload = new File($filePath);\n $this->setAvatarUploadUrl($this->_uploadBaseUrl . '/' . $filePath);\n } else {\n $this->setAvatarUploadFileName('');\n $this->setAvatarUploadUrl('');\n $this->setAvatarUploadMeta([]);\n }\n \n return $this->avatarUpload;\n }", "title": "" }, { "docid": "7efd0d75631a8450cee68371083f0f8d", "score": "0.6092318", "text": "public function getUploadName(){\n\t\treturn $this->uploadName;\n\t}", "title": "" }, { "docid": "64272d0eeb49f83170271b17508316b4", "score": "0.6078677", "text": "public function upload()\n {\n return $this->uploadOnce(Input::file('file'));\n }", "title": "" }, { "docid": "222f546e93c742c0fd48371ed3dbb294", "score": "0.6049027", "text": "public function doUpload()\n\t{\n\t\t//use the multup library to perform the upload\n\t\t$result = Multup::open('file', 'image|max:' . $this->sizeLimit * 1000, $this->location, $this->naming)\n\t\t\t->sizes($this->sizes)\n\t\t\t->set_length($this->length)\n\t\t\t->upload();\n\n\t\treturn $result[0];\n\t}", "title": "" }, { "docid": "9ea3351f755300d6ccf2234c7e91af7a", "score": "0.6045865", "text": "public function getUploadCache() {\r\n return $this->_uploadCache;\r\n }", "title": "" }, { "docid": "69405d4471cd11f2462181cc7b06777e", "score": "0.60148776", "text": "public function uploadImage() {\n // the following data will return an array (you may need to use\n // getInstances method)\n $imagen = UploadedFile::getInstance($this, 'imagen');\n\n // if no image was uploaded abort the upload\n if (empty($imagen)) {\n return false;\n }\n\n // store the source file name\n $this->filename = $imagen->name;\n $ext = end((explode(\".\", $imagen->name)));\n\n // generate a unique file name\n $this->avatar = Yii::$app->security->generateRandomString().\".{$ext}\";\n\n // the uploaded image instance\n return $imagen;\n }", "title": "" }, { "docid": "c27fa57b016dddfc1942332ae91ca5e8", "score": "0.60096073", "text": "public function getFileInstance()\n {\n return $this->file;\n }", "title": "" }, { "docid": "222dd9bfb18164db2e46506ea1ba1182", "score": "0.598762", "text": "public function get_uploaded_files(/* ... */)\n {\n return $this->_uploaded;\n }", "title": "" }, { "docid": "1c0bcb4340d87a3cd2c89a2d6f0b92b8", "score": "0.5972979", "text": "public function upload() {\n $this->file->move($this->baseDir(), $this->fileName());\n $this->makeThumbnail();\n\n return $this;\n }", "title": "" }, { "docid": "f6efdc5ce75ffbd56211484666317519", "score": "0.5959587", "text": "public function lifecycleFileUpload() {\n $this->upload();\n}", "title": "" }, { "docid": "00b3b23b9bc51d6788cc358c764a2295", "score": "0.59365255", "text": "public function getUploadThumbnail(): ?File\n {\n return $this->uploadThumbnail;\n }", "title": "" }, { "docid": "86f066441494e309504425d8a17993f0", "score": "0.5914532", "text": "protected function getAvatar_Driver_UploadService()\n {\n $this->services['avatar.driver.upload'] = $instance = new \\phpbb\\avatar\\driver\\upload(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, './../', 'php', ${($_ = isset($this->services['filesystem']) ? $this->services['filesystem'] : ($this->services['filesystem'] = new \\phpbb\\filesystem\\filesystem())) && false ?: '_'}, ${($_ = isset($this->services['path_helper']) ? $this->services['path_helper'] : $this->getPathHelperService()) && false ?: '_'}, ${($_ = isset($this->services['dispatcher']) ? $this->services['dispatcher'] : $this->getDispatcherService()) && false ?: '_'}, ${($_ = isset($this->services['files.factory']) ? $this->services['files.factory'] : ($this->services['files.factory'] = new \\phpbb\\files\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['cache.driver']) ? $this->services['cache.driver'] : ($this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file())) && false ?: '_'});\n\n $instance->set_name('avatar.driver.upload');\n\n return $instance;\n }", "title": "" }, { "docid": "062ca554dc64b51dddca927974c596e7", "score": "0.5904115", "text": "public function uploadImage() {\n // get the uploaded file instance. for multiple file uploads\n // the following data will return an array (you may need to use\n // getInstances method)\n $image = UploadedFile::getInstance($this, 'file');\n \n // if no image was uploaded abort the upload\n if (empty($image)) {\n return false;\n }\n \n // store the source file name\n //$this->filename = $image->name;\n $ext = end((explode(\".\", $image->name)));\n \n // generate a unique file name\n $this->imagen = Yii::$app->security->generateRandomString().\".{$ext}\";\n \n // the uploaded image instance\n return $image;\n }", "title": "" }, { "docid": "bc1412f73ecb5c134e9b259080eb79b7", "score": "0.59035045", "text": "protected function getAttachment_UploadService()\n {\n $a = ${($_ = isset($this->services['language']) ? $this->services['language'] : $this->getLanguageService()) && false ?: '_'};\n\n return new \\phpbb\\attachment\\upload(${($_ = isset($this->services['auth']) ? $this->services['auth'] : ($this->services['auth'] = new \\phpbb\\auth\\auth())) && false ?: '_'}, ${($_ = isset($this->services['cache']) ? $this->services['cache'] : $this->getCacheService()) && false ?: '_'}, ${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, new \\phpbb\\files\\upload(${($_ = isset($this->services['filesystem']) ? $this->services['filesystem'] : ($this->services['filesystem'] = new \\phpbb\\filesystem\\filesystem())) && false ?: '_'}, ${($_ = isset($this->services['files.factory']) ? $this->services['files.factory'] : ($this->services['files.factory'] = new \\phpbb\\files\\factory($this))) && false ?: '_'}, $a, ${($_ = isset($this->services['php_ini']) ? $this->services['php_ini'] : ($this->services['php_ini'] = new \\bantu\\IniGetWrapper\\IniGetWrapper())) && false ?: '_'}, ${($_ = isset($this->services['request']) ? $this->services['request'] : ($this->services['request'] = new \\phpbb\\request\\request(NULL, true))) && false ?: '_'}), $a, ${($_ = isset($this->services['mimetype.guesser']) ? $this->services['mimetype.guesser'] : $this->getMimetype_GuesserService()) && false ?: '_'}, ${($_ = isset($this->services['dispatcher']) ? $this->services['dispatcher'] : $this->getDispatcherService()) && false ?: '_'}, ${($_ = isset($this->services['plupload']) ? $this->services['plupload'] : $this->getPluploadService()) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'}, './../');\n }", "title": "" }, { "docid": "f3fd82571d2e2b726e26ea3ca22bb641", "score": "0.58974093", "text": "public function upload();", "title": "" }, { "docid": "676881da3fac1a792f739ae43076cdcc", "score": "0.5880372", "text": "public function publicUpload()\n {\n $this->request->validate([\n $this->inputName => $this->extensions,\n ]);\n\n if ($uploadedFile = $this->request->file($this->inputName))\n {\n $fileName = time() . $uploadedFile->getClientOriginalName();\n $uploadedFile->move(uploadedImagePath() . DIRECTORY_SEPARATOR . $this->path, $fileName);\n $filePath = uploadedImagePath() . DIRECTORY_SEPARATOR . $this->path . DIRECTORY_SEPARATOR .$fileName;\n $image = $this->modelName::create(['name' => $fileName, 'path' => $filePath]);\n return $image->id;\n }\n\n }", "title": "" }, { "docid": "dc96a9957156abb1e48638828c0a9727", "score": "0.58779424", "text": "public function getUploadUrl()\n {\n if (array_key_exists(\"uploadUrl\", $this->_propDict)) {\n return $this->_propDict[\"uploadUrl\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "50244d0ce3e96904db91f66b5eee42cd", "score": "0.5876655", "text": "public function getUploaderFolder (){\n\t\treturn $this->uploadFolder ;\n\t}", "title": "" }, { "docid": "fbc508c5f12f3c5a0cdf1b1d33131f7d", "score": "0.5865773", "text": "public function actionUpload1()\n {\n $upload_handler = new UploadHandler();\n }", "title": "" }, { "docid": "6a6949ed4f2f61860a711e7fc84ecf02", "score": "0.5818636", "text": "public function getUploadPath()\n {\n $reflect = new ReflectionClass($this);\n return $this->uploadPath . $reflect->getShortName() . '/' . $this->id . '/';\n }", "title": "" }, { "docid": "537b5ad3096d41e71c8cec6944181f1c", "score": "0.5817355", "text": "protected function makeUploadedFileByPath() {\n return (new UploadedFile($this->resource, basename($this->resource)));\n }", "title": "" }, { "docid": "d49496595d1bc49b75cb71555b4e02f6", "score": "0.580853", "text": "public function getUploadUrl()\n {\n \treturn $this->getForm()->getUploadUrl();\n }", "title": "" }, { "docid": "a5d7ecda9135738567dcf81d014e98ee", "score": "0.5807713", "text": "public function getSource()\n {\n return 'upload';\n }", "title": "" }, { "docid": "69590c84aa331b6f4985a78cfc898156", "score": "0.57964134", "text": "public function getUploadName(){\n if( isset( $this->uploadName ) )\n return $this->uploadName;\n }", "title": "" }, { "docid": "a2a60a8d80abad53486b12ec09933f31", "score": "0.57473177", "text": "public function upload()\n {\n if (null === $this->file) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->file->move(\n $this->getUploadRootDir(),\n $this->id . '.' .$this->ext\n );\n\n // set the ext property to the filename where you've saved the file\n //$this->ext = $this->file->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "title": "" }, { "docid": "0f7aae4562450100ccf8d15f03eb1ae7", "score": "0.573991", "text": "public function getUploadField()\n {\n return $this->component->bulkUploadField($this->gridField);\n }", "title": "" }, { "docid": "b25dda5f53e2c5789a29f87e7fc64b44", "score": "0.5733209", "text": "public function upload() {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(), $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->photo = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "title": "" }, { "docid": "c051eb0b1e3d5cf2eeaad5bc355c0974", "score": "0.56981474", "text": "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n $filename = substr( md5(rand()), 0, 15).'.'.$this->getFile()->guessExtension();\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $filename\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $filename;\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "title": "" }, { "docid": "65c9c992ba4a76a029403addec7f5447", "score": "0.56968665", "text": "public function create($input) {\n return Upload::create($input);\n }", "title": "" }, { "docid": "22e9b7119d57c1a349888eaef001abfd", "score": "0.5688618", "text": "public function upload()\n {\n }", "title": "" }, { "docid": "e8942da499486a9429442c3a511fdb81", "score": "0.565383", "text": "protected function getUploadDir() {\n return self::$UPLOAD_DIR;\n }", "title": "" }, { "docid": "c6926d6a6d0cb6c800504a81b5a95454", "score": "0.56464547", "text": "public function getUploadBuilder(): \\Yana\\Http\\Uploads\\IsUploadWrapper\n {\n if (!isset($this->_uploadBuilder)) {\n $this->_uploadBuilder = \\Yana\\Http\\Uploads\\Builder::buildFromSuperGlobals();\n }\n return $this->_uploadBuilder;\n }", "title": "" }, { "docid": "c2402ef5cb5e85d22fe0b9b8fd70d16e", "score": "0.5618869", "text": "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->setImageName($this->getFile()->getClientOriginalName());\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "title": "" }, { "docid": "ace3fc732a2c635b3421edf0ea72038d", "score": "0.557249", "text": "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n $filename = substr( md5(rand()), 0, 15).'.'.$this->getFile()->guessExtension();\n // move takes the target directory and then the\n // target filename to move to\n\n\n\t\t\t\tif(!file_exists($this->getUploadRootDir())) mkdir($this->getUploadRootDir(), 0777, true);\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $filename\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $filename;\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "title": "" }, { "docid": "265fde631b4996df5fdcd3f0ce363bba", "score": "0.55708843", "text": "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n// use the original file name here but you should\n// sanitize it at least to avoid any security issues\n// move takes the target directory and then the\n// target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n// set the path property to the filename where you've saved the file\n $this->logo = $this->getFile()->getClientOriginalName();\n// clean up the file property as you won't need it anymore\n $this->file = null;\n\n\n }", "title": "" }, { "docid": "dead85309d72079a53c879b9d7b36ba6", "score": "0.5570245", "text": "public function getFileUploads()\n {\n return $this->file_uploads;\n }", "title": "" }, { "docid": "631657f23df2d630ee1088375829f33c", "score": "0.5561367", "text": "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "title": "" }, { "docid": "631657f23df2d630ee1088375829f33c", "score": "0.5561367", "text": "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "title": "" }, { "docid": "631657f23df2d630ee1088375829f33c", "score": "0.5561367", "text": "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "title": "" }, { "docid": "631657f23df2d630ee1088375829f33c", "score": "0.5561367", "text": "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "title": "" }, { "docid": "3f56ef8bd6eb704e735eb76b31fb13d3", "score": "0.55517733", "text": "public function getUploadedPath()\n {\n return $this->uploadedPath;\n }", "title": "" }, { "docid": "7fa8cdb43d9ed57f40683996008e34b6", "score": "0.55503565", "text": "abstract protected function doUpload();", "title": "" }, { "docid": "a8c295fc05c7ec8241dcf0fa684752ff", "score": "0.55437875", "text": "public function getUploadedFile($i = 0)\n {\n if (isset($this->uploadedFiles[$i]))\n return $this->uploadedFiles[$i];\n }", "title": "" }, { "docid": "7c3fdd5bcaab36a29731162a84e6e651", "score": "0.55394095", "text": "public function getUploadOptions() : UploadOptions\n {\n if($this->uploadOptions){\n return $this->uploadOptions;\n }\n\n $this->uploadOptions = UploadOptions::create()->getUploadOptionsDefault()\n ->setUploadBasePath('upload/' . $this->getTable())\n ->setUploadsAttributes(['image', 'image_mobile']);\n\n return $this->uploadOptions;\n }", "title": "" }, { "docid": "0c85df88073a021c03def36179d9ed03", "score": "0.55225104", "text": "public function getEntity() {\n return $this->file;\n }", "title": "" }, { "docid": "9384f521619eba70acd338e2a5fac3fa", "score": "0.5511719", "text": "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = '/'.$this->getUploadDir().'/'.$this->getFile()->getClientOriginalName();\n //get the file name\n// $file = $this->getFile()->getClientOriginalName();\n// $info = pathinfo($file);\n// $file_name = basename($file,'.'.$info['extension']);\n// $this->name = $file_name ;\n// $this->setName($file_name);\n// // clean up the file property as you won't need it anymore\n// $this->file = null;\n }", "title": "" }, { "docid": "09b32f968c6653af9064b4c2caa519a5", "score": "0.550926", "text": "public function upload()\n {\n if(!Csrf::checkToken($this->_request->getInput('_CSRF')))\n {\n $response = [\n 'status' => 'error',\n 'message' => 'csrf'\n ];\n return $this->_response->returnJson($response);\n }\n\n $file = $this->_request->getUploadedFile('img');\n $uploader = new ImageUpload(new Imagick($file['tmp_name']));\n $uploadResult = $uploader->upload($file);\n\n return $this->_response->returnJson($uploadResult);\n }", "title": "" }, { "docid": "6138b095cb0730f782c1589a0debaa3a", "score": "0.5499172", "text": "public function upload()\n {\n // The file property can be empty if the field is not required\n if (null === $this->file) {\n return;\n }\n\n // Use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->file->move(\n $this->getUploadRootDir(),\n $this->path\n );\n\n // Set the path property to the filename where you've saved the file\n $this->path = $this->file->getClientOriginalName();\n\n // Clean up the file property as you won't need it anymore\n $this->file = null;\n }", "title": "" }, { "docid": "38502b11f333a1a64fa400609fbfa731", "score": "0.54880947", "text": "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n \n\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "title": "" }, { "docid": "400a3c9ee8b2d25f237568b3480fa871", "score": "0.5483629", "text": "public function upload()\n {\n App::import('Lib', 'Uploads.file_receiver/FileReceiver');\n App::import('Lib', 'Uploads.file_dispatcher/FileDispatcher');\n App::import('Lib', 'Uploads.file_binder/FileBinder');\n App::import('Lib', 'Uploads.UploadedFile');\n\n $this->cleanParams();\n $Receiver = new FileReceiver($this->params['url']['extensions'], $this->params['url']['limit']);\n $Dispatcher = new FileDispatcher(\n Configure::read('Uploads.base'),\n Configure::read('Uploads.private')\n );\n $Binder = new FileBinder($Dispatcher, $this->params['url']);\n try {\n $File = $Receiver->save(Configure::read('Uploads.tmp'));\n $Binder->bind($File);\n $this->set('response', $File->getResponse());\n file_put_contents(LOGS.'mh-uploads.log', date('Y-m-d H:i > ').'Uploaded '.$File->getName().chr(10), FILE_APPEND);\n } catch (RuntimeException $e) {\n file_put_contents(LOGS.'mh-uploads.log', date('Y-m-d H:i > ').$e->getMessage().chr(10), FILE_APPEND);\n $this->set('response', $this->failedResponse($e));\n }\n $this->layout = 'ajax';\n $this->RequestHandler->respondAs('js');\n }", "title": "" }, { "docid": "e1d1e9435f93158b411dbc3f932b752d", "score": "0.54783636", "text": "public function setUploadData(UploadedFile $uploaded_file): Uploadable;", "title": "" }, { "docid": "f4d8e60292b23d000cb97543e6673f78", "score": "0.5477997", "text": "protected function getFullPathToUploadFile()\n {\n return $this->fullPathToUploadFile;\n }", "title": "" }, { "docid": "67fbf74ca3ca99ba29d4621ce163f1a6", "score": "0.5459993", "text": "public function getUploadedFiles()\n {\n if (null === $this->uploadedFiles) {\n $this->uploadedFiles = UploadedFilesFactory::createFiles();\n }\n return $this->uploadedFiles;\n }", "title": "" }, { "docid": "4cce9685e150b5ab78adb9abac4538d1", "score": "0.54340863", "text": "public function handleUpload(UploadedFile $file)\r\n {\r\n $mediaUpload = new MediaUpload();\r\n $mediaUpload->setUploadedFile($file);\r\n $valid = $mediaUpload->validate();\r\n\r\n if ($valid) {\r\n $this->title = $mediaUpload->file_name;\r\n $this->date_create = new \\yii\\db\\Expression('NOW()');\r\n\r\n $valid = $this->validate();\r\n\r\n if ($valid) {\r\n if($this->save()) {\r\n $mediaUpload->object_model = self::class;\r\n $mediaUpload->object_id = $this->id;\r\n $mediaUpload->show_in_stream = false;\r\n $mediaUpload->save();\r\n }\r\n }\r\n }\r\n\r\n return $mediaUpload;\r\n }", "title": "" }, { "docid": "133122170747c6939c2ec1d45b2f47d9", "score": "0.5431376", "text": "public function upload()\n\t{\n\t}", "title": "" }, { "docid": "4b9be865ad531a24f896bed7a3735b35", "score": "0.5431268", "text": "protected function getUploadImagesizeService()\n {\n return $this->services['upload_imagesize'] = new \\FastImageSize\\FastImageSize();\n }", "title": "" }, { "docid": "f2c144a8f2ce2eef54645cb5e941c116", "score": "0.5423421", "text": "protected function uploadFile()\n {\n return $this->getTelegram()->uploadFile(\n $this->method->apiEndpoint(),\n $this->method->toArray(),\n $this->method->fileUploadField()\n );\n }", "title": "" }, { "docid": "1e445ba69af816f94f811d4fef2d6be7", "score": "0.54136664", "text": "public function getUploadType() {\r\n $type = $this->getSession()->getUploadType();\r\n return $type ? $type : 'image';\r\n }", "title": "" }, { "docid": "b726ce800b43bc7fa429c4c076d16a6c", "score": "0.5412932", "text": "public function upload()\n\t{\n\t\t/** @var \\Akeeba\\Backup\\Admin\\Model\\Transfer $model */\n\t\t$model = $this->getModel();\n\n\t\tif ($this->input->getBool('start', false))\n\t\t{\n\t\t\t$model->resetUpload();\n\t\t}\n\n\t\ttry\n\t\t{\n\t\t\t$config = $model->getFtpConfig();\n\t\t\t$uploadResult = $model->uploadChunk($config);\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$uploadResult = (object)[\n\t\t\t\t'status' => false,\n\t\t\t\t'message' => $e->getMessage(),\n\t\t\t\t'totalSize' => 0,\n\t\t\t\t'doneSize' => 0,\n\t\t\t\t'done' => false\n\t\t\t];\n\t\t}\n\n\t\t$result = (object)$uploadResult;\n\n\t\t@ob_end_clean();\n\t\techo '###' . json_encode($result) . '###';\n\t\t$this->container->platform->closeApplication();\n\t}", "title": "" }, { "docid": "6ca49d4a62472ea1ce6a554bb941dcab", "score": "0.5404581", "text": "public function initialiseUpload()\n\t{\n\t\t$result = (object)[\n\t\t\t'status' => true,\n\t\t\t'message' => '',\n\t\t\t'ignorable' => false,\n\t\t];\n\n\t\t/** @var \\Akeeba\\Backup\\Admin\\Model\\Transfer $model */\n\t\t$model = $this->getModel();\n\n\t\ttry\n\t\t{\n\t\t\t$config = $model->getFtpConfig();\n\t\t\t$model->initialiseUpload($config);\n\t\t}\n\t\tcatch (TransferIgnorableError $e)\n\t\t{\n\t\t\t$result = (object) [\n\t\t\t\t'status' => false,\n\t\t\t\t'message' => $e->getMessage(),\n\t\t\t\t'ignorable' => true,\n\t\t\t];\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$result = (object)[\n\t\t\t\t'status' => false,\n\t\t\t\t'message' => $e->getMessage(),\n\t\t\t\t'ignorable' => false,\n\t\t\t];\n\t\t}\n\n\t\t@ob_end_clean();\n\t\techo '###' . json_encode($result) . '###';\n\t\t$this->container->platform->closeApplication();\n\t}", "title": "" }, { "docid": "f24d4300fc3eed02dc172e9649859412", "score": "0.5385703", "text": "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n\n $filePath = md5(uniqid($this->getIdUser().\"_profil\",true)).\".\".\n $this->getFile()->guessClientExtension();\n\n $this->getFile()->move(\n $this->getUploadRootDir(),$filePath\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $filePath;\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "title": "" }, { "docid": "e20ca8614e60931114769e7cc8e92038", "score": "0.53822947", "text": "public function uploadSingle()\n {\n\n foreach ($this->uploads['single'] as $field) {\n $file = [];\n\n if (Request::hasFile($field)) {\n $upfile = Request::file($field);\n\n if ($upfile instanceof UploadedFile) {\n $file = Uploader::upload($upfile, $this->upload_folder . '/' . $field);\n }\n\n }\n\n $this->setFileSingle($field, $file);\n }\n\n }", "title": "" }, { "docid": "3545f207cd38722f56f404d5038de6fd", "score": "0.53786707", "text": "public function getUploadedFiles()\n {\n return $this->uploadedFiles;\n }", "title": "" }, { "docid": "3545f207cd38722f56f404d5038de6fd", "score": "0.53786707", "text": "public function getUploadedFiles()\n {\n return $this->uploadedFiles;\n }", "title": "" }, { "docid": "843d3793dd1d16578cca3f194473abc1", "score": "0.53770524", "text": "public function getUpload()\n\t{\n\t\treturn View::make('teaser.getUpload');\n\t}", "title": "" }, { "docid": "82e9d5b5e42920277518c1a53bbbe895", "score": "0.5356739", "text": "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->backgroundImage = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "title": "" }, { "docid": "7f271e1e7a1d063a0d187b434f57f6a3", "score": "0.535453", "text": "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // if there is an error when moving the file, an exception will\n // be automatically thrown by move(). This will properly prevent\n // the entity from being persisted to the database on error\n $this->getFile()->move($this->getUploadRootDir(), $this->fileName);\n\n // check if we have an old image\n if (isset($this->temp)) {\n // delete the old image\n unlink($this->getUploadRootDir().'/'.$this->temp);\n // clear the temp image path\n $this->temp = null;\n }\n $this->file = null;\n }", "title": "" }, { "docid": "3f115e5ec69b432c4845c2d153c857a5", "score": "0.5351418", "text": "public function get_uploadBaseUrl()\n {\n return $this->_uploadBaseUrl;\n }", "title": "" }, { "docid": "85f676197882be5d16a2d5139ca45302", "score": "0.53493613", "text": "public function uploader()\n {\n return $this->belongsTo(Admin::class, 'admin_id');\n }", "title": "" }, { "docid": "01a123ac409be0a52f91b8c1f2a44dfd", "score": "0.5348902", "text": "public function upload()\n {\n // the file property can be empty if the field is not required\n if (null === $this->getFile()) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getFile()->move(\n Image::SERVER_PATH_TO_IMAGE_FOLDER,\n $this->path\n );\n\n // set the path property to the filename where you've saved the file\n $this->filename = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->setFile(null);\n }", "title": "" }, { "docid": "d4dd32b6fb2f5a467b84a34f88cc8b17", "score": "0.5348876", "text": "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n $partes_ruta = pathinfo($this->getFile()->getClientOriginalName());\n $this->nombre = md5(uniqid()) . '.' . $partes_ruta['extension'];\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->nombre\n );\n\n $this->url = $this->getWebPath();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "title": "" }, { "docid": "97815a57580da12cb4e96e7db5d04af7", "score": "0.5344766", "text": "public function upload() {\n // the file property can be empty if the field is not required\n if (null === $this->getFile()) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getFile()->move(\n self::SERVER_PATH_TO_IMAGE_FOLDER,\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->filename = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->setFile(null);\n }", "title": "" }, { "docid": "c85d5b939194490f99225ccf06c8b7f2", "score": "0.5343192", "text": "public function upload() {\n $logger = Logger::getLogger();\n if ($this->file[\"error\"] == UPLOAD_ERR_FORM_SIZE || $this->file[\"error\"] == UPLOAD_ERR_INI_SIZE) {\n $logger->critical(\"File size of uploaded song exceeds limit configured\", $this->file);\n }\n $song = SongManager::createSong($this->file[\"name\"]);\n $targetFile = SongManager::getAbsolutePath($song);\n Logger::getLogger()->info(\"Uploading {$this->file['name']} to $targetFile\", $this->file);\n\n if (move_uploaded_file($this->file[\"tmp_name\"], $targetFile)) {\n $song = SongManager::popularizeMetadata($song);\n foreach ($song->getArtists() as $artist) {\n DatabaseManager::getEntityManager()->persist($artist);\n }\n if ($song->getAlbum() !== null) {\n DatabaseManager::getEntityManager()->persist($song->getAlbum());\n }\n DatabaseManager::getEntityManager()->persist($song);\n } else {\n throw new \\RuntimeException(\"can't upload song\");\n }\n\n return $song;\n }", "title": "" }, { "docid": "f2e392e46ad653d7799ce99779686b00", "score": "0.5338232", "text": "public function upload()\n {\n // the file property can be empty if the field is not required\n if (null === $this->getFile()) {\n return;\n }\n $filename = time().'_'.$this->getFile()->getClientOriginalName();\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getFile()->move(\n self::$SERVER_PATH_TO_VIDEO_FOLDER,\n $filename\n );\n\n // set the path property to the filename where you've saved the file\n $this->filename = $filename;\n\n // clean up the file property as you won't need it anymore\n $this->setFile(null);\n }", "title": "" }, { "docid": "0d45a5327120679a528609c03e243056", "score": "0.53353465", "text": "public function getUploadDate() {\n\t\treturn $this->uploadDate;\n\t}", "title": "" }, { "docid": "d1cdbf4eea81b5e6fa14ae8d1634fb2e", "score": "0.5333571", "text": "public function uploadFile(){\n\t\t\t$image=UploadedFile::getInstance($this,'upload_file');\n\t\t\tif(empty($image)){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$this->EMP_IMG = time().'.'.$image->extension;\n\t\t\treturn $image;\n\t\t}", "title": "" }, { "docid": "ce3c6ecb0b04dcc315d8363fc9979a8f", "score": "0.5328211", "text": "public function upload()\n {\n if (!Request::hasPost('requestToken') || !RequestToken::validate(Request::getPost('requestToken'))) {\n $objResponse = new ResponseError();\n $objResponse->setMessage('Invalid Request Token!');\n $objResponse->output();\n }\n\n if (!Request::getInstance()->files->has($this->name)) {\n return;\n }\n\n $objTmpFolder = new \\Folder(MultiFileUpload::UPLOAD_TMP);\n\n // contao 4 support, create tmp dir symlink\n if (version_compare(VERSION, '4.0', '>=')) {\n // tmp directory is not public, mandatory for preview images\n if (!file_exists(System::getContainer()->getParameter('contao.web_dir') . DIRECTORY_SEPARATOR . MultiFileUpload::UPLOAD_TMP)) {\n $objTmpFolder->unprotect();\n $command = new SymlinksCommand();\n $command->setContainer(System::getContainer());\n $input = new ArrayInput([]);\n $output = new NullOutput();\n $command->run($input, $output);\n }\n }\n\n $strField = $this->name;\n $varFile = Request::getInstance()->files->get($strField);\n // Multi-files upload at once\n if (is_array($varFile)) {\n // prevent disk flooding\n if (count($varFile) > $this->maxFiles) {\n $objResponse = new ResponseError();\n $objResponse->setMessage('Bulk file upload violation.');\n $objResponse->output();\n }\n\n /**\n * @var UploadedFile $objFile\n */\n foreach ($varFile as $strKey => $objFile) {\n $arrFile = $this->uploadFile($objFile, $objTmpFolder->path, $strField);\n $varReturn[] = $arrFile;\n\n if (\\Validator::isUuid($arrFile['uuid'])) {\n $arrUuids[] = $arrFile['uuid'];\n }\n }\n } // Single-file upload\n else {\n /**\n * @var UploadedFile $varFile\n */\n $varReturn = $this->uploadFile($varFile, $objTmpFolder->path, $strField);\n\n if (\\Validator::isUuid($varReturn['uuid'])) {\n $arrUuids[] = $varReturn['uuid'];\n }\n }\n\n if ($varReturn !== null) {\n $this->varValue = $arrUuids;\n $objResponse = new ResponseSuccess();\n $objResult = new ResponseData();\n $objResult->setData($varReturn);\n $objResponse->setResult($objResult);\n\n return $objResponse;\n }\n }", "title": "" }, { "docid": "5d7053ce013004bbaaebe72f1eba7a6b", "score": "0.5328199", "text": "function uploadObject();", "title": "" }, { "docid": "6736bfab277730bf0f56304bb5fa1779", "score": "0.5324463", "text": "public function getUploadDate()\n\t{\n\t\treturn new fTimetamp($this->date);\n\t}", "title": "" }, { "docid": "61150d5236243e6b21360a840f1607d0", "score": "0.5318477", "text": "public function lifecycleFileUpload() {\n $this->upload();\n }", "title": "" }, { "docid": "84cdd980d2b36798141b649df0a41954", "score": "0.5315856", "text": "public function getRelativeUploadPath(): string;", "title": "" }, { "docid": "1398887df4673ba283b25bc18256aaed", "score": "0.5315045", "text": "public function upload()\n {\n if (null === $this->image) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the target filename to move to\n $this->file->move($this->getUploadRootDir(), $this->image->getClientOriginalName());\n\n // set the path property to the filename where you'ved saved the file\n $this->path = $this->image->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "title": "" }, { "docid": "c3d627a5db45fcdb0212bb157bcec733", "score": "0.5299787", "text": "public function upload()\n {\n if (null === $this->file) {\n return;\n }\n\n if(!is_dir($this->getTargetUploadRootDir())){\n mkdir($this->getTargetUploadRootDir(), 0777, true);\n }\n\n // move takes the target directory and then the\n // target filename to move to\n $this->file->move(\n $this->getTargetUploadRootDir(),\n $this->file->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = date('Y-m-d').DIRECTORY_SEPARATOR.$this->id.DIRECTORY_SEPARATOR.$this->file->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "title": "" }, { "docid": "f3b5cbab17062c0326944b5cbc9088c3", "score": "0.52975297", "text": "public function getAllUploads() {\n return Upload::all();\n }", "title": "" }, { "docid": "b6ee20b98d0bb53ed75bf6cb6532b907", "score": "0.5296618", "text": "protected function getUploadRootDir()\n {\n return $this->getUploadDir();\n }", "title": "" }, { "docid": "071ec0ad19361a72f677a265284f7e3c", "score": "0.52957237", "text": "protected function makeUploadedFileByUrl() {\n $content = @file_get_contents($this->resource);\n $temp_name = basename($this->resource);\n $this->storage->put($temp_name, $content);\n return (new UploadedFile($this->storage->path($temp_name), $temp_name));\n }", "title": "" } ]
3cbe4b49120056fdc76b026c06cd0675
Create a new command instance.
[ { "docid": "1c913633e221dbcae662f0400f574c28", "score": "0.0", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t}", "title": "" } ]
[ { "docid": "97d10edefb33af0cd454b9e3f0b49824", "score": "0.74483645", "text": "public function createCommand(): CommandInterface;", "title": "" }, { "docid": "3545ff8a98fb6bec630dfad9ead060d1", "score": "0.7230817", "text": "public function create(array $command): SymfonyProcess;", "title": "" }, { "docid": "af1247001a001c6d0cd3bfaf031dfb23", "score": "0.710156", "text": "public function __construct(NewCommand $command)\n {\n $this->command = $command;\n }", "title": "" }, { "docid": "9c2d0d637dcf4e7c53999231fe552961", "score": "0.6967186", "text": "public function createCommand($query = null)\n\t{\n\t\tif ($query)\n\t\t\treturn new $this->commandClass($this, $query);\n\t\treturn new $this->commandClass($this);\n\t}", "title": "" }, { "docid": "ed6f096ec002407202ea1083d6877b55", "score": "0.69027275", "text": "public function __construct()\n {\n $this->signature = 'create:command {name} {feature}';\n $this->description = 'Command command and its handler.';\n parent::__construct();\n }", "title": "" }, { "docid": "be6cb990fb5173b92b91e2aba29eaeca", "score": "0.6884627", "text": "public function __construct($command = null)\n {\n //\n }", "title": "" }, { "docid": "5043c049612c73a59e19ec3640e98f4a", "score": "0.6795483", "text": "public function createCommand($properties = [], $params = [])\n {\n return $this->createObject($properties, $params);\n }", "title": "" }, { "docid": "5f32379dd65435bc54fa0a4d36e9cfa5", "score": "0.67675304", "text": "public function __construct(Command $command)\n {\n $this->command = $command;\n }", "title": "" }, { "docid": "0a291888a74988d91621a88e96b30eac", "score": "0.6692418", "text": "public function createCommand($commandID, array $arguments = array());", "title": "" }, { "docid": "4b70b86eb67d4798bbcaa4e2634d1562", "score": "0.6594164", "text": "public static function createInstance()\n {\n return new MySqlCommand();\n }", "title": "" }, { "docid": "dfd6b5baa2fcc89a2d355d9e46df1941", "score": "0.6579474", "text": "public function __construct($command)\n {\n $this->builder = ProcessBuilder::create(array($command));\n }", "title": "" }, { "docid": "9244a3f266e8291fe190d5f047c0298c", "score": "0.65411043", "text": "public function create() {\n $path = Yii::getPathOfAlias($this->commandPath);\n if (!is_dir($path)) {\n mkdir($path, 0777, true);\n }\n \n ## Write New Command Class\n if (substr($this->command, -7) != 'Command') {\n $this->command = $this->command . 'Command';\n }\n \n $filePath = $path . DIRECTORY_SEPARATOR . $this->command . \".php\";\n if (!is_file($filePath)) {\n $content = <<<EOF\n<?php\n\nclass {$this->command} extends Service {\n public function actionIndex() {\n ## Put your code here\n \n }\n}\nEOF;\n file_put_contents($filePath, $content);\n }\n \n\n if (substr($this->action, 6) != \"action\") {\n $this->action = \"action\" . $this->action ;\n }\n \n ## Setup Process Entry in Setting \n ServiceManager::add($this->attributes);\n }", "title": "" }, { "docid": "f35d9f726577d18e2c7485d2b9b341c5", "score": "0.6537472", "text": "public function createCommand()\n {\n return MySqlCommand::createInstance();\n }", "title": "" }, { "docid": "0f75a477f1b7e85e17a73117ad0004d9", "score": "0.64951766", "text": "public function __construct(Command $cmd)\n {\n $this->command = $cmd;\n }", "title": "" }, { "docid": "c67ee7333273fe6bc3d3c34ba423a9c9", "score": "0.64687896", "text": "public function command($command)\n {\n $this->command = $command;\n return $this;\n }", "title": "" }, { "docid": "404f1577da40e2f570e4c5dd90c20448", "score": "0.6381957", "text": "public function command($command)\n {\n $this->command = $command;\n\n return $this;\n }", "title": "" }, { "docid": "b31b14994c396552dabc2d7058b90e8d", "score": "0.63320714", "text": "public function testCanPassCommandStringToConstructor()\n {\n $command = new Command('/bin/ls -l');\n\n $this->assertEquals('/bin/ls -l', $command->getExecCommand());\n $this->assertNull($command->nonBlockingMode);\n }", "title": "" }, { "docid": "c46db9f865ad5839e4e567e912d90524", "score": "0.6277356", "text": "public function getCommand()\n\t{\n\t\tif (!$this->command) {\n\t\t\t$entity = $this->entity;\n\t\t\t$command = null;\n\t\t\tif (!$entity->hasId()) {\n\t\t\t\tif ($entity instanceof Node) {\n\t\t\t\t\t$command = new Command\\CreateNode($this->batch->getClient(), $entity, $this->opId);\n\t\t\t\t} else if ($entity instanceof Relationship) {\n\t\t\t\t\t$command = new Command\\CreateRelationship($this->batch->getClient(), $entity, $this->opId, $this->batch);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($entity instanceof Node) {\n\t\t\t\t\t$command = new Command\\UpdateNode($this->batch->getClient(), $entity, $this->opId);\n\t\t\t\t} else if ($entity instanceof Relationship) {\n\t\t\t\t\t$command = new Command\\UpdateRelationship($this->batch->getClient(), $entity, $this->opId);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->command = $command;\n\t\t}\n\t\treturn $this->command;\n\t}", "title": "" }, { "docid": "602ff9b5b4806d87b502128248b49211", "score": "0.6239975", "text": "public static function new(): self\n {\n return new ShellBuilder();\n }", "title": "" }, { "docid": "1ac40dcbfe38b3250ac44f45cff3de46", "score": "0.6206783", "text": "private function createCliCommands()\n {\n /** @var CommandListInterface $commandList */\n $commandList = $this->objectManager->create(CommandListInterface::class);\n $application = $this->serviceLocator->get(Application::class);\n foreach ($commandList->getCommands() as $command) {\n $application->add($command);\n }\n }", "title": "" }, { "docid": "c602431553ba9c4de321a1616e008a2d", "score": "0.62045026", "text": "public static function build($command, $package = null, $class = null)\n {\n $task = new static;\n\n if (class_exists($class)) {\n $task->command_class = $class;\n }\n\n $task->command = $command;\n $task->package = $package;\n $task->created_at = Carbon::now();\n $task->output = '';\n\n return $task;\n }", "title": "" }, { "docid": "8cac9dd762bcbe4f42a7afbfa43b2ae1", "score": "0.6202617", "text": "private function createCommandFromTokens(array $tokens): CommandInterface\r\n {\r\n return $this->commandFactory->createFromTokens($tokens);\r\n }", "title": "" }, { "docid": "44b3ef566cb5f92f1c376f805dff7a54", "score": "0.61648154", "text": "public function getCommand(): Command\\CommandInterface\n {\n $command = $this->getExpectedCommand();\n\n return $command instanceof Command\\CommandInterface ? $command : new $command();\n }", "title": "" }, { "docid": "bcf5a74182788f34f54daedfe6cd0345", "score": "0.61187583", "text": "public function command()\r\n\t{\r\n\t\treturn new DibiFluent($this->connection);\r\n\t}", "title": "" }, { "docid": "f73b800344734d2a1e7c36aa6dcd21cb", "score": "0.6112412", "text": "public function __construct(Command $command, InputInterface $input, OutputInterface $output)\n {\n $this->command = $command;\n $this->input = $input;\n $this->output = $output;\n }", "title": "" }, { "docid": "2d8b34726d2b0b27a1c4859455c71c7b", "score": "0.6107646", "text": "public function createCommand(Request $request): object;", "title": "" }, { "docid": "a9b2d0e11c1ccdd9b788af29e0254e54", "score": "0.60813016", "text": "public function getCommand();", "title": "" }, { "docid": "a9b2d0e11c1ccdd9b788af29e0254e54", "score": "0.60813016", "text": "public function getCommand();", "title": "" }, { "docid": "a9b2d0e11c1ccdd9b788af29e0254e54", "score": "0.60813016", "text": "public function getCommand();", "title": "" }, { "docid": "6c54274a2e20d2a5c517baa4a0c5ac5b", "score": "0.6013946", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\n\t\t$this->commandData = new CommandData($this);\n\t}", "title": "" }, { "docid": "f235725507b7e080bd51957e50510e3d", "score": "0.6009388", "text": "public function __construct(string $command)\n {\n $this->command = $command;\n $this->output = $this->getDefaultOutput();\n }", "title": "" }, { "docid": "682c24366a3ee39c911bdfece4719593", "score": "0.6008426", "text": "public function command();", "title": "" }, { "docid": "4d977703cf09d783046bfc29688f2306", "score": "0.5999255", "text": "public function getCustomCommand();", "title": "" }, { "docid": "8ee39cd359909395dcfbacf2b1592e07", "score": "0.5998806", "text": "protected function _prepareCommand($operation, $args)\n\t{\n\t $args = ($args) ?:$this->args;\n\t $command = new Command($this->service, $operation, $args);\n\t \n\t if ($this->context) {\n\t $command->setContext($this->context);\n\t } else {\n\t $command->setContext($this->broker->getDefaultContext());\n\t }\n\t \n\t if ($this->identity) {\n\t $command->setIdentity($this->identity);\n\t } else {\n\t $command->setIdentity($this->broker->getDefaultIdentity());\n\t }\n\t \n\t return $command;\n\t}", "title": "" }, { "docid": "365a731fde79dcb40940d9623e238f63", "score": "0.5997103", "text": "final public function getCommand(): object {}", "title": "" }, { "docid": "294d17758282e50c9536457fbfe26958", "score": "0.598752", "text": "public function create(string $plugin, string $name)\n {\n\n $parts = explode(' ', $name, 2);\n $name = $parts[0];\n $arguments = $parts[1] ?? '';\n\n $name = self::commandSignatureFor($plugin, $name);\n\n $command = $this->app->getNew($name);\n $command->setName($name);\n $command->setInput(new StringInput($arguments));\n return $command;\n }", "title": "" }, { "docid": "0bee3babcc79624f69075de76994b2ba", "score": "0.5972926", "text": "protected function createCommand($name, array $parameters = [])\n {\n return new Definition(array_merge(['name' => $name], $parameters));\n }", "title": "" }, { "docid": "3a9ed15e609195722b461fa5f3cb80a7", "score": "0.5927752", "text": "public function __construct($commandStr = null) {\r\n $this->commandStr = $commandStr;\r\n }", "title": "" }, { "docid": "c53598692a709b06704c6d8d1595b6bc", "score": "0.59098107", "text": "protected function createCommandBuilder()\n\t{\n\t\treturn new CMssqlCommandBuilder($this);\n\t}", "title": "" }, { "docid": "556e09f56cf539d7b5f7a168aeca4e25", "score": "0.5902977", "text": "public function registerCommand(): void\n\t{\n\t\tif (!\\class_exists($this->getClassName())) {\n\t\t\tthrow new RuntimeException('Class doesn\\'t exist');\n\t\t}\n\n\t\ttry {\n\t\t\t$reflectionClass = new ReflectionClass($this->getClassName());\n\t\t\t// @codeCoverageIgnoreStart\n\t\t} catch (ReflectionException $e) {\n\t\t\tself::cliError(\"{$e->getCode()}: {$e->getMessage()}\");\n\t\t}\n\t\t// @codeCoverageIgnoreEnd\n\n\t\t$class = $reflectionClass->newInstanceArgs([$this->commandParentName]);\n\n\t\tif (!\\is_callable($class)) {\n\t\t\t$className = \\get_class($class);\n\t\t\tself::cliError(\"Class '{$className}' is not callable.\\nMake sure the command class has an __invoke method.\");\n\t\t}\n\n\t\tWP_CLI::add_command(\n\t\t\t\"{$this->commandParentName} {$this->getCommandParentName()} {$this->getCommandName()}\",\n\t\t\t$class,\n\t\t\t$this->prepareCommandDocs($this->getDoc(), $this->getGlobalSynopsis())\n\t\t);\n\t}", "title": "" }, { "docid": "31d23d4e789f62875f76fab525b6eaf2", "score": "0.58926797", "text": "public function __construct($argv)\r\n {\r\n $exec = $argv;\r\n $this->commands = json_decode(file_get_contents(__DIR__ . '/../command_manifest.json'), true);\r\n $this->requireCommands();\r\n if (isset($this->commands[$argv[1]])) {\r\n unset($exec[0], $exec[1]);\r\n $parse = new Parse($exec);\r\n $commandClass = new $this->commands[$argv[1]]['className'](['value' => $argv[1], 'description' => $this->commands[$argv[1]]['description']], $parse->parameters, $parse->arguments);\r\n $commandClass->init();\r\n } else {\r\n echo 'Command Not Registered' . \"\\n\";\r\n }\r\n }", "title": "" }, { "docid": "89d925edef45d461446d7de08413bdcc", "score": "0.58524615", "text": "public function create() {}", "title": "" }, { "docid": "89d925edef45d461446d7de08413bdcc", "score": "0.58524615", "text": "public function create() {}", "title": "" }, { "docid": "89d925edef45d461446d7de08413bdcc", "score": "0.58524615", "text": "public function create() {}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.58442056", "text": "public function create(){}", "title": "" }, { "docid": "b5d0c9adadcd8029636a56fe2d02e04d", "score": "0.58257914", "text": "public function createCommand($query){\n if(empty($this->dbConnetion)) return $this;\n $this->dbConnetion->createCommand($query);\n return $this;\n }", "title": "" }, { "docid": "463adf80d69bec1f82c736fb139f9ee2", "score": "0.5815453", "text": "public function __construct()\n {\n parent::__construct();\n\n $this->commandData = new CommandData($this, CommandData::$COMMAND_TYPE_API);\n }", "title": "" }, { "docid": "dd326ed8b963f6bb3df6e269d7b379dd", "score": "0.58070797", "text": "public function __construct(string $commandTag = 'view.engine')\n {\n $this->commandTag = $commandTag;\n }", "title": "" }, { "docid": "f38d3ff473918f4d64577233726f79a6", "score": "0.5805355", "text": "public static function create() {\n }", "title": "" }, { "docid": "9096d6043f987f33625ec4c033c31be2", "score": "0.5797259", "text": "public function __construct(\\Modules\\Command $cmd)\n {\n $this->command = $cmd;\n $this->controller = new \\Core\\Controller($cmd->getName());\n }", "title": "" }, { "docid": "b4754315decac1bdbf81eb8afb953273", "score": "0.5763238", "text": "protected function _command()\n {\n $value = new Zend_Form_Element_Text('command');\n $value->setLabel('Command')\n ->addDecorators($this->_inputDecorators)\n ->setRequired(true)\n ->setAttribs(array('class'=> 'span8'))\n ->addFilter('StripTags')\n ->addFilter('StringTrim')\n ->addValidator(\n 'StringLength', false,\n array(0, self::MAX_LINE_LENGTH)\n );\n return $value;\n }", "title": "" }, { "docid": "cc795167ffaad80c254551a5cff2b24c", "score": "0.5749113", "text": "protected function generateFromCommand()\n {\n $table = $this->fetchTableFromCli();\n\n $generator = new MigrationGenerator([\n 'name' => $this->argument('name'),\n 'action' => $this->fetchActionFromCli(),\n 'force' => $this->option('force'),\n 'table' => $table\n ]);\n\n $generator->run();\n\n $this->info(\"Migration {$this->argument('name')} created successfully.\");\n }", "title": "" }, { "docid": "f46289f2a2cfb2954a8d9dee2e0b6ad6", "score": "0.5740952", "text": "private function createCommandDefinition($id, $connectionId, $class, $serverName, $command)\n {\n $commandDefinition = new ChildDefinition($id);\n $commandDefinition->setClass($class);\n $commandDefinition->setLazy(true);\n $commandDefinition->replaceArgument(0, new Reference($connectionId));\n $commandDefinition->addTag('nanbando.server_command', ['server' => $serverName, 'command' => $command]);\n\n return $commandDefinition;\n }", "title": "" }, { "docid": "e7614034c46e6ccbb190726b6e05f5ff", "score": "0.5739709", "text": "public function __construct(WithdrawPaymentCommand $command)\n\t{ \n\t\t$this->command = $command;\n\t}", "title": "" }, { "docid": "44a3030926c14fb8bee01e4cd080d709", "score": "0.57215106", "text": "public function getCommand(): CommandInterface;", "title": "" }, { "docid": "51375be80d4a9526265f9f49960770c1", "score": "0.57169384", "text": "public function __construct($command)\n {\n $this->command = $command;\n\n $this->command->line('Updating Routes File: <info>✔</info>');\n $this->command->line('Updating Controllers: <info>✔</info>');\n $this->command->line('Updating Middleware: <info>✔</info>');\n $this->command->line('Updating HTTP Kernel: <info>✔</info>');\n }", "title": "" }, { "docid": "92fb9b3f684f93ef0616aafc79c4883f", "score": "0.57165414", "text": "public function __construct(WithdrawAdminCommand $command)\n\t{\n\t\t$this->command = $command;\n\t}", "title": "" }, { "docid": "1e23657299a32ca9d343e1e421d665c8", "score": "0.57115227", "text": "public function __construct()\n {\n parent::__construct(\"Spout Console\", \"0.0.1\");\n\n $this->add(new Install());\n $this->add(new PreTest());\n $this->add(new CreateMigration());\n $this->add(new RunMigration());\n $this->add(new RollbackMigration());\n\n $this->add(new Command\\Create());\n }", "title": "" }, { "docid": "fd42eca80d8d8dfea78ef14a72710245", "score": "0.5703934", "text": "public function __construct()\n {\n $this->setCommandName('add')\n ->setDescription(\"Add a user to an specified project\")\n ->setRestrict(true)\n ->setHelp(\"Use this command to add a user to a project.\\nYou MUST be the project's owner\")\n ->setAction('executableFunction');\n \n /**\n * The next commands shows you how to set the signature of you program, such as\n * parameters, options or flags.\n * Your class will receive a property for each parameter, which can be accessed\n * by its argument name(in this example, 'firstArgument'.\n */\n $this->addRequiredArgument('user',\n 'The user to be added');\n $this->addRequiredArgument('to',\n 'string \"to\"');\n $this->addRequiredArgument('project',\n 'The project in which the user will be added as developer');\n \n \n $this->init();\n }", "title": "" }, { "docid": "5dfad31c8b93229e3c57c45dc71c3f84", "score": "0.5674297", "text": "protected function registerMakeCommand()\n {\n $this->app->singleton('command.migrator.make', function ($app) {\n // Once we have the migration creator registered, we will create the command\n // and inject the creator. The creator is responsible for the actual file\n // creation of the migrations, and may be extended by these developers.\n $creator = $app['migrator.creator'];\n\n $composer = $app['composer'];\n\n return new MigratorMakeCommand($creator, $composer);\n });\n }", "title": "" }, { "docid": "d6f9a6d9cc1a4bd77644e9dc798bade3", "score": "0.56724644", "text": "public function command()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n ArtisanRoutes::class,\n ArtisanFacades::class,\n ]);\n }\n }", "title": "" }, { "docid": "76e9fcdd3fb3a6acfabab59166337d56", "score": "0.5670796", "text": "public function buildCommand(): string;", "title": "" }, { "docid": "91cdf6b4f5f539aa75a9da5dee415c2b", "score": "0.5664328", "text": "private function registerCommand()\n {\n $this->app->singleton('command.git.pre-commit', function ($app) {\n return new PreCommit();\n });\n\n $this->commands('command.git.pre-commit');\n }", "title": "" }, { "docid": "784e88a5a8fc0ce6f2e29b3bf373219a", "score": "0.5652091", "text": "public function __construct($command)\n {\n $command->line('Removing Temporary Download Directory: <info>✔</info>');\n }", "title": "" }, { "docid": "51e9910fcfdb191c1a7037a8977bea1a", "score": "0.5647737", "text": "public function handleCreate(Command $command)\n {\n /** @var Build $build */\n $build = Build::create($command->getData());\n\n ProcessBuild::dispatch($build)->onConnection('database');\n }", "title": "" }, { "docid": "ad7459edcf89026bd52a2f56df1733d3", "score": "0.56443626", "text": "abstract public function composeCommand();", "title": "" }, { "docid": "533cb4520696fab4346b7f4865d85e82", "score": "0.5635123", "text": "public function create()\n {\n return \\view('commands.input');\n }", "title": "" }, { "docid": "71844a1d3cfc2cb134441ce2e0e5c888", "score": "0.5605308", "text": "public function create() {\n \n }", "title": "" }, { "docid": "0de1699393ab3732a21b1aece16d4260", "score": "0.5586567", "text": "public static function create($element)\n {\n $create = new Command\\Create();\n $create->add($element);\n static::$_creates[] = $create;\n }", "title": "" }, { "docid": "7e93bd31dd68ca332197444eb4aace1c", "score": "0.5576697", "text": "public function addCommand( $name, $class ) {\n\t\tself::$commands[$name] = $class;\n\t}", "title": "" }, { "docid": "652a1adeba97cfc87599ba0957349f1d", "score": "0.55597264", "text": "public function create() {\n\n\t}", "title": "" }, { "docid": "652a1adeba97cfc87599ba0957349f1d", "score": "0.55597264", "text": "public function create() {\n\n\t}", "title": "" }, { "docid": "6e3ab4a369974be686839042dabfe653", "score": "0.55506533", "text": "private function set_commands_object() {\n\t\tif (!isset($this->commands)) {\n\t\t\tif (!class_exists('UpdraftPlus_Commands')) include_once(UPDRAFTPLUS_DIR.'/includes/class-commands.php');\n\t\t\t$this->commands = new UpdraftPlus_Commands($this);\n\t\t}\n\t}", "title": "" }, { "docid": "de3dddc549a35eddc28de05d355d12db", "score": "0.55443895", "text": "protected function makeProcess($command)\n\t{\n\t\treturn new Process($command, $this->laravel['path.base'], null, null, 0);\n\t}", "title": "" }, { "docid": "0fa1ebe001cc7c0a575292e7f7d498f5", "score": "0.55414385", "text": "public function createProcess($command, $options = array()) {\n\t\tif($this->server) {\n\t\t\tif ($this->identity && !isset($options['identity'])) {\n\t\t\t\t$options['identity'] = $this->identity;\n\t\t\t}\n\t\t\treturn $this->executor->createRemote($this->server, $command, $options);\n\t\t}\n\n\t\treturn $this->executor->createLocal($command, $options);\n\t}", "title": "" }, { "docid": "6aa0a07abafdea6b6f6e40108f1ea946", "score": "0.5538037", "text": "public function __construct()\n {\n $this->configure();\n\n if (!$this->getName()) {\n /** @var oxConsoleException $oEx */\n $oEx = oxNew('oxConsoleException');\n $oEx->setMessage('Command must have a name.');\n throw $oEx;\n }\n }", "title": "" }, { "docid": "1984106947c8e222081e97f3b4e2332c", "score": "0.5535781", "text": "public function create()\n {\n //TODO:\n }", "title": "" }, { "docid": "af9ea090b49e3e3645d4bbb5c2821e7e", "score": "0.55329335", "text": "public function __construct(Addon $addon, Command $command)\n {\n $this->addon = $addon;\n $this->command = $command;\n }", "title": "" }, { "docid": "c65f6a185e42dd8a0d96ee92684c9af7", "score": "0.5531796", "text": "public static function create() {\n $created = false;\n\n if ( ! $created ) {\n $created = new self();\n }\n }", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55290693", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55290693", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55290693", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55290693", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55290693", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55290693", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55290693", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55290693", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55290693", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55290693", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55290693", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55290693", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55290693", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55290693", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55290693", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55290693", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55290693", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55290693", "text": "public function create();", "title": "" }, { "docid": "14a86845590fa739a2d8ab31cadaf26f", "score": "0.5525267", "text": "private function __initCommand(){\n\t\t$this->__Binds = [];\n\n\t\t$this->__Command = [\n\t\t\t'type' => '',\n\t\t\t'selectedFields' => '*',\n\t\t\t'table' => '',\n\t\t\t'update' => '',\n\t\t\t'insert' => '',\n\t\t\t'condition' => [],\n\t\t\t'limit' => '',\n\t\t\t'offset' => ''\n\t\t];\n\t}", "title": "" }, { "docid": "fea95f5f9cd964aaf4c5c5003f7fedec", "score": "0.5521599", "text": "public function toCommand(): SignInCommand\n {\n return new SignInCommand($this->get('email'), $this->get('password'), $this->ip());\n }", "title": "" }, { "docid": "039a4388a8b2f426a64798267477104b", "score": "0.5518617", "text": "abstract public function provideCommandClassInstances();", "title": "" }, { "docid": "e96926992ee99afdd105049e420a2ede", "score": "0.5515868", "text": "public function __construct()\n {\n $this->name = 'cm';\n $this->description = 'Create a database model.';\n $this->required = false;\n $this->alias = 'create-model';\n\n $this->exec = function ($name, $table) {\n $name = str_replace('_', '', $name);\n $name = trim($name);\n\n $table = trim($table);\n\n if (! ctype_alpha($name)) {\n sf_error(\n 'Error: Model names must only contain alphabetic characters and no spaces. '.\n 'TitleCase recommended.',\n true\n );\n\n return parameter_result_halt();\n }\n\n if (! file_exists('./src/App/Data/Models/'.$name.'.php')) {\n $template = new Template('Model.tmpl', ['name' => $name, 'table' => $table], true);\n file_put_contents(\n './src/App/Data/Models/'.$name.'.php',\n $template->parse()\n );\n\n sf_info(\n 'Created database Model in \\'src/App/Data/Models\\' with name \\''.$name.'\\'.',\n true\n );\n chmod('./src/App/Data/Models/'.$name.'.php', 0750);\n exec('composer dumpautoload >/dev/null 2>&1');\n } else {\n sf_error('Error: A Model by that name already exists.', true);\n }\n\n return parameter_result_halt();\n };\n }", "title": "" } ]
67e1a7f9cffc159d8736332e0e3b8541
Extract the type and alias from a given definition.
[ { "docid": "c7da08d3663510066ec28a4eea35ae60", "score": "0.5810851", "text": "protected function extractAlias(array $definition)\n {\n return [key($definition), current($definition)];\n }", "title": "" } ]
[ { "docid": "9356b3b9d4e7150de2d86ab72c007991", "score": "0.7217359", "text": "protected function extractAlias(\n $definition\n )\n {\n }", "title": "" }, { "docid": "d105542ecf175bf75b2c51a9f11d4e63", "score": "0.55032015", "text": "function getDefinition();", "title": "" }, { "docid": "da51af8aa1acba627145f7ef9d90bb24", "score": "0.5465137", "text": "abstract protected function getDefinition();", "title": "" }, { "docid": "23f30e823d2d6f587cc4e9082927845c", "score": "0.54005104", "text": "public function resolve($definition);", "title": "" }, { "docid": "3172b8924d871222a7b59d19d3117835", "score": "0.53786224", "text": "public function getDefinition($word);", "title": "" }, { "docid": "839373b9c7664e3d76ba60e3470a3219", "score": "0.5323406", "text": "public function getDefinition();", "title": "" }, { "docid": "ee008b776d316923d629c281ffc5b71f", "score": "0.53015935", "text": "abstract public function getDefinition();", "title": "" }, { "docid": "901005c88d586581c2acd4c850354896", "score": "0.52968353", "text": "public function getType($alias);", "title": "" }, { "docid": "5ff8f5e9fe38cffe131aa0224296bb22", "score": "0.52735317", "text": "protected function getExportTypeDefinition() {\n $export_type_id = $this->getExportTypeId();\n return $this->exportTypeManager->getDefinition($export_type_id);\n }", "title": "" }, { "docid": "5a32a62617d374294892651dec2fc7b4", "score": "0.5143279", "text": "public function getTypeDefinition()\n {\n return $this->typeDef;\n }", "title": "" }, { "docid": "05cf179ba38b1005e9e4c9085e54546b", "score": "0.50528395", "text": "function _extractTypeOfTarget($a_target)\n\t{\n\t\t$target = explode(\"_\", $a_target);\n\t\treturn $target[count($target) - 2];\n\t}", "title": "" }, { "docid": "8f41c961a4a799ca8a90c536a4266bb8", "score": "0.5028873", "text": "public function getAlias($alias);", "title": "" }, { "docid": "cfb5e1d54a0b0a681aee6ac67a8f3776", "score": "0.5009702", "text": "public static function extractDefinition($cleaned)\n {\n if (0 === preg_match_all('/(?:\\/|^)(.*?)(?:\\(|$)/', $cleaned, $definition)) {\n throw Exception::make('Macro definition could not be extracted');\n }\n\n return $definition[ 1 ][ 0 ];\n }", "title": "" }, { "docid": "fc4d44eebd7a6cbb8547b7a2fe735f74", "score": "0.4964859", "text": "protected static function getAliasFromRule($rule){\r\n $matches = array();\r\n //Extract the alias itself\r\n preg_match('/^is(.*)$/', $rule, &$matches);\r\n\r\n $name = NULL;\r\n //Only if he's valid\r\n if(isset($matches[1]))\r\n $name = $matches[1];\r\n \r\n if(strlen($name))\r\n return $name;\r\n return NULL;\r\n }", "title": "" }, { "docid": "09dbaea99426f19b4070308b3b5e0ea0", "score": "0.49627817", "text": "function _getTypeDef(array $text)\n {\n $tmp = strtoupper($text[0]);\n $pos = strpos($tmp, '.');\n return $pos !== false\n ? substr($tmp, $pos + 1)\t// there is a group. just return the prop name\n : $tmp;\t\t\t\t\t\t// no group\n\n }", "title": "" }, { "docid": "5afa69091c94723c2ae5240c973d57fb", "score": "0.48405015", "text": "protected function resolveDefinition($alias, array $args)\n {\n $definition = $this->items[$alias]['definition'];\n $return = $definition;\n\n if ($definition instanceof CallableDefinition || $definition instanceof ClassDefinition) {\n $return = $definition($args);\n }\n\n // store as a singleton if needed\n if (isset($this->items[$alias]['singleton']) && $this->items[$alias]['singleton'] === true) {\n $this->singletons[$alias] = $return;\n }\n\n return $return;\n }", "title": "" }, { "docid": "094b09814ae9fa777bf0039dd10d1451", "score": "0.48064873", "text": "public function resolve($definition)\n {\n return \"view/{$definition}.tpl\";\n }", "title": "" }, { "docid": "fe4b515b7f10b13815b6b1ca1a3e4b79", "score": "0.47947007", "text": "function getDefs(array $defs, string $type): array\n {\n global $cfg_id_caption;\n $ret = [];\n\n // if ($type == 'search') {\n // $did_item_def['caption'] = $cfg_id_caption;\n // $did_item_def['type'] = 'text';\n // $did_item_def['required'] = 1;\n // $did_item_def['sequence'] = 1;\n // $did_item_def['search'] = 1;\n // $did_item_def['list'] = 1;\n // $did_item_def['add'] = 0;\n // $did_item_def['update'] = 0;\n // $did_item_def['detail'] = 1;\n // $did_item_def['site_search'] = 0;\n // $did_item_def['duplicate'] = 0;\n // $did_item_def['search_desc'] = '';\n // $did_item_def['show_desc'] = '';\n // $did_item_def['input_desc'] = '';\n // $did_item_def['disp_cond'] = 0;\n // $did_item_def['search_cond'] = 1;\n // $did_item_def['value_range_min'] = 1;\n // $did_item_def['value_range_max'] = 99999;\n // $did_item_def['value_type'] = 'int';\n // $did_item_def['default'] = '';\n // $did_item_def['size'] = 10;\n // $did_item_def['max_length'] = 10;\n // $ret['did'] = $did_item_def;\n // }\n\n foreach ($defs as $index => $def) {\n if (isset($def[$type]) && $def[$type]) {\n $ret[$index] = $def;\n if ('search' === $type && ('number' === $def['type'] || 'date' === $def['type'])) {\n $ret[$index . '_or_over'] = $def;\n $ret[$index . '_or_over']['is_range_item'] = true;\n if ('number' === $def['type']) {\n $ret[$index . '_or_over']['caption'] = $def['caption'] . '(' . getMDConst('_OR_OVER') . ')';\n } elseif ('date' === $def['type']) {\n $ret[$index . '_or_over']['caption'] = $def['caption'] . '(' . getMDConst('_SINCE') . ')';\n }\n\n $ret[$index . '_or_less'] = $def;\n $ret[$index . '_or_less']['is_range_item'] = true;\n if ('number' === $def['type']) {\n $ret[$index . '_or_less']['caption'] = $def['caption'] . '(' . getMDConst('_OR_LESS') . ')';\n } elseif ('date' === $def['type']) {\n $ret[$index . '_or_less']['caption'] = $def['caption'] . '(' . getMDConst('_UNTIL') . ')';\n }\n }\n }\n }\n\n return $ret;\n }", "title": "" }, { "docid": "b865f672c1fda0de4453577d52149ef7", "score": "0.47605887", "text": "protected function alias() {\n\t\tif(!isset($this->alias)){\n\t\t\t$this->parseLine();\n\t\t}\n\t\treturn $this->alias;\n\t}", "title": "" }, { "docid": "61e46ca0eced2e440c45ba734cbaef0e", "score": "0.47550455", "text": "public function getQueryParser()\n\t{\n\t\treturn $this->getParam('defType');\n\t}", "title": "" }, { "docid": "8920a787af3b231750898af51d80e264", "score": "0.47267535", "text": "public function getTypeAlias()\n\t{\n\t\treturn $this->typeAlias;\n\t}", "title": "" }, { "docid": "b0d0e3ebb1b1080fec662968ed1cb9f8", "score": "0.47262514", "text": "public function getDefinition()\n {\n return $this->definition;\n }", "title": "" }, { "docid": "b0d0e3ebb1b1080fec662968ed1cb9f8", "score": "0.47262514", "text": "public function getDefinition()\n {\n return $this->definition;\n }", "title": "" }, { "docid": "b0d0e3ebb1b1080fec662968ed1cb9f8", "score": "0.47262514", "text": "public function getDefinition()\n {\n return $this->definition;\n }", "title": "" }, { "docid": "b0d0e3ebb1b1080fec662968ed1cb9f8", "score": "0.47262514", "text": "public function getDefinition()\n {\n return $this->definition;\n }", "title": "" }, { "docid": "3678417e7dfe79782efab9a017b5ce5d", "score": "0.4711025", "text": "public function getDefinitionAction(Definition $definition)\n {\n return $definition;\n }", "title": "" }, { "docid": "a904b08e38b89d97171e0401321b4732", "score": "0.47000805", "text": "function alias() : Parser {\n return\n chain(\n token(T_AS),\n label()->as('name')\n )\n ->as('alias')\n ;\n}", "title": "" }, { "docid": "67acad762b885a37c5096b145ead1348", "score": "0.4670108", "text": "public function getDefinition()\n {\n return $this->_definition;\n }", "title": "" }, { "docid": "7e9e944d5f3e38c2ee1957de52c72c9b", "score": "0.4669738", "text": "protected function getFielddefType()\n {\n $defs = $this->getFielddefsFromBean();\n\n // Now get the def for the this field if it exists\n if (!isset($defs[$this->columnName])) {\n return null;\n }\n\n $def = $defs[$this->columnName];\n\n // If the dbType is set, as it is as of 7.6.1...\n if (isset($def['dbType'])) {\n return $def['dbType'];\n }\n\n // Otherwise send back the type if it is found\n if (isset($def['type'])) {\n return $def['type'];\n }\n\n return null;\n }", "title": "" }, { "docid": "0b523bbcad4cb65a4c88d79a3a3dd162", "score": "0.46658528", "text": "protected function parseStructFromAlias(Alias $alias) {\n $aliasStruct = array(\n \t'path' => $alias->getPath(),\n \t'alias' => $alias->getAlias(),\n );\n\n if ($alias->isForced()) {\n $aliasStruct['force'] = true;\n }\n\n return $aliasStruct;\n }", "title": "" }, { "docid": "de3b0cf510a40c99fa6b99c5601980a3", "score": "0.46382433", "text": "public static function getTypeByAlias($alias) {\n foreach (static::$_globalOptions as $type => $data) {\n if ($data[MediaCore::alias] == $alias) return $type; \n }\n\n return null;\n }", "title": "" }, { "docid": "fb9105185b36461091100b9df8616b5f", "score": "0.46300325", "text": "public function getAlias();", "title": "" }, { "docid": "fb9105185b36461091100b9df8616b5f", "score": "0.46300325", "text": "public function getAlias();", "title": "" }, { "docid": "c5aa7c61b3d4de34c51ddd4c0b29f557", "score": "0.46182933", "text": "public function getType(string $alias): StepTypeInterface;", "title": "" }, { "docid": "c8f7df823703cbce48939121547cbbbf", "score": "0.45977294", "text": "private function getDefinition($id)\n {\n if (!isset($this->definitions[$id])) {\n if ($this->parent !== null) {\n return $this->parent->get($id);\n }\n return null;\n }\n\n $definition = $this->definitions[$id];\n if (is_string($definition)) {\n $definition = [self::TOKEN_CLASS => $definition];\n }\n\n return $definition;\n }", "title": "" }, { "docid": "6b199a81ab9984da94654b606fdf8467", "score": "0.4584295", "text": "function readAliases($type, $filename)\n {\n $cache = $this->name . '_factory_' . $type . '_aliases';\n $result = Cache::loadData($cache);\n if ($result === NULL)\n {\n include_once(ECLIPSE_ROOT . 'DataFile.php');\n include_once(ECLIPSE_ROOT . 'DataFileReader.php');\n include_once(ECLIPSE_ROOT . 'DataFileIterator.php');\n $result = array();\n $file =& new DataFile($filename, new DataFileReader);\n for ($it =& new DataFileIterator($file); $it->isValid(); $it->next())\n {\n $record =& $it->getCurrent();\n $result[$record['alias']] = $record['class'];\n }\n Cache::saveData($cache, $result);\n }\n return $result;\n }", "title": "" }, { "docid": "8bbe3190227fc4309779ffb3c36bb1fd", "score": "0.45786223", "text": "function\nParseInterfaceDefinitions($definition)\n{\n\t$interfaces = array();\n\t$count = preg_match_all(\"/<interface name=\\\"(.*?)\\\">(.*?)<\\/interface>/s\", $definition, $interdefs);\n\tif ($count > 0)\n\t{\n\t\tfor ($i = 0; $i < $count; $i++)\n\t\t{\n\t\t\t$name = $interdefs[1][$i];\n\t\t\t$defs = $interdefs[2][$i];\n\n\t\t\t$interface = new InterfaceDefinition;\n\n\t\t\tif (preg_match(\"/<Password>(.*?)<\\/Password>/\",\n\t\t\t\t$defs, $matches))\n\t\t\t{\n\t\t\t\t$interface->password = $matches[1];\n\t\t\t}\n\t\t\tif (preg_match(\"/<DisplayPage>(.*?)<\\/DisplayPage>/\",\n\t\t\t\t$defs, $matches))\n\t\t\t{\n\t\t\t\t$interface->displayPage = $matches[1];\n\t\t\t}\n\t\t\tif (preg_match(\"/<QueryColumns>(.*?)<\\/QueryColumns>/\", \n\t\t\t\t$defs, $matches))\n\t\t\t{\n\t\t\t\t$interface->queryCols = preg_split(\"/\\s*,\\s*/\", $matches[1]);\n\t\t\t}\n\t\t\tif (preg_match(\"/<Database>(.*?)<\\/Database>/\"\n\t\t\t\t, $defs, $matches))\n\t\t\t{\n\t\t\t\t$interface->database = $matches[1];\n\t\t\t}\n\t\t\tif (preg_match(\"/<NameColumn>(.*?)<\\/NameColumn>/\"\n\t\t\t\t, $defs, $matches))\n\t\t\t{\n\t\t\t\t$interface->nameCol = $matches[1];\n\t\t\t}\n\t\t\tif (preg_match(\"/<CatagoryColumn>(.*?)<\\/CatagoryColumn>/\"\n\t\t\t\t, $defs, $matches))\n\t\t\t{\n\t\t\t\t$interface->catagoryCol = $matches[1];\n\t\t\t}\n\t\t\tif (preg_match(\"/<DescriptionColumn>(.*?)<\\/DescriptionColumn>/\"\n\t\t\t\t, $defs, $matches))\n\t\t\t{\n\t\t\t\t$interface->descriptionCol = $matches[1];\n\t\t\t}\n\t\t\tif (preg_match(\"/<ExtraReturnColumns>(.*?)<\\/ExtraReturnColumns>/\", \n\t\t\t\t$defs, $matches))\n\t\t\t{\n\t\t\t\tif ($matches[1] == \"\")\n\t\t\t\t\t$interface->extraReturnCols = array();\n\t\t\t\telse\n\t\t\t\t\t$interface->extraReturnCols = preg_split(\"/\\s*,\\s*/\", $matches[1]);\n\t\t\t}\n\t\t\tif (preg_match(\"/<MaximumRetrievalLimit>(.*?)<\\/MaximumRetrievalLimit>/\", \n\t\t\t\t$defs, $matches))\n\t\t\t{\n\t\t\t\t$interface->maximumRetrievalLimit = $matches[1];\n\t\t\t}\n\t\t\t$interfaces[$name] = $interface;\n\t\t}\n\t}\n\tif (count($interfaces) < 1)\n\t\tWebDie('No Intfaces are defined in CONFIG.php. Please see CONFIG.sample.php');\n\n\treturn $interfaces;\n}", "title": "" }, { "docid": "2427f3ec4b578bb07a33b72104340d18", "score": "0.4578375", "text": "function simplecal_get_tuple_from_ref($ref){\r\n $tab = array();\r\n if (preg_match(\"/^(article|breve)([0-9]*)$/i\", $ref, $matches)){\r\n\t\t$tab['type'] = $matches[1];\r\n $tab['id_objet'] = $matches[2]; \r\n }\r\n \r\n return $tab;\r\n}", "title": "" }, { "docid": "8adf81248a90a493a08f03060d31b15a", "score": "0.4569835", "text": "public function getInterfaceWord($alias)\n {\n \treturn $this->_interfaceWord[$alias][$this->_lang];\n }", "title": "" }, { "docid": "d7211cb3afca33fb7dbe7835e14bb7f7", "score": "0.45405948", "text": "protected function resolveAlias($alias)\n {\n return $this->aliases[$alias];\n }", "title": "" }, { "docid": "030aa9efb757e6c9cbb45c6464559757", "score": "0.4531745", "text": "protected function resolveAlias($alias) {\r\n\t\tdo {\r\n\t\t\t$normalized = $this->normalizeAlias ( $alias );\r\n\t\t\t$class = $this->aliases [$normalized];\r\n\t\t} while ( $this->hasAlias ( $class ) );\r\n\t\t\r\n\t\treturn $class;\r\n\t}", "title": "" }, { "docid": "3958455c57021705ae3a851947563794", "score": "0.45296222", "text": "public function definition();", "title": "" }, { "docid": "6516b2c8bcc80c3ffc0baa8556ec062d", "score": "0.45295125", "text": "public function resolve(\n DefinitionInterface $definition, array $parameters = [])\n {\n /** @var AliasDefinition $definition */\n return $this->_container->get($definition->getTargetEntryName());\n }", "title": "" }, { "docid": "7b62b5316cde53629b4418ef5c7e84e8", "score": "0.4529399", "text": "public function getInfoOfAlias($alias)\n {\n return TfBuilding::where(['alias' => $alias, 'action' => 1])->first();\n }", "title": "" }, { "docid": "b498fab1ff31e65537c13de9a5609738", "score": "0.45278725", "text": "public function getReturnType()\n {\n return new PhpDocType($this->phpDocParser, $this->definition[1] ?? null);\n }", "title": "" }, { "docid": "3831daab8a65763825d9894d3bdc0819", "score": "0.4512856", "text": "static function extractTypeDefFromNode($xmlnode) {\n\t\t// -- Links\n\t\t// -- Properties\n\t\t// -- the Object ID\n\t\t// RRM -- NEED TO ADD ALLOWABLEACTIONS\n\t\t$retval = new stdClass();\n\t\t$retval->links=CMISRepositoryWrapper::getLinksArray($xmlnode);\n $retval->properties=array();\n $retval->attributes=array();\n\t\t$result = CMISRepositoryWrapper::doXQueryFromNode($xmlnode,\"//cmisra:type/*\");\n\t\tforeach ($result as $node) {\n\t\t\tif ((substr($node->nodeName,0,13) == \"cmis:property\") && (substr($node->nodeName,-10) == \"Definition\")){\n\t\t\t\t$id=$node->getElementsByTagName(\"id\")->item(0)->nodeValue;\n\t\t\t\t$cardinality=$node->getElementsByTagName(\"cardinality\")->item(0)->nodeValue;\n\t\t\t\t$propertyType=$node->getElementsByTagName(\"propertyType\")->item(0)->nodeValue;\n\t\t\t\t// Stop Gap for now\n\t\t \t$retval->properties[$id]= array(\n\t\t\t\t\t\t\"cmis:propertyType\" =>$propertyType,\n\t\t\t\t\t\t\"cmis:cardinality\" =>$cardinality,\n\t\t\t\t);\n\t\t\t} else {\n\t\t \t$retval->attributes[$node->nodeName]= $node->nodeValue;\n\t\t\t}\n\t\t\t$retval->id=$retval->attributes[\"cmis:id\"];\n\t\t}\n\n/*\n *\n\n\n\n\t\t$prop_nodes = $xmlnode->getElementsByTagName(\"object\")->item(0)->getElementsByTagName(\"properties\")->item(0)->childNodes;\n\t\tforeach ($prop_nodes as $pn) {\n\t\t\tif ($pn->attributes) {\n\t\t\t\t$retval->properties[$pn->attributes->getNamedItem(\"propertyDefinitionId\")->nodeValue] = $pn->getElementsByTagName(\"value\")->item(0)->nodeValue;\n\t\t\t}\n\t\t}\n $retval->uuid=$xmlnode->getElementsByTagName(\"id\")->item(0)->nodeValue;\n $retval->id=$retval->properties[\"cmis:objectId\"];\n */\n return $retval;\n \t}", "title": "" }, { "docid": "342dff202466e0ae6d3df7cf52d6af04", "score": "0.45031816", "text": "function getdef($str_tablename)\n {\n global $assoc_tabledefs;\n#$assoc_tabledefs = array ();\n if (!($def=$assoc_tabledefs[$str_tablename]))\n {\n# $def = $this->fetch_table(\"show fields from `$str_tablename`\", 'Field');\n $def = array ();\n $res = $this->querynow(\"show fields from `$str_tablename`\");\nif (!$GLOBALS['SILENCE'] && !$res['rsrc']) die('db-getdef:'.ht(dump($res)));\n $tmp = $this->fetch_table($res['rsrc']);\n foreach($tmp as $row)\n $def[$row['Field']] = $row;\n $assoc_tabledefs[$str_tablename] = $def;\n }\n return $def;\n }", "title": "" }, { "docid": "36f252103d2c67a225fc9e028559d06a", "score": "0.4462782", "text": "public function typeDef()\n {\n //searcig for length definition, es: name[30]\n preg_match(\"/\\[[^\\]]*\\]/\", $this->lineArray[2], $matches);\n $this->lineArray[2] = preg_replace(\"/\\[[^\\]]*\\]/\", \"\", $this->lineArray[2]);\n\n if(isset($matches[0]) ? $length = $matches[0] : $length = \"\");\n\n $this->outputCode = $this->outputCode . $this->lineArray[2] . \" \" . $this->lineArray[1] . $length . \";\" . PHP_EOL;\n }", "title": "" }, { "docid": "8770efa4d7f0ecf7c9af5ba6e66bb829", "score": "0.44612497", "text": "public function decode($alias);", "title": "" }, { "docid": "071053f7fa94823da9f0f6c8ef6f14bf", "score": "0.44427592", "text": "abstract public function getTypeInfo1(): string;", "title": "" }, { "docid": "2310ddb140eed40fe14f42b91ca60d8a", "score": "0.44360313", "text": "public static function getDefinition(): array;", "title": "" }, { "docid": "ab55a54ee8232843200fd031d462ed0c", "score": "0.44048068", "text": "public function getByNameAndType($name, $type);", "title": "" }, { "docid": "034022ad1286696e8b1096a0a0f02b56", "score": "0.43868667", "text": "public function getAlias()\r\r\n\t{\r\r\n\t\t$arrAlias = array();\r\r\n\r\r\n\t\t$objAlias = $this->Database->prepare(\"SELECT id, type, headline, text, (SELECT title FROM tl_article WHERE tl_article.id=tl_content.pid) AS title FROM tl_content WHERE id!=? ORDER BY title, sorting\")\r\r\n\t\t\t\t\t\t\t\t ->execute($this->Input->get('id'));\r\r\n\r\r\n\t\twhile ($objAlias->next())\r\r\n\t\t{\r\r\n\t\t\t$arrHeadline = deserialize($objAlias->headline, true);\r\r\n\r\r\n\t\t\t$headline_length = strlen($arrHeadline[0]);\r\r\n\t\t\t$headline = $headline_length ? ' (' . substr(preg_replace('/[\\n\\r\\t]+/', ' ', $arrHeadline[0]), 0, 32) . (($headline_length > 32) ? '...' : '') . ')' : '';\r\r\n\r\r\n\t\t\t$text_length = strlen($objAlias->text);\r\r\n\t\t\t$text = $text_length ? ' (' . substr(strip_tags(preg_replace('/[\\n\\r\\t]+/', ' ', $objAlias->text)), 0, 32) . (($text_length > 32) ? '...' : '') . ')' : '';\r\r\n\r\r\n\t\t\t$arrAlias[$objAlias->title][$objAlias->id] = $objAlias->id . ' - ' . $GLOBALS['TL_LANG']['CTE'][$objAlias->type][0] . (strlen($headline) ? $headline : $text);\r\r\n\t\t}\r\r\n\r\r\n\t\treturn $arrAlias;\r\r\n\t}", "title": "" }, { "docid": "646f074c20e01841e1f280a1c0bf31f8", "score": "0.43552017", "text": "abstract public function getTypeInfo2(): ?string;", "title": "" }, { "docid": "c2aae9a779a179c7b8f1fb1836bc7e56", "score": "0.43523285", "text": "function definitions_get_by_prefix($prefix)\n {\n $return_definitions = array();\n foreach (get_defined_constants() as $key=>$value)\n {\n if (preg_match('/^' . $prefix . '/', $key))\n {\n $return_definitions[$key]=$value;\n }\n }\n return $return_definitions;\n }", "title": "" }, { "docid": "438f48767095862538c4613258acd4ae", "score": "0.43398282", "text": "public function getAlias(): string;", "title": "" }, { "docid": "438f48767095862538c4613258acd4ae", "score": "0.43398282", "text": "public function getAlias(): string;", "title": "" }, { "docid": "ead034b03c65897d1525c7519061cef6", "score": "0.43259954", "text": "public function getType(): string\n {\n return $this->aliasOf->getType();\n }", "title": "" }, { "docid": "09a4eaa8e5d4efaf6d005d42b5517fb2", "score": "0.43139303", "text": "private function GetTypeHint($className, $propertyName) {\n $typeHint = null;\n $clazz = new ReflectionClass($className);\n // Use reflection to get a property of the class whose name is the\n // same as the property's tag name.\n // Then extract the type hint from the annotation of the property.\n if ($clazz->hasProperty($propertyName)) {\n $prop = $clazz->getProperty($propertyName);\n if (preg_match('/@var\\s*(.+)\\s/', $prop->getDocComment(),\n $annotations)) {\n // The type hints are sometimes prefixed with \"tns\", which is stripped\n // here to extract only the type names.\n $typeHint = preg_replace('/^tns/', '', $annotations[1]);\n }\n }\n return $typeHint;\n }", "title": "" }, { "docid": "e8d87a5ee45eb2609fa0708618e79197", "score": "0.4312474", "text": "abstract static function getDefinition(): array;", "title": "" }, { "docid": "c556c2095f5351345a786d7ed747167d", "score": "0.4304066", "text": "protected function extractTypeFromComment($comment)\n {\n if (preg_match('/^(.*)\\(FridgeType::([a-zA-Z0-9]+)\\)$/', $comment, $matches)) {\n if (empty($matches[1])) {\n $matches[1] = null;\n }\n\n return array($matches[1], strtolower($matches[2]));\n }\n\n return array($comment, null);\n }", "title": "" }, { "docid": "6d496e09db96b7b8e9f67e5f726d91a0", "score": "0.43032542", "text": "public function getFieldDefinitions($variation_type_id);", "title": "" }, { "docid": "8eeb5a2c0cef51cb9af31c188fdb2bde", "score": "0.42869624", "text": "protected function extractType() {\r\n if ($this->realType === null)\r\n $this->type = 'string';\r\n\r\n if ($this->type === null)\r\n foreach ($this->_typeMap as $type => $map) {\r\n if (in_array($this->realType, $map)) {\r\n $this->type = $type;\r\n break;\r\n }\r\n }\r\n\r\n if ($this->type === null) {\r\n /**\r\n * Check for array type\r\n */\r\n if (substr_compare($this->realType, 'array', 0) == 0) {\r\n /**\r\n * @todo We're hard-coding arrays as strings for now...\r\n */\r\n $this->type = 'array';\r\n /**\r\n * @todo Implement advanced array rule matching. Rudimentary start below\r\n * @todo Structure of array could imply a selection would occur, and even perform value type validation\r\n */\r\n #$property->type = 'array';\r\n #preg_match('/array(\\[\\]((\\[\\])*[\\w\\\\\\\\]+)*)*/', $property->realType, $matches);\r\n } #else\r\n /**\r\n * @todo Support object/resource types specifically, for validation at the least\r\n */\r\n #$this->type = 'object';\r\n }\r\n }", "title": "" }, { "docid": "e2e3b4fe9113cdebcc740c7b8dd3e90e", "score": "0.42799562", "text": "public function getAliasName();", "title": "" }, { "docid": "cbcef8bf19ba6fe9e02c340fcc267532", "score": "0.42776024", "text": "public function getInputDefinition(Template $template);", "title": "" }, { "docid": "726476778b627416fde92cdea7e9bfd6", "score": "0.42702815", "text": "public static function getAlias(String $alias='')\n\t{\n\t\treturn Alias::$aliases[$alias] ?? null;\n\t}", "title": "" }, { "docid": "814e5dacdbb15b148cbd76ce88b3480d", "score": "0.42685798", "text": "function toTypeURIs($namespace_map, $alias_list_s)\n{\n $uris = array();\n\n if ($alias_list_s) {\n foreach (explode(',', $alias_list_s) as $alias) {\n $type_uri = $namespace_map->getNamespaceURI($alias);\n if ($type_uri === null) {\n // raise KeyError(\n // 'No type is defined for attribute name %r' % (alias,))\n return new Error(\n sprintf('No type is defined for attribute name %s',\n $alias)\n );\n } else {\n $uris[] = $type_uri;\n }\n }\n }\n\n return $uris;\n}", "title": "" }, { "docid": "369410e8198889f1c353a178f8f07b3f", "score": "0.42580977", "text": "private function extractTypeFromListDeclaration(string $possibleListType): string\n {\n preg_match(self::FQCN, $possibleListType, $matches);\n\n return $matches[1] ?? $possibleListType;\n }", "title": "" }, { "docid": "a65ae73419a7f7f06df66a736acdc7e4", "score": "0.42559022", "text": "public function getDefinition(): RectorDefinition\n {\n }", "title": "" }, { "docid": "db8faf386aa7f393382b3ce826743fda", "score": "0.42514795", "text": "private static function splitTypeDef(&$result, $type) {\n\t\t// First check reference to another table.\n\t\t$regex = \"/^(\\w+)\\.(\\w+)$/\";\n\t\t$matches = array();\n\n\t\tif (preg_match($regex, $type, $matches)) {\n\t\t\tself::getTableDef($matches[1], true);\n\t\t\t$column = Schema::column($matches[1], $matches[2]);\n\t\t\t$result[\"type\"] = $column[\"type\"];\n\t\t\t$result[\"length\"] = $column[\"length\"];\n\t\t\t$result[\"scale\"] = $column[\"scale\"];\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Now check normal SQL types.\n\t\t$regex = \"/^(\\w+)(\\((\\d+)(,(\\d+))?\\))?$/\";\n\t\t$matches = array();\n\t\t\n\t\tif (!preg_match($regex, $type, $matches)) {\n\t\t\ttrigger_error(\"{$type} is not recognised as an SQL type\", E_USER_WARNING);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (!SqlTypes::isValidDataType($matches[1])) {\n\t\t\ttrigger_error(\"'{$matches[1]}' is not a valid datatype. Did you mean to create a custom column type?\", E_USER_WARNING);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$result[\"type\"] = $matches[1];\n\t\t$result[\"length\"] = SqlTypes::defaultLength($result[\"type\"]);\n\n\t\tif (SqlTypes::isNumeric($result[\"type\"])) {\n\t\t\t$result[\"scale\"] = 0;\n\t\t}\n\n\t\tif (isset($matches[3])) {\n\t\t\t$result[\"length\"] = $matches[3];\n\t\t}\n\t\tif (isset($matches[5])) {\n\t\t\t$result[\"scale\"] = $matches[5];\n\t\t}\n\t}", "title": "" }, { "docid": "9802dbbb17391d52e071845de139a094", "score": "0.4249646", "text": "public function getTypeDescription() {\r\n $this->xpdo->lexicon->load('source');\r\n return $this->xpdo->lexicon('source_type.file_desc');\r\n }", "title": "" }, { "docid": "e934b8b3bd9a1a14c9b53fea6e44c5a0", "score": "0.42455316", "text": "function buildDefinitionList($definitions)\n{\n if (count($definitions) === 0) {\n return '';\n }\n $result = '<dl>';\n foreach ($definitions as $definition) {\n $result .= '<dt>' . $definition[0] . '</dt><dd>' . $definition[1] . '</dd>';\n }\n return $result . '</dl>';\n}", "title": "" }, { "docid": "9de0353e784fa235cf335de72dbb09c1", "score": "0.42452037", "text": "abstract protected function getSchemaDefinition();", "title": "" }, { "docid": "3f3a864b98e07d628f5888279febaeb6", "score": "0.4235657", "text": "public function getMappingAlias();", "title": "" }, { "docid": "67f8f9f3da84ef1cdd4401fffa15b9d1", "score": "0.4234033", "text": "protected function getAlias($class){\n\t $_alias = explode('\\\\',$class);\n $alias = array_pop($_alias);\n $second='as';\n\t if($this->registry->has($alias)){\n if(count($_alias))\n $second = array_pop($_alias);\n $alias = '_'.$second;\n }\n return $alias;\n }", "title": "" }, { "docid": "97d1c616eb1c82dbd57b6934f3def97f", "score": "0.42337808", "text": "public function hasType($alias);", "title": "" }, { "docid": "07207df8db0bca17cd6e08ba78ac6028", "score": "0.42300385", "text": "private function showType(){\r\n\t\tpreg_match('/<span class=\"dark_text\">Type:<\\/span>[\\s]?(<a href=\".*?\">)?([A-Za-z]+?)(<\\/a>)?<\\/div>/', $this->show, $match);\r\n\t\treturn $match[2];\r\n\t}", "title": "" }, { "docid": "6d28eeb9747c057a2c20e7ebf58317c0", "score": "0.42153454", "text": "function getAliases($lid){\n $al = getList_aliases(\"lid='$lid'\");\n return $al;\n}", "title": "" }, { "docid": "951dd4699fa3b3fa1d48fc7c6b99644e", "score": "0.42062503", "text": "public function get($key)\n\t{\n\t\tif (isset($this->definitions[$key])) {\n\t\t\treturn $this->definitions[$key];\n\t\t} else {\n\t\t\treturn new GenericDefinition();\n\t\t}\n\t}", "title": "" }, { "docid": "3d9deb8c8143058b90361ecbd2589d8f", "score": "0.42005858", "text": "function EPL_getFieldDefinitionsTAPERSONTYPE(){\n $fielddefinitions = array();\n $optionsUPD = array(\n 'query_format'=>'classic',\n );\n $fielddefinitions['UPD'] = array('field'=>'UPD', 'label'=>'Dernière mise à jour','ftype'=>'XTimestampDef', 'fcount'=>0,'forder'=>0,'compulsory'=>0,'queryable'=>0,'browsable'=>0,'translatable'=>1,'multivalued'=>0,'published'=>0,'target'=>'%', 'options'=>$optionsUPD);\n $optionsOWN = array(\n 'checkbox_limit'=>'30',\n 'autocomplete_limit'=>'200',\n 'generate_link'=>'1',\n 'checkbox_cols'=>'3',\n 'query_format'=>'classic',\n );\n $fielddefinitions['OWN'] = array('field'=>'OWN', 'label'=>'Propriétaire','ftype'=>'XLinkDef', 'fcount'=>0,'forder'=>1,'compulsory'=>0,'queryable'=>1,'browsable'=>0,'translatable'=>1,'multivalued'=>0,'published'=>0,'target'=>'USERS', 'options'=>$optionsOWN);\n $optionsptno = array(\n 'listbox_limit'=>'75',\n 'query_format'=>'classic',\n );\n $fielddefinitions['ptno'] = array('field'=>'ptno', 'label'=>'Numéro de personne','ftype'=>'XShortTextDef', 'fcount'=>10,'forder'=>9,'compulsory'=>1,'queryable'=>1,'browsable'=>1,'translatable'=>0,'multivalued'=>0,'published'=>1,'target'=>'%', 'options'=>$optionsptno);\n $optionstalabel = array(\n 'listbox_limit'=>'75',\n 'query_format'=>'classic',\n );\n $fielddefinitions['talabel'] = array('field'=>'talabel', 'label'=>'Label Team Axess','ftype'=>'XShortTextDef', 'fcount'=>55,'forder'=>19,'compulsory'=>1,'queryable'=>1,'browsable'=>1,'translatable'=>0,'multivalued'=>0,'published'=>1,'target'=>'%', 'options'=>$optionstalabel);\n $optionsamin = array(\n 'edit_format'=>'^([+-]*[0-9]+[.]{0,1}[0-9]{0,2})$',\n 'query_format'=>'classic',\n );\n $fielddefinitions['amin'] = array('field'=>'amin', 'label'=>'Age minimum','ftype'=>'XRealDef', 'fcount'=>65,'forder'=>39,'compulsory'=>0,'queryable'=>0,'browsable'=>0,'translatable'=>0,'multivalued'=>0,'published'=>0,'target'=>'', 'options'=>$optionsamin);\n $optionsamax = array(\n 'edit_format'=>'^([+-]*[0-9]+[.]{0,1}[0-9]{0,2})$',\n 'query_format'=>'classic',\n );\n $fielddefinitions['amax'] = array('field'=>'amax', 'label'=>'Age maximum','ftype'=>'XRealDef', 'fcount'=>65,'forder'=>49,'compulsory'=>0,'queryable'=>0,'browsable'=>0,'translatable'=>0,'multivalued'=>0,'published'=>0,'target'=>'', 'options'=>$optionsamax);\n return $fielddefinitions;\n}", "title": "" }, { "docid": "fce1ecbe803d15b0760d4cf2045bb9c4", "score": "0.418945", "text": "public function getTypeDescription();", "title": "" }, { "docid": "c01dac0e649b159dd809918141fc8d2c", "score": "0.4188959", "text": "protected function getFielddefsFromBean()\n {\n // Start with the Meetings bean so we can get the vardef\n $bean = BeanFactory::newBean('Meetings');\n return $bean->field_defs;\n }", "title": "" }, { "docid": "064ad5cc6920f77af4199ce980c1d675", "score": "0.4188465", "text": "public function getDefinitions()\n {\n if (array_key_exists(\"definitions\", $this->_propDict)) {\n return $this->_propDict[\"definitions\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "d5335717453147b83d8802ef9aadfea4", "score": "0.41884327", "text": "public function getObjectTypeDefinition($definitionID) {\r\n\t\treturn ObjectTypeCache::getInstance()->getDefinition($definitionID);\r\n\t}", "title": "" }, { "docid": "a0347034873003635e4f8a69912effa3", "score": "0.41836578", "text": "public function createFieldDefinition($type);", "title": "" }, { "docid": "6d93b9b80c3d715ba079ec7dddcc9cb1", "score": "0.41767237", "text": "public function getContentTypeFromAlias($alias, $forceSlug = false)\n {\n foreach ($this->contenttypes->getData() as $key => $contenttype) {\n if ($forceSlug && $forceSlug === 'singular') {\n if (isset($contenttype['singular_slug']) && ($contenttype['slug'] === $alias || $contenttype['tablename'] === $alias)) {\n return $contenttype['singular_slug'];\n }\n } elseif ($forceSlug) {\n if (isset($contenttype['slug']) && ($contenttype['slug'] === $alias || $contenttype['tablename'] === $alias)) {\n return $contenttype['slug'];\n }\n }\n if (isset($contenttype['tablename']) && $contenttype['tablename'] === $alias) {\n return $key;\n }\n\n if (isset($contenttype['slug']) && $contenttype['slug'] === $alias) {\n return $key;\n }\n }\n\n return $alias;\n }", "title": "" }, { "docid": "0c71d4a95064f84085277df65ea41ec4", "score": "0.41745415", "text": "private function locateEntity($entityAlias)\n {\n if (1 === preg_match('/^.*?\\\\.entity\\\\..*?\\\\.class$/', $entityAlias)) {\n if (self::$container->hasParameter($entityAlias)) {\n return $this->getParameter($entityAlias);\n }\n }\n\n if (1 === preg_match('/^[^:]+:[^:]+$/', $entityAlias)) {\n $possibleEntityAliasShortMapping = str_replace(':', '.entity.', $entityAlias.'.class');\n if (self::$container->hasParameter($possibleEntityAliasShortMapping)) {\n return $this->getParameter($possibleEntityAliasShortMapping);\n }\n }\n\n return $entityAlias;\n }", "title": "" }, { "docid": "06ba3b1c815927b101e3f12a11a8fa84", "score": "0.41726595", "text": "protected function buildDocType() {\n\t\t$this->_templateEngine->assign('docType', $this->_docType);\t\t\n\t}", "title": "" }, { "docid": "20e9e3db67fa7a89ee3bd17edbac5857", "score": "0.4167196", "text": "function model_definition($name) {\n\treturn WordPress\\App::instance()->get('modelManager')->getDefinition($name);\n}", "title": "" }, { "docid": "6620fcbfa3e9181533b3e242752f3fc1", "score": "0.41614306", "text": "public function structuredDefinition(): ?IStructuredType;", "title": "" }, { "docid": "456fa5d0b5021b611f6981a36292b541", "score": "0.41557536", "text": "protected function parseDefinition($definition): array\n {\n $escapeOutput = false;\n $callback = $definition;\n\n // If the last item in the array is a boolean, it defines output escaping\n if (\n is_array($callback) &&\n count($callback) > 1 &&\n is_bool($callback[array_key_last($callback)])\n ) {\n $escapeOutput = array_pop($callback);\n }\n\n // Convert an array with 1 item to a string, to make it callable\n // for example, ['count'] is not callable\n if (is_array($callback) && count($callback) <= 1) {\n $callback = implode(\"\", $callback);\n }\n\n return [$callback, $escapeOutput];\n }", "title": "" }, { "docid": "21e218999853382f9a54a0664218b5c3", "score": "0.4140068", "text": "public function getInputDefinition($name){\n\t\treturn $this->inputs[$name];\n\t}", "title": "" }, { "docid": "cfb75bbcf8afe380564d53c615b7bc4f", "score": "0.41152433", "text": "public function resolveClassName($alias)\n {\n // Make sure we have string, type-cast Contenttype if needed.\n $alias = (string) $alias;\n\n if (class_exists($alias)) {\n return $alias;\n }\n\n if (array_key_exists($alias, $this->aliases)) {\n $class = $this->aliases[$alias];\n if (class_exists($class)) {\n return $class;\n }\n }\n if (array_key_exists($alias, $this->defaultAliases)) {\n $class = $this->defaultAliases[$alias];\n if (class_exists($class)) {\n return $class;\n }\n }\n if (array_key_exists($alias, $this->defaultAliases)) {\n $class = $this->defaultAliases[$alias];\n if (class_exists($class)) {\n return $class;\n }\n }\n\n return $this->fallbackEntity;\n }", "title": "" }, { "docid": "978aba2a37d8c7488acfeabf431f7b05", "score": "0.41113687", "text": "public function getNameWithAlias()\n {\n return $this->normalizeName($this->name) . $this->getTypeSuffix($this->type);\n }", "title": "" }, { "docid": "eb771d269d613cee3164a3d1665930e7", "score": "0.41089857", "text": "function getId(&$el)\n {\n if (phpDocumentor_get_class($el) == 'parserdata')\n {\n $element = $this->addLink($el->parent);\n $elp = $el->parent;\n } else\n {\n $elp = $el;\n $element = $this->addLink($el);\n }\n $a = '';\n if (!empty($element->subpackage))\n {\n $a = $element->subpackage.'.';\n }\n switch ($element->type)\n {\n case 'page' :\n return 'package.'.strtolower($element->package.'.'.$a.$element->fileAlias);\n break;\n case 'define' :\n return 'package.'.$element->package.'.'.strtolower($a.$element->fileAlias.'.'.str_replace(array('$','_','\"',\"'\"),array('var--','-','-','-'),$element->name));\n break;\n case 'global' :\n return 'package.'.strtolower($element->package.'.'.$a.$element->fileAlias.'.'.str_replace(array('$','_','\"',\"'\"),array('var--','-','-','-'),$element->name));\n break;\n case 'class' :\n return 'package.'.strtolower($element->package.'.'.$a.str_replace(array('_','.'),array('-','--'),$element->name));\n break;\n case 'function' :\n return 'package.'.strtolower($element->package.'.'.$a.$element->fileAlias.'.'.str_replace('_','-',$element->name));\n break;\n case 'method' :\n return 'package.'.strtolower($element->package.'.'.$a.str_replace(array('_','.'),array('-','--'),$element->class).'.'.str_replace('_','-',$element->name));\n break;\n case 'var' :\n return 'package.'.strtolower($element->package.'.'.$a.str_replace(array('_','.'),array('-','--'),$element->class).'-summary.vars.'.str_replace(array('$','_'),array('var--','-'),$element->name));\n break;\n case 'tutorial' :\n return 'package.'.strtolower($element->package.'.'.$a.str_replace(array('_','.'),array('-','--'),$element->name)).'-tutorial';\n break;\n }\n }", "title": "" }, { "docid": "5e5c4463ce339a1122a373b1228a40c2", "score": "0.41080958", "text": "public function convertToDefinition(array $definition);", "title": "" }, { "docid": "914d764561502682ba558b21b3a67875", "score": "0.4103517", "text": "function ConvertDefinition($Textpart) {\n\t\t\t$lines = explode(\"\\n\", $Textpart);\n\t\t\t$outputText = \"\\n\\t<dl>\\n\";\n\t\t\tforeach($lines as $line) {\n\t\t\t\tif($line != '') {\n\t\t\t\t$textLine = substr($line, strpos($line, '&gt;') + strlen('&gt;'));\n\t\t\t\tif(TextActions::StartsWith('&gt;', $line))\n\t\t\t\t\t$outputText .= \"\\t\\t<dt>\" . $textLine . \"</dt>\\n\";\n\t\t\t\telse\n\t\t\t\t\t$outputText .= \"\\t\\t\\t<dd>\" . $textLine . \"</dd>\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$outputText .= \"\\t</dl>\\n\";\n\t\t\treturn $outputText;\n\t\t}", "title": "" }, { "docid": "4a931334fc1fe7923f81db76f68eff92", "score": "0.41030324", "text": "public function getAlias(): array;", "title": "" }, { "docid": "e5aaccd54d081a006e4aa3ba0d2a44c0", "score": "0.40805227", "text": "private function readUsageType($pointer)\n\t{\n\t\tif ($pointer === false) {\n\t\t\treturn self::INVALID_IP_ADDRESS;\n\t\t}\n\n\t\tif ($this->columns[self::USAGE_TYPE][$this->type] === 0) {\n\t\t\treturn self::FIELD_NOT_SUPPORTED;\n\t\t}\n\n\t\treturn $this->readString($this->columns[self::USAGE_TYPE][$this->type]);\n\t}", "title": "" }, { "docid": "7f2a74611af7e03dbe1935d534058fa6", "score": "0.4070722", "text": "protected function castIndex(array $definition)\n {\n //Index type (UNIQUE or INDEX)\n $type = null;\n\n //Columns index associated too\n $columns = [];\n foreach ($definition as $chunk) {\n if ($chunk == RecordEntity::INDEX || $chunk == RecordEntity::UNIQUE) {\n $type = $chunk;\n continue;\n }\n\n if (!$this->tableSchema->hasColumn($chunk)) {\n throw new DefinitionException(\n \"Record '{$this}' has index definition with undefined local column.\"\n );\n }\n\n $columns[] = $chunk;\n }\n\n if (empty($type)) {\n throw new DefinitionException(\n \"Record '{$this}' has index definition with unspecified index type.\"\n );\n }\n\n if (empty($columns)) {\n throw new DefinitionException(\n \"Record '{$this}' has index definition without any column associated to.\"\n );\n }\n\n //Casting schema\n return $this->tableSchema->index($columns)->unique($type == RecordEntity::UNIQUE);\n }", "title": "" } ]
42d0ca7d3f8aec00ea6142fccb5102b2
FIRST ROW OF BUTTONS
[ { "docid": "588a0431545361b5b568b6e3586fb6c5", "score": "0.0", "text": "function register_columns($buttons) { \t\n array_push($buttons, \"columns\"); \t\n return $buttons; \n}", "title": "" } ]
[ { "docid": "77e93906c308cd3a191c8ac6865e3d42", "score": "0.6154914", "text": "public function openFirstRow()\n {\n $this->_rootElement->find($this->firstRowSelector, Locator::SELECTOR_XPATH)->click();\n }", "title": "" }, { "docid": "f22d709ee207df1945a8645ff925bfaa", "score": "0.5979905", "text": "public function pressNextButton();", "title": "" }, { "docid": "0600e94f4245e880104ba847ce81c57c", "score": "0.5951544", "text": "public abstract function isFirstRowHeaders();", "title": "" }, { "docid": "49b611739f95de581a4db6b240e23127", "score": "0.5898171", "text": "public function firstTab()\n\t{\n\t\t$tabs = $this->tabs() ;\n\t\treturn reset( $tabs );\n\t}", "title": "" }, { "docid": "f3691b853b661c9f050db88542653da0", "score": "0.5883471", "text": "public function tinymce_editor_buttons_second_row($buttons) {\n return array(\n // 'underline',\n // 'justifyfull',\n // 'forecolor',\n // 'pastetext',\n // 'pasteword',\n // 'removeformat',\n // 'charmap',\n // 'outdent',\n // 'indent',\n // 'undo',\n // 'redo',\n // 'wp_help'\n );\n }", "title": "" }, { "docid": "73a8170e0f1f83a160a79d7f7c926a75", "score": "0.5791309", "text": "public function getFirstRowNum() {\n\t\treturn $this->getTopLeftCoordinate()->getRowNum();\n\t}", "title": "" }, { "docid": "cd4cce6d41cbc89bda29fe2ead47645f", "score": "0.57361466", "text": "public function getRow () \n {return array_shift($this->rows);}", "title": "" }, { "docid": "33b49f5c9367d4dfef38b66b0d173d4a", "score": "0.5694468", "text": "public function startRow(): int\n {\n return 2;\n }", "title": "" }, { "docid": "4ebc7a5f61e95da8558df16dcf8470b3", "score": "0.567368", "text": "public function isFirstRowVisible()\n {\n return $this->_rootElement->find($this->firstRowSelector, Locator::SELECTOR_XPATH)->isVisible();\n }", "title": "" }, { "docid": "9eedf7dda01e85829e9c3e52e15d906b", "score": "0.56536615", "text": "public function getFirstRow(): SimpleElement\n {\n return $this->_rootElement->find($this->firstRowSelector, \\Magento\\Mtf\\Client\\Locator::SELECTOR_XPATH);\n }", "title": "" }, { "docid": "1f2ea29eedfcccb3d7495713b1413ea2", "score": "0.56435865", "text": "public function getButton()\n {\n return $this->button;\n }", "title": "" }, { "docid": "28124ae382ca29dca34e999c2ffa14bc", "score": "0.5594249", "text": "function setIteratorFirstRow(){}", "title": "" }, { "docid": "bafb67403a7ba1aea38124f50af14255", "score": "0.5588022", "text": "function getPreviousIteratorRow(){}", "title": "" }, { "docid": "f923b24348588e0739b395476cdfb574", "score": "0.5585181", "text": "function MoveFirst() \r\n\t{\r\n\t\tif ($this->_currentRow == 0) return true;\r\n\t\treturn $this->Move(0);\t\t\t\r\n\t}", "title": "" }, { "docid": "892826fbff560f00fcb3b0b84c61cb01", "score": "0.55513877", "text": "public function first($index){}", "title": "" }, { "docid": "17396bd60d83f922befa6781fbe89546", "score": "0.5506214", "text": "public function getButton()\n {\n if (!isset($this->items['primary']) && isset($this->items['options'])) {\n $primaryAction = array_shift($this->items['options']);\n $this->items['primary'] = $primaryAction;\n }\n return $this->items;\n }", "title": "" }, { "docid": "442a00984d613fbd58e0b5082fac707d", "score": "0.54927963", "text": "function checkRowButtons()\n {\n $intTemp = 0;\n $arrFunctions = array(\n 'row_remove' => '',\n 'row_add' => '$intKey+1',\n 'row_top' => '1',\n 'row_bottom' => '10000000',\n 'row_up' => '$intKey-3',\n 'row_down' => '$intKey+3'\n );\n foreach ($arrFunctions as $strKey => $strValue) {\n if (is_array($this->arrTableParameters[$strKey])) {\n $intKey = key($this->arrTableParameters[$strKey]);\n if ($this->arrTableParameters[$strKey] && is_integer($intKey)) {\n if ($strKey <> 'row_remove') {\n eval(\"\\$intTemp=\" . $strValue . \";\");\n if ($strKey <> 'row_add') {\n $this->arrTableParameters['answer'][$intTemp] = $this->arrTableParameters['answer'][$intKey];\n } else {\n $this->arrTableParameters['answer'][$intTemp] = array();\n }\n }\n if ($strKey <> 'row_add') {\n unset($this->arrTableParameters['answer'][$intKey]);\n }\n ksort($this->arrTableParameters['answer']);\n }\n }\n }\n }", "title": "" }, { "docid": "d23cbd3247dce12b887c83c09e8db2ab", "score": "0.54911965", "text": "public function setIteratorFirstRow () {}", "title": "" }, { "docid": "cc0e21628f3aebb2ac3dad11332a7056", "score": "0.5488388", "text": "function getFirst()\n {\n if ($this->page != 1) \n {\n $go = $this->url.\"&amp;screen=1\";\n return '<a href=\"'.$go.'\"><b>&lt;</b></a> ';\n }\n }", "title": "" }, { "docid": "921689ad54b0f95d745bfcca2410e727", "score": "0.54759663", "text": "public function getPageFirst();", "title": "" }, { "docid": "e0e70e39687af20a8e462cd3cfc407b0", "score": "0.5473701", "text": "function isFirst() {\n return $this->first;\n }", "title": "" }, { "docid": "36dec256d66c0a1832f5cc5f0afda4d2", "score": "0.54521143", "text": "public function get_current_row_index() {\n return $this->row_current_index;\n }", "title": "" }, { "docid": "a27dc8408122a6f4cad98cbeaeb53cfe", "score": "0.5442", "text": "public function isFirstElement()\n {\n return $this->firstElement;\n }", "title": "" }, { "docid": "ddaad9ef0cc5a4bc8676c1da96e9011c", "score": "0.543181", "text": "public function realizirajFirstHit() {\n $this->clickById('FM:to11DataTable:0:selected');\n $this->clickById('FM:RealizationHeader');\n }", "title": "" }, { "docid": "f9c2fed9ae4f3a541edc2adf9b14e920", "score": "0.5421203", "text": "public function buttonAt($offset) {\n return $this->buttons->get($offset);\n }", "title": "" }, { "docid": "5d3f2ac604d5b40fe0a3f4f7ef485fc2", "score": "0.5414129", "text": "public function getFirstItem()\n\t{\n\t\tif( !empty($this->rows) )\n\t\t{\n\t\t\treturn array_slice($this->rows, 0, 1);\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "85d88450a0a48790c11167af1180c974", "score": "0.541146", "text": "public function getStartRow(){\n\t\treturn $this->m_set->getGroupStartRow($this);\n\t}", "title": "" }, { "docid": "aeadfaab407fbc367d0f07f08d3b4b23", "score": "0.53830475", "text": "public function isFirst()\n {\n return $this->getSortableRank() == 1;\n }", "title": "" }, { "docid": "5205f8bbd07c18ac62c1cc7f56a824f0", "score": "0.5372054", "text": "public function getPreviousIteratorRow () {}", "title": "" }, { "docid": "530b0e8cd75b80e3f71543bf12467db3", "score": "0.53010094", "text": "public function isFirst();", "title": "" }, { "docid": "530b0e8cd75b80e3f71543bf12467db3", "score": "0.53010094", "text": "public function isFirst();", "title": "" }, { "docid": "f484601bc5cf6ca1c2fb716ad68d7f91", "score": "0.5279789", "text": "public function get_start_row(): int {\n return $this->start_row;\n }", "title": "" }, { "docid": "c1c4d1e4eb15a69e37e51ac777f7b7ab", "score": "0.527525", "text": "public function firstPage(){\n\n return 1;\n }", "title": "" }, { "docid": "1f7c223136ab58d6217d9a973f652dc8", "score": "0.5258017", "text": "function getFirstRowQuery($sql, $perpage);", "title": "" }, { "docid": "d4b175d323ebc80997f279eaf0a7aa67", "score": "0.5249362", "text": "public function first(){\n foreach ($this->limit(1) as $row) \n\t\t\treturn $row;\n }", "title": "" }, { "docid": "1064b8916e59ea2aaafdb02a2ec66b0d", "score": "0.52339387", "text": "public function firstEmpty($index){}", "title": "" }, { "docid": "7a4c55ba31ae72b5b0986129a2f91d32", "score": "0.5217244", "text": "public function first(array $columns = ['*']);", "title": "" }, { "docid": "e7dee0968780492a0f16b177b719380b", "score": "0.5210492", "text": "abstract function beginRow();", "title": "" }, { "docid": "2e162c180317ff5ce00269845c8a867c", "score": "0.5198969", "text": "protected function getDocHeaderButtons() {\n\t\t$buttons = array(\n\t\t\t'csh' => \\TYPO3\\CMS\\Backend\\Utility\\BackendUtility::cshItem('_MOD_web_txtemplavoilaCM1', '', $this->backPath),\n\t\t\t'back' => '',\n\t\t\t'shortcut' => $this->getShortcutButton(),\n\t\t);\n\n\t\t// Back\n\t\tif ($this->returnUrl) {\n\t\t\t$backIcon = \\TYPO3\\CMS\\Backend\\Utility\\IconUtility::getSpriteIcon('actions-view-go-back');\n\t\t\t$buttons['back'] = '<a href=\"' . htmlspecialchars(\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::linkThisUrl($this->returnUrl)) . '\" class=\"typo3-goBack\" title=\"' . \\Extension\\Templavoila\\Utility\\GeneralUtility::getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '\">' .\n\t\t\t\t$backIcon .\n\t\t\t\t'</a>';\n\t\t}\n\n\t\treturn $buttons;\n\t}", "title": "" }, { "docid": "96159dccbe8f13e3c418d085d043cd0c", "score": "0.5193918", "text": "function current() {\n return $this->result->getCurrentRow();\n }", "title": "" }, { "docid": "996002b001010e9eb3d35d56e60ffca9", "score": "0.5189906", "text": "function getButtons()\n\t{\t\t\n\t\t$buttons = array(\n\t\t\t'contextmenu'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Context Menu',\n\t\t\t\t'row'\t=>\t0\n\t\t\t),\n\t\t\t'browser'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'File Browser',\n\t\t\t\t'row'\t=>\t0,\n\t\t\t\t'editable'\t=>\t1\n\t\t\t),\n\t\t\t'inlinepopups'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Inline Popups',\n\t\t\t\t'row'\t=>\t0\n\t\t\t),\n\t\t\t'media'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Media Support',\n\t\t\t\t'row'\t=>\t0,\n\t\t\t\t'editable'\t=>\t1\n\t\t\t),\n\t\t\t'safari'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Safari Browser Support',\n\t\t\t\t'row'\t=>\t0\n\t\t\t),\n\t\t\t'help'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Help',\n\t\t\t\t'row'\t=>\t1\n\t\t\t),\n\t\t\t'newdocument'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'New Document',\n\t\t\t\t'row'\t=>\t1\n\t\t\t),\n\t\t\t'bold'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Bold',\n\t\t\t\t'row'\t=>\t1\n\t\t\t),\n\t\t\t'italic'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Italic',\n\t\t\t\t'row'\t=>\t1\n\t\t\t),\n\t\t\t'underline'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Underline',\n\t\t\t\t'row'\t=>\t1\n\t\t\t),\n\t\t\t'fontselect'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Font Select',\n\t\t\t\t'row'\t=>\t1\n\t\t\t),\n\t\t\t'fontsizeselect'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Font Size Select',\n\t\t\t\t'row'\t=>\t1\n\t\t\t),\n\t\t\t'styleselect'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Style Select',\n\t\t\t\t'row'\t=>\t1\n\t\t\t),\n\t\t\t'strikethrough'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'StrikeThrough',\n\t\t\t\t'row'\t=>\t1\n\t\t\t),\n\t\t\t'full'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Justify Full',\n\t\t\t\t'row'\t=>\t1,\n\t\t\t\t'icon'\t=>\t'justifyfull',\n\t\t\t\t'layout'=>\t'justifyfull'\n\t\t\t),\n\t\t\t'center'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Justify Center',\n\t\t\t\t'row'\t=>\t1,\n\t\t\t\t'icon'\t=>\t'justifycenter',\n\t\t\t\t'layout'=>\t'justifycenter'\n\t\t\t),\n\t\t\t'left'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Justify Left',\n\t\t\t\t'row'\t=>\t1,\n\t\t\t\t'icon'\t=>\t'justifyleft',\n\t\t\t\t'layout'=>\t'justifyleft'\n\t\t\t),\n\t\t\t'right'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Justify Right',\n\t\t\t\t'row'\t=>\t1,\n\t\t\t\t'icon'\t=>\t'justifyright',\n\t\t\t\t'layout'=>\t'justifyright'\n\t\t\t),\n\t\t\t'formatselect'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Format Select',\n\t\t\t\t'row'\t=>\t1\n\t\t\t),\n\t\t\t'paste'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Paste',\n\t\t\t\t'icon'\t=>\t'pasteword,pastetext',\n\t\t\t\t'row'\t=>\t2,\n\t\t\t\t'editable'\t=>\t1\n\t\t\t),\n\t\t\t'searchreplace'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Search Replace',\n\t\t\t\t'icon'\t=>\t'search,replace',\n\t\t\t\t'row'\t=>\t2\n\t\t\t),\n\t\t\t'forecolor'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Font ForeColour',\n\t\t\t\t'row'\t=>\t2\n\t\t\t),\n\t\t\t'backcolor'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Font BackColour',\n\t\t\t\t'row'\t=>\t2\n\t\t\t),\n\t\t\t'unlink'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Unlink',\n\t\t\t\t'row'\t=>\t2\n\t\t\t),\n\t\t\t'indent'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Indent',\n\t\t\t\t'row'\t=>\t2\n\t\t\t),\n\t\t\t'outdent'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Outdent',\n\t\t\t\t'row'\t=>\t2\n\t\t\t),\n\t\t\t'undo'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Undo',\n\t\t\t\t'row'\t=>\t2\n\t\t\t),\n\t\t\t'redo'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Redo',\n\t\t\t\t'row'\t=>\t2\n\t\t\t),\n\t\t\t'html'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'HTML',\n\t\t\t\t'icon'\t=>\t'code',\n\t\t\t\t'layout'=>\t'code',\n\t\t\t\t'row'\t=>\t2\n\t\t\t),\n\t\t\t'numlist'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Numbered List',\n\t\t\t\t'row'\t=>\t2\n\t\t\t),\n\t\t\t'bullist'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Bullet List',\n\t\t\t\t'row'\t=>\t2\n\t\t\t),\n\t\t\t'clipboard'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Clipboard Actions',\n\t\t\t\t'icon'\t=>\t'cut,copy,paste',\n\t\t\t\t'row'\t=>\t2\n\t\t\t),\n\t\t\t'anchor'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Anchor',\n\t\t\t\t'row'\t=>\t2\n\t\t\t),\n\t\t\t'image'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Image',\n\t\t\t\t'row'\t=>\t2\n\t\t\t),\n\t\t\t'link'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Link',\n\t\t\t\t'row'\t=>\t2\n\t\t\t),\n\t\t\t'cleanup'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Code Cleanup',\n\t\t\t\t'row'\t=>\t2\n\t\t\t),\n\t\t\t'directionality'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Directionality',\n\t\t\t\t'icon'\t=>\t'ltr,rtl',\n\t\t\t\t'row'\t=>\t3\n\t\t\t),\n\t\t\t'emotions'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Emotions',\n\t\t\t\t'row'\t=>\t3\n\t\t\t),\n\t\t\t'fullscreen'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Fullscreen',\n\t\t\t\t'row'\t=>\t3\n\t\t\t),\n\t\t\t'preview'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Preview',\n\t\t\t\t'row'\t=>\t3\n\t\t\t),\n\t\t\t'table'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Tables',\n\t\t\t\t'icon'\t=>\t'tablecontrols',\n\t\t\t\t'layout'=>\t'buttons',\n\t\t\t\t'row'\t=>\t3\n\t\t\t),\n\t\t\t'print'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Print',\n\t\t\t\t'row'\t=>\t3\n\t\t\t),\n\t\t\t'hr'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Horizontal Rule',\n\t\t\t\t'row'\t=>\t3\n\t\t\t),\n\t\t\t'sub'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Subscript',\n\t\t\t\t'row'\t=>\t3\n\t\t\t),\n\t\t\t'sup'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Superscript',\n\t\t\t\t'row'\t=>\t3\n\t\t\t),\n\t\t\t'visualaid'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Visual Aid',\n\t\t\t\t'row'\t=>\t3\n\t\t\t),\n\t\t\t'charmap'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Character Map',\n\t\t\t\t'row'\t=>\t3\n\t\t\t),\n\t\t\t'removeformat'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Remove Format',\n\t\t\t\t'row'\t=>\t3\n\t\t\t),\n\t\t\t'style'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Styles',\n\t\t\t\t'icon'\t=>\t'styleprops',\n\t\t\t\t'row'\t=>\t4\n\t\t\t),\n\t\t\t'nonbreaking'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Non-Breaking',\n\t\t\t\t'row'\t=>\t4\n\t\t\t),\n\t\t\t'visualchars'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Visual Characters',\n\t\t\t\t'row'\t=>\t4\n\t\t\t),\n\t\t\t'xhtmlxtras'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'XHTML Xtras',\n\t\t\t\t'icon'\t=>\t'cite,abbr,acronym,del,ins,attribs',\n\t\t\t\t'row'\t=>\t4\n\t\t\t),\n\t\t\t'imgmanager'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Image Manager',\n\t\t\t\t'row'\t=>\t4,\n\t\t\t\t'editable'\t=>\t1\n\t\t\t),\n\t\t\t'advlink'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Advanced Link',\n\t\t\t\t'row'\t=>\t4,\n\t\t\t\t'editable'\t=>\t1\n\t\t\t),\n\t\t\t'spellchecker'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Spell Checker',\n\t\t\t\t'row'\t=>\t4,\n\t\t\t\t'editable'\t=>\t1\n\t\t\t),\n\t\t\t'layer'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Layers',\n\t\t\t\t'icon'\t=>\t'insertlayer,moveforward,movebackward,absolute',\n\t\t\t\t'row'\t=>\t4\n\t\t\t),\n\t\t\t'advcode'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Advanced Code Editor',\n\t\t\t\t'row'\t=>\t4\n\t\t\t),\n\t\t\t'article'\t=>\tarray(\n\t\t\t\t'title'\t=>\t'Article Breaks',\n\t\t\t\t'icon'\t=>\t'readmore,pagebreak',\n\t\t\t\t'row'\t=>\t4\n\t\t\t)\n\t\t);\n\t\treturn $buttons;\n\t}", "title": "" }, { "docid": "31929c9a833c7171f4704a805e3d65a6", "score": "0.51794434", "text": "public function getTemplateButton()\n {\n return $this->template_button;\n }", "title": "" }, { "docid": "97fd78627a39df8074473f58b0dccfbd", "score": "0.5179014", "text": "public function getFirstBlock();", "title": "" }, { "docid": "ff524e120b776cfa5f23fb13f9a3d40b", "score": "0.51482975", "text": "public function first(){}", "title": "" }, { "docid": "ff524e120b776cfa5f23fb13f9a3d40b", "score": "0.51482975", "text": "public function first(){}", "title": "" }, { "docid": "ff524e120b776cfa5f23fb13f9a3d40b", "score": "0.51479346", "text": "public function first(){}", "title": "" }, { "docid": "ff524e120b776cfa5f23fb13f9a3d40b", "score": "0.51479346", "text": "public function first(){}", "title": "" }, { "docid": "ff524e120b776cfa5f23fb13f9a3d40b", "score": "0.51479346", "text": "public function first(){}", "title": "" }, { "docid": "ff524e120b776cfa5f23fb13f9a3d40b", "score": "0.51468503", "text": "public function first(){}", "title": "" }, { "docid": "f08cce0293f74d5fbfa439941d5d672b", "score": "0.5138459", "text": "public function nextKeyboardRow()\n {\n $this->keyboardButtonsRow += 1;\n\n return $this;\n }", "title": "" }, { "docid": "101b040d693289310ca03b39be018810", "score": "0.51094854", "text": "abstract public function getButtonTitle();", "title": "" }, { "docid": "b7728d5d464c102f1adbb21f89aca994", "score": "0.510844", "text": "public function getFirstPage()\n {\n return 1;\n }", "title": "" }, { "docid": "8fc5adf3867f987d3c8c140e273e5de3", "score": "0.50957", "text": "public function nextRow()\n {\n $this->inlineButtonsRow += 1;\n\n return $this;\n }", "title": "" }, { "docid": "3ec49c1a0bc4659adb0e56616592ee03", "score": "0.50696486", "text": "public function current()\n {\n $row = current($this->table);\n return $row;\n }", "title": "" }, { "docid": "1407ee461c0e436f37fef02ccd8d0c06", "score": "0.5063214", "text": "private function getFirstPage() {\r\n return '<li><a href=\"' . JRoute::_( \"&limitstart=0\" ) . '\" class=\"pagenav\">1</a><li>';\r\n }", "title": "" }, { "docid": "b6571ed8e325ca0c26f8f44b350959a7", "score": "0.5057275", "text": "public function getFirstIndex(): int\r\n {\r\n if (0 === $this->page) {\r\n return 1;\r\n }\r\n\r\n return ($this->page - 1) * $this->maxPerPage + 1;\r\n }", "title": "" }, { "docid": "f0973ba34a9fbbeec02f7363ee308ed6", "score": "0.50556666", "text": "public function first();", "title": "" }, { "docid": "f0973ba34a9fbbeec02f7363ee308ed6", "score": "0.50556666", "text": "public function first();", "title": "" }, { "docid": "f0973ba34a9fbbeec02f7363ee308ed6", "score": "0.50556666", "text": "public function first();", "title": "" }, { "docid": "f0973ba34a9fbbeec02f7363ee308ed6", "score": "0.50556666", "text": "public function first();", "title": "" }, { "docid": "f0973ba34a9fbbeec02f7363ee308ed6", "score": "0.50556666", "text": "public function first();", "title": "" }, { "docid": "f0973ba34a9fbbeec02f7363ee308ed6", "score": "0.50556666", "text": "public function first();", "title": "" }, { "docid": "f0973ba34a9fbbeec02f7363ee308ed6", "score": "0.50556666", "text": "public function first();", "title": "" }, { "docid": "f0973ba34a9fbbeec02f7363ee308ed6", "score": "0.50556666", "text": "public function first();", "title": "" }, { "docid": "2f8eaaebf6ebb94d50942e77dfb42948", "score": "0.50531566", "text": "function getButtonType()\n {\n return $this->readButtonType();\n }", "title": "" }, { "docid": "2822dcb1b98ba9afb44abf2b798f39a1", "score": "0.5051483", "text": "public function headingRow(): int\n {\n return 7;\n }", "title": "" }, { "docid": "2822dcb1b98ba9afb44abf2b798f39a1", "score": "0.5051483", "text": "public function headingRow(): int\n {\n return 7;\n }", "title": "" }, { "docid": "ea7ca3bd116f3fd347cb29bf3a5f7130", "score": "0.5046557", "text": "public function getFirstNode()\n\t{\n\t\treturn $this->_getData('first_node');\n\t}", "title": "" }, { "docid": "bef74ea946a97377e3bf87253612188e", "score": "0.5038413", "text": "public function getTemplateNeedButton()\n {\n return $this->template_need_button;\n }", "title": "" }, { "docid": "947559b6db8907a71f514466f9d6e653", "score": "0.50291884", "text": "public function firstSection() {\r\n\t\t$this->curSection = 0;\r\n\t}", "title": "" }, { "docid": "cd70f46ed6daf0e019b56564c5283d86", "score": "0.501222", "text": "function getCurrentIteratorRow(){}", "title": "" }, { "docid": "00531041e29337312440e129edf43c00", "score": "0.501112", "text": "public function firstChild()\n {\n \n }", "title": "" }, { "docid": "33c2c2ae381bb767994e44b668fe3276", "score": "0.5008358", "text": "public function getFirst() \n {\n return $this->_first;\n }", "title": "" }, { "docid": "46cac43f943c87adea74c2de1cf4c527", "score": "0.5005786", "text": "protected function getDocHeaderButtons() {\n\t\t$docHeaderButtons = array(\n\t\t\t'NEWGROUP' => '',\n\t\t\t'SHORTCUT' => ''\n\t\t);\n\n\t\t// Shortcut icon\n\t\tif ($GLOBALS['BE_USER']->mayMakeShortcut()) {\n\t\t\t$docHeaderButtons['SHORTCUT'] = $this->doc->makeShortcutIcon('','', 'user_txpasswordmgrM1');\n\t\t}\n\n\t\treturn($docHeaderButtons);\n\t}", "title": "" }, { "docid": "fa3ab1b8ddf16bf55c4dc9619aad90df", "score": "0.5004982", "text": "public function first() {\n if ($this->total_entries == 0 ) {\n return 0;\n } else {\n return ( ($this->current_page - 1) * $this->entries_per_page) +1;\n }\n }", "title": "" }, { "docid": "d3ba068d4723472640b7a3f72fd5687a", "score": "0.50021285", "text": "public function current()\n {\n return $this->_current_row;\n }", "title": "" }, { "docid": "e8ca71738a0a71a1b11080f2d55b50c1", "score": "0.4999013", "text": "public function first()\n {\n // $this->filter->apply($this->actionList());\n // phuong thuc nay, hoat dong doc lap. nen dung static\n HelperController::$className = 'UserController';\n\n return HelperController::render();\n // render();\n // return 1;\n }", "title": "" }, { "docid": "e25aadc8f44bb319d8953e0669afa367", "score": "0.49966305", "text": "public function getFirstPage()\n {\n return '1';\n }", "title": "" }, { "docid": "124e568363a2a8f664e64b0bbc7de5c0", "score": "0.4994212", "text": "function getOnClick () { return $this->readOnClick(); }", "title": "" }, { "docid": "124e568363a2a8f664e64b0bbc7de5c0", "score": "0.4994212", "text": "function getOnClick () { return $this->readOnClick(); }", "title": "" }, { "docid": "124e568363a2a8f664e64b0bbc7de5c0", "score": "0.4994212", "text": "function getOnClick () { return $this->readOnClick(); }", "title": "" }, { "docid": "c85ab89059060f9d6aee93faf39e7667", "score": "0.49843553", "text": "function buttonSmall($buttonSmall)\n{\n\tglobal $con;\n\t\n\t$query_ConsultaFuncion = sprintf(\"SELECT * FROM appearance WHERE id_appearance = %s\",\n\t\t\t\t\t\t\t\t\t\t GetSQLValueString($buttonSmall, \"int\"));\n\t//echo $query_ConsultaFuncion;\n\t$ConsultaFuncion = mysqli_query($con, $query_ConsultaFuncion) or die(mysqli_error($con));\n\t$row_ConsultaFuncion = mysqli_fetch_assoc($ConsultaFuncion);\n\t$totalRows_ConsultaFuncion = mysqli_num_rows($ConsultaFuncion);\n\t\n\treturn $row_ConsultaFuncion[\"button_small\"];\n\t\n\tmysqli_free_result($ConsultaFuncion);\n}", "title": "" }, { "docid": "5a1f453ed4367c16cf14ba68f9be0d08", "score": "0.49832547", "text": "function get_next() {\n\t\t$next = $this->db->fetch_row();\n\t\treturn $next;\n\t}", "title": "" }, { "docid": "1f6ccb9efd0776a9dc84a6cb4bbf1998", "score": "0.49822327", "text": "public function current()\n {\n return $this->_currentRow;\n }", "title": "" }, { "docid": "e3ce5b2c02558e1dc7901c884e657c59", "score": "0.4979599", "text": "function getOnClick () { return $this->readOnClick(); }", "title": "" }, { "docid": "e3ce5b2c02558e1dc7901c884e657c59", "score": "0.4979599", "text": "function getOnClick () { return $this->readOnClick(); }", "title": "" }, { "docid": "e3ce5b2c02558e1dc7901c884e657c59", "score": "0.4979599", "text": "function getOnClick () { return $this->readOnClick(); }", "title": "" }, { "docid": "e3ce5b2c02558e1dc7901c884e657c59", "score": "0.4979599", "text": "function getOnClick () { return $this->readOnClick(); }", "title": "" }, { "docid": "3dad67c0eced0f3233b594b8c268d845", "score": "0.4976091", "text": "public function first()\n {\n return current($this->elements);\n }", "title": "" }, { "docid": "8dd087fee6bdaab9f73259ff122fe478", "score": "0.49739784", "text": "public function getFirstModule() {\r\n $layout = $this->initLayout();\r\n\treturn $result = $layout->getFirstModule();\r\n }", "title": "" }, { "docid": "6ba1d89a7651bebe64d25a7cb8556398", "score": "0.497381", "text": "public function getFirstPage() {\n\n return 1;\n }", "title": "" }, { "docid": "77eeecc86b9bcd0cc8eee1f8e0b7f068", "score": "0.49691948", "text": "function renderButtons() {\r\n\t\t\r\n\t}", "title": "" }, { "docid": "8b7c3b8ec676a0d01f37cdd6c146bb5f", "score": "0.49679166", "text": "public function current()\n {\n return current($this->rows);\n }", "title": "" }, { "docid": "8e7d6c3ada4ed65edb6343fbbd8f53c5", "score": "0.49620953", "text": "public function theRow()\n {\n $this->_row = $this->_data[$this->_currentRow];\n\n if ($this->_dataFilterCallback != '') {\n $this->_row = call_user_func_array($this->_dataFilterCallback, array($this->_row));\n }\n\n $this->_currentRow++;\n\n return $this->_row;\n }", "title": "" }, { "docid": "f7d3d64d64f5dd1bfe99e1b968b1b180", "score": "0.49619296", "text": "public function first(){\r\n return $this->results()[0];\r\n }", "title": "" }, { "docid": "115355d228b4bfe4563398da2bd4d8a7", "score": "0.49503732", "text": "public function getFirstRow(string $type = 'object');", "title": "" }, { "docid": "4e1a730c6ce98e2235557ae5d9cb2919", "score": "0.49399674", "text": "public function getButtonSource() {\n return $this->collection->getValue('BUTTONSOURCE');\n\t}", "title": "" }, { "docid": "278604a89303ba7d3db3493e74f83438", "score": "0.49355873", "text": "public function first()\n {\n return $this->raw()->getFirst();\n }", "title": "" }, { "docid": "b3b02401ef9dfe1b97565c381fd3bf9b", "score": "0.4934346", "text": "public function row() {\n return $this->position;\n }", "title": "" }, { "docid": "865bfecfa52ac74fed007abba0b0d00a", "score": "0.49340072", "text": "protected function getDocHeaderButtons() {\n\t\t$docHeaderButtons = parent::getDocHeaderButtons();\n\t\t$docHeaderButtons['NEWGROUP'] = $this->addNewGroupIcon();\n\t\treturn($docHeaderButtons);\n\t}", "title": "" }, { "docid": "d77372c77a656189de32c54361ba3902", "score": "0.49245864", "text": "function get_ActionButton()\n\t\t{\t\n\t\t$actionButton=array();\n\t\t\n\t\tforeach ($this->oc_Configuration['ROUTER'] as $router)\n\t\t\t{\n\t if ( (isset($router['STATUS'])) && ((strtoupper($router['STATUS']))!=\"ACTIVE\") )\n\t {\n\t\n\t }\n\t else\n\t {\n\t\t\t\t//echo \"get_ActionButton: Router \\\"\".$router['NAME'].\"\\\" vom Typ \".$router['TYP'].\" von \".$router['MANUFACTURER'].\" wird bearbeitet.\\n\";\t\t\t\t\n\t \t$router_categoryId=@IPS_GetObjectIDByName(\"Router_\".$router['NAME'],$this->CategoryIdData);\n\t\t\t if ($router_categoryId !== false)\n\t\t\t\t\t{\n\t\t switch (strtoupper($router[\"TYP\"]))\n\t \t {\n\t\t\t\t case 'B2368':\n\t\t\t \tcase 'RT1900AC':\n\t\t\t\t\t\t\t//print_r($router);\n\t\t\t\t\t\t\tif ( (isset($router[\"READMODE\"])) && (strtoupper($router[\"READMODE\"])==\"SNMP\") )\t\t\t// \n\t\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\t$fastPollId=@IPS_GetObjectIDByName(\"SnmpFastPoll\",$router_categoryId);\t\t\t\t// FastPoll Kategorie anlegen\n\t\t\t\t\t\t\t\t$SchalterFastPoll_ID=@IPS_GetObjectIDByName(\"SNMP Fast Poll\",$fastPollId);\t\t// CreateVariable ($Name, $Type, $ParentId, $Position=0, $Profile=\"\", $Action=null, $ValueDefault='', $Icon='')\n\t\t\t\t\t\t\t\t$actionButton[$SchalterFastPoll_ID][\"OperationCenter\"][\"ActivateTimer\"]=true;\n\t\t\t\t\t\t\t\t}\n\t \tbreak;\n\t\t\t\t\t\t} // ende switch\n\t }\n\t\t\t\t}\n\t\t\t}\n /* es gibt im SysTablePing noch einen ActionButton */\n \t$categoryId_SysPing = @IPS_GetObjectIDByName('SysPing', $this->CategoryIdData);\n $categoryId_SysPingControl = @IPS_GetObjectIDByName('SysPingControl', $categoryId_SysPing);\n \t$SysPingSortTableID = @IPS_GetObjectIDByName(\"SortPingTable\", $categoryId_SysPingControl ); \n $actionButton[$SysPingSortTableID][\"Monitor\"][\"SysPingTable\"]=true;\n\t\treturn($actionButton);\n\t\t}", "title": "" } ]
eb44c56f35c57b5a7980420cbba77b61
Adds a JOIN clause to the query using the Calendarevent relation
[ { "docid": "20bcb15e2b9645798bf75f0d87ce241c", "score": "0.6310176", "text": "public function joinCalendarevent($relationAlias = null, $joinType = Criteria::INNER_JOIN)\n {\n $tableMap = $this->getTableMap();\n $relationMap = $tableMap->getRelation('Calendarevent');\n\n // create a ModelJoin object for this join\n $join = new ModelJoin();\n $join->setJoinType($joinType);\n $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);\n if ($previousJoin = $this->getPreviousJoin()) {\n $join->setPreviousJoin($previousJoin);\n }\n\n // add the ModelJoin to the current object\n if ($relationAlias) {\n $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());\n $this->addJoinObject($join, $relationAlias);\n } else {\n $this->addJoinObject($join, 'Calendarevent');\n }\n\n return $this;\n }", "title": "" } ]
[ { "docid": "8ca23dafe1e4920e52efea61a7c48546", "score": "0.6401356", "text": "public function useCalendareventQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)\n {\n return $this\n ->joinCalendarevent($relationAlias, $joinType)\n ->useQuery($relationAlias ? $relationAlias : 'Calendarevent', '\\ORM\\ORM\\CalendareventQuery');\n }", "title": "" }, { "docid": "7c91b94ddbf466e2bf76e03ed785dca5", "score": "0.6376304", "text": "private function join()\n {\n $a = $this->prefix($this->pk(), $this->table());\n $b = $this->prefix($this->pk(), $this->ee_table);\n\n ee()->db->join($this->ee_table, $a . ' = ' . $b, 'inner');\n }", "title": "" }, { "docid": "4a41e5d971562620a65c0c1ffca1bc1e", "score": "0.6224705", "text": "protected function _getJoin(){ }", "title": "" }, { "docid": "a8261e3f9cef2bf9d87bb3390d1df18e", "score": "0.6189016", "text": "public function join($table, $condition = null, $alias = null, $type = null);", "title": "" }, { "docid": "176f5d88193e6223cf29345df957c9fc", "score": "0.61835134", "text": "private function joinEventFilteredByDate(string $relationName, string $alias, QueryBuilder $queryBuilder, ?DateTimeInterface $dateTime = null)\n {\n if ($dateTime === null) {\n $queryBuilder->leftJoin('road.' . $relationName, $alias);\n return;\n }\n\n $queryBuilder\n ->addSelect($alias)\n ->leftJoin('road.' . $relationName, $alias, Join::WITH,\n $this->getEventDateFilterExpression($queryBuilder, $alias, $dateTime)\n );\n }", "title": "" }, { "docid": "5dfb26c5c48ab3bd835266de38397f0d", "score": "0.61683357", "text": "function addJoin($table, $alias, $condition, $outer)\n {\n if ($outer)\n {\n $jointype=\"LEFT JOIN \";\n $join = \" \".$jointype.$table.\" \".$alias.\" ON \".$condition.\" \";\n \n if (!in_array($join, $this->m_joins)) $this->m_joins[]= $join;\n }\n else\n {\n $jointype=\"JOIN \";\n $join = \" \".$jointype.$table.\" \".$alias;\n if (!in_array($join, $this->m_joins))\n {\n $this->m_joins[]= $join;\n $this->addCondition($condition);\n }\n }\n\n }", "title": "" }, { "docid": "3091487a7e8bbe9f1a640da57e6ae05f", "score": "0.6130946", "text": "public function join($secondTable, $onClause = '');", "title": "" }, { "docid": "2d02f13801e40953b611231eaeb305d7", "score": "0.607913", "text": "public function onJoin()\n {\n }", "title": "" }, { "docid": "bb44647ebbaceb558abec04f8fa9a2a6", "score": "0.59340084", "text": "protected function _joinProcessEventTable()\n {\n if (!$this->getFlag('process_event_table_joined')) {\n $this->getSelect()->join(array('process_event' => $this->getTable('index/process_event')),\n 'process_event.event_id=main_table.event_id',\n array('process_event_status' => 'status')\n );\n $this->setFlag('process_event_table_joined', true);\n }\n return $this;\n }", "title": "" }, { "docid": "0e58eefc7d414f209b0403c6a9d45fee", "score": "0.5872231", "text": "public function leftJoin(){}", "title": "" }, { "docid": "6a8b5ba19fe92438336f0cad96650fab", "score": "0.5846051", "text": "public function join($table, $clause) {\r\n\t\t$this->query .= ' INNER JOIN '.$table.' ON '.$clause;\r\n\t}", "title": "" }, { "docid": "d5c8e507bfe4c1523cc58c0e9325eda2", "score": "0.58021706", "text": "public function getJoin();", "title": "" }, { "docid": "9232065ba7afadbe18f2c09b89d2dade", "score": "0.57650614", "text": "function buildContactJoin () \n\t{\n\t\t$this->_join .= \" LEFT JOIN apf_contact ON apf_contact.id=\".$this->__table.\".contact_id \";\n\t}", "title": "" }, { "docid": "517970b2f67efab83e9582e883bbe104", "score": "0.5714586", "text": "public function join($table='', $condition='', $type='INNER')\n{\n $this->table = $table;\n $this->builders['join'][$type][] = compact('condition');\n return $this;\n}", "title": "" }, { "docid": "9e2f0cca2966d64c943dc59f35865131", "score": "0.57131594", "text": "protected function build_join()\n {\n }", "title": "" }, { "docid": "0a706b5a6f1f1aad842815ce7fe9061a", "score": "0.5682647", "text": "function accessforall_custom_posts_join( $join, $query ) {\n\n global $wpdb;\n\n if ( is_main_query() && is_search() ) {\n\n $join .= \"\n LEFT JOIN\n\t\t(\n\t\t\t{$wpdb->term_relationships} as relationships\n\t\t\tINNER JOIN\n\t\t\t\t{$wpdb->term_taxonomy} ON {$wpdb->term_taxonomy}.term_taxonomy_id = relationships.term_taxonomy_id\n\t\t\tINNER JOIN\n\t\t\t\t{$wpdb->terms} ON {$wpdb->terms}.term_id = {$wpdb->term_taxonomy}.term_id\n\t\t)\n\t\tON {$wpdb->posts}.ID = relationships.object_id \";\n\n }\n\n return $join;\n\n}", "title": "" }, { "docid": "b2a3dd09ec7862ba61c3a2d00d5e160a", "score": "0.56810415", "text": "public function join($table, $constraint, $table_alias = null)\n {\n }", "title": "" }, { "docid": "d9846e7850e260fbbaa9bb3a0a0251af", "score": "0.56576043", "text": "public function innerJoin($entity);", "title": "" }, { "docid": "a5bb8fce9c35fbcb436291245636728f", "score": "0.56222695", "text": "public function join($join)\n {\n $join = trim((string) $join);\n $join_array = explode(\" ON \", $join);\n $pattern = '/^(JOIN|INNER JOIN|OUTER JOIN|LEFT JOIN|RIGHT JOIN';\n $pattern .= '|LEFT OUTER JOIN)\\s+(.*)$/';\n\n preg_match($pattern, $join_array[0], $matches);\n\n if (is_array($matches) && count($matches) == 3) {\n $array[\"type\"] = $matches[1];\n $array[\"table_name\"] = $matches[2];\n } elseif (count($matches) == 4) {\n $array[\"table_alias\"] = $matches[2];\n } else {\n throw new LogicException(\"SQL join clause not recognised\");\n }\n\n preg_match('/^(.+)\\s+(=|<>|<|>|<=|>=)\\s+(.+)$/', $join_array[1], $matches);\n if (is_array($matches) && count($matches) > 3) {\n $array[\"on\"] = array($matches[1], $matches[2], $matches[3]);\n } else {\n throw new LogicException(\"SQL join clause not recognised\");\n }\n\n $this->_join[] = $array;\n\n return $this;\n }", "title": "" }, { "docid": "dc47207530d8d2500efa07fa3be81769", "score": "0.5619918", "text": "public function default_join()\n {\n }", "title": "" }, { "docid": "a1fe278ca99d78f8b13cd4813f298adb", "score": "0.5614326", "text": "private function defaultJoin(\\Zend\\Db\\Sql\\Select $select){\n\t\t$select->join('events_category', 'category_id = events_category.id', array ('category', 'cssclass'), 'left');\n\t\t$select->join('base_languages', 'language_id = base_languages.id', array ('locale', 'language'), 'left');\n\t\t$select->join('profile', 'events.user_id = profile.user_id', array ('profile_name' => 'name'), 'left');\n\t\t$select->join('events_socialnetwork', 'events.socialnetwork_id = events_socialnetwork.id', array ('socialnetwork'), 'left');\n\t\treturn $select;\n\t}", "title": "" }, { "docid": "78eefb754851ce1c52d10d7b76b4c0e5", "score": "0.5564508", "text": "public function getSubJoin()\r\n {\r\n if (count($this->on)) {\r\n return '( ' . implode(' ', $this->on) . ' )';\r\n }\r\n return null;\r\n }", "title": "" }, { "docid": "be3450a546b940c07a7fd22120cd26ce", "score": "0.5535455", "text": "protected function _getJoins(){ }", "title": "" }, { "docid": "4c765bd9d351d9df33296a561dccdc92", "score": "0.55341345", "text": "function cf_search_join( $join ) {\n\t global $wpdb;\n\n\t if ( is_search() ) {\n\t $join .=' LEFT JOIN '.$wpdb->postmeta. ' ON '. $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';\n\t }\n\n\t return $join;\n\t}", "title": "" }, { "docid": "ca10c6900299d85f6b8bdccadcde98fd", "score": "0.55126625", "text": "public function join($args) { /*if (isset($join['table'])) {\r\n $join['table'] = $this->add_prefix($join['table']);\r\n }*/\r\n\r\n $this->query_join[] = $args;\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "148417fdaf0068815fcacc10935cd5a2", "score": "0.54809123", "text": "function prepare_sql_addjoin($joinquery)\n\t{\n\t\tlog_debug(\"sql_query\", \"Executing prepare_sql_addjoin($joinquery)\");\n\n\t\t$this->sql_structure[\"joins\"][] = $joinquery;\n\t}", "title": "" }, { "docid": "2d85fc8c934c22bb0cc54b1ceba4f7bf", "score": "0.547368", "text": "protected function joinRelationship():void\n\t{\n\t\t/**\n\t\t * @var string $alias\n\t\t * @var array{\n\t\t * table:string,\n\t\t * primaryKey: string,\n\t\t * relationId: string\n\t\t * } $relationInfo\n\t\t */\n\t\tforeach ($this->belongsTo as $alias => $relationInfo)\n\t\t{\n\t\t\tif (array_key_exists($alias, $this->relationships))\n\t\t\t{\n\t\t\t\t$this->addRelation($alias, $relationInfo);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * @var \\Arifrh\\DynaModel\\Models\\DynaModel $this\n\t\t\t */\n\t\t\t$this->filterRelationship($alias, $this, $alias);\n\t\t}\n\t}", "title": "" }, { "docid": "d4f80e5d9095a34dccf2a6e622ef5306", "score": "0.54452", "text": "public function join($table, $one, $operator = null, $two = null, $type = 'inner', $where = false);", "title": "" }, { "docid": "ddfc35976e235967743dc0950bb7e941", "score": "0.5431802", "text": "public function join()\n\t{\n\t\t// We do a left outer join here because we're not trying to limit the primary table's results\n\t\t// This function is primarily used when needing to sort by a field in the joined table\n\t\t$this->model->select($this->model->getQualifiedFieldName('*'))\n\t\t ->select($this->related->getQualifiedFieldName('*'))\n\t\t ->join($this->associativeTable,\n\t\t $this->model->getQualifiedFieldName($this->localKey),\n\t\t $this->associativeLocal,\n\t\t 'LEFT OUTER')\n\t\t ->join($this->related->getTableName(),\n\t\t $this->associativeRelated,\n\t\t $this->related->getQualifiedFieldName($this->relatedKey),\n\t\t 'LEFT OUTER');\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "927dbf7c8eab2d929129dcd0f52357be", "score": "0.5397131", "text": "protected function _buildQueryJoins(&$query)\r\n {\r\n }", "title": "" }, { "docid": "4fb5252ce7daf30a582b8537bb280c73", "score": "0.5385754", "text": "function posts_join( $join ) {\n\t\tglobal $wpdb;\n\n\t\t// Only modify JOIN clause if external permalinks redux code is loaded\n\t\tif ( class_exists( 'external_permalinks_redux' ) && method_exists( 'external_permalinks_redux', 'get_instance' ) ) {\n\t\t\t$join .= $wpdb->prepare( \" LEFT JOIN {$wpdb->postmeta} epr ON epr.post_id={$wpdb->posts}.ID AND epr.meta_key=%s\", external_permalinks_redux::get_instance()->meta_key_target );\n\t\t}\n\n\t\treturn $join;\n\t}", "title": "" }, { "docid": "1bbb3e65029b488e4efff03b893cdf66", "score": "0.538515", "text": "public function join($table, $cond, $type = \"INNER\") {\n $this->sql .= \" $type JOIN `$table` ON $cond\";\n return $this;\n }", "title": "" }, { "docid": "5d7b7d907365794a8fe27209bf096d7f", "score": "0.5372679", "text": "function cf_search_join( $join ) {\n global $wpdb;\n if ( is_search() ) {\n $join .=' LEFT JOIN '.$wpdb->postmeta. ' ON '. $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';\n }\n return $join;\n}", "title": "" }, { "docid": "5b5dec543ed050fb5858252f024cac3d", "score": "0.53663635", "text": "private function _createExpressionJoin()\n\t{\n\t\treturn new Join();\n\t}", "title": "" }, { "docid": "69e35f85bfe877f2b6aa7ca039489cdc", "score": "0.53605676", "text": "private function buildJoin()\n {\n if (empty($this->joins)) return;\n\n foreach ($this->joins as $join) {\n $type = $join[0];\n $operator = $join[1];\n $table = $join[2];\n $table1col = $join[3];\n $table2col = $join[4];\n\n $this->sql .= \" $type JOIN $table ON $table1col $operator $table2col\";\n }\n }", "title": "" }, { "docid": "63377e7e1638aaa869f57b4ae00c46a4", "score": "0.53559417", "text": "public function loadJoin()\n\t{\n\t\t$tableList = $tableJoin = [];\n\t\t$moduleTableIndexList = $this->entityModel->tab_name_index;\n\t\t$baseTable = $this->entityModel->table_name;\n\t\t$baseTableIndex = $moduleTableIndexList[$baseTable];\n\t\tforeach ($this->fields as &$fieldName) {\n\t\t\tif ($fieldName === 'id') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$field = $this->getModuleField($fieldName);\n\t\t\tif ($field->getFieldDataType() === 'reference') {\n\t\t\t\t$tableJoin[$field->getTableName()] = 'INNER JOIN';\n\t\t\t\tforeach ($this->referenceFields[$fieldName] as &$moduleName) {\n\t\t\t\t\tif ($moduleName === 'Users' && $this->moduleName !== 'Users') {\n\t\t\t\t\t\t$this->addJoin(['LEFT JOIN', 'vtiger_users' . $fieldName, \"{$field->getTableName()}.{$field->getColumnName()} = vtiger_users{$fieldName}.id\"]);\n\t\t\t\t\t\t$this->addJoin(['LEFT JOIN', 'vtiger_groups' . $fieldName, \"{$field->getTableName()}.{$field->getColumnName()} = vtiger_groups{$fieldName}.groupid\"]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} elseif ($field->getFieldDataType() === 'owner' && $fieldName === 'created_user_id') {\n\t\t\t\t$this->addJoin(['LEFT JOIN', 'vtiger_users' . $fieldName, \"{$field->getTableName()}.{$field->getColumnName()} = vtiger_users{$fieldName}.id\"]);\n\t\t\t\t$this->addJoin(['LEFT JOIN', 'vtiger_groups' . $fieldName, \"{$field->getTableName()}.{$field->getColumnName()} = vtiger_groups{$fieldName}.groupid\"]);\n\t\t\t}\n\t\t\tif (!isset($tableList[$field->getTableName()])) {\n\t\t\t\t$tableList[$field->getTableName()] = $field->getTableName();\n\t\t\t\t$tableJoin[$field->getTableName()] = $this->entityModel->getJoinClause($field->getTableName());\n\t\t\t}\n\t\t}\n\t\tforeach ($this->getEntityDefaultTableList() as &$table) {\n\t\t\tif (!isset($tableList[$table])) {\n\t\t\t\t$tableList[$table] = $table;\n\t\t\t\t$tableJoin[$table] = 'INNER JOIN';\n\t\t\t}\n\t\t}\n\t\tif ($this->ownerFields) {\n\t\t\t//there are more than one field pointing to the users table, the real one is the one called assigned_user_id if there is one, otherwise pick the first\n\t\t\tif (in_array('assigned_user_id', $this->ownerFields)) {\n\t\t\t\t$ownerField = 'assigned_user_id';\n\t\t\t} else {\n\t\t\t\t$ownerField = $this->ownerFields[0];\n\t\t\t}\n\t\t}\n\t\tforeach ($this->customTable as &$table) {\n\t\t\t$tableName = $table['name'];\n\t\t\t$tableList[$tableName] = $tableName;\n\t\t\t$tableJoin[$tableName] = $table['join'];\n\t\t}\n\t\tforeach ($this->getEntityDefaultTableList() as &$tableName) {\n\t\t\t$this->query->join($tableJoin[$tableName], $tableName, \"$baseTable.$baseTableIndex = $tableName.{$moduleTableIndexList[$tableName]}\");\n\t\t\tunset($tableList[$tableName]);\n\t\t}\n\t\tunset($tableList[$baseTable]);\n\t\tforeach ($tableList as &$tableName) {\n\t\t\tif ($tableName === 'vtiger_users') {\n\t\t\t\t$field = $this->getModuleField($ownerField);\n\t\t\t\t$this->addJoin([$tableJoin[$tableName], $tableName, \"{$field->getTableName()}.{$field->getColumnName()} = $tableName.id\"]);\n\t\t\t} elseif ($tableName == 'vtiger_groups') {\n\t\t\t\t$field = $this->getModuleField($ownerField);\n\t\t\t\t$this->addJoin([$tableJoin[$tableName], $tableName, \"{$field->getTableName()}.{$field->getColumnName()} = $tableName.groupid\"]);\n\t\t\t} else {\n\t\t\t\t$this->addJoin([$tableJoin[$tableName], $tableName, \"$baseTable.$baseTableIndex = $tableName.$moduleTableIndexList[$tableName]\"]);\n\t\t\t}\n\t\t}\n\t\tforeach ($this->joins as &$join) {\n\t\t\t$on = isset($join[2]) ? $join[2] : '';\n\t\t\t$params = isset($join[3]) ? $join[3] : [];\n\t\t\t$this->query->join($join[0], $join[1], $on, $params);\n\t\t}\n\t\t/*\n\t\t foreach ($this->m2mRelModConditions as &$conditionInfo) {\n\t\t $relatedModuleMeta = \\RelatedModuleMeta::getInstance($this->moduleName, $conditionInfo['relatedModule']);\n\t\t $relationInfo = $relatedModuleMeta->getRelationMeta();\n\t\t $this->query->innerJoin($relationInfo['relationTable'], \"{$relationInfo['relationTable']}.{$relationInfo[$this->moduleName]} = $baseTable.$baseTableIndex\");\n\t\t }\n\t\t // Adding support for conditions on reference module fields\n\t\t if ($this->referenceModuleField) {\n\t\t $referenceFieldTableList = [];\n\t\t foreach ($this->referenceModuleField as &$conditionInfo) {\n\t\t $relatedEntityModel = \\CRMEntity::getInstance($conditionInfo['relatedModule']);\n\t\t $tabIndex = $relatedEntityModel->tab_name_index;\n\t\t $referenceField = $this->getModuleField($conditionInfo['referenceField']);\n\t\t $fieldModel = \\Vtiger_Field_Model::getInstance($conditionInfo['fieldName'], \\Vtiger_Module_Model::getInstance($conditionInfo['relatedModule']));\n\t\t if (empty($fieldModel)) {\n\t\t continue;\n\t\t }\n\t\t $tableName = $fieldModel->getTableName();\n\t\t if (!isset($referenceFieldTableList[$tableName])) {\n\t\t $this->query->leftJoin(\"$tableName $tableName{$conditionInfo['referenceField']}\", \"$tableName{$conditionInfo['referenceField']}.{$tabIndex[$tableName]} = {$referenceField->getTableName()}.{$referenceField->getColumnName()}\");\n\t\t $referenceFieldTableList[$tableName] = $tableName;\n\t\t }\n\t\t }\n\t\t }\n\n\t\t foreach ($this->fromClauseCustom as $where) {\n\t\t $this->query->join($where['joinType'], $where['relatedTable'], \"{$where['relatedTable']}.{$where['relatedIndex']} = {$where['baseTable']}.{$where['baseIndex']}\");\n\t\t }\n\t\t */\n\t}", "title": "" }, { "docid": "63afa8d77bcddb3588379e524fda54a9", "score": "0.53544176", "text": "public function joinFields()\n {\n\t\t$this->getSelect()\n\t\t ->join(\n array('mad' => $this->getTable('magebid/auction_detail')), \n 'mad.magebid_auction_detail_id = main_table.magebid_auction_detail_id')\t\n\t\t ->join(\n array('mat' => $this->getTable('magebid/auction_type')), \n 'mat.magebid_auction_type_id = main_table.magebid_auction_type_id');\t\t\t\t\t\n\t\t//echo $this->getSelect()->__toString();\n }", "title": "" }, { "docid": "dbaa83a5b9346f6de062f4857ff5ac36", "score": "0.53465694", "text": "function buildJoinStatement($join) {\n\t\t$data = array_merge ( array (\n\t\t\t\t'type' => null,\n\t\t\t\t'alias' => null,\n\t\t\t\t'table' => 'join_table',\n\t\t\t\t'conditions' => array () \n\t\t), $join );\n\t\t\n\t\tif (! empty ( $data ['alias'] )) {\n\t\t\t$data ['alias'] = $this->alias . $this->name ( $data ['alias'] );\n\t\t}\n\t\tif (! empty ( $data ['conditions'] )) {\n\t\t\t$data ['conditions'] = trim ( $this->conditions ( $data ['conditions'], true, false ) );\n\t\t}\n\t\tif (! empty ( $data ['table'] )) {\n\t\t\t$data ['table'] = $this->fullTableName ( $data ['table'] );\n\t\t}\n\t\treturn $this->renderJoinStatement ( $data );\n\t}", "title": "" }, { "docid": "9478b85fda427f8fc7dcdf26ebc58235", "score": "0.53361094", "text": "protected function _getJoinType(){ }", "title": "" }, { "docid": "1a17a97feddc8913c68e8c86c08ff869", "score": "0.5334105", "text": "private function createJoin($join, $alias, $condition, $type = Join::TYPE_INNER_JOIN)\n {\n $this->addQueryPart('join', new Join($join, $alias, $condition, $type));\n }", "title": "" }, { "docid": "4a8bc1a91dc2dfd51aae0eab686aaf74", "score": "0.53253686", "text": "public function join($target, $type = 'LEFT' , $alias = null, $relationId = null )\n {\n $this->explictSelect = true;\n $query = $this->_query;\n\n // for models and schemas join\n if( is_object($target) ) {\n $table = $target->getTable();\n\n\n /* XXX: should get selected column names by default, if not get all column names */\n $columns = $target->selected ?: $target->getColumnNames();\n\n if ( ! empty($columns) ) {\n $select = array();\n\n if ( $alias ) {\n $target->setAlias($alias);\n }\n $alias = $target->getAlias() != 'm' ? $target->getAlias() : $table;\n\n foreach( $columns as $name ) {\n // Select alias.column as alias_column\n $select[ $alias . '.' . $name ] = $alias . '_' . $name;\n }\n $query->addSelect($select);\n }\n $expr = $query->join($table, $type); // it returns JoinExpression object\n\n // here the relationship is defined, join the it.\n if( $relationId ) {\n $relation = $this->getSchema()->getRelation( $relationId );\n $expr->on()\n ->equal( $this->getAlias() . '.' . $relation['self_column'] , \n array( $alias . '.' . $relation['foreign_column'] ));\n\n $this->_joinedRelationships[ $relationId ] = $alias;\n\n } else {\n // find the related relatinship from defined relatinpships\n $relations = $this->getSchema()->relations;\n foreach( $relations as $relationId => $relation ) {\n if ( ! isset($relation['foreign_schema']) ) {\n continue;\n }\n\n $fschema = new $relation['foreign_schema'];\n if ( is_a($target, $fschema->getModelClass() ) ) {\n $expr->on()\n ->equal( $this->getAlias() . '.' . $relation['self_column'] , \n array( $alias. '.' . $relation['foreign_column'] ));\n\n $this->_joinedRelationships[ $relationId ] = $alias;\n break;\n }\n }\n }\n\n if( $alias ) {\n $expr->alias( $alias );\n }\n return $expr;\n }\n else {\n // For table name join\n $expr = $query->join($target, $type);\n if( $alias )\n $expr->alias($alias);\n return $expr;\n }\n }", "title": "" }, { "docid": "3cc8742a45b89ebdf268023f4ea32304", "score": "0.5309026", "text": "public function join($table = array(), $on = null, $col = '')\r\n {\r\n $tableName = $this->_getFields($table, $col);\r\n array_push($this->_parts[self::INNER_JOIN], \"$tableName \" . self::SQL_ON . \" $on\");\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "525bc9f459871b1219f7a315e79db11b", "score": "0.5305413", "text": "abstract public function joiningTable($related, $instance = null);", "title": "" }, { "docid": "94c0c0bce1f55660b2a3951740cd23dd", "score": "0.5301569", "text": "protected function performJoin($query = null)\n {\n $query = $query ?: $this->query;\n\n $baseTable = $this->related->getTable();\n\n $throughTable = $this->through->getTable();\n\n $throughKey = $throughTable . '.' . $this->farKey;\n\n $key = $baseTable.'.'.$this->farKey;\n\n $query->join($throughTable, $throughKey, '=', $key);\n\n // We need to join to the intermediate table on the related model's primary\n // key column with the intermediate table's foreign key for the related\n // model instance. Then we can set the \"where\" for the parent models.\n\n\n $key = $throughTable.'.'.$this->relatedPivotKey;\n $relatedKey = $this->table . '.' . $this->relatedPivotKey;\n\n $query->join($this->table, $key, '=', $relatedKey);\n\n return $this;\n }", "title": "" }, { "docid": "765fc58882924a869fb14c416a20318d", "score": "0.5285487", "text": "public function getActivitySql()\n {\n $asResult = array();\n\n $asResult['select'] = 'event.title as title,event.content as content,event.date_display as date_display';\n $asResult['join'] = 'LEFT JOIN event_link AS evel ON (evel.cp_pk = ct.addressbook_contactpk and evel.cp_type = \"ct\") LEFT JOIN event AS event ON (event.eventpk = evel.eventfk) ';\n\n return $asResult;\n }", "title": "" }, { "docid": "f984b603c421981bd5750900f2ebc32d", "score": "0.52714264", "text": "public function testInnerJoin()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "30f4738fdf1c8ac75da8e0c42f71e73f", "score": "0.5266243", "text": "public function join($col,$oncol1,$operator,$oncol2,$type=\"\")\r\n {\r\n $this->join.= \" \".$type.\" join \".$col.\" on (\".$oncol1.$operator.$oncol2.\") \";\r\n $this->orderArray[2] = \"join\";\r\n return $this;\r\n }", "title": "" }, { "docid": "bbdba181bc8ac542e1732975fc1189a6", "score": "0.52458715", "text": "public static function getTableJoin($table, $base_table);", "title": "" }, { "docid": "2416788793ff90894a87dc1c2ce16d04", "score": "0.5239153", "text": "public function addJoin($dataObject, $condition = false, $alias = false, $whichFields = NULL, $type = \"INNER\")\n {\n if (is_string($dataObject))\n $dataObject = new $dataObject();\n if ($alias === false || isset($this->aliases[$alias])) {\n $i = 1;\n $dataObjectName = $dataObject->getTableName();\n do {\n $alias = substr($dataObjectName, 0, $i++);\n } while (isset($this->aliases[$alias]) && $i < strlen($dataObjectName));\n $i = 2;\n while (isset($this->aliases[$alias]))\n $alias = $dataObjectName . ($i++);\n }\n $this->aliases[$alias] = true;\n\n $do = clone($dataObject);\n $do->joins = array();\n $this->joins[] = array(\"model\" => $do, \"conditions\" => $condition, \"alias\" => $alias, \"fields\" => $whichFields, \"type\" => $type);\n\n $index = count($this->joins) - 1;\n foreach ($dataObject->joins as $j) {\n $joinAlias = $j[\"alias\"] = $alias . \"_\" . $j[\"alias\"];\n $condition = $j[\"conditions\"];\n // make sure that the joins of this dataobject join to the\n // joined dataobject and not to this dataobject, snap je\n if (is_string($condition)) {\n $condition = array($alias . \".\" . $condition => $joinAlias . \".\" . $condition);\n } else {\n // array\n foreach ($condition as $here => $there) {\n $k = $here;\n if (is_numeric($here))\n $here = $there;\n\n if (!preg_match(\"~^'~\", $here))\n if (preg_match(\"~\\.~\", $here))\n $here = $alias . \"_\" . $here;\n else\n $here = $alias . \".\" . $here;\n\n if (!preg_match(\"~^'~\", $there))\n if (preg_match(\"~\\.~\", $there))\n $there = $joinAlias . \"_\" . $there;\n else\n $there = $joinAlias . \".\" . $there;\n\n unset($condition[$k]);\n $condition[$here] = $there;\n }\n }\n $j[\"conditions\"] = $condition;\n $this->joins[] = $j;\n if (is_numeric($index))\n $index = array($index);\n $index[] = count($this->joins) - 1;\n }\n\n return $this;\n }", "title": "" }, { "docid": "792abfaf53d7389f859c089abb429a1a", "score": "0.5238596", "text": "function cf_search_join( $join ) {\n global $wpdb;\n\n if ( is_search() ) {\n $join .=' LEFT JOIN '.$wpdb->postmeta. ' ON '. $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';\n }\n\n return $join;\n}", "title": "" }, { "docid": "792abfaf53d7389f859c089abb429a1a", "score": "0.5238596", "text": "function cf_search_join( $join ) {\n global $wpdb;\n\n if ( is_search() ) {\n $join .=' LEFT JOIN '.$wpdb->postmeta. ' ON '. $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';\n }\n\n return $join;\n}", "title": "" }, { "docid": "792abfaf53d7389f859c089abb429a1a", "score": "0.5238596", "text": "function cf_search_join( $join ) {\n global $wpdb;\n\n if ( is_search() ) {\n $join .=' LEFT JOIN '.$wpdb->postmeta. ' ON '. $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';\n }\n\n return $join;\n}", "title": "" }, { "docid": "7bf7b2e50513e5f8389315e69df3117d", "score": "0.5234495", "text": "public static function joinWhere($table, $one, $operator, $two, $type = 'inner'){\n return \\Illuminate\\Database\\Query\\Builder::joinWhere($table, $one, $operator, $two, $type);\n }", "title": "" }, { "docid": "51d3856b85b1cba543a161b480672cf3", "score": "0.5209279", "text": "function cf_search_join( $join ) {\n global $wpdb;\n\n if ( is_search() ) { \n $join .=' LEFT JOIN '.$wpdb->postmeta. ' ON '. $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';\n }\n \n return $join;\n}", "title": "" }, { "docid": "244032ba6f67582a297b9fb24bfde829", "score": "0.5205822", "text": "function renderJoinStatement($data) {\n\t\textract ( $data );\n\t\treturn trim ( \"{$type} JOIN {$table} {$alias} ON ({$conditions})\" );\n\t}", "title": "" }, { "docid": "853f1cdeddb9d22f78b2363d2fb9508a", "score": "0.5195227", "text": "public function innerJoin(Model $other, $condition, $alias = null);", "title": "" }, { "docid": "7a1f08d5dbc4cea459e6bb17cfe8d0f7", "score": "0.5193183", "text": "public function AddJoin($strTable, $cond, $cols)\n\t{\n \t$this->objQuery->joinLeft($strTable, $cond, $cols);\n\t}", "title": "" }, { "docid": "95cc12ee46fac8b36159478875137e59", "score": "0.51826924", "text": "public function join($alias_from, $rel_name, $alias_to_nr, $conditions = array())\n\t{\n\t\t$this->alias_to = 't'.$alias_to_nr;\n\t\t$this->alias_from = $alias_from;\n\t\t$this->alias_through = $this->alias_to.'_through';\n\n\t\t// Extracts the where conditions that should be applied on the whole query\n\t\t$where = (array) \\Arr::get($conditions, 'where', array());\n\t\t\\Arr::delete($conditions, 'where');\n\n\t\t// Merges the conditions of the relation with the specific conditions\n\t\t$conditions = \\Arr::merge($this->conditions, $conditions);\n\n\t\t// Creates the joins to the model_to\n\t\t$joins = array(\n\t\t\t$rel_name.'_through' => array(\n\t\t\t\t'model' => null,\n\t\t\t\t'connection' => call_user_func(array($this->model_to, 'connection',)),\n\t\t\t\t'table' => array($this->table_through, $this->alias_through),\n\t\t\t\t'primary_key' => null,\n\t\t\t\t'join_type' => \\Arr::get($conditions, 'join_type', 'left'),\n\t\t\t\t'join_on' => array(),\n\t\t\t\t'columns' => $this->select_through($this->alias_through),\n\t\t\t\t'rel_name' => $this->model_through,\n\t\t\t\t'relation' => $this\n\t\t\t),\n\t\t\t$rel_name => array(\n\t\t\t\t'model' => $this->model_to,\n\t\t\t\t'connection' => call_user_func(array($this->model_to, 'connection')),\n\t\t\t\t'table' => array(call_user_func(array($this->model_to, 'table')), $this->alias_to),\n\t\t\t\t'primary_key' => call_user_func(array($this->model_to, 'primary_key')),\n\t\t\t\t'join_type' => \\Arr::get($conditions, 'join_type', 'left'),\n\t\t\t\t'join_on' => array(),\n\t\t\t\t'columns' => $this->select($this->alias_to),\n\t\t\t\t'rel_name' => $this->getRelationName($rel_name),\n\t\t\t\t'relation' => $this,\n\t\t\t\t'where' => $where, // Theses conditions will be applied on the whole query\n\t\t\t)\n\t\t);\n\n\t\t// Builds the join conditions on the table_through\n\t\tif (!$this->_build_join_through($joins, $rel_name, $this->alias_through, $this->alias_from, $conditions))\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\t// Builds the join conditions on the model_to\n\t\tif (!$this->_build_join_to($joins, $rel_name, $this->alias_to, $this->alias_through, $conditions))\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\t// Builds the where conditions on the table_through\n\t\tif (!$this->_build_join_where_through($joins, $rel_name, $this->alias_to, $this->alias_from, $conditions))\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\t// Builds the where conditions on the model_to\n\t\tif (!$this->_build_join_where_to($joins, $rel_name, $this->alias_to, $this->alias_from, $conditions))\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\t// Builds the order_by conditions\n\t\tif (!$this->_build_join_orderby($joins, $rel_name, $this->alias_to, $this->alias_from, $conditions))\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\treturn $joins;\n\t}", "title": "" }, { "docid": "828ea99f809187772af1cec755dcf158", "score": "0.51662165", "text": "public function join($type, $entity);", "title": "" }, { "docid": "0bf18ff83b061abf30d2c1c03b2cf015", "score": "0.5165978", "text": "public function raw_join($table, $constraint, $table_alias, $parameters = [])\n {\n }", "title": "" }, { "docid": "64708ef7414d5f8ce56801d9a581c2f1", "score": "0.5143151", "text": "function marketplace_product_search_join( $join, $query ) {\n\n if ( ! $query->is_main_query() || is_admin() || ! is_search() || ! is_woocommerce() ) {\n return $join;\n }\n \n global $wpdb;\n \n $join .= \" LEFT JOIN {$wpdb->postmeta} marketplace_post_meta ON {$wpdb->posts}.ID = marketplace_post_meta.post_id \";\n \n return $join;\n}", "title": "" }, { "docid": "97031fdf6298c68a67e341824c458cf9", "score": "0.51410836", "text": "public function innerJoin($table, $condition = null, $alias = null);", "title": "" }, { "docid": "0e0d595fe4d797e8fd89d1c095635104", "score": "0.51324785", "text": "protected function add_join_source($join_operator, $table, $constraint, $table_alias = null)\n {\n }", "title": "" }, { "docid": "d916c39fabb0cf8b0bc87796f9da200b", "score": "0.5131431", "text": "public function leftJoin($entity);", "title": "" }, { "docid": "34c081707cf778dae1cc622e92f5fca9", "score": "0.5117212", "text": "public function join($alias, $type = NULL)\n\t{\n\t\t$join = Jam_Query_Builder_Join::factory($this->join_table, $type)\n\t\t\t->context_model($this->model)\n\t\t\t->model($this->foreign_model)\n\t\t\t->on($this->join_table.'.'.$this->foreign_key, '=', ':primary_key');\n\n\t\tif ($this->join_table_paranoid) {\n\t\t\t$join->on($this->join_table.'.'.$this->join_table_paranoid, '=', DB::expr('0'));\n\t\t}\n\n\t\treturn $join\n\t\t\t->join_table($alias ? array($this->foreign_model, $alias) : $this->foreign_model, $type)\n\t\t\t\t->on(':primary_key', '=' , $this->join_table.'.'.$this->association_foreign_key)\n\t\t\t\t->context_model($this->model)\n\t\t\t->end();\n\t}", "title": "" }, { "docid": "7e129a0675db814e155ea124de91c8b3", "score": "0.5106007", "text": "public function join( $type, $table, $jtable = true )\n\t{\n\t\t// If we have been given a preconfigured join object, then simply add it.\n\t\tif ($table instanceof DQueryJoin) {\n\t\t\t$table->type( $type );\n\t\t\t$this->join[] = $table;\n\t\t\treturn $this;\n\t\t}\n\n\t\t// Create a new join object and add it.\n\t\t$this->join[] = DQuery::join( $table )->type( $type );\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "b1c060d788d5705f978da7a8b28f46f8", "score": "0.5104656", "text": "public function join($table = null, $on = null) {\n\t\tif ($table === null) {\n\t\t\tforeach ($this->joins as $k => $j) {\n\t\t\t\t// only unset if set with join()\n\t\t\t\tif (is_array($j)) {\n\t\t\t\t\tunset($this->joins[$k]);\n\t\t\t\t\tunset($this->joins_alias[$k]);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$alias = $table;\n\t\t\tif (strpos($table, ' ') !== false) {\n\t\t\t\tlist($table, $alias) = explode(' ', $table, 2);\n\t\t\t}\n\n\t\t\tif ($on === null) {\n\t\t\t\tunset($this->joins[$alias]);\n\t\t\t\tunset($this->args['join'][$alias]);\n\t\t\t\tunset($this->joins_alias[$alias]);\n\t\t\t} else {\n\t\t\t\t$args = func_get_args();\n\t\t\t\t$args = array_splice($args, 2);\n\t\t\t\tif (!isset($this->joins[$alias])) {\n\t\t\t\t\t$this->joins[$alias] = array();\n\t\t\t\t} else if (!is_array($this->joins[$alias])) {\n\t\t\t\t\terror(\"this table $table -> $alias already joined with fields()\");\n\t\t\t\t}\n\t\t\t\t$this->joins_alias[$alias] = $table;\n\t\t\t\t$this->joins[$alias][] = $on;\n\t\t\t\tif (!isset($this->args['join'][$alias])) {\n\t\t\t\t\t$this->args['join'][$alias] = array();\n\t\t\t\t}\n\t\t\t\tif (!empty($args)) {\n\t\t\t\t\t$this->args['join'][$alias] = array_merge($this->args['join'][$alias], $args);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "4601e916ffcc966249e8976330f275fb", "score": "0.5100738", "text": "public function AddMMJoin($strTable, $cond)\n\t{\n\t $this->objQuery->from($strTable, array());\n\t $this->objQuery->where($cond);\n\t}", "title": "" }, { "docid": "060cedae0f159de1efa408551359a038", "score": "0.5090023", "text": "public function getJoins();", "title": "" }, { "docid": "bad6601834d5a6d02e5f6ef549f08267", "score": "0.50874996", "text": "public function testIfStrictJoinSetAnInnerJoinClauseIsWrittenInsteadOfLeftJoin() {\n $authenticationCredentials = MockObjectProvider::instance()->getMockInstance(SQLiteAuthenticationCredentials::class);\n\n $joinDatasource = MockObjectProvider::instance()->getMockInstance(SQLDatabaseDatasource::class);\n $joinDatasource->returnValue(\"getAuthenticationCredentials\", $authenticationCredentials);\n $joinDatasource->returnValue(\"buildQuery\", new SQLQuery(\"*\", \"join_table\"), [\n []\n ]);\n $joinDatasource->returnValue(\"returnDatabaseConnection\", new SQLite3DatabaseConnection());\n\n\n $mainDataSource = MockObjectProvider::instance()->getMockInstance(SQLDatabaseDatasource::class);\n $mainDataSourceConfig = MockObjectProvider::instance()->getMockInstance(SQLDatabaseDatasourceConfig::class);\n $mainDataSource->returnValue(\"getAuthenticationCredentials\", $authenticationCredentials);\n $mainDataSource->returnValue(\"getConfig\", $mainDataSourceConfig);\n $mainDataSource->returnValue(\"returnDatabaseConnection\", new SQLite3DatabaseConnection());\n\n\n // Try a simple column based join\n $joinTransformation = new JoinTransformation(\"testsource\", null, [],\n new FilterJunction([\n new Filter(\"[[name]]\", \"[[otherName]]\", Filter::FILTER_TYPE_EQUALS)]), [], true);\n\n $joinTransformation->setEvaluatedDataSource($joinDatasource);\n\n $sqlQuery = $this->processor->updateQuery($joinTransformation, new SQLQuery(\"*\", \"test_table\"), [],\n $mainDataSource);\n\n\n $this->assertEquals(new SQLQuery(\"*\", \"(SELECT T1.*,T2.* FROM (SELECT * FROM test_table) T1 INNER JOIN (SELECT * FROM join_table) T2 ON T1.\\\"name\\\" = T2.\\\"otherName\\\") S1\"),\n $sqlQuery);\n\n }", "title": "" }, { "docid": "fbb5c3440fcd3b672e414e7a0ca888ae", "score": "0.50842893", "text": "public function joinOrderTable()\n {\n $this->getSelect()\n ->join(\n array('so' => $this->getTable('sales/order')), \n 'so.entity_id = main_table.order_id',\n '');\n return $this;\n }", "title": "" }, { "docid": "fb718f11f6a1e729ca19ad164ed2ccf2", "score": "0.5083613", "text": "function get_joined_by ($table_name_1,$table_name_2,$join_field,$where_array=array(),$result_type='row') {\n return $this->get_joined($table_name_1,$table_name_2,$join_field,$where_array,'',array(),$result_type);\n }", "title": "" }, { "docid": "0eeaf6709e2d48f86dac64e7620f1375", "score": "0.5074558", "text": "public function joinEventMember($relationAlias = null, $joinType = Criteria::INNER_JOIN)\n {\n $tableMap = $this->getTableMap();\n $relationMap = $tableMap->getRelation('EventMember');\n\n // create a ModelJoin object for this join\n $join = new ModelJoin();\n $join->setJoinType($joinType);\n $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);\n if ($previousJoin = $this->getPreviousJoin()) {\n $join->setPreviousJoin($previousJoin);\n }\n\n // add the ModelJoin to the current object\n if ($relationAlias) {\n $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());\n $this->addJoinObject($join, $relationAlias);\n } else {\n $this->addJoinObject($join, 'EventMember');\n }\n\n return $this;\n }", "title": "" }, { "docid": "e32a281069dbe689b2f5efd1981bd342", "score": "0.5074029", "text": "function getJoinSql($entityTableName,$uniqueExtraAlias) {\n\t\treturn \"\";\n\t}", "title": "" }, { "docid": "0c911928bc3b47f8f69d3a0fcd74bc87", "score": "0.5065999", "text": "public static function join($table, $one, $operator = null, $two = null, $type = 'inner', $where = false){\n return \\Illuminate\\Database\\Query\\Builder::join($table, $one, $operator, $two, $type, $where);\n }", "title": "" }, { "docid": "0aa57b90ce339ea3abb9d9dd1e13ea49", "score": "0.5062254", "text": "public function getJoins()\n {\n }", "title": "" }, { "docid": "40383d08e49cee12dacf410b4c289f60", "score": "0.5054832", "text": "private function addJoinToken() {\n \t\tif($this->sql_join) $this->addToken(implode(' ', $this->sql_join));\n \t}", "title": "" }, { "docid": "7169af033b45b0e616adb31c2b6f4409", "score": "0.50530785", "text": "public function joinCollection()\n {\n $table = (new Collection)->getTable();\n\n $columns = [\n $table . '.title as collection_title',\n $table . '.type as collection_type',\n ];\n\n return $this->leftJoin($table, function ($q) use ($table) {\n return $q->where($this->getTable() . '.type', 'collections')\n ->on('type_id', $table . '.id');\n })->addSelect($columns);\n }", "title": "" }, { "docid": "d8e2ac0b24ae9c208ce7ad2985960647", "score": "0.5033009", "text": "public function join($type, $condition)\r\n {\r\n if (is_null($this->join)) {\r\n $this->join = array();\r\n }\r\n $this->join[] = new LSQueryElement(strtoupper($type) . ' JOIN', $condition);\r\n \r\n return $this;\r\n }", "title": "" }, { "docid": "ca739ba1e784561a5a523a8c00ab7e1f", "score": "0.5030864", "text": "public function join($table, $cond, $type = '') {\n\t\tif ($type != '') {\n\t\t\t$type = strtoupper(trim($type));\n\n\t\t\tif ( ! in_array($type, array('LEFT', 'RIGHT', 'OUTER', 'INNER', 'LEFT OUTER', 'RIGHT OUTER'), TRUE)) {\n\t\t\t\t$type = '';\n\t\t\t} else {\n\t\t\t\t$type .= ' ';\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(preg_match_all('/\\s+(AND|OR)\\s+/', $cond, $matches)) {\n\t\t\t$arr = preg_split('/\\s+(AND|OR)\\s+/', $cond);\n\t\t\t$cond = \"(\";\n\t\t\tforeach($arr as $k=>$v) {\n\t\t\t\tif (preg_match('/([^\\s]+)([\\s+]?=[\\s+]?)(.+)/i', $v, $where)) {\n\t\t\t\t\t$cond .= $this->driver->escape_column($this->config['table_prefix'].$where[1]).\n\t\t\t\t\t\t\t' = '.\n\t\t\t\t\t\t\t(is_numeric($where[3]) ? $where[3] : $this->driver->escape_column($this->config['table_prefix'].$where[3])).$matches[0][$k];\n\t\t\t\t} else {\n\t\t\t\t\tEight::log('debug', 'Failed to add join: '.$v);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$cond .= \")\";\n\t\t} else {\n\t\t\tif (preg_match('/([^\\s]+)([\\s+]?=[\\s+]?)(.+)/i', $cond, $where)) {\n\t\t\t\t$cond = $this->driver->escape_column($this->config['table_prefix'].$where[1]).\n\t\t\t\t\t\t' = '.\n\t\t\t\t\t\t(is_numeric($where[3]) ? $where[3] : $this->driver->escape_column($this->config['table_prefix'].$where[3]));\n\t\t\t} else {\n\t\t\t\tEight::log('debug', 'Failed to add join: '.$cond);\t\t\t\n\t\t\t}\n\t\t}\n\n\t\t$this->join[] = $type.'JOIN '.$this->driver->escape_column($this->config['table_prefix'].$table).' ON '.$cond;\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "880145dd4f00219c705416001bf3b2ca", "score": "0.50268126", "text": "public static function doSelectJoinTaskLogEvent(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)\n\t{\n\t\t$criteria = clone $criteria;\n\n\t\t// Set the correct dbName if it has not been overridden\n\t\tif ($criteria->getDbName() == Propel::getDefaultDB()) {\n\t\t\t$criteria->setDbName(self::DATABASE_NAME);\n\t\t}\n\n\t\tSourcePeer::addSelectColumns($criteria);\n\t\t$startcol = (SourcePeer::NUM_COLUMNS - SourcePeer::NUM_LAZY_LOAD_COLUMNS);\n\t\tTaskLogEventPeer::addSelectColumns($criteria);\n\n\t\t$criteria->addJoin(SourcePeer::TASK_LOG_EVENT_ID, TaskLogEventPeer::ID, $join_behavior);\n\n\t\t// symfony_behaviors behavior\n\t\tforeach (sfMixer::getCallables(self::getMixerPreSelectHook(__FUNCTION__)) as $sf_hook)\n\t\t{\n\t\t call_user_func($sf_hook, 'BaseSourcePeer', $criteria, $con);\n\t\t}\n\n\t\t$stmt = BasePeer::doSelect($criteria, $con);\n\t\t$results = array();\n\n\t\twhile ($row = $stmt->fetch(PDO::FETCH_NUM)) {\n\t\t\t$key1 = SourcePeer::getPrimaryKeyHashFromRow($row, 0);\n\t\t\tif (null !== ($obj1 = SourcePeer::getInstanceFromPool($key1))) {\n\t\t\t\t// We no longer rehydrate the object, since this can cause data loss.\n\t\t\t\t// See http://propel.phpdb.org/trac/ticket/509\n\t\t\t\t// $obj1->hydrate($row, 0, true); // rehydrate\n\t\t\t} else {\n\n\t\t\t\t$cls = SourcePeer::getOMClass(false);\n\n\t\t\t\t$obj1 = new $cls();\n\t\t\t\t$obj1->hydrate($row);\n\t\t\t\tSourcePeer::addInstanceToPool($obj1, $key1);\n\t\t\t} // if $obj1 already loaded\n\n\t\t\t$key2 = TaskLogEventPeer::getPrimaryKeyHashFromRow($row, $startcol);\n\t\t\tif ($key2 !== null) {\n\t\t\t\t$obj2 = TaskLogEventPeer::getInstanceFromPool($key2);\n\t\t\t\tif (!$obj2) {\n\n\t\t\t\t\t$cls = TaskLogEventPeer::getOMClass(false);\n\n\t\t\t\t\t$obj2 = new $cls();\n\t\t\t\t\t$obj2->hydrate($row, $startcol);\n\t\t\t\t\tTaskLogEventPeer::addInstanceToPool($obj2, $key2);\n\t\t\t\t} // if obj2 already loaded\n\t\t\t\t\n\t\t\t\t// Add the $obj1 (Source) to $obj2 (TaskLogEvent)\n\t\t\t\t$obj2->addSource($obj1);\n\n\t\t\t} // if joined row was not null\n\n\t\t\t$results[] = $obj1;\n\t\t}\n\t\t$stmt->closeCursor();\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "cb2fff16533a8cb870e9ee73ffdcacd8", "score": "0.5025269", "text": "public function joins()\n {\n return $this->hasMany('App\\Join');\n }", "title": "" }, { "docid": "370c222bbcc42a62135e0ba4016594e1", "score": "0.5013896", "text": "public function link($left_table, $left_field, $field = NULL, $inner_join = TRUE) {\n if ($field == NULL) {\n $field = $left_table;\n }\n $this->meta['join'][$left_table] = array(\n 'left_field' => $left_field,\n 'field' => $field,\n 'inner_join' => $inner_join,\n );\n $this->update(array('meta' => $this->meta));\n }", "title": "" }, { "docid": "66654f47cf98ed8c7cdae3312eecae14", "score": "0.5012197", "text": "public function getJoin() {\n // don't join anything\n return;\n }", "title": "" }, { "docid": "05b073cdf79cebc4cf2700e1211a8307", "score": "0.50095314", "text": "protected function _join($type, $table, $alias, $param = null)\n {\n if ( ! isset($this->query['join']))\n {\n $this->query['join'] = '';\n }\n \n $this->query['join'] .= $type . ' ' . Core::getT($table) . ' AS ' . $alias;\n \n if (is_array($param))\n {\n $this->query['join'] .= \"\\n\\tON(\";\n foreach ($param as $value)\n {\n $this->query['join'] .= $value . ' ';\n }\n }\n else\n {\n if (preg_match('/(AND|OR|=|LIKE)/', $param))\n {\n $this->query['join'] .= \"\\n\\tON({$param}\";\n }\n else\n {\n show_error('No es permitido el uso de \"USING()\" en las consultas SQL nunca más.');\n }\n }\n \n $this->query['join'] = preg_replace('/^(AND|OR)(.*?)/i', '', trim($this->query['join'])) . \")\\n\";\n }", "title": "" }, { "docid": "a6abf5028f3eeb550c355820ff96ee56", "score": "0.4996596", "text": "protected function _build_query_join($query, $conditions, $alias_to, $model_from)\n\t{\n\t\t$join = array(\n\t\t\t'table' => array($this->table_through, $this->alias_through),\n\t\t\t'join_type' => null,\n\t\t\t'join_on' => array(),\n\t\t\t'columns' => $this->select_through($this->alias_through)\n\t\t);\n\n\t\t// Creates the native conditions on the join\n\t\treset($this->key_to);\n\t\tforeach ($this->key_through_to as $key)\n\t\t{\n\t\t\t$join['join_on'][] = array($this->alias_through.'.'.$key, '=', $alias_to.'.'.current($this->key_to));\n\t\t\tnext($this->key_to);\n\t\t}\n\n\t\t// Creates the custom conditions on the join\n\t\tforeach (\\Arr::get($conditions, 'join_on', array()) as $key => $condition)\n\t\t{\n\t\t\tis_array($condition) or $condition = array($key, '=', $condition);\n\t\t\treset($condition);\n\t\t\t$condition[key($condition)] = $this->getAliasedField(current($condition), $this->alias_through);\n\t\t\t$join['join_on'][] = $condition;\n\t\t}\n\n\t\t// Creates the join on the query\n\t\t$query->_join($join);\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "45e5e851dbb806a576ba621e82d03d89", "score": "0.49952707", "text": "public function join ( $tableDefinition ) {\n \t$this->_queryBuilder->join ( $tableDefinition ) ;\n \treturn $this ;\n }", "title": "" }, { "docid": "518f2875a1056b3e7488fc4e4fc20fec", "score": "0.49889788", "text": "public function joinStudent(&$q, $from_table, $from_people_key) {\n\t\t$q->join($from_table, \"Student\", array($from_people_key=>\"people\"));\n\t\t$q->field(\"Student\",\"people\",\"people\");\n\t\t$q->field(\"Student\",\"specialization\",\"specialization\");\n\t\t$q->field(\"Student\",\"exclusion_date\",\"exclusion_date\");\n\t\t$q->field(\"Student\",\"exclusion_reason\",\"exclusion_reason\");\n\t\t$q->field(\"Student\",\"university_id\",\"university_id\");\n\t}", "title": "" }, { "docid": "202fb6aa027a1b6e155c5f84dc91d726", "score": "0.49862465", "text": "public static function addJoin($query, $parentAlias, $schema, $relName, $nested=array(), $joinType='inner')\n {\n if (!in_array($joinType, array('inner','left','right'))) {\n throw new \\InvalidArgumentException(\"Unsupported join type: $joinType\");\n }\n\n list($relName, $alias) = self::parseRelName($relName);\n $rel = $schema->relationship($relName);\n\n // look up schema and table for both sides of join\n $instance = \\Pheasant::instance();\n $localTable = $instance->mapperFor($schema->className())->table();\n $remoteSchema = $instance->schema($rel->class);\n $remoteTable = $instance->mapperFor($rel->class)->table();\n\n $joinMethod = $joinType.'Join';\n $query->$joinMethod($remoteTable->name()->table, sprintf(\n 'ON `%s`.`%s`=`%s`.`%s`',\n $parentAlias,\n $rel->local,\n $alias,\n $rel->foreign\n ),\n $alias\n );\n\n foreach (self::normalizeMap($nested) as $relName=>$nested) {\n self::addJoin($query, $alias, $remoteSchema, $relName, $nested, $joinType);\n }\n }", "title": "" }, { "docid": "b1bf6aefc9103097c78d1596aa1d55fc", "score": "0.49847564", "text": "public function join( $table=\"\", $condition=\"\" )\n {\n $table = Sanitize::toSqlName( $table );\n $condition = Sanitize::toSqlName( $condition );\n\n if( !empty( $table ) && !empty( $condition ) )\n {\n $this->_joins[] = \"LEFT OUTER JOIN \".$table.\" ON \".$condition;\n }\n return $this;\n }", "title": "" }, { "docid": "fdd7ee18979099df831a5b13708154cc", "score": "0.49789688", "text": "protected function _toJoinClause(\\Yana\\Db\\Queries\\IsQueryWithJoins $query): string\n {\n assert(!isset($joins ), 'cannot redeclare variable $joins ');\n $joins = \"\";\n assert(!isset($connection), 'cannot redeclare variable $connection');\n $connection = $query->getDatabase();\n\n assert(!isset($join), 'cannot redeclare variable $join');\n foreach ($query->getJoins() as $join)\n {\n /** @var \\Yana\\Db\\Queries\\JoinCondition $join */\n\n /* add table-join */\n switch (true)\n {\n case $join->isLeftJoin():\n $joins .= ' LEFT JOIN ' . $connection->quoteId($join->getJoinedTableName());\n break;\n case $join->isInnerJoin():\n $joins .= ' JOIN ' . $connection->quoteId( $join->getJoinedTableName());\n break;\n };\n if ($join->getForeignKey() === \"\" || $join->getTargetKey() === \"\") {\n continue; // nothing to add to on-clause\n }\n /* add on-clause */\n switch (true)\n {\n case $join->isLeftJoin():\n case $join->isInnerJoin():\n $joins .= ' ON ' .\n ($join->getSourceTableName() > \"\" ? $connection->quoteId($join->getSourceTableName()) . '.' : \"\") .\n $connection->quoteId($join->getForeignKey()) .\n ' = ' .\n ($join->getJoinedTableName() > \"\" ? $connection->quoteId($join->getJoinedTableName()) . '.' : \"\") .\n $connection->quoteId($join->getTargetKey());\n break;\n }\n } /* end foreach */\n unset($join);\n\n return $joins;\n }", "title": "" }, { "docid": "3141c1c5bc435f282f4ed07332fc7a3b", "score": "0.49559742", "text": "public function join($type, $spec, $cond = null , array $bind_values = array()) {\n\t\t$type = strtoupper(ltrim(\"$type JOIN\")) ;\n\t\t\n\t\tif ($spec instanceof SelectBuilder) {\n\t\t\t// sub select query.\n\t\t\t$spec = $this->getSubQueryString($spec) ;\n\t\t}\n\n\t\t$cond = $this->rebuildCondAndValues($cond, $bind_values) ;\n\n\t\t$from_key = $this->from_key < 0 ? 0 : $this->from_key ;\n\t\t$this->join[$from_key][] = trim(\"$type $spec ON $cond\") ;\n\t\t\n\t\treturn $this ;\n\t}", "title": "" }, { "docid": "82d2487017bf5707abf6ac6d2581bb3d", "score": "0.49552992", "text": "public function search_join( $join ) {\r\n\t\t\tglobal $wpdb;\r\n\r\n\t\t\tif ( $this->do_search() === false ) {\r\n\t\t\t\treturn $join;\r\n\t\t\t}\r\n\r\n\t\t\tif ( ! is_admin() && is_search() ) {\r\n\r\n\t\t\t\t$join .= ' LEFT OUTER JOIN ' . $wpdb->postmeta . ' ON ' . $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id AND ' . $wpdb->postmeta . '.meta_key = \"yikes_woo_products_tabs\"';\r\n\t\t\t}\r\n\r\n\t\t\treturn $join;\r\n\t\t}", "title": "" }, { "docid": "d55b2ec8ca5bc8a00c1a178bc4a5b2a5", "score": "0.49537483", "text": "public function joinBatchPeriod(&$q, $from_table, $from_key) {\n\t\t$q->join($from_table, \"BatchPeriod\", array($from_key=>\"id\"));\n\t}", "title": "" }, { "docid": "56d6ee0055e398c7583dd4d3c6afb675", "score": "0.4941007", "text": "function sub_cat_join()\n {\n $tbl = \"sub_category\";\n $col = \"category_id\";\n $tables = array(\"category\" => \"category_id\");\n\n $obj = new model;\n $sub_cat = $obj->sel_join($tbl,$tables);\n return $sub_cat;\n }", "title": "" }, { "docid": "99d0dc28ff096d90b2c80a72af857c0f", "score": "0.49399415", "text": "public function addJoin($key, array $parameters);", "title": "" }, { "docid": "eb0cb23f584380629b93deb7dd217fb9", "score": "0.49361297", "text": "protected function addJoins($query, $wheres, $options = [])\n {\n // Override if joins are required\n return $wheres;\n }", "title": "" }, { "docid": "caffcfe63e0c7a18da92519eaa049195", "score": "0.4934935", "text": "public function joinWhere($table, $one, $operator, $two, $type = 'inner')\n {\n return $this->join($table, $one, $operator, $two, $type, true);\n }", "title": "" }, { "docid": "1b3d410b41d069638a307d67bf999142", "score": "0.49349046", "text": "public function leftJoin($table, $condition = null, $alias = null);", "title": "" }, { "docid": "75ecd6aa6fc523bb9a818201b80be91b", "score": "0.49310157", "text": "public function join(string $table, string $type = \"INNER JOIN\"): self\n {\n $this->joins[] = [\n \"table\" => $this->delim[0] . $table . $this->delim[1],\n \"type\" => $type,\n \"cond\" => [],\n \"colList\" => []\n ];\n return $this;\n }", "title": "" } ]
f4a3a15ee568bc3ac87a2fd9a33302ec
Valida valores recebidos dos inputs de adicionar/objeto
[ { "docid": "691358742ff0bb312b80092efc4cfd86", "score": "0.0", "text": "public function saveObject(Request $request)\n {\n $request->validate([\n \"objectName\" => \"required|min:3|max:255\",\n \"objectYear\" => \"required|int|min:1900|max:\" . Carbon::now()->format('Y'),\n \"objectPhoto\" => \"required|url|min:3|max:255\"\n ]);\n //Usa o método de salvar da model, e retorna bool para mostra de resultado\n if(ObjectModel::addObject($request))\n {\n return view('layout.item.addType.result', [\n \"result\" => true,\n \"message\" => \"Objeto adicionado com sucesso!\"\n ]);\n }\n else\n {\n return view('layout.item.addType.result', [\n \"result\" => false,\n \"message\" => \"Falha na adição de objeto!\"\n ]);\n }\n }", "title": "" } ]
[ { "docid": "9f370a0334b73eedd0204ec593b9cd3c", "score": "0.65995747", "text": "private function valida()\n {\n }", "title": "" }, { "docid": "8d3286934df1061e8697489cc2bb6bb6", "score": "0.65764874", "text": "private function checkValues()\n {\n // At least one of the 3 field must have a value (firstname, lastname, company)\n if (\n empty($this->datas['firstname']) === true &&\n empty($this->datas['lastname']) === true &&\n empty($this->datas['company']) === true\n ) {\n throw new \\InvalidArgumentException(\n 'At least one of the 3 field must have a value (firstname, lastname, company)'\n );\n }\n\n // Amount must be numeric > 0\n if (is_numeric($this->datas['amount']) === false) {\n throw new \\InvalidArgumentException('amount must be a numeric');\n }\n if ($this->datas['amount'] <= 0) {\n throw new \\InvalidArgumentException('amount must greather than 0');\n }\n\n // Fee must be empty or numeric\n if (empty($this->datas['fee']) === true) {\n $this->datas['fee'] = 0;\n } elseif (is_numeric($this->datas['fee']) === false) {\n throw new \\InvalidArgumentException('fee must be a numeric');\n }\n\n // contributor_type must exist\n if (empty($this->datas['contributor_type']) === true) {\n $this->datas['contributor_type'] = ContributorType::DEFAULT_TYPE;\n }\n $contributor_type = $this->contributor_type_repository->findOneBySlug($this->datas['contributor_type']);\n if (null === $contributor_type) {\n throw new \\InvalidArgumentException('contributor type must exist');\n }\n $this->datas['contributor_type'] = $contributor_type;\n\n // payment_type must exist\n $payment_type = $this->payment_type_repository->findOneBySlug($this->datas['payment_type']);\n if (null === $payment_type) {\n throw new \\InvalidArgumentException('payment type must exist');\n }\n $this->datas['payment_type'] = $payment_type;\n\n // Country must be a ISO Code\n $this->datas['country'] = strtoupper($this->datas['country']);\n if (preg_match('/^[A-Z]{2}$/', $this->datas['country']) === 0) {\n throw new \\InvalidArgumentException('country must be an ISO Code of country');\n }\n }", "title": "" }, { "docid": "4e2e1903cc7d76bf212df35e5690f158", "score": "0.63829315", "text": "function asignar_valores(){\n\t\t$this->dolar=$_POST['dolar'];\n\t\t$this->euro=$_POST['euro'];\n\t\t$this->correo=$_POST['correo'];\n\t\t$this->rif=$_POST['rif'];\n\t\t$this->empresa=$_POST['empresa'];\n\t\t$this->website=$_POST['website'];\n\t\t$this->descuento=$_POST['descuento'];\n\t\t$this->aumento=$_POST['aumento'];\n\t}", "title": "" }, { "docid": "de518705074d560a18d4ec5977527c6a", "score": "0.6330156", "text": "abstract public function validateInput();", "title": "" }, { "docid": "6d97a53b147a9ab32b08ec5a7db3d1d5", "score": "0.624193", "text": "function asignar_valores(){\n $this->nombre=$_POST['nombre'];\n $this->url=$_POST['url'];\n $this->fecha=$_POST['fecha'];\n $this->descripcion=$_POST['descripcion'];\n }", "title": "" }, { "docid": "555bacbbd7c86c91f842f8d6c09ee954", "score": "0.6229781", "text": "function validarCampos(){\n $this->procedimiento='pre.ft_entidad_transferencia_ime';\n $this->transaccion='PRE_ENT_TRAN_VAL';\n $this->tipo_procedimiento='IME';\n\n //Define los parametros para la funcion\n $this->setParametro('codigo','codigo','varchar');\n $this->setParametro('nombre','nombre','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "e83699a267bd3b2dbeb130f38e184f9b", "score": "0.6185735", "text": "function validarCruce() {\n $this->verificarSeleccionados();\n //$_REQUEST['opcion']='cambiarGrupo';\n $this->buscarGrupo($_REQUEST);\n $this->enlacesCambioGrupo();\n }", "title": "" }, { "docid": "acbb393e3427f3418f17cd6f39cb206c", "score": "0.6177462", "text": "public function crearPersonaDesdeInputs() {\n $persona = Persona::create(Input::all());\n if ($persona && $persona->id) {\n //registra el id de la persona creada para ser asignada al estudiante\n Input::merge([\n 'id_persona' => $persona->id\n ]);\n\n $ctrl = new PersonaController;\n $ctrl->despuesDeGuardar($persona);\n }\n else {\n $this->retornarError(__('global.unable_perform_action'));\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "10d6834ef4d56058059f8d8f10b9cac5", "score": "0.6174694", "text": "public function validate()\n {\n foreach ($this->address_types as $tname) {\n foreach ($this->address_vars as $vname => $value) {\n if (!isset($this->parameters[$tname][$vname])) {\n $this->parameters[$tname][$vname] = $value;\n }\n }\n }\n\n foreach ($this->options_vars as $oname => $value) {\n if (!isset($this->parameters['options'][$oname])) {\n $this->parameters['options'][$oname] = $value;\n }\n }\n }", "title": "" }, { "docid": "5bb312f8b62c21241d65fb30211891b7", "score": "0.61496896", "text": "public function validar_alta(){\n }", "title": "" }, { "docid": "c1befb130dbb12459a0868dc2a49a0c3", "score": "0.6146011", "text": "public function validatFields($input);", "title": "" }, { "docid": "d642112fdb6cab36b5e1708e5a762d5a", "score": "0.6115537", "text": "function validarCampos(){\n $this->procedimiento='pre.ft_direccion_administrativa_ime';\n $this->transaccion='PRE_DIR_ADM_VAL';\n $this->tipo_procedimiento='IME';\n\n //Define los parametros para la funcion\n $this->setParametro('codigo','codigo','varchar');\n $this->setParametro('nombre','nombre','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "3df449bcaec11264c638a2d7fc73a820", "score": "0.6057168", "text": "protected function validate( )\n {\n $value = $this->getData( $this->getArgument( ) );\n\n // First we check if the object is of the correct type. \n // If so, we are ok and export the argument.\n if ( $value instanceof KVDdom_DomainObject ) {\n if ( $value->getClass( ) == $this->getParameter( 'domain_object' ) ) {\n $this->export( $value );\n return true;\n } else {\n return false;\n }\n }\n\n // If the value isn't a KVDdom_DomainObject yet,\n // we will check if the ID has the correct data type (standard: int)\n $id_data_type = $this->getParameter( 'id_data_type', 'int');\n $toegelaten_waarden = array('int', 'string');\n if (!in_array($id_data_type, $toegelaten_waarden)){\n throw new InvalidArgumentException ( \"De parameter id_data_type \".\n \"heeft een ongekend type. Toegelaten waarden zijn: \".\n implode(', ', $toegelaten_waarden ) );\n }\n \n // If the value isn't a KVDdom_DomainObject yet,\n // we will check if the ID has the correct data type (standard: int)\n switch ($id_data_type) {\n case 'string':\n if(!is_string($value)){\n $this->throwError( 'invalid_id_data_type' );\n return false;\n }\n break;\n case 'int': \n default:\n $value = (int)$value;\n if(!is_int($value)){\n $this->throwError( 'invalid_id_data_type' );\n return false;\n }\n break;\n }\n \n $this->sessie = $this->getContext( )\n ->getDatabaseManager( )\n ->getDatabase( $this->getParameter( 'session_name', 'sessie' ) )\n ->getConnection( );\n\n $mapper = $this->sessie->getMapper( $this->getParameter( 'domain_object' ) );\n\n $finder = $this->getParameter( 'finder_name', 'findById' );\n\n if ( !method_exists( $mapper, $finder ) ) {\n throw new InvalidArgumentException( \n 'De methode met naam ' . $finder . \n ' bestaat niet op de mapper voor domain object ' . \n $this->getParameter( 'domain_object' ) );\n }\n\n try {\n $dom = $mapper->$finder( $value );\n } catch ( PDOException $e ) {\n $this->getContext( )->getLoggerManager( )->log( \n sprintf( 'De KVDag_IdValidator kon een object niet vinden wegens een databank fout. \n De uitgevoerd methode was %s::%s. Dit leverde de volgende exception op: %s',\n $this->getParameter('domain_object'),\n $finder,\n $e->getMessage( ) ) );\n $this->throwError( );\n return false;\n } catch ( KVDdom_DomainObjectDeletedException $e ) {\n $this->throwError( 'deleted_object' );\n return false;\n } catch ( KVDdom_DomainObjectNotFoundException $e ) {\n $this->throwError( 'unexisting_object' );\n return false;\n }\n\n $this->export( $dom );\n return true;\n }", "title": "" }, { "docid": "d52c7e204b06245e9e1422f002e67e91", "score": "0.6045582", "text": "function validarEstudiante($data) { \n\n $error = array();\n if(empty($data['input-nombre'])) {\n array_push($error, 'El campo Nombre es obligatorio.');\n }\n if(empty($data['input-apellido'])) {\n array_push($error, 'El campo Apellido es obligatorio.');\n }\n if(empty($data['input-cedula'])) {\n array_push($error, 'El campo Cedula es obligatorio.');\n }\n if (filter_var($data['input-cedula'], FILTER_VALIDATE_INT) === false) {\n array_push($error, 'El campo Cedula debe ser numerico.');\n }\n if(empty($data['select-sexo'])) {\n array_push($error, 'El campo Sexo es obligatorio.');\n }\n if(empty($data['input-fechadenacimiento'])) {\n array_push($error, 'El campo Fecha de Nacimiento es obligatorio.');\n }\n if (!empty($data['input-email']) && filter_var($data['input-email'], FILTER_VALIDATE_EMAIL) === false) {\n array_push($error, 'El campo Email no es un email valido.');\n }\n return $error;\n}", "title": "" }, { "docid": "c84f211173d260bd9dd5e9bee69c6280", "score": "0.60354644", "text": "abstract function validate(&$obj,&$field,&$fields);", "title": "" }, { "docid": "d4d6bb925ce539df831f7dbc5dee7be3", "score": "0.6033565", "text": "public function validateArguments()\n\t{\n\t\t$this->validateAndSetUsername();\n\t\t$this->validateAndSetPassword();\n\t\t$this->validateAndSetTeam();\n\n\t}", "title": "" }, { "docid": "0bf41a10761154167042ba449be607de", "score": "0.6027921", "text": "function validateData(){\n // The datas is put in the dictionary after passing by\n // the function safe_data() to make it safer and prevent SQL Injections\n $data = array(\n \"nome\" => safe_data($_POST[\"nome\"]),\n \"sexo\" => safe_data($_POST[\"sexo\"]),\n \"midia\" => safe_data($_POST[\"midia\"]),\n \"cep\" => safe_data($_POST[\"cep\"]),\n \"logradouro\" => safe_data($_POST[\"logradouro\"]),\n \"numeroCasa\" => safe_data($_POST[\"numeroCasa\"]),\n \"complemento\" => safe_data($_POST[\"complemento\"]),\n \"cidade\" => safe_data($_POST[\"cidade\"]),\n \"bairro\" => safe_data($_POST[\"bairro\"]),\n \"email\" => safe_data($_POST[\"email\"]),\n \"telefone\" => safe_data($_POST[\"telefone\"]),\n \"celular\" => safe_data($_POST[\"celular\"]),\n \"observacoes\" => safe_data($_POST[\"observacoes\"]),\n );\n $dataSize = sizeof($data);\n $requiredFields = array(\n \"nome\",\n \"cidade\",\n \"bairro\",\n \"logradouro\",\n \"celular\",\n \"numeroCasa\"\n );\n if($_POST['acao'] == 'editarAluno'){\n array_push($requiredFields, \"matricula\");\n }\n $requiredAmount = sizeof($requiredFields);\n $i = 0;\n $invalidFields = array();\n // Check if the required fields are empties\n for($i; $i < $requiredAmount; $i++){\n $index = $requiredFields[$i];\n if(empty($data[$index]) OR !isset($data[$index])){\n // add the index of the field that is empty into invalidFields\n array_push($invalidFields, $index);\n }\n }\n\n // if(validate_telefone($data[\"telefone\"]) && $data[\"telefone\"] != \"\"){\n // array_push($invalidFields, \"telefone\");\n // }\n if(validate_celular($data[\"celular\"]) && $data[\"celular\"] != \"\"){\n array_push($invalidFields, \"celular\");\n }\n // if(validate_data($data[\"dataNasc\"])){\n // array_push($invalidFields, \"dataNasc\");\n // }\n if(validate_email($data[\"email\"]) && $data[\"email\"] != \"\"){\n array_push($invalidFields, \"email\");\n }\n\n\n // return false if there is no empty field\n $erro = (empty($invalidFields))? false:true;\n\n return array('erro' => $erro, 'invalidFields' => $invalidFields, 'data' => $data);\n}", "title": "" }, { "docid": "612ab7d1eb0137dcf7eeda1a76a1474c", "score": "0.6026586", "text": "protected function _validate_input () {\n# $auth = $this->_session->get('auth', 'privileges');\n#\n# // if not authenticated send to error\n# if (!$auth|| !in_array($auth, ['admin'])) {\n# $this->_error->unauthorized('unauthorized attempt to use cms save');\n# }\n\n# // check for http request method to be post\n# if ($this->_request->method() != 'post') {\n# $this->_error->bad_request('bad request for cms save with method other than post');\n# }\n\n // validate available cms entity in list\n $this->_validator->validate('is_in_list', $this->_input['entity'], ['category', 'product']);\n\n // do validation according to entity\n switch ($this->_input['entity']) {\n case 'category':\n $this->_validator->validate('is_entity', 'category', 'seo', $this->_input['id']);\n break;\n\n case 'product':\n $this->_validator->validate('is_entity', 'product', 'sku', $this->_input['id']);\n break;\n }\n\n\n if ($this->_validator->error()) {\n $this->_error->bad_request('bad request for cms save: ' . $this->_validator->error());\n }\n }", "title": "" }, { "docid": "256cdc69bb87f716c2585d34fad8fd46", "score": "0.6000128", "text": "protected function validateAdd($object)\n {\n }", "title": "" }, { "docid": "7b4544533a7c63dacb87ca4bf17105b0", "score": "0.59960526", "text": "public static function SetterValidData() {\n\t}", "title": "" }, { "docid": "ab41edb6f9aeef1b1dbff99eeed846a0", "score": "0.59841", "text": "public function validar() {\r\n\t\treturn true; \r\n\t}", "title": "" }, { "docid": "5299af517ce4082b779d25fdd1daf8d4", "score": "0.5962252", "text": "abstract protected function validate();", "title": "" }, { "docid": "5299af517ce4082b779d25fdd1daf8d4", "score": "0.5962252", "text": "abstract protected function validate();", "title": "" }, { "docid": "ad9423cfee6cf9ce17e789cd97dded32", "score": "0.59507513", "text": "function crearDatos(){\n\n\n$enviar=$_POST['enviar']??false;\n if($enviar){\n $this->DNI=$_POST['DNI']??\"\";\n\n $this->nombre=$_POST['nombre']??\"\";\n\n $this->apellido1=$_POST['apellido1']??\"\";\n\n $this->apellido2=$_POST['apellido2']??\"\";\n\n $this->direccion=$_POST['direccion']??\"\";\n\n $this->tipoVia=$_POST['tipoVia']??\"\";\n\n\n }\n }", "title": "" }, { "docid": "0efd62aa7717cff7c82f3995b5fb18ae", "score": "0.59482616", "text": "abstract public function validate();", "title": "" }, { "docid": "c19cd76381e9123465006713ac775915", "score": "0.5936752", "text": "function Validar_atributos(){\n\t$this->Comprobar_empresa();\n\t$this->Comprobar_direccion();\n\t$this->Comprobar_localidad();\n\t$this->Comprobar_CIF();\n\t$this->Comprobar_CP();\n\t$this->Comprobar_email();\n\t$this->Comprobar_telefono();\n\t$this->Comprobar_movil();\n\t$this->Comprobar_pers_contacto();\n\tif($this->erroresdatos==[]){\n\t\treturn true;\n\t}else{\n\treturn $this->erroresdatos;\n\t}\n}", "title": "" }, { "docid": "74668eb7bf4c08c4a33f852feeeed55d", "score": "0.59311306", "text": "function validarCamposEditar()\n{\n $erros = [];\n //validar se campo descricao está preenchido\n if (!isset($_POST[\"descricao\"]) && $_POST[\"descricao\"] == \"\") {\n $erros[] = \"O campo descrição é obrigatório\";\n }\n //validar se o campo peso está preenchido\n if (!isset($_POST[\"peso\"]) && $_POST[\"peso\"] == \"\") {\n $erros[] = \"O campo peso é obrigatório\";\n //validar se o campo peso é um número\n } elseif (!is_numeric(str_replace(\",\", \".\", $_POST[\"peso\"]))) {\n $erros[] = \"O campo peso deve ser um número\";\n }\n //validar se o campo quantidade está preenchido\n if (!isset($_POST[\"quantidade\"]) && $_POST[\"quantidade\"] == \"\") {\n $erros[] = \"O campo quantidade é obrigatório\";\n //validar se o campo quantidade é um número\n } elseif (!is_numeric(str_replace(\",\", \".\", $_POST[\"quantidade\"]))) {\n $erros[] = \"O campo quantidade deve ser um número\";\n }\n if (!isset($_POST[\"cor\"]) && $_POST[\"cor\"] == \"\") {\n $erros[] = \"O campo cor é obrigatório\";\n }\n if (!isset($_POST[\"valor\"]) && $_POST[\"valor\"] == \"\") {\n $erros[] = \"O campo valor é obrigatório\";\n } elseif (!is_numeric(str_replace(\",\", \".\", $_POST[\"valor\"]))) {\n $erros[] = \"O campo valor deve ser um número\";\n }\n //se o campo desconto veio preenchido, testa se ele é numérico\n if (isset($_POST[\"desconto\"]) && $_POST[\"desconto\"] != \"\" && !is_numeric(str_replace(\",\", \".\", $_POST[\"desconto\"]))) {\n $erros[] = \"O campo desconto deve ser um número\";\n }\n //se houver um arquivo de foto\n if ($_FILES[\"foto\"][\"error\"] != UPLOAD_ERR_NO_FILE) {\n //se o arquivo é uma imagem\n $imagemInfos = getimagesize($_FILES[\"foto\"][\"tmp_name\"]);\n //se não for uma imagem\n if (!$imagemInfos) {\n $erros[] = \"O arquivo precisa ser uma imagem\";\n }\n //se a imagem for maior que 2MB\n if ($_FILES[\"foto\"][\"size\"] > 1024 * 1024 * 2) {\n $erros[] = \"O arquivo não pode ser maior que 2MB\";\n }\n //se a imagem não for quadrada [[[--DESAFIO--]]]\n //se a largura e a altura forem iguais, a imagem é quadrada\n $width = $imagemInfos[0];\n $height = $imagemInfos[1];\n if ($width != $height) {\n $erros[] = \"A imagem precisa ser quadrada\";\n }\n }\n\n return $erros;\n}", "title": "" }, { "docid": "fcbeb1beeac9dc6f7edf902dc31bafe9", "score": "0.59198755", "text": "private function validData(Request $request) {\n $data = $request->all();\n $rules = [\n 'name' => 'required',\n 'dni' => 'required',\n // 'sign' => 'required', // the sign is no required for now to pevent fails\n 'dateofbirth' => 'required|date',\n 'paymentData.rate' => 'required',\n 'paymentData.paymenttype' => 'required',\n 'paymentData.amount' => 'required',\n 'rightsProtect.RPaccept' => 'required',\n 'rightsImage.RIaccept' => 'required',\n ];\n if ($request->paymentData['paymenttype'] == 'Domiciliación') {\n $rules += ['paymentData.iban' => 'required'];\n $rules += ['paymentData.ibanownername' => 'required'];\n $rules += ['paymentData.ibanownerdni' => 'required'];\n }\n if ($request->dateofbirth != null && date_diff(date_create(date('Y-m-d')), date_create($request->dateofbirth))->y < 18) {\n /* If the customer is underage his dni is not required */\n unset($rules['dni']);\n /* If a tutor is added and it doesn't comes with _id (in this case we only store the _id as a reference of the customer selected), validate that we have the required fields */\n if (!isset($data['tutor']['_id'])) {\n $rules += [\n 'tutor.name' => 'required',\n 'tutor.address' => 'required',\n ];\n /* If the dni of the customer is empty the tutor's dni must be required */\n if ($request->dni == '' || $request->dni == null) {\n $rules += [ 'tutor.dni' => 'required' ];\n }\n }\n }\n /* Build the error message */\n $messages = [\n 'name.required' => 'El nombre es obligatorio',\n 'dni.required' => 'El dni es obligatorio',\n 'dateofbirth.required' => 'La fecha de nacimiento es obligatoria',\n // 'sign.required' => 'La firma del socio es obligatoria',\n 'tutor.name.required' => 'El nombre del tutor es obligatorio',\n 'tutor.dni.required' => 'El dni del tutor es obligatorio',\n 'tutor.address.required' => 'La dirección del tutor es obligatoria',\n 'paymentData.rate.required' => 'Tienes que escoger una tarifa',\n 'paymentData.paymenttype.required' => 'Tienes que escoger una forma de pago',\n 'paymentData.amount.required' => 'Tienes que indicar un importe para la cuota',\n 'paymentData.iban.required' => 'Tienes que añadir el iban para el pago domiciliado',\n 'paymentData.ibanownername.required' => 'El nombre del titular del iban son necesarios',\n 'paymentData.ibanownerdni.required' => 'El dni del titular del iban son necesarios',\n 'rightsProtect.RPaccept.required' => 'Indica si acepta el consentimiento expreso',\n 'rightsImage.RIaccept.required' => 'Indica si acepta la cesión de imagen',\n\n ];\n /* Validate the form */\n $v = Validator::make($data, $rules, $messages);\n /* Return the errors if exists */\n if ($v->fails()) {\n return response()->json([\n 'message' => 'Se han producido los siguientes errores:',\n 'status' => 'danger',\n 'title' => 'Error al validar los datos',\n 'trace' => 'Error al validar los datos del nuevo socio, no se han guardado. Código de error: BeCuCo@VaDa. Detalle del servidor: ' . $v->errors(),\n 'validationErrors' => $v->errors(),\n ], 422);\n }\n return true;\n }", "title": "" }, { "docid": "7d6e8f40f1f5d7d1e8ae6b2ecb4c7266", "score": "0.58800226", "text": "public function salvar(Request $req){\n\n $mensagens = [\n 'required'=>'Por favor preencha o campo :attribute',\n 'min' => \"Por favor coloque mais de 3 caracteres no campo :attribute\"\n ];\n $validator = $req->validate(\n ['titulo'=>'required|min:3',\n 'conteudo' =>'required|min:3',\n ]\n ,$mensagens);\n \n \n $novoEstudo = new \\App\\Estudo();\n $novoEstudo->dias_id = $req->input('dia_id');\n $novoEstudo->titulo = $req->input('titulo');\n $novoEstudo->conteudo = $req->input('conteudo');\n\n $novoEstudo->save();\n\n return back()->with(\"status\",\"Novo Estudo criado com sucesso\");\n \n }", "title": "" }, { "docid": "82fa767596bbb33db6bc2ec0cb14f8a8", "score": "0.58695537", "text": "protected function validDataFromRequest()\n {\n return array_merge([\n 'obj_type', 'obj_id'\n ], parent::validDataFromRequest());\n }", "title": "" }, { "docid": "1bbb0c68886cb4a0704cb0a2b7debb6c", "score": "0.58598477", "text": "abstract function validate();", "title": "" }, { "docid": "aeccac5766e61681207e917195c4eabc", "score": "0.5835691", "text": "function validarValorCampos($caller_id) {\n if ( $caller_id==\"\") {\n $this->NUM_ERROR++;\n return false;\n }\n if ( !is_numeric($caller_id)) { \n $this->NUM_ERROR++;\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "64cdbd3ffac960fd4b766bc392595581", "score": "0.5828169", "text": "private function validateInput()\n {\n $validInput = new \\Module\\administrative\\Models\\helper\\AdmsValidateInput();\n $validInput->validateInput($this->dados);\n if ($validInput->getResult()) {\n return $this->result = true;\n }\n return $this->result = false;\n }", "title": "" }, { "docid": "15df9f4cb7339194885fdecc50199e33", "score": "0.58216655", "text": "public function registro_validado(){\n //=== evalua que el valor a evaluar debe ser del mismo tipo y debe tener el mismo vslor\n if($this-> error_nombre ===\"\" && $this->error_email ===\"\" \n && $this-> error_clave1 === \"\" && $this-> error_clave2 === \"\"){\n //si el if se cumple se retorna verdadero\n return true;\n } else {\n //si no se cumple se devuelve falso\n return false;\n }\n }", "title": "" }, { "docid": "a8dcd50cb5c591e61c594be3d052c3a7", "score": "0.5813146", "text": "public function validateParameters() : void;", "title": "" }, { "docid": "63b8d6b61eeaa843d3f3841b4ab8c08a", "score": "0.58006704", "text": "public function validates();", "title": "" }, { "docid": "20853dd1f9acca3b40e803d2b7a15a5a", "score": "0.5798952", "text": "public function setValidationProperties()\n {\n $this->jenisLaporan = $this->validator[0] ?? null;\n\n $this->jenisPermohonan = $this->validator[0] ?? null;\n\n $this->tanggalLaporan = $this->validator[2] ?? null;\n\n $this->laporanHasValue = $this->validator[6] ?? null;\n }", "title": "" }, { "docid": "b9eb03dae0464ef80ef1342fa9ca15fc", "score": "0.57964176", "text": "public function validate();", "title": "" }, { "docid": "b9eb03dae0464ef80ef1342fa9ca15fc", "score": "0.57964176", "text": "public function validate();", "title": "" }, { "docid": "b9eb03dae0464ef80ef1342fa9ca15fc", "score": "0.57964176", "text": "public function validate();", "title": "" }, { "docid": "b9eb03dae0464ef80ef1342fa9ca15fc", "score": "0.57964176", "text": "public function validate();", "title": "" }, { "docid": "b9eb03dae0464ef80ef1342fa9ca15fc", "score": "0.57964176", "text": "public function validate();", "title": "" }, { "docid": "b9eb03dae0464ef80ef1342fa9ca15fc", "score": "0.57964176", "text": "public function validate();", "title": "" }, { "docid": "b9eb03dae0464ef80ef1342fa9ca15fc", "score": "0.57964176", "text": "public function validate();", "title": "" }, { "docid": "b9eb03dae0464ef80ef1342fa9ca15fc", "score": "0.57964176", "text": "public function validate();", "title": "" }, { "docid": "b9eb03dae0464ef80ef1342fa9ca15fc", "score": "0.57964176", "text": "public function validate();", "title": "" }, { "docid": "b9eb03dae0464ef80ef1342fa9ca15fc", "score": "0.57964176", "text": "public function validate();", "title": "" }, { "docid": "b9eb03dae0464ef80ef1342fa9ca15fc", "score": "0.57964176", "text": "public function validate();", "title": "" }, { "docid": "44a1362969956238b7fba8c01640391c", "score": "0.57742083", "text": "public function validate_fields()\n {\n }", "title": "" }, { "docid": "57127a4a672342042f5f8107ef54e853", "score": "0.57675874", "text": "public function AddAuteur(Request $request){\n $validator = Validator::make($request->all(), [\n 'nom' => 'required|regex:/^[a-z]{3,}$/i',\n 'prenom' => 'required|regex:/^[a-z]{3,}$/i',\n 'age' => 'required|regex:/^[0-9]{2}$/i',\n 'image' => 'required|min:5',\n 'ville' => 'required|regex:/^[a-z]{3,}$/i',\n 'courant_literaire' => 'required|regex:/^[a-z]{3,}$/i',\n 'date_naissance' => 'required|regex:/^[0-9]{2}\\/[0-9]{2}\\/[0-9]{4}$/i',\n 'date_mort' => 'required|regex:/^[0-9]{2}\\/[0-9]{2}\\/[0-9]{4}$/i',\n 'biographie' => 'required|min:10|max:550',\n 'sexe' => 'required|in:homme,femme',\n ]);\n\n if (!$validator->fails()){\n // créer un nouveau auteur en bdd\n $auteur = new Auteur();\n $dateBirth = \\DateTime::createFromFormat('d/m/Y', $request->date_naissance);\n $dateDead = \\DateTime::createFromFormat('d/m/Y', $request->date_mort);\n $auteur->prenom = $request->prenom;\n $auteur->nom = $request->nom;\n $auteur->age = $request->age;\n $auteur->image = $request->image;\n $auteur->sexe = $request->sexe;\n $auteur->ville = $request->ville;\n $auteur->courant_literaire = $request->courant_literaire;\n $auteur->date_naissance = $dateBirth->format('Y-m-d'); //parser YYYY-MM-DD\n $auteur->date_mort = $dateDead->format('Y-m-d'); //parser YYYY-MM-DD\n $auteur->biographie = $request->biographie;\n $auteur->save();\n }\n }", "title": "" }, { "docid": "11f22143af97dcc727304dc2b32bbfd6", "score": "0.5765367", "text": "function validarEntrega(){\r\n\t $id = JRequest::getVar('id');\r\n\t\t$entrega = $this->getEntrega($id);\r\n\t\t//echo \"valor =\" . $entrega->valor ;\r\n\t\r\n\t\t// Encontrar la suma de los valores de la entrega\r\n\t\t$suma = 0;\r\n\t\t$valores = JRequest::getVar('valor');\r\n\t\tforeach($valores as $valor){\r\n\t\t\tif( isset($valor) && $valor > 0 ){\r\n\t\t\t\t$suma = $suma + $valor;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//echo \"suma =\" . $suma;\r\n\t\t\r\n\t\tif( $entrega->valor == $suma ){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "d2150e2553063ab5c5fb6c5f892c49c7", "score": "0.57526976", "text": "public function validarDados() {\r\n $this->Dados = array_map('strip_tags', $this->Dados);\r\n //Remover os espaços em branco\r\n $this->Dados = array_map('trim', $this->Dados);\r\n\r\n if (in_array('', $this->Dados)) {\r\n $_SESSION['msg'] = \"<script>flatNotify().error('Preencha todos os campos',2500)</script>\";\r\n return $this->Resultado = false;\r\n } else {\r\n return $this->Resultado = true;\r\n }\r\n }", "title": "" }, { "docid": "432d3e111e413c277e162f071373d6b6", "score": "0.57514626", "text": "public function prepareForValidation()\n\t{\n\t\tif (!empty($this->input('user')))\n\t\t\t$this->merge(\n\t\t\t\tjson_decode($this->input('user'), true)\n\t\t\t);\n\t}", "title": "" }, { "docid": "168fb6253b638e032af30d08bb38627a", "score": "0.57376015", "text": "public function checkIntegrity() {\n\n $errors = [];\n\n if(empty($this->firstname) || preg_match('/[!@#$%^&*(){}\\[\\]:;<>\\.\\/\\+]+/', $this->firstname)) {\n $errors[] = [\n 'message' => 'Invalid firstname'\n ];\n }\n\n if(empty($this->lastname) || preg_match('/[!@#$%^&*(){}\\[\\]:;<>\\.\\/\\+]+/', $this->lastname)) {\n $errors[] = [\n 'message' => 'Invalid lastname'\n ];\n }\n\n if(empty($this->birthday) || !preg_match('/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/', $this->birthday)) {\n $errors[] = [\n 'message' => 'Invalid birthday'\n ];\n }\n\n if(empty($this->gender) || !in_array($this->gender, [1, 2, 3])) {\n $errors[] = [\n 'message' => 'Invalid gender'\n ];\n }\n\n if(!empty($errors)) {\n throw new DataValidationException($errors, 'Invalid entity');\n }\n\n }", "title": "" }, { "docid": "de8c2949a16127be36b3fa9cce7addbc", "score": "0.5731265", "text": "protected function validate_data() {\n parent::validate_data();\n\n if (!isset($this->other['todoid'])) {\n throw new \\coding_exception('The \\'todoid\\' value must be set in \\'other\\' of the event.');\n }\n\n if (!isset($this->other['stepid'])) {\n throw new \\coding_exception('The \\'stepid\\' value must be set in \\'other\\' of the event.');\n }\n\n if (!isset($this->other['workflowid'])) {\n throw new \\coding_exception('The \\'workflowid\\' value must be set in \\'other\\' of the event.');\n }\n\n if (!isset($this->other['completed'])) {\n throw new \\coding_exception('The \\'completed\\' value must be set in \\'other\\' of the event.');\n }\n\n if (!isset($this->other['stepname'])) {\n throw new \\coding_exception('The \\'stepname\\' value must be set in \\'other\\' of the event.');\n }\n\n if (!isset($this->other['todoname'])) {\n throw new \\coding_exception('The \\'todoname\\' value must be set in \\'other\\' of the event.');\n }\n\n if (!isset($this->other['workflowname'])) {\n throw new \\coding_exception('The \\'workflowname\\' value must be set in \\'other\\' of the event.');\n }\n }", "title": "" }, { "docid": "5901c528527deac4edb0ff31e3d0adb9", "score": "0.57183397", "text": "public function valid(){ }", "title": "" }, { "docid": "bcc17d27772f6a997da3b4cf11c4fcf2", "score": "0.5705139", "text": "function _validar($datos = null) {\n\n $datos = ife(is_array($datos), $datos, $this->datos);\n\n $tiposVal = array(\n 'fecha' => 'return val_Fecha($tval);',\n 'fechaHora' => 'return val_FechaHora($tval);',\n 'noVacio' => 'return val_noVacio($tval);',\n 'numerico' => 'return val_Numerico($tval);',\n 'alfanumerico' => 'return val_Alfanumerico($tval);',\n 'longitud' => 'return val_Longitud($tval, $adc);',\n 'email' => 'return val_Email($tval);',\n );\n\n $error = array();\n\n if (!empty($this->validacion)) {\n foreach($this->validacion as $campo => $formaValida) {\n\n $tval = $adc = '';\n\n if (is_array($formaValida['tipo'])) {\n\n // Verifica para cada tipo de dato\n foreach($formaValida['tipo'] as $tipo) {\n\n // Si es validacion tipo longitud\n if (stripos($tipo, 'longitud') !== false) {\n\n $adc = (int) substr($tipo, strpos($tipo, ':') + 1);\n $func = $tiposVal['longitud'];\n\n } else {\n $func = $tiposVal[$tipo];\n }\n\n $tval = isset($datos[$campo]) ? $datos[$campo] : false;\n\n if (!empty($func)) {\n\n $r = eval($func);\n\n if ($r) {\n // No hay problema\n } else {\n $error[$campo] = isset($formaValida['error']) ? $formaValida['error'] : 'Dato invalido';\n }\n }\n }\n\n } else {\n\n // Si es validacion tipo longitud\n if (stripos($formaValida['tipo'], 'longitud')) {\n\n $adc = (int) substr($formaValida['tipo'], strpos($formaValida['tipo'], ':') + 1);\n $func = $tiposVal['longitud'];\n\n } else {\n $func = $tiposVal[$formaValida['tipo']];\n }\n\n $tval = isset($datos[$campo]) ? $datos[$campo] : false;\n\n if (!empty($func)) {\n if (eval($func)) {\n // No hay problema\n } else {\n $error[$campo] = isset($formaValida['error']) ? $formaValida['error'] : 'Dato invalido';\n }\n }\n }\n }\n }\n\n $error = array_merge($error, $this->errores);\n\n $this->errores = $error;\n return ife(empty($error), true, $error);\n }", "title": "" }, { "docid": "b46e519de33f6b46a7df059a3f45acf3", "score": "0.5701885", "text": "protected function validate(){\n $this->errors = [];\n/* if(is_blank($this->item_nombre)){\n $this->errors[] = \"completar nombre del producto\";\n }\n if(has_symbols($this->talla)){\n $this->errors[] = \"Talla no permite simbolos\";\n }\n if(has_symbols_or_letter($this->precio_unit)){\n $this->errors[] = \"precio_unit no permite simbolos o letras\";\n }\n*/\n return $this->errors;\n }", "title": "" }, { "docid": "d5d77605578c17c7d953029781d5f755", "score": "0.56926614", "text": "public function Save()\n {\n $required = array(\n \"post\" => \"Publicação\",\n \"ip\" => \"IP\"\n );\n $this->validateData($required);\n parent::Save();\n }", "title": "" }, { "docid": "ba6ea0884f681f7a10015e2111d395aa", "score": "0.56892127", "text": "protected function validateMainProperties(){\n\t\tString::validateString($this->_mUserName, 'Usuario inv&aacute;lido.');\n\t\tString::validateString($this->_mFirstName, 'Nombre inv&aacute;lido.');\n\t\tString::validateString($this->_mLastName, 'Apellido inv&aacute;lido.');\n\t\tString::validateString($this->_mPassword, 'Contrase&ntilde;a inv&aacute;lida.');\n\t\t\n\t\tif(is_null($this->_mRole))\n\t\t\tthrow new Exception('Rol inv&accute;lido.');\n\t}", "title": "" }, { "docid": "46ab9d22ed47022e43d76db50477545c", "score": "0.5688369", "text": "private function validaOptometr()\n\t{\n\t\t/**Invocamos la variable Filas como global para poder trabajar con su resultado*/\n\t\t global $Filas;\n\t\t$sql=\"SELECT ConsAdmi\n\t\t\t FROM Optometr\n\t\t\t WHERE CodiInst='$this->CodiInst' AND ConsAdmi='$this->ConsAdmi'\";\n\t\tquery($sql,1);\n\t\tif($Filas==0)\n\t\t\t$this->Errores.=\"<li>Debe completar el examen de Optometria.</li>\";\n\t}", "title": "" }, { "docid": "f8fa4b56b2673232cd2a684356e9565b", "score": "0.5685504", "text": "abstract public function is_valid();", "title": "" }, { "docid": "e252c48d14d8cc20fcbb1074c6e10877", "score": "0.56815064", "text": "public function valid() {}", "title": "" }, { "docid": "2f35656226392c31c6f442f751e1af7d", "score": "0.5676068", "text": "protected function prepareForValidation() {\n\t\tif ( $this->has('inst_user_id') ) {\n\t\t\t$this->merge(['inst_user_id' => GeneralHelpers::decode($this->input('inst_user_id'))]);\n\t\t}\n\t}", "title": "" }, { "docid": "edc42ea7aa99eaeb378c441fa88615c9", "score": "0.56751335", "text": "protected function validate()\n {\n $mandatory = [\n 'pakketten',\n 'afzender',\n 'datumAanmaakBestand',\n 'tijdAanmaakBestand',\n 'aanleverdatumZendingen',\n 'klantCode',\n 'klantNr',\n 'voormeldingId',\n 'aanleverLocatie'\n ];\n\n foreach ($mandatory as $property) {\n if (empty($this->$property)) {\n throw new \\Exception(\n 'Verplichte property niet gevuld: ' . $property\n );\n }\n }\n }", "title": "" }, { "docid": "83a6841699a9152ebbff68e47e32f1e7", "score": "0.56647944", "text": "public function validateInput($input)\n {\n }", "title": "" }, { "docid": "ea1e8fb0c30d18727883204db8d607a2", "score": "0.56619275", "text": "public static function validate() {}", "title": "" }, { "docid": "9dd24cc0ab261f4f8a93191611045a23", "score": "0.5661499", "text": "public function valid () {}", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.5659741", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.5659741", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.5659741", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.5659741", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.5659741", "text": "public function valid();", "title": "" }, { "docid": "9f2a21b6cfbc67bbbfef8a03280a1a97", "score": "0.5653161", "text": "public function validateData()\r\n {\r\n// $this->_errors = new Digitalus_View_Error();\r\n\t\t$this->_errors = Digitalus_View_Error::getInstance();\r\n $validations = array('Required', 'Text', 'Integer', 'Number', 'Email', 'Password', 'Date', 'HTML', 'Unique');\r\n foreach ($validations as $v) {\r\n $validateFunction = '_validate' . $v;\r\n $this->$validateFunction();\r\n }\r\n }", "title": "" }, { "docid": "ee4baee266b90414b3105c71049d3fce", "score": "0.56466216", "text": "public function store(Request $request)\n {\n\n $tipo = $request->input('tipo');\n\n $valor = (float) $request->input('valor');\n\n if($tipo === 'S') {\n\n $valor = $valor * -1;\n\n $request->merge(['valor' => (string) $valor]);\n\n }\n\n // $valor = (float) $request->input('valor');\n\n // echo 'testando - ' . $tipo . ' [ ' . $valor . ' ] ';\n\n // var_dump($request->all()); die;\n\n $validatedData = $request->validate([\n 'idConta' => 'required|numeric',\n 'valor' => 'required|numeric',\n 'dataTransacao' => 'required|date',\n ]);\n $show = Transa::create($validatedData);\n return redirect('/transas')->with('success', 'Dados da Transação adicionado com sucesso!');\n }", "title": "" }, { "docid": "8a010b0a3de9d53521ac6c31ae0ccbfe", "score": "0.5645524", "text": "public function validateSave() {\n\t\t// 1. sprawdzenie, czy parametry zostały przekazane\n\t\tif (!(isset($this->form->id)&&\n\t\t isset($this->form->name)&&\n\t\t\t isset($this->form->surname)&&\n\t\t\t isset($this->form->birthdate)\n\t\t\t)){\n\t\t\tgetMessages()->addError('Błędne wywołanie aplikacji');\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// 2. sprawdzenie czy wartości wymagane nie są puste\n\t\tif (strlen($this->form->name) == 0) {\n\t\t\tgetMessages()->addError('Wprowadź imię');\n\t\t}\n\t\tif (strlen($this->form->surname) == 0) {\n\t\t\tgetMessages()->addError('Wprowadź nazwisko');\n\t\t}\n\t\tif (strlen($this->form->birthdate) == 0) {\n\t\t\tgetMessages()->addError('Wprowadź datę urodzenia');\n\t\t}\n\n\t\t// 3. sprawdzenie poprawności przekazanych parametrów\n\t\tif ( ! validateDate($this->form->birthdate,'Y-m-d') ){\n\t\t\tgetMessages()->addError('Zły format daty. Przykład: 2015-12-20');\n\t\t}\n\t\t\n\t\treturn ! getMessages()->isError();\n\t}", "title": "" }, { "docid": "c402b877566be2d723bd5962cb7073ee", "score": "0.5636442", "text": "public function validate () {}", "title": "" }, { "docid": "e564af213fb90a9a0af64a8d65d16a46", "score": "0.56352204", "text": "function validateData() {\n \n }", "title": "" }, { "docid": "6e05609752adc01ee759c7d48c59f0c9", "score": "0.5632919", "text": "public function validarCadastro(){\n\t\t$valido = true;\n\t\tif(strlen($this->__get('nome'))<3){\n\t\t\t$valido = false;\n\t\t}\n\t\tif(strlen($this->__get('login'))<3){\n\t\t\t$valido = false;\n\t\t}\n\t\tif(strlen($this->__get('senha'))<3){\n\t\t\t$valido = false;\n\t\t}\n\n\t\treturn $valido;\n\t}", "title": "" }, { "docid": "9aa7d6b8867eb0ec27544aa7cb0ed8ed", "score": "0.56309086", "text": "function comercioValidator($nombre_comercio, $descripcion_comercio){\n\n//mensajes de validacion:\n$m_empty_nombre_comercio=(\"El nombre del comercio no puede estar vacio\");\n$m_empty_descripcion_comercio=(\"La descripcion del comercio no puede estar vacio\");\n\nif(empty($nombre_comercio)){\n\treturn $m_empty_nombre_comercio;\n}else if(empty($descripcion_comercio)){\n\treturn $m_empty_descripcion_comercio;\n}\n}", "title": "" }, { "docid": "e3ecc8e53da9876ba92c68019c802fb6", "score": "0.5628632", "text": "public function testValidation()\n {\n $company = new Company();\n\n //Test null input\n $company->company_name = null;\n $company->company_email = null;\n $company->company_website = null;\n $company->company_description = null;\n $company->company_industry = null;\n $company->company_designation = null;\n $company->company_reg_no = null;\n $company->company_employees_count = null;\n $company->company_postal = null;\n $this->assertFalse($company->validate(['company_name']));\n $this->assertFalse($company->validate(['company_email']));\n $this->assertFalse($company->validate(['company_website']));\n $this->assertFalse($company->validate(['company_description']));\n $this->assertTrue($company->validate(['company_industry']));\n $this->assertFalse($company->validate(['company_designation']));\n $this->assertFalse($company->validate(['company_reg_no']));\n $this->assertFalse($company->validate(['company_employees_count']));\n $this->assertFalse($company->validate(['company_postal']));\n\n //Test invalid input\n $company->company_email = '199191';\n $this->assertFalse($company->validate(['company_email']));\n $company->company_email = 'adshja@';\n $this->assertFalse($company->validate(['company_email']));\n $company->company_email = 'dasj221.com';\n $this->assertFalse($company->validate(['company_email']));\n\n //Test valid input\n $company->company_name = \"name\";\n $company->company_email = \"[email protected]\";\n $company->company_website = \"webpuppies.com.sg\";\n $company->company_description = 'company description';\n $company->company_industry = '1';\n $company->company_designation = 'design';\n $company->company_reg_no = 'dshjks3128391';\n $company->company_postal = 123344;\n $company->company_employees_count = 10;\n $this->assertTrue($company->company_name == 'name');\n $this->assertTrue($company->company_email == '[email protected]');\n $this->assertTrue($company->company_website == 'webpuppies.com.sg');\n $this->assertTrue($company->company_description == 'company description');\n $this->assertTrue($company->company_industry == '1');\n $this->assertTrue($company->company_designation == 'design');\n $this->assertTrue($company->company_reg_no == 'dshjks3128391');\n $this->assertTrue($company->company_employees_count == 10);\n $this->assertTrue($company->company_postal == 123344);\n }", "title": "" }, { "docid": "5dee653a9aa9a44e523eeac8fed1015f", "score": "0.56255585", "text": "public function validarNuevo($input)\n {\n if (!Auth::check()) {\n self::$rules['recaptcha_response_field'] = 'required|recaptcha';\n self::$rules['reglamento'] = 'required|boolean';\n }\n\n //los mas jovenes\n $dt = new Carbon\\Carbon();\n $before = $dt->subYears(self::$edad_minima)->format('d/m/Y');\n self::$rules['fecha_nacimiento'] .= '|before:' . $before;\n\n //los mas viejos\n $dt = new Carbon\\Carbon();\n $after = $dt->subYears(self::$edad_maxima)->format('d/m/Y');\n self::$rules['fecha_nacimiento'] .= '|after:' . $after;\n \n //año de egreso del secundario: actual o hasta 80 años antes\n $actual = (int)date(\"Y\");\n $anterior = $actual - self::$anios_egreso_secundario; \n self::$rules['secundario_anio_egreso'] .= \"|between:$anterior,$actual\";\n\n $v = Validator::make($input, self::$rules, self::$mensajes);\n\n $v->sometimes([\n 'situacion_laboral_ocupacion',\n 'situacion_laboral_relacion_trabajo_carrera',\n 'situacion_laboral_categoria_ocupacional_id',\n 'situacion_laboral_detalle_labor',\n 'situacion_laboral_horas_semana',\n 'situacion_laboral_rama_id'], 'required', function($input) {\n return in_array($input->situacion_laboral, ['TRABAJA']);\n });\n\n $v->sometimes([\n 'padre_estudios_id',\n 'padre_categoria_ocupacional_id',\n 'padre_labor',\n 'padre_ocupacion'], 'required', function($input) {\n return $input->padre_vive == 'SI';\n });\n \n $v->sometimes('padre_estudios_id', 'required', function($input) {\n return $input->padre_vive == 'NO';\n });\n \n $v->sometimes([\n 'madre_estudios_id',\n 'madre_categoria_ocupacional_id',\n 'madre_labor',\n 'madre_ocupacion'], 'required', function($input) {\n return $input->madre_vive == 'SI';\n });\n \n $v->sometimes('madre_estudios_id', 'required', function($input) {\n return $input->madre_vive == 'NO';\n });\n \n //------------------------------------\n $v->sometimes('localidad_otra', 'required', function($input){\n return $input->localidad_id == Localidad::ID_OTRA;\n });\n $v->sometimes('localidad_pcia_otra', 'required', function($input){\n return $input->localidad_pcia_id == Provincia::ID_OTRA;\n });\n $v->sometimes('localidad_pais_otro', 'required', function($input){\n return $input->localidad_pais_id == Pais::ID_OTRO;\n });\n //------------------------------------\n $v->sometimes('domicilio_procedencia_localidad_otra', 'required', function($input){\n return $input->domicilio_procedencia_localidad_id == Localidad::ID_OTRA;\n });\n $v->sometimes('domicilio_procedencia_pcia_otra', 'required', function($input){\n return $input->domicilio_procedencia_pcia_id == Provincia::ID_OTRA;\n });\n $v->sometimes('domicilio_procedencia_pais_otro', 'required', function($input){\n return $input->domicilio_procedencia_pais_id == Pais::ID_OTRO;\n });\n //------------------------------------\n $v->sometimes('domicilio_clases_localidad_otra', 'required', function($input){\n return $input->domicilio_clases_localidad_id == Localidad::ID_OTRA;\n });\n $v->sometimes('domicilio_clases_pcia_otra', 'required', function($input){\n return $input->domicilio_clases_pcia_id == Provincia::ID_OTRA;\n });\n $v->sometimes('domicilio_clases_pais_otro', 'required', function($input){\n return $input->domicilio_clases_pais_id == Pais::ID_OTRO;\n });\n //------------------------------------\n $v->sometimes('secundario_localidad_otra', 'required', function($input){\n return $input->secundario_localidad_id == Localidad::ID_OTRA;\n });\n $v->sometimes('secundario_pcia_otra', 'required', function($input){\n return $input->secundario_pcia_id == Provincia::ID_OTRA;\n });\n $v->sometimes('secundario_pais_otro', 'required', function($input){\n return $input->secundario_pais_id == Pais::ID_OTRO;\n });\n \n return $v;\n }", "title": "" }, { "docid": "7272d0607acc400863f61d7acb5b96d2", "score": "0.5614323", "text": "public function actionCreate()\n{\n $a=new Nomina;\n $b=new Asignaciones;\n $c=new Deducciones;\n \n if(isset($_POST['Nomina'],$_POST['Asignaciones'],$_POST['Deducciones']))\n {\n // populate input data to $a and $b\n $a->attributes=$_POST['Nomina'];\n $b->attributes=$_POST['Asignaciones'];\n $c->attributes=$_POST['Deducciones'];\n \n\n\n // validate BOTH $a and $b\n $valid=$a->validate();\n $valid=$b->validate() && $valid;\n $valid=$c->validate() && $valid;\n \n if($valid)\n {\n \n $a->total_asig = $a->b_alimenticio($b->b_alimenticio,$a->id_empleado) +\n $a->asistencia($b->asistencia,$a->id_empleado) + \n $a->hdiurnas($b->horasextra_diurna,$a->id_empleado) + \n $a->hnocturnas($b->horasextras_nocturna,$a->id_empleado) + \n $a->sabado($b->sabado,$a->id_empleado) + \n $a->feriado($b->feriado,$a->id_empleado) + \n $a->prestamos + \n $a->vaciado +\n $a->otros;\n\n $a->total_deduc = $a->sso($c->sso,$a->id_empleado) +\n $a->spf($c->spf,$a->id_empleado) +\n $a->lph($c->lph,$a->id_empleado) +\n $a->inasistencia($c->inasistencia,$a->id_empleado) +\n $a->descuento;\n\n $empleado = Empleados::model()->findByAttributes(array('id'=>$a->id_empleado));\n\t $cargo = Cargos::model()->findByAttributes(array('id'=>$empleado->id_cargo));\n \n if ($cargo->tipo_sueldo == 1){\n\t\t\t$a->neto = $cargo->sueldo + $a->total_asig - $a->total_deduc;\n\t\t}else{\n\t\t\t$a->neto =( $cargo->sueldo /2 )+ $a->total_asig - $a->total_deduc;\n\t\t}\n\n \n\n // use false parameter to disable validation\n\t $b->save(false);\n\t $c->save(false);\n\t $a->id_asignacion = $b->id;\n\t $a->id_deduccion = $c->id;\n\n \t$a->save(false);\n\n \tdate_default_timezone_set('America/Caracas');\n\t\t\t\t$auditoria = new Auditoria;\n\t\t\t\t$auditoria->id_user=Yii::app()->user->getId();\n\t\t\t\t$auditoria->accion=2;\n\t\t\t\t$auditoria->modelo=$this->modelo;\n\t\t\t\t$auditoria->id_registro=$a->id;\n\t\t\t\t$auditoria->fecha=date(\"Y-m-d h:i:s\"); \n\t\t\t\t$auditoria->save(false);\n \t\n \n $this->redirect(array('admin'));\n }\n }\n \n $this->render('create', array(\n 'a'=>$a,\n 'b'=>$b,\n 'c'=>$c,\n\n ));\n}", "title": "" }, { "docid": "c4833198ecae945be486b464925b1812", "score": "0.5611474", "text": "public function validate()\n\t{\n\t\tparent::validate();\n\n\t\tif (!isset($_POST[$this->strName]))\n\t\t{\n\t\t\t$this->varValue = '';\n\t\t}\n\t}", "title": "" }, { "docid": "e091a41d671b26eeb322f17203aa9443", "score": "0.5609686", "text": "function __construct()\n {\n parent::__construct();\n // l'array è istanziato con indici i campi delle varie form, i cui valori sono di default a false (no errori)\n $this->check = array(\n 'name' => true,\n 'genre' => true,\n 'author' => true,\n );\n }", "title": "" }, { "docid": "499e1fea18f08a14195d12b6e32dfaba", "score": "0.56085294", "text": "private function _checkParams () {\n if (!$this->name) {\n print '<p class=\"error\">ERROR: the <em>name</em> attribute is ' .\n '<strong>required</strong> for all select elements.</p>';\n }\n if (count($this->options) < 1 || !is_array($this->options)) {\n print '<p class=\"error\">ERROR: <em>options</em> (array) is ' .\n '<strong>required</strong> for all select elements.</p>';\n }\n\n // Set id and label if not set during instantiation\n if (!$this->id) {\n $this->id = $this->name;\n }\n if (!$this->label) {\n $this->label = ucfirst($this->name);\n }\n }", "title": "" }, { "docid": "0d0f92952d9f0e9d1b1d6e8771fce428", "score": "0.5604335", "text": "private function validateInput() {\n\n /**\n * Validate and Sanitize Input\n */\n try {\n\n // First name\n // Validates against the maximum length set in the database. Validates against the minimum length\n // for most names. Validates using a regular expression to ensure that there are no special characters.\n // Does allow for a single space in the middle of the name.\n Assert::minLength($this->formData[\"firstName\"], 2, \"Must complete the first name field.\");\n Assert::maxLength($this->formData[\"firstName\"], 36, \"First name field is too long.\");\n Assert::regex($this->formData[\"firstName\"], \"/^([\\w\\d]+)( )?([\\w\\d]+)?$/\", \"First name includes invalid characters.\");\n\n\n // Last name\n // Validates against the maximum length set in the database. Validates against the minimum length\n // for most names. Validates using a regular expression to ensure that there are no special characters.\n // Does allow for a single space in the middle of the name.\n Assert::minLength($this->formData[\"lastName\"], 2, \"Must complete the last name field.\");\n Assert::maxLength($this->formData[\"lastName\"], 36, \"First last field is too long.\");\n Assert::regex($this->formData[\"lastName\"], \"/^([\\w\\d]+)( )?([\\w\\d]+)?$/\", \"Last name includes invalid characters.\");\n\n\n // Job title\n // Validates the job title against the maximum length set in the database.\n Assert::maxLength($this->formData[\"jobTitle\"], 256, \"The ob title field is too long.\");\n\n\n // Email address\n // Validates against a regular expression that checks for the presence of basic email elements such as\n // the domain name and TLD.\n Assert::regex($this->formData[\"emailAddress\"], \"/^(([\\w\\d_.-]+)(@)([\\w\\d_.-]+)([.])(com|net|org|edu))$/\", \"Provided email address is invalid.\");\n\n\n // Phone number\n // Validates against a regular expression designed to interpret normal phone numbers.\n Assert::regex($this->formData[\"phoneNumber\"], \"/^(([+]?[\\d]{1,2}[\\s-]?)([(]?[\\d]{3}[)]?)|([(]?[\\d]{3}[)]?))?[\\s-]?(\\d{3})[\\s-]?(\\d{4})$/m\", \"Provided phone number is invalid.\");\n\n\n // Message\n // Removes any HTML characters from the message. Validates the message length against the maximum\n // length set in the database.\n $this->formData[\"message\"] = htmlspecialchars($this->formData[\"message\"]);\n Assert::maxLength($this->formData[\"message\"], 65565, \"The message is too long.\");\n\n } catch(\\InvalidArgumentException $exception) {\n\n // Make the error message available as part of the object so that it can be used.\n $this->validationError = $exception->getMessage();\n\n return false;\n }\n\n return true;\n\n }", "title": "" }, { "docid": "84eaab32c98be0294db342f222676e35", "score": "0.5597292", "text": "function validate_input($request)\n\t{\n\t\t$request = json_decode($request);\n\n\t\t// Request must be successfully decoded.\n\t\tif ($request === NULL)\n\t\t\treturn NULL;\n\t\t// Request must contain certain entities.\n\t\tif (!(array_key_exists(\"format\", $request)\n\t\t\t&& array_key_exists(\"version\", $request)\n\t\t\t&& array_key_exists(\"build\", $request)\n\t\t\t&& array_key_exists(\"files\", $request)\n\t\t\t&& is_object($request->build)\n\t\t\t&& array_key_exists(\"libraries\", $request)\n\t\t\t&& array_key_exists(\"mcu\", $request->build)\n\t\t\t&& array_key_exists(\"f_cpu\", $request->build)\n\t\t\t&& array_key_exists(\"core\", $request->build)\n\t\t\t&& array_key_exists(\"variant\", $request->build)\n\t\t\t&& is_array($request->files))\n\t\t)\n\t\t\treturn NULL;\n\n\t\t// Leonardo-specific flags.\n\t\tif ($request->build->variant == \"leonardo\")\n\t\t\tif (!(array_key_exists(\"vid\", $request->build)\n\t\t\t\t&& array_key_exists(\"pid\", $request->build))\n\t\t\t)\n\t\t\t\treturn NULL;\n\n\t\t// Values used as command-line arguments may not contain any special\n\t\t// characters. This is a serious security risk.\n\t\tforeach (array(\"version\", \"mcu\", \"f_cpu\", \"core\", \"variant\", \"vid\", \"pid\") as $i)\n\t\t\tif (isset($request->build->$i) && escapeshellcmd($request->build->$i) != $request->build->$i)\n\t\t\t\treturn NULL;\n\n\t\t// Request is valid.\n\t\treturn $request;\n\t}", "title": "" }, { "docid": "a983fab34a4292ebdc531cc73fe520a9", "score": "0.5591965", "text": "public function initialize()\n\t{\n// \t $this->validates_length_of(\"nombre\", \"maximum: 40\", \"too_long: El nombre debe tener maximo 40 caracteres\");\n//\t\t$this->validates_length_of(\"nombre\", \"in: 15:40\",\n//\t\t \"too_short: El nombre debe tener al menos 15 caracteres\",\n//\t\t \"too_long: El nombre debe tener maximo 40 caracteres\"\n//\t\t );\n $this->validates_presence_of(\"texto\", array(\"message\"=>\"Debe Ingresar el Texto/Títúlo\"));\n $this->validates_presence_of(\"icono\", array(\"message\"=>\"Debe Ingresar el ícono\"));\n $this->validates_presence_of(\"color\", array(\"message\"=>\"Debe Ingresar el color\"));\n\t}", "title": "" }, { "docid": "de072b3ea27fcfafad283735662ff2da", "score": "0.55915153", "text": "protected function validate_data() {\n parent::validate_data();\n\n if (!isset($this->other['stepid'])) {\n throw new \\coding_exception('The \\'stepid\\' value must be set in \\'other\\' of the event.');\n }\n\n if (!isset($this->other['stepstateid'])) {\n throw new \\coding_exception('The \\'stepstateid\\' value must be set in \\'other\\' of the event.');\n }\n\n if (!isset($this->other['workflowid'])) {\n throw new \\coding_exception('The \\'workflowid\\' value must be set in \\'other\\' of the event.');\n }\n\n if (!isset($this->other['timestamp'])) {\n throw new \\coding_exception('The \\'timestamp\\' value must be set in \\'other\\' of the event.');\n }\n\n if (!isset($this->other['stepname'])) {\n throw new \\coding_exception('The \\'stepname\\' value must be set in \\'other\\' of the event.');\n }\n\n if (!isset($this->other['workflowname'])) {\n throw new \\coding_exception('The \\'workflowname\\' value must be set in \\'other\\' of the event.');\n }\n }", "title": "" }, { "docid": "078a9865a41b4a70193726701b706c26", "score": "0.55909413", "text": "protected function prepareForValidation()\n {\n $doctorId = $this->request->get('doctor_id');\n $doctorDepartmentId = Doctor::whereId($doctorId)->first();\n $this->request->add(['department_id' => $doctorDepartmentId->doctor_department_id]);\n if (getLoggedInUser()->hasRole('Patient')) {\n $this->request->add(['patient_id' => getLoggedInUser()->owner_id]);\n }\n }", "title": "" }, { "docid": "93ec2bbf786b409743dfe61fcf5ec88f", "score": "0.5590199", "text": "public function validaInput(){\n $errore=\"\";\n if(! $this->validaUsername()){\n $errore = $errore.\"Username già presente.\\n\";\n }\n if(! $this->validaPassword()){\n $errore = $errore.\"Le password non coincidono.\\n\";\n }\n if(! $this->validaMail()){\n $errore = $errore.\"La mail non è conforme.\\n\";\n }\n if(! $this->validaNome()){\n $errore = $errore.\"Il nome non è valido.\\n\";\n }\n if(! $this->validaCognome()){\n $errore = $errore.\"Il cognome non è valido.\\n\";\n }\n return $errore;\n }", "title": "" }, { "docid": "097943b6ec2c6a4eb81ec900be446ff9", "score": "0.55877507", "text": "public function store(FuncionarioRequest $request)\n {\n// if($request->input('ihcoordenadas') != null){\n// $caracteres = array('(', ')', ' ');\n// $varCoordenadas = str_replace($caracteres,'',$request->input('ihcoordenadas'));\n// dd($varCoordenadas);\n// }else{\n// dd($request);\n// }\n\n $funcionario = new Funcionario();\n $funcionario->nome = $request->input('nome');\n $funcionario->telefone = $request->input('telefone');\n $myDateTime = \\DateTime::createFromFormat('Y-m-d', $request->data_nascimento);\n $newDateString = $myDateTime->format('d/m/Y');\n $funcionario->data_nascimento = $newDateString;\n $funcionario->logradouro = $request->input('logradouro');\n $funcionario->bairro = $request->input('bairro');\n if($request->numero === null){\n $funcionario->numero = 0;\n }else{\n $funcionario->numero = (int)$request->numero;\n }\n if($request->quadra === null){\n $funcionario->quadra = 0;\n }else{\n $funcionario->quadra = (int)$request->quadra;\n }\n if($request->lote === null){\n $funcionario->lote = 0;\n }else{\n $funcionario->lote = (int)$request->lote;\n }\n $var = true;\n $text = '';\n if((int)$request->numero === 0 &&\n (int)$request->quadra === 0 &&\n (int)$request->lote === 0){\n $var = false;\n $text = \"Favor informar número e/ou quadra e lote!\";\n }\n if($funcionario->numero === 0 &&\n $funcionario->quadra === 0 &&\n $funcionario->lote === 0){\n $var = false;\n $text = \"Favor informar número e/ou quadra e lote!\";\n }\n if($funcionario->quadra !== 0 && $funcionario->lote === 0){\n $var = false;\n $text = \"Favor informar o lote!\";\n }\n if($funcionario->quadra === 0 && $funcionario->lote !== 0){\n $var = false;\n $text = \"Favor informar a quadra!\";\n }\n if($var) {\n $caracteres = array('(', ')', ' ');\n $varCoordenadas = str_replace($caracteres, '', $request->input('ihcoordenadas'));\n $funcionario->coordenadas = $varCoordenadas;\n\n $funcionario->save();\n\n if ($request->input('email') != null) {\n $count = Usuario::where('email', $request->input('email'))->count();\n if ($count < 1) {\n\n $usuario = new Usuario();\n $usuario->email = $request->input('email');\n// $usuario->senha = bcrypt($request->input('senha'));\n $usuario->tipo = $request->input('tipo');\n if($usuario->tipo === 'Entregador'){\n $usuario->senha = $request->input('senha');\n }else{\n $encrypted = Crypt::encryptString($request->input('senha'));\n $usuario->senha = $encrypted;\n }\n\n $usuario->funcionario()->associate($funcionario);\n\n $usuario->save();\n\n Session::flash('mensagem', 'Funcionário cadastrado com sucesso!');\n } else {\n Session::flash('mensagemErro', 'Email já cadastrado!');\n }\n }\n }else{\n Session::flash('mensagemErro', $text);\n }\n\n return redirect('/funcionario/create');\n\n }", "title": "" }, { "docid": "ae16333d6b73afe3162b9c4e157cd71c", "score": "0.55867064", "text": "private function __ValidarObjetivosViaje($form){\n\t\tif(!isset($_POST['objetivosViaje']) || trim($_POST['objetivosViaje']) == ''){\n\t\t\t$GLOBALS['SafiErrors']['general'][] = 'Debe indicar los objetivos del viaje.';\n\t\t} else {\n\t\t\t$form->SetObjetivosViaje($_POST['objetivosViaje']);\n\t\t}\n\t}", "title": "" }, { "docid": "fc1d71d02a1a80993f1b809f0bef8df0", "score": "0.5580177", "text": "public function validate()\n {\n // Expense\n if ($this->expense == '') {\n $this->errors[] = 'Podaj wydatek!';\n }\n\t\tif ($this->expense==0)\n\t\t{\n\t\t\t$this->errors[]=\"Wydatek musi być różny od 0!\";\n\t\t}\n\t\tif ($this->expense>0)\n\t\t{\n\t\t\t$this->expense = -$this->expense;\n\t\t}\n }", "title": "" }, { "docid": "4565ac0284437a681604185109df1101", "score": "0.5579072", "text": "public function validacaoCampos($params)\n {\n if (count($params->veiculos) == 0) {\n throw new \\Exception('Veiculo não informado!', 99);\n }\n\n foreach ($params->veiculos as $veiculo) {\n if (empty($veiculo->marca)) {\n throw new \\Exception('Marca não informada!', 99);\n }\n\n if (empty($veiculo->modelo)) {\n throw new \\Exception('Modelo não informado!', 99);\n }\n\n if (empty($veiculo->placa)) {\n throw new \\Exception('Placa não informada!', 99);\n }\n }\n }", "title": "" }, { "docid": "3fd1bf3ef953c84c2168310e53d8e638", "score": "0.55789113", "text": "public function store(Request $request)\n {\n $codigo = $request->input('codigo');\n $km_actual = intval($request->input('km_actual'));\n $estado = $request->input('estado') == '1'? true: false;\n $chapa = strtoupper($request->input('chapa'));\n\n $nuevoCoche = new \\App\\Coche();\n $nuevoCoche->codigo = $codigo;\n $nuevoCoche->km_actual = $km_actual;\n $nuevoCoche->activo = $estado;\n $nuevoCoche->chapa = $chapa;\n\t\t\n\t\t//Validacion\n\t\t$request->validate([\n //required, unique, alfa numerico, min=1, max=10 \n 'codigo' => 'required|unique:\\App\\Coche,codigo|alpha_num|min:1|max:10',\n //required, number, min=0\n 'km_actual' => 'required|numeric|min:0',\n //required, boolean\n 'estado' => 'required|boolean',\n //required, alfa numerico, min=1, max=12\n 'chapa' => 'required|alpha_num|min:1|max:12'\n ],\n [\n //codigo\n 'codigo.required' => 'El Código es requerido. Debe ingresar algún valor',\n 'codigo.unique' => 'El Código ingresado ya existe en la Base de Datos. Intente con otro Código',\n 'codigo.alpha_num' => 'El Código ingresado es inválido. Debe ingresar solo números y/o letras',\n 'codigo.min' => 'El Código es muy corto. Debe ser como minimo 1 caracter',\n 'codigo.max' => 'El Código es muy largo. No debe exceder 10 caracteres',\n //kilometraje\n 'km_actual.required' => 'El Kilometraje es requerido. Debe ingresar algún valor',\n 'km_actual.numeric' => 'El Kilometraje ingresado es inválido. Debe ingresar un valor numérico',\n 'km_actual.min' => 'El valor de Kilometraje es inválido. Debe ingresar un valor mayor o igual a 0 (cero)',\n //Estado\n 'estado.required' => 'El Estado es requerido. Debe ingresar algún valor',\n 'estado.boolean' => 'El Estado es inválido. Debe ingresar 1 (Activo) o 0 (Inactivo)',\n //Chapa\n 'chapa.required' => 'El número de Chapa es requerido. Debe ingresar algún valor ',\n 'chapa.alpha_num' => 'El número de Chapa es inválido. Debe ingresar solo números y/o letras ',\n 'chapa.min' => 'El número de Chapa es muy corto. Debe ser como mínimo 1 caracter',\n 'chapa.max' => 'El número de Chapa es muy largo. No debe exceder 12 caracteres',\n ]);\n\n\t\t//Alertas\n\t\ttry {\n \t$nuevoCoche->save();\n\t\t\tsession()->flash('exito', 'El registro fue guardado con éxito');\n \t\n \treturn redirect()->route('listado-ug0278');\n\t\t}catch (QueryException $e){\n\t\t\treturn redirect()->route('crear-ug0278')->withInput()->with('error', $e->errorInfo[2]);\n\t\t}\n }", "title": "" }, { "docid": "71d54b6455a5de350277ee3ee2c527bb", "score": "0.5577188", "text": "protected function validate()\n {\n foreach ($this->rules as $field => $rules){\n foreach (explode('|', $rules) as $rule)\n {\n switch (explode(':',$rule)[0])\n {\n case \"required\":\n if ( ! isset($this->data[$field]))\n {\n throw new Exception(\"FIELD \" . $field . \" MISSING\", 400);\n }\n break;\n case \"date\":\n if (isset($this->data[$field]) and DateTime::createFromFormat('Y-m-d', $this->data[$field]) == false)\n {\n throw new Exception(\"FIELD \" . $field . \" NOT IN Y-m-d FORMAT\", 400);\n }\n break;\n case \"in\":\n if (isset($this->data[$field])){\n $acceptables = explode(',', explode(':', $rule)[1]);\n if ( ! in_array($this->data[$field], $acceptables))\n {\n throw new Exception(\n \"FIELD \" . $field . \" CAN BE ONLY ONE OF (\" . implode(\", \", $acceptables) . \")\",\n 400\n );\n }\n }\n break;\n }\n }\n if (isset($this->data[$field]) and $this->data[$field] != \"\")\n {\n $this->fields[$field] = $this->data[$field];\n }\n }\n }", "title": "" }, { "docid": "99874f215f6b5d0037e3468a628a4c7b", "score": "0.55640006", "text": "function offer_validation($Artist_ID, $Agent_ID, $Venue_ID, $Promoter_ID, $offerDate, $offerStatus, $offerGuarantee, $offerBonus, $offerHotel, $offerTechnical, $offerMediaSupport, $offerSellableCap, $offerAgeLimit, $offerEventType, $offerGATicket1 , $offerGATIcket2, $offerLoadIn , $offerDoors , $offerSetTime , $offerSetLength , $offerCurfew) {\n ### Checking if key variables are empty ###\n if (!isset($Artist_ID)){\n $errors[] = 'Artist_ID is not set';\n return False;\n } elseif (!isset($Agent_ID)) {\n $errors[] = 'Agent_ID is not set';\n return False;\n } elseif (!isset($Venue_ID)) {\n $errors[] = 'Venue ID is not set';\n return False;\n } elseif (!isset($Promoter_ID)) {\n $errors[] = 'Promoter_ID is not set';\n return False;\n } elseif (!isset($offerDate)) {\n $errors[] = 'The offer date is not set';\n return False;\n } elseif (!isset($offerStatus)) {\n $errors[] = 'Agent_ID is not set';\n return False;\n }\n \n ### Validating field data types ###\n \n if (!is_integer($Artist_ID)){\n $errors[] = \"Artist_ID variable is not an integer\";\n return False;\n } elseif (!is_integer($Agent_ID)){\n $errors[] = \"Agent_ID variable is not an integer\";\n return False;\n } elseif (!is_integer($Venue_ID)){\n $errors[] = \"Venue_ID variable is not an integer\";\n return False;\n } elseif (!is_integer($Promoter_ID)){\n $errors[] = \"Promoter_ID variable is not an integer\";\n return False;\n } elseif (!is_($Agent_ID)){\n $errors[] = \"Agent_ID variable is not an integer\";\n return False;\n }\n}", "title": "" }, { "docid": "f22aef0321044e1ab1ad81a9da721e71", "score": "0.5560202", "text": "public function store(ValidarFormularioRequest $request, tb_persons $persons, tb_users $users)\n {\n //dd($request->all());\n $max_user = tb_persons::max('code_pers');\n \n $num = ltrim(substr($max_user, 3));\n\n if ($num >= 1 and $num <= 8) {\n $num++;\n $cod_user = 'USR000' . $num;\n } else if ($num >= 9 and $num <= 98) {\n $num++;\n $cod_user = 'USR00' . $num;\n } else if ($num >= 99 and $num <= 998) {\n $num++;\n $cod_user = 'USR0' . $num;\n } else if ($num >= 999 and $num <= 9998) {\n $num++;\n $cod_user = 'USR' . $num;\n } else {\n $cod_user = 'USR0001';\n }\n\n //Persona\n /*$persons->code_pers = $cod_user;\n $persons->name_pers = $request->name_pers;\n $persons->patname_pers = $request->patname_pers;\n $persons->matname_pers = $request->matname_pers;\n $persons->id_pers = $request->id_pers;\n $persons->phone_pers = $request->phone_pers;*/\n\n $persons->code_pers = $cod_user;\n $persons->name_pers = $request->name_pers;\n $persons->patname_pers = $request->patname_pers;\n $persons->matname_pers = $request->matname_pers;\n $persons->birthdate = $request->birthdate;\n $persons->gender_id = $request->gender_id;\n $persons->address_persons = $request->address_persons;\n $persons->dni_pers = $request->dni_pers;\n $persons->email = $request->email;\n $persons->phone_pers = $request->phone_pers;\n \n\n try{\n if ($request->phoneTwo_pers != null)\n {\n $persons->phoneTwo_pers = $request->phoneTwo_pers;\n } \n }catch(\\Exception $e){\n $persons->phoneTwo_pers = 0;\n }\n \n \n //Contraseña\n $users->code_user = $cod_user;\n $users->username_user = $request->dni_pers;\n $auto_password = substr($persons->patname_pers,0,3).substr($request->dni_pers,0,5);\n $users->password_user = bcrypt($auto_password);\n $users->type_id = 5;\n \n //User\n /* $users->password_user = $request->password_user; */\n //Método incompleto, falta el usuario autogenerado y password\n /*$users->code_user = $cod_user;\n $users->username_user = $request->username_user;\n $users->password_user = $request->dni_pers;\n $users->type_id = 4;\n */\n // Probar:\n //dd($users->all());\n \n // Probar:\n //dd($persons);\n \n // ENVIO DE CORREO\n //dd($auto_password. \" - \".$request->email );\n $this->enviarCorreo($auto_password, $request->email);\n \n if ($users->save() and $persons->save()) {\n return response()->json($persons, 200);\n }\n }", "title": "" }, { "docid": "57182113d6507d05b0715f015bb96646", "score": "0.5558461", "text": "public function validate() {\n\n\t}", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "a61eb06effb3c98042d3d2ee828122fa", "score": "0.0", "text": "public function update(Request $request, Hotel $hotel)\n {\n //\n }", "title": "" } ]
[ { "docid": "ae90a700efd6cf3cd7c51c1c4442503a", "score": "0.7658553", "text": "public function update(ResourceInterface $resource);", "title": "" }, { "docid": "d6a508508d13bb02f2a247e9bf196f78", "score": "0.71877676", "text": "function update ( $id, $resource ) {\r\n\r\n }", "title": "" }, { "docid": "8466495927f3bd478b5fd2d917f45f08", "score": "0.7099208", "text": "public function update(Request $request, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "b66d45ed275220a344f3f222ce4980b5", "score": "0.70558053", "text": "public function update(Request $request, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "9a55d4f96f94897978c13d34337c1901", "score": "0.6808637", "text": "public function update(StoreResource $request, $id)\n {\n $input = $request->all();\n \n $resource = Resource::find($id);\n \n $resource->fill($input);\n \n $resource->save();\n\n // redirect\n Session::flash('message', 'Successfully saved resource!');\n return redirect('resources');\n }", "title": "" }, { "docid": "cce47cfb911f4e7678d10bb61eec6271", "score": "0.6523108", "text": "public function update(Request $request, Resource $resource)\n {\n $this->validate($request, [\n 'name' => 'required|max:255',\n ]);\n \n $resource->update($request->except(['_method', '_token']));\n \n flash('El recurso fue actualizado');\n \n return redirect()->route('resource.index');\n }", "title": "" }, { "docid": "1414dc19f0f4ccb3b9d9b0c2f9754c1a", "score": "0.64248925", "text": "public function update(Request $request, Storage $storage)\n {\n //\n $storage->update($request->all());\n\n return redirect()->route('storage.index');\n }", "title": "" }, { "docid": "8b641f5e241101e64f479c764289bfd7", "score": "0.64144814", "text": "public function update(Request $request, Resource $resource)\n {\n\n try {\n $this->validate($request, [\n 'name' => 'required|string|unique:resources,name,' . $resource->id,\n 'group' => 'required|exists:groups,id',\n \"description\" => \"nullable|string\"\n ]);\n $resource->name = $request->name;\n $resource->group_id = $request->group;\n $resource->description = $request->description;\n $resource->save();\n session()->flash('flash_success', 'Updated Successfully.');\n return Redirect::route('resources.index');\n } catch (ValidationException $exception) {\n return Redirect::back()->withErrors($exception->errors())->withInput();\n } catch (Exception $e) {\n session()->flash('flash_error', 'Something went wrong');\n return $e->getMessage();\n return Redirect::back();\n }\n }", "title": "" }, { "docid": "d131fb800138c5d8889803afda8ecf7b", "score": "0.62923384", "text": "public function updateResource(){\n\t\t$this->setTitle('Update resource');\n $this->name = $_POST['name'];\n $this->id = $_POST['resource_id'];\n $this->rate = $_POST['rate'];\n $this->description = $_POST['description'];\n $this->type = $_POST['type'];\n $this->loadModel('resource');\n\t\t$this->added_resource = $this->model->updateResources($this->id,$this->name,$this->rate,$this->description,$this->type);\n $this->render('resource/_bewerkt.tpl');\n\t}", "title": "" }, { "docid": "6644414d1c8deb86d17216b9f77e38da", "score": "0.62589455", "text": "public function updateStream($path, $resource, $config = null);", "title": "" }, { "docid": "35958bbf8b0dca0d5dcadddf00962ef1", "score": "0.6193939", "text": "public function update() {\n \t\t//Does the Resource object have an id?\n if ( is_null( $this->id ) ) trigger_error (\"Resource::update(): Attempt to update an Resource object that does not have its ID property set.\", E_USER_ERROR );\n\n\t\t//Update the Resource\n $conn = new mysqli( $DB_HOST, $DB_USERNAME, $DB_PASSWORD, $DB_NAME );\n $sql = \"UPDATE resources SET title=:?, summary=?, url=?, content=?, category=?, is_free=?, is_featured=?, is_favorite=?, date_created=? WHERE id = ?\";\n $st = $conn->prepare ( $sql );\n $st->bind_param( 'sssssiiisi', $this->title, $this->summary, $this->url, $this->content, $this->category, $this->is_free, $this->is_featured, $this->is_favorite, date(\"Y-m-d H:i:s\"), $this->id );\n\n $st->execute();\n $conn = null;\n}", "title": "" }, { "docid": "27fdfad09c0210d824e7b3fabe4e253e", "score": "0.6178334", "text": "public function update(Request $request, $id)\n {\n // if(Auth::user()->admin){\n $storage = Storage::findOrFail($id);\n $storage->name = $request->name;\n $storage->address = $request->address;\n $storage->save();\n Session::flash('success','You successfully updated storage!');\n// }\n// else{\n// Session::flash('error','You do not have enough permission!');\n// }\n return redirect()->route('storage.index');\n }", "title": "" }, { "docid": "a25688f30a6b62a181559b84d042105c", "score": "0.6148197", "text": "public function update(Request $request, $resource)\n {\n $this->authorize('update', $resource);\n\n $resource->load($this->with);\n\n $this->form()->setModel($resource)->save(function($data,$form) use (&$resource){\n $general = $data->pull('general'); \n $relations = $data->get('relations');\n\n $admin = \\Auth::guard('admin')->user();\n \n $resource->forceFill($general->toArray()); \n\n $this->event('updating', $resource); \n\n $resource->save(); \n\n $this->syncRelations($relations, $resource); \n\n $this->event('updated', $resource); \n\n return $resource;\n }); \n\n $this->checkOwner($resource);\n\n return $this->redirect($request, $resource); \n }", "title": "" }, { "docid": "9a5dcd97258a1dde56734d3bfd713b95", "score": "0.6116463", "text": "public function updateResource(Request $request, $id)\n {\n $validatedData = $request->validate(\n [\n 'title' => 'required',\n 'description' => 'required',\n 'uploadedfile' => 'mimes:flv,mp4,avi,wmv,3gp,mov,mkv,vob'\n ],\n [\n 'title.required' => 'Please enter video title.',\n 'description.required' => 'Please enter description.',\n 'uploadedfile.mimes' => 'Video format not supported.'\n ]\n );\n\n if($file = $request->hasFile('uploadedfile')) {\n \n $file = $request->file('uploadedfile') ; \n $fileName = $file->getClientOriginalName() ;\n $destinationPath = public_path().'/storage/resource' ;\n $file->move($destinationPath,$fileName);\n $resourceUpdate = DB::table('table_resources')->where([\n ['id','=',$id],\n ])->update(array(\n 'title' => $request->title,\n 'description' => $request->description,\n 'url' => $fileName\n ));\n if($resourceUpdate) {\n return redirect()->back()->with('message', 'Resource successfully updated.');\n } else {\n return redirect()->back()->withErrors(['Nothing changed. Please try again.']);\n }\n \n } else {\n $resourceUpdate = DB::table('table_resources')->where([\n ['id','=',$id],\n ])->update(array(\n 'title' => $request->title,\n 'description' => $request->description \n ));\n if($resourceUpdate) {\n return redirect()->back()->with('message', 'Resource successfully updated.');\n } else {\n return redirect()->back()->withErrors(['Nothing changed. Please try again.']);\n }\n\n }\n\n }", "title": "" }, { "docid": "7bfce29a195f384d1bcc21b603c792d2", "score": "0.6033452", "text": "public function update(Request $request, $id){\n\n $this->validate($request, $this->getValidationRules($request), $this->getValidationMessages($request));\n \n if($request->file('image')){\n $rules = [\n 'image' => 'image|mimes:jpg,jpeg,png'\n ];\n\n $this->validate($request, $rules);\n }\n\n \n try {\n $resource = Resource::withTrashed()->findOrFail($id); \n }catch (ModelNotFoundException $e){\n $errors = collect(['El recurso con ID '.$id.' no se encuentra.']);\n return back()\n ->withInput()\n ->with('errors', $errors);\n }\n $this->setResource($resource, $request);\n \n $resource->spaces()->detach();\n $resource->spaces()->attach($request->spaces);\n\n return redirect()->route('resources.index')\n ->with('session_msg', '¡El recurso, se ha editado correctamente!');\n }", "title": "" }, { "docid": "88d2a1e76ebbaa8bd165532adff21092", "score": "0.6013595", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $resource = Resource::where('product_id', $id)->first();\n\n $this->validate(request(), [\n 'category_id' => 'required',\n 'name' => 'required',\n 'short_name' => 'required',\n// 'article' => 'required',\n 'price' => 'required',\n 'collection_id' => 'required',\n 'atribut_id' => 'required',\n ]);\n\n $product->category_id = $request->get('category_id');\n $product->name = $request->get('name');\n $product->short_name = $request->get('short_name');\n// $product->article = $request->get('article');\n $product->price = $request->get('price');\n $product->collection_id = $request->get('collection_id');\n $product->atribut_id = $request->get('atribut_id');\n\n $method = __METHOD__;\n LogFile::ProductLog($product, $method);\n $product->save(); //Сохраняем изменения продукта\n\n return redirect('admin/products')->with('update', 'Продукт обновлен');\n }", "title": "" }, { "docid": "9349dc7f33c6326d0383abd536af6ce3", "score": "0.596908", "text": "public function updated(\n $resource = null,\n array $links = [],\n $meta = null,\n array $headers = []\n ): Response {\n return $this->getResourceResponse($resource, $links, $meta, $headers);\n }", "title": "" }, { "docid": "4e5acd860dcda74c61d836d96050b079", "score": "0.59593076", "text": "public function put(Storage $storage);", "title": "" }, { "docid": "215d42ed153b26bc9b49ae5c5951d499", "score": "0.5955367", "text": "public function update(StoragesUpdateRequest $request, $id)\n {\n $now = \\Carbon\\Carbon::now();\n $storage = Storage::find($id);\n $by_id = Auth::user()->id;\n\n $storage->fill([\n 'maker' => $request->maker,\n 'model_number' => $request->model_number,\n 'serial_number' => $request->serial_number,\n 'size' => $request->size,\n 'types' => $request->types,\n 'supported_os' => $request->supported_os,\n 'recovery_key' => $request->recovery_key,\n 'storage_password' => $request->storage_password,\n 'deleted_at' => $request->deleted_at === \"1\" ? $now : null,\n 'reason' => $request->reason,\n 'updated_by' => $by_id,\n ])\n ->save();\n\n return redirect()->route('storages.show', $storage->id)->with('information', 'レコードを更新しました。');\n }", "title": "" }, { "docid": "da49ecf5dc35b8e5edb8b21644469290", "score": "0.5939757", "text": "public function update(RespondentStoreRequest $request, $id)\n {}", "title": "" }, { "docid": "b96bbe109f16f366cfd72892d0d0be64", "score": "0.5903822", "text": "public function update(Request $Request, Resource $Resource)\n {\n\t\t\t$Actions = ($Request->actions)?:[1];\n\t\t\t$Action = \"0.\" . implode(\"\",array_replace(array_fill(1,max($Actions),0),array_fill_keys($Actions,1)));\n\t\t\t$Request->action = $Action;\n\t\t\t$UpdateArray = []; $Rules = Resource::ValidationRules(); $MyRules = [];\n\t\t\tforeach($Resource->FillableFields() as $Field){\n\t\t\t\tif($Field == \"code\") continue;\n\t\t\t\tif($Request->$Field != $Resource->$Field){\n\t\t\t\t\t$Resource->$Field = $UpdateArray[$Field] = $Request->$Field;\n\t\t\t\t\tif(isset($Rules[$Field])) $MyRules[$Field] = $Rules[$Field];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(empty($UpdateArray)) return redirect()->back()->with([\"info\"=>true,\"type\"=>\"info\",\"text\"=>\"No fields to update.\"]);\n\t\t\t$Validator = Validator::make($UpdateArray,$MyRules,Resource::ValidationMessages());\n\t\t\tif($Validator->fails()) return redirect()->back()->withErrors($Validator);\n\t\t\tif($Resource->status == \"ACTIVE\" && $Resource->save()) return redirect()->route('resource.index')->with([\"info\"=>true,\"type\"=>\"info\",\"text\"=>\"The Resource: \" . $Resource->displayname . \", updated successfully\"]);\n\t\t\treturn view(\"resource.error\");\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5890722", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "f78906153226222ee5bdfc9d13a06d23", "score": "0.58857", "text": "protected function save($resource) {\n if (isset($resource['public_id'])) {\n $this->collection->update(array('public_id' => $resource['public_id']), $resource, array('upsert' => TRUE));\n }\n }", "title": "" }, { "docid": "99960e81f0d443f90e5e0aa954abd481", "score": "0.5885372", "text": "public function update($id, Request $request) {\n $this->validate($request, isset($this->model->rules_update) ? $this->model->rules_update : $this->model->rules);\n\n ${$this->resource} = $this->model->findOrFail($id);\n\n $fillable_data = array_only($request->all(), $this->model->getFillable());\n\n App::setLocale(Helpers::getLang());\n\n ${$this->resource}->update($fillable_data);\n\n Admin::handleFileUpload('image', ${$this->resource}, 'image');\n\n return Redirect::route($this->view_path . '.index')->with('success', 'yeah');\n }", "title": "" }, { "docid": "a516665e3766b23c94ab33c5940aab8d", "score": "0.5874832", "text": "public function update(UpdateRequest $request, $id)\n {\n $data = $request->all();\n $product = Product::findOrFail($id);\n\n DB::beginTransaction();\n try {\n\n tap($product)->update($data);\n\n if ($request->hasFile('image')) {\n @unlink('products' . $product->image);\n $product->image = time() . '-' . $product->description . '.' . $request->file('image')\n ->getClientOriginalExtension();\n $request->file('image')->move('products', $product->image);\n }\n\n $product->save();\n\n $productResource = new ProductResource($product);\n\n DB::commit();\n return $this->responseSuccess([\n 'message' => trans('response.ProductController.update.success'),\n 'data' => $productResource,\n ]);\n } catch (\\Exception $exception) {\n DB::rollBack();\n return $this->responseError([\n 'message' => trans('response.ProductController.update.error'),\n 'errors' => $exception->getMessage(),\n ], Response::HTTP_INTERNAL_SERVER_ERROR);\n }\n }", "title": "" }, { "docid": "dbe374356cb114ab5e44b198d87b232f", "score": "0.58492017", "text": "public function put($resource, $data){\n $client = new Client([\n 'base_uri' => $this->baseUri\n ]);\n\n //Trim left slashes\n $resource = ltrim($resource,'/');\n\n //Cache miss call to API\n $res = $client->request('PUT', $resource, [\n 'json' => $data,\n 'headers' => [\n 'Authorization' => 'Bearer ' . $this->accessToken,\n 'User-Agent' => env('BASECAMP_AGENT')\n ]\n ]);\n\n //Get JSON payload\n $json = $res->getBody()->getContents();\n\n return json_decode($json);\n }", "title": "" }, { "docid": "0bb389e7c0c131b01dec97c33ec501e0", "score": "0.579422", "text": "public function update(Request $request, $id)\n {\n $resource = MyResource::find($id);\n if ($resource != null) {\n if ($resource->user->id == $request->user()->id || $request->user()->hasRole('Admin')) {\n $request->merge(['module_id' => $request->get('module_id')]);\n $request->validate(['title' => 'required|string', 'description' => 'nullable|string', 'google_drive' => 'nullable|url|max:255', 'publish_year' => 'required|numeric|digits:4|between:2008,' . date('Y'), 'module_id' => 'required|integer|exists:modules,id']);\n $resource->update($request->all());\n\n return redirect()->route('resources.index')\n ->with('success', 'Resource updated successfully');\n }\n return abort(401, 'You\\'re not allowed to edit this resource!');\n }\n return abort('404', 'User not found!');\n }", "title": "" }, { "docid": "7dec035d65557a5fa957575b344e390d", "score": "0.5787175", "text": "protected function saveResource(&$resource) {\n $this->getConfig()->set($resource['key'], $resource['value']);\n\n $resource['id'] = $resource['key'];\n }", "title": "" }, { "docid": "231bf07a63b0a16b02c083ef86c176fd", "score": "0.57833594", "text": "public function update(Request $request, $id)\n {\n $input=$request->file_path;\n if(isset($input)) {\n $File = $this->fileUpload($input);\n }\n else{\n $File = \"course_resource/default.jpg\";\n }\n\n\n $course_resources = CourseResource::whereId($id)->firstOrFail();\n $course_resources->course_id = $request->get('course_id');\n $course_resources->title = $request->get('title');\n $course_resources->description = $request->get('description');\n $course_resources->file_path = $File;\n\n\n $course_resources->save();\n return redirect(action('CourseResourcesController@edit', $course_resources->id))->with('status', 'The file has been updated!');\n }", "title": "" }, { "docid": "611dd800c7185eb18c8f75c9a8595a6c", "score": "0.57606536", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $product->name = $request->name;\n $product->rock = $request->rock;\n $product->weight = $request->weight;\n $product->carat = $request->carat;\n $product->stock = $request->stock;\n $product->price = $request->price;\n $product->color = $request->color;\n $product->category_id =Category::find($request->category_id)->id;\n\n if($request->hasFile(\"image\")){\n //delete old image and save new image\n unlink(storage_path('app/public/productImages/'. $product->src));\n $product->src=$request->image->hashName();\n $request->image->store(\"productImages\",\"public\");\n }\n \n if($product->save()){\n return redirect()->route('products.index');\n }else{\n return view(\"partials.error\");\n }\n }", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.57525045", "text": "public function update($entity);", "title": "" }, { "docid": "eaf18f66946228a152f8b83c6b49e31e", "score": "0.5747208", "text": "public function update($id, $data) {}", "title": "" }, { "docid": "ab7c78237c36ea0911a0a7aba52fe065", "score": "0.5722473", "text": "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $body = json_encode($json);\n $request = new Request('PUT', '/entities', [], $body);\n $response = $this->send($request);\n return $response;\n }", "title": "" }, { "docid": "94a50f00a1fdfc16d75925e06f8f3ece", "score": "0.5718023", "text": "public function update($resource, $id, array $data = [], array $fileData = [],\n array $options = []\n ) {\n $request = new Request(Request::UPDATE, $resource);\n $request->setId($id)\n ->setContent($data)\n ->setFileData($fileData)\n ->setOption($options);\n return $this->execute($request);\n }", "title": "" }, { "docid": "8d0a97cdf24a3e49996a055c1d6f9ee9", "score": "0.5674049", "text": "public function put($data);", "title": "" }, { "docid": "dd89d251e44d4f4288498c4f3fcdbd27", "score": "0.5669232", "text": "public function update(StoreQuestionRequest $request, Question $question)\n {\n $question->update($request->all());\n return (new QuestionResource($question))->response()->setStatusCode(Response::HTTP_OK);\n }", "title": "" }, { "docid": "07d0f77b1ff351c39ea339ec0c30336e", "score": "0.5668569", "text": "public function update(Request $request, $id)\n {\n $product=Product::find($id);\n $photo=$product->photo;\n if($request->file('photo')){\n $photo=$request->file('photo')->store('public/products');\n \\Storage::delete($product->photo);\n \n \n }\n $product->name=$request->name;\n $product->category_id=$request->category;\n $product->subcategory_id=$request->subcategory;\n $product->description=$request->description;\n $product->photo=$photo;\n $product->price=$request->price;\n $product->quantity=10;\n $product->update();\n notify()->success('Product Update Successfully!');\n return redirect('/product');\n }", "title": "" }, { "docid": "50feec899487537246234315718a4677", "score": "0.56560737", "text": "public function updated(Octocat $resource)\n {\n session()->flash('title', $resource->name);\n session()->flash('message', \"Octocat successfully updated\");\n session()->flash('type', 'success');\n }", "title": "" }, { "docid": "6310b8a0a92465d8b22379c86deeecd7", "score": "0.564211", "text": "public function put($resource, array $parameters = [], $headers = [])\n {\n return $this->request('PUT', $resource, [\n 'form_params' => $parameters,\n 'headers' => $headers,\n ]);\n }", "title": "" }, { "docid": "d31fe3056f944a65fa9ec19317300e44", "score": "0.5622648", "text": "public function update(Request $request)\n {\n \t$validator = Validator::make($request->all(), [\n 'title' => 'required',\n 'id' => 'required',\n 'url' => 'required'\n ]);\n if ($validator->fails()) {\n return redirect(route('manage-contractor-resources-edit', $request->id))\n ->withErrors($validator)\n ->withInput();\n }\n\n $info['title'] = $request->title;\n $info['url'] = $request->url;\n $info['chapter'] = $request->chapter;\n $info['description'] = $request->description;\n $id = $info['id'] =$request->id;\n if(!$id){ \n $request->session()->flash('error', \"Nothing to update (or) unable to update.\");\n return redirect(route('manage-contractor-resources'))->withInput();\n }\n if((new ContractorResource)->updateContractorResource($info)) {\n $request->session()->flash('success', \"Contractor Resource Updated Successfully.\");\n return redirect(route('manage-contractor-resources'));\n } else { \n $request->session()->flash('error', \"Nothing to update (or) unable to update.\");\n return redirect(route('manage-contractor-resources'))->withInput();\n }\n }", "title": "" }, { "docid": "45805699e2ef60790309007e165386e9", "score": "0.5617589", "text": "public function update(Request $request, $id)\n {\n if(count($request->all()) == 0)\n {\n return redirect()->route('home');\n }\n $item = Item::where('id', $id)->first();\n \n if($item)\n { $this->validate($request, [\n 'itemDescription' => ['required']\n ]); \n $item->itemDescription = $request->get('itemDescription');\n $item->inventoryID = $request->get('inventoryID');\n if($request->file('select_file'))\n { \n $this->validate($request, ['select_file' => 'image|mimes:jpeg,png,jpg,gif|max:2048']);\n $image = $request->file('select_file');\n $path = $image->store('stock', 's3');\n\n $item->photoUploadLink = $path;\n }\n $item->save();\n return redirect()->route('stock')->with('success','Stock was successfully updated.');\n }\n else{\n return redirect()->route('stock')->with('error','Unfortunately an error has occurred.');\n }\n }", "title": "" }, { "docid": "0ca7ba7cd4456dc2a52499c097eb460d", "score": "0.5611832", "text": "public function update(Request $request, Memory $memory)\n {\n \n }", "title": "" }, { "docid": "28ac32d59483ead96eb99c3920d2d977", "score": "0.56017566", "text": "public function update( Request $request, $id ) {\n if ( $request->hasFile( 'newphoto' ) ) {\n\n $file = $request->file( 'newphoto' );\n $file_name = time() . '.' . $file->extension();\n $file->move( public_path( 'backend/supplier/' ), $file_name );\n\n $supplier = Supplier::find( $id );\n\n $oldPhoto = $supplier->photo;\n\n if ( $oldPhoto ) {\n $photo_url = $oldPhoto;\n $part = explode( '/', $photo_url );\n $slicedArr = array_slice( $part, 3 );\n $photoStr = implode( '/', $slicedArr );\n unlink( $photoStr );\n }\n\n $supplier->name = $request->name;\n $supplier->email = $request->email;\n $supplier->address = $request->address;\n $supplier->phone = $request->phone;\n $supplier->shopname = $request->shopname;\n $supplier->photo = asset( \"backend/supplier/{$file_name}\" );\n $supplier->save();\n return $request;\n } else {\n $supplier = Supplier::find( $id );\n\n $supplier->name = $request->name;\n $supplier->email = $request->email;\n $supplier->address = $request->address;\n $supplier->phone = $request->phone;\n $supplier->shopname = $request->shopname;\n $supplier->photo = $request->photo;\n $supplier->save();\n return $request;\n }\n }", "title": "" }, { "docid": "a9e48624384796f4304eebd40f4ae1bc", "score": "0.5599046", "text": "public function update()\n {\n $id = Input::get('id');\n $obj = Product::find($id);\n if ($obj == null) {\n return view('404');\n }\n $obj->name = Input::get('name');\n $obj->images = Input::get('images');\n $obj->description = Input::get('description');\n $obj->price = Input::get('price');\n $obj->save();\n return redirect('/admin/product');\n }", "title": "" }, { "docid": "feafa85fd136a8bfa7378058dbef8934", "score": "0.55935574", "text": "public function update(StoreQuestion $request, Question $question)\n {}", "title": "" }, { "docid": "5583a1a1065b5e63099c0ebbfcc38083", "score": "0.55854446", "text": "public function modifyResource($uri,\n $sparql = \"\",\n $headers = [],\n $transaction = \"\") {\n $options = [];\n\n // Set content.\n $options['body'] = $sparql;\n\n // Set headers.\n $options['headers'] = $headers;\n $options['headers']['Content-Type'] = 'application/sparql-update';\n\n // Ensure uri takes transaction into account.\n $uri = $this->prepareUri($uri, $transaction);\n\n $response = $this->client->request(\n 'PATCH',\n $uri,\n $options\n );\n\n return null;\n }", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.55813426", "text": "public function update($request, $id);", "title": "" }, { "docid": "15b871253c843a97a53c3d5984ec74b9", "score": "0.5576059", "text": "public function update(Request $request, $id)\n {\n //\n $this->validate($request, [\n 'name' => 'required',\n 'price' => 'required',\n 'image_url' => 'image|nullable|max:1999'\n ]);\n\n $product = Product::find($id);\n $product->name = $request->input('name');\n $product->price = $request->input('price');\n $product->groups = $request->input('groups');\n $product->stocks = $request->input('stocks');\n $product->description = $request->input('description');\n //to handle file in updload this way if no new image added the image \n //wont be updated.\n if ($request->hasFile('image_url')){\n //to get the filename with ext\n $file = $request->file('image_url')->getClientOriginalName();\n //get file name\n $filename = pathinfo($file, PATHINFO_FILENAME);\n //get extensiopn\n $ext = $request->file('image_url')->getClientOriginalExtension();\n //new filename\n $fileNameToStore = $filename.'_'.time().'.'.$ext;\n #upload\n $path = $request->file('image_url')->storeAs('public/images', $fileNameToStore);\n }else{\n $fileNameToStore = $product->image_url;\n }\n $product->image_url= $fileNameToStore;\n $product->save();\n\n return redirect('/');\n }", "title": "" }, { "docid": "d30de7511ec7de74e32f94e01d31fafe", "score": "0.5566411", "text": "public function update(Request $r, $id){\n $prk = Portkey::find($id);\n $prk->name = $r->name;\n \n if(isset($r->image)){\n Storage::disk('portkeyMap')->delete($prk->image);\n $path = $r->file('image')->store('', 'portkeyMap');\n $prk->image = $path;\n }\n $prk->save();\n return redirect()->route('portkey.index');\n }", "title": "" }, { "docid": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.55661047", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "8f8dacf3ca2fb2c9044973cfcebc7c92", "score": "0.555745", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if(!empty($request->input('tags'))){\n $product->tags()->sync($request->input('tags'));\n }else {\n $product->tags()->detach();\n }\n\n //gestion sup image\n if($request->input('delete_picture')=='true'){\n if(!is_null($product->picture)) {\n Storage::delete($product->picture->uri);\n $product->picture->delete();\n }\n }\n\n //gestion de la modification image\n if(!is_null($request->file('thumbnail'))){\n if(!is_null($product->picture)) {\n Storage::delete($product->picture->uri);\n $product->picture->delete();\n }\n\n $im = $request->file('thumbnail');\n $ext = $im->getClientOriginalExtension();\n $uri = str_random(12).'.'.$ext;\n $picture = Picture::create([\n 'uri' => $uri,\n 'type' => $ext,\n 'size' => $im->getClientSize(),\n 'product_id' => $product->id\n ]);\n\n $request->file('thumbnail')->move(env('UPLOAD_PATH','./uploads'), $picture->uri);\n\n }\n\n $product->update($request->all());\n return redirect('product')->with(['message'=>'success']);\n }", "title": "" }, { "docid": "603c333c3d11c6ec2de9c240d7fa4363", "score": "0.55474466", "text": "public function update(Request $request, $id)\n {\n $image = $request->file('image')->store('product', 'public');\n $product = Product::find($id);\n\n $product->nombre = $request->input('nombre');\n $product->descripcion = $request->input('descripcion');\n $product->precio = $request->input('precio');\n $product->stock = $request->input('stock');\n $product->category_id = $request->input('category_id');\n $product->image = $image;\n \n $product->save();\n\n return redirect(\"/$product->id/showProduct\"); \n }", "title": "" }, { "docid": "7412cf8d4f3cd118bf4c8ef71352185b", "score": "0.5544467", "text": "public function update(Request $request, Restify $restify)\n {\n //\n }", "title": "" }, { "docid": "4c0ab51ecbeaff3788498a88d8e05dde", "score": "0.55394554", "text": "public function update($id) {\n \n }", "title": "" }, { "docid": "66139d48c34ab92a5f49f5d92e5064cc", "score": "0.55334014", "text": "public function put_products($productName)\n{\n $raw = file_get_contents('php://input');\n $newProduct = Product::fromJson($raw);\n\n $db = new DataStore();\n $db->beginTransaction();\n $oldProduct = Product::productByName($db, $productName);\n if (is_null($oldProduct))\n throw new RESTException('Product not found.', 404);\n\n $oldProduct->update($db, $newProduct);\n $db->commit();\n echo('Product ' . $productName . ' updated.');\n}", "title": "" }, { "docid": "45a4f9a4a649b70b7c4d70ad32264661", "score": "0.5530422", "text": "public function update(Request $request,$id)\n { \n $slider = Slider::find($id);\n //start image upload\n if($request->file('image') != \"\"){\n $_IMAGE = $request->file('image');\n $name = time().$_IMAGE->getClientOriginalName();\n $uploadPath = 'public/frontend/images/main-slider/';\n $_IMAGE->move($uploadPath,$name);\n $_imageUrl = $uploadPath.$name;\n\n //delete previous image\n if(!empty($slider->image)){\n try{\n unlink(\"$slider->image\");\n }\n catch(\\Exception $e){\n\n }\n finally{\n $flag = true; \n }\n }\n //store updated image\n $slider->image = $_imageUrl;\n\n }\n //end image upload\n $slider->type = $request->type;\n $slider->title = $request->title;\n $slider->sub_title = $request->sub_title;\n $slider->redirect_link = $request->redirect_link;\n $slider->active = $request->active;\n $slider->slider_order = $request->slider_order;\n $slider->save();\n\n return redirect('/admin/sliders')->with('success',' Data Updated');\n }", "title": "" }, { "docid": "0b10222182779f95692d101f822f75b6", "score": "0.55273986", "text": "public function update(Request $request, $id)\n {\n\n $slider=Slider::findorfail($id);\n $this->validate($request,[\n \"title\"=>\"required|max:100\",\n \"image\"=>\"nullable|image\"\n ]);\n\n $slider->name=$request->get(\"title\");\n if($request->hasFile(\"image\")){\n $old_location=public_path(\"images/slider/\".$slider->image_url);\n if(file_exists($old_location))\n unlink($old_location);\n\n $dblocation=uniqid(true).'.png';\n $location=public_path('images/slider/'.$dblocation);\n $file=$request->file(\"image\");\n Image::make($file)->encode(\"png\")->save($location);\n $slider->image_url=$dblocation;\n }\n\n $slider->save();\n Session::flash(\"success\",\"Slider has been updated\");\n\n return redirect()->back();\n\n\n }", "title": "" }, { "docid": "122628d1e06ea888611a75c166b89b4c", "score": "0.552677", "text": "public function patch($data) {\n if (isset($data['id']) && !is_numeric($data['id'])) {\n // Throw an error....\n return new ResourceResponse(\n [\n 'error' => t('You must provide an valid ID when updating a resource.'),\n ],\n ResourceResponse::HTTP_BAD_REQUEST\n );\n }\n $file_system_access_entity = entity_load('file_system_access', $data['id']);\n if (empty($file_system_access_entity)) {\n return new ResourceResponse(\n [\n 'error' => t('Resource not found.'),\n ],\n 404\n );\n }\n if (isset($data['entity_id']) && is_numeric($data['entity_id'])) {\n $file_system_access_entity->set('entity_id', $data['entity_id']);\n }\n if (isset($data['entity_type'])) {\n $file_system_access_entity->set('entity_type', $data['entity_type']);\n }\n if (isset($data['can_view']) && in_array($data['can_view'], [0, 1])) {\n $file_system_access_entity->set('can_view', $data['can_view']);\n }\n if (isset($data['can_write']) && in_array($data['can_write'], [0, 1])) {\n $file_system_access_entity->set('can_write', $data['can_write']);\n }\n if (isset($data['notify_of_upload']) && in_array($data['notify_of_upload'], [0, 1])) {\n $file_system_access_entity->set('notify_of_upload', $data['notify_of_upload']);\n }\n if (isset($data['user_id'])) {\n $file_system_access_entity->set('user_id', ['target_id' => $data['user_id']]);\n }\n // Save the FileSystemAccess Entity.\n $file_system_access_entity->save();\n // Return reponse.\n return new ModifiedResourceResponse(NULL, 202);\n }", "title": "" }, { "docid": "a82e18d865c6a0f13355d38c12c144b4", "score": "0.5523652", "text": "public function updateFilepath(){\n if(!empty($this->originalResource)){\n $this->setFilepath($this->getOriginalResource()->getIdentifier());\n }\n }", "title": "" }, { "docid": "c2ba30e945f68db8e69ec9299a2bf860", "score": "0.55200166", "text": "public function setResource($resource){\n $this->resource = $resource;\n }", "title": "" }, { "docid": "66fbae8975fea1c3ac6a3142735e3664", "score": "0.55114806", "text": "public function update(Request $request, $id)\n {\n $lens = Lens::find($id);\n\n File::delete(str_replace('public','storage',$lens->image));\n\n $lens->delete();\n\n $path = $request->file('image')->store('public');\n\n $lens = Lens::create($request->all());\n\n $lens->image = $path;\n $lens->update();\n\n return redirect()->route('lens.index');\n }", "title": "" }, { "docid": "265c7e4e1d9ccb8f2d919846c5c6d0e1", "score": "0.55072427", "text": "public function update($id, $input);", "title": "" }, { "docid": "70d4983ca950042ec52182066262a01f", "score": "0.55057055", "text": "public function update(Request $request, Product $product)\n {\n \n $product->name = $request->name;\n $product->price = $request->price;\n $product->description = $request->description;\n $product->featured = $request->featured;\n $product->image = $request->image;\n $product->category_id = $request->category_id;\n $product->brand_id = $request->brand_id;\n\n $product->save();\n\n return response([\n 'data' => new ProductResource($product)\n ],Response::HTTP_CREATED);\n }", "title": "" }, { "docid": "a1981e95d8e1e839e57300bff0e83269", "score": "0.5500746", "text": "abstract public function update_storage_site();", "title": "" }, { "docid": "012a18ea3549362ce2727f6242b46f5a", "score": "0.5497882", "text": "public function update(UpdateProductRequest $request, $id)\n {\n $products = Product::find($id);\n $path = null;\n $requestData = $request->all();\n if ($request->file('image')) {\n $path = $request->file('image')->store('public');\n @unlink('storage/'. $products->image);\n }\n if($request->hasFile('image')) {\n //\\File::delete($events->image);\n $requestData['image'] = $path;\n// $requestData['image'] = IdomNotification::uploadAndResize($request->file('image'));\n }\n\n\n\n\n// dd($data);\n $products->update($requestData);\n// $idoms->update($requestData);\n\n return redirect('/admin/products')->with('success','Item update successfully!');\n }", "title": "" }, { "docid": "631ec05d06376fc3d4e4c009809fbc97", "score": "0.54973245", "text": "public function update(SliderRequestUpdate $request, $id)\n {\n $slider=Slider::find($id);;\n $slider->TituloSlider=$request->TituloSlider;\n $slider->DescripcionSlider=$request->DescripcionSlider;\n $slider->EstadoSlider=$request->EstadoSlider;\n\n if ($request->file('file')) {\n \n Storage::disk('s3')->delete('sliders/'.$slider->file_name);\n\n $nameFile = $request->file('file');\n \n $newName = time().rand().'.'.$nameFile->getClientOriginalExtension();\n #Amazon\n\n $path = $nameFile->storeAs('sliders', $newName,'s3');\n Storage::disk('s3')->setVisibility($path, 'public');\n \n $slider->file_url=Storage::disk('s3')->url($path);\n $slider->file=$nameFile->getClientOriginalName();\n $slider->file_name=$newName;\n $slider->file_type=$nameFile->getClientOriginalExtension();\n\n }\n\n \n # $slider->file_url\n $slider->update();\n\n return $slider;\n }", "title": "" }, { "docid": "5ec7d4d96d210f32e09b80058c55a490", "score": "0.5496931", "text": "public function update(Request $request, $id){\n $product = Product::find($id);\n // dd($product);\n if($product){\n if($request->description){\n $product->description = $request->description;\n }\n if($request->name){\n $product->name = $request->name;\n }\n if($request->qty){\n $product->qty = $request->qty;\n }\n if($request->price){\n $product->price = $request->price;\n }\n if ($request->hasFile('image')) {\n $img_src = $request->file('image')->store('public/images');\n $product->image_src = $img_src;\n }\n\n return $product->save() ? 'product updated!' : 'could not update the product';\n }else{\n return 'product not found';\n }\n \n }", "title": "" }, { "docid": "ba09590827a6c41287d661376548ea80", "score": "0.5494963", "text": "public function update(Request $request, $client, $resource)\n\t{\n\t\t$resource = Resource::findBySlug($client, $resource);\n\n\t\tif (!$resource) {\n\t\t\treturn response(view('resources.404'), 404);\n\t\t}\n\n\t\t$resource->load('client');\n\t\t$client = $resource->client;\n\n\t\t$this->authorize('manage', $resource);\n\n\t\t$this->validate($request, [\n\t\t\t'name' => ['required', 'max:255'],\n\t\t\t'slug' => [\n\t\t\t\t'required',\n\t\t\t\t'max:255',\n\t\t\t\t'alpha_dash',\n\t\t\t\t'unique:resources,slug,'.$request->input('slug', $resource->slug).',slug,client_id,'.$resource->client->id,\n\t\t\t\t'not_in:create,destroy,edit,prune'\n\t\t\t],\n\t\t\t// 'metadata' => ['array'],\n\n\t\t\t'attachments' => ['array'],\n\t\t\t'uploads' => ['array'],\n\n\t\t\t'type' => ['required'],\n\n\t\t\t'client' => ['required', 'exists:clients,id'],\n\n\t\t\t'tags' => ['array'],\n\t\t\t'tags.*' => ['exists:tags,id'],\n\t\t]);\n\n\t\tif (($newClient = $request->input('client', $resource->client->id)) != $resource->client->id) {\n\t\t\t$client = Client::find($newClient);\n\t\t\t$resource->client()->associate($client);\n\t\t}\n\n\t\t$resource->name = $request->input('name');\n\t\t$resource->slug = $request->input('slug');\n\t\t$resource->metadata = $request->input('metadata', []);\n\n\t\t$attachments = $request->input('attachments', []);\n\n\t\tif ($request->hasFile('uploads')) {\n\t\t\t$uploads = $request->file('uploads');\n\t\t\t$attachments = array_merge($attachments, $uploads);\n\t\t}\n\n\t\t$resource->attachments = $attachments;\n\n\t\t// set type\n\t\tif (!($type = ResourceType::findBySlug($request->input('type')))) {\n\t\t\t$type = ResourceType::create([\n\t\t\t\t'name' => $request->input('type'),\n\t\t\t\t'slug' => str_slug($request->input('type')),\n\t\t\t]);\n\t\t}\n\n\t\t$resource->type()->associate($type);\n\n\t\t$resource->save();\n\n\t\t$resource->tags()->sync($request->input('tags', []));\n\n\t\treturn redirect()->route('clients.resources.show', ['client' => $resource->client->url, 'resource' => $resource->url])\n\t\t\t->with('alert-success', 'Resource updated!');\n\t}", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "96e3e53de207d1c0165b2f8d9b2e8bd8", "score": "0.5492371", "text": "public function update(Request $request, $id)\n {\n $book = Book::findOrFail($id);\n $path = Storage::putfile('public',$request->file('image'));\n $url = Storage::url($path);\n\n $book->title = $request->title;\n $book->price = $request->price;\n $book->image = $url;\n $book->subject = $request->subject;\n $book->author = $request->author;\n $book->pub_house = $request->pub_house;\n $book->description = $request->description;\n $book->update();\n\n return redirect()->route('land_page');\n }", "title": "" }, { "docid": "f34e0cee27ed61fcc8d340527f1d9673", "score": "0.5490983", "text": "#[Put('/{slug}', middleware: ['auth', 'can:update,slug'])]\n #[Operation(tags: ['Articles'], security: 'BearerToken')]\n #[RequestBody(factory: UpdateArticleRequestBody::class)]\n #[Response(factory: SingleArticleResponse::class, statusCode: 200)]\n #[Response(factory: ErrorValidationResponse::class, statusCode: 422)]\n public function update(Article $slug, UpdateArticleRequest $request): SingleArticleResource\n {\n $slug->update($request->input('article'));\n\n return new SingleArticleResource($slug->loadCount('favoritedBy'));\n }", "title": "" }, { "docid": "4d408504ca6fc63ae1c9b25f108a04b1", "score": "0.5490762", "text": "public function update(Request $request, $id)\n {\n $item = Item::find($id);\n $item->fill($request->all())->save();\n\n //file upload\n if($request->file('image_img')){\n $path = Storage::disk('public')->put('images/photos' , $request->file('image_img'));\n $item->fill(['image_img' => asset($path)])->save();\n }\n\n //tags\n $item->tags()->sync($request->get('tags'));\n\n return redirect()->route('item.index')->with('flash','Article actualizado correctamente.');\n }", "title": "" }, { "docid": "2f3b20927c08bdb57df533acda52a1fe", "score": "0.5490345", "text": "public function update(Request $request) {\n $this->validateItemInput($request);\n \n $item = Db::get()\n ->find(\n $this->classCall, $request->attributes->get('id')\n );\n if (!($item instanceof $this->classCall)) {\n $response = new Response('Trying to update non existing item.');\n $response->setStatusCode(400);\n return $response;\n }\n $oldPath = $item->path;\n $item->update($request->request->all());\n if ($oldPath !== $item->path) {\n $item->path = $this->getUniquePath($item->path);\n }\n Db::get()->persist($item);\n return $item;\n }", "title": "" }, { "docid": "eb69ca57c3bde9f06755b1a82e717baa", "score": "0.54793954", "text": "public function update(Request $request, $id)\n {\n $item = Item::findOrFail($id);\n \n $currentPhoto = $item->photo;\n if ($request->photo != $currentPhoto) {\n $name = time().'.' . explode('/',explode(':', substr($request->photo, 0, strpos($request->photo, ';')))[1])[1];\n\n \\Image::make($request->photo)->save(public_path('/img/item/').$name);\n $request->merge(['photo' => $name]);\n\n $itemPhoto = public_path('/img/item/').$currentPhoto;\n if (file_exists($itemPhoto)) {\n @unlink($itemPhoto);\n }\n }\n $item->update($request->all());\n \n return ['message' => 'Updated Success'];\n }", "title": "" }, { "docid": "ceac6ee3c36ec0367a2b9490feebe7a9", "score": "0.5478989", "text": "public function update(Request $request, $id)\n {\n\n $requestData = $request->all();\n $imagePaths = [];\n\n if ($request->hasFile('path')) {\n for ( $index = 0; $index < sizeof( $requestData['path']); $index++) {\n $imagePath = 'storage/' . $request->file('path')[$index]\n ->store('uploads', 'public');\n array_push($imagePaths, $imagePath);\n }\n }\n $image = Image::findOrFail($id);\n\n if (sizeof($imagePaths) === 0) {\n $requestData['path'] = $image->path;\n $image->update($requestData);\n }\n else {\n $oldImagePath = $image->path;\n $oldImagePath = str_replace(\"storage/\",storage_path('') . '/app/public/' , $oldImagePath);\n\n foreach ($imagePaths as $imagePath){\n\n $requestData['path'] = $imagePath;\n $image->update($requestData);\n }\n\n if(File::exists($oldImagePath)){\n File::delete($oldImagePath);\n }\n }\n\n\n\n return redirect('images/' . $request->get('post_id'))->with('flash_message', 'Image updated!');\n }", "title": "" }, { "docid": "6dbe9a80c3cc7c4c7214a73b919cb78b", "score": "0.54670787", "text": "public function update($request);", "title": "" }, { "docid": "2840f4acb2ccb4170d4557d937e25de4", "score": "0.5465156", "text": "public function update(Request $request, $id)\n {\n $data = Image::find($id);\n $all = $request->all();\n if(is_null($data))\n return response()->json(['error' => 'Resource introuvable'], 404);\n else\n {\n if(isset($all['url']))\n {\n $name = File::image($all['url']);\n if($name)\n {\n $all['url'] = $name;\n }else $all['url'] = $data->url;\n }\n\n $data->update($all);\n $data->categories()->sync($request->categories);\n $data->tags()->sync($request->tags);\n\n return response()->json(new ImageResource($data), 200);\n }\n }", "title": "" }, { "docid": "9080726c97000b95123e3a3548679cb5", "score": "0.5464735", "text": "public function update(Request $request, $id)\n {\n $this->slider = $this->slider->find($id);\n $rule =$this->slider->getRules('update');\n $request->validate($rule);\n $data = $request->except('image');\n\n if($request->image){\n $image_name = uploadImage($request->image,'slider','500x300');\n if($image_name){\n $data['image'] = $image_name;\n if($this->slider->image!= ''){\n deleteImage($this->slider->image,'slider');\n };\n }\n }\n $update = $this->slider->update($data);\n if($update){\n request()->session()->flash('success','Product has been updated');\n }else {\n request()->session()->flash('error','Product has not Been updated');\n\n }\n return redirect()->route('slider.index');\n\n }", "title": "" }, { "docid": "a1d61f0aa122378fb9049378295f5945", "score": "0.54586715", "text": "public function update($entity)\n {\n }", "title": "" }, { "docid": "a1d61f0aa122378fb9049378295f5945", "score": "0.54586715", "text": "public function update($entity)\n {\n }", "title": "" }, { "docid": "a1d61f0aa122378fb9049378295f5945", "score": "0.54586715", "text": "public function update($entity)\n {\n }", "title": "" }, { "docid": "536db9f9519d6601d2b49cdcde95f013", "score": "0.5458005", "text": "public function update(Request $request, $id)\n {\n //\n $this->validate($request,[\n 'id_manufacture' => 'required',\n 'asset_tag' => 'required',\n 'id_category' => 'required',\n 'order_number' => 'required',\n 'qty' => 'required',\n 'min_qty' => 'required',\n 'id_location' => 'required'\n ]);\n $input = $request->all();\n $asset = Assets::find($id);\n if(!empty($input['image'])){\n Storage::delete(public_path('storage'),$asset->image);\n $input['image'] = time().'.'.$request->image->getClientOriginalExtension();\n $request->image->move(public_path('storage/assets/'), $input['image']);\n }else {\n $input = array_except($input, array('image'));\n }\n $input['created_by'] = Auth::user()->name;\n $asset->update($input);\n return redirect()->route('assets.index')->with(['success' => 'Asset updated successfully', 'class' => 'close']);\n }", "title": "" }, { "docid": "db3837780a308513dc99c922897e898e", "score": "0.54579574", "text": "public function update()\n {\n $this->delete();\n $this->save();\n }", "title": "" }, { "docid": "5f36cdc3217c7c251089de9b1597e8a0", "score": "0.54572374", "text": "public static function put(string $resource, array $body = []) {\r\n $response = self::getClient()->request(\r\n \"PUT\",\r\n self::createUrl($resource),\r\n self::createHeaders(!empty($body)),\r\n NullStripper::strip($body)\r\n );\r\n\r\n if (!self::isSuccessful($response)) {\r\n self::handleFailure($response);\r\n }\r\n return self::handleSuccess($response);\r\n }", "title": "" }, { "docid": "8f4a12a4a3962d1da8617ab2c1add338", "score": "0.5455601", "text": "public function update(Request $request, Product $product)\n {\n if($request->image != NULL) {\n #Image uploading\n $storedPath = $request->file('image')->store('public/products'); \n }\n \n \n #Update the current product\n $product->update([\n 'title' => $request->title,\n 'body' => $request->body,\n 'price' => auth()->user()->id == $product->user_id ? $request->price : $product->price,\n 'category' => $request->category,\n 'image_path' => $request->image != NULL ? $storedPath : $product->image_path,\n 'status' => $request->status\n ]);\n\n #Return back to list page\n return redirect('/products');\n }", "title": "" }, { "docid": "19323452d4f8b1e3cc766b966234512d", "score": "0.54551905", "text": "public function update($obj) {\n }", "title": "" }, { "docid": "236d64bd92646776ec0d62483983f6b1", "score": "0.5442009", "text": "public function update($id, $data)\n {\n try {\n $this->logger->info(\"Trying to update resource in database table\");\n $this->checkId($id);\n\n $putValues = $this->putValues($id, $data);\n\n $query = \"UPDATE guest.student SET name = :name, surname = :surname, indexno = :indexno, address = :address WHERE id = :id\";\n $stmt = $this->conn->prepare($query);\n\n $stmt->bindParam(\":id\", $id);\n $stmt->bindParam(\":name\", $putValues[\"name\"]);\n $stmt->bindParam(\":surname\", $putValues[\"surname\"]);\n $stmt->bindParam(\":indexno\", $putValues[\"indexno\"]);\n $stmt->bindParam(\":address\", $putValues[\"address\"]);\n\n $stmt->execute();\n echo \"Resource successfully updated\";\n $this->logger->info(\"Updating resource successful in database table\");\n\n } catch (InvalidIdException $e) {\n $this->logger->warning(\"ID doesn't exist in database table\");\n echo \"Error: \" . $e->getMessage();\n } catch (\\Exception $e) {\n $this->logger->warning(\"Error updating resource in database table\");\n echo \"Error updating resource: \" . $e->getMessage();\n }\n }", "title": "" }, { "docid": "a098fb5d396525d0b997679afe399e81", "score": "0.54363286", "text": "public function update(Request $request, $id)\n {\n\n $product = $this->productRepo->getById($id);\n $request_data = $request->except(['_method', '_token', 'photo', 'product_cats', 'ar', 'en']);\n\n $locale = $request->only('ar', 'en');\n $cats = $request->product_cats;\n\n\n if ($request->hasFile('photo')) {\n /*delete old photo*/\n $oldPath = public_path('/images/products/' . $product->photo);\n $oldThumbPPath = public_path('/images/products/thumb/' . $product->photo);\n File::delete($oldPath, $oldThumbPPath);\n\n $image = $this->upload($request->photo, 'products', true);\n $request_data['photo'] = $image;\n\n }\n\n $this->productRepo->updateData($id, $request_data, $locale, $cats);\n\n return redirect()->route('products.index')->with('update', 'data updated successfully');\n\n\n }", "title": "" }, { "docid": "78c9828cfb522a8b15c9e25aecac3a44", "score": "0.54266506", "text": "public function update(Request $request, $id)\n {\n $order = Order::findOrFail($id);\n $previous_qty = $order->quantity;\n $order->user_id = auth()->id();\n $order->product_id = $request['product_id'];\n $order->quantity = $request['quantity'];\n\n if ($order->save()) {\n Inventory::where('product_id', $order->product_id)->decrement('quantity', $order->quantity);\n Inventory::where('product_id', $order->product_id)->increment('quantity', $previous_qty);\n return new OrderResource($order);\n }\n }", "title": "" }, { "docid": "ecf201c555a1f2a407beb441493f659d", "score": "0.5425398", "text": "public function update(Request $request, $id)\n {\n //\n // dd($request);\n $this->validate($request, [\n 'name' => 'required',\n 'price' => 'required',\n 'point' => 'required',\n 'category' => 'required',\n 'image' => 'image|mimes:jpeg,png,jpg,gif|max:2048',\n ]);\n $new_name = \"\";\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $new_name = time() . '.' . $image->getClientOriginalExtension();\n Image::make($image)->resize(450, 400)->save(public_path('picture/product/' . $new_name));\n $out_of_stock = Out_of_stock::find($id);\n $out_of_stock->name = $request->get('name');\n $out_of_stock->price = $request->get('price');\n $out_of_stock->point = $request->get('point');\n $out_of_stock->category = $request->get('category');\n $oldpruductname = $out_of_stock->picture;\n $out_of_stock->picture = $new_name;\n Storage::delete('product/'.$oldpruductname);\n } else {\n $out_of_stock = Out_of_stock::find($id);\n $out_of_stock->name = $request->get('name');\n $out_of_stock->price = $request->get('price');\n $out_of_stock->point = $request->get('point');\n $out_of_stock->category = $request->get('category');\n }\n\n $out_of_stock->save();\n return back()->with('success', 'Edit data success');\n }", "title": "" }, { "docid": "4da53910fe95b40fc7708d69a5bc4caf", "score": "0.54252774", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'sub_title' => 'required',\n 'image' => 'required|mimes:jpeg,bmp,png'\n ]);\n $slider = Slider::find($id);\n $image = $request->file('image');\n $filename = $image->getClientOriginalName();\n $filename = time(). '.' . $filename;\n $path = 'upload/slider/'.$filename;\n $storage = Storage::disk('s3');\n $storage->put($path, fopen($image, 'r+'), 'public');\n\n $slider->title = $request->title;\n $slider->sub_title = $request->sub_title;\n $slider->image = $path;\n $slider->save();\n Toastr::success('Slider Successefully Updated!', 'Success', [\"positionClass\" =>\"toast-top-right\"]);\n return redirect()->route('slider.index');\n }", "title": "" }, { "docid": "a4ae1c30e150f5cf694572b68551bd23", "score": "0.5425028", "text": "public function update(Request $request, $id)\n {\n $this->validate($request,[\n 'title'=>'required',\n 'content'=>'required',\n 'date'=>'required',\n 'image'=>'required|image',\n ]);\n $product = Product::find($id);\n $product->edit($request->all());\n $product -> uploadImage($request->file('image'));\n $product->setCategory($request->get('category_id'));\n $product->toggleStock($request->get('in_stock'));\n\n return redirect()->route('products.index');\n }", "title": "" }, { "docid": "f08541062169cb53c21e52b58cdb2dcd", "score": "0.5424735", "text": "public function update(Request $request, $id)\n {\n //\n $id = $request->id;\n $store_edit = Store::find($id);\n $store_edit->store_name = $request->store_name;\n $store_edit->store_tel = $request->store_tel;\n $store_edit->store_type_id = $request->store_type;\n $store_edit->store_lineid = $request->store_line;\n $store_edit->store_contact = $request->store_contact;\n $store_edit->store_address = $request->store_address;\n $store_edit->store_detail = $request->store_detail;\n $store_edit->store_status = $request->store_status;\n $store_edit->store_tax_contact = $request->store_tax_contact;\n $store_edit->store_tax_name = $request->store_tax_name;\n $store_edit->store_tax_id = $request->store_tax_id;\n $store_edit->confirm = $request->confirm;\n $store_edit->store_lat = $request->store_lat;\n $store_edit->store_lng = $request->store_lng;\n $tmp = '';\n if($request->check_list){\n foreach($request->check_list as $key => $item){\n if($key == 0){\n $tmp = $item;\n }\n else{\n $tmp = $item.','.$tmp;\n } \n }\n }\n $store_edit->store_promotion = $tmp;\n $store_edit->store_status = $request->store_status;\n\n\n if($request->hasFile('storeimage')){\n Storage::disk('do_spaces')->delete('stores/'.$store_edit->store_image); \n $newFileName = uniqid().'.'.$request->storeimage->extension();//gen name\n $imageStore = $request->file('storeimage');\n $t = Storage::disk('do_spaces')->put('stores/'.$newFileName, file_get_contents($imageStore), 'public');\n $store_edit->store_image = $newFileName;\n }\n if($request->hasFile('storeimageline')){\n Storage::disk('do_spaces')->delete('stores/'.$store_edit->store_lineid_image);\n $newFileName = uniqid().'.'.$request->storeimageline->extension();//gen name\n $imageStoreLine = $request->file('storeimageline');\n $t = Storage::disk('do_spaces')->put('stores/'.$newFileName, file_get_contents($imageStoreLine), 'public');\n $store_edit->store_lineid_image = $newFileName;\n }\n if($request->hasFile('storeimagetax')){\n Storage::disk('do_spaces')->delete('stores/'.$store_edit->store_tax_image);\n $newFileName = uniqid().'.'.$request->storeimagetax->extension();//gen name\n $imageStoreTax = $request->file('storeimagetax');\n $t = Storage::disk('do_spaces')->put('stores/'.$newFileName, file_get_contents($imageStoreTax), 'public');\n $store_edit->store_tax_image = $newFileName;\n }\n $store_edit->save();\n return redirect()->route('store.index')->with('feedback' ,'แก้ไขข้อมูลเรียบร้อยแล้ว');\n }", "title": "" }, { "docid": "2ed05e577c404795cab2b1dde733d75c", "score": "0.5418497", "text": "public function update(Request $request, $id)\n {\n $datos = $request->except('_token','_method');\n\n if ($request->hasFile('foto')) {\n $artista = Artista::findOrfail($id);\n Storage::delete('public/uploads/'.$artista->id.'/'. $artista->foto);\n $datos['foto'] = $request->file('foto')->getClientOriginalName();\n $request->file('foto')->storeAs('public/uploads/'.$artista->id, $datos['foto']);\n }\n\n Artista::where('id','=',$id)->update($datos);\n return redirect('artista');\n }", "title": "" }, { "docid": "da9aacaea3d57116c579322deaba3198", "score": "0.5416959", "text": "public function update(Request $request, $id)\n {\n try {\n $result = $this->model->find($id);\n\n if ($result) {\n $inputs = $request->except('_token');\n\n if ($request->hasFile('image')) {\n $fileName = time() . '.' . $request->image->getClientOriginalExtension();\n $file = $request->file('image');\n\n Storage::put($this->dishImageStoragePath . $fileName, file_get_contents($file), 'public');\n\n $inputs['image'] = $fileName;\n\n if (isset($result->image) && $result->image) {\n if (Storage::exists($this->dishImageStoragePath . $result->image)) {\n Storage::delete($this->dishImageStoragePath . $result->image);\n }\n }\n }\n\n $isSaved = $result->update($inputs);\n\n if ($isSaved) {\n return redirect($this->moduleRoute)->with(\"success\", __($this->moduleName . \" updated!\"));\n }\n }\n return redirect($this->moduleRoute)->with(\"error\", __(\"Something went wrong, please try again later.\"));\n } catch (\\Exception $e) {\n return redirect($this->moduleRoute)->with('error', $e->getMessage());\n }\n }", "title": "" }, { "docid": "9909c434dfa1fa2de013b52dc098057a", "score": "0.54166603", "text": "public function updateProduct();", "title": "" }, { "docid": "83fd3d73dd82fcaecb92e078c534bdfe", "score": "0.54161036", "text": "public function update(Request $request, $id)\n {\n $data = array();\n $data['status'] = $request->status;\n \n \n $image = $request->newphoto;\n\n if ($image) {\n $position = strpos($image, ';');\n $sub = substr($image, 0, $position);\n $ext = explode('/', $sub)[1];\n\n $name = time().\".\".$ext;\n $img = Image::make($image)->resize(240,200);\n $upload_path = 'backend/supplier/';\n $image_url = $upload_path.$name;\n $success = $img->save($image_url);\n \n if ($success) {\n $data['photo'] = $image_url;\n $img = DB::table('patients')->where('id',$id)->first();\n $image_path = $img->photo;\n $done = unlink($image_path);\n $user = DB::table('patients')->where('id',$id)->update($data);\n }\n \n }else{\n $oldphoto = $request->photo;\n $data['photo'] = $oldphoto;\n $user = DB::table('patients')->where('id',$id)->update($data);\n }\n }", "title": "" }, { "docid": "fa90d4335b5457d60aed5f93219c9fb9", "score": "0.5414578", "text": "function update($resource_id,$options)\n\t{\n\t\t//allowed fields\n\t\t$valid_fields=array(\n\t\t\t//'resource_id',\n\t\t\t//'survey_id',\n\t\t\t'dctype',\n\t\t\t'title',\n\t\t\t'subtitle',\n\t\t\t'author',\n\t\t\t'dcdate',\n\t\t\t'country',\n\t\t\t'language',\n\t\t\t//'id_number',\n\t\t\t'contributor',\n\t\t\t'publisher',\n\t\t\t'rights',\n\t\t\t'description',\n\t\t\t'abstract',\n\t\t\t'toc',\n\t\t\t'subjects',\n\t\t\t'filename',\n\t\t\t'dcformat',\n\t\t\t'changed');\n\n\t\t//add date modified\n\t\t$options['changed']=date(\"U\");\n\t\t\t\t\t\n\t\t//remove slash before the file path otherwise can't link the path to the file\n\t\tif (isset($options['filename']))\n\t\t{\n\t\t\tif (substr($options['filename'],0,1)=='/')\n\t\t\t{\n\t\t\t\t$options['filename']=substr($options['filename'],1,255);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//pk field name\n\t\t$key_field='resource_id';\n\t\t\n\t\t$update_arr=array();\n\n\t\t//build update statement\n\t\tforeach($options as $key=>$value)\n\t\t{\n\t\t\tif (in_array($key,$valid_fields) )\n\t\t\t{\n\t\t\t\t$update_arr[$key]=$value;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//update db\n\t\t$this->db->where($key_field, $resource_id);\n\t\t$result=$this->db->update('resources', $update_arr); \n\t\t\n\t\treturn $result;\t\t\n\t}", "title": "" }, { "docid": "cc834cb0ddf4d709f9b0966aeba0c395", "score": "0.5407511", "text": "public function update(Request $request, Product $product)\n {\n\n if (Auth::id()==$product->user_id) {\n $product->update($request->all());\n\n return response([\n 'data'=>new ProductResource($product)\n ],Response::HTTP_CREATED); \n }\n\n \nelse {\n return response([\n 'error'=>'product doesnt belong to current user'\n ],Response::HTTP_NOT_FOUND); \n}\n // return response()->json(new ProductResource($product), 200); \n\n \n\n \n }", "title": "" } ]
9d804392fc7bb6e388edd293fa16b37c
Persists a $user into database, at first hashing it's password
[ { "docid": "79f2c4b870f08664a944078f56052a82", "score": "0.6944269", "text": "public function save($user)\r\n {\r\n if ($user == NULL)\r\n {\r\n throw new \\InvalidArgumentException('parameter $user cannot be null');\r\n }\r\n\r\n $entityUser = $this->loadByUserName($user->getUserName());\r\n\r\n if ($entityUser != NULL)\r\n {\r\n $entityUser->setAdmin($user->isAdmin());\r\n $entityUser->setEmail($user->getEmail());\r\n $entityUser->setFirstName($user->getFirstName());\r\n $entityUser->setLastName($user->getLastName());\r\n\r\n if ($user->getSalt() == NULL || $user->getSalt() == '')\r\n {\r\n $encoder = $this->encoderFactory->getEncoder($entityUser);\r\n \r\n $entityUser->setSalt($this->rand_str(UserFacade::SALT_LEN));\r\n $entityUser->setPassword($encoder->encodePassword($user->getPassword(), $entityUser->getSalt()));\r\n }\r\n\r\n parent::save($entityUser);\r\n }\r\n else\r\n {\r\n if ($user->getSalt() == NULL || $user->getSalt() == '')\r\n {\r\n $encoder = $this->encoderFactory->getEncoder($user);\r\n \r\n $user->setSalt($this->rand_str(UserFacade::SALT_LEN));\r\n $user->setPassword($encoder->encodePassword($user->getPassword(), $user->getSalt()));\r\n }\r\n\r\n parent::save($user);\r\n }\r\n }", "title": "" } ]
[ { "docid": "bcf84b19bbf455ee5f4f30c4b71e82f8", "score": "0.73261315", "text": "public function save()\n {\n $query = 'USE camagru; INSERT INTO user (\n username, email, password, hash\n ) VALUES (\n :username, :email, :password, :hash\n )';\n $this->query($query);\n $this->bind(':username', $this->username, null);\n $this->bind(':email', $this->email, null);\n $this->bind(':password', hash('whirlpool', $this->password), null);\n $this->bind(':hash', hash('whirlpool', $this->username . $this->secretkey), null);\n $this->execute();\n }", "title": "" }, { "docid": "0a48ed4bc49fd3c702219c59c34f413e", "score": "0.70547104", "text": "public function saveUser() {\n Database::executeQueryReturnSingle(\"UPDATE users \n SET user_name = ?, email = ?, user_password = ?, user_salt = ?, iterations = ?, access_level = ? \n WHERE user_id = ?\", \n array($this->name, $this->email, $this->password,\n $this->salt, $this->iterations, $this->access_level,\n $this->id));\n }", "title": "" }, { "docid": "873a5a558fcd162eb09215c9328de962", "score": "0.7054489", "text": "private function _registerUser($user) {\n\t\n\t\t// hash the submitted password to save it\n\t\t$submittedPassword = $user->loginInfo->password;\n\t\t$user->loginInfo->password = $user->hashPassword($user->loginInfo->password);\n\t\n\t\t// Save the user to the database\n\t\t// which Generates a unique user_id (PK) which we will then\n\t\t// associate with loginInfo to create 1:1 relation\n\t\t$success = $user->save(false); \n\t\t\n\t\t//now, link the user and the password through the foreign key\n\t\t$user->loginInfo->user_id = $user->user_id; \n\t\t\t\t\n\t\t// save the login info\n\t\t$success = $success && $user->loginInfo->save(false);\n\t\t\n\t\t// since we're gonna auto-login using the login script, we still need the original, submitted password to authenticate against the stored hash version\n\t\t// remember that $user is simply a… temporary copy of submitted register/login data\n\t\t// a better method would be nice, but this works\n\t\t$user->loginInfo->password = $submittedPassword;\n\t\t\n\t\treturn $success; \n\t}", "title": "" }, { "docid": "dd633c228fd70d37ffc13147ae29384d", "score": "0.7048548", "text": "public function saveUser(User $user)\n\t{\n\t\ttry {\n\t\t\t$stmt = $this->_conn->prepare ( 'INSERT INTO sha_user (usr_username, usr_password, usr_email, usr_salt, usr_language, usr_loc_id) VALUES (:username, :password, :email, :salt, :language, :usr_loc_id)' );\n\t\t\n\t\t\t$stmt->execute ( array (\n\t\t\t\t\t':username' => $user->getUsername(),\n\t\t\t\t\t':password' => $user->getPassword(),\n\t\t\t\t\t':email' => $user->getEmail(),\n\t\t\t\t\t':salt' => $user->getSalt(),\n\t\t\t\t\t':language' => $user->getLanguage(),\n\t\t\t\t\t':usr_loc_id' => $user->getLocId()\n\t\t\t) );\n\t\t} catch ( \\PDOException $e ) {\n\t\t\techo 'Error: ' . $e->getMessage ();\n\t\t}\n\t}", "title": "" }, { "docid": "4c20eae7a6877ee77e4a39df10951d06", "score": "0.69535446", "text": "public function persist(User $user);", "title": "" }, { "docid": "5f5e94e5ad79b819632ef91e88c2af43", "score": "0.6916442", "text": "public function save() {\n \n // perform validation first.\n $this->validate();\n \n if (empty($this->errors)) {\n \n // hash the password, with salt etc. php password_hash does this for us\n $password_hash = password_hash($this->pword, PASSWORD_DEFAULT);\n\n $sql = 'INSERT INTO user ( user_id, user_email, password_hash, role_name ) \n VALUES ( :user_id, :email, :pword, :role)';\n \n $db = static::getDB();\n $stmt = $db->prepare($sql);\n\n $stmt->bindValue(':user_id', $this->user_id, PDO::PARAM_STR);\n $stmt->bindValue(':email', $this->email, PDO::PARAM_STR);\n $stmt->bindValue(':pword',$password_hash, PDO::PARAM_STR);\n $stmt->bindValue(':role', $this->role, PDO::PARAM_STR);\n return $stmt->execute();\n }\n return false;\n }", "title": "" }, { "docid": "a1b195d5757b58dbaea6f5bc63ee9854", "score": "0.68006825", "text": "public function store()\n {\n\t\t$user = new User;\n\n\t\t$fields = $user->getFillable();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$user->{$field} = Request::get($field);\n\t\t}\n\t\t$user->user_password = Hash::make(Request::get('user_password'));\n\n\t\t$result = $user->save();\n\n\t\tif ($result !== false) {\n\t\t\treturn Redirect::route('user.show', $user->user_id)->with('message', 'Your changes were saved.');\n\t\t} else {\n\t\t\treturn Redirect::route('user.index')->with('error', 'Your changes were not saved.');\n\t\t}\n }", "title": "" }, { "docid": "f159fc6b629f1e9fa8d88547760c5501", "score": "0.6796285", "text": "public function save()\n {\n $this->storage->saveUser($this->id->getId(), $this->userName, $this->organization, $this->isAdmin());\n $this->authModule->saveNew();\n }", "title": "" }, { "docid": "0478ee29202279179dd36a2092530910", "score": "0.6789123", "text": "public function save() {\n\t\t$db = new DB();\n\t\t$password = sha1($this->password);\n\t\t$sql = <<<EOT\nINSERT INTO `users` \n\t(`username`, `first_name`, `last_name`, `password`, `email`, `state_id`, `county`, `city`, `postal_code`, `street`) \nVALUES \n\t('{$this->login}', '{$this->firstName}', '{$this->lastName}', '$password', '{$this->email}', '{$this->state_id}', '{$this->county}', '{$this->city}', '{$this->postalCode}', '{$this->street}');\nEOT;\n\t\tif ($db->query($sql)) {\n\t\t\tif ($db->affectedRows() == 1) {\n\t\t\t\treturn $db->getInsertId();\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "229a6def61eb9ddedc790fd1f39399b3", "score": "0.67842764", "text": "public function save($user) {\n $userData = array(\n 'user_name' => $user->getUsername(),\n 'user_email' => $user->getEmail(),\n 'user_password' => $user->getPassword(),\n 'user_salt' => $user->getSalt(),\n 'user_role' => $user->getRole()\n );\n if($user->getId()){\n //User already in the db : Update it \n $this->getDb()->update('t_user', $userData, array(\n 'user_id' => $user->getId()\n ));\n } else {\n //User not in the db : Insert it \n $this->getDb()->insert('t_user', $userData);\n $userId = $this->getDb()->lastInsertId();\n $user->setId($userId);\n }\n }", "title": "" }, { "docid": "09f9bb8358b36e010ddf7ca49eca6391", "score": "0.6772916", "text": "public function save()\n {\n foreach ($this->getAllProperties() as $property => $value) {\n if ($property === 'password' || $property === 'newpassword') {\n // update password only if new is set and length >= 3\n if ($this->newpassword !== null && Str::length($this->newpassword) >= 3) {\n $this->_user->password = App::$Security->password_hash($this->newpassword);\n }\n } elseif ($property === 'approve_token') {\n if ($value == \"1\") {\n $this->_user->approve_token = '0';\n } else {\n if ($this->_approve_tmp === '0') {\n $this->_approve_tmp = Str::randomLatinNumeric(mt_rand(32, 128));\n }\n $this->_user->approve_token = $this->_approve_tmp;\n }\n } else {\n $this->_user->{$property} = $value;\n }\n }\n\n $this->_user->save();\n }", "title": "" }, { "docid": "a6492bcc6256f3a0340dd5b20c743e8e", "score": "0.67469937", "text": "public function hashNewUserPassword() {\r\n\t\tif (isset($this->data['User']['password'])) {\r\n\t\t\t$this->data['User']['password'] = AuthComponent::password($this->data['User']['password']);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "e2b797fd4f365d92ada0e48859fa1753", "score": "0.67334443", "text": "public function storeUser($fname, $lname, $email, $uname, $password) {\n $uuid = uniqid('', true);\n $hash = $this->hashSSHA($password);\n $encrypted_password = $hash; // encrypted password\n\n $salt = $hash; // salt2\n $stmt = $this->conn->prepare(\"INSERT INTO auth_user(password, username, first_name, last_name, email,unique_id, date_joined) VALUES(?, ?, ?, ?, ?, ?, NOW())\");\n\n $stmt->bind_param(\"ssssss\", $encrypted_password, $uname, $fname, $lname, $email, $uuid);\n $result = $stmt->execute();\n $stmt->close();\n\n // check for successful store\n if ($result) {\n $stmt = $this->conn->prepare(\"SELECT * FROM auth_user WHERE username = ?\");\n $stmt->bind_param(\"s\", $uname);\n $stmt->execute();\n $user = $stmt->get_result()->fetch_assoc();\n $stmt->close();\n\n return $user;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "bb809a5e39f4bb4e91bb8d8c47638002", "score": "0.6669611", "text": "public function save() {\n\t\tif ( isset( $this->raw_password ) ) {\n\t\t\t$this->password\t= \n\t\t\tstatic::password( $this->raw_password );\n\t\t}\n\t\t\n\t\tif ( isset( $this->id ) ) {\n\t\t\tparent::edit( self::$fields, $this, 'users' );\n\t\t} else {\n\t\t\t$this->id = \n\t\t\tparent::put( self::$fields, $this, 'users' );\n\t\t}\n\t}", "title": "" }, { "docid": "86d3c15c30eac87d11d2736fcc990f88", "score": "0.66691154", "text": "public function saveNewUser($user);", "title": "" }, { "docid": "0d43a5d126683b78185dd3e7fc744e2d", "score": "0.6656802", "text": "private function saveNewPassword(string $password, User $user)\n {\n $user->setResetToken(null);\n $user->setPassword($this->encoder->encodePassword(\n $user,\n $password\n ));\n $user->setEntryUpdatingDate(new \\DateTime());\n $this->entityManager->persist($user);\n $this->entityManager->flush();\n $this->flashSrvMsg->flashServicesMessage('app.resetter.success');\n }", "title": "" }, { "docid": "9689813b70c7d41a629bde1333784511", "score": "0.6612371", "text": "function insertMember($user,$password){\n $encodedPassword = password_hash($password, PASSWORD_DEFAULT);\n mysqli_query($link, \"INSERT INTO member VALUES (default, '\".$user.\"', '\".$encodedPassword.\"')\");\n}", "title": "" }, { "docid": "c8ce4011b3f2ef7b04c6079f8656a2f8", "score": "0.6607692", "text": "function createUser($user, $password)\n {\n global $dbh;\n\n $options = ['cost' => 12];\n $hash = password_hash($password, PASSWORD_DEFAULT, $options);\n\n $stmt = $dbh->prepare('INSERT INTO USER VALUES (NULL, ?, ?, ?, ?, ?, ?)');\n $success = $stmt->execute(array($user['username'],\n $user['email'],\n $user['name'],\n $user['birthdate'],\n $user['location'],\n $hash));\n return $success;\n }", "title": "" }, { "docid": "299c74aca5aea69792de786bf9470348", "score": "0.65133744", "text": "public function putUser($params)\n {\n $params = $this->prepareUser($params);\n if(isset($params['password']))\n {\n $sql = \"INSERT INTO `{$this->mySqlTablePrefix}user` (`id`,`password`,`extra`) VALUES (:id,:password,:extra)\";\n $params = array(':id' => $this->owner, ':password' => $params['password'], ':extra' => $params['extra']);\n }\n else\n {\n $sql = \"INSERT INTO `{$this->mySqlTablePrefix}user` (`id`,`extra`) VALUES (:id,:extra)\";\n $params = array(':id' => $this->owner, ':extra' => $params['extra']);\n }\n\n $result = $this->db->execute($sql, $params);\n return $result !== false;\n }", "title": "" }, { "docid": "7e15e92ed36c8a87e4a00826fcbd6929", "score": "0.6509843", "text": "public function save()\n {\n $this->validate();\n if (empty($this->errors)) {\n $password_hash = password_hash($this->password, PASSWORD_DEFAULT);\n $sql = 'INSERT INTO users (name, email, password_hash)\n VALUES (:name, :email, :password_hash)';\n $db = static::getDB();\n $stmt = $db->prepare($sql);\n $stmt->bindValue(':name', $this->name, PDO::PARAM_STR);\n $stmt->bindValue(':email', $this->email, PDO::PARAM_STR);\n $stmt->bindValue(':password_hash', $password_hash, PDO::PARAM_STR);\n return $stmt->execute();\n }\n return false;\n }", "title": "" }, { "docid": "6310f6f9992703fcd838d9bd6d7f4767", "score": "0.6489716", "text": "public function save(User $user): void ;", "title": "" }, { "docid": "f4b0e1b8b398858455f7ba2a0953e088", "score": "0.6473181", "text": "public function addUser($user) {\n $hash = password_hash($user['pass'], PASSWORD_BCRYPT);\n $query = \"insert into users values (null, '{$user['login']}','$hash','{$user['email']}')\";\n $this->db->query($query);\n if ($this->db->errno) {\n die($this->db->error);\n }\n }", "title": "" }, { "docid": "49fb505a5ebf707dc5c375a7c209f20c", "score": "0.64644206", "text": "function createUser()\n {\n $pdo = getConnection();\n $digest = password_hash($_POST['password'], PASSWORD_DEFAULT);\n\n $insert= 'INSERT INTO user_account(email, password, first, last)\n VALUES(:email, :digest, :first, :last)';\n\n $statement = $pdo->prepare($insert);\n\n $statement->bindValue(':email', $_POST['email'], PDO::PARAM_STR);\n $statement->bindValue(':digest', $digest, PDO::PARAM_STR);\n $statement->bindValue(':first', $_POST['first'], PDO::PARAM_STR);\n $statement->bindValue(':last', $_POST['last'], PDO::PARAM_STR);\n\n return $statement->execute();\n }", "title": "" }, { "docid": "3e439fe85f9f2aabc91fed1ac08d01fd", "score": "0.64621556", "text": "protected function do_save( \\WP_User $user ) {\n\n\t\tif ( ! $user->exists() ) {\n\n\t\t\tif ( empty( $user->user_pass ) ) {\n\t\t\t\t$user->user_pass = wp_generate_password( 24 );\n\t\t\t}\n\n\t\t\t$id = wp_insert_user( wp_slash( $user->to_array() ) );\n\t\t} else {\n\t\t\t$id = wp_update_user( wp_slash( $user->to_array() ) );\n\t\t}\n\n\t\tif ( is_wp_error( $id ) ) {\n\t\t\tthrow new \\InvalidArgumentException( 'Error encountered while saving WP_User: ' . $id->get_error_message() );\n\t\t}\n\n\t\treturn get_user_by( 'id', $id );\n\t}", "title": "" }, { "docid": "91a573be5df9ef7a90e19af8e4a6a343", "score": "0.6456656", "text": "public function saveUser(User $user)\n {\n $bcrypt = new Bcrypt();\n $datetime = date('Y-m-d H:i:s');\n $data = [\n 'user_name' => $user->userName,\n 'role_id' => $user->roleId,\n 'email_id' => $user->emailId,\n 'password' => $bcrypt->create($user->password),\n 'created_at' => $datetime,\n 'updated_at' => $datetime,\n ];\n $this->tableGateway->insert($data);\n }", "title": "" }, { "docid": "ada732aceb3e4e77374fd1a6902c0c30", "score": "0.6421737", "text": "public function save(User $user)\n {\n $this->getEntityManager()->persist($user);\n $this->getEntityManager()->flush();\n }", "title": "" }, { "docid": "99b1a0b8ae554cd16d8b1ab87c6f214d", "score": "0.64204323", "text": "public function saveUser ($name, $password) {\n $conn = $this->getConnection();\n $query = $conn->prepare(\"INSERT INTO users (username, password) VALUES (:username, :password)\");\n $query->bindParam(':username', $name);\n $query->bindParam(':password', $password);\n $query->execute();\n }", "title": "" }, { "docid": "f270aa20becf0431904876789b287618", "score": "0.64200443", "text": "public function password(string|User $user, string|Secret $password): void {\n $this->conn->update(\n 'user set hash = %s where username = %s',\n $this->hash($password),\n $user instanceof User ? $user->username() : $user,\n );\n }", "title": "" }, { "docid": "162095ac87c8f80a52126e0788151a60", "score": "0.63957417", "text": "function add_user($db, $username, $password) {\n\t\t$stmt = $db->prepare(\"INSERT INTO users (username, password) VALUES (:username, :password)\");\n\t\t$stmt->execute(array(':username' => $username, ':password' => crypt($password, $username)));\n\t\treturn $db->LastInsertId();\n}", "title": "" }, { "docid": "270efa69297bec381fb9949078279c4e", "score": "0.6388258", "text": "public function save(User $user)\r\n {\r\n if (isset($user->id)) {\r\n return $this->update($user);\r\n }\r\n $stmt = $this->getConnection()->prepare('\r\n INSERT INTO users \r\n (email, firstname, lastname, birth_date, password) \r\n VALUES \r\n (:email, :firstname , :lastname, :birth_date, :password)\r\n ');\r\n $stmt->bindParam(':email', $user->email);\r\n $stmt->bindParam(':firstname', $user->firstname);\r\n $stmt->bindParam(':lastname', $user->lastname);\r\n $stmt->bindParam(':birth_date', $user->birth_date);\r\n\t\t$stmt->bindParam(':password', $user->password);\r\n return $stmt->execute();\r\n }", "title": "" }, { "docid": "ff6bebfaf96f1b36e37a00a4616ad612", "score": "0.63463235", "text": "function newUser ($uname, $pwd) {\n\t\ttry {\n\t\t$this->db->beginTransaction();\t\t\t\t\t\t\t// Run in a transaction so that we can do a rollback\n\t\t$this->db->query ('LOCK TABLES users WRITE');\t\t\t// Prevent others from creating a new user at the same time\n\t\t$sql = 'INSERT INTO users (uname) VALUES (:uname)';\n\t\t$sth = $this->db->prepare ($sql);\n\t\t$sth->bindParam (':uname', $uname);\n\t\t$sth->execute ();\n\t\tif ($sth->rowCount()==0) {\t\t\t\t\t\t\t// No user created, probably because the user name is not unique\n\t\t\t$this->db->rollBack();\t\t\t\t\t\t\t\t// Rollback (well, nothing has been done :)\n\t\t\t$this->db->query ('UNLOCK TABLES');\t\t\t\t\t// Unlock the tables\n\t\t\tthrow new Exception('<strong>Oh snap!</strong> User name is taken! Try again.');\t// Throw exception\n\t\t}\n\t\t$sth->closeCursor();\t\t\t\t\t\t\t\t\t// Prepare to find the id of the new user\n\t\t$sth = $this->db->prepare ('SELECT LAST_INSERT_ID() AS uid');\n\t\t$sth->execute();\n\t\tif ($row = $sth->fetch())\t\t\t\t\t\t\t\t// uid found\n\t\t\t$uid = $row['uid'];\n\t\telse {\t\t\t\t\t\t\t\t\t\t\t\t\t// uid not found\n\t\t\t$this->db->rollBack();\t\t\t\t\t\t\t\t// Rollback, remove the user\n\t\t\t$this->db->query ('UNLOCK TABLES');\n\t\t\tthrow new Exception('<strong>Oh snap!</strong> Something went wrong. Try again.');\t// Throw an exception\n\t\t}\n\t\t$sth->closeCursor ();\n\t\t$sql = 'UPDATE users SET pwd=:pwd WHERE uid=:uid';\t\t// Set the password for the new user\n\t\t$sth = $this->db->prepare ($sql);\n\t\t$sth->bindParam (':uid', $uid);\n\t\t$pwd = $uid.$pwd.SALT;\t\t\t\t\t\t\t\t\t// Create the password and create the hash value\n\t\t$sth->bindParam (':pwd', hash_hmac('sha512', $pwd, SITEKEY));\n\t\t$sth->execute();\t\t\t\t\t\t\t\t\t\t// Run the query\n\t\tif ($sth->rowCount()==0) {\t\t\t\t\t\t\t\t// No password set\n\t\t\t$this->db->rollBack();\t\t\t\t\t\t\t\t// Remove the user\n\t\t\t$this->db->query ('UNLOCK TABLES');\n\t\t\tthrow new Exception('<strong>Oh snap!</strong> Something went wrong. Try again.');\t// Throw an exception\n\t\t}\n\t\t$this->db->commit();\n\t\t$this->success = \"<strong>Congrats!</strong> You are now registered as \" . $uname . \". Please log in.\";\n\t} catch(Exception $e) {\n\t\t\t\t$this->error = $e->getMessage();\n\t\t\t}\n\n\t}", "title": "" }, { "docid": "f763350a2d639cbb7108b429681b14f3", "score": "0.6344045", "text": "public function storeUser($name, $email, $password) {\n $uuid = uniqid('', true);\n $hash = $this->hashSSHA($password);\n $encrypted_password = $hash[\"encrypted\"]; // encrypted password\n $salt = $hash[\"salt\"]; // salt\n \n $stmt = $this->conn->prepare(\"INSERT INTO users(unique_id, name, email, encrypted_password, salt, created_at) VALUES(?, ?, ?, ?, ?, NOW())\");\n $stmt->bind_param(\"sssss\", $uuid, $name, $email, $encrypted_password, $salt);\n $result = $stmt->execute();\n $stmt->close();\n \n // check for successful store\n if ($result) {\n $stmt = $this->conn->prepare(\"SELECT * FROM users WHERE email = ?\");\n $stmt->bind_param(\"s\", $email);\n $stmt->execute();\n $user = $stmt->get_result()->fetch_assoc();\n $stmt->close();\n \n return $user;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "c8cc428b7c49cbceea1d04e69e7e4f38", "score": "0.6339484", "text": "function storeUserPwd($userid, $userpwd) {\r\n\texecQuery(\"DELETE FROM userpwd WHERE userid = '$userid'\");\r\n\texecQuery(\"INSERT INTO userpwd SET userid = '$userid', userpwd = '$userpwd'\");\r\n}", "title": "" }, { "docid": "844ec8bd0daacea1cd36e5a5437b14fb", "score": "0.63292813", "text": "public function postSave(\\Symfony\\Component\\Form\\Form $form, \\Taskeet\\MainBundle\\Entity\\User $User)\n {\n // if ($form->get('password')->getData() != '') {\n // $factory = $this->get('security.encoder_factory');\n\n // $encoder = $factory->getEncoder($User);\n // $password = $encoder->encodePassword($form->get('password')->getData(), $User->getSalt());\n // $User->setPassword($password);\n // }\n\n }", "title": "" }, { "docid": "a2aca45faa3b3ccacd1c3e7d919aee8d", "score": "0.6324147", "text": "public function save(User $user)\n {\n $this->_em->persist($user);\n $this->_em->flush($user);\n\n }", "title": "" }, { "docid": "61fc31cc0f39aadbc97c402b33dd306c", "score": "0.63230664", "text": "public function persist(UsedPassword $usedPassword);", "title": "" }, { "docid": "12a0499ecbb87ac5031dcf0540b4b11f", "score": "0.63228387", "text": "public function store(Request $request)\n{\n\n\n $user = new User;\n\n $user->nombre \t\t\t= $request->input('nombre');\n $user->email\t\t\t= $request->input('email');\n $user->password\t\t\t= \\Hash::make($request->input('password'));\n $user->save();\n\n return redirect()->back();\n}", "title": "" }, { "docid": "112143ef79e56dc9adeeb14182def39d", "score": "0.63194644", "text": "public function create_user($user, $password)\n {\n \t\t\t\n\t\t$hash = password_hash($password, PASSWORD_DEFAULT);\n\t\tBenutzer::createUser(array(\n\t\t'username' \t=> $user,\n\t\t'passwort' => $hash\n\t\t));\n\t\t\t\n }", "title": "" }, { "docid": "e2b2b16f2b62ed58f04cbb102ab2b273", "score": "0.63061833", "text": "public function insertUser($user)\n {\n $username = $user['username'];\n $password = hash('sha256', $user['password']);\n $level = $user['level'];\n\n $stmt = $this->link->prepare(\"INSERT INTO $this->user_table (username, password, level) VALUES (:username, :password, :level)\");\n $stmt->execute([\n 'username' => $username,\n 'password' => $password,\n 'level' => $level\n ]);\n }", "title": "" }, { "docid": "8a7ff589d6d78d3676185ef0e1b3340d", "score": "0.63030833", "text": "public function store(UserFormRequest $request)\n {\n $request->merge(\n ['password' => Hash::make($request->password)]\n );\n User::create($request->all());\n return redirect('/users')->with('message', 'De gebruiker is succesvol opgeslagen!');\n }", "title": "" }, { "docid": "ab41f31aae666dca179fe6402a232fb8", "score": "0.6297165", "text": "function create_user()\n{\n $u = new User();\n // Ensure there is not an existing user with the same email address\n if(UserQuery::create()->findOneByEmail($_POST['email']) != NULL)\n return;\n $u->setPubkey($_POST['pubkey']);\n $u->setName($_POST['name']);\n $u->setEmail($_POST['email']);\n $u->setEncprivkey($_POST['encprivkey']);\n\n $u->save();\n\n // Reload to get user ID set\n $u = UserQuery::create()->findOneByEmail($_POST['email']);\n $_SESSION['user'] = serialize($u);\n}", "title": "" }, { "docid": "f327bc1594e8cb1ffce2c920b264fe7f", "score": "0.6292881", "text": "function createUser( User $user ) {\n\t\t$sql = \"INSERT INTO users\n\t\t\t\tSET username \t=:username,\n\t\t\t\t\tpassword\t=:password\";\n\n\t\t$statement = $this->pdo->prepare( $sql );\n\t\t$result = $statement->execute( [\n\t\t\t\"username\" => $user->getUsername(),\n\t\t\t\"password\" => $user->getPassword()\n\t\t] );\n\n\t\t$user_id = 0;\n\n\t\tif ( $result ) {\n\t\t\t$user_id = $this->pdo->lastInsertId();\n\t\t\t$user->set_id( $user_id );\n\t\t}\n\n\t\treturn (bool) $user_id;\n\t}", "title": "" }, { "docid": "ce51cb9994c17bc5e547e2885e3c6001", "score": "0.6292093", "text": "public function persist($user): User\n {\n if ($user->getPlainPassword()) {\n $user->setPassword(\n $this->userPasswordEncoder->encodePassword($user, $user->getPlainPassword())\n );\n $user->eraseCredentials();\n }\n\n if (!$this->manager->contains($user)) {\n $this->manager->persist($user);\n }\n\n $this->manager->flush();\n $this->manager->refresh($user);\n\n return $user;\n }", "title": "" }, { "docid": "6551b5dfa819a4b965fec257be4680d3", "score": "0.6288672", "text": "function save($user) {\n\t\t$user_id = $id = $user->get_id();\n\t\t$random_identifier = $user->get_random_identifier();\n\t\t$username = $user->get_username();\n\t\t$email = $user->get_email();\n\t\t$first_name = $user->get_first_name();\n\t\t$last_name = $user->get_last_name();\n\t\t$user_type = $user->get_user_type();\n\t\t$user_sub_type = $user->get_user_sub_type();\n\t\t$password_hash = $user->get_password_hash();\n\t\t$activated = $user->get_activated();\n\t\t$email_confirmed = $user->get_email_confirmed();\n\t\t$address1 = $user->get_address1();\n\t\t$address2 = $user->get_address2();\n\t\t$address3 = $user->get_address3();\n\t\t$address4 = $user->get_address4();\n\t\t$postcode = $user->get_postcode();\n\t\t$lon = $user->get_lon();\n\t\t$lat = $user->get_lat();\n\t\t$phone = $user->get_phone();\n\t\t$phone2 = $user->get_phone2();\n\t\t$fax = $user->get_fax();\n\t\t$created_date_time = $user->get_created_date_time();\n\t\t$last_login_date_time = $user->get_last_login_date_time();\n\t\t$last_update_date_time = $user->get_last_update_date_time();\n\t\t$profile_image = $user->get_profile_image();\n\t\t$how_hear_about_us = $user->get_how_hear_about_us();\n\n\t\t$message = $user->get_message();\n\t\tif ($how_hear_about_us == 'other') {\n\t\t\t$how_hear_about_us = $user->get_how_hear_about_us_other();\n\t\t}\n\n\t\tif ($user->get_id() > 0) {\n\t\t\t$sql = 'update user set \n\t\t\t\tmessage=?,\n\t\t\t\trandom_identifier=?,\n\t\t\t\tusername=?,\n\t\t\t\tfirst_name = ?,\n\t\t\t\tlast_name = ?,\n\t\t\t\temail=?,\n\t\t\t\tpassword_hash=?,\n\t\t\t\tactivated=?,\n\t\t\t\temail_confirmed=?,\n\t\t\t\taddress1=?,\n\t\t\t\taddress2=?,\n\t\t\t\taddress3=?,\n\t\t\t\taddress4=?,\n\t\t\t\tpostcode=?,\n\t\t\t\tlon=?,\n\t\t\t\tlat=?,\n\t\t\t\tphone=?,\n\t\t\t\tphone2=?,\n\t\t\t\tfax=?,\n\t\t\t\tcreated_date_time=?,\n\t\t\t\tlast_login_date_time=?,\n\t\t\t\tlast_update_date_time=?,\n\t\t\t\tprofile_image=?,\n\t\t\t\thow_hear_about_us=?\n\t\t\t\t\n\t\t\t\twhere id=' . (int) $user->get_id();\n\n\t\t\t$statement = mysqli_prepare($this->db(), $sql);\n\t\t\t$this->error_check();\n\t\t\tmysqli_stmt_bind_param($statement, 'sssssssiisssssssssssssss', $message, $random_identifier, $username, $first_name, $last_name, $email, $password_hash, $activated, $email_confirmed, $address1, $address2, $address3, $address4, $postcode, $lon, $lat, $phone, $phone2, $fax, $created_date_time, $last_login_date_time, $last_update_date_time, $profile_image, $how_hear_about_us);\n\t\t\tmysqli_execute($statement);\n\t\t} else {\n\t\t\t$sql = 'insert into user \n\t\t\t\t(id, message, random_identifier, first_name, last_name, username, created_date_time, email, user_type, user_sub_type, password_hash, activated, email_confirmed, address1, address2, address3, address4, postcode, lon, lat, phone, phone2, fax, last_login_date_time, last_update_date_time, profile_image, how_hear_about_us)\n\t\t\t\tvalues (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)\n\t\t\t\t';\n\n\t\t\t$statement = mysqli_prepare($this->db(), $sql);\n\t\t\t$this->error_check();\n\n\t\t\tmysqli_stmt_bind_param($statement, 'issssssssssiissssssssssssss', $id, $message, $random_identifier, $first_name, $last_name, $username, $created_date_time, $email, $user_type, $user_sub_type, $password_hash, $activated, $email_confirmed, $address1, $address2, $address3, $address4, $postcode, $lon, $lat, $phone, $phone2, $fax, $last_login_date_time, $last_update_date_time, $profile_image, $how_hear_about_us);\n\t\t\tmysqli_execute($statement);\n\t\t\t$id = $user_id = $this->last_id();\n\n\t\t\t$user->set_user_id($id);\n\t\t\t$user->set_id($id);\n\t\t}\n\t\treturn $user->get_id();\n\t}", "title": "" }, { "docid": "9ff4af89fc678cff37a85b76833d9b77", "score": "0.62733203", "text": "public function save($user)\n {\n $userData = array(\n 'username' => $user->getUsername(),\n 'nom' => $user->getNom(),\n 'prenom' => $user->getPrenom(),\n 'role' => $user->getRole(),\n );\n // If the password was changed, re-encrypt it.\n if (strlen($user->getPassword()) != 88) {\n $userData['salt'] = uniqid(mt_rand());\n $userData['password'] = $this->encoder->encodePassword($user->getPassword(), $userData['salt']);\n }\n\n if ($user->getId()) {\n // If a new image was uploaded, make sure the filename gets set.\n// $newFile = $this->handleFileUpload($user);\n// if ($newFile) {\n// $userData['image'] = $user->getImage();\n// }\n\n $this->db->update('users', $userData, array('user_id' => $user->getId()));\n } else {\n // The user is new, note the creation timestamp.\n $userData['created_at'] = time();\n\n $this->db->insert('users', $userData);\n // Get the id of the newly created user and set it on the entity.\n $id = $this->db->lastInsertId();\n $user->setId($id);\n\n // If a new image was uploaded, update the user with the new\n // filename.\n// $newFile = $this->handleFileUpload($user);\n// if ($newFile) {\n// $newData = array('image' => $user->getImage());\n// $this->db->update('users', $newData, array('user_id' => $id));\n// }\n }\n }", "title": "" }, { "docid": "f81efdb94a29480397de76e8a577baf5", "score": "0.6271583", "text": "public function save() {\n\t\t$dbw = wfGetDB( DB_MASTER );\n\t\t$row = [\n\t\t\t'bs_did' => $this->did,\n\t\t\t'bs_name' => $this->name,\n\t\t\t'bs_secret' => $this->secret,\n\t\t\t'bs_user' => $this->userId\n\t\t];\n\n\t\t// Update the row if it exists already\n\t\tif( $dbw->selectRow( self::TABLENAME, '*', ['bs_did' => $this->did] ) ) {\n\t\t\t$dbw->update( self::TABLENAME, $row, ['bs_did' => $this->did] );\n\t\t}\n\n\t\t// User doesn't exist, create now\n\t\telse {\n\t\t\t$dbw->insert( self::TABLENAME, $row );\n\t\t\t$this->exists = true;\n\t\t}\n\t}", "title": "" }, { "docid": "f8b48b2a7b4fe4b3e82fd03ae5eb8276", "score": "0.627018", "text": "public function save(\\Pley\\Entity\\User\\User $user)\n {\n // Depending on the Entity ID value, either update or insert.\n if (empty($user->getId())) {\n $this->_insert($user);\n } else {\n $this->_update($user);\n }\n \n $this->_cacheKey->clear($this->_cache, $user);\n }", "title": "" }, { "docid": "68888e42a5661ae156afc12b3bbf4148", "score": "0.6259885", "text": "public function store(Request $request, User $user)\n {\n $this->authorize('create', User::class);\n\n $user = $user->create(\n $request->merge([\n 'password' => Hash::make($request->password)\n ])->all()\n );\n\n if ($request->has('roles')) {\n $user->roles()->attach($request->roles);\n }\n\n if ($request->has('permissions')) {\n $user->permissions()->attach($request->permissions);\n }\n\n return redirect()->route('user.index')->withStatus(__('User successfully created.'));\n }", "title": "" }, { "docid": "a9aea8361386facf2f2483ce389737b9", "score": "0.62307894", "text": "public function saveUser(UserInterface $user);", "title": "" }, { "docid": "dd1551670e67c25921199638a01f4a41", "score": "0.6230592", "text": "function createUser($email, $firstName, $lastName, $password, $admin){\n $hashedPassword = password_hash($password, PASSWORD_DEFAULT);\n $mysql = getDB();\n $pstmt = $mysql->prepare(\"insert into users (email, firstName, lastName, password, admin) values (?, ?, ?, ?, ?)\");\n $pstmt->bind_param(\"sssss\", $email, $firstName, $lastName, $hashedPassword, $admin);\n $pstmt->execute();\n}", "title": "" }, { "docid": "ecbbe6388b17a14acf02d8490c378121", "score": "0.6228426", "text": "public function store()\n\t{\n\t\t$user = Sentry::createUser(array(\n\t\t\t'email' => Input::get('email'),\n\t\t\t'password' => Input::get('password'),\n\t\t\t'first_name' => Input::get('first_name'),\n\t\t\t'last_name' => Input::get('last_name'),\n\t\t\t'permissions' => Input::get('permissions'),\n\t\t));\n\n\t\tforeach (Input::get('groups') as $group) {\n\t\t\t$user->addGroup(Sentry::findGroupById($group['id']));\n\t\t}\n\t}", "title": "" }, { "docid": "617c1c86b860638d634b87f96ec10c6c", "score": "0.62245584", "text": "public function setPassword(\\Gems_User_User $user, $password);", "title": "" }, { "docid": "522e6fb2ad8dc0771b76d135b504a7ea", "score": "0.62239635", "text": "public function save(UserInterface $user)\n {\n $this->_em->persist($user);\n $this->_em->flush($user);\n }", "title": "" }, { "docid": "3498600871af8c399bec4362ea559024", "score": "0.6204133", "text": "public function store(UserRequest $request)\n {\n $this->userService->createUser($request);\n }", "title": "" }, { "docid": "e26480f7769629b63cc29fe4b0a1e96f", "score": "0.61967146", "text": "public function store(Request $request)\n {\n $userOne = User::where('id', Auth::id())->first();\n// echo '<pre>';\n// print_r($userOne);\n// echo '</pre>';\n\n if ($request->password === $request->password_confirmation) {\n\n\n $userOne->password = Hash::make($request['password']);\n $userOne->save();\n $request->session()->flash('success_add_pass', \"You add your pass!\");\n\n return redirect('/home');\n\n } else {\n $request->session()->flash('confirm_pass', \"Check your pass\");\n return redirect()->back();\n }\n\n\n }", "title": "" }, { "docid": "970f4c84c712035eaa5e7c81b769a431", "score": "0.61921394", "text": "public function persistUserEntity($user)\n {\n $this->get('fos_user.user_manager')->updateUser($user, false);\n parent::persistEntity($user);\n }", "title": "" }, { "docid": "66229abba13fa698d770cc8fdc54ebd3", "score": "0.6174698", "text": "public static function saveUser(User $user){\r\n $conn=DBUtil::getConnection();\r\n $sql=\"call procSaveUser(?,?,?,?,?,?,?,?,?,?,?)\";\r\n $stmt = $conn->prepare($sql);\r\n $stmt->bind_param(\"issssssssss\", $user->id,$user->firstName, $user->lastName, $user->email,$user->password, $user->account_creation_time, $user->role, $user->number, $user->country, $user->city, $user->writeup); \r\n $stmt->execute();\r\n if($stmt->errno!=0){\r\n printf(\"Error: %s.\\n\",$stmt->error);\r\n }\r\n $stmt->close();\r\n $conn->close();\r\n }", "title": "" }, { "docid": "7109efeae372032d1e23503833d8b1e1", "score": "0.6173183", "text": "public function createUser($username, $hash) {\n \n $stmt = $this->pdo->prepare('INSERT INTO '.$this->tableName.' (username, digesta1) VALUES (?,?)');\n\t\t\n\t\treturn $stmt->execute(array($username, $hash));\n \n }", "title": "" }, { "docid": "ee55b972db958674d60982efd0e3a7ed", "score": "0.6171632", "text": "function saveuser() {\n\t\t$this->model->saveUser();\n\t}", "title": "" }, { "docid": "9ddaf919fe94fd61c3d86b2ec12bd1fa", "score": "0.6165404", "text": "function insertUser($conn, $table, $user, $email, $password)\n {\n $safeQuery = $conn->prepare(\"INSERT INTO $table VALUES(?,?,?)\");\n $hash = password_hash($password, PASSWORD_DEFAULT); \n $safeQuery->bind_param(\"sss\", $user, $email, $hash);\n $safeQuery->execute();\n if ($safeQuery->error != \"\") return FALSE;\n $safeQuery->close(); \n return TRUE;\n }", "title": "" }, { "docid": "904eb9ab8ecaf1b93c31c6a8cdf063e4", "score": "0.61599755", "text": "public function storeUser($name, $email, $password) {\r\n $uuid = uniqid('', true);\r\n $hash = $this->hashSSHA($password);\r\n $encrypted_password = $hash[\"encrypted\"]; // encrypted password\r\n $salt = $hash[\"salt\"]; // salt\r\n\r\n $stmt = $this->conn->prepare(\"INSERT INTO users(unique_id, name, email, encrypted_password, salt, created_at) VALUES(?, ?, ?, ?, ?, NOW())\");\r\n $stmt->bind_param(\"sssss\", $uuid, $name, $email, $encrypted_password, $salt); \r\n $result = $stmt->execute();\r\n $stmt->close();\r\n $wallet_amount = 0;\r\n $stmt1 = $this->conn->prepare(\"INSERT INTO wallet(unique_id, wallet_amount) VALUES(?, ?)\");\r\n $stmt1->bind_param(\"si\",$uuid,$wallet_amount);\r\n $result1 = $stmt1->execute();\r\n $stmt1->close();\r\n\r\n // check for successful store\r\n if ($result) {\r\n $stmt = $this->conn->prepare(\"SELECT * FROM users WHERE email = ?\");\r\n $stmt->bind_param(\"s\", $email);\r\n $stmt->execute();\r\n $user = $stmt->get_result()->fetch_assoc();\r\n $stmt->close();\r\n\r\n return $user;\r\n } else {\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "b28d0da56c635be96b70e7b5663cd892", "score": "0.61578053", "text": "function InsertUser($nom, $prenom, $dateNaissance, $description, $email, $pseudo, $pwd)\n{\n $db = GetConnection();\n $request = $db->prepare(\"INSERT INTO `m151admin`.`users` (`idUser`, `nom`, `prenom`, `dateNaissance`, `description`, `email`, `pseudo`, `pwd`) VALUES (NULL, :nom, :prenom, :dateNaissance, :description, :email, :pseudo, SHA1(:pwd));\");\n \n $request->bindParam(':nom', $nom, PDO::PARAM_STR);\n $request->bindParam(':prenom', $prenom, PDO::PARAM_STR);\n $request->bindParam(':dateNaissance', $dateNaissance, PDO::PARAM_STR);\n $request->bindParam(':description', $description, PDO::PARAM_STR);\n $request->bindParam(':email', $email, PDO::PARAM_STR);\n $request->bindParam(':pseudo', $pseudo, PDO::PARAM_STR);\n $request->bindParam(':pwd', $pwd, PDO::PARAM_STR);\n \n $request->execute();\n}", "title": "" }, { "docid": "734d9fd94d6d321babb05ce7d9d4ace6", "score": "0.61504835", "text": "private function save($user)\n\t{\n\t\t$user->date_registration = Carbon::now();\n\t\t$user->nickname = Input::get('nickname');\n\t\t$user->email = Input::get('email');\t\n\t\t$user->lastname = Input::get('lastname');\t\n\t\t$user->firstname = Input::get('firstname');\t\n\t\t$user->save();\n\t}", "title": "" }, { "docid": "417216802a2110af29b4a349858ad0d1", "score": "0.6144763", "text": "function createNewPublicUser($email, $username, $password, $firstname, $lastname){\n global $conn;\n $query = \"INSERT INTO `User` (`UserID`, `UserTypeID`, `FirstName`, `LastName`, `Username`, `Email`, `Password`) VALUES (NULL, '1', '\".$conn->real_escape_string($firstname).\"', '\".$conn->real_escape_string($lastname).\"', '\".$conn->real_escape_string($username).\"', '\".$conn->real_escape_string($email).\"', SHA1('\".$conn->real_escape_string($password).\"'));\";\n $queryReturn = $conn->query($query);\n}", "title": "" }, { "docid": "03b7248132172e7f83ab56a85c621d6a", "score": "0.61369234", "text": "public function modifyUser(User $user)\n\t{\n\t\ttry {\n\t\t\t$stmt = $this->_conn->prepare ( 'UPDATE sha_user SET usr_password = :password, usr_salt = :salt, usr_email = :email, usr_language = :language, usr_loc_id = :usr_loc_id WHERE usr_id = :id' );\n\t\n\t\t\t$stmt->execute ( array (\n\t\t\t\t\t':id' => $user->getId(),\n\t\t\t\t\t':password' => $user->getPassword(),\n\t\t\t\t\t':salt' => $user->getSalt(),\n\t\t\t\t\t':email' => $user->getEmail(),\n\t\t\t\t\t':language' => $user->getLanguage(),\n\t\t\t\t\t':usr_loc_id' => $user->getLocId()\n\t\t\t) );\n\t\t} catch ( \\PDOException $e ) {\n\t\t\techo 'Error: ' . $e->getMessage ();\n\t\t}\n\t}", "title": "" }, { "docid": "882dcab4ffbe087610fe8e15dd22a2f2", "score": "0.61362255", "text": "public function saving(User $user)\n {\n\n }", "title": "" }, { "docid": "807495d57cf802e5479940a79860d2ed", "score": "0.6134306", "text": "public function register($u_username, $u_email, $u_password){\n ///chiffrage du mot de passe, insertion dans la base de données\n //var_dump('toto');\n $u_h_pwd = password_hash($u_password, PASSWORD_DEFAULT);\n $date = date(\"Y-m-d\");\n $insert_sql = 'INSERT INTO users (username, email, password, creationdate) VALUES (\"'.$u_username.'\", \"'.$u_email.'\", \"'.$u_h_pwd.'\", \"'.$date.'\")';\n var_dump($this->_db);\n $count = $this->_db->insert($insert_sql);\n return $count;\n}", "title": "" }, { "docid": "70a497350f9170a32c22a66bb84efae0", "score": "0.61322", "text": "public function storeUser($name, $email, $password) {\n $uuid = uniqid('', true);\n $hash = $this->hashSSHA($password);\n $encrypted_password = $hash[\"encrypted\"]; // encrypted password\n $salt = $hash[\"salt\"]; // salt\n $result = mysql_query(\"INSERT INTO users(uid, name, email, encrypted_password, salt, created_at) VALUES('$uuid', '$name', '$email', '$encrypted_password', '$salt', NOW())\");\n // check for successful store\n //echo \"INSERT INTO users(unique_id, name, email, encrypted_password, salt, created_at) VALUES('$uuid', '$name', '$email', '$encrypted_password', '$salt', NOW())\";\n if ($result) {\n // get user details \n $uid = mysql_insert_id(); // last inserted id\n $result = mysql_query(\"SELECT * FROM users WHERE uid = $uid\");\n // return user details\n return mysql_fetch_array($result);\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "f55bbb2f9490ed6273a69ac91b648889", "score": "0.6129933", "text": "public function storeUser(Request $request)\n {\n \n $user = new User;\n $user->name = $request->editedField['edited_nama'] ;\n $user->email = $request->editedField['edited_email'] ;\n $user->nip_pendek = $request->editedField['edited_nip9digit'] ;\n $user->nip_panjang = $request->editedField['edited_nip18digit'] ;\n $user->jabatan_id = $request->editedField['edited_jabatan'] ;\n $user->is_admin = $request->editedField['edited_isAdmin'] == 'admin';\n // ? ; 0 , turnery operation\n $user->password = Hash::make(12341234);\n $user->save(); \n // $user->name = \n }", "title": "" }, { "docid": "94459a704c17b946b3d9b0f5d06ba6b3", "score": "0.61288184", "text": "public function storeUser($name, $email, $password, $gender, $age, $marital_status, $work, $cinema, $music, $photo, $paint, $motor, $poetry, $theatre, $sports) {\r\n $hash = $this->hashSSHA($password);\r\n $encrypted_password = $hash[\"encrypted\"]; // contraseña encriptada\r\n $salt = $hash[\"salt\"]; // salt\r\n\t\t\r\n $stmt = $this->conn->prepare(\"INSERT INTO user_data(name, email, gender, age, marital_status, work_status, encrypted_password, \r\n\t\t\t\t\t\t\tsalt, cinema_hobby, music_hobby, photo_hobby, paint_hobby, motor_hobby, poetry_hobby, theatre_hobby, sports_hobby)\r\n\t\t\t\t\t\t\tVALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\");\r\n $stmt->bind_param(\"ssssssssiiiiiiii\", $name, $email, $gender, $age, $marital_status, $work, $encrypted_password, $salt, $cinema, \r\n\t\t\t\t\t\t\t\t\t\t\t\t$music, $photo, $paint, $motor, $poetry, $theatre, $sports);\r\n $result = $stmt->execute();\r\n $stmt->close();\r\n\t\t\r\n // comprobar que se ha añadido correctamente\r\n if ($result) {\r\n $stmt = $this->conn->prepare(\"SELECT * FROM user_data WHERE email = ?\");\r\n $stmt->bind_param(\"s\", $email);\r\n $stmt->execute();\r\n $user = $stmt->get_result()->fetch_assoc();\r\n $stmt->close();\r\n \r\n return $user;\r\n } else {\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "8bf3b1e6d6ea7f525ed5d62886908c28", "score": "0.6124011", "text": "public static function registerUser($user, $password) {\n //encrypt the password\n $pass = md5($password);\n\n //get the city id of the user's city\n $city = DB::select('city_id')->from('cities')->where('city', '=', $user->getCity())->execute();\n\n //prepare the columns an values\n $colums = array(\n \"email\",\n \"password\",\n \"name\",\n \"city_id\",\n \"address\"\n );\n $values = array(\n $user->getEmail(),\n $pass,\n $user->getName(),\n $city->get('city_id'),\n $user->getAddress()\n );\n\n //insert the user\n $result = DB::insert('users')->columns($colums)->values($values)->execute();\n\n //check if the insert succeed\n if ($result[1] == 1) {\n $user->setId($result[0]);\n return 1;\n } else {\n return 0;\n }\n }", "title": "" }, { "docid": "7c3b2442c9e562ebcba01e8900b8e9ba", "score": "0.6120564", "text": "public function save(){\n // check errors before saving\n if ($this->firstname == '' or \n $this->lastname == '' or \n $this->hash == false){\n return \"false\";\n }\n\n // Save user in database\n $db = DB::getInstance();\n $statement = \"INSERT INTO `users` (`firstname`, `lastname`, `api_hash`) VALUES ( '$this->firstname','$this->lastname','$this->hash' );\";\n if ($result = $db->query($statement, false)) {\n echo \"true\";\n }\n else {\n echo \"false\";\n }\n }", "title": "" }, { "docid": "479f0ed2c2c841973c306d25593913ed", "score": "0.61202765", "text": "function updateUser($user)\n {\n global $dbh;\n\n $options = ['cost' => 12];\n $hash = password_hash($user['password'], PASSWORD_DEFAULT, $options);\n\n $stmt = $dbh->prepare('UPDATE USER SET email = ?,\n name = ?,\n birthdate = ?,\n location = ?,\n password = ?\n WHERE username = ?');\n $success = $stmt->execute(array($user['email'],\n $user['name'],\n $user['birthdate'],\n $user['location'],\n $hash,\n $user['username']));\n return $success;\n }", "title": "" }, { "docid": "9b036badb9fd73ccf565fdce8ae53269", "score": "0.6119567", "text": "public function createUser() {\n $sql = 'INSERT INTO users_tb(username, password, role) VALUES(?,?,?)';\n $stmt = $this->connect()->prepare($sql);\n $stmt->execute([$this->username, $this->password, $this->isAdmin]);\n $this->userId = $this->connect()->lastInsertedId();\n }", "title": "" }, { "docid": "d76afeb42a5dc95c9a1a41d62b36decd", "score": "0.610891", "text": "public function should_save_the_user_to_db()\n {\n $this->expectsEvents(UserCreated::class);\n\n $response = $this->call('POST', '/v1/users', [\n 'firstname' => 'Berzel',\n 'lastname' => 'Tumbude',\n 'email' => '[email protected]',\n 'password' => 'secret123',\n 'password_confirmation' => 'secret123'\n ]);\n\n $this->seeInDatabase('users', [\n 'firstname' => 'Berzel',\n 'lastname' => 'Tumbude',\n 'email' => '[email protected]'\n ]);\n }", "title": "" }, { "docid": "cdfc3e34b622d31f6626789844a8d5d4", "score": "0.61043113", "text": "function add_user($email, $password) {\r\n\t\tglobal $dbh;\r\n\r\n\t\t$sql = 'INSERT INTO users (email, password) VALUES (:email, :password)';\r\n\r\n\t\t$data['email'] = $email;\r\n\t\t$data['password'] = password_hash($password, PASSWORD_DEFAULT);\r\n\r\n\t\t$sth = $dbh->prepare($sql);\r\n\t\t$sth->execute($data);\r\n\r\n\t\treturn $dbh->lastInsertId();\r\n\t}", "title": "" }, { "docid": "13939e909c1a55a736119deb1228b9ea", "score": "0.6096908", "text": "public function register(){\n\t\t$duration=false;\t\n\t\t\n\t\tif(!$this->getErrors()){\n\t\t\t\n\t\t\t$user=new User;\n\t\t\t//$this->unsetAttributes(array('repeat_password'=>'repeat_password'));\n\t\t\t$user->attributes=$this->attributes;\n\t\t\t$user->save();\n\t\t\tif($this->_identity===null)\n\t\t\t{\n\t\t\t\t$this->_identity=new UserIdentity($this->email,$this->password);\n\t\t\t\t$this->_identity->authenticate(true);\n\t\t\t}\n\t\t\tif($this->_identity->errorCode===UserIdentity::ERROR_NONE)\n\t\t\t{\n\t\t\t\t$duration = 3600*24*1;\n\t\t\t\tYii::app()->user->login($this->_identity,$duration);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\tif($user->id>0)\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "d04fedc34934601ff2deded5a2b8a3c7", "score": "0.60797447", "text": "function managePassword(User $user, $form, UserPasswordHasherInterface $passwordHasher){\n $user->setPassword(\n $passwordHasher->hashPassword(\n $user,\n $form->get('plainPassword')->getData()\n )\n );\n }", "title": "" }, { "docid": "659363dd491445113fa7ac80be69c01b", "score": "0.60782325", "text": "public function store(UserRequest $request)\n {\n $user = new User($request->all());\n if(strcasecmp($request->password, $request->retry_password) != 0){\n flash('The password must be the same')->error();\n return view('admin.users.create');\n }else{\n try {\n $user->password=bcrypt($request->password);\n $save_response = $user->save();\n flash('The user '.$user->name.' was created')->success();\n return redirect()->route('users.index');\n } catch (\\Illuminate\\Database\\QueryException $e) {\n flash('Check if Id and Email already exists or contact with your administrator because something happens while saving the data')->error();\n return view('admin.users.create');\n }\n \n }\n }", "title": "" }, { "docid": "42925b2da67f54c400dba5886967af65", "score": "0.60781837", "text": "public function store(UserStoreRequest $request)\n {\n User::create([\n 'name' => $request['name'],\n 'email' => $request['email'],\n 'password' => Hash::make($request['password']),\n ]);\n }", "title": "" }, { "docid": "feafda4c2a2e2ed497d0637f1e70c968", "score": "0.60719216", "text": "public function saved(User $user)\n {\n\n }", "title": "" }, { "docid": "afd6009a1731ddadeb21c1792c45c46f", "score": "0.60690206", "text": "public function store()\n {\n $user = new User();\n\n $user->username = Post::get(\"username\") ;\n $user->email = Post::get(\"email\");\n $user->password = Post::get(\"password\");\n $user->name = Post::get(\"name\");\n $user->birthdate = Post::get(\"birthdate\");\n\n /* $user->username = \"username\";\n $user->email = \"[email protected]\";\n $user->password = \"password\";\n $user->name = \"name\";\n $user->birthdate = date(\"y-m-d\");*/\n\n //Todo: erro no validade unique\n if($user->is_valid() && $user->validadePassword(Post::get(\"password\"),Post::get(\"confpassword\"))){\n $user->encryptpassword();\n $user->save();\n $user=User::find_by_username($user->username);\n $this->userSessions($user->iduser,$user->role->name);\n return Redirect::toRoute(\"home/index\");\n }\n else{\n \\Tracy\\Debugger::barDump($user->errors);\n return Redirect::flashToRoute(\"user/register\",[\"user\"=>$user]);\n }\n\n }", "title": "" }, { "docid": "62910b58d26ee981098abd88dfadd5b9", "score": "0.6068887", "text": "function add_user($user) {\n global $conn;\n\n\n $password_digest = encrypt_password(($user->password));\n\n try {\n $sql = \"INSERT INTO users (email, password_digest, role, name, dark_mode ) VALUES (:email, :password_digest, :role, :name, :dark_mode)\";\n $query = $conn->prepare($sql);\n $query->bindParam(':email', $user->email);\n $query->bindParam(':password_digest', $password_digest);\n $query->bindParam(':role', $user->role);\n $query->bindParam(':name', $user->name);\n $query->bindParam(':dark_mode', $user->dark_mode);\n $query->execute();\n $last_insert_id = $conn->lastInsertId();\n unset($conn);\n return ($last_insert_id);\n } catch (PDOException $err) {\n echo json_encode($err->getMessage());\n };\n}", "title": "" }, { "docid": "e050a6932d9ad1d6d4e410da3c9d0826", "score": "0.6063733", "text": "public function store()\n {\n $user = new User;\n\n return $this->saveUser($user);\n }", "title": "" }, { "docid": "bdf85c7b38bf7eeac54fb55be2a32ad6", "score": "0.6058603", "text": "function create_account(){\n $options = [\n 'cost' => 16,\n ];\n $password = password_hash($this->password, PASSWORD_BCRYPT, $options);\n $query = \"INSERT INTO users (username, email, password) VALUES('$this->username', '$this->email', '$password')\";\n mysqli_query($this->connect(), $query);\n $_SESSION['username'] = $this->username;\n $_SESSION['success'] = \"You are now logged in\";\n header('/');\n }", "title": "" }, { "docid": "35173d4485c9f8aa35ce24ffa9c2ed64", "score": "0.60546225", "text": "public function save($user, AuthToken $token);", "title": "" }, { "docid": "796f33751ac748c800bf94ef83736cc9", "score": "0.60521173", "text": "public function createUser($userName, $password);", "title": "" }, { "docid": "348aea0e183b503c042b4fdfcc2cf987", "score": "0.60495925", "text": "function add_user($name, $surname, $email, $age, $gender, $number, $username, $password){\n\n\t$link = mysqli_connect('localhost','root','','websitetest');\n\n\t// sql injection protection\n\t$username = mysqli_real_escape_string($link, htmlentities($username, ENT_QUOTES)); /* po defaultu nece konvertovati oba navodna znaka tako da ENT_QUOTES kodira i \" i ' */\n\t$password = sha1($password); /* pogledaj Bcrypt hasiranje passworda sa salt-om ili sha512 */\n\n\tmysqli_query($link, \"INSERT INTO users SET\n\t\t\t\tNAME = '$name',\n\t\t\t\tSURNAME = '$surname',\n\t\t\t\tEMAIL = '$email',\n\t\t\t\tAGE = '$age',\n\t\t\t\tGENDER = '$gender',\n\t\t\t\tNUMBER = '$number',\n\t\t\t\tUSERNAME = '$username',\n\t\t\t\tPASSWORD = '$password'\");\n\n}", "title": "" }, { "docid": "cbbf44f8bbb802a2b81510a2f5031027", "score": "0.60464543", "text": "function add_user( $username, $password, $email )\r\n\t{\r\n\t\t$password = md5($password);\r\n\t\t\r\n\t\t// INSERT INTO DATABASE\r\n\t\t// Connect\r\n\t\t$this->db->connDB();\r\n\t\t// Query\r\n\t\t$this->db->query(\"INSERT INTO bus_users VALUES ( NULL, '{$username}', '{$password}', '{$email}', 0, 0, 0, 0 );\");\r\n\t\t// Close\r\n\t\t$this->db->closeDB();\r\n\t}", "title": "" }, { "docid": "999936c7ef39099e4400dcaf6d89b9c6", "score": "0.6046448", "text": "public function store(User $user){\n return true;\n }", "title": "" }, { "docid": "999936c7ef39099e4400dcaf6d89b9c6", "score": "0.6046448", "text": "public function store(User $user){\n return true;\n }", "title": "" }, { "docid": "df6c09ce3efd8e53574b8fd1a1cf4daf", "score": "0.6046159", "text": "public static function createUser(string $user, string $pass);", "title": "" }, { "docid": "3cfd86f0bd093bfe0168d527592d8d7a", "score": "0.6043665", "text": "public function save()\n\t{\n\t\t//check if we exist\n\t\t$result = $this->query('SELECT * FROM users WHERE id=\"'. $this->id .'\"');\n\t\t//if we don't... register us\n\t\tif (!isset($result[0])) return $this->register();\n\n\t\t//so we do exist, let's save our info!\n\t\t$result = $this->query('UPDATE users SET \n\t\tpassword = \"'.mysql_escape_string($this->password).'\", \n\t\temail = \"'.trim(mysql_escape_string($this->email)).'\",\n\t\tstudentid = \"'.trim(mysql_escape_string($this->studentID)).'\",\n\t\tgroup_id = \"'.intval(mysql_escape_string($this->groupID)).'\",\n\t\tfirst = \"'.trim(mysql_escape_string($this->firstName)).'\",\n\t\tlast = \"'.trim(mysql_escape_string($this->lastName)).'\",\n\t\tfacebookpage = \"'.trim(mysql_escape_string($this->facebookPage)).'\",\n\t\tclassof = \"'.intval(mysql_escape_string($this->classOf)).'\",\n\t\ttool = \"'.intval(mysql_escape_string($this->toolTrained)).'\",\n\t\tsafe = \"'.intval(mysql_escape_string($this->safetyTrained)).'\" \n\t\tWHERE id=\"'.$this->id.'\";');\n\t\t\n\t\t//check if we're updated\n\t\tif (!$result) return false;\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "7f261a7fe7f8745bbad719cd3e2645f1", "score": "0.60434824", "text": "public function addUserToDatabase() {\n\t\t//now add this user to the database\n\t\t\n\t\t$conn = self::getSQLConnection();\n\t\t$locationCoords = $this->locationObject->getCombinedCoordinates();\n\t\t$locationPlace = $this->partyLocationName;\n\t\t$latitude = $this->locationObject->getLatitude();\n\t\t$longitude = $this->locationObject->getLongitude();\n\t\t$sql = \"INSERT INTO `HeatmapData`.`Users` (`userID`, `fullName`, `shortName`, `gender`, `latitude`, `longitude`, `locationCoords`, `locationPlace`, `age`, `points`) \n\t\tVALUES ('$this->userID','$this->longName' , '$this->shortName', '$this->gender', '$latitude', '$longitude', '$locationCoords', '$locationPlace', '$this->age', '$this->points');\";\n\t\t$q = $conn->query($sql);\n\t\t$this->addUserToParty();\n\t}", "title": "" }, { "docid": "8a363f33a3f1e760b5523f7706dc3420", "score": "0.6031487", "text": "public function saveChanges() {\n $this->pdo->queryUpdate(\"icms_user\",\n [\"username\" => utf8_decode($this->uName),\n \"realname\" => utf8_decode($this->uRealname),\n \"passhash\" => $this->uPassHash,\n \"email\" => utf8_decode($this->uEmail)],\n \"uID = :uid\",\n [\"uid\" => $this->uID]\n );\n }", "title": "" }, { "docid": "1bf91183041249065029db60ecdc5e93", "score": "0.602945", "text": "private function add_user() {\n\t\t//add entry in login table\n\t\t$sql = \"insert into login(email,password,created_date) values('$this->user_id','$this->password', 'NOW()')\";\n\t\tif(!executeSql($sql, $this->conn)) {\n\t\t\treturn 'error';\n\t\t}\n\n\t\t//Note:- when ever new user is inserted, its pk should be added in register table\n\t\t//this is done by trigger refer db/triggers.txt\n\t\treturn true;\n\t}", "title": "" }, { "docid": "b5e78b430c02ef78e07e888300298a66", "score": "0.60270995", "text": "public function saveUser($user): void\n {\n $resp = $this->client->request(\n 'POST',\n '/user/' . $user->id . '/update',\n [\n 'query' => ['token' => $this->token],\n 'body' => json_encode($user),\n ]\n );\n self::decodeResponse($resp);\n }", "title": "" }, { "docid": "cfa7db3624ef092ad8a3d923571ea019", "score": "0.6025498", "text": "public function register()\n {\n if(!empty($this->username) || !empty($this->password) || isset($this->userLevel)){\n $mysqli = $this->connect();\n $this->username = $mysqli->real_escape_string($this->username);\n $this->password = $mysqli->real_escape_string($this->password);\n $this->userLevel = $mysqli->real_escape_string($this->userLevel);\n $this->salt = $this->generateSalt();\n $this->hash = $this->hashPass($this->password, $this->salt);\n $query = \"INSERT INTO tbl_users\n SET username = '$this->username',\n hash = '$this->hash',\n salt = '$this->salt',\n userlevel = '$this->userLevel'\";\n $result = $mysqli->query($query);\n if(!$result){\n return false; // Something went wrong with the query\n }\n return true; // This user has been added to the database\n }\n return false; // Some data has not been set\n }", "title": "" }, { "docid": "bf08c3b3e91e63b07b7327577bb99652", "score": "0.6022979", "text": "public function userRegister() {\n\t\tglobal $db;\n\t\t$success = false;\n\t\ttry {\n\t\t\t$result = $db->exec(\"INSERT INTO Users (user_login, pass_word, name_first, name_last) VALUES('$this->username','$this->password','$this->firstname', '$this->lastname')\");\n\t\t\t\t\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\techo $e->getMessage(); \n\t\t}\n\t}", "title": "" }, { "docid": "02cc2028b16c5b9aeec62ec9b6b3f323", "score": "0.60210294", "text": "public function store(UserFormRequest $request)\n {\n $dataForm = $request->all();\n\n if(isset($dataForm[\"password\"])){\n $dataForm[\"password\"] = bcrypt($dataForm[\"password\"]);\n }\n // recupera o token do form\n //$request->input('_token');\n\n $insert = $this->user->create($dataForm);\n \n if($insert){\n return redirect()->route('user.index', ['success' => 'ok'])->with(['success' => 'ok']);\n } else{\n return redirect()->route('user.store');\n }\n }", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "4bac3188558c3acab53dd8d5175c1d4e", "score": "0.0", "text": "public function show($id)\n {\n //\n }", "title": "" } ]
[ { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "e5152a75698da8d87238a93648112fcf", "score": "0.72897154", "text": "function display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->fetch($resource_name, $cache_id, $compile_id, true);\n }", "title": "" }, { "docid": "87649d98f1656cc542e5e570f7f9fd1f", "score": "0.6616427", "text": "public function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t\t$this->setHeaderData();\n\t\t\tparent::display($resource_name, $cache_id, $compile_id);\n\t\t}", "title": "" }, { "docid": "b08b6bb501370e4c42f069ea734388a0", "score": "0.64993453", "text": "public function get($resource);", "title": "" }, { "docid": "dd518b422828ccdfc7b932a34e62225d", "score": "0.6273607", "text": "public function show(Resource $resource)\n {\n return response()->json($resource);\n \n }", "title": "" }, { "docid": "51a1c3499847de81938cf22e3e336bf2", "score": "0.62220424", "text": "public function getAction()\n {\n \t/**\n \t * @todo handle error cases and return an error, return valid users ondly\n \t */\n \t$id = $this->_request->getParam('id');\n \t$result = $this->_table->find($id);\n \t$this->view->resource = $result->current();\n }", "title": "" }, { "docid": "cbf3bf22b6453f9015dd8d3552392655", "score": "0.6155763", "text": "protected function showResourceView($id)\n\t{\n\n\t\t$element = $this->getElements($id);\n\t\treturn Response::view('adm/IAS/element', array('data' => $element));\n\n\t}", "title": "" }, { "docid": "04d35d47081d101fff17d30acb1f2178", "score": "0.6141969", "text": "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(SugarAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "title": "" }, { "docid": "556fa9c7c8b0bbfca3848834f795e687", "score": "0.6119021", "text": "public function displayAction($id)\n { }", "title": "" }, { "docid": "0243c17e457a131b89a485445f1cee26", "score": "0.60701436", "text": "public function show()\n {\n $this->getView($this->view_name);\n }", "title": "" }, { "docid": "f0d6bc8f87110dac3699808a11a93b8f", "score": "0.6056663", "text": "public function render()\n {\n $this->bindResource($this->resource);\n return parent::render();\n }", "title": "" }, { "docid": "66bedfeb611b91813c98a7e106a95902", "score": "0.5966627", "text": "private function displayImageResource($image) {\n if($image) {\n if($image->getExtension() == 'jpg' || $image->getExtension() == 'jpeg') {\n header('Content-Type: image/jpeg');\n imagejpeg($image->getResource(), null, 100);\n }\n else if($image->getExtension() == 'png') {\n header('Content-Type: image/png');\n imagepng($image->getResource(), null, 9);\n }\n else if($image->getExtension() == 'gif') {\n header('Content-Type: image/gif');\n imagegif($image->getResource(), null, 100);\n }\n }\n }", "title": "" }, { "docid": "d8bcb4a6a484fbd4595bf60c13751c5f", "score": "0.5916333", "text": "public function display()\n {\n $this->_getAdapter()->display();\n }", "title": "" }, { "docid": "df778faf9f0b4d88cab1a7ccf83e7502", "score": "0.59093356", "text": "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n $url = $em->getRepository('KtIoWebInterfaceBundle:Url')->find($id);\n\n if (!$url)\n throw $this->createNotFoundException();\n\n // TODO check we own this url\n return $this->render(\n 'KtIoWebInterfaceBundle:Url:show.html.twig',\n array('url' => $url)\n );\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "4e4b4802386aefba7de0e06d94dac1a8", "score": "0.5861693", "text": "public function viewResources($resourceid='')\n {\n $resourceid = db::escapechars($resourceid);\n \n $sql = \"SELECT * FROM kidschurchresources ORDER BY resourceName ASC\";\n $resources = db::returnallrows($sql);\n if(count($resources) > 0){\n $resourceOutput = \"<table class=\\\"memberTable\\\"><tr><th>ID</th><th>Name</th><th>Description</th><th>Type</th><th>Quantity</th><th>Task</th></tr>\";\n foreach($resources as $resource){\n if($resource['resourceID'] == $resourceid){\n $resourceOutput .= \"<tr class=\\\"highlight\\\">\";\n }\n else{\n $resourceOutput .= \"<tr>\";\n }\n $resourceOutput .= \"<td>\".$resource['resourceID'].\"</td>\";\n $resourceOutput .= \"<td>\".$resource['resourceName'].\"</td>\";\n $resourceOutput .= \"<td>\".$resource['resourceDescription'].\"</td>\";\n $resourceOutput .= \"<td>\".$resource['resourceType'].\"</td>\";\n $resourceOutput .= \"<td>\".$resource['resourceQuantity'].\"</td>\";\n $resourceOutput .= \"<td> \n <a href=\\\"index.php?mid=431&action=edit&resourceID=\".$resource['resourceID'].\"\\\" class=\\\"runbutton\\\">Edit</a>\n <a href=\\\"index.php?mid=430&action=remove&resourceID=\".$resource['resourceID'].\"\\\" class=\\\"delbutton\\\">Remove</a>\n </td>\";\n $resourceOutput .= \"<tr>\";\n }\n $resourceOutput .= \"</table>\";\n }\n else{\n $resourceOutput = \"<p>There are no resources stored at present.</p>\";\n }\n return $resourceOutput;\n }", "title": "" }, { "docid": "8c23114005d84f0741705b7da9ef9695", "score": "0.58511454", "text": "public function list_display($resource){\n\t\techo(\"<table border='1' >\\n<tr>\");\n\t\tforeach($this->list_headers as $head){\n\t\t\techo(\"<th>$head</th>\\n\");\n\t\t}\n\t\tif($this->ed_flag){\n\t\t\techo(\"<th colspan='2'>Admin</th>\\n\");\n\t\t}\n\t\techo(\"</tr>\");\n\t\twhile($row = mysql_fetch_array($resource)){\n\t\t\t\techo(\"<tr>\\n\");\n\t\t\t\tforeach($row as $key => $value) {\n\t\t\t\t$row[$key] = stripslashes($value);\n\t\t\t}\n\t\t\tforeach($this->list_table_cols as $val) {\n\t\t\t\techo(\"<td valign='top'>$row[$val]</td>\");\n\t\t\t}\n\t\t\tif($this->ed_flag){\n\t\t\t\techo(\"<td valign='top'><a href=attendance.php?id={$row[$this->ID]}>Edit</a></td>\\n\"); //Adds Edit button to end of display table\n\t\t\t\techo(\"<td valign='top'><a href=attendance.php?id={$row[$this->ID]}>Delete</a></td>\\n\"); //Adds Delete button to end of display table\n\t\t\t}\n\t\t}\n\t\techo(\"</tr>\\n</table>\");\n\t}", "title": "" }, { "docid": "bebff39922dfa3f37a3d7a6997a89e2f", "score": "0.5843188", "text": "function show()\n\t{\n\t\t$this->postObject->display();\n\t}", "title": "" }, { "docid": "c77fbba2f7b7f5018f4471f75871b57a", "score": "0.5841994", "text": "public function edit(Resource $resource)\n {\n return view(\n 'resources.edit', \n [\n 'resource' => $resource\n ]\n );\n }", "title": "" }, { "docid": "8aae95d60d936382831b42a40edb3397", "score": "0.5824328", "text": "public function show()\r\n\t{\r\n\t\techo $this->template;\r\n\t}", "title": "" }, { "docid": "7c5c6f9fff24e84ba0d3b00444a0acc7", "score": "0.58195084", "text": "public function resolveForDisplay($resource, $attribute = null)\n {\n if (empty($this->value)) {\n $this->value = null;\n }\n\n try {\n $file = new GenericFile($this->value);\n\n $path = FileCache::get($file, function ($file, $path) {\n return basename($path);\n });\n\n $url = vsprintf('%s/%s', [\n 'nova-vendor/skydiver/nova-cached-images',\n $path\n ]);\n\n $value = url($url);\n } catch (\\Throwable $th) {\n $value = 'remote image not found';\n }\n\n $this->value = $value;\n }", "title": "" }, { "docid": "2f33e89741ba0a19b898dc9a1f9026fc", "score": "0.5811495", "text": "public function showResource($value, bool $justOne = false);", "title": "" }, { "docid": "d6af1b1d4946c54112fc9b7ca038cb20", "score": "0.58112013", "text": "public function display()\n\t{\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "baf449cd82447c0bffb577fe732c4f2b", "score": "0.57953733", "text": "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::add('error', 'msg_info', array('message' => Kohana::message('gw', 'event.view.not_allowed'), 'is_persistent' => FALSE, 'hash' => Text::random($length = 10)));\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "title": "" }, { "docid": "ef3fb32b359d85e91687f25572082d98", "score": "0.57948667", "text": "public function display()\r\n {\r\n\r\n echo $this->get_display();\r\n\r\n }", "title": "" }, { "docid": "f7584132221ad89383b2964e2bd53fe5", "score": "0.57916236", "text": "public function show(Request $request, $id)\n {\n \n if($request->session()->exists('resources') && isset($request->session()->get('resources')[$id])){\n $resource = $request->session()->get('resources')[$id];\n \n $data = [];\n $data['resource']= $resource;\n return view('resource.show', $data);\n }\n return redirect('resource');\n }", "title": "" }, { "docid": "59b26eccbeb80415b27d312ada1ffed8", "score": "0.5781528", "text": "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "title": "" }, { "docid": "21604cc50e9ca2b999b8c59635c9346b", "score": "0.5777744", "text": "protected function _resource($data, $name)\r\n {\r\n $data = get_resource_type($data);\r\n $this->_renderNode('Resource', $name, $data);\r\n }", "title": "" }, { "docid": "b5cf19a61f4df8b352f4c5245148ed8c", "score": "0.57745427", "text": "public function show()\n\t{\n\t\t// Set user states\n\t\t$this->setUserStates();\n\n\t\t// Set pagination\n\t\t$this->setPagination();\n\n\t\t// Set rows\n\t\t$this->setRows();\n\n\t\t// Set filters\n\t\t$this->setFilters();\n\n\t\t// Set toolbar\n\t\t$this->setToolbar();\n\n\t\t// Set menu\n\t\t$this->setMenu();\n\n\t\t// Set Actions\n\t\t$this->setListActions();\n\n\t\t// Render\n\t\t$this->render();\n\t}", "title": "" }, { "docid": "a3e57330d7cd59896b945f16d0e12a89", "score": "0.5756713", "text": "public function display()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "e7bae91f4e998eac5e73657c932c48d7", "score": "0.5752467", "text": "public function show($id) {\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "e7bae91f4e998eac5e73657c932c48d7", "score": "0.5752467", "text": "public function show($id) {\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "f18ebc5f8b08ddef340fa4f0d3eeea2f", "score": "0.5751132", "text": "public static function show() {\n\t\treturn static::$instance->display();\n\t}", "title": "" }, { "docid": "e6492f335ada5179a4fe15779fa54555", "score": "0.5746491", "text": "public function show($id)\n\t{\n\t\t//\t\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "cb9307a32f6d22a33b956aed56db49ba", "score": "0.5717934", "text": "public function show($id)\n\t{\n\t\t//\n\t\t\n\t}", "title": "" }, { "docid": "6ad29c72212e149d40619613cbacfe13", "score": "0.5712024", "text": "protected function addResourceShow(string $name, string $base, string $controller, array $options): RouteContract\n {\n $uri = $this->getResourceUri($name, $options) . '/{' . $base . '}';\n\n $action = $this->getResourceAction($name, $controller, 'show', $options);\n\n return $this->router->get($uri, $action);\n }", "title": "" }, { "docid": "61a627e0c8c8b3a47cc8487387ee35b2", "score": "0.57057", "text": "public function show($id)\n\t{\n\t\t//No need for showing\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "560ae0fd472bad5f1d21beeed5dfbbdd", "score": "0.57012135", "text": "public function show(){}", "title": "" }, { "docid": "98910c6c774dc1299639c448306ea157", "score": "0.5694748", "text": "public function show($id)\n {\n $this->crud->hasAccessOrFail('show');\n\n // set columns from db\n $this->crud->setFromDb();\n\n // cycle through columns\n foreach ($this->crud->columns as $key => $column) {\n // remove any autoset relationship columns\n if (array_key_exists('model', $column) && array_key_exists('autoset', $column) && $column['autoset']) {\n $this->crud->removeColumn($column['name']);\n }\n }\n\n // get the info for that entry\n $this->data['entry'] = $this->crud->getEntry($id);\n $this->data['crud'] = $this->crud;\n $this->data['title'] = trans('bcrud::crud.preview').' '.$this->crud->entity_name;\n\n // remove preview button from stack:line\n $this->crud->removeButton('preview');\n $this->crud->removeButton('delete');\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->crud->getShowView(), $this->data);\n }", "title": "" }, { "docid": "851cd390daf8f79de66a294538711bfd", "score": "0.5691463", "text": "public function view(HTTPRequest $request)\n {\n $id = $request->param('ID');\n if ($display = Display::get_by_id($id)) {\n return $this->renderPresentation($display);\n }\n\n return $this->httpError(404);\n }", "title": "" }, { "docid": "89380f02c69f1ed066b5443620b90407", "score": "0.568851", "text": "public function show($id)\n\t{ \n \t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
b162d0976205ad90102f7aaef606320b
return a training by id
[ { "docid": "b0783db07205235212668d0d889edb32", "score": "0.71600837", "text": "function get_training_by_id($training_id)\n {\n\n $this->db->where('t_id', $training_id);\n return $this->db->get('trainings')->row_array();\n }", "title": "" } ]
[ { "docid": "bb39a5ce7ffa48ba7fb0e4a5a34dd78a", "score": "0.7297909", "text": "public function get_training_by_training_id($training_id) {\n $this->db->select('*');\n $this->db->from('trainings');\n $this->db->where('training_id', $training_id);\n $this->db->limit(1);\n\n $query = $this -> db -> get();\n \n if($query->num_rows() >= 1) {\n return $query->result();\n }\n else {\n return false;\n }\n }", "title": "" }, { "docid": "4f7dd0b786f6c44a04fb728a07f22e3e", "score": "0.63316983", "text": "public function getResearchById($id)\n {\n return $this->whereId($id)->first();\n }", "title": "" }, { "docid": "f9f67970626e7ee3f3abdd378776c8bb", "score": "0.62191653", "text": "public function retrieve($id)\n {\n return $this->innovation->where('id', '=', $id)->with('user', 'category')->first();\n }", "title": "" }, { "docid": "34816be4f1ba26e3a1a199bde5275c55", "score": "0.620012", "text": "public function show($id) {\n $training = DB::table('trainings')\n ->join('users', 'trainings.created_by', '=', 'users.id')\n ->select('trainings.*', 'users.name')\n ->where('trainings.id', $id)\n ->first();\n return view('administrator.setting.training.show_training', compact('training'));\n }", "title": "" }, { "docid": "d0d09fd202fa7ccc87f3a3ebfd47d49c", "score": "0.61813927", "text": "public function show($id)\n {\n $training=Traininig::find($id);\n return view::make('training.show')->with('training',$training);\n }", "title": "" }, { "docid": "56d2b179296f4c1944ffe3a9655f885a", "score": "0.6114647", "text": "public function show($id)\n {\n return view('training::show');\n }", "title": "" }, { "docid": "43cf81cfc16ebb12b48534c57e5add04", "score": "0.5996438", "text": "public function byId($id);", "title": "" }, { "docid": "43cf81cfc16ebb12b48534c57e5add04", "score": "0.5996438", "text": "public function byId($id);", "title": "" }, { "docid": "22eef28fc53c90ee0c5161a0d05cdb5b", "score": "0.59852123", "text": "public function get_training_id_by_course_id($course_id) {\n $this ->db->select('training_id');\n $this ->db->from('trainings');\n $this ->db->where('course_id', $course_id);\n $this ->db->limit(1);\n\n $query = $this->db->get();\n \n if($query->num_rows() >= 1) {\n return $query->result();\n }\n else {\n return false;\n }\n }", "title": "" }, { "docid": "de41324b1b32a63568dc53cff1656651", "score": "0.59787536", "text": "public function getTrainID()\n {\n return $this->trainID;\n }", "title": "" }, { "docid": "de8e9a133f4ebf2314fa36becd1ae68f", "score": "0.59573984", "text": "public function getById();", "title": "" }, { "docid": "f9aa5e137359ccc2b70ac555af2d7dc0", "score": "0.59549266", "text": "public function getByID(int $id);", "title": "" }, { "docid": "c5c302a470c9a4f0b81c9b6707625af2", "score": "0.594924", "text": "public function byId($id)\n {\n return $this->model->byId($id);\n }", "title": "" }, { "docid": "4e457b0cf7fa4c152aa9603d631a394e", "score": "0.5940792", "text": "public function show($id)\n {\n $trainingdate = TrainingDate::findOrFail($id);\n if ($trainingdate) {\n return response($trainingdate,200);\n }\n return response()->json(['Mensaje' => 'Registro '.$id.' no encontrado']);\n }", "title": "" }, { "docid": "6df6f287d32428a59f309b4660158089", "score": "0.5917106", "text": "public function get_job_position_training_de($id = false){\n\t\t$this->db->where('training_process_id', $id);\n\t\treturn $this->db->get(db_prefix() . 'hr_jp_interview_training')->row();\n\t}", "title": "" }, { "docid": "506a49f1083e2194668935e8a0e55116", "score": "0.5899379", "text": "public static function getById($id);", "title": "" }, { "docid": "506a49f1083e2194668935e8a0e55116", "score": "0.5899379", "text": "public static function getById($id);", "title": "" }, { "docid": "6bbd456e4635ef2b3bc5051ceb501f1d", "score": "0.5894837", "text": "public function getbyId($id);", "title": "" }, { "docid": "eddcb3aef63b0aa50d798d3f8578f789", "score": "0.58939284", "text": "public function show($id)\n {\n $training = $this->repository->findOrFail($id);\n \n return view($this->module.'.detail',compact('training'))->with($this->data);\n }", "title": "" }, { "docid": "a80deaaa247aa396caaeb1d597456c9b", "score": "0.5875085", "text": "public function findById($id) {\n // priprava selectu\n $select = $this->prepareSelect();\n $select->where(\"et.experiment_id = ?\", $id);\n \n return $this->_generateRowset($select->query()->fetchAll())->current();\n }", "title": "" }, { "docid": "d7529eacf6d7ab381f9bb4adb44537b6", "score": "0.5854632", "text": "public function byId($id)\n {\n return $this->getById($id);\n }", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.585338", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.585338", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.585338", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.585338", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.585338", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.585338", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.585338", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.585338", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.585338", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.585338", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.585338", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.585338", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.585338", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.585338", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.585338", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.585338", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.585338", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.585338", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.585338", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.585338", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.585338", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.585338", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.585338", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.585338", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.585338", "text": "public function getById($id);", "title": "" }, { "docid": "1b87ad85aa661381321e014beb03a28b", "score": "0.585062", "text": "public function retrieve($id);", "title": "" }, { "docid": "1b87ad85aa661381321e014beb03a28b", "score": "0.585062", "text": "public function retrieve($id);", "title": "" }, { "docid": "a15907716b7d8ffd7908e121bd66ca11", "score": "0.5847118", "text": "function getById()\n {\n }", "title": "" }, { "docid": "1adbec751eae5bba4a96be547ea669f6", "score": "0.58458745", "text": "public function loadTestCaseById($id){\n return $this->getRepository()->findOneBy(array('idtestCase' => $id));\n }", "title": "" }, { "docid": "83ad217c2f9e0a13f4cb764431b051cf", "score": "0.58426607", "text": "function get($id) {\n $this->db->where('id', $id);\n $query = $this->db->get('planningRij');\n return $query->row();\n }", "title": "" }, { "docid": "08e3f26aa2ac2990c603d5306bf18a18", "score": "0.5830534", "text": "public function show($id)\n {\n $traininglist = TrainingList::find($id);\n return view('traininglist.show')->with('traininglist', $traininglist);\n }", "title": "" }, { "docid": "54c79b2698f161d7161fdcb4b18bc962", "score": "0.58233654", "text": "function get_by_id($id)\n { \n $this->db->where($this->id, $id);\n return $this->db->get($this->table)->row();\n }", "title": "" }, { "docid": "1a3d19ab5e2e17dad6d5f811104d3590", "score": "0.5823342", "text": "function get($id) {\n $this->db->where('id', $id);\n $query = $this->db->get('klasgroep');\n return $query->row();\n }", "title": "" }, { "docid": "3710182ce41b422feb6590f22333097a", "score": "0.5815076", "text": "public function getOne($id);", "title": "" }, { "docid": "3710182ce41b422feb6590f22333097a", "score": "0.5815076", "text": "public function getOne($id);", "title": "" }, { "docid": "0c9e51c1589936972c6e9c538dd6c192", "score": "0.580592", "text": "public static function getById($id){\n\t\t$sql = \"select * from tipo where id='\".$id.\"'\";\n\t\t$query = Executor::doit($sql);\n\t\treturn Model::one($query[0],new TipoData());\n\n\t}", "title": "" }, { "docid": "26b37f014726ad7ce8f7241c1659d6e9", "score": "0.57736546", "text": "public function show(Training $training)\n {\n //\n }", "title": "" }, { "docid": "26b37f014726ad7ce8f7241c1659d6e9", "score": "0.57736546", "text": "public function show(Training $training)\n {\n //\n }", "title": "" }, { "docid": "fb13bf7a31644e93eed11469f2a39865", "score": "0.57676715", "text": "public function get_training() {\n return $this->training;\n }", "title": "" }, { "docid": "8edf3ed7b7bf3d3a8caf847b0ea6062b", "score": "0.5763215", "text": "function get_by_id($id)\n {\n $this->db->where($this->id, $id);\n return $this->db->get($this->table)->row();\n }", "title": "" }, { "docid": "2099db6e62d270875301d385a225fcf8", "score": "0.5762218", "text": "public function getTrainingTypeById($param)\n {\n $id = $param['id'];\n $result = TrainingTypeTable::getById($id);\n\n if ($result !== null) {\n http_response_code(200);\n echo json_encode($result);\n } else {\n http_response_code(404);\n echo json_encode(array(\n 'message' => Constant::notFoundText . Constant::objectNames['trainingType']\n ));\n }\n }", "title": "" }, { "docid": "b0327fbcaae07918a98b8c1121af78d2", "score": "0.5759684", "text": "public function byId( $id )\n {\n return $this->getModel()->find( $id );\n }", "title": "" }, { "docid": "06a500ae63c6e05d0e9f92e5ca32063e", "score": "0.5720449", "text": "function get_by_id($id)\n {\n\t\t$id_patner = $this->session->userdata('DX_id_patner');\n\t\tif($id_patner > 0){\n\t\t\t//$this->db->where('id_patner', $id_patner);\n\t\t}\n $this->db->where($this->id, $id);\n return $this->db->get($this->table)->row();\n }", "title": "" }, { "docid": "5b804fd06c07b0b501aa75c683757a71", "score": "0.5712482", "text": "public function get($id) ;", "title": "" }, { "docid": "7cce131c0143c80b005a0ebb801f485c", "score": "0.57081515", "text": "function get_by_id($id)\n {\n $this->db->where($this->id, $id);\n return $this->db->get($this->table)->row();\n }", "title": "" }, { "docid": "899c38a95a508e70af52bfc1c1924060", "score": "0.56992996", "text": "function FindTrainingTakenById($TrainingTakenId) {\r global $connection; \r $SafeTrainingTakenId = mysqli_real_escape_string($connection, $TrainingTakenId); \r $query = \"SELECT * \"; \r $query .= \"FROM TrainingTaken \"; \r $query .= \"WHERE TrainingTakenId = {$SafeTrainingTakenId} \"; \r $query .= \"LIMIT 1\"; \r $TrainingTakenSet = mysqli_query($connection, $query); \r ConfirmQuery($TrainingTakenSet); \r if($TrainingTaken = mysqli_fetch_assoc($TrainingTakenSet)) { \r return $TrainingTaken; \r } else { \r return null; \r } \r }", "title": "" }, { "docid": "95db5ef5f81aa4f1c97071cc172f14ee", "score": "0.56934214", "text": "public function findOneById(int $id) : Prediction\n {\n $prediction = $this->objectRepository->findOneBy(['id' => $id]);\n if(empty($prediction)) {\n throw new EntityNotFoundException(\"This prediction doesn't exist\");\n }\n return $prediction;\n }", "title": "" }, { "docid": "4c3e2ba3bba42450c455c41223c6bd60", "score": "0.5690459", "text": "public function get_training_allocation_staff($id){\n\t\t$this->db->where('staffid',$id);\n\t\treturn $this->db->get(db_prefix().'hr_training_allocation')->row();\n\t}", "title": "" }, { "docid": "50f3e30b9da2f8e8f63ac00049e41fc4", "score": "0.56877536", "text": "public function getTrainingLevelById($param)\n {\n $id = $param['id'];\n $result = TrainingLevelTable::getById($id);\n\n if ($result !== null) {\n http_response_code(200);\n echo json_encode($result);\n } else {\n http_response_code(404);\n echo json_encode(array(\n 'message' => Constant::notFoundText . Constant::objectNames['trainingLevel']\n ));\n }\n }", "title": "" }, { "docid": "943a9514326c81e7bdbe71685df6f44b", "score": "0.56725943", "text": "public function getTraining()\n {\n return $this->training;\n }", "title": "" }, { "docid": "1debb05c7b76ff7082ffd56c1f666ef6", "score": "0.56714475", "text": "public function get( $id );", "title": "" }, { "docid": "93db0b4fd1998306479f77a289208f1d", "score": "0.5667919", "text": "public function edit($id)\n {\n $train = Training::leftJoin('media', 'training.id_media', '=', 'media.id_media')\n ->leftJoin('topik', 'training.id_topik', '=', 'topik.id_topik')\n ->leftJoin('penyelenggara', 'training.id_penyelenggara', '=', 'penyelenggara.id_penyelenggara')\n ->leftJoin('Kompetensi','training.id_kompetensi','=','kompetensi.id_kompetensi')\n ->where('training.id_training','=',$id)\n ->first();\n $media = Media::all();\n $topik = Topik::all();\n $penyelenggara = Penyelenggara::all();\n $kompetensi = Kompetensi::all();\n return view('training.edit', compact('train','media','topik','penyelenggara','kompetensi'));\n }", "title": "" }, { "docid": "252817a38da6f2bbc7de22cf1af26b32", "score": "0.5661992", "text": "public function getById( $id ){\n\n //return $this->model->find(\"id\", 25)->first();\n }", "title": "" }, { "docid": "d3e856c545880c26163fcf05488a1664", "score": "0.5659423", "text": "public function getById($id){\n\t\t$query = \"SELECT * FROM \" . $this->tables['tests'] . \" WHERE id = $id AND\";\n\n\t\treturn $this->constructGet($query);\n\t}", "title": "" }, { "docid": "0caa9e24cf24ebaa7dcb49a33d5d151d", "score": "0.56588626", "text": "public function getEstoqueSala(int $id): ?Model;", "title": "" }, { "docid": "66d03c9249137575a562eac2dea31fbd", "score": "0.56560624", "text": "function getById($id)\n {\n return $this->model->find($id);\n }", "title": "" }, { "docid": "66d03c9249137575a562eac2dea31fbd", "score": "0.56560624", "text": "function getById($id)\n {\n return $this->model->find($id);\n }", "title": "" }, { "docid": "66d03c9249137575a562eac2dea31fbd", "score": "0.56560624", "text": "function getById($id)\n {\n return $this->model->find($id);\n }", "title": "" }, { "docid": "66d03c9249137575a562eac2dea31fbd", "score": "0.56560624", "text": "function getById($id)\n {\n return $this->model->find($id);\n }", "title": "" }, { "docid": "05816bd88281e8f617e548a5a20ca4c5", "score": "0.5655089", "text": "function get_by_id($id)\n {\n return $this->get($id)->row();\n }", "title": "" }, { "docid": "12b78b3a817f44d650642139d01c0f7c", "score": "0.5651381", "text": "function get_by_id($id)\r\n { \r\n\t //echo $id;\r\n\t // exit;\r\n $this->db->where($this->id, $id);\r\n return $this->db->get($this->table)->row();\r\n }", "title": "" }, { "docid": "847e3ecff35648b9186efb3d73a26646", "score": "0.564829", "text": "public function find($id) {\n\t\treturn $this->court->find($id);\n\t}", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.56458336", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.56458336", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.56458336", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.56458336", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.56458336", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.56458336", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.56458336", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.56458336", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.56458336", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.56458336", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.56458336", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.56458336", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.56458336", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.56458336", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.56458336", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.56458336", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.56458336", "text": "public function get($id);", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "254a4f7d9d9599b4d206afa5b55958ac", "score": "0.0", "text": "public function create()\n {\n $ariane = ['user','Ajouter'];\n return view('admin.user.create',compact('ariane'));\n }", "title": "" } ]
[ { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75727344", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75727344", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "735e465640db5c659ac193ab8af1f08c", "score": "0.75663006", "text": "public function createAction ()\n\t{\n\t\t$this->view->form = $this->_form;\n\t}", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "1f9733369c1aaf55c73aa4d1a8a80882", "score": "0.74566424", "text": "public function create()\n {\n\n return view('resources.create');\n\n }", "title": "" }, { "docid": "1da53c4d224bfa3bc44c0fabd927bedd", "score": "0.7455584", "text": "public function create()\n {\n return view ('rol.form_create');\n }", "title": "" }, { "docid": "1b16c1f4677bd0ac799e087490d4d05b", "score": "0.73507345", "text": "public function create() {\n return view($this->className . '/form', [\n 'className' => $this->className,\n 'pageTitle' => $this->classNameFormatado . '- Cadastro de registro'\n ]);\n }", "title": "" }, { "docid": "edabb98341a0b5aadd47c2864942b8db", "score": "0.7339739", "text": "protected function create()\n {\n $form = Form::create($this->resource);\n $model = $form->model;\n\n $model->hasAccessOrFail('create');\n\n $model->fill($this->getOldInput());\n\n $form->fields()->each(function (Field $field) use (&$model) {\n $field->setValue($model);\n });\n\n return view('crud::form.create', compact('form'));\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "6ed61a57fb61b517537e754054cffc2f", "score": "0.7257705", "text": "public function create()\n {\n return view(\"stok.form\");\n }", "title": "" }, { "docid": "42de9969dbd16cbf3f496acd505422d8", "score": "0.7249422", "text": "public function create()\n {\n // shows a view to create a new resource\n return view('dashboard.admin.create');\n \n }", "title": "" }, { "docid": "d777482ca48a952bda74d0486cdad76a", "score": "0.7237927", "text": "public function create()\n {\n return \"Here is the creating form page.\";\n }", "title": "" }, { "docid": "8a257056a97a8ef04b6027c8bfb8cad1", "score": "0.723185", "text": "public function create()\n {\n\n $title = 'Add '. $this->getName();\n $form = $this->form($this->getFormClass(), [\n 'method' => 'POST',\n 'url' => route($this->getRouteFor('store')),\n ]);\n return view('.admin.form', compact('form', 'title'));\n }", "title": "" }, { "docid": "f5f050d80230f2f0b6313a13b65e7a0b", "score": "0.72228223", "text": "public function newAction()\n {\n $entity = new Faq();\n $form = $this->createCreateForm($entity);\n\n $form->add('question', 'text', array('label' => 'Ask Your Question :')); \n $form->add('answer', 'text', array('label' => 'Give an answer :'));\n $form->add('submit', 'submit', array('label' => 'Submit question'));\n\n return $this->render('FaqBundle:Faq:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "4b9c0332c0bc5feb4fa5c4c15ff4cda0", "score": "0.722023", "text": "public function create()\n {\n $this->authorize('create', $this->getResourceModel());\n\n $class = $this->getResourceModel();\n return view($this->getResourceCreatePath(), $this->filterCreateViewData([\n 'record' => new $class(),\n ] + $this->resourceData()));\n }", "title": "" }, { "docid": "29282129b8e24a976f037c589580f34b", "score": "0.7208537", "text": "public function create()\n {\n $this->page_title = trans('resource_sub_type.new');\n\n return view('resource_sub_type.new', $this->vdata);\n }", "title": "" }, { "docid": "85bc1c405768493e40df217a0040f018", "score": "0.7191366", "text": "function showCreateForm(){\n return view('admin.Direktori.Pendeta.create');\n }", "title": "" }, { "docid": "9493a84894964b34fd6021b3786bcc7a", "score": "0.71894634", "text": "public function create()\n {\n return view('crops.forms.create');\n }", "title": "" }, { "docid": "f6d3fc80bf700f89fa22e42e685b217d", "score": "0.7184248", "text": "public function create()\n {\n return view ('penilaiansmp.form');\n }", "title": "" }, { "docid": "68716ed8c8a7c02d13766dd274f478a3", "score": "0.718268", "text": "public function create()\n {\n return view('user_resources/create');\n }", "title": "" }, { "docid": "643073da4582f0c5ee209f1f696bb305", "score": "0.7166686", "text": "public function create()\n {\n return view('admin/records/forms/record-create-form');\n }", "title": "" }, { "docid": "86e44150333771a80ff3634ffc76f344", "score": "0.71529675", "text": "public function create()\n {\n return view('dashboard.form.create');\n }", "title": "" }, { "docid": "75889c35cd5f200bf02a5b21774293e1", "score": "0.7137003", "text": "public function create()\n {\n $this->data['titlePage'] = trans('admin.obj_new',['obj' => trans('admin.'.$this->titleSingle)]);\n $breadcrumbs = array();\n $breadcrumbs[] = [ 'title' => trans('admin.home'), 'link' => route($this->routeRootAdmin), 'icon' => $this->iconDashboard ];\n $breadcrumbs[] = [ 'title' => trans('admin.'.$this->titlePlural), 'link' => route(GetRouteAdminResource($this->resourceRoute)), 'icon' => $this->iconMain ];\n $breadcrumbs[] = [ 'title' => $this->data['titlePage'], 'icon' => $this->iconNew ];\n $this->data['breadcrumbs'] = $breadcrumbs;\n $this->data['category'] = $this->getModelArray($this->modelCategory);\n $this->data['province'] = $this->getModelArray($this->modelProvince);\n $this->data['district'] = $this->getModelArray($this->modelDistrict);\n $this->data['ward'] = $this->getModelArray($this->modelWard);\n $this->data['direction'] = $this->getModelArray($this->modelDirection);\n\n return view(GetViewAdminResource($this->resourceView, 'create'))->with($this->data);\n }", "title": "" }, { "docid": "7e262dd36752e23255d5ea03566e8de7", "score": "0.7122985", "text": "public function create()\n {\n $model = $this->model;\n return view('pages.admin.graha.form', compact('model'));\n }", "title": "" }, { "docid": "0a067c68f8000d9eb913daf36e5e607c", "score": "0.712034", "text": "public function create()\n {\n return view('FullForm.create');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "c88daeaad1f2ef73dd9534351ceea67a", "score": "0.70962554", "text": "public function newAction()\n {\n $entity = new FormEntity();\n $entity->setTemplate('keltanasTrackingBundle:Form:form.html.twig');\n $form = $this->createCreateForm($entity);\n\n return $this->render('keltanasTrackingBundle:Form:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "a7352ebb77d0418eb30e8fe2e7bfb857", "score": "0.7087128", "text": "public function actionCreate()\n\t{\n\t\t$this->render('create');\n\t}", "title": "" }, { "docid": "c27004d00e3f9afb85f74623ec456ca9", "score": "0.708025", "text": "public function create()\n {\n //\n return view('form');\n }", "title": "" }, { "docid": "8e0fde88926c98fb2c54ba67ab5b36a7", "score": "0.7061749", "text": "public function create()\n\t{\n\t\treturn View::make('librarians.create');\n\t}", "title": "" }, { "docid": "345c70747deda30c3482e759c25c4d12", "score": "0.706081", "text": "public function create()\n {\n return view('passenger.forms.create');\n }", "title": "" }, { "docid": "2b41dd9ed0cf1461dd65f8e05b0a94a1", "score": "0.70571953", "text": "public function create()\n {\n return $this->showForm();\n }", "title": "" }, { "docid": "20ab9d62fc4da5013c56daa9183bfe28", "score": "0.70571035", "text": "public function create()\n {\n return view('admin.client.form');\n }", "title": "" }, { "docid": "c69f303d7cafa0864b25b452417d3c13", "score": "0.70510703", "text": "public function create()\n\t{\n\t\treturn view('actions.create');\n\t}", "title": "" }, { "docid": "b7f63db5c5ecb7bba494b8a81ce69874", "score": "0.70475084", "text": "public function create(AdminResource $resource)\n {\n $form = $resource->getForm();\n\n return view('admin::resource.form', compact('form'));\n }", "title": "" }, { "docid": "8f53ed51f8136e8e32a2c0525120a50f", "score": "0.7042422", "text": "public function create()\n {\n //\n\n \n return view('student/ResourceStd');\n\n }", "title": "" }, { "docid": "f1f40cbb0cad3cf320b4c0ec09b3b428", "score": "0.7040213", "text": "public function create()\n {\n return view('form');\n\n }", "title": "" }, { "docid": "607b994b80e66fe45602a00379ab7779", "score": "0.70308834", "text": "public function create()\n {\n //return the create view (form)\n return view('books.create');\n }", "title": "" }, { "docid": "643fd44e4ced88a8aac481ced428c5ca", "score": "0.70261294", "text": "public function create()\n {\n $title = 'CRIAR REGISTRO';\n return view('forms.create',['title' => $title]);\n }", "title": "" }, { "docid": "66b746538eaf7a550c7b3a12968b96a6", "score": "0.70147324", "text": "public function create()\n {\n return view('supplier.form');\n }", "title": "" }, { "docid": "8074165780da4d1be303d3e9d8c535ba", "score": "0.7012196", "text": "public function create()\n {\n return view ('owner/form');\n }", "title": "" }, { "docid": "06af90c4292c136aaaf9329cfae0b3fc", "score": "0.70115083", "text": "public function create()\r\n {\r\n //mengarahkan ke form\r\n return view('rental.form');\r\n }", "title": "" }, { "docid": "248b476c0f07013b389c79c904231f2a", "score": "0.70046955", "text": "public function create()\n {\n return view('admin.car.add');\n }", "title": "" }, { "docid": "75fb4bc6a7a5df1f1f5cd380b0cd4aec", "score": "0.7000195", "text": "public function create()\n {\n //New Property form\n return view('properties.addproperty');\n }", "title": "" }, { "docid": "91dd937891cf552bdb6c058f3730d93b", "score": "0.6998989", "text": "public function newAction()\n {\n $entity = new foo();\n $form = $this->createForm(new fooType(), $entity);\n\n return $this->render('ScrunoBoardBundle:foo:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "c6f4cc7fdd05567403f39d82ae477eb4", "score": "0.6994647", "text": "public function create()\n\t{\n\t\treturn view('kasus.create');\n\t}", "title": "" }, { "docid": "68eb563182e9ed0d6524bc0b6aac22af", "score": "0.69939756", "text": "public function create()\n\t{\n\t\t// load the create form (app/views/professor/create.blade.php)\n\t\t$this->layout->content = View::make('professor.create');\n\t}", "title": "" }, { "docid": "6c77fcad45300d9322c483f2cf6f0bf9", "score": "0.69900626", "text": "public function create()\n\t{\n\t\treturn view('proyek.create');\n\t}", "title": "" }, { "docid": "033dad9a04f818507b4dc909e40e2cca", "score": "0.6988088", "text": "public function create()\n {\n $data[\"action\"] = 'anggota.store';\n return view('anggota.form', $data);\n }", "title": "" }, { "docid": "355b502cb4384aeb8c0d1322a57b7677", "score": "0.69879013", "text": "public function create()\n {\n return view ('show.create', [\n ]); \n }", "title": "" }, { "docid": "afec885a1ddf009d317c5bca27be7983", "score": "0.6985705", "text": "public function create()\n {\n\t\treturn view('admin.pages.supplier-form-create', ['page' => 'supplier']);\n }", "title": "" }, { "docid": "93cdfcc841a0d10e976bbc17fe7020ec", "score": "0.6977717", "text": "public function create()\n {\n return view('rombel.create');\n }", "title": "" }, { "docid": "eb3ba5c68f25897de6ed50346b9959f7", "score": "0.6976043", "text": "public function create()\n {\n $crud = crud_entry(new \\App\\Employee);\n\n return view('crud::scaffold.bootstrap3-form', ['crud' => $crud]);\n }", "title": "" }, { "docid": "432a42bd0e4b7b7dd13b0343e81c9f33", "score": "0.6974407", "text": "public function create()\n {\n //\n return view('libros/libroForm');\n }", "title": "" }, { "docid": "27f66e57741013d1d7bd227b0a1ae6cc", "score": "0.6969905", "text": "public function create()\n {\n return view('radars/create');\n }", "title": "" }, { "docid": "db317dc07de792187038b7e4a5f863fd", "score": "0.69643784", "text": "public function newAction()\n {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ManuTfeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "58119c678c7b859b3d2fcb9d4e2544e9", "score": "0.69620776", "text": "public function create()\n {\n return view('forms.girders.create');\n }", "title": "" }, { "docid": "6e09ea0495ecf33b6615199f96a87dd9", "score": "0.6958075", "text": "public function create()\n {\n return view('inventaris.create');\n }", "title": "" }, { "docid": "cfb06a7f594e86d7fe22432b5bd18371", "score": "0.6957784", "text": "public function newAction()\n {\n $entity = new Ministro();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ParroquiaCertificadoBundle:Ministro:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "121c8c321a85cfc3184f64d92ecfca6c", "score": "0.6954882", "text": "public function create()\n\t{\n\t\treturn view ('oficinas.create');\n\t}", "title": "" }, { "docid": "9cc1ebbeb06fe2564e0fa603d2c72f75", "score": "0.69542176", "text": "public function create()\n {\n //\n return view('product.form');\n }", "title": "" }, { "docid": "ad86bd025139be91b2df85c83f79d4bd", "score": "0.69525295", "text": "public function create()\n {\n return view('syllabus.create');\n }", "title": "" }, { "docid": "1276876980c60661df1af9ecd3659454", "score": "0.6946296", "text": "public function create()\n\t{\n\t\treturn View::make('nssf.create');\n\t}", "title": "" }, { "docid": "29d1eb6a37de9bf5891c3b5b4ef4fa2d", "score": "0.69450635", "text": "public function newForm()\n {\n $this->pageTitle = \"Création d'une question\";\n\n //initialisation des selects list\n $this->initSelectList();\n\n parent::newForm();\n }", "title": "" }, { "docid": "7c12821aa5d613a86cc8ba0cf190e6fd", "score": "0.6930994", "text": "public function create()\n {\n return view('tutores.new');\n }", "title": "" }, { "docid": "07e409b45065624d003704ab3b447aec", "score": "0.69273114", "text": "public function create()\n {\n return view('admin.product.form');\n }", "title": "" }, { "docid": "60c9cc4899b058bc51c74601c8025ebe", "score": "0.6925751", "text": "public function create()\n {\n return view('adminCreateForm');\n }", "title": "" }, { "docid": "466006539e9b1da8c7c2e06a069c4e2e", "score": "0.6921871", "text": "public function create()\n {\n return view('layout_admin.thenew.create_new');\n }", "title": "" }, { "docid": "38a6849d5b56a77b178a1fc8297c2e4e", "score": "0.69218206", "text": "public function create()\n\t{\n\t\treturn view('information.create');\n\t}", "title": "" }, { "docid": "83ebdde393be7960c0a3149b40b830fa", "score": "0.69206", "text": "public function create()\n {\n //\n return view('guest.sample.submit-property2');\n }", "title": "" }, { "docid": "50d6adc18861a552fb9ddb0969a2630f", "score": "0.69202167", "text": "public function create()\n {\n return view('umbooks::admin.models.book.create');\n }", "title": "" }, { "docid": "1b49a8bc053be1715bbf5620cf797e18", "score": "0.69184965", "text": "public function create()\n\t{\n\t\treturn View::make('product.create'); //form to create new product \n\t}", "title": "" }, { "docid": "ce1853ac01959995d112bb4d44014367", "score": "0.6918359", "text": "public function create()\n {\n //\n return view('ijinkeluars.create');\n }", "title": "" }, { "docid": "87632e3ed9e4e251e3f5a4dfa4cc4e5e", "score": "0.69181925", "text": "public function create()\n {\n // Place here the initial data and show\n // Ahh screw it, Show Everything!!!\n\n return view('record.create');\n\n }", "title": "" }, { "docid": "27e5069596828984f14a92c012c1e448", "score": "0.6914329", "text": "public function newAction()\n {\n $entity = new Inicio();\n $form = $this->createForm(new InicioType(), $entity);\n\n return $this->render('SisafBundle:Inicio:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "98e3bff438d778b0a9ccaad60778cf09", "score": "0.69096565", "text": "public function create()\n {\n return view('admin/car/add-car');\n }", "title": "" }, { "docid": "51a5131df9fc2dcd5b65b5ca8aa614d0", "score": "0.69092304", "text": "public function create()\n {\n //To show the required create page when its clicked\n return view('admin.create');\n \n \n }", "title": "" }, { "docid": "4b3f5241c4a2f638b9ee19747079b7a2", "score": "0.69069797", "text": "public function create()\n {\n return view('stus.add');\n }", "title": "" }, { "docid": "eec374cbf73315b7af3e5f2b21f37d4d", "score": "0.69059855", "text": "public function create()\n {\n return view('linhvuc.create');\n }", "title": "" }, { "docid": "0b940b83fdd9503e0b64330c52106d41", "score": "0.69053364", "text": "public function create()\n {\n return view('inventariss.create');\n }", "title": "" }, { "docid": "ecc913c81504bfd8529f7b7feaef7080", "score": "0.69047576", "text": "public function create(){\n return view('person/form', ['action'=>'create']);\n }", "title": "" }, { "docid": "64d616e79a29573ea35b962756917c05", "score": "0.69007623", "text": "public function create()\n {\n\t\t$d['action'] = route('product.store');\n\t\treturn view('back.pages.product.form', $d);\n }", "title": "" }, { "docid": "61066352fa31a37b0f1d8bc9fd229ea9", "score": "0.6897235", "text": "public function create()\n {\n /* $this->authorize('create'); */\n return view('refugio.refugioForm');\n }", "title": "" }, { "docid": "70820d35b4d8e319baa89b6f91a3d029", "score": "0.6895603", "text": "public function newAction() {\n $entity = new Recommandation();\n $form = $this->createCreateForm($entity);\n\n return $this->render('MyAppFrontBundle:Recommandation:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "27fad6d884340578087d232e3218a94d", "score": "0.68955874", "text": "public function create()\n {\n return view('backpages.formInfo');\n }", "title": "" }, { "docid": "619fa64afd3457bdc8d1c1a041acff47", "score": "0.68903565", "text": "public function create()\n {\n return View(\"$this->view_folder.form\", $this->data);\n }", "title": "" }, { "docid": "6769fe63e35d4f98abe507728065b246", "score": "0.6890337", "text": "public function create()\r\n {\r\n return view('superadmin::create');\r\n }", "title": "" }, { "docid": "09fab99adf688ea100aa90694eab5889", "score": "0.6888845", "text": "public function create()\n {\n return view(\"Amenity::add\");\n }", "title": "" }, { "docid": "985e9c7c0b741b5b1eb67c091e5ad371", "score": "0.6886975", "text": "public function create()\n\t{\n\t\t//\n\t\treturn View::make('oficinas.create');\n\t}", "title": "" }, { "docid": "9664795bf81cca0f3e65d94f0f595082", "score": "0.6880484", "text": "public function create()\n\t{\n\t\treturn view('questao.create');\n\t}", "title": "" }, { "docid": "623f899bed6c6f380a03ffc99508b73d", "score": "0.6879059", "text": "public function newAction()\n {\n $entity = new Candidato();\n $form = $this->createForm(new CandidatoType(), $entity);\n\n return $this->render('EleicaoAdmBundle:Candidato:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "6648fe4f8fd4df24b091c04829b92bbb", "score": "0.6878773", "text": "public function create()\n\t{\n\t\treturn View::make('powerful.create');\n\t}", "title": "" }, { "docid": "a3b3bbcce8f8a6239dadc2917240252b", "score": "0.6878254", "text": "public function showForm()\n {\n return view('AdminView.create');\n }", "title": "" }, { "docid": "06fe0499ccb2038bd9c25e7ef14289e2", "score": "0.68774086", "text": "public function create()\n {\n //Return item details form\n return view('home.create');\n }", "title": "" }, { "docid": "b3998fa6dce49f97902e942f97d98ede", "score": "0.687325", "text": "public function newAction()\n {\n $entity = new Escuelas();\n $form = $this->createForm(new EscuelasType(), $entity);\n\n return $this->render('QQiRecordappBundle:Escuelas:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "60ee9672a795f51a440ede1e68b26045", "score": "0.6870999", "text": "public function create()\n {\n return view('smp.create');\n }", "title": "" }, { "docid": "9f18b1b1a35a9af23eb1d4bbdba665f8", "score": "0.68696606", "text": "public function create()\n {\n return view('admin.car_com.create');\n }", "title": "" }, { "docid": "d14776cad1affd8d37756a185e7fe660", "score": "0.68665606", "text": "public function create()\n {\n return view('relasi.create');\n }", "title": "" }, { "docid": "96c76b820b73f95fa584de07ad04ad0a", "score": "0.6865675", "text": "public function create()\n {\n return view('nasabah/addnasabah');\n }", "title": "" }, { "docid": "e3cfac3178d9c5cb5ab322fa4785604c", "score": "0.6862222", "text": "public function create()\n {\n return view('Prenda.create');\n }", "title": "" } ]
f49e30ab88b20fe77b0337055162a700
Set the notification content.
[ { "docid": "256c54b515f7998f6c9ce46a0407fc55", "score": "0.0", "text": "public function content($value)\n {\n $this->content = $value;\n\n return $this;\n }", "title": "" } ]
[ { "docid": "43b631d43d8b13fda44376657399b519", "score": "0.6982389", "text": "function setContent($content) {\n $this->content = $content;\n }", "title": "" }, { "docid": "900d7076ab4be87fe4065db56f867ee9", "score": "0.67769647", "text": "public function setContent($content) {}", "title": "" }, { "docid": "904c6854f6875e6150504742f4d7897d", "score": "0.6758501", "text": "public function setContent($content){\n $this->content = $content;\n }", "title": "" }, { "docid": "0ac25f7cddbf8ccd91d02f1b9bfbd98d", "score": "0.67313504", "text": "public function setContent ($content) {\r\n $this->content = $content;\r\n }", "title": "" }, { "docid": "dbcfee01f307ac2a3c866f7f6c224867", "score": "0.67276806", "text": "public function setContent($content)\n {\n \t$this->content = $content;\n }", "title": "" }, { "docid": "652916ce5d5860dbb2e3e04bbde30a97", "score": "0.6708937", "text": "public function setContent($content) {\n $this->content = $content;\n }", "title": "" }, { "docid": "f589405613a1fec87072762bfcececcf", "score": "0.6703582", "text": "public function setContent($content);", "title": "" }, { "docid": "f589405613a1fec87072762bfcececcf", "score": "0.6703582", "text": "public function setContent($content);", "title": "" }, { "docid": "f354ff6d7a365b353df9791049098ba3", "score": "0.6696015", "text": "function setContent( $content )\n\t{\n\t\tself::verifyInitialized();\n\t\t$this->content = $content;\n\t}", "title": "" }, { "docid": "b7b8a58b3947201b8abc74bf4cea92cc", "score": "0.6641972", "text": "public function setContent($content) {\n\t\t$this->content = $content;\n\t}", "title": "" }, { "docid": "b7b8a58b3947201b8abc74bf4cea92cc", "score": "0.6641972", "text": "public function setContent($content) {\n\t\t$this->content = $content;\n\t}", "title": "" }, { "docid": "ef89e8a8fd5cc2a7281a3f2abe94522b", "score": "0.66114277", "text": "public function setContent($content) {\n $this->content = $content;\n }", "title": "" }, { "docid": "ef89e8a8fd5cc2a7281a3f2abe94522b", "score": "0.66114277", "text": "public function setContent($content) {\n $this->content = $content;\n }", "title": "" }, { "docid": "ef89e8a8fd5cc2a7281a3f2abe94522b", "score": "0.66114277", "text": "public function setContent($content) {\n $this->content = $content;\n }", "title": "" }, { "docid": "ef89e8a8fd5cc2a7281a3f2abe94522b", "score": "0.66114277", "text": "public function setContent($content) {\n $this->content = $content;\n }", "title": "" }, { "docid": "4f634a1239aaf4a72572b187a272cfeb", "score": "0.65874124", "text": "public function setContent( $content )\n {\n $this->content = $content;\n }", "title": "" }, { "docid": "95e804d1f0649013999cf61837282b33", "score": "0.6567711", "text": "public function setContent( $content ) {\n\t\t$this->mContent = $content;\n\t}", "title": "" }, { "docid": "ffcd72c2e31d15591b6c348961a4dbc4", "score": "0.65562063", "text": "public function setContent($content)\n {\n $this->content = $content;\n }", "title": "" }, { "docid": "ffcd72c2e31d15591b6c348961a4dbc4", "score": "0.65562063", "text": "public function setContent($content)\n {\n $this->content = $content;\n }", "title": "" }, { "docid": "ffcd72c2e31d15591b6c348961a4dbc4", "score": "0.65562063", "text": "public function setContent($content)\n {\n $this->content = $content;\n }", "title": "" }, { "docid": "ffcd72c2e31d15591b6c348961a4dbc4", "score": "0.65562063", "text": "public function setContent($content)\n {\n $this->content = $content;\n }", "title": "" }, { "docid": "ffcd72c2e31d15591b6c348961a4dbc4", "score": "0.65562063", "text": "public function setContent($content)\n {\n $this->content = $content;\n }", "title": "" }, { "docid": "ffcd72c2e31d15591b6c348961a4dbc4", "score": "0.65562063", "text": "public function setContent($content)\n {\n $this->content = $content;\n }", "title": "" }, { "docid": "ffcd72c2e31d15591b6c348961a4dbc4", "score": "0.65562063", "text": "public function setContent($content)\n {\n $this->content = $content;\n }", "title": "" }, { "docid": "ffcd72c2e31d15591b6c348961a4dbc4", "score": "0.65562063", "text": "public function setContent($content)\n {\n $this->content = $content;\n }", "title": "" }, { "docid": "4b8bb671181688616c59fd91a695558b", "score": "0.6509808", "text": "public function setContent($content)\n {\n $this->_content = (string) $content;\n }", "title": "" }, { "docid": "396cf9dc5ef08f8be32b0197ca8ed0cd", "score": "0.64816326", "text": "public function setContent($content)\n {\n if(!empty($content)) {\n $this->content = $content;\n }\n }", "title": "" }, { "docid": "e6ec1cdc7d74fd247b735fd6d729e76e", "score": "0.6394518", "text": "public function testGetSetContent()\n {\n $notification = new Notification();\n $this->assertNull($notification->getContent());\n\n // Test with a simple string\n $this->assertSame($notification, $notification->setContent('Hello !'));\n $this->assertSame('Hello !', $notification->getContent());\n\n // Test with a map of ISO 639-1 language => message\n $this->assertSame(\n $notification,\n $notification->setContent(\n [\n 'fr' => 'Bonjour !',\n 'en' => 'Hello !',\n 'es' => 'Buenos dias !'\n ]\n )\n );\n $this->assertSame(\n [\n 'fr' => 'Bonjour !',\n 'en' => 'Hello !',\n 'es' => 'Buenos dias !'\n ],\n $notification->getContent()\n );\n }", "title": "" }, { "docid": "f0131da86ee8c6d5dd8a76633749838a", "score": "0.63746023", "text": "public function setContent(string $content): void {\n\t\t// tell our view to use. so, we'll add that capability here.\n\t\t\n\t\t$this->contentTemplate = $content;\n\t\tparent::setContent($content);\n\t}", "title": "" }, { "docid": "1a812c3e34d07f2aab32b61849e5993f", "score": "0.63729686", "text": "private function setContent(string $content) {\n $this->content = $content;\n }", "title": "" }, { "docid": "e56b47332e07b3fee13e50c355ffbd8b", "score": "0.6297416", "text": "public function content($content)\n {\n\t\t\treturn $this->updateLastNotification(['content' => $content]);\n }", "title": "" }, { "docid": "1cc9c56c60fe7277fa9b97c2b98c1e4c", "score": "0.62464434", "text": "public function setContent(string $content)\n {\n $this->content = $content;\n }", "title": "" }, { "docid": "82c3c7c57aa91b436d93a7dc910ac410", "score": "0.6226599", "text": "public function setContent($data)\n {\n static::$_data = $data;\n }", "title": "" }, { "docid": "0aed876d960e3cd08d432105baea66eb", "score": "0.62177044", "text": "public function setContent(string $content): void {\n $this->data[\"content\"] = $content;\n $this->entity->setContent($this->data[\"content\"]);\n }", "title": "" }, { "docid": "8b0ff4a7d4f35ca40dfb1134724676d3", "score": "0.619957", "text": "function ljmm_set_content()\n{\n//If content is not set, set the default content.\n\t$content = get_option('ljmm-content');\n\n\tif (empty($content)) {\n\t\t$content = ljmm_get_defaults('maintenance_message');\n\t\tupdate_option('ljmm-content', stripslashes($content));\n\t}\n\n//If content is not set, set the default content.\n\t$mode = get_option('ljmm-mode');\n\tif (empty($mode)) {\n\t\tupdate_option('ljmm-mode', 'default');\n\t}\n}", "title": "" }, { "docid": "c2dce188b4bcd91f83bad30660e371d2", "score": "0.6131395", "text": "public function setContent($content) {\n\t\t$this->view->assign('content', $content);\n\t}", "title": "" }, { "docid": "cc059c54675bd3755417389a71294a35", "score": "0.61075485", "text": "public function setContent($content)\n {\n $this->privateContent = $content;\n }", "title": "" }, { "docid": "ae5d1a47dffb4c45492beb211546d705", "score": "0.60740227", "text": "public function setContent($content) {\n\t\t\t$this->tpl->setUnsafe('CONTENT', $content);\n\t\t}", "title": "" }, { "docid": "4fb60fa7aaabba117c53b09525e0cfac", "score": "0.60546935", "text": "public function setContentAttribute($content)\n {\n $this->attributes['content_raw'] = $content;\n $this->attributes['content_html'] = markdown($content);\n }", "title": "" }, { "docid": "3d51c77c2dca5beeea6bd832341cb76e", "score": "0.6032249", "text": "public function setContent ( $content )\n\t{\n\t\tif( empty( $content ) ) $this->error( \"Content cannot be empty.\" );\n\t\t$content = str_replace( chr( 146 ), chr( 39 ), $content );\n\t\t$this->post->content = $content;\n\t}", "title": "" }, { "docid": "a426991fca95a013912e8901af4ab721", "score": "0.6016492", "text": "public function setContent(array $content)\n {\n $this->_content = $content;\n }", "title": "" }, { "docid": "5e63b4b84394fa249d783b05d849ac83", "score": "0.59995496", "text": "public function setContent($html)\n {\n $this->content = trim($html);\n }", "title": "" }, { "docid": "8e257b23dc71c8b2c69cc26f6144a9ac", "score": "0.5996658", "text": "public function setContent($content)\n {\n $this->content = json_decode($content);\n }", "title": "" }, { "docid": "850aaf5e139663d9efea6b7964e549ef", "score": "0.5941823", "text": "public final function setContent(Content $OContent)\n {\n $this->content = $OContent;\n }", "title": "" }, { "docid": "a873e4d6c17afc41c60dba1d23eb791e", "score": "0.5919066", "text": "public function set_content( $content ) {\n\n\t\tif ( empty( $content ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( is_array( $content ) ) {\n\n\t\t\tif (\n\t\t\t\t! isset( $content['text'] ) ||\n\t\t\t\t! isset( $content['html'] )\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( ! empty( $content['html'] ) ) {\n\t\t\t\t$body = array(\n\t\t\t\t\t'contentType' => 'html',\n\t\t\t\t\t'content' => $content['html'],\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t$body = array(\n\t\t\t\t\t'contentType' => 'text',\n\t\t\t\t\t'content' => $content['text'],\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$this->set_body_param(\n\t\t\t\tarray(\n\t\t\t\t\t'body' => $body,\n\t\t\t\t)\n\t\t\t);\n\t\t} else {\n\t\t\t$body = array(\n\t\t\t\t'contentType' => 'html',\n\t\t\t\t'content' => $content,\n\t\t\t);\n\n\t\t\tif ( $this->phpmailer->ContentType === 'text/plain' ) {\n\t\t\t\t$body['contentType'] = 'text';\n\t\t\t}\n\n\t\t\t$this->set_body_param(\n\t\t\t\tarray(\n\t\t\t\t\t'body' => $body,\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "9c816f1377eaed374e9cf1bf28e59fec", "score": "0.59172934", "text": "function onSetContent( $editor, $html ) {\n\t\treturn \"tinyMCE.setContent(\".$html.\");\";\n\t}", "title": "" }, { "docid": "daab4fd85e6f43708609fab2a4a6f55a", "score": "0.587986", "text": "public function setContent($value) {\n\t\t$this->content = $value;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "c2fd2eae051879cb4def6c3cf1162e7e", "score": "0.5864528", "text": "public function setContent($content)\n {\n $this->content =& $this->validateContent(&$content);\n $this->notify('setContentOn', $this, &$this->content);\n return $this;\n }", "title": "" }, { "docid": "93f3a081cffee8c967adf463f28a0558", "score": "0.5863905", "text": "public function setContent(?array $content):void\n {\n $this->content = $content;\n }", "title": "" }, { "docid": "10f2c94df519efd681fda89a241671ed", "score": "0.58541894", "text": "public function setContent($content) {\n\t\t$this->_content = (!$this->_memory && strtolower(gettype($content)) == 'array') ? json_encode($content) : $content;\n\t}", "title": "" }, { "docid": "780482b931a8b6bbbb8963f5375c1610", "score": "0.5835984", "text": "public function setContentAttribute($value)\n {\n $this->attributes['content'] = $value ? static::$formatter->parse($value, $this) : null;\n }", "title": "" }, { "docid": "ec3b29a42e5cd7303d5fba8bf7c78231", "score": "0.5829019", "text": "function setContent($content)\n {\n $this->data['content'] = $content;\n return $this;\n }", "title": "" }, { "docid": "da84879ec1afcbca86364e3c7b9b0374", "score": "0.58181834", "text": "public function setContent($newVal)\n {\n $this->content = $newVal;\n return $this;\n }", "title": "" }, { "docid": "d3ea8f45d547b83fb302ecb5492ddb78", "score": "0.5813232", "text": "function setContent($view = NULL, $view_data = NULL) {\n $this->setView('content', $view, $view_data);\n }", "title": "" }, { "docid": "bfc303d7e67b9a39f9201ca92d39d6fb", "score": "0.58091134", "text": "public function setBody($content);", "title": "" }, { "docid": "41fbfc8fd0b7bceecdc27b0010e7ca9e", "score": "0.5800525", "text": "public function set_content($content) {\r\n $this->article_content = htmlentities($content);\r\n }", "title": "" }, { "docid": "8fc5705fa27779ca888fda1c4f2d3333", "score": "0.5798229", "text": "public function setContent($content)\n\t{\n\t\t$this->original = $content;\n\n\t\t$status = $this->getStatusCode();\n\t\t$reason = '';\n\t\t$output = '';\n\n\t\tswitch ($this->headers->get('content-type'))\n\t\t{\n\t\t\tcase 'text/plain':\n\t\t\t\t/*if ($suppress_response_codes)\n\t\t\t\t{\n\t\t\t\t\t$output .= \"Status: $status\\n\";\n\t\t\t\t\t$output .= \"Reason: $reason\\n\";\n\t\t\t\t\t$output .= \"\\n\";\n\t\t\t\t}*/\n\n\t\t\t\tif (!is_object($content) && !is_array($content))\n\t\t\t\t{\n\t\t\t\t\t$output .= $content;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$output .= json_encode($content);\n\t\t\t\t}\n\t\t\tbreak;\n\n\t\t\tcase 'text/html':\n\t\t\t\t$reason = htmlspecialchars($reason);\n\t\t\t\t$content = htmlspecialchars($content);\n\n\t\t\t\t$output .= \"<!DOCTYPE html>\\n\";\n\t\t\t\t$output .= \"<html lang='en'>\\n\";\n\t\t\t\t$output .= \"<head>\\n\";\n\t\t\t\t$output .= \"<meta charset='utf-8'>\\n\";\n\t\t\t\t$output .= \"<title>$status $reason</title>\\n\";\n\t\t\t\t$output .= \"</head>\\n\";\n\t\t\t\t$output .= \"<body>\\n\";\n\t\t\t\t$output .= '<div class=\"error\">' . \"\\n\";\n\n\t\t\t\t$output .= '<h1 id=\"reason\">' . $reason . \"</h1>\\n\";\n\n\t\t\t\tif ($suppress_response_codes)\n\t\t\t\t{\n\t\t\t\t\t$output .= '<p id=\"status\">' . htmlspecialchars($status) . \"</p>\\n\";\n\t\t\t\t}\n\n\t\t\t\tif (!is_object($content) && !is_array($content))\n\t\t\t\t{\n\t\t\t\t\t$output .= '<p id =\"message\">' . $content . \"</p>\\n\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$output .= '<p id =\"message\">' . json_encode($content) . \"</p>\\n\";\n\t\t\t\t}\n\n\t\t\t\t$output .= \"</div>\\n\";\n\t\t\t\t$output .= \"</body>\\n\";\n\t\t\t\t$output .= \"</html>\";\n\t\t\tbreak;\n\t\t\tcase 'application/xhtml+xml':\n\t\t\t\t$reason = htmlspecialchars($reason);\n\t\t\t\t$content = htmlspecialchars($content);\n\n\t\t\t\t$output .= '<?xml version=\"1.0\" ?>' . \"\\n\";\n\t\t\t\t$output .= '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">' . \"\\n\";\n\t\t\t\t$output .= '<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">' . \"\\n\";\n\t\t\t\t$output .= \"<head>\\n\";\n\t\t\t\t$output .= \"<title>$status $reason</title>\\n\";\n\t\t\t\t$output .= \"</head>\\n\";\n\t\t\t\t$output .= \"<body>\\n\";\n\t\t\t\t$output .= '<div class=\"error\">' . \"\\n\";\n\n\t\t\t\t$output .= '<h1 id=\"reason\">' . $reason . \"</h1>\\n\";\n\n\t\t\t\tif ($suppress_response_codes)\n\t\t\t\t{\n\t\t\t\t\t$output .= '<p id=\"status\">' . htmlspecialchars($status) . \"</p>\\n\";\n\t\t\t\t}\n\t\t\t\tif (!is_object($content) && !is_array($content))\n\t\t\t\t{\n\t\t\t\t\t$output .= '<p id =\"message\">' . $content . \"</p>\\n\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$output .= '<p id =\"message\">' . json_encode($content) . \"</p>\\n\";\n\t\t\t\t}\n\n\t\t\t\t$output .= \"</div>\\n\";\n\t\t\t\t$output .= \"</body>\\n\";\n\t\t\t\t$output .= \"</html>\";\n\t\t\tbreak;\n\t\t\tcase \"application/xml\":\n\t\t\t\t$output .= Xml::encode($content);\n\t\t\tbreak;\n\t\t\tcase 'application/json':\n\t\t\t\t$output .= json_encode($content);\n\t\t\tbreak;\n\t\t\tcase 'application/javascript':\n\t\t\t\t$output .= $content;\n\t\t\tbreak;\n\t\t\tcase 'application/vnd.php.serialized':\n\t\t\t\t$output .= serialize($content);\n\t\t\tbreak;\n\t\t\tcase 'application/php':\n\t\t\t\t$output .= var_export($content, true);\n\t\t\tbreak;\n\t\t\tcase 'application/x-www-form-urlencoded':\n\t\t\t\tif (!is_object($content))\n\t\t\t\t{\n\t\t\t\t\t$output .= $content;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$output .= json_encode($content);\n\t\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\treturn parent::setContent($output);\n\t}", "title": "" }, { "docid": "36e9474ac8640b852fbd57bcdd42c5cf", "score": "0.57695854", "text": "public function setMessagePlain($content) {\r\n\t\t$this->mailer->AltBody = $content;\r\n\t}", "title": "" }, { "docid": "df41312786e9444e9e72789fbca3f79c", "score": "0.57636505", "text": "function onSetContent($editor, $html) {\n\t\treturn 'tinyMCE.get(\\''.$editor.'\\').setContent('.$html.');';\n\t}", "title": "" }, { "docid": "3b0343acc9a0a9473823d6ab0e86410f", "score": "0.5758971", "text": "private function setContent($content)\n {\n if (!is_string($content)) {\n throw new \\InvalidArgumentException(sprintf(\n '%s: expects a string argument; received \"%s\"',\n __METHOD__,\n (is_object($content) ? get_class($content) : gettype($content))\n ));\n }\n \n $this->content = $content;\n }", "title": "" }, { "docid": "31703d553a430a97beca21576eeb30ca", "score": "0.5706621", "text": "function setFormInstructionsContent($content)\n {\n $this->__form_instructions_content = $content ;\n }", "title": "" }, { "docid": "785b9247da33a556a4dded534a4cd183", "score": "0.5701918", "text": "protected function setFormContent()\n\t{\n\t\t$content = $this->getTitle();\n\t\t\n if ( isset( $this->data['error']['form'] ) ) {\n $content .= '<p class=\"form-error\">' . $this->data['error']['form'] . '</p>';\n }\n \n\t\t$content .= '<p>Are you sure you want to delete your meditation time on <b>';\n\t\t$content .= $this->data['long_date'];\n\t\t$content .= '</b>?</p>';\n\t\t\n\t\t$this->form = new Form;\n\t\t$this->buildForm();\n\t\t$content .= $this->form->getHtml();\n\t\t\n\t\t$this->content = $content;\n\t}", "title": "" }, { "docid": "08b75d363223cd623bc4501c8acf5b12", "score": "0.56786525", "text": "function setContent(string $content): Message\n\t{\n\t\tif($this->getAuthor()\n\t\t\t\t->getUser() !== $this->channel->guild->discord->getUser())\n\t\t{\n\t\t\tthrow new BadMethodCallException(\"Can't edit messages submitted by different users\");\n\t\t}\n\t\t$this->channel->guild->discord->http(\"PATCH\", \"/channels/{$this->channel->id}/messages/{$this->id}\", [\n\t\t\t\"content\" => $content\n\t\t]);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "e7238f48596cbff4f678291bb0273ed8", "score": "0.5677443", "text": "public function setContent($content)\n {\n return $this->_setValue('content', $content);\n }", "title": "" }, { "docid": "8fde6ddce79b95933d5eceddb41861e6", "score": "0.5673961", "text": "public function setContent($val)\n {\n $this->_propDict[\"content\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "8fde6ddce79b95933d5eceddb41861e6", "score": "0.5673961", "text": "public function setContent($val)\n {\n $this->_propDict[\"content\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "10065804df344274e2a6f762249367b0", "score": "0.56671077", "text": "public function setContentAttribute($value)\n {\n $value = str_replace(\"\\r\\n\", \"\\n\", $value);\n\n $limitedString = Str::limit($value, self::CONTENT_LIMIT, '');\n\n $this->attributes['content'] = nl2br(e($limitedString));\n }", "title": "" }, { "docid": "c94aee1f58f2baf59e273b71245afd2f", "score": "0.5639317", "text": "public function setContent($value) {\n return $this->set(self::CONTENT, $value);\n }", "title": "" }, { "docid": "c94aee1f58f2baf59e273b71245afd2f", "score": "0.5639317", "text": "public function setContent($value) {\n return $this->set(self::CONTENT, $value);\n }", "title": "" }, { "docid": "c94aee1f58f2baf59e273b71245afd2f", "score": "0.5639317", "text": "public function setContent($value) {\n return $this->set(self::CONTENT, $value);\n }", "title": "" }, { "docid": "c94aee1f58f2baf59e273b71245afd2f", "score": "0.5639317", "text": "public function setContent($value) {\n return $this->set(self::CONTENT, $value);\n }", "title": "" }, { "docid": "c94aee1f58f2baf59e273b71245afd2f", "score": "0.5639317", "text": "public function setContent($value) {\n return $this->set(self::CONTENT, $value);\n }", "title": "" }, { "docid": "c94aee1f58f2baf59e273b71245afd2f", "score": "0.5639317", "text": "public function setContent($value) {\n return $this->set(self::CONTENT, $value);\n }", "title": "" }, { "docid": "7f1e2c030bbb4a3f53befb22fab68100", "score": "0.5637105", "text": "public function setvalue($val) {\n\t\t$this->content = $val;\n\t}", "title": "" }, { "docid": "c8cfe75491b4ccf70e32c9cc05dffcbf", "score": "0.561883", "text": "protected function setContentData($data = [])\n {\n $this->contentData = array_merge(['pageTitle' => $this->pageTitle, 'menuData' => $this->getMenu()], $data);\n }", "title": "" }, { "docid": "0c8940d40e1f7e678e25ec22e4bc5d4d", "score": "0.5584802", "text": "public abstract function changeContent();", "title": "" }, { "docid": "acfa7a0d092dd4243bee3da1580cd09c", "score": "0.5569575", "text": "protected function setContents()\n {\n if (!$this->template->getFileContent()) {\n return;\n }\n\n $this->fileContents = $this->fillPlaceholders(\n $this->template->getFileContent(),\n $this->template->getName()\n );\n }", "title": "" }, { "docid": "3a4a3980835fec10be2a8b212f461733", "score": "0.55621135", "text": "private function setAppNotification() : void\n {\n if ( Session::getVar( 'userId' ))\n {\n $model = new Model();\n $msg = $model->getAppNotificationByUser( Session::getVar( 'userId' ));\n\n ! empty( array_filter( $msg ) ) ? $this->view->assign( '_appNotification', $msg ) : '';\n }\n }", "title": "" }, { "docid": "df8aeaba38da5894a97f86241492ce37", "score": "0.55597913", "text": "public function setContent($content)\n {\n $this->_content = $content;\n return $this;\n }", "title": "" }, { "docid": "45fc2c6c16d3afedf152eac0fc833309", "score": "0.5510797", "text": "public function setContentAttribute($content){\n\t\t$this->attributes['content'] = Purifier::clean($content);\n }", "title": "" }, { "docid": "297fdfa961f506b074df49cdc75dc2b1", "score": "0.5501983", "text": "public function updateContent()\n\t{\n\t $data['content'] = $this->getContent();\n $data['format'] = $this->getFormat();\n\t $data['modified'] = new Zend_Db_Expr('NOW()');\n $where = $this->db->quoteInto('post_id = ?', $this->getId());\n $rows_affected = $this->db->update('zanby_discussion__posts', $data, $where);\n \n if ( Warecorp_DiscussionServer_DiscussionList::isIncludeBlog() || !$this->getTopic()->getDiscussion()->isBlog() ) {\n try {\n //queue message for email delivery\n $this->load($this->getId());//fill all fields by correct values\n Warecorp_DiscussionServer_GroupSubscription::EnqueuePostForDelivery($this);\n } catch (Exception $exc) {\n //ignore error and continue work\n //TODO: log error message\n }\n }\n\t}", "title": "" }, { "docid": "ffc079098f54867b8a8eeb5674bc50fb", "score": "0.54730946", "text": "public function set_content( $content ) {\n\t\t\n\t\tif( is_string( $content ) ) {\n\t\t\t$this->content = $content;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "12554095d6cfcd25f78f5a4df1353af8", "score": "0.5466638", "text": "public function set($content) {\n\n\t\t//add a note to the start of the content before its cached\n\t\t$this->body = \"<!-- Cached copy, generated \". date('H:i:s') .\" --> \\n\\n \" . $content;\n\n\t\t//write the content to our file\n\t\tfile_put_contents($this->file, $this->body);\n\n\t\t//set the cache exists flag\n\t\t$this->exists = true;\n\n\t\t//return this for chaining\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "73822ba454d23995643118ab67425290", "score": "0.5459869", "text": "public function setcontents($contents) {\n\t\t$this->contents = $contents;\n\t}", "title": "" }, { "docid": "f99f6ae43241d374af0d3e7a229f4ddc", "score": "0.54551053", "text": "public function sendContent() {\n echo $this->content;\n }", "title": "" }, { "docid": "e30db40d7763faddaf26a8aabeeb7784", "score": "0.54337984", "text": "public function setContent($string){\n\t\t$this->content = $string; \n\t\treturn $this;\n\t}", "title": "" }, { "docid": "a4e99cf4cea0b70e5f4e7c13bdc8c142", "score": "0.543214", "text": "public function setContent(string $content) : self\n {\n $this->initialized['content'] = true;\n $this->content = $content;\n return $this;\n }", "title": "" }, { "docid": "223bf11c211f36df8a67e517a67eb5b1", "score": "0.54204845", "text": "public function sendContent()\n {\n echo $this->content;\n }", "title": "" }, { "docid": "9d53ec7b90328f18f92d7760e366441d", "score": "0.5407685", "text": "public function send_content() {\n Event::factory('response.content_send_pre')->notify_all();\n echo $this->get_content();\n Event::factory('response.content_send_post')->notify_all();\n\n return $this;\n }", "title": "" }, { "docid": "1c1b248569fb7ca31d4dba88ad07c584", "score": "0.54030186", "text": "public function setContent($content)\n {\n $this->content = $content;\n\n return $this;\n }", "title": "" }, { "docid": "3676c0986089cf22a54fc26828a28d55", "score": "0.5402214", "text": "function la_new_private_message_notification( $content, $notify ) {\n\t//type=la_private_message&amp;project=5169&amp;author=449\n\t$post_excerpt = str_replace( '&amp;', '&', $notify->post_excerpt );\n\tparse_str( $post_excerpt );\n\n\tif( isset( $type ) && isset( $project ) && isset( $author ) ) {\n\t\tif( 'la_private_message' == $type ) {\n\t\t\t$message_url = get_site_url() . '/messages/?a_id='. $author .'&p_id=' . $project;\n\t\t\t$message = sprintf( __( 'You have a new message for %s', ET_DOMAIN ),\n\t\t\t\t '<strong>'. get_the_title($project) . '</strong>');\n\t\t\t$content .= '<a class=\"fre-notify-wrap\" href=\"' . $message_url . '\">\n\t\t <span class=\"notify-avatar\"><i class=\"fa fa-exclamation-circle\"></i></span>\n\t\t <span class=\"notify-info\">' . $message . '</span>\n\t\t <span class=\"notify-time\">' . sprintf( __( \"%s on %s\", ET_DOMAIN ), get_the_time( '', $notify->ID ), get_the_date( '', $notify->ID ) ) . '</span>\n\t </a>';\n\t\t}\n\n\t}\n\treturn $content;\n}", "title": "" }, { "docid": "16c929ddaaab8da4a2da50e8e07511d0", "score": "0.53850144", "text": "public function set($section, $contents) {\n\t\t\t$this->{strtolower($section) . \"Content\"} = $contents;\n\t\t}", "title": "" }, { "docid": "52cbc66c175d8c456e89a95ad7c415f8", "score": "0.53751063", "text": "public function addContent($value)\n {\n $this->content[] = $value;\n }", "title": "" }, { "docid": "6ec922e1e427867db31e2849b318b8cb", "score": "0.5374279", "text": "public function setContent($content) {\n $this->getInnerContainer()->replaceContent($content);\n return $this;\n }", "title": "" }, { "docid": "095bd8278f70cc68b795763c7f1aa83b", "score": "0.53641963", "text": "protected function setContent($content)\n\t {\n\t $this->content = $content;\n\n\t return $this;\n\t }", "title": "" }, { "docid": "8eec7b1c4d49d8f693ecd0d6577e33dc", "score": "0.53585017", "text": "public function store() {\n $this->_factory->storeNotification($this);\n }", "title": "" }, { "docid": "6d32f4e8aa10544b360a2e5babeef644", "score": "0.53547275", "text": "public function prepareNotificationContent($order)\n {\n $data = [\n 'title' => 'New Order Placed',\n 'body' => 'Order ('.$order->id.') placed by '. $order->customerFullName .' successfully.',\n 'message' => 'Order ('.$order->id.') placed by '. $order->customerFullName .' successfully.',\n 'sound' => 'default',\n 'orderStatus' => $order->parcel_status,\n 'orderId' => $order->id,\n 'type' => 'order'\n ];\n \n $notification = [\n 'title' => $data['title'],\n 'content' => $data['body'],\n ];\n\n $this->notificationRepository->sendNotification($data, $notification);\n }", "title": "" }, { "docid": "874954ee73352b7c61d3c1893ed71ee4", "score": "0.5353415", "text": "public function setContent(string $stringHTML): void\n {\n $this->stringHTML = $stringHTML;\n }", "title": "" }, { "docid": "1f2d42b9d11df137f0584916a354c198", "score": "0.5342881", "text": "function addContent($content) {\n $this->_content .= $content;\n }", "title": "" }, { "docid": "9bb26d5eb94b9c9a43681dcbfe75cdf4", "score": "0.53377277", "text": "public function setContent($content)\r\n {\r\n $this->content = $content;\r\n return $this;\r\n }", "title": "" }, { "docid": "858c34d445c974f136b5c65edbd07fc6", "score": "0.53361636", "text": "public function setResourceContents($content)\n {\n }", "title": "" } ]